poll merge squash

This commit is contained in:
Hane 2024-02-07 17:20:59 +01:00
commit 40bee90610
21 changed files with 2753 additions and 261 deletions

View file

@ -0,0 +1,42 @@
#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;
//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();
void reviseSessionShowing(SessionState state);
SessionVolumeInfo* getVolumeInfo();
private:
SessionVolumeInfo svi;
EndpointHandler* eph;
Session* session;
SessionStateCallback* ssc;
size_t idx;
uint64_t frontIdx = INT_MAX;
};