nxappc internal header file removed
[public/netxms.git] / src / agent / libnxappc / nxappc.h
1 /*
2 ** NetXMS Application Connector Library
3 ** Copyright (C) 2015-2016 Raden Solutions
4 **
5 ** Permission is hereby granted, free of charge, to any person obtaining
6 ** a copy of this software and associated documentation files
7 ** (the "Software"), to deal in the Software without restriction, including
8 ** without limitation the rights to use, copy, modify, merge, publish,
9 ** distribute, sublicense, and/or sell copies of the Software, and to permit
10 ** persons to whom the Software is furnished to do so, subject to the
11 ** following conditions:
12 **
13 ** The above copyright notice and this permission notice shall be included in
14 ** all copies or substantial portions of the Software.
15 **
16 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 ** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 ** OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 ** OTHER DEALINGS IN THE SOFTWARE.
23 **/
24
25 #ifndef _nxappc_h_
26 #define _nxappc_h_
27
28 #ifdef _WIN32
29 #ifdef LIBNXAPPC_EXPORTS
30 #define LIBNXAPPC_EXPORTABLE __declspec(dllexport)
31 #else
32 #define LIBNXAPPC_EXPORTABLE __declspec(dllimport)
33 #endif
34 #else
35 #define LIBNXAPPC_EXPORTABLE
36 #endif
37
38 #define NXAPPC_SUCCESS (0)
39 #define NXAPPC_FAIL (-1)
40
41 #define NXAPPC_CMD_REGISTER_COUNTER 0x00
42 #define NXAPPC_CMD_RESET_COUNTER 0x01
43 #define NXAPPC_CMD_SET_COUNTER_LONG 0x02
44 #define NXAPPC_CMD_SET_COUNTER_DOUBLE 0x03
45 #define NXAPPC_CMD_UPDATE_COUNTER_LONG 0x04
46 #define NXAPPC_CMD_UPDATE_COUNTER_DOUBLE 0x05
47 #define NXAPPC_CMD_SEND_EVENT 0x06
48 #define NXAPPC_CMD_SEND_DATA 0x07
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 int LIBNXAPPC_EXPORTABLE nxappc_open_channel(void);
55 int LIBNXAPPC_EXPORTABLE nxappc_reset_channel(void);
56 int LIBNXAPPC_EXPORTABLE nxappc_set_channel_name(const char *channel);
57
58 int LIBNXAPPC_EXPORTABLE nxappc_send_event(int code, const char *name, const char *format, ...);
59 int LIBNXAPPC_EXPORTABLE nxappc_send_data(void *data, int size);
60
61 int LIBNXAPPC_EXPORTABLE nxappc_register_counter(const char *counter, const char *instance);
62 int LIBNXAPPC_EXPORTABLE nxappc_update_counter_long(const char *counter, const char *instance, long diff);
63 int LIBNXAPPC_EXPORTABLE nxappc_update_counter_double(const char *counter, const char *instance, double diff);
64 int LIBNXAPPC_EXPORTABLE nxappc_reset_counter(const char *counter, const char *instance);
65 int LIBNXAPPC_EXPORTABLE nxappc_set_counter_long(const char *counter, const char *instance, long value);
66 int LIBNXAPPC_EXPORTABLE nxappc_set_counter_double(const char *counter, const char *instance, double value);
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif