|
1 /* |
|
2 * Copyright (c) 2009-2009 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: CCCaFactoryExtensionNotifier |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CCAFACTORYEXTENSIONOBSERVER_H |
|
19 #define CCAFACTORYEXTENSIONOBSERVER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 #include <ecom.h> |
|
25 |
|
26 // CLASS DECLARATION |
|
27 class CCCAExtensionFactory; |
|
28 |
|
29 NONSHARABLE_CLASS(CCCaFactoryExtensionNotifier) : public CActive |
|
30 { |
|
31 public: |
|
32 // Constructors and destructor |
|
33 |
|
34 /** |
|
35 * Destructor. |
|
36 */ |
|
37 ~CCCaFactoryExtensionNotifier(); |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 */ |
|
42 IMPORT_C static CCCaFactoryExtensionNotifier* NewL(); |
|
43 |
|
44 /** |
|
45 * Sets the callback |
|
46 * |
|
47 * @since TB 9.2 |
|
48 */ |
|
49 IMPORT_C void ObserveExtensionFactory( TCallBack& aCallBack ); |
|
50 |
|
51 /** |
|
52 * Returns CCCAExtensionFactory pointer |
|
53 * |
|
54 * @return CCCAExtensionFactory |
|
55 * @since TB 9.2 |
|
56 */ |
|
57 IMPORT_C CCCAExtensionFactory* ExtensionFactory(); |
|
58 |
|
59 protected: // From CActive |
|
60 void DoCancel(); |
|
61 void RunL(); |
|
62 |
|
63 private: |
|
64 |
|
65 /** |
|
66 * Constructor for performing 1st stage construction |
|
67 */ |
|
68 inline CCCaFactoryExtensionNotifier(); |
|
69 |
|
70 /** |
|
71 * EPOC default constructor for performing 2nd stage construction |
|
72 */ |
|
73 inline void ConstructL(); |
|
74 |
|
75 /** |
|
76 * Checks if implementation plugins are available, creates/deletes |
|
77 * extension factory accordingly and notifies clients. |
|
78 * |
|
79 * @since TB 9.2 |
|
80 */ |
|
81 void CreateExtensionFactoryL(); |
|
82 |
|
83 private: |
|
84 TCallBack iCallBack; |
|
85 CCCAExtensionFactory* iExtensionFactory; |
|
86 REComSession* iEComSession; |
|
87 |
|
88 }; |
|
89 |
|
90 #endif // CCAFACTORYEXTENSIONOBSERVER_H |