diff -r a32b19fb291e -r 5b14749788d7 messagingapp/msgui/appengine/inc/conversationsmodel.h --- a/messagingapp/msgui/appengine/inc/conversationsmodel.h Thu Jun 17 09:57:06 2010 +0100 +++ b/messagingapp/msgui/appengine/inc/conversationsmodel.h Thu Jul 22 16:32:06 2010 +0100 @@ -23,6 +23,8 @@ #include #include #include +#include +#include // FORWARD DECLARATIONS class CCsConversationEntry; @@ -83,6 +85,29 @@ */ RSqlDatabase& getDBHandle(TBool& isOpen); + /* + * Clears the pixmap cache & model + */ + void clearModel(); + + void emitConversationViewEmpty(); + +signals: + + /* + * Signal emitted to retrieve the pixmap icon + */ + void retrievePreviewIcon(int msgId, QString& filepath) const; + + void conversationViewEmpty(); + +private slots: + + /* + * Slot which handles retrievePreviewIcon signal + */ + void updatePreviewIcon(int msgId, QString& filePath); + private: /** @@ -123,6 +148,31 @@ void handleBioMessages(QStandardItem& item, const CCsConversationEntry& entry); + /** + * Populates preview icon into the previewicon cache + * @param pixmap, QPixmap + * @param filePath, filepath to be used if icon is not in Db + * @param msgId, key to pixmap in previewicon cache + * @param inDb, indicates if icon was available in Db (or) not + */ + void setPreviewIcon(QPixmap& pixmap, QString& filePath, int msgId, + bool inDb); + + /** + * Get the preview icon item if available in pixmap cache / create + * and return the preview icon + * @param msgId, key to pixmap in previewicon cache + * @param filePath, filepath to be used if icon is not in cache + */ + HbIcon* getPreviewIconItem(int msgId, QString& filepath) const; + + /** + * Check if a MMS is forwardable or not + * @param messageId, message id + * @return true/false + */ + bool validateMsgForForward(qint32 messageId); + private: /** @@ -158,6 +208,11 @@ * DB open. */ TBool iSqlDbOpen; + + /* + * preview-icon cache + */ + QCache previewIconCache; }; #endif // CONVERSATIONS_MODEL_H