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