#ifndef MASTERCTRL_H
#define MASTERCTRL_H

#include "GlobalDefine.h"
#include "DeadboltDevice.h"
#include "AVReceiverDevice.h"
#include "VoipMsSMSClient.h"
#include "SystemTrayManager.h"
#include "SettingsWindow.h"
#include "ProgramSettings.h"
#include "NetworkDevicesMgr.h"
#include "EthernetNetworkServer.h"
#include "ContactRepository.h"
#include "SprinklerMgr.h"
#include "ChaletDevice.h"
//#include "ChaletLoraInterface.h"
#include "LoraNetworkCommIF.h"
#include "HttpServer.h"
#include "IspindelDevice.h"
#include "LoraModuleInterface.h"

//#include "AppIconWidget.h"

class CMasterCtrl : public QObject
{
    Q_OBJECT
public:
    CMasterCtrl();
    ~CMasterCtrl();

    void Start(void);
//    CDeadboltDevice *mDeadBoltDevice;
    CAVReceiverDevice *mAVReceiverDevice;

    CVoipMsSMSClient *mVoipMsSMSClient;
    CSystemTrayManager *mSystemTrayManager;
    CSettingsWindow *mSettingsWindow;
    CProgramSettings mSettingsManager;
    CNetworkDevicesMgr *mNetworkDevicesManager;
    CEthernetNetworkServer *mEthernetNetworkServer;
    CContactRepository *mContactsRepository;
    CSprinklerMgr *mSprinklerManager;

    CChaletDevice *mChaletLoraDevice;
    CChaletDevice *mChaletLTEDevice;
//    CChaletLoraInterface *mChaletLoraInterface;
    CLoraNetworkCommIF *mChaletLoraNetworkCommInterface;
    CLoraModuleInterface *mChaletLoraModuleInterface;
  //  CAppIconWidget mAppWidget;

    CHttpServer mHttpServer;

    CIspindelDevice *mIspindelDevice;




    unsigned int QuitApplicationRequest();
    unsigned int ShowSettingsWindowRequest();
    unsigned int FetchDIDsRequest(QString Username, QString Password);
    unsigned int SaveSettings(CSettings *Settings);

    unsigned int SettingsWindowClosed();

    int NewSMSMessagesArrived(QList<CSMSMessage> NewMessages);

    CContactRepository *GetContactRepository(){return mContactsRepository;}


    //Modules requests...




private:

    CSettings mMasterCtrlSettings;
};

#endif // MASTERCTRL_H
