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