|
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: Presence configuration item |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPSCPRESENCECONFIGURATIONITEM_H |
|
19 #define CPSCPRESENCECONFIGURATIONITEM_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include "ximpconfigurationitembase.h" |
|
23 |
|
24 class CPresenceInfoFilterImp; |
|
25 class MXIMPIdentity; |
|
26 class CXIMPIdentityImp; |
|
27 |
|
28 /** |
|
29 * Presence configuration item |
|
30 * |
|
31 * @since S60 v3.2 |
|
32 */ |
|
33 class CPresenceConfigurationItem : public CXIMPConfigurationItemBase |
|
34 { |
|
35 public: // Construction and destruction |
|
36 |
|
37 /** |
|
38 * Construction |
|
39 * @param aParent. Parent has to be informed when this object is deleted by RemoveMe method. |
|
40 */ |
|
41 static CPresenceConfigurationItem* NewLC( MXIMPItemParentBase& aParent, const CXIMPIdentityImp& aIdentity ); |
|
42 |
|
43 /** |
|
44 * Destruction |
|
45 * - Remember to inform parent about delete. |
|
46 */ |
|
47 ~CPresenceConfigurationItem(); |
|
48 |
|
49 private: // Construction and destruction |
|
50 |
|
51 /** |
|
52 * Construction |
|
53 * @param aParent. Parent has to be informed when this object is deleted by RemoveMe method. |
|
54 */ |
|
55 CPresenceConfigurationItem( MXIMPItemParentBase& aParent ); |
|
56 |
|
57 /** |
|
58 * Construction |
|
59 */ |
|
60 void ConstructL( const CXIMPIdentityImp& aIdentity ); |
|
61 |
|
62 public: // New methods |
|
63 |
|
64 /** |
|
65 * Current presence information filter. |
|
66 * @return Current presence information filter. |
|
67 */ |
|
68 IMPORT_C CPresenceInfoFilterImp& ConfigurationPif(); |
|
69 |
|
70 /** |
|
71 * Set current presence information filter. Overwrites existing one. |
|
72 * Ownership is transferred to callee. |
|
73 * @param aPif Current presence information filter. |
|
74 */ |
|
75 IMPORT_C void SetConfigurationPif( CPresenceInfoFilterImp* aPif ); |
|
76 |
|
77 /** |
|
78 * Collect aggregated presence information filter without given context. |
|
79 * @param aContext. Exluded context from aggregated pif. |
|
80 * @return Aggregated pif without exluded context. |
|
81 */ |
|
82 IMPORT_C CPresenceInfoFilterImp* CollectConfigurationPifWithoutCtxL( |
|
83 MXIMPPscContext* aContext ); |
|
84 |
|
85 IMPORT_C const MXIMPIdentity& Identity() const; |
|
86 |
|
87 IMPORT_C void SetIdentity( CXIMPIdentityImp* aIdentity ); |
|
88 |
|
89 /** |
|
90 * For ordering items. |
|
91 */ |
|
92 IMPORT_C static TInt Order( const CPresenceConfigurationItem& aA, |
|
93 const CPresenceConfigurationItem& aB ); |
|
94 IMPORT_C static TInt IdentityOrder( const CXIMPIdentityImp* aA, |
|
95 const CPresenceConfigurationItem& aB ); |
|
96 |
|
97 |
|
98 public: // From MXIMPSubscriptionItem |
|
99 |
|
100 /** |
|
101 * @see MXIMPSubscriptionItem |
|
102 */ |
|
103 void SynthesiseSubscriptionEventToL( MXIMPPscContext* aContext, TBool aForceEvent ); |
|
104 |
|
105 public: // From MXIMPConfigurationItem |
|
106 |
|
107 private: // From CXIMPSubscriptionItemBase |
|
108 |
|
109 /** |
|
110 * @see CXIMPSubscriptionItemBase |
|
111 */ |
|
112 void CleanExpired(); |
|
113 |
|
114 private: // Data |
|
115 |
|
116 /** |
|
117 * Current presence information filter. |
|
118 */ |
|
119 CPresenceInfoFilterImp* iPif; |
|
120 |
|
121 /** |
|
122 * Identity of item |
|
123 * Own |
|
124 */ |
|
125 CXIMPIdentityImp* iIdentity; |
|
126 }; |
|
127 |
|
128 |
|
129 /* ======================================================================== */ |
|
130 |
|
131 |
|
132 |
|
133 #endif // CPSCPRESENCECONFIGURATIONITEM_H |