|
1 /* |
|
2 * Copyright (c) 2005-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: |
|
15 * Abstract base class for usbman extension plugins. |
|
16 * |
|
17 */ |
|
18 |
|
19 /** |
|
20 @file |
|
21 @publishedPartner |
|
22 @released |
|
23 */ |
|
24 |
|
25 #ifndef USBMANEXTENSIONPLUGIN_H |
|
26 #define USBMANEXTENSIONPLUGIN_H |
|
27 |
|
28 #include <e32base.h> |
|
29 #include <d32usbc.h> |
|
30 |
|
31 class MUsbmanExtensionPluginObserver; |
|
32 class MUsbDeviceNotify; |
|
33 |
|
34 /** |
|
35 The UID of the Usbman Extension Plugin interface. |
|
36 */ |
|
37 const TInt KUsbmanExtensionPluginInterfaceUid = 0x10208DD6; |
|
38 |
|
39 class CUsbmanExtensionPlugin : public CBase |
|
40 { |
|
41 public: |
|
42 /** |
|
43 Constructor. |
|
44 @param aImplementationUid The UID of the implementation. |
|
45 @param aObserver The observer of the plugin. |
|
46 */ |
|
47 IMPORT_C static CUsbmanExtensionPlugin* NewL(const TUid aImplementationUid, |
|
48 MUsbmanExtensionPluginObserver& aObserver); |
|
49 |
|
50 /** Destructor. */ |
|
51 IMPORT_C ~CUsbmanExtensionPlugin(); |
|
52 |
|
53 public: |
|
54 /** |
|
55 Called by Usbman server to get a pointer to an object which implements the |
|
56 ExtensionPlugin interface with UID aUid. This is a mechanism for allowing future |
|
57 change to the plugin API without breaking BC in existing (non-updated) |
|
58 plugins. |
|
59 */ |
|
60 virtual TAny* GetInterface(TUid aUid) = 0; |
|
61 |
|
62 protected: |
|
63 /** |
|
64 Constructor. |
|
65 @param aObserver The observer of the plugin. |
|
66 */ |
|
67 IMPORT_C CUsbmanExtensionPlugin(MUsbmanExtensionPluginObserver& aObserver); |
|
68 |
|
69 protected: |
|
70 /** |
|
71 Accessor for the observer. |
|
72 @return The observer. |
|
73 */ |
|
74 IMPORT_C MUsbmanExtensionPluginObserver& Observer(); |
|
75 |
|
76 private: // owned |
|
77 /** |
|
78 UID set by ECOM when the instance is created. Used when the instance is |
|
79 destroyed. |
|
80 */ |
|
81 TUid iInstanceId; |
|
82 |
|
83 private: // unowned |
|
84 MUsbmanExtensionPluginObserver& iObserver; |
|
85 }; |
|
86 |
|
87 #endif // USBMANEXTENSIONPLUGIN_H |