ThingWorx C SDK
Main Page
Classes
Files
File List
File Members
src
porting
twWindows-openssl.h
Go to the documentation of this file.
1
/***************************************
2
* Copyright (C) 2015 ThingWorx Inc. *
3
***************************************/
4
11
#ifndef TW_WINDOWS_H
12
#define TW_WINDOWS_H
13
14
#include "winsock2.h"
15
#include "windows.h"
16
#include "conio.h"
17
#include "stdio.h"
18
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
34
#define TW_TLS_INCLUDE "twOpenSSL.h"
35
39
#ifndef TW_LEAN_AND_MEAN
40
43
#define TW_LOGGER_BUF_SIZE 4096
44
#define TW_LOG(level, fmt, ...) twLog(level, fmt, ##__VA_ARGS__)
45
#define TW_LOG_HEX(msg, preamble, length) twLogHexString(msg, preamble, length)
46
#define TW_LOG_MSG(msg, preamble) twLogMessage(msg, preamble)
47
51
#define ENABLE_HTTP_PROXY_SUPPORT
52
#define USE_NTLM_PROXY
53
54
#else
/* LEAN AND MEAN */
55
61
#define TW_LOGGER_BUF_SIZE 1
62
#define TW_LOG(level, fmt, ...)
63
#define TW_LOG_HEX(msg, preamble, length)
64
#define TW_LOG_MSG(msg, preamble)
65
66
#undef OFFLINE_MSG_STORE
67
#define OFFLINE_MSG_STORE 0
68
#undef ENABLE_HTTP_PROXY_SUPPORT
69
#undef USE_NTLM_PROXY
70
#undef ENABLE_FILE_XFER
71
#undef ENABLE_TUNNELING
72
#endif
73
77
typedef
DWORD64
DATETIME
;
78
81
#define TW_MUTEX LPHANDLE
82
86
#define IPV4 AF_INET
87
#define IPV6 AF_INET6
88
#define TW_SOCKET_TYPE int
89
#define TW_ADDR_INFO struct addrinfo
90
94
#define TICKS_PER_MSEC 1
95
99
#define TW_MALLOC(a) malloc(a)
100
#define TW_CALLOC(a, b) calloc(a,b)
101
#define TW_REALLOC(a, b) realloc(a, b)
102
#define TW_FREE(a) free(a)
103
107
#define TW_FILE_HANDLE FILE*
108
#define TW_FILE_DELIM '\\'
109
#define TW_FILE_DELIM_STR "\\"
110
#define TW_FILE_CASE_SENSITVE FALSE
111
#define TW_DIR HANDLE
112
113
TW_FILE_HANDLE win_fopen(
const
char
* name,
const
char
* mode);
114
#define TW_FOPEN(a,b) win_fopen(a,b)
115
#define TW_FCLOSE(a) fclose(a)
116
#define TW_FREAD(a,b,c,d) fread(a,b,c,d)
117
#define TW_FWRITE(a,b,c,d) fwrite(a,b,c,d)
118
#define TW_FSEEK(a,b,c) _fseeki64(a,b,c)
119
#define TW_FTELL(a) _ftelli64(a)
120
#define TW_FERROR(a) ferror(a)
121
125
#define TW_THREAD_ID HANDLE
126
133
#define INLINE __forceinline
134
#define snprintf _snprintf
135
136
#ifdef __cplusplus
137
}
138
#endif
139
140
#endif
DATETIME
DWORD64 DATETIME
Date/time definition.
Definition:
twWindows-openssl.h:77
Generated on Sat Sep 12 2015 00:38:47 for ThingWorx C SDK by
1.8.9.1