|
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: MPresentityGroupMemberInfo API object implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPRESENTITYGROUPMEMBERINFOIMP_H |
|
19 #define CPRESENTITYGROUPMEMBERINFOIMP_H |
|
20 |
|
21 #include <e32std.h> |
|
22 #include <s32strm.h> |
|
23 |
|
24 #include "ximpapidataobjbase.h" |
|
25 #include "presenceapiobjbase.h" |
|
26 #include <presentitygroupmemberinfo.h> |
|
27 |
|
28 class CXIMPIdentityImp; |
|
29 |
|
30 /** |
|
31 * MPresenceInfo API object implementation. |
|
32 * |
|
33 * @lib ximpdatamodel.dll |
|
34 * @since S60 v3.2 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CPresentityGroupMemberInfoImp ): public CXIMPApiDataObjBase, |
|
37 public MPresentityGroupMemberInfo |
|
38 { |
|
39 public: |
|
40 /** The class ID. */ |
|
41 enum { KClassId = PRIMP_CLSID_CPRESENTITYGROUPMEMBERINFOIMP }; |
|
42 |
|
43 public: |
|
44 |
|
45 IMPORT_C static CPresentityGroupMemberInfoImp* NewLC( |
|
46 const MXIMPIdentity& aIdentity, |
|
47 const TDesC16& aDisplayName ); |
|
48 IMPORT_C static CPresentityGroupMemberInfoImp* NewLC(); |
|
49 IMPORT_C static CPresentityGroupMemberInfoImp* NewL(); |
|
50 virtual ~CPresentityGroupMemberInfoImp(); |
|
51 |
|
52 private: |
|
53 |
|
54 CPresentityGroupMemberInfoImp(); |
|
55 void ConstructL(); |
|
56 void ConstructL( const MXIMPIdentity& aIdentity, |
|
57 const TDesC16& aDisplayName ); |
|
58 |
|
59 /** |
|
60 * @see CXIMPApiDataObjBase |
|
61 */ |
|
62 XIMPIMP_DECLARE_DATAOBJ_BASE_PRIV_METHODS |
|
63 |
|
64 public: // From MXIMPBase |
|
65 |
|
66 /** |
|
67 * Implementation of MXIMPBase interface methods |
|
68 * @see MXIMPBase |
|
69 */ |
|
70 XIMPIMP_DECLARE_IF_BASE_METHODS |
|
71 |
|
72 /** |
|
73 * @see CXIMPApiDataObjBase |
|
74 */ |
|
75 XIMPIMP_DECLARE_DATAOBJ_BASE_METHODS |
|
76 |
|
77 public: // From MPresentityGroupMemberInfo |
|
78 |
|
79 const MXIMPIdentity& GroupMemberId() const; |
|
80 const TDesC16& GroupMemberDisplayName() const; |
|
81 void SetGroupMemberIdL( MXIMPIdentity* aIdentity ); |
|
82 void SetGroupMemberDisplayNameL( const TDesC16& aDisplayName ); |
|
83 |
|
84 |
|
85 public: // New functions |
|
86 |
|
87 /** |
|
88 * Extenalizes object data to given stream. |
|
89 * @param aStream Stream to write. |
|
90 */ |
|
91 //IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; |
|
92 |
|
93 |
|
94 /** |
|
95 * Internalizes object data from given stream. |
|
96 * @param aStream Stream to read. |
|
97 */ |
|
98 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
99 |
|
100 |
|
101 /** |
|
102 * TLinearOrder for ordering based on stored group id, |
|
103 * when this class is used within an RPointerArray or derivatives. |
|
104 */ |
|
105 IMPORT_C static TInt GroupIdLinearOrder( |
|
106 const CPresentityGroupMemberInfoImp& aA, |
|
107 const CPresentityGroupMemberInfoImp& aB ); |
|
108 |
|
109 /** |
|
110 * Access to identity object |
|
111 * @return Identity |
|
112 */ |
|
113 IMPORT_C const CXIMPIdentityImp& IdentityImp() const; |
|
114 |
|
115 private: // data |
|
116 |
|
117 /** |
|
118 * Identity |
|
119 * Own. |
|
120 */ |
|
121 CXIMPIdentityImp* iIdentity; |
|
122 |
|
123 /** |
|
124 * Displayname |
|
125 * Own. |
|
126 */ |
|
127 RBuf16 iDisplayName; |
|
128 |
|
129 }; |
|
130 |
|
131 |
|
132 #endif // CPRESENTITYGROUPMEMBERINFOIMP_H |