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: TSC Subscriber (Publish & Subscribe). |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef TSCPLUGINSUBSCRIBER_H |
|
19 #define TSCPLUGINSUBSCRIBER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <e32property.h> |
|
24 #include "MTSCPropertyResponder.h" |
|
25 |
|
26 // CLASS DECLARATION |
|
27 /** |
|
28 * CTSCSubscriber |
|
29 * |
|
30 * @lib tscstartupextensionplugin |
|
31 * @since 3.2 |
|
32 */ |
|
33 |
|
34 class CTSCSubscriber : public CActive |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 */ |
|
40 static CTSCSubscriber* NewL( MTSCPropertyResponder& aTSCPropertyResponder, |
|
41 const TUid& aCategory, |
|
42 TUint aKey ); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~CTSCSubscriber(); |
|
48 |
|
49 void Subscribe(); |
|
50 |
|
51 private: |
|
52 CTSCSubscriber( MTSCPropertyResponder& aTSCPropertyResponder, |
|
53 const TUid& aCategory, TUint |
|
54 aKey ); |
|
55 void ConstructL(); |
|
56 |
|
57 public: // from CActive |
|
58 /** |
|
59 * @param none |
|
60 * @return none |
|
61 */ |
|
62 void RunL(); |
|
63 |
|
64 /** |
|
65 * @param aError the error returned |
|
66 * @return error |
|
67 */ |
|
68 TInt RunError( TInt aError ); |
|
69 |
|
70 /** |
|
71 * @param none |
|
72 * @return none |
|
73 */ |
|
74 void DoCancel(); |
|
75 |
|
76 private: // Methods not implemented |
|
77 CTSCSubscriber( const CTSCSubscriber& ); // Copy constructor |
|
78 CTSCSubscriber& operator=( const CTSCSubscriber& );// Assigment operator |
|
79 |
|
80 private: |
|
81 |
|
82 MTSCPropertyResponder& iTSCPropertyResponder; |
|
83 RProperty iProperty; |
|
84 TUid iCategory; |
|
85 TUint iKey; |
|
86 }; |
|
87 |
|
88 |
|
89 #endif // TSCSUBSCRIBER_H |
|
90 |
|
91 // End of File |
|