2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Encapsulates message real addressa and alias
20 #ifndef C_MESSAGEADDRESS_H
21 #define C_MESSAGEADDRESS_H
25 class CMessageAddressImpl;
30 * Encapsulates message recipient real address and alias.
35 class CMessageAddress : public CBase
37 public: // Constructors and destructor
40 * Two-phased constructor.
42 IMPORT_C static CMessageAddress* NewL();
45 * Two-phased constructor. Leaves object to cleanup stack.
47 IMPORT_C static CMessageAddress* NewLC();
52 IMPORT_C virtual ~CMessageAddress();
54 public: // New functions
59 * @since Series 60 3.0
60 * @param aAddress Real address.
63 IMPORT_C void SetAddressL( const TDesC& aAddress );
66 * Returns real address.
68 * @since Series 60 3.0
69 * @return Real address.
71 IMPORT_C const TPtrC Address() const;
74 * Sets alias for the real address.
76 * @since Series 60 3.0
77 * @param aAlias Alias for the real address.
80 IMPORT_C void SetAliasL( const TDesC& aAlias );
83 * Returns alias for the address.
85 * @since Series 60 3.0
86 * @return Alias for the real address.
88 IMPORT_C const TPtrC Alias() const;
91 * Externalizes address data to a stream
93 * @since Series 60 3.2
94 * @param aStream Destination stream
97 IMPORT_C void ExternalizeL( RWriteStream& aStream );
100 * Internalizes message data from a stream
102 * @since Series 60 3.2
103 * @param Source stream
106 IMPORT_C void InternalizeL( RReadStream& aStream );
111 * C++ default constructor.
116 * Symbian 2nd phase constructor.
123 * Message address implementation.
126 CMessageAddressImpl* iMessageAddressImpl;
131 typedef CArrayPtrFlat<CMessageAddress> CMessageAddressArray;
133 #endif // C_MESSAGEADDRESS_H