|
1 /* |
|
2 * Copyright (c) 2002-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: Basic class for personalitites |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CUSBPERSONALITY_H |
|
20 #define CUSBPERSONALITY_H |
|
21 |
|
22 #include <bldvariant.hrh> |
|
23 #include <e32base.h> |
|
24 #include <usbman.h> |
|
25 #include <usbuinotif.h> |
|
26 #include <cusbpersonalitynotifier.h> |
|
27 |
|
28 class RUsb; |
|
29 class TUsbPersonalityParams; |
|
30 |
|
31 /** |
|
32 * Abstract interface to personality handler objects. |
|
33 * |
|
34 * @lib - |
|
35 * @since Series 60 3.0 |
|
36 */ |
|
37 class CUsbPersonality : public CActive |
|
38 { |
|
39 public: // New functions |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 |
|
45 virtual ~CUsbPersonality(); |
|
46 |
|
47 /** |
|
48 * DEPRICATED |
|
49 */ |
|
50 IMPORT_C virtual void ShowUsbConnectionNote(); |
|
51 |
|
52 virtual void ConfirmPersonalityUnload(TRequestStatus& aStatus) = 0; |
|
53 |
|
54 /** |
|
55 * Called by personality handler when personality start needs to be |
|
56 * prepared |
|
57 * @since Series 60 3.0 |
|
58 */ |
|
59 virtual void PreparePersonalityStart(TRequestStatus& aStatus) = 0; |
|
60 |
|
61 /** |
|
62 * Called by personality handler when personality start needs to be |
|
63 * finished |
|
64 * @since Series 60 3.0 |
|
65 */ |
|
66 virtual void FinishPersonalityStart(TRequestStatus& aStatus) = 0; |
|
67 |
|
68 /** |
|
69 * Called by personality handler when personality stop needs to be |
|
70 * prepared |
|
71 * @since Series 60 3.0 |
|
72 */ |
|
73 virtual void PreparePersonalityStop(TRequestStatus& aStatus) = 0; |
|
74 |
|
75 /** |
|
76 * Called by personality handler when personality stop needs to be |
|
77 * finished |
|
78 * @since Series 60 3.0 |
|
79 */ |
|
80 virtual void FinishPersonalityStop(TRequestStatus& aStatus) = 0; |
|
81 |
|
82 /** |
|
83 * State change notify |
|
84 * @since Series 60 3.0 |
|
85 * @param aState state of the device |
|
86 */ |
|
87 virtual void StateChangeNotify( TUsbDeviceState aState ) = 0; |
|
88 |
|
89 protected: |
|
90 |
|
91 /** |
|
92 * Constructor |
|
93 * @since S60 3.2 |
|
94 * @param aPersonalityParams Used to deliver information for personality |
|
95 */ |
|
96 IMPORT_C CUsbPersonality(TUsbPersonalityParams& aPersonalityParams); |
|
97 |
|
98 |
|
99 /** |
|
100 * This class contains information what might be needed by the personality |
|
101 */ |
|
102 TUsbPersonalityParams& iPersonalityParams; |
|
103 |
|
104 /** |
|
105 * Member variable used by connection notifier |
|
106 */ |
|
107 TUSBConnectionNotifierParamsPckg iPckg; |
|
108 |
|
109 /** |
|
110 * Member variable used by connection notifier |
|
111 */ |
|
112 TBuf8<1> iNoResult; |
|
113 }; |
|
114 |
|
115 #endif // CUSBPERSONALITY_H |
|
116 |
|
117 // End of File |