#include "usg_common.h" #include "hcnetdisk_wrapper.h" int main() { hcnetdisk_init_wrapper("../hclib/"); long userid = hcnetdisk_login_wrapper("192.168.20.11" , 8000, "admin", "a1234567"); if (userid != -1) { struct tm start = {0}; start.tm_year = 120; // 这个时间类型从1900开始算作第一年 start.tm_mon = 3; // 0是第一个月 start.tm_mday = 10; start.tm_hour = 14; start.tm_min = 9; start.tm_sec = 0; struct tm end = {0}; end.tm_year = 120; // 这个时间类型从1900开始算作第一年 end.tm_mon = 3; // 0是第一个月 end.tm_mday = 10; end.tm_hour = 15; end.tm_min = 9; end.tm_sec = 0; // struct tm start = {.tm_mday=1}; // struct tm end = {.tm_mday=1}; if (hcnetdisk_downloadByTime_wrapper(userid, 33, &start, &end, "/home/basic/Downloads/test/123.mp3") != 0) { printf("下载失败\n"); } hcnetdisk_logout_wrapper(userid); } }