X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2FBusinessLogic%2FEngine.h;h=65690a1a9e9bec61ef4b8d34260584f609efb5ba;hb=51d64b3d9f4cacc447c74e5811e692fbe9b4137f;hp=99992dd71e78c51df2ffd2fa3689edaa03a2f0df;hpb=bd153701307613c96e7bdf070cf32b0cbc6ae834;p=qtmeetings diff --git a/src/BusinessLogic/Engine.h b/src/BusinessLogic/Engine.h index 99992dd..65690a1 100644 --- a/src/BusinessLogic/Engine.h +++ b/src/BusinessLogic/Engine.h @@ -39,8 +39,14 @@ public: */ Room* defaultRoom(); + bool connected(); + QTime lastUpdated(); + QString errorMessage(); + signals: + void roomStatusChanged( Room::Status aStatus, QTime aUntil ); + private slots: //! Slot. Closes the application. /*! @@ -67,12 +73,6 @@ private slots: * \param aAddInfo Possible addition info. */ void errorHandler( int aCode, const QString &aAddInfo = "" ); - //! Slot. Fetches meetings from the server. - /*! - * Slot. Fetches meetings from the server. Parameters are hard coded: the meetings of the default - * room from current and +/- 2 weeks are fetched. - */ -// void fetchMeetings(); //! Slot. Saves fetched meetings to the current instance's local storage. /*! * Slot. Saves fetched meetings to the current instance's local storage. Meetings are soted in a @@ -120,10 +120,21 @@ private slots: void stopIdleTimeCounter(); void startIdleTimeCounter(); - void changeDeviceMode( bool aChange ); + void changeDeviceMode(); void currentRoomChanged( Room *aRoom ); + void tick( QDateTime aCurrentDateTime ); + + /** + * Updates the current rooms info. + */ + void updateRoomInfo(); + /** + * + */ + void configurationChanged(); + private: // Make the UIManager as friendly class so it can connect to private slots. friend class UIManager; @@ -149,11 +160,11 @@ private: //! Slot. Fetches meetings from the server. /*! * Slot. Fetches meetings from the server, exact parameters are specified in the parameter list. - * \param aFrom Time from when the meetings need to be fetched. - * \param aUntil Time until when the meetings need to be fetched. + * \param aWeek Week for which the meetings need to be fetched. + * \param aYear Year for which the meetings need to be fetched. * \param aIn The room which meetings need to be fetched. */ - void fetchMeetings( const QDateTime &aFrom, const QDateTime &aUntil, const Room *aIn ); + void fetchMeetings( const int aWeek, const int aYear, const Room *aIn ); //! Initialize configuration package. /*! * This method initializes configuration classes and @@ -191,13 +202,13 @@ private: private: static QTime endOfTheDay; - - WindowManager *iWindowManager; QTimer *iIdleTimeCounter; Clock *iClock; + QDate iCurrentDate; Configuration *iConfiguration; CommunicationManager *iCommunication; + WindowManager *iWindowManager; DeviceManager *iDevice; UIManager *iUIManager; @@ -206,6 +217,9 @@ private: QList iMeetings; Room *iCurrentRoom; + bool iCommunicationFailed; + QString iCommunicationError; + QTime iLastCommunication; }; #endif /*ENGINE_H_*/