32 lines
584 B
C++
32 lines
584 B
C++
#ifndef UTIL_RECORDERMUTEX_H
|
|
#define UTIL_RECORDERMUTEX_H
|
|
|
|
#include <mutex>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
|
|
namespace CameraRecorder {
|
|
namespace Util {
|
|
|
|
class RecorderMutex
|
|
{
|
|
public:
|
|
RecorderMutex();
|
|
|
|
void RegisterRecording(const std::string& ipAddress);
|
|
void UnregisterRecording(const std::string& ipAddress);
|
|
bool IsRecording(const std::string& ipAddress);
|
|
|
|
private:
|
|
std::mutex m_mutex;
|
|
std::vector<std::string> m_activeRecordings;
|
|
};
|
|
|
|
typedef RecorderMutex* const RecorderMutexPointer;
|
|
|
|
} // namespace Util
|
|
} // namespace CameraRecorder
|
|
|
|
#endif // UTIL_RECORDERMUTEX_H
|