#ifndef FM_GLOBAL_H
#define FM_GLOBAL_H

#define NUM_SIZE					60
#define KEY_SIZE					24
#define MAX_LOG_LINE_NUM			1024
#define MAX_RSA_KEY_LEN				2048
#define MAX_BUF_LEN					25600
#define MAX_JSON_KEY_LEN			128
#define MAX_SIGN_LEN				256
#define CFG_FILE_NAME				"fmclient.cfg"
#define RBG_FILE_NAME				"fmclient.rbk"

#define DES3_KEY					"ABCD@#9876DFSAAWKLDEOPDD"
//#define DES3_KEY					"DDDDEEEE45LPODDCXZZLKDDO"
#define AES_KEY                     "ABCD@#9876DFSAAWKLDEOPDD"
#define AES_KEY_PRT                 "1JG23G12Y12V123G123F1DI1"
#define DES3_KEY_PRT				"1JG23G12Y12V123G123F1DI1"
#define CRET_FILE_NAME				"client.p12"
#define JSON_KEY_ONLY				"partnerOrderId"
#define JSON_KEY_MAC				"mac"
#define JSON_KEY_SIGN				"sign"
#define JSON_KEY_FMTEST		        "test"
#define JSON_KEY_STATUS		        "statusCode"
#define JSON_KEY_SERPBLICKEY		"serverPublicKey"
#define JSON_KEY_CLIENTPRIKEY		"clientPrivateKey"
#define JSON_KEY_REQTYPE            "reqType"
#define JSON_KEY_RPARTNERID         "partnerId"
#define JSON_KEY_RSTOREID           "storeId"
#define JSON_KEY_RSTATIONID         "stationId"

#define VALUE_URL                   "all/url"
#define VALUE_URL_CRET              "all/creturl"
#define VALUE_HOST                  "all/host"
#define VALUE_TIMEOUT               "all/timeout"

#define CFG_KEY						"template"
#define TMP_JSON					"json.ini"
#define DB_ORDER					"rollback.db"
#define DB_TABLE_NAME				"orderlist"
#define USERCONFIG_NAME             "sbkpay.ini"
#define MAX_ORDERID_LEN				200

#define SQL_KEY_ORDERID             "orderid"
#define SQL_KET_CONTENT             "content"

#ifndef POSTYPE
#define POSTYPE
typedef enum
{
    RES,
    SPCC,
    SIMPHONY
} POSType;
#endif

#define CONFIG_ALL_PATH                 "ALL/DLLPATH"
#define CONFIG_ALL_PARTNER              "ALL/partner"
#define CONFIG_OLTP_URL                 "OLTP/url"
#define CONFIG_OLTP_ACTION              "OLTP/action"
#define CONFIG_OLTP_TIMEOUT             "OLTP/timeout"
#define CONFIG_OLTP_PATH                "OLTP/DLLPATH"
#define CONFIG_OLTP_VER                 "OLTP/VER"
#define CONFIG_OLTP_FROM                "OLTP/FROM"
#define CONFIG_OLTP_BUSINESS            "OLTP/BUSINESS"
#define CONFIG_OLTP_STATCODE            "OLTP/STATCODE"
#define CONFIG_OLTP_MODE                "OLTP/MODE"
#define CONFIG_OLTP_MODE_BATCH          "OLTP/MODEBATCH"
#define CONFIG_OLTP_OPERATION           "OLTP/OPERATION"
#define CONFIG_OLTP_OPERATION_BATCH     "OLTP/OPERATIONBATCH"
#define CONFIG_PRINT_PATH               "PRINT/PATH"
#define CONFIG_PRINT_ENDDAY_NAME        "PRINT/EDNDAYNAME"
#define CONFIG_PRINT_SHIFT_NAME         "PRINT/SHIFTNAME"
#define CONFIG_PRINT_AGAIN_NAME         "PRINT/AGAINNAME"
#define CONFIG_LOG_PATH                 "LOG/PATH"
#define CONFIG_LOG_NAME                 "LOG/NAME"
#define CONFIG_LOG_LEVEL                "LOG/LEVEL"
#define CONFIG_LOG_SIZE                 "LOG/SIZE"
#define CONFIG_LOG_COUNT                "LOG/COUNT"

#endif
