|
| 1 | +/******************************************************************************/ |
| 2 | +// File: SourceInterface.h |
| 3 | +/******************************************************************************/ |
| 4 | + |
| 5 | +#ifndef _SOURCEINTERFACE_H_ |
| 6 | +#define _SOURCEINTERFACE_H_ |
| 7 | +#include <functional> |
| 8 | +using namespace std::placeholders; |
| 9 | + |
| 10 | +class SourceInterface : public QObject |
| 11 | +{ |
| 12 | + Q_OBJECT |
| 13 | + |
| 14 | +public: |
| 15 | + SourceInterface(); |
| 16 | + ~SourceInterface(); |
| 17 | + |
| 18 | + void Init(); |
| 19 | + void SendSetBass(QVariant data); |
| 20 | + void SendSetMidRange(QVariant data); |
| 21 | + void SendSetTreble(QVariant data); |
| 22 | + void SendSetBalance(QVariant data); |
| 23 | + void SendSetFade(QVariant data); |
| 24 | + void SendsetSCV(QVariant data); |
| 25 | + |
| 26 | + void ReceiveTREBLE(int16_t data); |
| 27 | + void ReceiveMIDRANGE(int16_t data); |
| 28 | + void ReceiveBASS(int16_t data); |
| 29 | + void ReceiveBALANCE(int16_t data); |
| 30 | + void ReceiveFADE(int16_t data); |
| 31 | + void ReceiveSCV(uint16_t data); |
| 32 | + |
| 33 | + void SendRequestInformationSource(); |
| 34 | + void SendReleaseInformationSource(); |
| 35 | + void SendSetEntertainmentSource(); |
| 36 | + void ReceiveActiveAudioSource(audioPresCtrlTypes::SourceId sourceId); |
| 37 | + void ReceiveEntSourceList(audioPresCtrlTypes::EntSourceList sourceList); |
| 38 | + |
| 39 | +public: |
| 40 | + signals: |
| 41 | + void ResourceUpdate(QString propertyName, QVariant value); |
| 42 | + |
| 43 | +private: |
| 44 | + std::shared_ptr<audioPresCtrlControlsProxy<>> audioControlsProxy; |
| 45 | + std::shared_ptr<audioPresCtrlSettingsProxy<>> audioSettingsProxy; |
| 46 | + |
| 47 | + bool settingsProxyAvailable; |
| 48 | + void statusEventListenerAudioSettings( CommonAPI::AvailabilityStatus status ); |
| 49 | + void setResponse(CommonAPI::CallStatus status, int value); |
| 50 | + |
| 51 | + bool audioControlsAvailable; |
| 52 | + void statusEventListenerAudioControl(CommonAPI::AvailabilityStatus status); |
| 53 | + void SetEntertainmentSrcAsyncCb(const CommonAPI::CallStatus& status, const audioPresCtrlTypes::eAudioPresErrors& error); |
| 54 | + void getActiveEntSrcValueAsyncCb(const CommonAPI::CallStatus& status, uint64_t value); |
| 55 | +}; |
| 56 | + |
| 57 | +#endif /* _SOURCEINTERFACE_H_ */ |
0 commit comments