Fixed bugs in synchronization code
[public/netxms.git] / include / nxclapi.h
CommitLineData
80ffed5a
VK
1/*
2** NetXMS - Network Management System
3** Client Library API
4** Copyright (C) 2004 Victor Kirhenshtein
5**
6** This program is free software; you can redistribute it and/or modify
7** it under the terms of the GNU General Public License as published by
8** the Free Software Foundation; either version 2 of the License, or
9** (at your option) any later version.
10**
11** This program is distributed in the hope that it will be useful,
12** but WITHOUT ANY WARRANTY; without even the implied warranty of
13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14** GNU General Public License for more details.
15**
16** You should have received a copy of the GNU General Public License
17** along with this program; if not, write to the Free Software
18** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19**
20** $module: nxclapi.h
21**
22**/
23
24#ifndef _nxclapi_h_
25#define _nxclapi_h_
26
27#include <nms_common.h>
e641b7d0 28#include <nms_util.h>
5ebea5e0 29#include <nxevent.h>
03ea8b3d 30#include <nximage.h>
80ffed5a 31
8aeffdee
VK
32#ifdef _WIN32
33#ifdef LIBNXCL_EXPORTS
34#define LIBNXCL_EXPORTABLE __declspec(dllexport)
35#else
36#define LIBNXCL_EXPORTABLE __declspec(dllimport)
37#endif
38#else /* _WIN32 */
39#define LIBNXCL_EXPORTABLE
40#endif
41
80ffed5a 42
c6576857
VK
43//
44// Custom data types
45//
46
47typedef unsigned long HREQUEST;
48
49
0c8bf759
VK
50//
51// Some constants
52//
53
878c92bc
VK
54#define MAX_OBJECT_NAME 64
55#define MAX_COMMUNITY_LENGTH 32
56#define MAX_OID_LENGTH 1024
57#define MAX_EVENT_MSG_LENGTH 256
58#define MAX_EVENT_NAME 64
5ac3236b 59#define MAX_USER_NAME 64
54abbe0e
VK
60#define MAX_USER_FULLNAME 128
61#define MAX_USER_DESCR 256
7ec6cca8
VK
62#define MAX_ITEM_NAME 256
63#define MAX_STRING_VALUE 256
8c18110a
VK
64#define GROUP_FLAG ((DWORD)0x80000000)
65#define GROUP_EVERYONE ((DWORD)0x80000000)
66#define INVALID_UID ((DWORD)0xFFFFFFFF)
aa3743b2
VK
67#define OBJECT_STATUS_COUNT 9
68
69
70//
71// Image formats
72//
73
74#define IMAGE_FORMAT_ICO 0
75#define IMAGE_FORMAT_PNG 1
0c8bf759
VK
76
77
71c18491
VK
78//
79// Authentication methods
80//
81
82#define AUTH_NONE 0
83#define AUTH_PLAINTEXT 1
84#define AUTH_MD5_HASH 2
85#define AUTH_SHA1_HASH 3
86
87
88//
89// Object types
90//
91
92#define OBJECT_GENERIC 0
93#define OBJECT_SUBNET 1
94#define OBJECT_NODE 2
95#define OBJECT_INTERFACE 3
96#define OBJECT_NETWORK 4
ef44d5ea 97#define OBJECT_CONTAINER 5
372b525a 98#define OBJECT_ZONE 6
e6b958c4 99#define OBJECT_SERVICEROOT 7
71c18491
VK
100
101
9eb7685c
VK
102//
103// Object's status
104//
105
106#define STATUS_NORMAL 0
107#define STATUS_WARNING 1
108#define STATUS_MINOR 2
109#define STATUS_MAJOR 3
110#define STATUS_CRITICAL 4
111#define STATUS_UNKNOWN 5
112#define STATUS_UNMANAGED 6
113#define STATUS_DISABLED 7
114#define STATUS_TESTING 8
115
116
4d597931
VK
117//
118// Node flags
119//
120
121#define NF_IS_SNMP 0x0001
122#define NF_IS_NATIVE_AGENT 0x0002
123#define NF_IS_BRIDGE 0x0004
124#define NF_IS_ROUTER 0x0008
125#define NF_IS_LOCAL_MGMT 0x0010
a7d07192
VK
126#define NF_IS_PRINTER 0x0020
127#define NS_IS_OSPF 0x0040
4d597931
VK
128
129
5fad5c32
VK
130//
131// Events
132//
133
878c92bc
VK
134#define NXC_EVENT_STATE_CHANGED 1
135#define NXC_EVENT_ERROR 2
136#define NXC_EVENT_LOGIN_RESULT 3
137#define NXC_EVENT_NEW_ELOG_RECORD 4
f75b99fd 138#define NXC_EVENT_USER_DB_CHANGED 5
4d597931 139#define NXC_EVENT_OBJECT_CHANGED 6
3421c063 140#define NXC_EVENT_NOTIFICATION 7
71f8d3d7
VK
141
142
143//
144// Errors
145//
146
147#define NXC_ERR_INTERNAL 1
5fad5c32
VK
148
149
54481027 150//
39d7a7ed 151// States (used both by client library and server)
54481027
VK
152//
153
154#define STATE_DISCONNECTED 0
155#define STATE_CONNECTING 1
39d7a7ed
VK
156#define STATE_CONNECTED 2
157#define STATE_AUTHENTICATED 3
7e986059
VK
158
159
b601b1fa
VK
160//
161// Notification codes
162//
163
3421c063
VK
164#define NX_NOTIFY_SHUTDOWN 1
165#define NX_NOTIFY_EVENTDB_CHANGED 2
878c92bc
VK
166
167
168//
169// Request completion codes
170//
171
172#define RCC_SUCCESS ((DWORD)0)
173#define RCC_COMPONENT_LOCKED ((DWORD)1)
174#define RCC_ACCESS_DENIED ((DWORD)2)
175#define RCC_INVALID_REQUEST ((DWORD)3)
176#define RCC_TIMEOUT ((DWORD)4)
605d2931
VK
177#define RCC_OUT_OF_STATE_REQUEST ((DWORD)5)
178#define RCC_DB_FAILURE ((DWORD)6)
effb51ab 179#define RCC_INVALID_OBJECT_ID ((DWORD)7)
34d95c13 180#define RCC_ALREADY_EXIST ((DWORD)8)
2e29457d 181#define RCC_COMM_FAILURE ((DWORD)9)
0d9c1b96 182#define RCC_SYSTEM_FAILURE ((DWORD)10)
62f3f072 183#define RCC_INVALID_USER_ID ((DWORD)11)
7ec6cca8 184#define RCC_INVALID_ARGUMENT ((DWORD)12)
9ed4eaff
VK
185#define RCC_DUPLICATE_DCI ((DWORD)13)
186#define RCC_INVALID_DCI_ID ((DWORD)14)
a7d07192
VK
187#define RCC_OUT_OF_MEMORY ((DWORD)15)
188#define RCC_IO_ERROR ((DWORD)16)
e6b958c4 189#define RCC_INCOMPATIBLE_OPERATION ((DWORD)17)
917aa2e6
VK
190#define RCC_OBJECT_CREATION_FAILED ((DWORD)18)
191#define RCC_OBJECT_LOOP ((DWORD)19)
8f7e2482 192#define RCC_INVALID_OBJECT_NAME ((DWORD)20)
878c92bc
VK
193
194
d9152256
VK
195//
196// Mask bits for NXCModifyEventTemplate()
197//
198
199#define EM_SEVERITY ((DWORD)0x01)
200#define EM_FLAGS ((DWORD)0x02)
201#define EM_NAME ((DWORD)0x04)
202#define EM_MESSAGE ((DWORD)0x08)
203#define EM_DESCRIPTION ((DWORD)0x10)
204#define EM_ALL ((DWORD)0x1F)
205
206
effb51ab
VK
207//
208// Mask bits (flags) for NXCModifyObject()
209//
210
211#define OBJ_UPDATE_NAME ((DWORD)0x01)
212#define OBJ_UPDATE_AGENT_PORT ((DWORD)0x02)
213#define OBJ_UPDATE_AGENT_AUTH ((DWORD)0x04)
214#define OBJ_UPDATE_AGENT_SECRET ((DWORD)0x08)
215#define OBJ_UPDATE_SNMP_VERSION ((DWORD)0x10)
216#define OBJ_UPDATE_SNMP_COMMUNITY ((DWORD)0x20)
217#define OBJ_UPDATE_ACL ((DWORD)0x40)
2a41a4b5
VK
218#define OBJ_UPDATE_IMAGE ((DWORD)0x80)
219#define OBJ_UPDATE_ALL ((DWORD)0xFF)
effb51ab
VK
220
221
5ac3236b
VK
222//
223// Global user rights
224//
225
226#define SYSTEM_ACCESS_MANAGE_USERS 0x0001
227#define SYSTEM_ACCESS_VIEW_CONFIG 0x0002
228#define SYSTEM_ACCESS_EDIT_CONFIG 0x0004
229#define SYSTEM_ACCESS_DROP_CONNECTIONS 0x0008
230#define SYSTEM_ACCESS_VIEW_EVENT_DB 0x0010
231#define SYSTEM_ACCESS_EDIT_EVENT_DB 0x0020
a7d07192 232#define SYSTEM_ACCESS_EPP 0x0040
5ac3236b 233
a7d07192 234#define SYSTEM_ACCESS_FULL 0x007F
911dbb64 235
5ac3236b
VK
236
237//
238// Object access rights
239//
240
241#define OBJECT_ACCESS_READ 0x00000001
242#define OBJECT_ACCESS_MODIFY 0x00000002
243#define OBJECT_ACCESS_CREATE 0x00000004
244#define OBJECT_ACCESS_DELETE 0x00000008
245#define OBJECT_ACCESS_MOVE 0x00000010
34d95c13 246#define OBJECT_ACCESS_CONTROL 0x00000020
5ac3236b
VK
247
248
249//
250// User/group flags
251//
252
253#define UF_MODIFIED 0x0001
254#define UF_DELETED 0x0002
255#define UF_DISABLED 0x0004
256#define UF_CHANGE_PASSWORD 0x0008
8c18110a 257#define UF_CANNOT_CHANGE_PASSWORD 0x0010
5ac3236b
VK
258
259
984542f8
VK
260//
261// User database change notification types
262//
263
264#define USER_DB_CREATE 0
265#define USER_DB_DELETE 1
266#define USER_DB_MODIFY 2
267
268
878c92bc 269//
7ec6cca8 270// Data types
878c92bc
VK
271//
272
7ec6cca8
VK
273#define DTYPE_INTEGER 0
274#define DTYPE_INT64 1
275#define DTYPE_STRING 2
276#define DTYPE_FLOAT 3
b601b1fa
VK
277
278
54481027 279//
7ec6cca8 280// Data sources
54481027
VK
281//
282
7ec6cca8
VK
283#define DS_INTERNAL 0
284#define DS_NATIVE_AGENT 1
285#define DS_SNMP_AGENT 2
54481027
VK
286
287
878c92bc 288//
7ec6cca8 289// Item status
878c92bc
VK
290//
291
7ec6cca8
VK
292#define ITEM_STATUS_ACTIVE 0
293#define ITEM_STATUS_DISABLED 1
294#define ITEM_STATUS_NOT_SUPPORTED 2
878c92bc
VK
295
296
d0e94572
VK
297//
298// Threshold functions and operations
299//
300
301#define F_LAST 0
302#define F_AVERAGE 1
303#define F_DEVIATION 2
304
305#define OP_LE 0
306#define OP_LE_EQ 1
307#define OP_EQ 2
308#define OP_GT_EQ 3
309#define OP_GT 4
310#define OP_NE 5
311#define OP_LIKE 6
312#define OP_NOTLIKE 7
313
314
99180ed6
VK
315//
316// Event policy rule flags
317//
318
319#define RF_STOP_PROCESSING 0x0001
320#define RF_NEGATED_SOURCE 0x0002
321#define RF_NEGATED_EVENTS 0x0004
322#define RF_GENERATE_ALARM 0x0008
97e55bb4 323#define RF_DISABLED 0x0010
99180ed6 324#define RF_SEVERITY_INFO 0x0100
2fa43626
VK
325#define RF_SEVERITY_WARNING 0x0200
326#define RF_SEVERITY_MINOR 0x0400
99180ed6
VK
327#define RF_SEVERITY_MAJOR 0x0800
328#define RF_SEVERITY_CRITICAL 0x1000
329
330
2260ffe5
VK
331//
332// Alarm structure
333//
334
335typedef struct
336{
337 DWORD dwAlarmId; // Unique alarm ID
338 DWORD dwTimeStamp; // Timestamp in time() format
339 DWORD dwSourceObject; // Source object ID
340 DWORD dwSourceEvent; // Originating event ID
341 char szMessage[MAX_DB_STRING];
342 char szKey[MAX_DB_STRING];
343 WORD wSeverity; // Alarm's severity
344 WORD wIsAck; // Non-zero if acknowleged
345 DWORD dwAckByUser; // Id of user who acknowleges this alarm (0 for system)
346} NXC_ALARM;
347
348
a1dc75b0
VK
349//
350// Event log record structure
351//
352
353typedef struct
354{
355 DWORD dwTimeStamp;
356 DWORD dwEventId;
357 DWORD dwSourceId;
358 DWORD dwSeverity;
359 char szMessage[MAX_EVENT_MSG_LENGTH];
360} NXC_EVENT;
361
362
3421c063
VK
363//
364// Event name/code pair
365//
366
367typedef struct
368{
369 DWORD dwEventId;
936eeedf 370 DWORD dwSeverity;
3421c063
VK
371 char szName[MAX_EVENT_NAME];
372} NXC_EVENT_NAME;
373
374
e641b7d0
VK
375//
376// Image information
377//
378
379typedef struct
380{
381 DWORD dwId;
382 char szName[MAX_OBJECT_NAME];
383 BYTE hash[MD5_DIGEST_SIZE];
384} NXC_IMAGE;
385
386
387//
388// Image list
389//
390
391typedef struct
392{
393 DWORD dwNumImages;
394 NXC_IMAGE *pImageList;
395} NXC_IMAGE_LIST;
396
397
7ec6cca8
VK
398/********************************************************************
399 * Following part of this file shouldn't be included by server code *
400 ********************************************************************/
401
402#ifndef LIBNXCL_NO_DECLARATIONS
403
404
405//
406// Callbacks data types
407//
408
409typedef void (* NXC_EVENT_HANDLER)(DWORD dwEvent, DWORD dwCode, void *pArg);
410typedef void (* NXC_DEBUG_CALLBACK)(char *pMsg);
411
412
413//
414// Event configuration structure
415//
416
417typedef struct
418{
419 DWORD dwCode;
420 DWORD dwSeverity;
421 DWORD dwFlags;
422 char szName[MAX_EVENT_NAME];
423 char *pszMessage;
424 char *pszDescription;
425} NXC_EVENT_TEMPLATE;
426
427
effb51ab
VK
428//
429// Entry in object's ACL
430//
431
432typedef struct
433{
434 DWORD dwUserId;
435 DWORD dwAccessRights;
436} NXC_ACL_ENTRY;
437
438
0c8bf759
VK
439//
440// Network object structure
441//
442
443typedef struct
444{
445 DWORD dwId; // Unique object's identifier
446 int iClass; // Object's class
447 int iStatus; // Object's status
448 DWORD dwIpAddr; // IP address
449 char szName[MAX_OBJECT_NAME];
450 DWORD dwNumParents;
451 DWORD *pdwParentList;
452 DWORD dwNumChilds;
453 DWORD *pdwChildList;
4d597931 454 BOOL bIsDeleted; // TRUE for deleted objects
effb51ab
VK
455 BOOL bInheritRights;
456 DWORD dwAclSize;
457 NXC_ACL_ENTRY *pAccessList;
03ea8b3d 458 DWORD dwImage; // Image ID or IMG_DEFAULT for default image
0c8bf759
VK
459 union
460 {
461 struct
462 {
463 DWORD dwIpNetMask; // Ip netmask.
464 DWORD dwIfIndex; // Interface index.
465 DWORD dwIfType; // Interface type
466 } iface;
467 struct
468 {
469 DWORD dwFlags;
470 DWORD dwDiscoveryFlags;
471 char szSharedSecret[MAX_SECRET_LENGTH];
472 char szCommunityString[MAX_COMMUNITY_LENGTH];
473 char szObjectId[MAX_OID_LENGTH];
474 WORD wAgentPort; // Listening TCP port for native agent
475 WORD wAuthMethod; // Native agent's authentication method
476 } node;
477 struct
478 {
479 DWORD dwIpNetMask;
480 } subnet;
ef44d5ea
VK
481 struct
482 {
483 DWORD dwCategory;
484 char *pszDescription;
485 } container;
0c8bf759
VK
486 };
487} NXC_OBJECT;
488
489
effb51ab
VK
490//
491// Structure with data for NXCModifyObject
492//
493
494typedef struct
495{
496 DWORD dwObjectId;
497 DWORD dwFlags;
498 char *pszName;
499 int iAgentPort;
500 int iAuthType;
501 char *pszSecret;
502 int iSnmpVersion;
503 char *pszCommunity;
504 BOOL bInheritRights;
2a41a4b5 505 DWORD dwImage;
effb51ab
VK
506 DWORD dwAclSize;
507 NXC_ACL_ENTRY *pAccessList;
508} NXC_OBJECT_UPDATE;
509
510
5ac3236b
VK
511//
512// NetXMS user information structure
513//
514
515typedef struct
516{
517 char szName[MAX_USER_NAME];
518 DWORD dwId;
519 WORD wFlags;
520 WORD wSystemRights;
521 DWORD dwNumMembers; // Only for groups
522 DWORD *pdwMemberList; // Only for groups
54abbe0e
VK
523 char szFullName[MAX_USER_FULLNAME]; // Only for users
524 char szDescription[MAX_USER_DESCR];
5ac3236b
VK
525} NXC_USER;
526
527
f86ffdd2
VK
528//
529// Data collection item threshold structure
530//
531
532typedef struct
533{
534 DWORD dwId;
535 DWORD dwEvent;
536 WORD wFunction;
537 WORD wOperation;
538 DWORD dwArg1;
539 DWORD dwArg2;
540 union
541 {
542 DWORD dwInt32;
543 INT64 qwInt64;
544 double dFloat;
545 char szString[MAX_STRING_VALUE];
546 } value;
547} NXC_DCI_THRESHOLD;
548
549
7ec6cca8
VK
550//
551// Data collection item structure
552//
553
554typedef struct
555{
556 DWORD dwId;
557 char szName[MAX_ITEM_NAME];
558 int iPollingInterval;
559 int iRetentionTime;
560 BYTE iSource;
561 BYTE iDataType;
562 BYTE iStatus;
f86ffdd2
VK
563 DWORD dwNumThresholds;
564 NXC_DCI_THRESHOLD *pThresholdList;
7ec6cca8
VK
565} NXC_DCI;
566
567
568//
569// Node's data collection list information
570//
571
572typedef struct
573{
574 DWORD dwNodeId;
575 DWORD dwNumItems;
576 NXC_DCI *pItems;
577} NXC_DCI_LIST;
578
579
b9b4ec17
VK
580//
581// Row structure
582//
583
9f20696e
VK
584#pragma pack(1)
585
b9b4ec17
VK
586typedef struct
587{
588 DWORD dwTimeStamp;
589 union
590 {
591 DWORD dwInt32;
cb17745c 592 INT64 qwInt64;
b9b4ec17
VK
593 double dFloat;
594 char szString[MAX_STRING_VALUE];
595 } value;
596} NXC_DCI_ROW;
597
9f20696e
VK
598#pragma pack()
599
b9b4ec17
VK
600
601//
602// DCI's collected data
603//
604
605typedef struct
606{
607 DWORD dwNodeId; // Owner's node id
608 DWORD dwItemId; // Item id
609 DWORD dwNumRows; // Number of rows in set
610 WORD wDataType; // Data type (integer, string, etc.)
611 WORD wRowSize; // Size of single row in bytes
612 NXC_DCI_ROW *pRows; // Array of rows
613} NXC_DCI_DATA;
614
615
a7d07192
VK
616//
617// MIB file list
618//
619
620typedef struct
621{
622 DWORD dwNumFiles;
623 char **ppszName;
624 BYTE **ppHash;
625} NXC_MIB_LIST;
626
627
628//
629// Event processing policy rule
630//
631
632typedef struct
633{
634 DWORD dwFlags;
635 DWORD dwId;
636 DWORD dwNumActions;
637 DWORD dwNumEvents;
638 DWORD dwNumSources;
639 DWORD *pdwActionList;
640 DWORD *pdwEventList;
641 DWORD *pdwSourceList;
642 char *pszComment;
643 char szAlarmKey[MAX_DB_STRING];
644 char szAlarmAckKey[MAX_DB_STRING];
645 char szAlarmMessage[MAX_DB_STRING];
646 WORD wAlarmSeverity;
647} NXC_EPP_RULE;
648
649
650//
651// Event processing policy
652//
653
654typedef struct
655{
656 DWORD dwNumRules;
657 NXC_EPP_RULE *pRuleList;
658} NXC_EPP;
659
660
917aa2e6
VK
661//
662// Object creation information structure
663//
664
665typedef struct
666{
667 int iClass;
668 DWORD dwParentId;
669 char *pszName;
670 union
671 {
672 struct
673 {
674 DWORD dwIpAddr;
675 DWORD dwNetMask;
676 } node;
677 struct
678 {
679 DWORD dwCategory;
680 char *pszDescription;
681 } container;
682 } cs;
683} NXC_OBJECT_CREATE_INFO;
684
685
80ffed5a
VK
686//
687// Functions
688//
689
690#ifdef __cplusplus
691extern "C" {
692#endif
693
8aeffdee 694DWORD LIBNXCL_EXPORTABLE NXCGetVersion(void);
effb51ab
VK
695const char LIBNXCL_EXPORTABLE *NXCGetErrorText(DWORD dwError);
696
8aeffdee 697BOOL LIBNXCL_EXPORTABLE NXCInitialize(void);
39d7a7ed
VK
698void LIBNXCL_EXPORTABLE NXCShutdown(void);
699
1df4b30b 700DWORD LIBNXCL_EXPORTABLE NXCConnect(char *szServer, char *szLogin, char *szPassword);
8aeffdee
VK
701void LIBNXCL_EXPORTABLE NXCDisconnect(void);
702void LIBNXCL_EXPORTABLE NXCSetEventHandler(NXC_EVENT_HANDLER pHandler);
703void LIBNXCL_EXPORTABLE NXCSetDebugCallback(NXC_DEBUG_CALLBACK pFunc);
704HREQUEST LIBNXCL_EXPORTABLE NXCRequest(DWORD dwOperation, ...);
80ffed5a 705
2e29457d 706DWORD LIBNXCL_EXPORTABLE NXCSyncObjects(void);
8aeffdee 707NXC_OBJECT LIBNXCL_EXPORTABLE *NXCFindObjectById(DWORD dwId);
a98e6d5f 708NXC_OBJECT LIBNXCL_EXPORTABLE *NXCFindObjectByName(char *pszName);
8aeffdee 709void LIBNXCL_EXPORTABLE NXCEnumerateObjects(BOOL (* pHandler)(NXC_OBJECT *));
e6b958c4
VK
710NXC_OBJECT LIBNXCL_EXPORTABLE *NXCGetTopologyRootObject(void);
711NXC_OBJECT LIBNXCL_EXPORTABLE *NXCGetServiceRootObject(void);
8e80aeb6
VK
712void LIBNXCL_EXPORTABLE *NXCGetObjectIndex(DWORD *pdwNumObjects);
713void LIBNXCL_EXPORTABLE NXCLockObjectIndex(void);
714void LIBNXCL_EXPORTABLE NXCUnlockObjectIndex(void);
2e29457d 715DWORD LIBNXCL_EXPORTABLE NXCModifyObject(NXC_OBJECT_UPDATE *pData);
c1c39152 716DWORD LIBNXCL_EXPORTABLE NXCSetObjectMgmtStatus(DWORD dwObjectId, BOOL bIsManaged);
917aa2e6 717DWORD LIBNXCL_EXPORTABLE NXCCreateObject(NXC_OBJECT_CREATE_INFO *pCreateInfo, DWORD *pdwObjectId);
e6b958c4
VK
718DWORD LIBNXCL_EXPORTABLE NXCBindObject(DWORD dwParentObject, DWORD dwChildObject);
719DWORD LIBNXCL_EXPORTABLE NXCUnbindObject(DWORD dwParentObject, DWORD dwChildObject);
8b3d61c1 720
2e29457d
VK
721DWORD LIBNXCL_EXPORTABLE NXCSyncEvents(void);
722DWORD LIBNXCL_EXPORTABLE NXCOpenEventDB(void);
723DWORD LIBNXCL_EXPORTABLE NXCCloseEventDB(BOOL bSaveChanges);
8aeffdee
VK
724BOOL LIBNXCL_EXPORTABLE NXCGetEventDB(NXC_EVENT_TEMPLATE ***pppTemplateList, DWORD *pdwNumRecords);
725void LIBNXCL_EXPORTABLE NXCModifyEventTemplate(NXC_EVENT_TEMPLATE *pEvent, DWORD dwMask,
d9152256
VK
726 DWORD dwSeverity, DWORD dwFlags, const char *pszName,
727 const char *pszMessage, const char *pszDescription);
3421c063
VK
728DWORD LIBNXCL_EXPORTABLE NXCLoadEventNames(void);
729NXC_EVENT_NAME LIBNXCL_EXPORTABLE *NXCGetEventNamesList(DWORD *pdwNumEvents);
730const char LIBNXCL_EXPORTABLE *NXCGetEventName(DWORD dwId);
2fa43626 731int LIBNXCL_EXPORTABLE NXCGetEventSeverity(DWORD dwId);
878c92bc 732
2e29457d 733DWORD LIBNXCL_EXPORTABLE NXCLoadUserDB(void);
5ac3236b 734NXC_USER LIBNXCL_EXPORTABLE *NXCFindUserById(DWORD dwId);
440716ce 735BOOL LIBNXCL_EXPORTABLE NXCGetUserDB(NXC_USER **ppUserList, DWORD *pdwNumUsers);
0d9c1b96
VK
736DWORD LIBNXCL_EXPORTABLE NXCLockUserDB(void);
737DWORD LIBNXCL_EXPORTABLE NXCUnlockUserDB(void);
f75b99fd
VK
738DWORD LIBNXCL_EXPORTABLE NXCCreateUser(char *pszName, BOOL bIsGroup, DWORD *pdwNewId);
739DWORD LIBNXCL_EXPORTABLE NXCDeleteUser(DWORD dwId);
911dbb64 740DWORD LIBNXCL_EXPORTABLE NXCModifyUser(NXC_USER *pUserInfo);
8c18110a 741DWORD LIBNXCL_EXPORTABLE NXCSetPassword(DWORD dwUserId, char *pszNewPassword);
5ac3236b 742
7ec6cca8
VK
743DWORD LIBNXCL_EXPORTABLE NXCOpenNodeDCIList(DWORD dwNodeId, NXC_DCI_LIST **ppItemList);
744DWORD LIBNXCL_EXPORTABLE NXCCloseNodeDCIList(NXC_DCI_LIST *pItemList);
7ac0c0a8
VK
745DWORD LIBNXCL_EXPORTABLE NXCCreateNewDCI(NXC_DCI_LIST *pItemList, DWORD *pdwItemId);
746DWORD LIBNXCL_EXPORTABLE NXCUpdateDCI(DWORD dwNodeId, NXC_DCI *pItem);
747DWORD LIBNXCL_EXPORTABLE NXCDeleteDCI(NXC_DCI_LIST *pItemList, DWORD dwItemId);
748DWORD LIBNXCL_EXPORTABLE NXCItemIndex(NXC_DCI_LIST *pItemList, DWORD dwItemId);
b9b4ec17
VK
749DWORD LIBNXCL_EXPORTABLE NXCGetDCIData(DWORD dwNodeId, DWORD dwItemId, DWORD dwMaxRows,
750 DWORD dwTimeFrom, DWORD dwTimeTo, NXC_DCI_DATA **ppData);
4c20673b
VK
751void LIBNXCL_EXPORTABLE NXCDestroyDCIData(NXC_DCI_DATA *pData);
752NXC_DCI_ROW LIBNXCL_EXPORTABLE *NXCGetRowPtr(NXC_DCI_DATA *pData, DWORD dwRow);
899f2093
VK
753DWORD LIBNXCL_EXPORTABLE NXCAddThresholdToItem(NXC_DCI *pItem, NXC_DCI_THRESHOLD *pThreshold);
754BOOL LIBNXCL_EXPORTABLE NXCDeleteThresholdFromItem(NXC_DCI *pItem, DWORD dwIndex);
755BOOL LIBNXCL_EXPORTABLE NXCSwapThresholds(NXC_DCI *pItem, DWORD dwIndex1, DWORD dwIndex2);
7ec6cca8 756
a7d07192
VK
757DWORD LIBNXCL_EXPORTABLE NXCGetMIBList(NXC_MIB_LIST **ppMibList);
758void LIBNXCL_EXPORTABLE NXCDestroyMIBList(NXC_MIB_LIST *pMibList);
759DWORD LIBNXCL_EXPORTABLE NXCDownloadMIBFile(char *pszName, char *pszDestDir);
760
761DWORD LIBNXCL_EXPORTABLE NXCOpenEventPolicy(NXC_EPP **ppEventPolicy);
762DWORD LIBNXCL_EXPORTABLE NXCCloseEventPolicy(void);
763DWORD LIBNXCL_EXPORTABLE NXCSaveEventPolicy(NXC_EPP *pEventPolicy);
764void LIBNXCL_EXPORTABLE NXCDestroyEventPolicy(NXC_EPP *pEventPolicy);
ef44d5ea 765void LIBNXCL_EXPORTABLE NXCDeletePolicyRule(NXC_EPP *pEventPolicy, DWORD dwRule);
a7d07192 766
aa3743b2
VK
767DWORD LIBNXCL_EXPORTABLE NXCSyncImages(NXC_IMAGE_LIST **ppImageList, char *pszCacheDir, WORD wFormat);
768DWORD LIBNXCL_EXPORTABLE NXCLoadImageFile(DWORD dwImageId, char *pszCacheDir, WORD wFormat);
f70fc197 769void LIBNXCL_EXPORTABLE NXCDestroyImageList(NXC_IMAGE_LIST *pImageList);
51bd5a10
VK
770DWORD LIBNXCL_EXPORTABLE NXCLoadDefaultImageList(DWORD *pdwListSize,
771 DWORD **ppdwClassId, DWORD **ppdwImageId);
f70fc197 772
80ffed5a
VK
773#ifdef __cplusplus
774}
775#endif
776
7ec6cca8
VK
777#endif /* LIBNXCL_NO_DECLARATIONS */
778
80ffed5a 779#endif /* _nxclapi_h_ */