-
Notifications
You must be signed in to change notification settings - Fork 1
/
global.h
86 lines (69 loc) · 2.16 KB
/
global.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
*******************************************************************************
* Copyright (c) 2018 Edgeworx, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************
*/
#ifndef C_SDK_GLOBAL_H
#define C_SDK_GLOBAL_H
#include "iomessage.h"
extern const char *IOFOG;
extern const char *ID;
extern const char *CONFIG;
extern const int PORT_IOFOG;
extern const char *SELFNAME;
extern const char *SSL;
extern const short SSL_DEFAULT;
extern const char *HOST_DEFAULT;
extern const char *URL_GET_CONFIG;
extern const char *URL_GET_NEXT_MESSAGES;
extern const char *URL_GET_PUBLISHERS_MESSAGES;
extern const char *URL_POST_MESSAGE;
extern const char *URL_GET_CONTROL_WS;
extern const char *URL_GET_MESSAGE_WS;
extern const char *APPLICATION_JSON;
extern const char *HTTP;
extern const char *HTTPS;
extern const char *WS;
extern const char *WSS;
extern const char *TIME_FRAME_START;
extern const char *TIME_FRAME_END;
extern const char *COUNT;
extern const char *MESSAGES;
extern const char *PUBLISHERS;
extern const unsigned char CODE_ACK;
extern const unsigned char CODE_CONTROL_SIGNAL;
extern const unsigned char CODE_MSG;
extern const unsigned char CODE_RECEIPT;
extern const int WS_ATTEMPT_LIMIT;
extern const int WS_CONNECT_TIMEOUT;
struct _postMessageResponse {
char *id;
long long timestamp;
};
struct _getNextMessagesResponse {
io_message **messages;
int count;
};
struct _getMessagesWithQueryResponse {
io_message **messages;
int count;
long long time_frame_start;
long long time_frame_end;
};
struct _getMessagesQuery {
long long time_frame_start;
long long time_frame_end;
char **publishers;
int publishers_count;
};
typedef struct _postMessageResponse post_message_response;
typedef struct _getNextMessagesResponse get_next_messages_response;
typedef struct _getMessagesWithQueryResponse get_messages_with_query_response;
typedef struct _getMessagesQuery get_messages_query;
#endif