Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
24
Src/Plugins/Portable/pmp_wifi/SongDownloader.h
Normal file
24
Src/Plugins/Portable/pmp_wifi/SongDownloader.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
#include "../Components/wac_downloadManager/DownloadCallbackT.h"
|
||||
|
||||
class SongDownloader : public DownloadCallbackT<SongDownloader>
|
||||
{
|
||||
public:
|
||||
SongDownloader(const wchar_t *filename, HANDLE done_event, void (*callback)(void *callbackContext, wchar_t *status), void *context);
|
||||
~SongDownloader();
|
||||
|
||||
void OnInit(DownloadToken token);
|
||||
void OnData(DownloadToken token, void *data, size_t datalen);
|
||||
void OnCancel(DownloadToken token);
|
||||
void OnError(DownloadToken token, int error);
|
||||
void OnFinish(DownloadToken token);
|
||||
|
||||
private:
|
||||
void (*callback)(void *callbackContext, wchar_t *status);
|
||||
void *context;
|
||||
HANDLE hFile, done_event;
|
||||
uint64_t content_length;
|
||||
uint64_t bytes_downloaded;
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue