Main Page | Modules | File List | File Members

# ConfigFileParser.h

    00001
    00002
    00003 #ifndef __CONFIGFILEPARSER_H__
    00004 #define __CONFIGFILEPARSER_H__
    00005
    00006 #include "define.h"
    00007 #include "GSTypes.h"
    00008
    00010 // Referrer string used in the config file parsing
    00011
    00012 // SERVER SECTION NAME
    00013 #define         SERVER_SECTION_NAME                     "Servers"
    00014
    00015 // ROUTER KEYNAME
    00016 #define         ROUTER_ADDRESS_REFERRER         "RouterIP%d"
    00017 #define         ROUTER_PORT_REFERRER            "RouterPort%d"
    00018
    00019 // CDKEY SERVER KEYNAME
    00020 #define         CDKEY_ADDRESS_REFERRER          "CDKeyServerIP%d"
    00021 #define         CDKEY_PORT_REFERRER                     "CDKeyServerPort%d"
    00022
    00023 // PROXY SERVER KEYNAME
    00024 #define         PROXY_ADDRESS_REFERRER          "ProxyIP%d"
    00025 #define         PROXY_PORT_REFERRER                     "ProxyPort%d"
    00026
    00027 // NAT SERVER KEYNAME
    00028 #define         NAT_ADDRESS_REFERRER            "NATServerIP%d"
    00029 #define         NAT_PORT_REFERRER                       "NATServerPort%d"
    00030
    00031 // CHAT SERVER KEYNAME
    00032 #define         CHAT_ADDRESS_REFERRER           "IRCIP%d"
    00033 #define         CHAT_PORT_REFERRER                      "IRCPort%d"
    00034
    00035 // SERVER TYPES
    00036 enum SERVER_TYPE {
    00037     SRV_ROUTER,
    00038     SRV_CDKEY,
    00039     SRV_PROXY,
    00040         SRV_NAT,
    00041         SRV_CHAT
    00042 };
    00043
    00044 extern "C" {
    00045
    00046 GSbool __stdcall InitializeFileParser(const GSchar *szConfigFilePath);
    00047 GSbool __stdcall InitializeStreamParser(GSchar **pszStream);
    00048
    00049 GSbool __stdcall GetServerAddress(SERVER_TYPE eServerType,GSuint uiIndex, GSchar *szAddress, GSushort *usPort);
    00050
    00051 GSbool __stdcall GetConfigStringValue(GSchar *szSectionName, GSchar *szKeyName, GSchar *szDefaultValue, GSchar *szBuffer, GSint iSize);
    00052 GSint  __stdcall GetConfigNumericValue(GSchar *szSectionName, GSchar *szKeyName, GSint iDefaultValue);
    00053
    00054 GSvoid __stdcall UninitializeParser();
    00055
    00056 } // extern "C"
    00057
    00058 #endif //__CONFIGFILEPARSER_H__

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