extern "C" size_t write_callback(char *buffer, size_t size, size_t nitems, void *userp) { if(userp == NULL || g_application.m_bStop) return 0; CFileCurl::CReadState *state = (CFileCurl::CReadState *)userp; return state->WriteCallback(buffer, size, nitems); }
extern "C" size_t header_callback(void *ptr, size_t size, size_t nmemb, void *stream) { /* 歌方: 1、 卦指: 1、 傍苧: 1、 */ CFileCurl::CReadState *state = (CFileCurl::CReadState *)stream; return state->HeaderCallback(ptr, size, nmemb); }
/* curl calls this routine to get more data */ extern "C" size_t write_callback(char *buffer, size_t size, size_t nitems, void *userp) { /* 歌方: 1、 卦指: 1、 傍苧: 1、 */ if(userp == NULL) return 0; CFileCurl::CReadState *state = (CFileCurl::CReadState *)userp; return state->WriteCallback(buffer, size, nitems); }