|
1 /* |
|
2 * Copyright (c) 2007 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: This is the client side internal file to handle |
|
15 * property used in Publish and Subscribe framework. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CPSPROPERTYHANDLER_H__ |
|
21 #define __CPSPROPERTYHANDLER_H__ |
|
22 |
|
23 // INCLUDE FILES |
|
24 |
|
25 // SYSTEM INCLUDES |
|
26 #include <e32base.h> |
|
27 #include <e32std.h> |
|
28 #include <e32debug.h> |
|
29 #include <e32property.h> |
|
30 #include <CPcsDefs.h> |
|
31 |
|
32 // FORWARD declaration |
|
33 class CPSRequestHandler; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 /** |
|
37 * CPsPropertyHandler |
|
38 * An instance of the property handler object for the Predicitve Search application |
|
39 * |
|
40 * @lib PsServerClientAPI.lib |
|
41 * @since S60 v3.2 |
|
42 */ |
|
43 |
|
44 class CPsPropertyHandler : public CActive |
|
45 { |
|
46 |
|
47 public: // Constructors and destructors |
|
48 |
|
49 /** |
|
50 * NewL. |
|
51 * Two-phased constructor. |
|
52 * Creates a CPsPropertyHandler object using two phase construction, |
|
53 * and return a pointer to the created object. |
|
54 * |
|
55 * @param aRequestHandler The object to RequestHandler through |
|
56 * which observers will be called |
|
57 * @return A pointer to the created instance of CPsPropertyHandler. |
|
58 */ |
|
59 static CPsPropertyHandler* NewL( CPSRequestHandler* aRequestHandler ); |
|
60 |
|
61 /** |
|
62 * ~CPsPropertyHandler. |
|
63 * Destructor. |
|
64 * Destroys the object and release all memory objects. |
|
65 */ |
|
66 ~CPsPropertyHandler(); |
|
67 |
|
68 /** |
|
69 * GetCachingStatusL |
|
70 * Returns the cache status for synchronous requests |
|
71 */ |
|
72 TInt GetCachingStatusL(TCachingStatus& aStatus); |
|
73 |
|
74 protected: // Functions from base classes |
|
75 |
|
76 /** |
|
77 * From CActive, RunL. |
|
78 * Callback function. |
|
79 * Invoked to handle responses from the Algorithm. |
|
80 */ |
|
81 void RunL(); |
|
82 |
|
83 /** |
|
84 * From CActive, DoCancel. |
|
85 * Cancels any outstanding operation. |
|
86 */ |
|
87 void DoCancel(); |
|
88 |
|
89 private: // Constructors and destructors |
|
90 |
|
91 /** |
|
92 * CPsPropertyHandler. |
|
93 * Performs the first phase of two phase construction. |
|
94 * @param aObserver The object to be used to |
|
95 * handle updates from the server. |
|
96 */ |
|
97 CPsPropertyHandler(CPSRequestHandler* aRequestHandler ); |
|
98 |
|
99 /** |
|
100 * ConstructL. |
|
101 * Performs the second phase construction of a |
|
102 * CPsPropertyHandler object. |
|
103 */ |
|
104 void ConstructL( ); |
|
105 |
|
106 private: // Data |
|
107 |
|
108 /** |
|
109 * iRequestHandler, object to RequestHandler through which |
|
110 * observers will be accessed |
|
111 */ |
|
112 CPSRequestHandler* iRequestHandler; |
|
113 |
|
114 /** |
|
115 * iProperty, property handle used to attach to the property defined |
|
116 */ |
|
117 RProperty iCacheStatusProperty; |
|
118 /** |
|
119 * iCacheErrorProperty, property handle used to attach to the cache error property |
|
120 */ |
|
121 RProperty iCacheErrorProperty; |
|
122 }; |
|
123 |
|
124 #endif /* __CPSPROPERTYHANDLER_H__ */ |
|
125 |
|
126 // END OF FILE |