|
1 /* |
|
2 * Copyright (c) 2010 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 * cache update notifications sent by the server using |
|
16 * Publish and Subscribe framework. |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef CPSUPDATEHANDLER_H |
|
21 #define CPSUPDATEHANDLER_H |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class CPSRequestHandler; |
|
26 |
|
27 |
|
28 class CPsUpdateHandler : public CActive |
|
29 { |
|
30 public: |
|
31 // Cancel and destroy |
|
32 ~CPsUpdateHandler(); |
|
33 |
|
34 // Two-phased constructor. |
|
35 static CPsUpdateHandler* NewL( CPSRequestHandler& aRequestHandler, TInt aPsKey ); |
|
36 |
|
37 // Two-phased constructor. |
|
38 static CPsUpdateHandler* NewLC( CPSRequestHandler& aRequestHandler, TInt aPsKey ); |
|
39 |
|
40 private: |
|
41 // C++ constructor |
|
42 CPsUpdateHandler( CPSRequestHandler& aRequestHandler, TInt aPsKey ); |
|
43 |
|
44 // Second-phase constructor |
|
45 void ConstructL(); |
|
46 |
|
47 private: // From CActive |
|
48 // Handle completion |
|
49 void RunL(); |
|
50 |
|
51 // How to cancel me |
|
52 void DoCancel(); |
|
53 |
|
54 private: |
|
55 |
|
56 /** |
|
57 * Handle to RequestHandler through which observers will be notified |
|
58 */ |
|
59 CPSRequestHandler& iRequestHandler; |
|
60 |
|
61 /** |
|
62 * P&S property handle to be observed |
|
63 */ |
|
64 RProperty iProperty; |
|
65 |
|
66 /** |
|
67 * The P&S key observed by this handler object |
|
68 */ |
|
69 TInt iPsKey; |
|
70 }; |
|
71 |
|
72 #endif // CPSUPDATEHANDLER_H |