email/imum/Mtms/Inc/Imap4MtmUiData.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2006 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 *       IMAP4 MTM Ui data layer base API
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __IMAP4MTMUIDATA_H__
       
    20 #define __IMAP4MTMUIDATA_H__
       
    21 
       
    22 #include <msvstd.h>
       
    23 #include <mtudcbas.h>
       
    24 
       
    25 class TAknsItemID;
       
    26 /**
       
    27 * CImap4MtmUiData - IMAP4 MTM Ui data layer base API
       
    28 */
       
    29 class CImap4MtmUiData : public CBaseMtmUiData
       
    30     {
       
    31     public:
       
    32 
       
    33         /**
       
    34         *
       
    35         */
       
    36         static CImap4MtmUiData* NewL(CRegisteredMtmDll& aRegisteredDll);
       
    37 
       
    38         /**
       
    39         * Destructor
       
    40         */
       
    41         virtual ~CImap4MtmUiData();
       
    42 
       
    43     private:
       
    44 
       
    45         /**
       
    46         * C++ constructor
       
    47         */
       
    48         CImap4MtmUiData(CRegisteredMtmDll& aRegisteredDll);
       
    49 
       
    50         /**
       
    51         * Symbian OS constructor
       
    52         */
       
    53         void ConstructL();
       
    54 
       
    55         /**
       
    56         * From CBaseMtmUiData
       
    57         * returns 0 if operation *IS* supported,
       
    58         * otherwise R_EIK_TBUF_NOT_AVAILABLE
       
    59         */
       
    60         virtual TInt OperationSupportedL(
       
    61             TInt aOperationId,
       
    62             const TMsvEntry& aContext) const;
       
    63 
       
    64         /**
       
    65         * From CBaseMtmUiData
       
    66         */
       
    67         virtual TInt QueryCapability(TUid aCapability, TInt& aResponse) const;
       
    68 
       
    69         /**
       
    70         * From CBaseMtmUiData
       
    71         * service: set aStateFlags & EMtudEntryStateOpen if service includes
       
    72         *   unread messages, otherwise aStateFlags should be 0
       
    73         * @return array of two bitmaps: first icon and second mask for the icon
       
    74         */
       
    75         virtual const CBitmapArray& ContextIcon(
       
    76             const TMsvEntry& aContext,
       
    77             TInt aStateFlags) const;
       
    78 
       
    79         /**
       
    80         * From CBaseMtmUiData
       
    81         * @param aReasonResourceId set to 0 if can do operation,
       
    82         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
    83         * @return ETrue if can do operation, EFalse otherwise
       
    84         */
       
    85         virtual TBool CanCreateEntryL(
       
    86             const TMsvEntry& aParent,
       
    87             TMsvEntry& aNewEntry,
       
    88             TInt& aReasonResourceId) const;
       
    89 
       
    90         /**
       
    91         * From CBaseMtmUiData
       
    92         * @param aReasonResourceId set to 0 if can do operation,
       
    93         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
    94         * @return ETrue if can do operation, EFalse otherwise
       
    95         */
       
    96         virtual TBool CanReplyToEntryL(
       
    97             const TMsvEntry& aContext,
       
    98             TInt& aReasonResourceId) const;
       
    99 
       
   100         /**
       
   101         * From CBaseMtmUiData
       
   102         * @param aReasonResourceId set to 0 if can do operation,
       
   103         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
   104         * @return ETrue if can do operation, EFalse otherwise
       
   105         */
       
   106         virtual TBool CanForwardEntryL(
       
   107             const TMsvEntry& aContext,
       
   108             TInt& aReasonResourceId) const;
       
   109 
       
   110         /**
       
   111         * From CBaseMtmUiData
       
   112         * @param aReasonResourceId set to 0 if can do operation,
       
   113         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
   114         * @return ETrue if can do operation, EFalse otherwise
       
   115         */
       
   116         virtual TBool CanEditEntryL(
       
   117             const TMsvEntry& aContext,
       
   118             TInt& aReasonResourceId) const;
       
   119 
       
   120         /**
       
   121         * From CBaseMtmUiData
       
   122         * @param aReasonResourceId set to 0 if can do operation,
       
   123         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
   124         * @return ETrue if can do operation, EFalse otherwise
       
   125         */
       
   126         virtual TBool CanViewEntryL(
       
   127             const TMsvEntry& aContext,
       
   128             TInt& aReasonResourceId) const;
       
   129 
       
   130         /**
       
   131         * From CBaseMtmUiData
       
   132         * @param aReasonResourceId set to 0 if can do operation,
       
   133         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
   134         * @return ETrue if can do operation, EFalse otherwise
       
   135         */
       
   136         virtual TBool CanOpenEntryL(
       
   137             const TMsvEntry& aContext,
       
   138             TInt& aReasonResourceId) const;
       
   139 
       
   140         /**
       
   141         * From CBaseMtmUiData
       
   142         * @param aReasonResourceId set to 0 if can do operation,
       
   143         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
   144         * @return ETrue if can do operation, EFalse otherwise
       
   145         */
       
   146         virtual TBool CanCloseEntryL(
       
   147             const TMsvEntry& aContext,
       
   148             TInt& aReasonResourceId) const;
       
   149 
       
   150         /**
       
   151         * From CBaseMtmUiData
       
   152         * @param aReasonResourceId set to 0 if can do operation,
       
   153         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
   154         * @return ETrue if can do operation, EFalse otherwise
       
   155         */
       
   156         virtual TBool CanDeleteFromEntryL(
       
   157             const TMsvEntry& aContext,
       
   158             TInt& aReasonResourceId) const;
       
   159 
       
   160         /**
       
   161         * From CBaseMtmUiData
       
   162         * @param aReasonResourceId set to 0 if can do operation,
       
   163         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
   164         * @return ETrue if can do operation, EFalse otherwise
       
   165         */
       
   166         virtual TBool CanUnDeleteFromEntryL(
       
   167             const TMsvEntry& aContext,
       
   168             TInt& aReasonResourceId) const;
       
   169 
       
   170         /**
       
   171         * From CBaseMtmUiData
       
   172         * @param aReasonResourceId set to 0 if can do operation,
       
   173         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
   174         * @return ETrue if can do operation, EFalse otherwise
       
   175         */
       
   176         virtual TBool CanCopyMoveToEntryL(
       
   177             const TMsvEntry& aContext,
       
   178             TInt& aReasonResourceId) const;
       
   179 
       
   180         /**
       
   181         * From CBaseMtmUiData
       
   182         * @param aReasonResourceId set to 0 if can do operation,
       
   183         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
   184         * @return ETrue if can do operation, EFalse otherwise
       
   185         */
       
   186         virtual TBool CanCopyMoveFromEntryL(
       
   187             const TMsvEntry& aContext,
       
   188             TInt& aReasonResourceId) const;
       
   189 
       
   190         /**
       
   191         * From CBaseMtmUiData
       
   192         * @param aReasonResourceId set to 0 if can do operation,
       
   193         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
   194         * @return ETrue if can do operation, EFalse otherwise
       
   195         */
       
   196         virtual TBool CanDeleteServiceL(
       
   197             const TMsvEntry& aService,
       
   198             TInt& aReasonResourceId) const;
       
   199 
       
   200         /**
       
   201         * From CBaseMtmUiData
       
   202         * @param aReasonResourceId set to 0 if can do operation,
       
   203         *    otherwise R_EIK_TBUF_NOT_AVAILABLE
       
   204         * @return ETrue if can do operation, EFalse otherwise
       
   205         */
       
   206         virtual TBool CanCancelL(
       
   207             const TMsvEntry& aContext,
       
   208             TInt& aReasonResourceId) const;
       
   209 
       
   210         /**
       
   211         * From CBaseMtmUiData
       
   212         */
       
   213         virtual HBufC* StatusTextL(const TMsvEntry& aContext) const;
       
   214 
       
   215         /**
       
   216         * From CBaseMtmUiData
       
   217         */
       
   218         virtual void PopulateArraysL();
       
   219 
       
   220         /**
       
   221         * From CBaseMtmUiData
       
   222         */
       
   223         virtual void GetResourceFileName(TFileName& aFileName) const;
       
   224 
       
   225         /**
       
   226         * Checks that entry is imap4 type
       
   227         */
       
   228         TBool CheckEntry(const TMsvEntry& aContext) const;
       
   229 
       
   230         /**
       
   231         *
       
   232         */
       
   233         void CreateSkinnedBitmapsL( TInt aNumZoomStates );
       
   234 
       
   235     private:
       
   236         CBitmapArray* iLastResortIcon;
       
   237 
       
   238         enum TIconArrayOrder
       
   239             {
       
   240             EImumPropMceRemoteSub = 0,
       
   241             EImumPropMceRemoteNewSub = 2,
       
   242             EImumPropMceMailFetReaDel = 4,
       
   243             EImumPropMceMailFetRead = 6,
       
   244             EImumPropMceMailFetUnread = 8,
       
   245             EImumPropMceMailUnfetRead = 10,
       
   246             EImumPropMceMailUnfetUnread = 12,
       
   247             EImumPropFolderSmall = 14,
       
   248             EImumPropFolderSubs = 16,
       
   249             EImumPropFolderSubsNew = 18,
       
   250             EImumPropFolderSubSmall = 20,
       
   251             EImumPropFolderSubSubs = 22,
       
   252             EImumPropFolderSubSubsNew = 24,
       
   253             EImumPropFolderUnsubsNew = 26,
       
   254             EImumPropFolderSubUnsubsNew = 28
       
   255             };
       
   256 
       
   257     };
       
   258 
       
   259 #endif // __IMAP4MTMUIDATA_H__