#pragma once #include #include #include #include #include #include #include #include #include #include //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef WIN32 #include #include #else #include #endif #define DOFREE(obj) \ { \ if(obj) \ { \ MEM_free(obj); \ obj = NULL; \ } \ } extern "C" int POM_AM__set_application_bypass(logical bypass); using namespace std; char* getTime(); int getCurrentMilliSeconds(); string trim(const string& str); void WriteLog(logical debug, const char* format, ...); void set_bypass(logical bypass); char* G2U(const char* gb2312); char* U2G(const char* utf8); int getPrefStrings(const char* preference, TC_preference_search_scope_t scope, vector& pref_vec); int export_dataset_file(bool debug, tag_t dataset, const char* ref_name, const char* ext, char** filename, char** original_name); int GetBomView(tag_t rev_tag, const char* viewtype, tag_t* bomView, tag_t* bomBVR, bool debug); int GetBomLinePropString(bool debug, tag_t line, char* propName, int errCode, char** attr_val); void Split(string strArg, char spliter, vector& ans); void Split(string strArg, string spliter, vector& ans); int getPrefStrings2(const char* preference, TC_preference_search_scope_t scope, char splitter, vector& pref_vec); int import_dataset_file(tag_t dataset, const char* ref_name, char* ext, char* fullfilename, char* original_name); int import_dataset_file_binary(tag_t dataset, const char* ref_name, char* ext, char* fullfilename, char* original_name); int readError(bool debug, char* errFilePath, int errCode); void deleteFile(bool debug, char* path); bool CheckType(string config, char* type, char spliter); bool propExist(bool debug, tag_t obj, const char* propName); bool isRev(char* object_type); int GetProcessTargets(bool debug, int att_cnt, tag_t* attachments, vector& targets, char* formType, char splitter); bool inArray(vector types, string type); int getIndexInArray(vector types, string type); int findUser(bool debug, string userStr, tag_t* user_tag); bool isType(tag_t item, char* type); void initUserDir(char* userId); int CreateUserFile(logical debug, const char* FunctionName, char* userId, char** fullname, FILE** file); int WriteToFile(FILE* file, const char* text);