dxFeed C API  6.0.1
dxFeed C API library intended to provide market data access for DX clients
DXTypes.h
Go to the documentation of this file.
1 /*
2  * The contents of this file are subject to the Mozilla Public License Version
3  * 1.1 (the "License"); you may not use this file except in compliance with
4  * the License. You may obtain a copy of the License at
5  * http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
9  * for the specific language governing rights and limitations under the
10  * License.
11  *
12  * The Initial Developer of the Original Code is dxFeed Solutions DE GmbH.
13  * Portions created by the Initial Developer are Copyright (C) 2010
14  * the Initial Developer. All Rights Reserved.
15  *
16  * Contributor(s):
17  *
18  */
19 
25 #ifndef DX_TYPES_H_INCLUDED
26 #define DX_TYPES_H_INCLUDED
27 
29 typedef int ERRORCODE;
30 
32 typedef void* dxf_subscription_t;
33 
35 typedef void* dxf_connection_t;
36 
39 
41 typedef void* dxf_snapshot_t;
42 
44 typedef void* dxf_price_level_book_t;
45 
47 typedef void* dxf_regional_book_t;
48 
49 #ifdef _WIN32
50 
51 #include <wchar.h>
52 
53 typedef unsigned char dxf_bool_t; // 8 bit
54 typedef char dxf_byte_t; // 8 bit
55 typedef unsigned char dxf_ubyte_t; // 8 bit
56 typedef wchar_t dxf_char_t; // 16 bit
57 //typedef unsigned wchar_t dx_unsigned_char_t; // 16 bit
58 typedef short int dxf_short_t; // 16 bit
59 typedef unsigned short int dxf_ushort_t; // 16 bit
60 typedef int dxf_int_t; // 32 bit
61 typedef unsigned int dxf_uint_t; // 32 bit
62 typedef float dxf_float_t; // 32 bit
63 typedef long long dxf_long_t; // 64 bit
64 typedef unsigned long long dxf_ulong_t; // 64 bit
65 typedef double dxf_double_t; // 64 bit
66 typedef int dxf_dayid_t;
67 
69 typedef dxf_char_t* dxf_string_t;
70 
72 typedef const dxf_char_t* dxf_const_string_t;
73 
74 #else /* POSIX? */
75 
76 #include <stdint.h>
77 #include <wchar.h>
78 
80 typedef unsigned char dxf_bool_t; // 8 bit
81 
83 typedef int8_t dxf_byte_t; // 8 bit
84 
86 typedef uint8_t dxf_ubyte_t; // 8 bit
87 
89 typedef wchar_t dxf_char_t; // 16 bit
90 //typedef unsigned wchar_t dx_unsigned_char_t; // 16 bit
91 
93 typedef int16_t dxf_short_t; // 16 bit
94 
96 typedef uint16_t dxf_ushort_t; // 16 bit
97 
99 typedef int32_t dxf_int_t; // 32 bit
100 
102 typedef uint32_t dxf_uint_t; // 32 bit
103 
105 typedef float dxf_float_t; // 32 bit
106 
108 typedef int64_t dxf_long_t; // 64 bit
109 
111 typedef uint64_t dxf_ulong_t; // 64 bit
112 
114 typedef double dxf_double_t; // 64 bit
115 
117 typedef int32_t dxf_dayid_t;
118 
121 
124 
125 #endif /* _WIN32/POSIX */
126 
129 
131 typedef struct {
132  dxf_byte_t* elements;
133  int size;
134  int capacity;
136 
138 typedef struct {
139  dxf_string_t key;
140  dxf_string_t value;
142 
144 typedef enum {
145  dxf_cs_not_connected = 0,
146  dxf_cs_connected,
147  dxf_cs_login_required,
148  dxf_cs_authorized
150 
151 #endif /* DX_TYPES_H_INCLUDED */
uint16_t dxf_ushort_t
Unsigned short.
Definition: DXTypes.h:96
Byte array.
Definition: DXTypes.h:131
float dxf_float_t
Float.
Definition: DXTypes.h:105
void * dxf_candle_attributes_t
Candle attributes.
Definition: DXTypes.h:38
dxf_connection_status_t
Connection status.
Definition: DXTypes.h:144
uint8_t dxf_ubyte_t
Unsigned byte.
Definition: DXTypes.h:86
void * dxf_connection_t
Connection.
Definition: DXTypes.h:35
int8_t dxf_byte_t
Byte.
Definition: DXTypes.h:83
int32_t dxf_int_t
Int.
Definition: DXTypes.h:99
int ERRORCODE
Error code.
Definition: DXTypes.h:29
int64_t dxf_long_t
Long.
Definition: DXTypes.h:108
unsigned char dxf_bool_t
Boolean.
Definition: DXTypes.h:80
void * dxf_price_level_book_t
Price level book.
Definition: DXTypes.h:44
dxf_char_t * dxf_string_t
String.
Definition: DXTypes.h:120
void * dxf_snapshot_t
Snapshot.
Definition: DXTypes.h:41
void * dxf_subscription_t
Subscription.
Definition: DXTypes.h:32
Property item.
Definition: DXTypes.h:138
dxf_uint_t dxf_event_flags_t
Event flags.
Definition: DXTypes.h:128
wchar_t dxf_char_t
Char.
Definition: DXTypes.h:89
int16_t dxf_short_t
Short.
Definition: DXTypes.h:93
uint64_t dxf_ulong_t
Unsigned long.
Definition: DXTypes.h:111
int32_t dxf_dayid_t
DayId.
Definition: DXTypes.h:117
const dxf_char_t * dxf_const_string_t
Const String.
Definition: DXTypes.h:123
double dxf_double_t
Double.
Definition: DXTypes.h:114
void * dxf_regional_book_t
Regional book.
Definition: DXTypes.h:47
uint32_t dxf_uint_t
Unsigned int.
Definition: DXTypes.h:102