DDraceNetwork Docs
types.h
Go to the documentation of this file.
1#ifndef BASE_TYPES_H
2#define BASE_TYPES_H
3
4#include <ctime>
5
6enum class TRISTATE
7{
8 NONE,
9 SOME,
10 ALL,
11};
12
18typedef void *IOHANDLE;
19
20typedef int (*FS_LISTDIR_CALLBACK)(const char *name, int is_dir, int dir_type, void *user);
21
22typedef struct
23{
24 const char *m_pName;
25 time_t m_TimeCreated; // seconds since UNIX Epoch
26 time_t m_TimeModified; // seconds since UNIX Epoch
28
29typedef int (*FS_LISTDIR_CALLBACK_FILEINFO)(const CFsFileInfo *info, int is_dir, int dir_type, void *user);
30
35
36enum
37{
42
44
45 NETADDR_MAXSTRSIZE = 1 + (8 * 4 + 7) + 1 + 1 + 5 + 1, // [XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX]:XXXXX
46
48
58
61};
62
66typedef struct NETADDR
67{
68 unsigned int type;
69 unsigned char ip[16];
70 unsigned short port;
71
72 bool operator==(const NETADDR &other) const;
73 bool operator!=(const NETADDR &other) const { return !(*this == other); }
75#endif // BASE_TYPES_H
void * IOHANDLE
Definition: types.h:18
struct NETADDR NETADDR
struct NETSOCKET_INTERNAL * NETSOCKET
Definition: types.h:34
Definition: types.h:23
time_t m_TimeCreated
Definition: types.h:25
time_t m_TimeModified
Definition: types.h:26
const char * m_pName
Definition: types.h:24
Definition: types.h:67
bool operator==(const NETADDR &other) const
Definition: system.cpp:1067
unsigned char ip[16]
Definition: types.h:69
bool operator!=(const NETADDR &other) const
Definition: types.h:73
unsigned short port
Definition: types.h:70
unsigned int type
Definition: types.h:68
Definition: system.cpp:110
TRISTATE
Definition: types.h:7
int(* FS_LISTDIR_CALLBACK_FILEINFO)(const CFsFileInfo *info, int is_dir, int dir_type, void *user)
Definition: types.h:29
@ NETADDR_MAXSTRSIZE
Definition: types.h:45
@ IO_MAX_PATH_LENGTH
Definition: types.h:43
@ NETTYPE_TW7
Definition: types.h:57
@ NETTYPE_INVALID
Definition: types.h:49
@ NETTYPE_LINK_BROADCAST
Definition: types.h:47
@ NETTYPE_MASK
Definition: types.h:60
@ NETTYPE_ALL
Definition: types.h:59
@ UTF8_BYTE_LENGTH
Definition: types.h:41
@ NETTYPE_IPV6
Definition: types.h:51
@ NETTYPE_IPV4
Definition: types.h:50
@ NETTYPE_WEBSOCKET_IPV4
Definition: types.h:52
int(* FS_LISTDIR_CALLBACK)(const char *name, int is_dir, int dir_type, void *user)
Definition: types.h:20