#ifndef VOICECALLMANAGER_H #define VOICECALLMANAGER_H #include "toqmanager.h" struct ProfileValue { QString key; QString val; QString type; }; class VoiceCallManager : public QObject, public ToqManager::EndpointHandler { Q_OBJECT public: explicit VoiceCallManager(ToqManager *toq); void handleMessage(const ToqConnection::Message &msg) Q_DECL_OVERRIDE; static void setSilentMode(bool silent); private: void handleGetPhoneStatusMessage(const ToqConnection::Message &msg); static QString getCurrentProfile(); static void setProfile(const QString &name); void sendPhoneStatusMessage(); QJsonObject buildPhoneStatus(); private slots: void handleProfileChanged(bool changed, bool active, const QString &profile); private: ToqManager *_toq; }; class QDBusArgument; QDBusArgument &operator<<(QDBusArgument &argument, const ProfileValue &value); const QDBusArgument &operator>>(const QDBusArgument &argument, ProfileValue &value); Q_DECLARE_METATYPE(ProfileValue) Q_DECLARE_METATYPE(QList) #endif // VOICECALLMANAGER_H