mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 16:45:47 -04:00
Initial community commit
This commit is contained in:
37
Src/Plugins/Library/ml_downloads/DownloadViewCallback.h
Normal file
37
Src/Plugins/Library/ml_downloads/DownloadViewCallback.h
Normal file
@ -0,0 +1,37 @@
|
||||
#include <atomic>
|
||||
|
||||
#include "Main.h"
|
||||
#include "Downloaded.h"
|
||||
|
||||
#include "DownloadStatus.h"
|
||||
#include "DownloadsDialog.h"
|
||||
#include "api__ml_downloads.h"
|
||||
#include "api/service/waServiceFactory.h"
|
||||
#include "../../..\Components\wac_network\wac_network_http_receiver_api.h"
|
||||
|
||||
|
||||
class DownloadViewCallback : public ifc_downloadManagerCallback
|
||||
{
|
||||
public:
|
||||
DownloadViewCallback();
|
||||
|
||||
void OnInit( DownloadToken token );
|
||||
void OnConnect( 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 );
|
||||
|
||||
size_t AddRef();
|
||||
size_t Release();
|
||||
|
||||
private: // private destructor so no one accidentally calls delete directly on this reference counted object
|
||||
~DownloadViewCallback();
|
||||
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
|
||||
private:
|
||||
std::atomic<std::size_t> _ref_count = 1;
|
||||
};
|
||||
|
Reference in New Issue
Block a user