diff -r d8ac8e5e4721 -r fc91263aee62 messagingapp/msgservices/msgserviceapp/inc/msgstorehandler.h --- a/messagingapp/msgservices/msgserviceapp/inc/msgstorehandler.h Tue Sep 14 22:54:56 2010 +0530 +++ b/messagingapp/msgservices/msgserviceapp/inc/msgstorehandler.h Fri Sep 17 20:01:45 2010 +0530 @@ -20,7 +20,16 @@ // INCLUDE FILES #include +#include +// FORWARD DECLARATIONS +class CMmsNotificationClientMtm; +class CClientMtmRegistry; + +/** + * Class MsgStoreHandler + * Reads message information from message store. + */ class MsgStoreHandler : public MMsvSessionObserver { public: @@ -34,24 +43,22 @@ */ virtual ~MsgStoreHandler(); -public : /** - * @see MMsvSessionObserver + * Mark message as read + * @param messageId message Id */ - void HandleSessionEventL(TMsvSessionEvent /*aEvent*/, - TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/); - -public: + void markAsRead(int msgId); + /** - * Mark message as read and get the message type - * @param messageId message Id + * Get message's type (msgtype and msgsubtype) info + * @param messageId message Id * @param msgType message type is written to this. - * @param msgType message sub type is written to this. + * @param msgSubType message sub type is written to this. */ - void markAsReadAndGetType(int msgId, - int& msgType, - int& msgSubType); - + void getMsgTypeInfo(int msgId, + int& msgType, + int& msgSubType); + /** * Delete message. * @param msgId id of the message to be deleted. @@ -64,29 +71,128 @@ * @return true if it is a draft message,else false */ bool isDraftMessage(int msgId); + + /** + * Check if the message is locked to avoid viewing + * e.g. Outbox messages should not be opened in viewer + * @param msgId id of the message to be checked. + * @return bool, true if it is locked + */ + bool locked(int msgId); + + /** + * Checks if a message exists or not + * @param msgId, message id + * @return bool, true if message exists + */ + bool exists(int msgId); + + /** + * Sets content to message id + * @param msgId, message id + * @return int, status of setting context to message id + */ + int setNotificationMessageId(int msgId); + + /** + * Seeker method for getting mms notification's subject line + * @return QString, subject of mms notification + */ + QString notificationSubject(); + + /** + * Seeker method for getting mms notification estimated msg size + * @return formatted string for msg size in KB + */ + QString notificationMsgSize(); + /** + * Seeker method for getting mms notification class type + * @return Notification Class type string + */ + QString notificationClass(); + + /** + * Seeker method for message status and error string + * mms notification's download state + * @param [OUT] status, msg status + * @param [OUT] statusStr, localized string of msg status + */ + void notificationStatus(int& status, + QString& statusStr); + + /** + * Seeker method getting expiry info of a notification msg + * @return formatted string of notification's expiry time + */ + QString notificationExpiryDate(); + private: /** + * @see MMsvSessionObserver + */ + void HandleSessionEventL(TMsvSessionEvent /*aEvent*/, + TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/); + + /** * Does all initilaizations */ void InitL(); - + + /** + * Location (parent dir) of the message e.g. Draft, Inbox etc + * @param aMsgId, message id + * @return TMsvId, parent directory of the message + */ + TMsvId MessageLocation( TMsvId aMsgId ) const; + + /** + * Sets content to messageId + * @param messageId, Message Id content + */ + void SetNotificationMessageIdL( TMsvId aMsgId ); + /** - * Extrcats the message type from TMsvEntry - * @param aEntry message entry. - * @param msgType message type is written to this. - * @param msgType message sub type is written to this. + * Get max receive size limit (for MMS) from settings + */ + TInt MaxReceiveSizeLimitL(); + + /** + * Get MMS notification status. + * @param aMsvId MMS notification status. */ - void extractMsgType(const TMsvEntry& aEntry, - int& msgType, - int& msgSubType); - + TCsMmsNotificationMsgState MmsNotificationStatus( TInt aMsvId ); + + /** + * verifys the current operation status + *@param aEntry, TMsvEntry + */ + TBool OperationFinished( const TMsvEntry& aEntry ) const; + + /** + * verifys the current operation status + * @param aEntry, TMsvEntry + */ + TBool OperationOngoing( const TMsvEntry& aEntry ) const; + private: /** * Session * Owned. */ - CMsvSession* iMsvSession; + CMsvSession* iMsvSession; + + /** + * Notification client mtm + * Owned. + */ + CMmsNotificationClientMtm* iNotificationClient; + + /** + * Mtm Registry + * Owned. + */ + CClientMtmRegistry* iMtmReg; }; #endif // __MSG_STORE_HANDLER_H__