Function AddObjectToIndex() changed: now it add new element at the end and use qsort...
[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>
28
29
5fad5c32
VK
30//
31// Events
32//
33
34#define NXC_EVENT_STATE_CHANGED 1
71f8d3d7 35#define NXC_EVENT_ERROR 2
c7f4f5a9 36#define NXC_EVENT_LOGIN_RESULT 3
71f8d3d7
VK
37
38
39//
40// Errors
41//
42
43#define NXC_ERR_INTERNAL 1
5fad5c32
VK
44
45
54481027
VK
46//
47// States
48//
49
50#define STATE_DISCONNECTED 0
51#define STATE_CONNECTING 1
52#define STATE_IDLE 2
7e986059
VK
53#define STATE_SYNC_OBJECTS 3
54#define STATE_SYNC_EVENTS 4
55
56
57//
58// Operations
59//
60
61#define NXC_OP_SYNC_OBJECTS 1
54481027
VK
62
63
64//
65// Event handler data type
66//
67
68typedef void (* NXC_EVENT_HANDLER)(DWORD dwEvent, DWORD dwCode, void *pArg);
69
70
80ffed5a
VK
71//
72// Functions
73//
74
75#ifdef __cplusplus
76extern "C" {
77#endif
78
54481027
VK
79DWORD EXPORTABLE NXCGetVersion(void);
80BOOL EXPORTABLE NXCInitialize(void);
71f8d3d7 81BOOL EXPORTABLE NXCConnect(char *szServer, char *szLogin, char *szPassword);
54481027
VK
82void EXPORTABLE NXCDisconnect(void);
83void EXPORTABLE NXCSetEventHandler(NXC_EVENT_HANDLER pHandler);
84int EXPORTABLE NXCRequest(DWORD dwOperation, ...);
85int EXPORTABLE NXCSyncRequest(DWORD dwOperation, ...);
80ffed5a
VK
86
87#ifdef __cplusplus
88}
89#endif
90
91
7e986059
VK
92//
93// Macros
94//
95
96#define NXCSyncObjects() NXCRequest(NXC_OP_SYNC_OBJECTS)
97
98
80ffed5a 99#endif /* _nxclapi_h_ */