#ifndef CTRL_H
#define CTRL_H
#include <QDBusInterface>
#include <QDBusReply>
#include <QDebug>
#include <QObject>
#include <QGSettings/QGSettings>

// 音视频session dbus
#define SESSION_DBUS_NAME_STR_FIELD "org.ukui.SettingsDaemon"
#define SESSION_DBUS_PLAYER_PATH "/mpris/controller"
#define SESSION_DBUS_PLAYER_INTERFACE "org.ukui.mpris.controller"

// 亮度session dbus
#define SESSION_DBUS_NAME_BRIGHTNESS "org.ukui.SettingsDaemon"
#define SESSION_DBUS_BRIGHTNESS_PATH "/GlobalBrightness"
#define SESSION_DBUS_BRIGHTNESS_INTERFACE "org.ukui.SettingsDaemon.Brightness"

const QString SYSTEM_DBUS_BLE_SERVICE = "com.ukui.bluetooth";
const QString SYSTEM_DBUS_BLE_PATH = "/com/ukui/bluetooth";
const QString SYSTEM_DBUS_BLE_INTERFACE = "com.ukui.bluetooth";

class ctrl : public QObject
{
    Q_OBJECT
public:
    ctrl();
    void controlMprisPlayerDbus(const QString funcName);
    void setBrightness(bool isUp);
    void setDefaultAdapterSwitchStatus(bool power);

private:
    QDBusInterface *m_dbusMprisInterface = nullptr;
    QDBusInterface *m_dbusBrightnessInterface = nullptr;
    QGSettings *m_powerGSettings = nullptr;
    QDBusInterface *m_usdInterface = nullptr;
    QStringList m_screenNameList;
};

#endif  // CTRL_H
