00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef liqapp_H
00028 #define liqapp_H
00029
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033
00034 #include <stdio.h>
00035 #include <dirent.h>
00036
00037
00038
00039
00040 typedef struct
00041 {
00042
00043 char * title;
00044 int argc;
00045 char * *argv;
00046 int infologgingenabled;
00047 char *version;
00048 void * tag;
00049
00050
00051
00052 char *startpath;
00053 char *homepath;
00054 char *userdatapath;
00055 char *codepath;
00056
00057 char *username;
00058
00059
00060 } liqapp;
00061
00062
00063
00064 extern liqapp app;
00065
00066
00067 unsigned long liqapp_GetTicks();
00068 int liqapp_init(int argc, char* argv[],char *title,char *version);
00069 int liqapp_log(char *logentry, ...);
00070 int liqapp_errorandfail(int returnstatus,char *logentry);
00071 int liqapp_warnandcontinue(int returnstatus,char *logentry);
00072 int liqapp_close();
00073
00074
00075 char * liqapp_gettitle();
00076
00077
00078 float liqapp_fps(unsigned long ts,unsigned long te,unsigned long framecount);
00079 int liqapp_getopt_find(char *optname);
00080 int liqapp_getopt_exist(char *optname);
00081 int liqapp_getopt_hasarg(char *optname);
00082 char * liqapp_getopt_str(char *optname,char *def);
00083 int liqapp_getopt_int(char *optname,int def);
00084 int liqapp_sleep(unsigned long millisec);
00085
00086 int liqapp_formatnow(char *buffer,int buffersize,char *format);
00087 char * liqapp_format_strftime(char *buffer,int buffersize,char *strftime_fmt);
00088
00089
00090 int liqapp_folderexists(char *pathname);
00091 int liqapp_pathexists(char *pathname);
00092 int liqapp_fileexists(char *filename);
00093 int liqapp_filesize(char *filename);
00094 char * liqapp_filename_walkoverpath(char *filename);
00095 char * liqapp_filename_walktoextension(char *filename);
00096 int liqapp_file_copy (char * from, char * to, int allowoverwrite);
00097
00098
00099 int liqapp_url_wget(char *url,char *resultfilename,int resultbufsize);
00100
00101
00102
00103 void liqapp_turbo_start();
00104 void liqapp_turbo_reset();
00105
00106 void liqapp_ensurecleanusername(char *usernamewhichismodifiable);
00107
00108
00109 char *stristr(const char *String, const char *Pattern);
00110
00111
00112
00113 #ifdef __cplusplus
00114 }
00115 #endif
00116
00117 #endif
00118
00119
00120
00121
00122