/*************************************************************************************************************
* This file contains server configuration using defines
* 2012/8 by Dlxko
* Version 3.0
**************************************************************************************************************/

// Main defines
#define	    PORT    12345
#define     RESET   0

// DB Connection
#define DB_IP   "127.0.0.1"
#define DB_USER "root"
#define DB_PASS ""
#define DB_NAME "dxsocks"
#define DB_PORT 3306

// Sizes
#define	OPCODE_SIZE        3
#define	CODE_SIZE          3
#define	MSG_NUMB_SIZE      3
#define LENGHT_SIZE        5
#define DATA_ONE_SIZE      10
#define PASS_SIZE          10
#define EVENT_ID_SIZE      100
#define AVATAR_SIZE        100
#define FILE_NAME_SIZE     512
#define WARNING_TMP_SIZE   512
#define SERVER_INPUT_SIZE  512
#define FILE_PATH_SIZE     1024
#define SERVER_INFO_SIZE   2048
#define BUFFER_SIZE        2048
#define MYSQL_TEXT_SIZE    2048

// Temps
#define TEMP_SIZE_MEDIUM   512

// Maxes
#define	MAX_CLIENTS        10

// Max server info
#define SI_MAX_PORT               100000
#define SI_MAX_SERVER_SOCK        1000
#define SI_MAX_DB_IP              17
#define SI_MAX_DB_USER            20
#define SI_MAX_DB_PASS            20
#define SI_MAX_DB_NAME            20
#define SI_MAX_DB_PORT            10000
#define SI_MAX_CLIENTS            10000
#define SI_MAX_OPCODE_SIZE        10
#define SI_MAX_CODE_SIZE          10
#define SI_MAX_MSG_NUM_SIZE       10
#define SI_MAX_FRIEND_DATA_SIZE   20
#define SI_MAX_PASS_SIZE          100
#define SI_MAX_EVENT_ID_SIZE      1000
#define SI_MAX_AVATAR_SIZE        1000
#define SI_MAX_BUFFER_SIZE        10000
#define SI_MAX_MYSQL_TEXT_SIZE    10000
#define SI_MAX_FILE_NAME_SIZE     10000
#define SI_MAX_FILE_PATH_SIZE     10000
#define SI_MAX_LENGHT_SIZE        10
#define SI_MAX_WARNING_TMP_SIZE   10000
#define SI_MAX_SERVER_INPUT_SIZE  10000
#define SI_MAX_SERVER_INFO_SIZE   10000

// DB return variables
#define MORE_ROWS_OR_SEARCHED   0
#define NO_ROWS_OR_NOTSEARCHED  1
#define NO_RESULT_OR_SUCESS     2
#define NOT_EXECUTET_QUERY      3

// Codes
#define DX_CODE_ROK "ROK"
#define DX_CODE_RWR "RWR"
#define DX_CODE_RUK "RUK"
#define DX_CODE_AOK "AOK"
#define DX_CODE_AWR "AWR"
#define DX_CODE_AUK "AUK"
#define DX_CODE_ONL "ONL"
#define DX_CODE_OFF "OFF"
#define DX_CODE_AWY "AWY"
#define DX_CODE_DND "DND"
#define DX_CODE_NHI "NHI"

// Opcodes
#define DX_OPCODE_INF "INF"
#define DX_OPCODE_NFR "NFR"
#define DX_OPCODE_NFD "NFD"
#define DX_OPCODE_NFF "NFF"
#define DX_OPCODE_REG "REG"
#define DX_OPCODE_IMS "IMS"
#define DX_OPCODE_AUC "AUC"
#define DX_OPCODE_BDL "BDL"
#define DX_OPCODE_SNT "SNT"
#define DX_OPCODE_FLT "FLT"
#define DX_OPCODE_IMG "IMG"
#define DX_OPCODE_IMH "IMH"

// Disconnecting system
#define DETECT_OFFLINES_REPEAT 5000
#define AWAY_PROCESS_TIME 50