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