|
1 /* |
|
2 * Copyright (c) 2007, 2008 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: MPresenceBuddyInfo API object implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CXIMPPRESENCEBUDDYINFOIMP_H |
|
19 #define CXIMPPRESENCEBUDDYINFOIMP_H |
|
20 |
|
21 #include <presencebuddyinfo.h> |
|
22 |
|
23 #include "presenceapiobjbase.h" |
|
24 #include "presencetypehelpers.h" |
|
25 #include "ximpapiobjbase.h" |
|
26 |
|
27 class CPresenceInfoImp; |
|
28 class MPresenceInfo; |
|
29 class CXIMPIdentityImp; |
|
30 |
|
31 /** |
|
32 * MPresenceBuddyInfo API object implementation. |
|
33 * |
|
34 * @lib ximpdatamodel.dll |
|
35 * @since S60 v3.2 |
|
36 */ |
|
37 NONSHARABLE_CLASS( CPresenceBuddyInfoImp ): public CXIMPApiDataObjBase, |
|
38 public MPresenceBuddyInfo |
|
39 { |
|
40 public: |
|
41 /** The class ID. */ |
|
42 enum { KClassId = PRIMP_CLSID_CXIMPPRESENCEBUDDYINFOIMP }; |
|
43 |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Symbian constructors and c++ destructor |
|
49 */ |
|
50 IMPORT_C static CPresenceBuddyInfoImp* NewLC(); |
|
51 IMPORT_C static CPresenceBuddyInfoImp* NewL(); |
|
52 virtual ~CPresenceBuddyInfoImp(); |
|
53 |
|
54 private: |
|
55 |
|
56 /** |
|
57 * c++ constructor |
|
58 */ |
|
59 CPresenceBuddyInfoImp(); |
|
60 |
|
61 /** |
|
62 * Symbian second phase constructor |
|
63 */ |
|
64 void ConstructL(); |
|
65 |
|
66 public: // From MXIMPBase |
|
67 |
|
68 /** |
|
69 * Implementation of MXIMPBase interface methods |
|
70 * @see MXIMPBase |
|
71 */ |
|
72 XIMPIMP_DECLARE_IF_BASE_METHODS |
|
73 |
|
74 public: // From CXIMPApiDataObjBase |
|
75 |
|
76 /** |
|
77 * @see CXIMPApiDataObjBase |
|
78 */ |
|
79 XIMPIMP_DECLARE_DATAOBJ_BASE_METHODS |
|
80 |
|
81 public: // From MPresenceBuddyInfo |
|
82 |
|
83 TInt Set( MXIMPIdentity* aIdentity, |
|
84 MPresenceInfo* aPresenceInfo); |
|
85 TInt SetPresenceInfo(MPresenceInfo* aPresenceInfo); |
|
86 |
|
87 TInt SetBuddyId(MXIMPIdentity* aIdentity); |
|
88 |
|
89 TInt SetPersonPresenceL(MPersonPresenceInfo* aPersonPresenceInfo); |
|
90 |
|
91 const MPresenceInfo* PresenceInfo() const; |
|
92 |
|
93 const MXIMPIdentity* BuddyId() const; |
|
94 |
|
95 TBool EqualsIdentity( |
|
96 const MPresenceBuddyInfo* aOtherInstance ) const; |
|
97 |
|
98 public: // New functions |
|
99 |
|
100 /** |
|
101 * Internalizes object data from given stream. |
|
102 * @param aStream Stream to read. |
|
103 */ |
|
104 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
105 |
|
106 private: // data |
|
107 |
|
108 |
|
109 /** |
|
110 * OWN: |
|
111 */ |
|
112 CPresenceInfoImp* iPresenceInfo; |
|
113 |
|
114 /** |
|
115 * OWN: |
|
116 */ |
|
117 CXIMPIdentityImp* iIdentity; |
|
118 |
|
119 }; |
|
120 |
|
121 |
|
122 #endif // CXIMPPRESENCEBUDDYINFOIMP_H |