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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __CSENDASACCOUNTS_H__
17 #define __CSENDASACCOUNTS_H__
23 // Forward declarations
28 Identifies accounts for use by SendAs.
33 typedef TMsvId TSendAsAccount;
36 Provides human-readable names and IDs for the list of accounts for a given
42 class CSendAsAccounts : public CBase
45 IMPORT_C static CSendAsAccounts* NewL();
46 IMPORT_C virtual ~CSendAsAccounts();
48 IMPORT_C TUid MessageType() const;
49 IMPORT_C void SetMessageType(TUid aMessageType);
51 IMPORT_C const MDesCArray& AccountNames() const;
52 IMPORT_C TSendAsAccount Account(TInt aIndex) const;
53 IMPORT_C TPtrC NameFromAccountL(const TSendAsAccount aAccount) const;
54 IMPORT_C TSendAsAccount AccountFromNameL(const TDesC& aName) const;
55 IMPORT_C TInt Count() const;
56 IMPORT_C void Reset();
58 IMPORT_C void InternalizeL(RReadStream& aReadStream);
59 IMPORT_C void ExternalizeL(RWriteStream& aWriteStream) const;
61 IMPORT_C void AppendAccountL(const TDesC& aAccountName, TSendAsAccount aAccount);
62 IMPORT_C void RemoveAccount(TInt aIndex);
63 IMPORT_C TInt Size() const;
71 CDesCArrayFlat* iAccountNames;
72 RArray<TSendAsAccount> iAccounts;
75 #endif // __CSENDASACCOUNTS_H__