User interface update
[qtmeetings] / src / BusinessLogic / Engine.h
index b6bd8dd..87625a3 100644 (file)
@@ -17,10 +17,8 @@ class UIManager;
 
 //! BusinessLogic class. Contains all the business logic of the application.
 /*!
- * BusinessLogic class. Contains all the business logic of the application. This class handles
- * the logic of the application according received calls to the slots. This class also maintains
- * the instances of managers, timers and its own set of meeting list. The managers handles
- * their tasks in more detailed manner.
+ * BusinessLogic class. Contains all the business logic of the application. It is responsible
+ * for connecting user interface to lower application layers (IO).
  */
 class Engine : public QObject
 {
@@ -118,10 +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;
@@ -147,11 +156,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
@@ -194,6 +203,7 @@ private:
        
        QTimer *iIdleTimeCounter;
        Clock *iClock;
+       QDate iCurrentDate;
        Configuration *iConfiguration;
        CommunicationManager *iCommunication;
        DeviceManager *iDevice;
@@ -204,6 +214,8 @@ private:
        QList<Meeting*> iMeetings;
        
        Room *iCurrentRoom;
+       bool iCommunicationFailed;
+       bool iCurrentWeekFetched;
 };
 
 #endif /*ENGINE_H_*/