Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/Plugins/Library/ml_downloads/DownloadViewCallback.h

38 lines
909 B
C
Raw Normal View History

2024-09-24 12:54:57 +00:00
#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;
};