|
1 /* |
|
2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of CMessageAddress interface. |
|
15 * Encapsulates message real address and alias. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef C_MESSAGEADDRESSIMPL_H |
|
21 #define C_MESSAGEADDRESSIMPL_H |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class RWriteStream; |
|
26 class RReadStream; |
|
27 |
|
28 const TInt KMaxLength = 128; |
|
29 |
|
30 /** |
|
31 * Encapsulates message recipient real address and alias. |
|
32 * |
|
33 * @lib SendUi |
|
34 * @since Series 60 v3.0 |
|
35 */ |
|
36 class CMessageAddressImpl : public CBase |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * C++ default constructor. |
|
42 */ |
|
43 CMessageAddressImpl(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CMessageAddressImpl(); |
|
49 |
|
50 public: // New functions |
|
51 |
|
52 /** |
|
53 * Sets real address. |
|
54 * |
|
55 * @since Series 60 3.0 |
|
56 * @param aAddress Real address. |
|
57 * @return None. |
|
58 */ |
|
59 void SetAddressL( const TDesC& aAddress ); |
|
60 |
|
61 /** |
|
62 * Returns real address. |
|
63 * |
|
64 * @since Series 60 3.0 |
|
65 * @return Real address. |
|
66 */ |
|
67 inline const TPtrC Address() const; |
|
68 |
|
69 /** |
|
70 * Sets alias for the real address. |
|
71 * |
|
72 * @since Series 60 3.0 |
|
73 * @param aAlias Alias for the real address. |
|
74 * @return None. |
|
75 */ |
|
76 void SetAliasL( const TDesC& aAlias ); |
|
77 |
|
78 /** |
|
79 * Externalizes message address data |
|
80 * |
|
81 * @since S60 v3.2 |
|
82 * @param aStream Open write stream |
|
83 */ |
|
84 inline const TPtrC Alias() const; |
|
85 |
|
86 void ExternalizeL( RWriteStream& aStream ) const; |
|
87 |
|
88 /** |
|
89 * Internalizes message address data |
|
90 * |
|
91 * @since S60 v3.2 |
|
92 * @param aStream Stream containing message address |
|
93 */ |
|
94 void InternalizeL( RReadStream& aStream ); |
|
95 |
|
96 |
|
97 private: // Data |
|
98 |
|
99 /** |
|
100 * Real address |
|
101 * Own. |
|
102 */ |
|
103 HBufC* iRealAddress; |
|
104 |
|
105 /** |
|
106 * Alias for real address |
|
107 * Own. |
|
108 */ |
|
109 HBufC* iAlias; |
|
110 |
|
111 }; |
|
112 |
|
113 #include "CMessageAddressImpl.inl" |
|
114 |
|
115 #endif // C_MESSAGEADDRESSIMPL_H |
|
116 |
|
117 // End of File |