EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
dbtype.h
Go to the documentation of this file.
1 /*
2  ------------------------------------------------------------------------------------
3  LICENSE:
4  ------------------------------------------------------------------------------------
5  This file is part of EVEmu: EVE Online Server Emulator
6  Copyright 2006 - 2021 The EVEmu Team
7  For the latest information visit https://evemu.dev
8  ------------------------------------------------------------------------------------
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License along with
19  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20  Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21  http://www.gnu.org/copyleft/lesser.txt.
22  ------------------------------------------------------------------------------------
23  Author: Bloody.Rabbit
24 */
25 
26 #ifndef __DBTYPE_H__INCL__
27 #define __DBTYPE_H__INCL__
28 
29 /*
30  0x02(02) = "DBTYPE_I2"
31  0x03(03) = "DBTYPE_I4"
32  0x04(04) = "DBTYPE_R4"
33  0x05(05) = "DBTYPE_R8"
34  0x06(06) = "DBTYPE_CY"
35  0x0B(11) = "DBTYPE_BOOL"
36  0x10(16) = "DBTYPE_I1"
37  0x11(17) = "DBTYPE_UI1"
38  0x12(18) = "DBTYPE_UI2"
39  0x13(19) = "DBTYPE_UI4"
40  0x14(20) = "DBTYPE_I8"
41  0x15(21) = "DBTYPE_UI8"
42  0x40(64) = "DBTYPE_FILETIME"
43  0x80(128) = "DBTYPE_BYTES"
44  0x81(129) = "DBTYPE_STR"
45  0x82(130) = "DBTYPE_WSTR"
46  ....from client......
47  DBTYPE_BOOL = 11
48  DBTYPE_I1 = 16
49  DBTYPE_UI1 = 17
50  DBTYPE_I2 = 2
51  DBTYPE_UI2 = 18
52  DBTYPE_I4 = 3
53  DBTYPE_UI4 = 19
54  DBTYPE_R4 = 4
55  DBTYPE_I8 = 20
56  DBTYPE_UI8 = 21
57  DBTYPE_R5 = 5
58  DBTYPE_CY = 6
59  DBTYPE_FILETIME = 64
60  DBTYPE_DBTIMESTAMP = 135
61  DBTYPE_STR = 129
62  DBTYPE_WSTR = 130
63  DBTYPE_BYTES = 508
64  DBTYPE_EMPTY = 0
65 */
66 
67 enum DBTYPE
68 {
69  DBTYPE_EMPTY = 0x00,
70  //DBTYPE_NULL = 0x01, // not supported
71  DBTYPE_I2 = 0x02,
72  DBTYPE_I4 = 0x03,
73  DBTYPE_R4 = 0x04,
74  DBTYPE_R8 = 0x05,
75  DBTYPE_CY = 0x06, // money
76  //DBTYPE_DATE = 0x07, // not supported
77  //DBTYPE_BSTR = 0x08, // not supported
78  //DBTYPE_IDISPATCH = 0x09, // not supported
79  DBTYPE_ERROR = 0x0A,
80  DBTYPE_BOOL = 0x0B,
81  //DBTYPE_VARIANT = 0x0C, // not supported
82  //DBTYPE_IUNKNOWN = 0x0D, // not supported
83  //DBTYPE_DECIMAL = 0x0E, // not supported
84  //DBTYPE_BLOB = 0x0F, // not supported
85  DBTYPE_I1 = 0x10,
86  DBTYPE_UI1 = 0x11,
87  DBTYPE_UI2 = 0x12,
88  DBTYPE_UI4 = 0x13,
89  DBTYPE_I8 = 0x14,
90  DBTYPE_UI8 = 0x15,
91  DBTYPE_FILETIME = 0x40, // 64-bit timestamp
92  //DBTYPE_GUID = 0x48, // not supported
93  DBTYPE_BYTES = 0x80, // client defined as 0x1fc, but error when used: Exception: <type 'exceptions.TypeError'>, DBRowDescriptor doesn't support data type 508
94  DBTYPE_STR = 0x81,
95  DBTYPE_WSTR = 0x82,
96  //DBTYPE_NUMERIC = 0x83, // not supported
97  //DBTYPE_UDT = 0x84, // not supported
98  //DBTYPE_DBDATE = 0x85, // not supported
99  //DBTYPE_DBTIME = 0x86, // not supported
100  //DBTYPE_DBTIMESTAMP = 0x87, // not supported -client has this one defined
101  //DBTYPE_HCHAPTER = 0x88, // not supported
102  //DBTYPE_PROPVARIANT = 0x8A, // not supported
103  //DBTYPE_VARNUMERIC = 0x8B // not supported
104 };
105 
112 extern uint8 DBTYPE_GetSizeBits( DBTYPE type );
113 
120 extern uint8 DBTYPE_GetSizeBytes( DBTYPE type );
121 
122 #endif /* !__DBTYPE_H__INCL__ */
unsigned __int8 uint8
Definition: eve-compat.h:46
DBTYPE
Definition: dbtype.h:67
uint8 DBTYPE_GetSizeBits(DBTYPE type)
Definition: dbtype.cpp:30
uint8 DBTYPE_GetSizeBytes(DBTYPE type)
Definition: dbtype.cpp:61