#ifndef CTRL_H
#define CTRL_H
#include <QDBusInterface>
#include <QDBusReply>
#include <QDebug>
#include <QObject>
#include <QGSettings/QGSettings>
#include <ukui-log4qt.h>

// 音视频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"

//日历session dbus
#define SESSION_DBUS_NAME_CALENDAR "org.ukui.calendar.Notifications"
#define SESSION_DBUS_PATH_CALENDAR "/org/ukui/calendar/Notifications"
#define SESSION_DBUS_INTERFACE_CALENDAR "org.ukui.calendar.Notifications"

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;
    QDBusInterface *m_scheduleInterface = nullptr;
    QStringList m_screenNameList;

    int m_scheduleDay;
    int m_scheduleMonth;
    int m_scheduleYear;

    int m_TodoListDay;
    int m_TodoListMonth;
    int m_TodoListYear;
};

#endif  // CTRL_H
