epoc32/include/app/csmsaccount.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/csmsaccount.h@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __CSMSACCOUNT_H__
    17 #define __CSMSACCOUNT_H__
    18 
    19 
    20 #include <e32base.h>
    21 #include <msvapi.h>
    22 
    23 
    24 class CSmsSettings;
    25 class CMsvOffPeakTimes;
    26 class CMsvScheduleSettings;
    27 class CMsvSendErrorActions;
    28 class CMsvSysAgentActions;
    29 class CRepository;
    30 
    31 
    32 /**
    33 Stores SMS service and Schedule Send settings to Central Repository. 
    34 
    35 @publishedAll
    36 @released
    37 */
    38 class CSmsAccount : public CBase, public MMsvSessionObserver
    39 	{
    40 public:
    41 
    42 	IMPORT_C static CSmsAccount* NewL();
    43 	IMPORT_C static CSmsAccount* NewLC();
    44 	IMPORT_C virtual ~CSmsAccount();
    45 
    46 	IMPORT_C void InitialiseDefaultSettingsL(CSmsSettings& aSmsSettings);
    47 	IMPORT_C void InitialiseDefaultSettingsL(CMsvScheduleSettings& aScheduleSettings, CMsvOffPeakTimes& aOffPeakTimes, CMsvSendErrorActions& aErrorActions, CMsvSysAgentActions& aSysAgentActions);
    48 	IMPORT_C void LoadSettingsL(CSmsSettings& aSmsSettings);
    49 	IMPORT_C void LoadSettingsL(CMsvScheduleSettings& aScheduleSettings, CMsvOffPeakTimes& aOffPeakTimes, CMsvSendErrorActions& aErrorActions, CMsvSysAgentActions& aSysAgentActions);
    50     IMPORT_C void SaveSettingsL(const CSmsSettings& aSmsSettings) const;
    51 	IMPORT_C void SaveSettingsL(const CMsvScheduleSettings& aScheduleSettings, const CMsvOffPeakTimes& aOffPeakTimes, const CMsvSendErrorActions& aErrorActions, const CMsvSysAgentActions& aSysAgentActions) const;
    52 
    53 private:
    54 	CSmsAccount();
    55 	void ConstructL();
    56 	void HandleSessionEventL(TMsvSessionEvent , TAny* , TAny* , TAny* );
    57 	CMsvSession& SessionL();	
    58 	
    59 	TMsvId CreateSmsServiceL();
    60 	void ResetSettings();
    61 
    62 private:
    63 	enum TSmsSettingsCenRepId
    64 		{
    65 		// Service Settings		
    66 		ESmsServiceId					= 0x00000000,
    67 		ESmsSettingsVersionId			= 0x00000001,
    68 		ESmsSettingsMesssageVersionId	= 0x00000002,
    69 		ESmsValidityPeriodId			= 0x00000003,
    70 		ESmsValidityPeriodFormatId	   	= 0x00000004,     	
    71 		ESmsAlphabetId					= 0x00000005,
    72 		ESmsMsgFlagsId					= 0x00000006,
    73 		ESmsMessageConversionId			= 0x00000007,
    74 		ESmsFlagsId						= 0x00000008,
    75 		ESmsStatusReportHandlingId		= 0x00000009,
    76 		ESmsSpecialMessageHandlingId	= 0x0000000A,
    77 		ESmsCommDbActionId				= 0x0000000B,
    78 		ESmsDeliveryId					= 0x0000000C,
    79 		ESmsDefaultSCId					= 0x0000000D,
    80 		ESmsSCAddressesCountId			= 0x0000000E,
    81 		ESmsBearerActionId				= 0x0000000F,
    82 		ESmsBearerId					= 0x00000010,
    83 		ESmsClass2FolderId				= 0x00000020,
    84 		ESmsDescriptionLengthId			= 0x00000030,
    85 		ESmsAccountNameId				= 0x00000040,
    86 		
    87 		ESmsSCAddressesPartialId		= 0x00001000,
    88 		EMsgSMSTimeStampSettings		= 0x000A0020
    89 		};
    90 
    91 private:
    92 	CMsvSession* iMsvSession;
    93 	CRepository* iRepository;
    94 	};
    95 
    96 #endif // __CSMSACCOUNT_H__