messagingfw/scheduledsendmtm/schedulesendmtm/inc/tmsvschedulesettingsutils.h
changeset 22 bde600d88860
parent 0 8e480a14352b
equal deleted inserted replaced
21:08008ce8a6df 22:bde600d88860
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __TMSVSCHEDULESETTINGSUTILS_H__
       
    17 #define __TMSVSCHEDULESETTINGSUTILS_H__
       
    18 
       
    19 class CRepository;
       
    20 class CMsvScheduleSettings;
       
    21 class CMsvOffPeakTimes;
       
    22 class CMsvSendErrorActions;
       
    23 class CMsvSysAgentActions;
       
    24 class TMsvSendErrorAction;
       
    25 
       
    26 
       
    27 /**
       
    28 Schedule Send settings utility class. 
       
    29 
       
    30 Provides functionality to load/save Schedule Send settings in Central Repository.
       
    31 
       
    32 @publishedPartner
       
    33 @released
       
    34 */
       
    35 class TMsvScheduleSettingsUtils
       
    36 	{
       
    37 public:
       
    38 	IMPORT_C static void SaveScheduleSettingsL(const CMsvScheduleSettings& aScheduleSettings, CRepository& aRepository);
       
    39 	IMPORT_C static void SaveOffPeakSettingsL(const CMsvOffPeakTimes& aOffPeakTimes, CRepository& aRepository);
       
    40 	IMPORT_C static void SaveSendErrorSettingsL(const CMsvSendErrorActions& aErrorActions, CRepository& aRepository);
       
    41 	IMPORT_C static void SaveSysAgentSettingsL(const CMsvSysAgentActions& aSysAgentActions, CRepository& aRepository);
       
    42 
       
    43 	IMPORT_C static void LoadScheduleSettingsL(CMsvScheduleSettings& aScheduleSettings, CRepository& aRepository);
       
    44 	IMPORT_C static void LoadOffPeakSettingsL(CMsvOffPeakTimes& aOffPeakTimes, CRepository& aRepository);
       
    45 	IMPORT_C static void LoadSendErrorSettingsL(CMsvSendErrorActions& aErrorActions, CRepository& aRepository);
       
    46 	IMPORT_C static void LoadSysAgentSettingsL(CMsvSysAgentActions& aSysAgentActions, CRepository& aRepository);
       
    47 
       
    48 	/** 
       
    49 	Schedule Send Setting Types. 
       
    50 	
       
    51 	CenRep ID 0x10000 to 0x90000 is reserved for Schedule Send Settings. 
       
    52 
       
    53 	@publishedPartner
       
    54 	@released
       
    55 	*/
       
    56 	enum TMsvScheduleSendSettingTypes
       
    57 		{
       
    58 		EScheduleSettings			= 0x00010000,
       
    59 		EOffPeakTimeSettings		= 0x00020000,
       
    60 		ESendErrorActionSettings	= 0x00030000,
       
    61 		ESystemAgentActionSettings	= 0x00040000
       
    62 		};
       
    63 		
       
    64 private:
       
    65 		
       
    66 	enum TMsvScheduleSettingsCenRepId
       
    67 		{
       
    68 		// Schedule Settings		
       
    69 		EScheduleVersionId					= 0x00010000,
       
    70 		ESchedulePriorityId					= 0x00010001,
       
    71 		EScheduleValidityPeriodId			= 0x00010002,
       
    72 		EScheduleIntervalTypeId				= 0x00010003,
       
    73 		EScheduleLatencyId					= 0x00010004,
       
    74 		EScheduleLongIntervalId	   			= 0x00010005,     	
       
    75 		EScheduleShortIntervalId			= 0x00010006,
       
    76 		EScheduleVariableIntervalsCountId	= 0x00010007,
       
    77 		ESchedulePendingConditionsTimeoutId	= 0x00010008,
       
    78 		
       
    79 		// List of Variable Intervals
       
    80 		EScheduleVariableIntervals			= 0x00011000
       
    81 		};
       
    82 
       
    83 	enum TMsvOffPeakSettingsCenRepId
       
    84 		{
       
    85 		// Off Peak Time settings		
       
    86 		EOffPeakTimesVersionId		= 0x00020000,
       
    87 		EOffPeakTimesCountId		= 0x00020001,
       
    88 
       
    89 		// List of Off Peak Times
       
    90 		EOffPeakTimes				= 0x00021000,
       
    91 		
       
    92 		// Off Peak Time fields
       
    93 		EOffPeakVersion				= 0x00000000,
       
    94 		EOffPeakDay					= 0x00000001,
       
    95 		EOffPeakHour				= 0x00000002,
       
    96 		EOffPeakMinute	   			= 0x00000003,     	
       
    97 		EOffPeakValidityPeriod 		= 0x00000004
       
    98 		};
       
    99 
       
   100 	enum TMsvSendErrorActionsCenRepId
       
   101 		{
       
   102 		// Send Error Action settings		
       
   103 		ESendErrorActionsVersionId		= 0x00030000,
       
   104 		ESendErrorActionsCountId		= 0x00030001,
       
   105 
       
   106 		// Default Send Error Action
       
   107 		ESendErrorDefaultAction			= 0x00031000,
       
   108 
       
   109 		// List of Send Error Actions
       
   110 		ESendErrorActions				= 0x00032000,
       
   111 		
       
   112 		// Send Error Action fields
       
   113 		ESendErrorVersion				= 0x00000000,
       
   114 		ESendErrorError					= 0x00000001,
       
   115 		ESendErrorMaxRetries			= 0x00000002,     	
       
   116 		ESendErrorRetries				= 0x00000003,
       
   117 		ESendErrorAction				= 0x00000004,
       
   118 		ESendErrorRetrySpacing			= 0x00000005
       
   119 		};
       
   120 
       
   121 	enum TMsvSysAgentActionsCenRepId
       
   122 		{
       
   123 		// System Agent Action settings		
       
   124 		ESysAgentActionsVersionId		= 0x00040000,
       
   125 		ESysAgentActionsCountId			= 0x00040001,
       
   126 
       
   127 		// Default Send Error Action
       
   128 		ESysAgentDefaultSendErrorAction = 0x00041000,
       
   129 
       
   130 		// List of System Agent Actions
       
   131 		ESysAgentActions				= 0x00042000,
       
   132 
       
   133 		// List of Send Error Actions
       
   134 		ESysAgentSendErrorActions		= 0x00043000,
       
   135 		
       
   136 		// System Agent Action fields
       
   137 		ESysAgentVersion				= 0x00000000,
       
   138 		ESysAgentVariable				= 0x00000001,
       
   139 		ESysAgentState					= 0x00000002,     	
       
   140 		ESysAgentType					= 0x00000003,
       
   141 		ESysAgentDefault				= 0x00000004
       
   142 		};
       
   143 			
       
   144 	static void SaveSendErrorActionL(TUint32 aErrorActionId, const TMsvSendErrorAction& aErrorAction, CRepository& aRepository);
       
   145 	static void LoadSendErrorActionL(TUint32 aErrorActionId, TMsvSendErrorAction& aErrorAction, CRepository& aRepository);
       
   146 	};
       
   147 
       
   148 #endif