1 // Copyright (c) 2005-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __CMMSACCOUNT_H__
17 #define __CMMSACCOUNT_H__
25 class MMmsSettingsObserver;
29 The maximum account name size
34 const TInt KMmsAccountNameSize = 256;
50 /** MMS account Name */
51 TBuf<KMmsAccountNameSize> iMmsAccountName;
61 class CMmsAccounts : public CActive
64 IMPORT_C static CMmsAccounts* NewL( );
65 IMPORT_C static CMmsAccounts* NewLC( );
66 IMPORT_C virtual ~CMmsAccounts();
69 IMPORT_C void AddObserverL(MMmsSettingsObserver & aObserver);
70 IMPORT_C void RemoveObserver(MMmsSettingsObserver & aObserver);
72 IMPORT_C TMmsAccountId CreateMMSAccountL(const TDesC& aAccountName, const CMmsSettings& aSettings);
73 IMPORT_C TInt MaxMMSAccounts();
75 IMPORT_C void GetMMSAccountsL(RArray<TMmsAccountId>& aAccountIds) const;
76 IMPORT_C void DeleteMMSAccountL(const TMmsAccountId& aAccountId);
78 IMPORT_C void LoadSettingsL(const TMmsAccountId& aAccountId, CMmsSettings& aSettings);
79 IMPORT_C void PopulateDefaultSettingsL(CMmsSettings& aSettings);
81 IMPORT_C void SaveSettingsL(const TMmsAccountId& aAccountId, const CMmsSettings& aSettings) const;
83 IMPORT_C TMmsAccountId DefaultMMSAccountL( ) const;
84 IMPORT_C void SetDefaultMMSAccountL(const TMmsAccountId& aAccount);
89 void DoLoadSettingsL(TUint32 aAccountId, CMmsSettings& aSettings);
90 void DoSaveSettingsL(TUint32 aAccountId, const CMmsSettings& aSettings, const TDesC& aAccountName) const;
95 TUint GetNextEmptyAccountSlotL();
98 enum TMmsSettingsCenRepId
100 EMmsAccountName = 0x00000000,
101 EMmsSettingsVersion = 0x00000001,
102 EMmsApplicationID = 0x00000002,
103 EMmsAddress = 0x00000003,
104 EMmsCreationMode = 0x00000004,
105 EMmsSettingsFlags = 0x00000005,
106 EMmsProxyCount = 0x00000006,
107 EMmsNapIdCount = 0x00000007,
108 EMmsAutomaticDownload = 0x00000008,
109 EMmsValidityPeriod = 0x00000009,
110 EMmsMaxDownloadSize = 0x0000000A,
111 EMmsMaxDownloadRetries = 0x0000000B,
112 EMmsDownloadRetryInterval = 0x0000000C,
113 EMmsMaxSendMsgSize = 0x0000000D,
114 EMmsDeviceContentClass = 0x0000000E,
115 EMmsMaxImageHeight = 0x0000000F,
116 EMmsMaxImageWidth = 0x00000010,
118 EMmsProxyList = 0x00001000,
119 EMmsNapIdList = 0x00002000,
123 CRepository* iRepository;
124 RPointerArray<MMmsSettingsObserver> iObservers;
127 #endif // __CMMSACCOUNT_H__