mmsengine/mmsserversettings/inc/mmsschedulesettingsutils.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:  mmsschedulesettingsutils  declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __MMSSCHEDULESETTINGSUTILS_H
       
    21 #define __MMSSCHEDULESETTINGSUTILS_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <es_sock.h>
       
    26 #include <flogger.h>
       
    27 
       
    28 // USERINCLUDE FILES
       
    29 // CONSTANTS
       
    30 // Error actions are stored in 0x10 increments in CenRep
       
    31 const TUint32 KMmsErrorActionElementIncrement = 0x00000010;
       
    32 
       
    33 // MACROS
       
    34 // DATA TYPES
       
    35 // FUNCTION PROTOTYPES
       
    36 // FORWARD DECLARATIONS
       
    37 class CRepository;
       
    38 class CMsvScheduleSettings;
       
    39 class CMsvOffPeakTimes;
       
    40 class CMsvSendErrorActions;
       
    41 class CMsvSysAgentActions;
       
    42 class TMsvSendErrorAction;
       
    43 
       
    44 // CLASS DECLARATION
       
    45 /**
       
    46 * TMmsScheduleSettingsUtils is a helper class for CMmsAccount.
       
    47 * It implements the actual loading operation for schedule settings.
       
    48 * @lib mmsserversettings.lib
       
    49 * @since 3.0
       
    50 */
       
    51 class TMmsScheduleSettingsUtils
       
    52     {
       
    53     public: // New functions
       
    54 
       
    55         /**
       
    56         * LoadScheduleSendSettingsL loads schedule settings for
       
    57         * send operations
       
    58         */
       
    59     	static void LoadScheduleSendSettingsL(
       
    60     	    CMsvScheduleSettings& aScheduleSettings,
       
    61     	    CRepository& aRepository );
       
    62 
       
    63         /**
       
    64         * LoadScheduleReceiveSettingsL loads schedule settings for
       
    65         * receive operations
       
    66         */
       
    67     	static void LoadScheduleReceiveSettingsL(
       
    68     	    CMsvScheduleSettings& aScheduleSettings,
       
    69     	    CRepository& aRepository );
       
    70     	    
       
    71         /**
       
    72         * LoadOffPeakSettingsL loads offpeak settings
       
    73         * CURRENTLY OFFPEAK SETTINGS NOT USED: CONTAINS EMPTY IMPLEMENTATION
       
    74         */
       
    75     	static void LoadOffPeakSettingsL(
       
    76         	CMsvOffPeakTimes& aOffPeakTimes, 
       
    77         	CRepository& aRepository );
       
    78         	
       
    79         /**
       
    80         * LoadSendErrorSettingsL loads error settings for send operations
       
    81         */
       
    82     	static void LoadSendErrorSettingsL(
       
    83         	CMsvSendErrorActions& aErrorActions, 
       
    84         	CRepository& aRepository );
       
    85 
       
    86         /**
       
    87         * LoadReceiveErrorSettingsL loads error settings for receive operations
       
    88         */
       
    89     	static void LoadReceiveErrorSettingsL(
       
    90         	CMsvSendErrorActions& aErrorActions, 
       
    91         	CRepository& aRepository );
       
    92         	
       
    93         /**
       
    94         * LoadSysAgentSettingsL loads sysagent settings
       
    95         * CURRENTLY SYSAGENT SETTINGS NOT USED: CONTAINS EMPTY IMPLEMENTATION
       
    96         */
       
    97     	static void LoadSysAgentSettingsL(
       
    98     	    CMsvSysAgentActions& aSysAgentActions, 
       
    99     	    CRepository& aRepository );	
       
   100     	    
       
   101     	    
       
   102     public: // Functions from base classes        
       
   103         
       
   104     protected:  // New functions
       
   105 
       
   106     protected:  // Functions from base classes
       
   107         
       
   108     private:
       
   109 
       
   110         /**
       
   111         * LoadScheduleSettingsL loads schedule settings - common code
       
   112         * @param aScheduleSettings schedule settings structure to be filled
       
   113         * @param aRepository repository where the values are read from
       
   114         * @param aLongInterval Cen Rep key for long interval value
       
   115         * @param aShortInterval Cen Rep key for short inteval value
       
   116         * @param aVariableIntervalsCount Cen Rep key for variable interval count
       
   117         * @param aVariableIntervalArrayBase Cen Rep key for variable interval base
       
   118         */
       
   119     	static void LoadScheduleSettingsL(
       
   120     	    CMsvScheduleSettings& aScheduleSettings,
       
   121     	    CRepository& aRepository,
       
   122             const TUint32 aLongInterval,
       
   123             const TUint32 aShortInterval,
       
   124             const TUint32 aVariableIntervalsCount,
       
   125             const TUint32 aVariableIntervalArrayBase
       
   126     	    );
       
   127     	    
       
   128         /**
       
   129         * LoadErrorSettingsL loads error settings for operations - common code
       
   130         * @param aErrorActions error action structure to be filled.
       
   131         * @param aRepository repository where the actios are read from.
       
   132         * @param aDefaultErrorActionId Central Repository key for default error action.
       
   133         * @param aErrorActionCount Central Repository key for number of error actions
       
   134         * @param aErrorActionBase Central Repository key from which the error actions start
       
   135         */
       
   136     	static void LoadErrorSettingsL(
       
   137         	CMsvSendErrorActions& aErrorActions, 
       
   138         	CRepository& aRepository,
       
   139         	const TUint32 aDefaultErrorActionId,
       
   140         	const TUint32 aErrorActionCount,
       
   141         	const TUint32 aErrorActionBase );
       
   142         	
       
   143         /**
       
   144         * Helper method for loading error actions
       
   145         */
       
   146         static void LoadErrorActionL(
       
   147             TUint32 aErrorActionId,
       
   148             TMsvSendErrorAction& aErrorAction,
       
   149             CRepository& aRepository );
       
   150 
       
   151     	/**
       
   152     	* Load error codes that cause immediate failure
       
   153     	* Same codes for sending and receiving
       
   154     	*/        
       
   155     	static void LoadImmediateFailuresL(
       
   156         	CMsvSendErrorActions& aErrorActions, 
       
   157         	CRepository& aRepository );
       
   158     	
       
   159     public:     // Data
       
   160     protected:  // Data
       
   161     private:    // Data
       
   162 
       
   163     };
       
   164 
       
   165 #endif // __MMSSCHEDULESETTINGSUTILS_H   
       
   166             
       
   167 // End of File