12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef RVC_MOD_UPLOAD_UPLOAD_H_
- #define RVC_MOD_UPLOAD_UPLOAD_H_
- #include <list.h>
- typedef struct file_t file_t;
- typedef struct upload_dir_t upload_dir_t;
- struct file_t
- {
- struct list_head entry;
- char *path;
- char *name;
- unsigned int create_time;
- unsigned int length;
- upload_dir_t *owner;
- };
- #define UPLOAD_FLAG_AUTODELETE 0x01
- #define UPLOAD_FLAG_MOVEPATH 0x02
- #define UPLOAD_FLAG_ZIP 0x04
- // from ini config
- struct upload_dir_t {
- struct list_head entry;
- char *name;
- char *path;
- int flags;//自动删除|移动|压缩
- char *movepath;
- struct list_head candidate_list;//需要上传文件的集合
- int silent_time; // sec
- int child_count_limitation;
- int fileCount;//增加lwt 当前文件的个数
- int fileLenSum;//文件总长度 单位是k
- };
- void upload_file_destroy(file_t *file);
- int upload_create(struct list_head *list, IEntityFunction *pEntityFunc, IConfigInfo *pConfig,CSimpleStringA &checkDir);
- int upload_fresh(struct list_head *list);
- bool ZipData(LPCTSTR lpszZipArchive, LPCTSTR lpszSrcFile);
- //增加lwt
- int check_dir_fresh(const char *path,int limitation,int silentTime,int &fileSumlen);
- void updir_del_file(file_t *file);
- #endif // RVC_MOD_UPLOAD_UPLOAD_H_
|