- CR/LF and apostrophes changed to escape characters
[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
a1dc75b0
VK
331//
332// Event log record structure
333//
334
335typedef struct
336{
337 DWORD dwTimeStamp;
338 DWORD dwEventId;
339 DWORD dwSourceId;
340 DWORD dwSeverity;
341 char szMessage[MAX_EVENT_MSG_LENGTH];
342} NXC_EVENT;
343
344
3421c063
VK
345//
346// Event name/code pair
347//
348
349typedef struct
350{
351 DWORD dwEventId;
936eeedf 352 DWORD dwSeverity;
3421c063
VK
353 char szName[MAX_EVENT_NAME];
354} NXC_EVENT_NAME;
355
356
e641b7d0
VK
357//
358// Image information
359//
360
361typedef struct
362{
363 DWORD dwId;
364 char szName[MAX_OBJECT_NAME];
365 BYTE hash[MD5_DIGEST_SIZE];
366} NXC_IMAGE;
367
368
369//
370// Image list
371//
372
373typedef struct
374{
375 DWORD dwNumImages;
376 NXC_IMAGE *pImageList;
377} NXC_IMAGE_LIST;
378
379
7ec6cca8
VK
380/********************************************************************
381 * Following part of this file shouldn't be included by server code *
382 ********************************************************************/
383
384#ifndef LIBNXCL_NO_DECLARATIONS
385
386
387//
388// Callbacks data types
389//
390
391typedef void (* NXC_EVENT_HANDLER)(DWORD dwEvent, DWORD dwCode, void *pArg);
392typedef void (* NXC_DEBUG_CALLBACK)(char *pMsg);
393
394
395//
396// Event configuration structure
397//
398
399typedef struct
400{
401 DWORD dwCode;
402 DWORD dwSeverity;
403 DWORD dwFlags;
404 char szName[MAX_EVENT_NAME];
405 char *pszMessage;
406 char *pszDescription;
407} NXC_EVENT_TEMPLATE;
408
409
effb51ab
VK
410//
411// Entry in object's ACL
412//
413
414typedef struct
415{
416 DWORD dwUserId;
417 DWORD dwAccessRights;
418} NXC_ACL_ENTRY;
419
420
0c8bf759
VK
421//
422// Network object structure
423//
424
425typedef struct
426{
427 DWORD dwId; // Unique object's identifier
428 int iClass; // Object's class
429 int iStatus; // Object's status
430 DWORD dwIpAddr; // IP address
431 char szName[MAX_OBJECT_NAME];
432 DWORD dwNumParents;
433 DWORD *pdwParentList;
434 DWORD dwNumChilds;
435 DWORD *pdwChildList;
4d597931 436 BOOL bIsDeleted; // TRUE for deleted objects
effb51ab
VK
437 BOOL bInheritRights;
438 DWORD dwAclSize;
439 NXC_ACL_ENTRY *pAccessList;
03ea8b3d 440 DWORD dwImage; // Image ID or IMG_DEFAULT for default image
0c8bf759
VK
441 union
442 {
443 struct
444 {
445 DWORD dwIpNetMask; // Ip netmask.
446 DWORD dwIfIndex; // Interface index.
447 DWORD dwIfType; // Interface type
448 } iface;
449 struct
450 {
451 DWORD dwFlags;
452 DWORD dwDiscoveryFlags;
453 char szSharedSecret[MAX_SECRET_LENGTH];
454 char szCommunityString[MAX_COMMUNITY_LENGTH];
455 char szObjectId[MAX_OID_LENGTH];
456 WORD wAgentPort; // Listening TCP port for native agent
457 WORD wAuthMethod; // Native agent's authentication method
458 } node;
459 struct
460 {
461 DWORD dwIpNetMask;
462 } subnet;
ef44d5ea
VK
463 struct
464 {
465 DWORD dwCategory;
466 char *pszDescription;
467 } container;
0c8bf759
VK
468 };
469} NXC_OBJECT;
470
471
effb51ab
VK
472//
473// Structure with data for NXCModifyObject
474//
475
476typedef struct
477{
478 DWORD dwObjectId;
479 DWORD dwFlags;
480 char *pszName;
481 int iAgentPort;
482 int iAuthType;
483 char *pszSecret;
484 int iSnmpVersion;
485 char *pszCommunity;
486 BOOL bInheritRights;
2a41a4b5 487 DWORD dwImage;
effb51ab
VK
488 DWORD dwAclSize;
489 NXC_ACL_ENTRY *pAccessList;
490} NXC_OBJECT_UPDATE;
491
492
5ac3236b
VK
493//
494// NetXMS user information structure
495//
496
497typedef struct
498{
499 char szName[MAX_USER_NAME];
500 DWORD dwId;
501 WORD wFlags;
502 WORD wSystemRights;
503 DWORD dwNumMembers; // Only for groups
504 DWORD *pdwMemberList; // Only for groups
54abbe0e
VK
505 char szFullName[MAX_USER_FULLNAME]; // Only for users
506 char szDescription[MAX_USER_DESCR];
5ac3236b
VK
507} NXC_USER;
508
509
f86ffdd2
VK
510//
511// Data collection item threshold structure
512//
513
514typedef struct
515{
516 DWORD dwId;
517 DWORD dwEvent;
518 WORD wFunction;
519 WORD wOperation;
520 DWORD dwArg1;
521 DWORD dwArg2;
522 union
523 {
524 DWORD dwInt32;
525 INT64 qwInt64;
526 double dFloat;
527 char szString[MAX_STRING_VALUE];
528 } value;
529} NXC_DCI_THRESHOLD;
530
531
7ec6cca8
VK
532//
533// Data collection item structure
534//
535
536typedef struct
537{
538 DWORD dwId;
539 char szName[MAX_ITEM_NAME];
540 int iPollingInterval;
541 int iRetentionTime;
542 BYTE iSource;
543 BYTE iDataType;
544 BYTE iStatus;
f86ffdd2
VK
545 DWORD dwNumThresholds;
546 NXC_DCI_THRESHOLD *pThresholdList;
7ec6cca8
VK
547} NXC_DCI;
548
549
550//
551// Node's data collection list information
552//
553
554typedef struct
555{
556 DWORD dwNodeId;
557 DWORD dwNumItems;
558 NXC_DCI *pItems;
559} NXC_DCI_LIST;
560
561
b9b4ec17
VK
562//
563// Row structure
564//
565
9f20696e
VK
566#pragma pack(1)
567
b9b4ec17
VK
568typedef struct
569{
570 DWORD dwTimeStamp;
571 union
572 {
573 DWORD dwInt32;
cb17745c 574 INT64 qwInt64;
b9b4ec17
VK
575 double dFloat;
576 char szString[MAX_STRING_VALUE];
577 } value;
578} NXC_DCI_ROW;
579
9f20696e
VK
580#pragma pack()
581
b9b4ec17
VK
582
583//
584// DCI's collected data
585//
586
587typedef struct
588{
589 DWORD dwNodeId; // Owner's node id
590 DWORD dwItemId; // Item id
591 DWORD dwNumRows; // Number of rows in set
592 WORD wDataType; // Data type (integer, string, etc.)
593 WORD wRowSize; // Size of single row in bytes
594 NXC_DCI_ROW *pRows; // Array of rows
595} NXC_DCI_DATA;
596
597
a7d07192
VK
598//
599// MIB file list
600//
601
602typedef struct
603{
604 DWORD dwNumFiles;
605 char **ppszName;
606 BYTE **ppHash;
607} NXC_MIB_LIST;
608
609
610//
611// Event processing policy rule
612//
613
614typedef struct
615{
616 DWORD dwFlags;
617 DWORD dwId;
618 DWORD dwNumActions;
619 DWORD dwNumEvents;
620 DWORD dwNumSources;
621 DWORD *pdwActionList;
622 DWORD *pdwEventList;
623 DWORD *pdwSourceList;
624 char *pszComment;
625 char szAlarmKey[MAX_DB_STRING];
626 char szAlarmAckKey[MAX_DB_STRING];
627 char szAlarmMessage[MAX_DB_STRING];
628 WORD wAlarmSeverity;
629} NXC_EPP_RULE;
630
631
632//
633// Event processing policy
634//
635
636typedef struct
637{
638 DWORD dwNumRules;
639 NXC_EPP_RULE *pRuleList;
640} NXC_EPP;
641
642
917aa2e6
VK
643//
644// Object creation information structure
645//
646
647typedef struct
648{
649 int iClass;
650 DWORD dwParentId;
651 char *pszName;
652 union
653 {
654 struct
655 {
656 DWORD dwIpAddr;
657 DWORD dwNetMask;
658 } node;
659 struct
660 {
661 DWORD dwCategory;
662 char *pszDescription;
663 } container;
664 } cs;
665} NXC_OBJECT_CREATE_INFO;
666
667
80ffed5a
VK
668//
669// Functions
670//
671
672#ifdef __cplusplus
673extern "C" {
674#endif
675
8aeffdee 676DWORD LIBNXCL_EXPORTABLE NXCGetVersion(void);
effb51ab
VK
677const char LIBNXCL_EXPORTABLE *NXCGetErrorText(DWORD dwError);
678
8aeffdee 679BOOL LIBNXCL_EXPORTABLE NXCInitialize(void);
39d7a7ed
VK
680void LIBNXCL_EXPORTABLE NXCShutdown(void);
681
1df4b30b 682DWORD LIBNXCL_EXPORTABLE NXCConnect(char *szServer, char *szLogin, char *szPassword);
8aeffdee
VK
683void LIBNXCL_EXPORTABLE NXCDisconnect(void);
684void LIBNXCL_EXPORTABLE NXCSetEventHandler(NXC_EVENT_HANDLER pHandler);
685void LIBNXCL_EXPORTABLE NXCSetDebugCallback(NXC_DEBUG_CALLBACK pFunc);
686HREQUEST LIBNXCL_EXPORTABLE NXCRequest(DWORD dwOperation, ...);
80ffed5a 687
2e29457d 688DWORD LIBNXCL_EXPORTABLE NXCSyncObjects(void);
8aeffdee 689NXC_OBJECT LIBNXCL_EXPORTABLE *NXCFindObjectById(DWORD dwId);
a98e6d5f 690NXC_OBJECT LIBNXCL_EXPORTABLE *NXCFindObjectByName(char *pszName);
8aeffdee 691void LIBNXCL_EXPORTABLE NXCEnumerateObjects(BOOL (* pHandler)(NXC_OBJECT *));
e6b958c4
VK
692NXC_OBJECT LIBNXCL_EXPORTABLE *NXCGetTopologyRootObject(void);
693NXC_OBJECT LIBNXCL_EXPORTABLE *NXCGetServiceRootObject(void);
8e80aeb6
VK
694void LIBNXCL_EXPORTABLE *NXCGetObjectIndex(DWORD *pdwNumObjects);
695void LIBNXCL_EXPORTABLE NXCLockObjectIndex(void);
696void LIBNXCL_EXPORTABLE NXCUnlockObjectIndex(void);
2e29457d 697DWORD LIBNXCL_EXPORTABLE NXCModifyObject(NXC_OBJECT_UPDATE *pData);
c1c39152 698DWORD LIBNXCL_EXPORTABLE NXCSetObjectMgmtStatus(DWORD dwObjectId, BOOL bIsManaged);
917aa2e6 699DWORD LIBNXCL_EXPORTABLE NXCCreateObject(NXC_OBJECT_CREATE_INFO *pCreateInfo, DWORD *pdwObjectId);
e6b958c4
VK
700DWORD LIBNXCL_EXPORTABLE NXCBindObject(DWORD dwParentObject, DWORD dwChildObject);
701DWORD LIBNXCL_EXPORTABLE NXCUnbindObject(DWORD dwParentObject, DWORD dwChildObject);
8b3d61c1 702
2e29457d
VK
703DWORD LIBNXCL_EXPORTABLE NXCSyncEvents(void);
704DWORD LIBNXCL_EXPORTABLE NXCOpenEventDB(void);
705DWORD LIBNXCL_EXPORTABLE NXCCloseEventDB(BOOL bSaveChanges);
8aeffdee
VK
706BOOL LIBNXCL_EXPORTABLE NXCGetEventDB(NXC_EVENT_TEMPLATE ***pppTemplateList, DWORD *pdwNumRecords);
707void LIBNXCL_EXPORTABLE NXCModifyEventTemplate(NXC_EVENT_TEMPLATE *pEvent, DWORD dwMask,
d9152256
VK
708 DWORD dwSeverity, DWORD dwFlags, const char *pszName,
709 const char *pszMessage, const char *pszDescription);
3421c063
VK
710DWORD LIBNXCL_EXPORTABLE NXCLoadEventNames(void);
711NXC_EVENT_NAME LIBNXCL_EXPORTABLE *NXCGetEventNamesList(DWORD *pdwNumEvents);
712const char LIBNXCL_EXPORTABLE *NXCGetEventName(DWORD dwId);
2fa43626 713int LIBNXCL_EXPORTABLE NXCGetEventSeverity(DWORD dwId);
878c92bc 714
2e29457d 715DWORD LIBNXCL_EXPORTABLE NXCLoadUserDB(void);
5ac3236b 716NXC_USER LIBNXCL_EXPORTABLE *NXCFindUserById(DWORD dwId);
440716ce 717BOOL LIBNXCL_EXPORTABLE NXCGetUserDB(NXC_USER **ppUserList, DWORD *pdwNumUsers);
0d9c1b96
VK
718DWORD LIBNXCL_EXPORTABLE NXCLockUserDB(void);
719DWORD LIBNXCL_EXPORTABLE NXCUnlockUserDB(void);
f75b99fd
VK
720DWORD LIBNXCL_EXPORTABLE NXCCreateUser(char *pszName, BOOL bIsGroup, DWORD *pdwNewId);
721DWORD LIBNXCL_EXPORTABLE NXCDeleteUser(DWORD dwId);
911dbb64 722DWORD LIBNXCL_EXPORTABLE NXCModifyUser(NXC_USER *pUserInfo);
8c18110a 723DWORD LIBNXCL_EXPORTABLE NXCSetPassword(DWORD dwUserId, char *pszNewPassword);
5ac3236b 724
7ec6cca8
VK
725DWORD LIBNXCL_EXPORTABLE NXCOpenNodeDCIList(DWORD dwNodeId, NXC_DCI_LIST **ppItemList);
726DWORD LIBNXCL_EXPORTABLE NXCCloseNodeDCIList(NXC_DCI_LIST *pItemList);
7ac0c0a8
VK
727DWORD LIBNXCL_EXPORTABLE NXCCreateNewDCI(NXC_DCI_LIST *pItemList, DWORD *pdwItemId);
728DWORD LIBNXCL_EXPORTABLE NXCUpdateDCI(DWORD dwNodeId, NXC_DCI *pItem);
729DWORD LIBNXCL_EXPORTABLE NXCDeleteDCI(NXC_DCI_LIST *pItemList, DWORD dwItemId);
730DWORD LIBNXCL_EXPORTABLE NXCItemIndex(NXC_DCI_LIST *pItemList, DWORD dwItemId);
b9b4ec17
VK
731DWORD LIBNXCL_EXPORTABLE NXCGetDCIData(DWORD dwNodeId, DWORD dwItemId, DWORD dwMaxRows,
732 DWORD dwTimeFrom, DWORD dwTimeTo, NXC_DCI_DATA **ppData);
4c20673b
VK
733void LIBNXCL_EXPORTABLE NXCDestroyDCIData(NXC_DCI_DATA *pData);
734NXC_DCI_ROW LIBNXCL_EXPORTABLE *NXCGetRowPtr(NXC_DCI_DATA *pData, DWORD dwRow);
899f2093
VK
735DWORD LIBNXCL_EXPORTABLE NXCAddThresholdToItem(NXC_DCI *pItem, NXC_DCI_THRESHOLD *pThreshold);
736BOOL LIBNXCL_EXPORTABLE NXCDeleteThresholdFromItem(NXC_DCI *pItem, DWORD dwIndex);
737BOOL LIBNXCL_EXPORTABLE NXCSwapThresholds(NXC_DCI *pItem, DWORD dwIndex1, DWORD dwIndex2);
7ec6cca8 738
a7d07192
VK
739DWORD LIBNXCL_EXPORTABLE NXCGetMIBList(NXC_MIB_LIST **ppMibList);
740void LIBNXCL_EXPORTABLE NXCDestroyMIBList(NXC_MIB_LIST *pMibList);
741DWORD LIBNXCL_EXPORTABLE NXCDownloadMIBFile(char *pszName, char *pszDestDir);
742
743DWORD LIBNXCL_EXPORTABLE NXCOpenEventPolicy(NXC_EPP **ppEventPolicy);
744DWORD LIBNXCL_EXPORTABLE NXCCloseEventPolicy(void);
745DWORD LIBNXCL_EXPORTABLE NXCSaveEventPolicy(NXC_EPP *pEventPolicy);
746void LIBNXCL_EXPORTABLE NXCDestroyEventPolicy(NXC_EPP *pEventPolicy);
ef44d5ea 747void LIBNXCL_EXPORTABLE NXCDeletePolicyRule(NXC_EPP *pEventPolicy, DWORD dwRule);
a7d07192 748
aa3743b2
VK
749DWORD LIBNXCL_EXPORTABLE NXCSyncImages(NXC_IMAGE_LIST **ppImageList, char *pszCacheDir, WORD wFormat);
750DWORD LIBNXCL_EXPORTABLE NXCLoadImageFile(DWORD dwImageId, char *pszCacheDir, WORD wFormat);
f70fc197 751void LIBNXCL_EXPORTABLE NXCDestroyImageList(NXC_IMAGE_LIST *pImageList);
51bd5a10
VK
752DWORD LIBNXCL_EXPORTABLE NXCLoadDefaultImageList(DWORD *pdwListSize,
753 DWORD **ppdwClassId, DWORD **ppdwImageId);
f70fc197 754
80ffed5a
VK
755#ifdef __cplusplus
756}
757#endif
758
7ec6cca8
VK
759#endif /* LIBNXCL_NO_DECLARATIONS */
760
80ffed5a 761#endif /* _nxclapi_h_ */