williamr@2
|
1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
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
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
#ifndef __CSMSACCOUNT_H__
|
williamr@2
|
17 |
#define __CSMSACCOUNT_H__
|
williamr@2
|
18 |
|
williamr@2
|
19 |
|
williamr@2
|
20 |
#include <e32base.h>
|
williamr@2
|
21 |
#include <msvapi.h>
|
williamr@2
|
22 |
|
williamr@2
|
23 |
|
williamr@2
|
24 |
class CSmsSettings;
|
williamr@2
|
25 |
class CMsvOffPeakTimes;
|
williamr@2
|
26 |
class CMsvScheduleSettings;
|
williamr@2
|
27 |
class CMsvSendErrorActions;
|
williamr@2
|
28 |
class CMsvSysAgentActions;
|
williamr@2
|
29 |
class CRepository;
|
williamr@2
|
30 |
|
williamr@2
|
31 |
|
williamr@2
|
32 |
/**
|
williamr@2
|
33 |
Stores SMS service and Schedule Send settings to Central Repository.
|
williamr@2
|
34 |
|
williamr@2
|
35 |
@publishedAll
|
williamr@2
|
36 |
@released
|
williamr@2
|
37 |
*/
|
williamr@2
|
38 |
class CSmsAccount : public CBase, public MMsvSessionObserver
|
williamr@2
|
39 |
{
|
williamr@2
|
40 |
public:
|
williamr@2
|
41 |
|
williamr@2
|
42 |
IMPORT_C static CSmsAccount* NewL();
|
williamr@2
|
43 |
IMPORT_C static CSmsAccount* NewLC();
|
williamr@2
|
44 |
IMPORT_C virtual ~CSmsAccount();
|
williamr@2
|
45 |
|
williamr@2
|
46 |
IMPORT_C void InitialiseDefaultSettingsL(CSmsSettings& aSmsSettings);
|
williamr@2
|
47 |
IMPORT_C void InitialiseDefaultSettingsL(CMsvScheduleSettings& aScheduleSettings, CMsvOffPeakTimes& aOffPeakTimes, CMsvSendErrorActions& aErrorActions, CMsvSysAgentActions& aSysAgentActions);
|
williamr@2
|
48 |
IMPORT_C void LoadSettingsL(CSmsSettings& aSmsSettings);
|
williamr@2
|
49 |
IMPORT_C void LoadSettingsL(CMsvScheduleSettings& aScheduleSettings, CMsvOffPeakTimes& aOffPeakTimes, CMsvSendErrorActions& aErrorActions, CMsvSysAgentActions& aSysAgentActions);
|
williamr@2
|
50 |
IMPORT_C void SaveSettingsL(const CSmsSettings& aSmsSettings) const;
|
williamr@2
|
51 |
IMPORT_C void SaveSettingsL(const CMsvScheduleSettings& aScheduleSettings, const CMsvOffPeakTimes& aOffPeakTimes, const CMsvSendErrorActions& aErrorActions, const CMsvSysAgentActions& aSysAgentActions) const;
|
williamr@2
|
52 |
|
williamr@2
|
53 |
private:
|
williamr@2
|
54 |
CSmsAccount();
|
williamr@2
|
55 |
void ConstructL();
|
williamr@2
|
56 |
void HandleSessionEventL(TMsvSessionEvent , TAny* , TAny* , TAny* );
|
williamr@2
|
57 |
CMsvSession& SessionL();
|
williamr@2
|
58 |
|
williamr@2
|
59 |
TMsvId CreateSmsServiceL();
|
williamr@2
|
60 |
void ResetSettings();
|
williamr@2
|
61 |
|
williamr@2
|
62 |
private:
|
williamr@2
|
63 |
enum TSmsSettingsCenRepId
|
williamr@2
|
64 |
{
|
williamr@2
|
65 |
// Service Settings
|
williamr@2
|
66 |
ESmsServiceId = 0x00000000,
|
williamr@2
|
67 |
ESmsSettingsVersionId = 0x00000001,
|
williamr@2
|
68 |
ESmsSettingsMesssageVersionId = 0x00000002,
|
williamr@2
|
69 |
ESmsValidityPeriodId = 0x00000003,
|
williamr@2
|
70 |
ESmsValidityPeriodFormatId = 0x00000004,
|
williamr@2
|
71 |
ESmsAlphabetId = 0x00000005,
|
williamr@2
|
72 |
ESmsMsgFlagsId = 0x00000006,
|
williamr@2
|
73 |
ESmsMessageConversionId = 0x00000007,
|
williamr@2
|
74 |
ESmsFlagsId = 0x00000008,
|
williamr@2
|
75 |
ESmsStatusReportHandlingId = 0x00000009,
|
williamr@2
|
76 |
ESmsSpecialMessageHandlingId = 0x0000000A,
|
williamr@2
|
77 |
ESmsCommDbActionId = 0x0000000B,
|
williamr@2
|
78 |
ESmsDeliveryId = 0x0000000C,
|
williamr@2
|
79 |
ESmsDefaultSCId = 0x0000000D,
|
williamr@2
|
80 |
ESmsSCAddressesCountId = 0x0000000E,
|
williamr@2
|
81 |
ESmsBearerActionId = 0x0000000F,
|
williamr@2
|
82 |
ESmsBearerId = 0x00000010,
|
williamr@2
|
83 |
ESmsClass2FolderId = 0x00000020,
|
williamr@2
|
84 |
ESmsDescriptionLengthId = 0x00000030,
|
williamr@2
|
85 |
ESmsAccountNameId = 0x00000040,
|
williamr@2
|
86 |
|
williamr@2
|
87 |
ESmsSCAddressesPartialId = 0x00001000,
|
williamr@2
|
88 |
EMsgSMSTimeStampSettings = 0x000A0020
|
williamr@2
|
89 |
};
|
williamr@2
|
90 |
|
williamr@2
|
91 |
private:
|
williamr@2
|
92 |
CMsvSession* iMsvSession;
|
williamr@2
|
93 |
CRepository* iRepository;
|
williamr@2
|
94 |
};
|
williamr@2
|
95 |
|
williamr@2
|
96 |
#endif // __CSMSACCOUNT_H__
|