mobilemessaging/mmsui/notmtminc/NotMtmUiData.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *       CNotMtmUiData - UI DATA part of the Notification
       
    16 *       MTM type to Symbian OS Messaging
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef NOTMTMUIDATA_H
       
    23 #define NOTMTMUIDATA_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include <mtudcbas.h>
       
    27 #include <MtmExtendedCapabilities.hrh>
       
    28 
       
    29 #include "NotUi.hrh"
       
    30 
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * CNotMtmUiData - UI DATA part of the Notification
       
    36  * MTM type to Symbian OS Messaging
       
    37  *
       
    38  * @since 0.9
       
    39  */
       
    40 class CNotMtmUiData :public CBaseMtmUiData
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43         
       
    44         /**
       
    45          * Symbian OS constructor
       
    46          * @param aRegisteredMtmDll registry dll
       
    47          * @return a new MMS MTM UI object.
       
    48          */
       
    49         static CNotMtmUiData* NewL(CRegisteredMtmDll& aRegisteredDll);
       
    50         
       
    51         /**
       
    52          * Destructor.
       
    53          */
       
    54         ~CNotMtmUiData();
       
    55 
       
    56     public: // Functions from base classes
       
    57 
       
    58         /**
       
    59          * From CBaseMtmUiData - can the given operation be performed for the given entry
       
    60          */
       
    61         TInt OperationSupportedL(TInt aOperationId, const TMsvEntry& aContext) const;
       
    62         
       
    63         /**
       
    64          * From CBaseMtmUiData Capabilities - defines what we can do
       
    65          * @param aFunctionId asked capability
       
    66          * @param aResponse response depends on the capability
       
    67          * @return KErrNone if supported, otherwise KErrNotSupported
       
    68          */
       
    69         TInt QueryCapability(TUid aFunctionId, TInt& aResponse) const;
       
    70 
       
    71         /**
       
    72          * From CBaseMtmUiData
       
    73          */
       
    74         HBufC* StatusTextL(const TMsvEntry& aContext) const;
       
    75 
       
    76         /**
       
    77          * From CBaseMtmUiData - not supported in Series 60
       
    78          */
       
    79         TBool CanCreateEntryL(const TMsvEntry& aParent, 
       
    80             TMsvEntry& aNewEntry, 
       
    81             TInt& aReasonResourceId) const;
       
    82 
       
    83         /**
       
    84          * From CBaseMtmUiData
       
    85          * Check whether it is ok to reply to a message
       
    86          */
       
    87         TBool CanReplyToEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const;
       
    88 
       
    89         /**
       
    90          * From CBaseMtmUiData - not supported in Series 60
       
    91          */
       
    92         TBool CanForwardEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const;   
       
    93 
       
    94         /**
       
    95          * From CBaseMtmUiData - not supported in Series 60
       
    96          */
       
    97         TBool CanEditEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const;
       
    98 
       
    99         /**
       
   100          * From CBaseMtmUiData - not supported in Series 60
       
   101          */
       
   102         TBool CanViewEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const;
       
   103 
       
   104         /**
       
   105          * From CBaseMtmUiData - not supported in Series 60
       
   106          */
       
   107         TBool CanOpenEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const;
       
   108 
       
   109         /**
       
   110          * From CBaseMtmUiData - not supported in Series 60
       
   111          */
       
   112         TBool CanCloseEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const;
       
   113 
       
   114         /**
       
   115          * From CBaseMtmUiData - not supported in Series 60
       
   116          */
       
   117         TBool CanDeleteFromEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const;
       
   118 
       
   119         /**
       
   120          * From CBaseMtmUiData - not supported in Series 60
       
   121          */
       
   122         TBool CanDeleteServiceL(const TMsvEntry& aService, TInt& aReasonResourceId) const;
       
   123 
       
   124         /**
       
   125          * From CBaseMtmUiData - not supported in Series 60
       
   126          */
       
   127         TBool CanCopyMoveToEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const;
       
   128 
       
   129         /**
       
   130          * From CBaseMtmUiData - not supported in Series 60
       
   131          */
       
   132         TBool CanCopyMoveFromEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const;  
       
   133 
       
   134         /**
       
   135          * From CBaseMtmUiData - not supported in Series 60
       
   136          */
       
   137         TBool CanCancelL(const TMsvEntry& aContext, TInt& aReasonResourceId) const;
       
   138 
       
   139         /**
       
   140          * From CBaseMtmUiData Icons for the entry having context.
       
   141          * @param aContext entry in question
       
   142          * @param aStateFlags
       
   143          * @return array of bitmaps
       
   144          */
       
   145         const CBitmapArray& ContextIcon(const TMsvEntry& aContext, TInt aStateFlags) const;
       
   146 
       
   147     private:
       
   148 
       
   149          enum TNotUiDataFlags
       
   150             {
       
   151             // set by mms local variation bit KMmsFeatureIdNotificationForward
       
   152             EForwardSupported                               = 0x0001,
       
   153 
       
   154             // KFeatureIdMmsNonDestructiveForward has been deprecated
       
   155             // Check of TMsvEntry::iMtmData2 & KMmsStoredInMMBox replaces it. 
       
   156             // MMSEngine sets KMmsStoredInMMBox for received notifications
       
   157             // EMultipleRetrieveAndForwardSupported            = 0x0002,
       
   158 
       
   159             // set by mms local variation bit KMmsFeatureIdDeleteOptions
       
   160             EDeleteOptionsSupported                         = 0x0002,
       
   161 
       
   162             // feature flag KFeatureIdMMSNotificationsView. Notifications view in mce
       
   163             ENotificationsViewInMce                         = 0x0004
       
   164             };
       
   165 
       
   166         /**
       
   167          * By default Symbian OS constructor is private.
       
   168          */
       
   169         void ConstructL();
       
   170 
       
   171         /**
       
   172          * C++ constructor
       
   173          * @param aRegisteredMtmDll registry dll
       
   174          */
       
   175         CNotMtmUiData(CRegisteredMtmDll& aRegisteredDll);
       
   176 
       
   177         /**
       
   178          * Populate icon array
       
   179          */
       
   180         void PopulateArraysL();
       
   181 
       
   182         /**
       
   183          * Gives the resource file
       
   184          * @param storage for the filename.
       
   185          */
       
   186         void GetResourceFileName(TFileName& aFileName) const;
       
   187 
       
   188         void CreateSkinnedBitmapsL(
       
   189             const TDesC& aBitmapFile,
       
   190             TInt aStartBitmap,
       
   191             TInt aEndBitmap );
       
   192 
       
   193     private: // new
       
   194 
       
   195         /**
       
   196         * MessageStatus
       
   197         * Returns the current status of the message
       
   198         */
       
   199         TNotUiMsgStatus MsgStatus( const TMsvEntry& aContext ) const;
       
   200 
       
   201         /**
       
   202         * OperationOngoing returns status whether operation is going on
       
   203         */
       
   204         TBool OperationOngoing( const TMsvEntry& aEntry ) const;
       
   205 
       
   206         /**
       
   207         * OperationFinished returns status whether operation has finished
       
   208         * successfully or unsuccessfully
       
   209         */
       
   210         TBool OperationFinished( const TMsvEntry& aEntry ) const;
       
   211 
       
   212     private: // data
       
   213 
       
   214         TUint iNotUiDataFlags;
       
   215     };
       
   216 
       
   217 #endif      // NOTMTMUIDATA_H
       
   218             
       
   219 // End of File