|
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: |
|
15 * Header file for CUSBClassChangeUIPluginInterface class. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef USBCLASSCHANGEUIPLUGININTERFACE_H |
|
20 #define USBCLASSCHANGEUIPLUGININTERFACE_H |
|
21 |
|
22 // System includes |
|
23 #include <GSPluginInterface.h> |
|
24 |
|
25 |
|
26 /** |
|
27 * ECOM plug-in creation for the standalone application. |
|
28 * The view class must inherit this class to be able to signal the |
|
29 * destruction of the interface implementation. If this implementation |
|
30 * was created in the GS application, the destruction must not be |
|
31 * signalled, since the view framework does it. If this implementation |
|
32 * was created in the standalone USB UI application, the destruction |
|
33 * must be signalled, since otherwise there will be memory leaks. |
|
34 * |
|
35 * The inherited CGSPluginInterface destructor does not signal the |
|
36 * desctruction. Also, it cannot be signalled in the destructor of |
|
37 * this class, since it would be called while deleting the view. |
|
38 * This class stores the instance ID iDtor_ID_Key, because it can't |
|
39 * access the private member variable of class CGSPluginInterface. |
|
40 * |
|
41 * Note that the implementation is inline, because the concrete |
|
42 * plug-in has not been loaded. The implementation of this class can't |
|
43 * reside in the plug-in to be loaded by the ECOM framework. |
|
44 * |
|
45 */ |
|
46 class CUSBClassChangeUIPluginInterface : public CGSPluginInterface |
|
47 { |
|
48 public: // Constructors & destructors |
|
49 |
|
50 /** |
|
51 * Creates new USBClassChangeUI view plugin having the given UID. |
|
52 * Uses Leave code KErrNotFound, if implementation is not found. |
|
53 * |
|
54 * @param aImplementationUid Implementation UID of the plugin to be |
|
55 * created. |
|
56 * @param aInitParams The AppUi of the USBClassChangeUI application. |
|
57 * @return The new view. |
|
58 */ |
|
59 static CUSBClassChangeUIPluginInterface* NewL( |
|
60 const TUid aImplementationUid, |
|
61 TAny* aInitParams); |
|
62 |
|
63 /** |
|
64 * Destructor |
|
65 */ |
|
66 ~CUSBClassChangeUIPluginInterface(); |
|
67 |
|
68 /** |
|
69 * Signal destruction of the interface implementation to ECOM. |
|
70 * This should not be called from the GS plugin, since the |
|
71 * framework wants to do it itself. From the application, the |
|
72 * view must call this before destruction. |
|
73 */ |
|
74 void SignalDestruction(); |
|
75 |
|
76 protected: |
|
77 |
|
78 /** |
|
79 * Default constructor |
|
80 */ |
|
81 CUSBClassChangeUIPluginInterface(); |
|
82 |
|
83 private: // Data |
|
84 |
|
85 /** |
|
86 * ECOM plugin instance UID. |
|
87 * The inherited member variable with the same name is hidden, but |
|
88 * there is no way to access it. |
|
89 */ |
|
90 TUid iDtor_ID_Key; |
|
91 }; |
|
92 |
|
93 |
|
94 #include "USBClassChangeUIPluginInterface.inl" |
|
95 |
|
96 #endif //USBCLASSCHANGEUIPLUGININTERFACE_H |
|
97 //End of file |