email/imum/Utils/Inc/EmailFeatureUtils.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 *       Static feature handling functions for imum
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __EMAILFEATUREUTILS_H__
       
    21 #define __EMAILFEATUREUTILS_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <muiuflagger.h>        // CMuiuFlags
       
    26 #include <messaginginternalcrkeys.h>
       
    27 #include <bldvariant.hrh>
       
    28 #include <messagingvariant.hrh>
       
    29 
       
    30 // GLOBAL FEATURES
       
    31 // This enumeration contains all the global features as a flag index
       
    32 // that can be used in any of the objects under email. Make sure
       
    33 // that the new features are presented in same order as the indexes
       
    34 // are here in FetchGlobalFeaturesL method.
       
    35 // These flags can be found from
       
    36 // \epoc32\include\oem\bldvariant.hrh
       
    37 enum TIMSGlobalFeatures
       
    38     {
       
    39     // KFeatureIdAlwaysOnLineEmail
       
    40     EMailFeatureAlwaysOnlineEmail = 0,
       
    41     // KFeatureIdProtocolWlan
       
    42     EMailFeatureProtocolWlan,
       
    43     // KFeatureIdAppCsdSupport
       
    44     EMailFeatureCsd,
       
    45     // KFeatureIdHelp
       
    46     EMailFeatureHelp,
       
    47     // KFeatureIdOfflineMode
       
    48     EMailFeatureOfflineMode,
       
    49     // KFeatureIdMeetingRequestSupport
       
    50     EMailFeatureMeetingRequestSupport,
       
    51     // KFeatureIdOmaEmailNotifications
       
    52     EMailFeatureOmaEmn,
       
    53     // KFeatureIdSapPolicyManagement
       
    54     EMailFeatureIdSapPolicyManagement,
       
    55     // Last global feature
       
    56     EMailLastGlobal
       
    57     };
       
    58 
       
    59 // LOCAL FEATURES
       
    60 // This enumeration contains all the local features as a flag index
       
    61 // that can be used in any of the objects under email. Make sure
       
    62 // that the new features are presented in same order as the indexes
       
    63 // are here in FetchGlobalFeaturesL method.
       
    64 // These flags can be found from \epoc32\include\oem\MessagingVariant.hrh
       
    65 enum TIMSLocalFeatures
       
    66     {
       
    67     // KEmailFeatureIdAlwaysOnlineCSD
       
    68     EMailFeatureAlwaysOnlineCSD = 0,
       
    69     // KEmailFeatureIdAlwaysonlineHeaders
       
    70     EmailFeatureAlwaysonlineHeaders,
       
    71     // Last local feature
       
    72     EMailLastLocal
       
    73     };
       
    74 
       
    75 /**
       
    76 *  Static functions for feature handling in imum
       
    77 *
       
    78 *  @lib imum.lib
       
    79 *  @since S60 3.0
       
    80 */
       
    81 class MsvEmailMtmUiFeatureUtils
       
    82     {
       
    83     public: // New functions
       
    84 
       
    85         /**
       
    86         * Checks if given local feature is turned on
       
    87         * @since S60 3.0
       
    88         */
       
    89         IMPORT_C static TBool LocalFeatureL(
       
    90             const TUid& aCenRepUid,
       
    91             const TUint32 aKeyId,
       
    92             const TUint32 aFlag );
       
    93 
       
    94         /**
       
    95         *
       
    96         * @since S60 3.0
       
    97         */
       
    98         IMPORT_C static void FetchGlobalEmailFeaturesL(
       
    99             TMuiuGlobalFeatureArray& aFeatureArray );
       
   100 
       
   101         /**
       
   102         *
       
   103         * @since S60 3.0
       
   104         */
       
   105         IMPORT_C static void FetchLocalEmailFeaturesL(
       
   106             TMuiuLocalFeatureArray& aFeatureArray );
       
   107 
       
   108         /**
       
   109         *
       
   110         * @since S60 3.0
       
   111         */
       
   112         IMPORT_C static CMuiuFlags* EmailFeaturesLC(
       
   113             const TBool aGetGlobals = ETrue,
       
   114             const TBool aGetLocals = EFalse );
       
   115             
       
   116         /**
       
   117         *
       
   118         * @since S60 3.2
       
   119         */
       
   120         IMPORT_C static CMuiuFlags* EmailFeaturesL(
       
   121             const TBool aGetGlobals = ETrue,
       
   122             const TBool aGetLocals = EFalse );     
       
   123             
       
   124         /**
       
   125         * Checks if TARM lock is set active. 
       
   126         * @since S60 3.2
       
   127         * @return ETrue email settings are locked.
       
   128         */                
       
   129         static TBool SettingEnforcementStateL();                
       
   130                    
       
   131     };
       
   132 
       
   133 #endif // __EMAILFEATUREUTILS_H__
       
   134