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