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/devices/discoveryMonitor.h
2024-09-24 14:54:57 +02:00

43 lines
769 B
C++

#ifndef _NULLSOFT_WINAMP_DEVICES_DISCOVERY_MONITOR_HEADER
#define _NULLSOFT_WINAMP_DEVICES_DISCOVERY_MONITOR_HEADER
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
#include "ifc_deviceprovider.h"
#include <vector>
class DiscoveryMonitor
{
public:
DiscoveryMonitor();
~DiscoveryMonitor();
public:
BOOL Register(ifc_deviceprovider *provider);
BOOL Unregister(ifc_deviceprovider *provider);
BOOL IsActive();
BOOL Reset();
protected:
void Lock();
void Unlock();
private:
typedef struct ActiveDiscovery
{
intptr_t providerId;
size_t ref;
} ActiveDiscovery;
typedef std::vector<ActiveDiscovery> ActivityList;
private:
CRITICAL_SECTION lock;
ActivityList activityList;
};
#endif // _NULLSOFT_WINAMP_DEVICES_DISCOVERY_MONITOR_HEADER