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: Subscriber (Publish & Subscribe) |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CFILEMANAGERPROPERTYSUBSCRIBER_H |
|
21 #define CFILEMANAGERPROPERTYSUBSCRIBER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <e32property.h> |
|
26 #include "MFileManagerPropertyObserver.h" |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * This class provides P&S event subscriber |
|
31 * |
|
32 * @lib FileManagerEngine.lib |
|
33 * @since 3.1 |
|
34 */ |
|
35 NONSHARABLE_CLASS(CFileManagerPropertySubscriber) : public CActive |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * Two-phased constructor. |
|
40 */ |
|
41 static CFileManagerPropertySubscriber* NewL( |
|
42 MFileManagerPropertyObserver& aObserver, |
|
43 const TUid& aCategory, |
|
44 const TUint aKey ); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 ~CFileManagerPropertySubscriber(); |
|
50 |
|
51 private: |
|
52 CFileManagerPropertySubscriber( |
|
53 MFileManagerPropertyObserver& aObserver, |
|
54 const TUid& aCategory, |
|
55 const TUint aKey ); |
|
56 |
|
57 void ConstructL(); |
|
58 |
|
59 void Subscribe(); |
|
60 |
|
61 private: // from CActive |
|
62 void RunL(); |
|
63 |
|
64 TInt RunError( TInt aError ); |
|
65 |
|
66 void DoCancel(); |
|
67 |
|
68 private: |
|
69 // Ref: Reference to observer interface |
|
70 MFileManagerPropertyObserver& iObserver; |
|
71 // Own: PS handle |
|
72 RProperty iProperty; |
|
73 // Own: PS category Uid |
|
74 TUid iCategory; |
|
75 // Own: PS key id |
|
76 TUint iKey; |
|
77 }; |
|
78 |
|
79 #endif // CFILEMANAGERPROPERTYSUBSCRIBER_H |
|
80 |
|
81 // End of File |
|