messagingapp/msgui/appengine/inc/conversationsengine.h
changeset 37 518b245aa84c
parent 25 84d9eb65b26f
equal deleted inserted replaced
25:84d9eb65b26f 37:518b245aa84c
    19 #define CONVERSATIONS_ENGINE_H
    19 #define CONVERSATIONS_ENGINE_H
    20 
    20 
    21 // INCLUDES
    21 // INCLUDES
    22 #include <QObject>
    22 #include <QObject>
    23 #include <QStandardItemModel>
    23 #include <QStandardItemModel>
       
    24 #include <sqldb.h>
    24 
    25 
    25 #ifdef BUILD_DLL
    26 #ifdef BUILD_DLL
    26 #define CONVERSATIONS_ENGINE_API_EXPORT Q_DECL_EXPORT
    27 #define CONVERSATIONS_ENGINE_API_EXPORT Q_DECL_EXPORT
    27 #else
    28 #else
    28 #define CONVERSATIONS_ENGINE_API_EXPORT Q_DECL_IMPORT
    29 #define CONVERSATIONS_ENGINE_API_EXPORT Q_DECL_IMPORT
   158      * Emits conversationModelUpdated signal
   159      * Emits conversationModelUpdated signal
   159      */ 
   160      */ 
   160     void emitConversationModelUpdated();
   161     void emitConversationModelUpdated();
   161     
   162     
   162     /**
   163     /**
       
   164      * Updates the new conversation id for list view
       
   165      */
       
   166     void emitOpenConversationViewIdUpdate(int newConversationId);
       
   167     
       
   168     void disableRegisterationForCVEvents();
       
   169     
       
   170     /**
   163      * Emits conversationListModelPopulated signal
   171      * Emits conversationListModelPopulated signal
   164      */ 
   172      */ 
   165     void emitConversationListModelPopulated();
   173     void emitConversationListModelPopulated();
   166 
   174 
       
   175     /**
       
   176      * Emits conversationListModelEntryDeleted
       
   177      */
       
   178     void emitConversationListModelEntryDeleted( int conversationId );
       
   179     
   167     /**
   180     /**
   168      *  Starts fetching remaing conversations
   181      *  Starts fetching remaing conversations
   169      */
   182      */
   170     void fetchMoreConversations();
   183     void fetchMoreConversations();
   171 
   184 
   200      * @param msgType message sub type is written to this.
   213      * @param msgType message sub type is written to this.
   201      */
   214      */
   202     void markAsReadAndGetType( qint32 messageId,
   215     void markAsReadAndGetType( qint32 messageId,
   203                                int& msgType,
   216                                int& msgType,
   204                                int& msgSubType);
   217                                int& msgSubType);
       
   218     
       
   219     /*
       
   220      * Get SQL DB handle
       
   221      * @param isOpen, set to true if open, check this before using the handle
       
   222      */
       
   223     RSqlDatabase& getDBHandle(TBool& isOpen);
       
   224     
       
   225     /**
       
   226      * Get the biotype of a message
       
   227      * @param messageId
       
   228      */
       
   229     int getMsgSubType(int messageId);
       
   230     
   205 private:
   231 private:
   206 
   232 
   207     /**
   233     /**
   208      * Constructor
   234      * Constructor
   209      */
   235      */
   227      * ConversationListModelPopulated signal indicating 
   253      * ConversationListModelPopulated signal indicating 
   228      * that the model is ready to be displayed
   254      * that the model is ready to be displayed
   229      */
   255      */
   230     void conversationListModelPopulated();
   256     void conversationListModelPopulated();
   231     
   257     
       
   258 	/** 
       
   259 	 * Signal to indicate the completion of conversation delete
       
   260 	 * operation.
       
   261 	 */
       
   262      void conversationListEntryDeleted( int conversationId );
       
   263 	 
       
   264     /**
       
   265      * Signal to specify the CV model empty now
       
   266      */
       
   267     void conversationViewEmpty();
       
   268     
   232 private:
   269 private:
   233 
   270 
   234     /**
   271     /**
   235      * Conversations Summary Model
   272      * Conversations Summary Model
   236      * Own
   273      * Own