Refactored program structure
This commit is contained in:
parent
e43e4c0569
commit
80685f1a21
10 changed files with 140 additions and 96 deletions
|
|
@ -1,27 +1,36 @@
|
|||
#pragma once
|
||||
|
||||
#include "backlasses.h"
|
||||
class Endpoint;
|
||||
class EndpointCallback;
|
||||
class Overseer;
|
||||
|
||||
struct NGuid {
|
||||
uint32_t data1;
|
||||
uint16_t data2;
|
||||
uint16_t data3;
|
||||
unsigned char data4[8];
|
||||
};
|
||||
|
||||
class EndpointHandler {
|
||||
|
||||
public:
|
||||
EndpointHandler(Endpoint *ept);
|
||||
EndpointHandler(uint64_t idx);
|
||||
//TODO: get();
|
||||
Endpoint *ep;
|
||||
EndpointCallback *epc;
|
||||
QString epName;
|
||||
//std::wstring epName;
|
||||
|
||||
void setIndex(uint64_t idx);
|
||||
uint64_t getIndex();
|
||||
void setVolume(int channel, float volume);
|
||||
|
||||
//todo qstrin????? idiota
|
||||
QString getName();
|
||||
std::wstring getName();
|
||||
float getVolume(int channel);
|
||||
bool getMute();
|
||||
|
||||
void setValue(int channel, int value);
|
||||
void setMute();
|
||||
void setMute();
|
||||
~EndpointHandler();
|
||||
private:
|
||||
uint64_t idx;
|
||||
//QSlider *slidy;
|
||||
|
|
@ -37,18 +46,16 @@ class OverseerHandler {
|
|||
public:
|
||||
//OverseerHandler();
|
||||
void setEndpointHandlers(std::vector<EndpointHandler*> ews);
|
||||
std::vector<EndpointHandler*>* getEndpointHandlers();
|
||||
std::vector<EndpointHandler*> getEndpointHandlers();
|
||||
std::vector<Endpoint*> getPlaybackEndpoints();
|
||||
uint64_t getPlaybackEndpointsCount();
|
||||
void parseExternalEndpointCallback(EndpointCallback *epc, PAUDIO_VOLUME_NOTIFICATION_DATA pNotify);
|
||||
void reloadEndpointHandlers();
|
||||
|
||||
//void parseExternalEndpointCallback(EndpointCallback *epc, PAUDIO_VOLUME_NOTIFICATION_DATA pNotify);
|
||||
//static Overseer* getOverseer();
|
||||
|
||||
private:
|
||||
static Overseer os;
|
||||
std::vector<EndpointHandler*> endpointHandlers;
|
||||
//QSlider *slidy;
|
||||
|
||||
//public slots:
|
||||
//void setValue(int value);
|
||||
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue