//#include //#include //ws2_32.lib·¢ËÍhttpÇëÇóÀà¿â #pragma comment(lib,"ws2_32.lib") #include "autolink.h" #include "config.h" #include "features.h" #include "forwards.h" #include "json.h" #include "reader.h" #include "value.h" #include "writer.h" #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 #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; bool copyFile(const char *SRC, const char* DEST); void initUserDir(char *userId); int export_dataset_file_to_dir(bool debug,tag_t dataset, const char *ref_name,const char* temp_path, char *ext, char **filename, char **original_name); void CreateLogFile(char* FunctionName, char *userId, char **fullname); int CreateTempFile(logical debug,const char* temp_path, char *file_name, char* ext, char **fullname,FILE **file); int CreateTempFile(logical debug,const char* temp_path, char *file_name, char* user_id, char* ext, char **fullname,FILE **file); void CloseLog(void); void WriteLog2(logical debug, const char* format, ...); 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,char *userId, char *ext, char **filename, char **original_name); int GetBomView(tag_t rev_tag, 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* temp_path, 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); int CreateUserFile(logical debug,char* FunctionName, char *userId, char **fullname,FILE **file); int WriteToFile(logical debug,FILE* file, const char* format, ...); bool isTypeOf(tag_t objtag, const char * type_name); int connor_set_prop_value(char* propname, const char* propvalue, tag_t &tag_instance); int getLast2Year(char* &year); void getCurrentTime(date_t * now); bool find_prop(int prop_cnt, char** props, const char* prop); string readFileIntoString(char * filename); map jsonstr2map(const string& json); bool exists_test0(const std::string& name); int export_dataset_file(tag_t dataset, char *ref_name, char *ext, char **filename, char **original_name); bool is_str_utf8(const char* str); int write_string_to_file_append(const std::string & file_string, const std::string str); char* getfileall(const char* fname); void CreateDirectoryAndFile(const char* directory_path, const char* file_path); //BOOL GetIpByDomainName(char *szHost, char* szIp); //void sendGetRequest();