|
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 MServicePresenceInfo object. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSERVICEPRESENCEINFOIMP_H |
|
20 #define CSERVICEPRESENCEINFOIMP_H |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <s32strm.h> |
|
24 #include <ximpbase.h> |
|
25 #include <servicepresenceinfo.h> |
|
26 #include "ximpapidataobjbase.h" |
|
27 #include "presenceapiobjbase.h" |
|
28 |
|
29 class CPresenceInfoFieldCollectionImp; |
|
30 class CPresenceInfoFilterImp; |
|
31 |
|
32 /** |
|
33 * Implementation of MServicePresenceInfo object. |
|
34 * |
|
35 * |
|
36 * @since S60 v3.2 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CServicePresenceInfoImp ): public CXIMPApiDataObjBase, |
|
39 public MServicePresenceInfo |
|
40 { |
|
41 public: |
|
42 |
|
43 /** The class ID. */ |
|
44 enum { KClassId = PRIMP_CLSID_CPERSONPRESENCEINFOIMP }; |
|
45 |
|
46 public: |
|
47 |
|
48 IMPORT_C static CServicePresenceInfoImp* NewLC(); |
|
49 |
|
50 virtual ~CServicePresenceInfoImp(); |
|
51 |
|
52 private: |
|
53 |
|
54 CServicePresenceInfoImp(); |
|
55 void ConstructL(); |
|
56 |
|
57 /** |
|
58 * @see CXIMPApiDataObjBase |
|
59 */ |
|
60 XIMPIMP_DECLARE_DATAOBJ_BASE_PRIV_METHODS |
|
61 |
|
62 public: // From MXIMPBase |
|
63 |
|
64 /** |
|
65 * Implementation of MXIMPBase interface methods |
|
66 * @see MXIMPBase |
|
67 */ |
|
68 XIMPIMP_DECLARE_IF_BASE_METHODS |
|
69 |
|
70 /** |
|
71 * @see CXIMPApiDataObjBase |
|
72 */ |
|
73 XIMPIMP_DECLARE_DATAOBJ_BASE_METHODS |
|
74 |
|
75 public: // New functions |
|
76 |
|
77 /** |
|
78 * Internalizes object data from given stream. |
|
79 * @param aStream Stream to read. |
|
80 */ |
|
81 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
82 |
|
83 |
|
84 public: // from MServicePresenceInfo |
|
85 |
|
86 /** |
|
87 * @see MServicePresenceInfo |
|
88 */ |
|
89 const TPtrC8 ServiceType() const; |
|
90 void SetServiceTypeL( const TDesC8& aServiceType ); |
|
91 const MPresenceInfoFieldCollection& Fields() const; |
|
92 MPresenceInfoFieldCollection& Fields(); |
|
93 |
|
94 public: // new methods |
|
95 |
|
96 /** |
|
97 * Remove from this info field implementation the fields which do not match |
|
98 * the given filter. |
|
99 * @param aFilter The filter implementation |
|
100 */ |
|
101 void FilterWithL( const CPresenceInfoFilterImp& aFilter ); |
|
102 |
|
103 private: // data |
|
104 |
|
105 // owned |
|
106 CPresenceInfoFieldCollectionImp* iFields; |
|
107 |
|
108 RBuf8 iServiceType; |
|
109 |
|
110 }; |
|
111 |
|
112 |
|
113 #endif // CSERVICEPRESENCEINFOIMP_H |
|
114 |
|
115 |
|
116 |