messagingapp/msgappfw/plugins/previewplugin/inc/ccspreviewpluginhandler.h
changeset 34 84197e66a4bd
parent 27 e4592d119491
child 52 12db4185673b
equal deleted inserted replaced
31:ebfee66fde93 34:84197e66a4bd
    25 #include <thumbnailmanagerobserver.h>
    25 #include <thumbnailmanagerobserver.h>
    26 #include <thumbnaildata.h>
    26 #include <thumbnaildata.h>
    27 #include <sqldb.h>
    27 #include <sqldb.h>
    28 
    28 
    29 //USER INCLUDES
    29 //USER INCLUDES
       
    30 #include <ccsdefs.h>
    30 #include "ccspreviewplugin.h"
    31 #include "ccspreviewplugin.h"
    31 #include "UniDataModel.h"
    32 #include "UniDataModel.h"
    32 
    33 
    33 // FORWARD DECLARATION
    34 // FORWARD DECLARATION
    34 class CCsPlugin;
    35 class CCsPlugin;
    37 class MMsvSessionObserver;
    38 class MMsvSessionObserver;
    38 class CCsConversationEntry;
    39 class CCsConversationEntry;
    39 class CCsPreviewPlugin;
    40 class CCsPreviewPlugin;
    40 class CClientMtmRegistry;
    41 class CClientMtmRegistry;
    41 class CMmsClientMtm;
    42 class CMmsClientMtm;
       
    43 class CUniDataModel;
       
    44 class MMsvAttachmentManager;
       
    45 
       
    46 enum MmsConformanceCheckErrors
       
    47 {
       
    48     EInsertSuccess = 0, EInsertQueryAbort, EInsertNotSupported
       
    49 };
    42 
    50 
    43 /*
    51 /*
    44  * Thumbnail Request Data
    52  * Thumbnail Request Data
    45  */
    53  */
    46 struct ThumbnailRequestData
    54 struct ThumbnailRequestData
   147      * @param aId TThumbnailRequestId
   155      * @param aId TThumbnailRequestId
   148      */
   156      */
   149     void HandleThumbnailReadyL(MThumbnailData& aThumbnail,
   157     void HandleThumbnailReadyL(MThumbnailData& aThumbnail,
   150             TThumbnailRequestId aId);
   158             TThumbnailRequestId aId);
   151 
   159 
       
   160     /**
       
   161      * Validates if message can be forwarded
       
   162      * The validation checks include slide count check,MMS size check and
       
   163      * media conformance checks and this fucntion should be called only for mms
       
   164      * @param aUniDataModel, instance of unidatamodel
       
   165      * @return true if message can be forwarded
       
   166      *         false if message cant be forwarded
       
   167      */
       
   168     TBool ValidateMsgForForward(CUniDataModel* aUniDataModel);
       
   169 
       
   170     /**
       
   171      * This shall return the particular slide attachments ids
       
   172      * @param aSlideNum slide count
       
   173      * @param aUniDataModel instance of unidatamodel
       
   174      * @return array of attachment id's
       
   175      */
       
   176     RArray<TMsvAttachmentId>* GetSlideAttachmentIds(
       
   177             TInt aSlideNum,
       
   178             CUniDataModel* aUniDataModel);
       
   179 
       
   180     /**
       
   181      * This shall return list of attachment id's
       
   182      * @param aUniDataModel instance of unidatamodel
       
   183      * @return array of attachment id's
       
   184      */
       
   185     RArray<TMsvAttachmentId>* GetAttachmentIdList(
       
   186             CUniDataModel* aUniDataModel);
       
   187 
       
   188     /**
       
   189      * This shall check the insert mode for the attachment file
       
   190      * @param aFileHandle instance of file handle
       
   191      * @return enum MmsConformanceCheckErrors
       
   192      */
       
   193     TInt CheckModeForInsertL(RFile aFileHandle);
       
   194     
       
   195     /**
       
   196      * Finds the message's processing state
       
   197      * @param aMsgId, message id
       
   198      * @return, TInt from TCsPreviewMsgProcessingState enum
       
   199      */
       
   200     TInt msgProcessingState(TMsvId aMsgId);
       
   201     
       
   202     /**
       
   203      * Sets message under processing to true
       
   204      * @param aMsgId, message id
       
   205      * @param aState, TInt from TCsPreviewMsgProcessingState enum
       
   206      */
       
   207     void setMsgProcessingState(TMsvId aMsgId, TInt aState);
       
   208 
   152 private:
   209 private:
   153     //Data
   210     //Data
   154 
   211 
   155     /**
   212     /**
   156      * MsvServer session object
   213      * MsvServer session object
   196 
   253 
   197     /*
   254     /*
   198      * Sqlite DB Handle
   255      * Sqlite DB Handle
   199      */
   256      */
   200     RSqlDatabase iSqlDb;
   257     RSqlDatabase iSqlDb;
   201     };
   258 
       
   259     /**
       
   260      * Max MMS Size
       
   261     */
       
   262     TInt iMaxMmsSize;
       
   263 
       
   264     /*
       
   265      * Mms creation mode
       
   266      */
       
   267     TInt iCreationMode;
       
   268 
       
   269     /**
       
   270      * Conformance status
       
   271      */
       
   272     TUint32 iConfStatus;
       
   273 
       
   274 };
   202 
   275 
   203 #endif // _C_CS_PREVIEW_PLUGIN_HANDLER_H_
   276 #endif // _C_CS_PREVIEW_PLUGIN_HANDLER_H_