44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "global.h"
|
|
//#include "contclasses.h"
|
|
|
|
class EndpointHandler;
|
|
class Session;
|
|
class SessionStateCallback;
|
|
|
|
struct SessionVolumeInfo {
|
|
//SessionVolumeInfo(bool muted, float mainVolume);
|
|
bool muted;
|
|
float mainVolume;
|
|
NGuid caller;
|
|
std::atomic<bool> isNameChanged = false;
|
|
//size_t channels;
|
|
//std::vector<float> channelVolumes;
|
|
};
|
|
|
|
class SessionHandler {
|
|
public:
|
|
SessionHandler(EndpointHandler* eph, Session* session, size_t idx);
|
|
void setVolume(NGuid guid, int channel, int value);
|
|
float getVolume(int channel);
|
|
void setMute(NGuid guid, bool muted);
|
|
bool getMute();
|
|
void setFrontIndex(uint64_t frontIdx);
|
|
SessionState getState();
|
|
void setState(SessionState state);
|
|
uint64_t getFrontIndex();
|
|
std::wstring getName();
|
|
float getPeakVolume();
|
|
void setName(std::wstring newName);
|
|
void reviseSessionShowing(SessionState state);
|
|
SessionVolumeInfo* getVolumeInfo();
|
|
~SessionHandler();
|
|
private:
|
|
SessionVolumeInfo svi;
|
|
EndpointHandler* eph;
|
|
Session* session;
|
|
SessionStateCallback* ssc;
|
|
size_t idx;
|
|
uint64_t frontIdx = INT_MAX;
|
|
};
|