Main Page | Modules | File List | File Members

define.h

Go to the documentation of this file.
00001 //****************************************************************************
00002 //*   Author:  Luc Bouchard  lbouchard@ubisoft.qc.ca
00003 //*   Date:    16/05/2001 11:23:39 AM
00010 //****************************************************************************
00011 
00012 
00032 #ifndef _DEFINE_H_
00033 #ifndef DOX_SKIP_THIS
00034 #define _DEFINE_H_
00035 #endif //DOX_SKIP_THIS
00036 
00037 #include "GSTypes.h"
00038 
00045 #define STOREDPROCLENGTH   30
00046 #define NICKNAMELENGTH     16
00047 #define FIRSTNAMELENGTH    33
00048 #define SURNAMELENGTH      33
00049 #define PASSWORDLENGTH     17
00050 #define ADDRESSLENGTH      129
00051 #define CITYLENGTH         33
00052 #define CODELENGTH         33
00053 #define EMAILLENGTH        129
00054 #define COMMENTSLENGTH     1025
00055 #define WEBPAGELENGTH      129
00056 #define GAMELENGTH         33
00057 #define IRCIDLENGTH        10
00058 #define NAMELENGTH         33
00059 #define COUNTRYLENGTH      65
00060 #define CHATLENGTH         1025
00061 #define IPADDRESSLENGTH    129
00062 #define IPDOTADDRESSLENGTH 16
00063 #define GAMELENGTH         33
00064 #define VERSIONLENGTH      33
00065 #define INFOLENGTH         1025
00066 #define FILELENGTH         129
00067 #define ARENALENGTH        33
00068 #define SESSIONLENGTH      33
00069 #define SCORELENGTH        129
00070 #define REASONLENGTH       129
00071 #define URLLENGTH          1025
00072 #define YESNOLENGTH            4
00073 #define MOTDLENGTH         513
00074 #define LANGUAGELENGTH     3
00075 
00084 #ifndef GSSUCCESS
00085 #define GSSUCCESS            38 /* c->r */
00086 #endif
00087 
00088 #ifndef GSFAIL
00089 #define GSFAIL               39 /* r->c */
00090 #endif
00091 
00092 #ifndef GSPENDING
00093 #define GSPENDING            40
00094 #endif
00095 
00098 #define CHARSIZE          1
00099 #define SHORTSIZE         2
00100 #define LONGSIZE          4
00101 
00108 #define PLAYERONLINE         0
00109 #define PLAYEROFFLINE        1 //Only set by Server
00110 #define PLAYERAWAY           2
00111 #define PLAYERBRB            3
00112 //#define PLAYERSESSIONCANJOIN  4
00113 //#define PLAYERSESSIONCANTJOIN  5
00114 #define PLAYERINVISIBLE      6
00115 #define PLAYERCOREONLINE     7
00116 #define PLAYERINLOBBY        8 //Only set by Server
00117 #define PLAYERINROOM         9 //Only set by Server
00118 #define PLAYERINGAMEOPEN     10 //Only set by Server
00119 #define PLAYERINGAMECLOSE    11 //Only set by Server
00120 #define PLAYERSTATUSCOUNT    12
00121 #define PLAYERCORESTART   3000000
00122 #define PLAYERCOREEND     4999999
00123 
00132 // SYSTEMPAGE subtypes
00133 #define ADDEDASFRIEND        0
00134 #define ADDEDASIGNOREE       1
00135 #define REMOVEDASIGNOREE     2
00136 #define ADMINPAGE            185
00137 
00146 #define MASK_PAGE           (1L<<0)
00147 #define MASK_FILES          (1L<<1)
00148 #define MASK_AUTOFILES      (1L<<2)
00149 #define MASK_INVISIBLE      (1L<<3)
00150 #define MASK_AWAY           (1L<<4)
00151 
00160 /*---------------- session and player mask ----------------------*/
00161 #define MASKSESSIONNAME (1L<<0)
00162 #define MASKSCORE       (1L<<2)
00163 #define MASKADDRESS     (1L<<5)
00164 
00165 const GSuint MASKPRIVATE                    = 0x00000001;  //(1L<<0)
00166 const GSuint MASKNEEDMASTER                 = 0x00000002;  //(1L<<1)
00167 const GSuint MASKETERNEL                    = 0x00000004;  //(1L<<2)
00168 const GSuint MASKACTIVE                     = 0x00000008;  //(1L<<3)
00169 const GSuint MASKOPEN                       = 0x00000010;  //(1L<<4)
00170 const GSuint STARTABLE                      = 0x00000020;  //(1L<<5)
00171 const GSuint MASKVISITOR                    = 0x00000040;  //(1L<<6)
00172 const GSuint DEFEREDSTARTGAME               = 0x00000080;  //(1L<<7)
00173 const GSuint MASKPLAYERETERNEL              = 0x00000100;
00174 const GSuint MASKDEDICATEDSERVER            = 0x00080000;  //(1L<<19)
00175 
00179 // ERROR CODES IN USE
00180 // 0 @ 56
00181 // 60 @ 68
00182 // -1 @ -3
00183 // 100, 501, 502, 512
00184 
00200 #define ERRORROUTER_UNKNOWNERROR             0
00201 
00202 #define ERRORROUTER_NOTREGISTERED            1
00203 
00204 #define ERRORROUTER_PASSWORDNOTCORRECT       2
00205 
00206 #define ERRORROUTER_NOTDISCONNECTED          3
00207 
00208 #define ERRORROUTER_ARENANOTAVAILABLE        4
00209 
00210 #define ERRORROUTER_FRIENDSNOTAVAILABLE      5
00211 
00212 #define ERRORROUTER_NAMEALREADYUSED          6
00213 
00214 #define ERRORROUTER_PLAYERNOTCONNECTED       7
00215 
00216 #define ERRORROUTER_PLAYERNOTREGISTERED      8
00217 
00218 #define ERRORROUTER_PLAYERCONNECTED          9
00219 
00220 #define ERRORROUTER_PLAYERALREADYREGISTERED  10
00221 
00222 #define ERRORROUTER_CLIENTVERSIONTOOOLD      11
00223 
00224 #define ERRORROUTER_DBINBACKUPMODE           12
00225 
00226 #define ERRORROUTER_DBPROBLEM                13
00227 
00228 #define ERRORROUTER_CLIENTINCOMPATIBLE       50
00229 
00240 #define ERRORFRIENDS_FRIENDNOTEXIST          14
00241 
00242 #define ERRORFRIENDS_NOTINARENA              15
00243 
00244 #define ERRORFRIENDS_PLAYERNOTONLINE         16
00245 
00246 #define ERRORFRIENDS_NOTINSESSION            17
00247 
00248 #define ERRORFRIENDS_PLAYERIGNORE            18
00249 
00250 #define ERRORFRIENDS_ALREADYCONNECTED        19
00251 
00252 #define ERRORFRIENDS_NOMOREPLAYERS           20
00253 
00254 #define ERRORFRIENDS_NOPLAYERSCORE           47
00255 
00256 #define ERRORFRIENDS_SEARCHPLAYERFINISHED    48
00257 
00258 #define ERRORFRIENDS_PLAYERSTATUSCOREONLINE  56
00259 
00270 #define ERRORARENA_SESSIONEXIST              21
00271 #define ERRORARENA_GAMENOTALLOWED            22
00272 #define ERRORARENA_NUMBERPLAYER              23
00273 #define ERRORARENA_NUMBERSPECTATOR           24
00274 #define ERRORARENA_VISITORNOTALLOWED         25
00275 #define ERRORARENA_NOTREGISTERED             26
00276 #define ERRORARENA_NOMOREPLAYERS             27
00277 #define ERRORARENA_NOMORESPECTATORS          28
00278 #define ERRORARENA_PLAYERNOTREGISTERED       29
00279 #define ERRORARENA_SESSIONNOTAVAILABLE       30
00280 #define ERRORARENA_SESSIONINPROCESS          31
00281 #define ERRORARENA_BADGAMEVERSION            32
00282 #define ERRORARENA_PASSWORDNOTCORRECT        33
00283 #define ERRORARENA_ALREADYINSESSION          34
00284 #define ERRORARENA_NOTMASTER                 35
00285 #define ERRORARENA_NOTINSESSION              36
00286 #define ERRORARENA_MINPLAYERS                37
00287 #define ERRORARENA_ADMINGAMEDOESNOTEXIST     38
00288 #define ERRORARENA_ADMINSESSIONDOESNOTEXIST  39
00289 #define ERRORARENA_CONNECTADDCONNECTION      40
00290 #define ERRORARENA_CONNECTSENDLOGINMSG       41
00291 #define ERRORARENA_ERRORLOGINMESSAGE         42
00292 #define ERRORARENA_NOHOSTARENA               43
00293 #define ERRORARENA_ARENADISCONNECTED         44
00294 #define ERRORARENA_INVALIDGROUPNAME          45
00295 #define ERRORARENA_INVALIDGAMETYPE           46
00296 #define ERRORARENA_NOMOREGAMEMODULE          47
00297 #define ERRORARENA_PASSPORTLABELNOTFOUND     48
00298 #define ERRORARENA_PASSPORTFAIL              49
00299 #define ERRORARENA_CREATENOTALLOWED          50
00300 #define ERRORARENA_INVALIDSESSIONTYPE        51
00301 #define ERRORARENA_SESSIONCLOSE              52
00302 #define ERRORARENA_NOTCREATOR                53
00303 #define ERRORARENA_DEDICATEDSERVERONLY       54
00304 
00313 #define ERRORCLAN_INVALIDPROFILE             49
00314 
00323 #define ERROR_SERVICENOTAVAILABLE            55
00324 
00331 #define ERRLQS_DUPLICATEFIELD                60
00332 #define ERRLQS_DATABASEFAILURE               61
00333 #define ERRLQS_INTERNAL_OUTOFMEMORY          62
00334 #define ERRLQS_INTERNAL_WRONGRESULTVERSION   63
00335 #define ERRLQS_INTERNAL_BADRESULTFORMAT      64
00336 
00345 #define ERRSS_BADFORMAT                     65
00346 #define ERRSS_DBFAILURE                     66
00347 #define ERRSS_SUBMISSIONFAILED              67
00348 #define ERRSS_VALIDATIONFAILED              68
00349 
00361 #define ERROR_ROUTERCONNECTION               -1
00362 #define ERROR_ARENACONNECTION                -2
00363 #define ERROR_LOBBYSRVDISCONNECTED                       -3
00364 
00372 // CREATE: The username already exists
00373 #define ERRORSECURE_USERNAMEEXISTS 1
00374 // CREATE: The username is malformed
00375 #define ERRORSECURE_USERNAMEMALFORMED 2
00376 // CREATE: The username is not allowed to be used (e.g. contains smut)
00377 #define ERRORSECURE_USERNAMEFORBIDDEN 3
00378 // LOGIN: The account does not exist
00379 #define ERRORSECURE_INVALIDACCOUNT 4
00380 // CREATE: The username is reserved (e.g. Ubi_* usernames)
00381 #define ERRORSECURE_USERNAMERESERVED 5
00382 // CREATE/UPDATE: The password is malformed
00383 #define ERRORSECURE_PASSWORDMALFORMED 11
00384 // CREATE/UPDATE: The password is not allowed (e.g. contains username)
00385 #define ERRORSECURE_PASSWORDFORBIDDEN 13
00386 // LOGIN: The password is incorrect
00387 #define ERRORSECURE_INVALIDPASSWORD 15
00388 // ALL: The database returned an error
00389 #define ERRORSECURE_DATABASEFAILED 100
00390 // LOGIN: The account has been banned
00391 #define ERRORSECURE_BANNEDACCOUNT 501
00392 // LOGIN: The account has been blocked
00393 #define ERRORSECURE_BLOCKEDACCOUNT 502
00394 // LOGIN: The account has been locked
00395 #define ERRORSECURE_LOCKEDACCOUNT 512
00396 
00402 #endif

Ubi.com GameService SDK - ©UbiSoft Entertainment 2002
GameService development team