code warnings cleaned
[qtmeetings] / src / BusinessLogic / Engine.h
index fbe91dd..39ba221 100644 (file)
@@ -41,7 +41,7 @@ public:
 
 signals:
 
-       void meetingDetailsFetched( Meeting *aDetailedMeeting );        
+       void roomStatusChanged( Room::Status aStatus, QTime aUntil );
 
 private slots:
        //! Slot. Closes the application.
@@ -69,12 +69,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
@@ -122,8 +116,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;
@@ -146,22 +153,14 @@ private:
         * \return Index of the meeting if found; otherwise, -1.
         */
        int indexOfMeetingAfter( Room *aRoom, QDateTime aAfter );
-       //! Indicates if the QList contains the Meeting or not.
-       /*!
-        * Indicates if the QList contains the Meeting or not.
-        * \param aList List of meetings.
-        * \param aMeeting The meeting which is seeked in the list for.
-        * \return True if contains; otherwise, false.
-        */
-       static bool isMeetingInList( const QList<Meeting*> &aList, const Meeting *aMeeting );
        //! 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
@@ -194,22 +193,28 @@ private:
         * packages are connected here.
         */
        void connectSignals();
+       
+       bool isMeetingInList(const QList<Meeting*> &aList, const Meeting *aMeeting);
 
 private:
        static QTime endOfTheDay;
-
-       WindowManager *iWindowManager;
        
        QTimer *iIdleTimeCounter;
        Clock *iClock;
+       QDate iCurrentDate;
        Configuration *iConfiguration;
        CommunicationManager *iCommunication;
+       WindowManager *iWindowManager;
        DeviceManager *iDevice;
        UIManager *iUIManager;
 
        QTimer *iAutoRefresh;
 
        QList<Meeting*> iMeetings;
+       
+       Room *iCurrentRoom;
+       bool iCommunicationFailed;
+       bool iCurrentWeekFetched;
 };
 
 #endif /*ENGINE_H_*/