|
1 /* |
|
2 * Copyright (c) 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 presence info field text value object. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPRESENCEINFOFIELDVALUETEXTIMP_H |
|
19 #define CPRESENCEINFOFIELDVALUETEXTIMP_H |
|
20 |
|
21 #include <e32std.h> |
|
22 #include <s32strm.h> // RWriteStream, RReadStream |
|
23 #include <ximpbase.h> |
|
24 #include <ximpdatamodelifids.hrh> |
|
25 #include "presenceinfo.h" |
|
26 #include "ximpapidataobjbase.h" |
|
27 #include "presenceapiobjbase.h" |
|
28 #include "presenceinfofieldvaluetext.h" |
|
29 |
|
30 |
|
31 /** |
|
32 * Implementation of presence info field text value object. |
|
33 * |
|
34 * |
|
35 * |
|
36 * |
|
37 * @ingroup ximpdatamodelapi |
|
38 * @since S60 v3.2 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CPresenceInfoFieldValueTextImp ): public CXIMPApiDataObjBase, |
|
41 public MPresenceInfoFieldValueText |
|
42 { |
|
43 public: |
|
44 |
|
45 /** The class ID. */ |
|
46 enum { KClassId = PRIMP_CLSID_CPRESENCEINFOFIELDVALUETEXTIMP }; |
|
47 |
|
48 public: |
|
49 |
|
50 /** |
|
51 * @param aMaxLength NPresenceInfo::KPrValueLengthUnlimited to not enforce |
|
52 * length limits |
|
53 */ |
|
54 IMPORT_C static CPresenceInfoFieldValueTextImp* NewLC( |
|
55 TInt aMaxLength = NPresenceInfo::KValueLengthUnlimited ); |
|
56 |
|
57 virtual ~CPresenceInfoFieldValueTextImp(); |
|
58 |
|
59 private: |
|
60 |
|
61 CPresenceInfoFieldValueTextImp( TInt aMaxLength ); |
|
62 CPresenceInfoFieldValueTextImp(); |
|
63 |
|
64 void ConstructL(); |
|
65 |
|
66 /** |
|
67 * @see CXIMPApiDataObjBase |
|
68 */ |
|
69 XIMPIMP_DECLARE_DATAOBJ_BASE_PRIV_METHODS |
|
70 |
|
71 public: // From MXIMPBase |
|
72 |
|
73 /** |
|
74 * Implementation of MXIMPBase interface methods |
|
75 * @see MXIMPBase |
|
76 */ |
|
77 XIMPIMP_DECLARE_IF_BASE_METHODS |
|
78 |
|
79 /** |
|
80 * @see CXIMPApiDataObjBase |
|
81 */ |
|
82 XIMPIMP_DECLARE_DATAOBJ_BASE_METHODS |
|
83 |
|
84 public: // New functions |
|
85 |
|
86 /** |
|
87 * Internalizes object data from given stream. |
|
88 * @param aStream Stream to read. |
|
89 */ |
|
90 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
91 |
|
92 |
|
93 public: // from MPresenceInfoFieldValueText |
|
94 |
|
95 /** |
|
96 * @see MPresenceInfoFieldValueText |
|
97 */ |
|
98 TInt MaxLength() const; |
|
99 |
|
100 /** |
|
101 * @see MPresenceInfoFieldValueText |
|
102 */ |
|
103 TPtrC TextValue() const; |
|
104 |
|
105 /** |
|
106 * @see MPresenceInfoFieldValueText |
|
107 */ |
|
108 void SetTextValueL( const TDesC& aValue ); |
|
109 |
|
110 private: // data |
|
111 |
|
112 // owned. field value |
|
113 RBuf16 iFieldValue; |
|
114 |
|
115 // maximum length of field value |
|
116 TInt iMaxLength; |
|
117 }; |
|
118 |
|
119 #endif // CPRESENCEINFOFIELDVALUETEXTIMP_H |
|
120 |
|
121 |
|
122 |