|
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: Handles set personality request |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSETPERSONALITY_H |
|
20 #define CSETPERSONALITY_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class RUsbWatcher; |
|
25 class CRemotePersonalityHandler; // call back |
|
26 |
|
27 /** |
|
28 * Set Personality Request handler |
|
29 * |
|
30 * @lib usbremotepersonality.lib |
|
31 * @since S60 v.5.0 |
|
32 */ |
|
33 |
|
34 class CSetPersonality : public CActive |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * |
|
42 * @since S60 v.5.0 |
|
43 * @return Constructed instance |
|
44 */ |
|
45 static CSetPersonality* NewL(CRemotePersonalityHandler& aCallBack); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 * |
|
50 * @since S60 v.5.0 |
|
51 */ |
|
52 virtual ~CSetPersonality(); |
|
53 |
|
54 /** |
|
55 * Handles SET_PERSONALITY request |
|
56 * |
|
57 * @since S60 v.5.0 |
|
58 */ |
|
59 void SetPersonality(TUint aPersonalityId); |
|
60 |
|
61 /** |
|
62 * Sets link to UsbWatcher |
|
63 * |
|
64 * @since S60 v.5.0 |
|
65 */ |
|
66 void SetUsbWatcher(RUsbWatcher* aUsbWatcher); |
|
67 |
|
68 private: |
|
69 |
|
70 /** |
|
71 * Default constructor. |
|
72 * |
|
73 * @since S60 v.5.0 |
|
74 */ |
|
75 CSetPersonality(CRemotePersonalityHandler& aCallBack); |
|
76 |
|
77 /** |
|
78 * Two-phased constructor. |
|
79 * |
|
80 * @since S60 v.5.0 |
|
81 */ |
|
82 void ConstructL(); |
|
83 |
|
84 // from CActive |
|
85 |
|
86 /** |
|
87 * From CActive. |
|
88 * |
|
89 */ |
|
90 void RunL(); |
|
91 |
|
92 /** |
|
93 * From CActive. |
|
94 * |
|
95 */ |
|
96 void DoCancel(); |
|
97 |
|
98 /** |
|
99 * From CActive. |
|
100 * |
|
101 */ |
|
102 TInt RunError( TInt /*aError*/ ); |
|
103 |
|
104 private: // data |
|
105 |
|
106 /** |
|
107 * Callback class |
|
108 * Not owns. |
|
109 */ |
|
110 CRemotePersonalityHandler& iCallBack; |
|
111 |
|
112 /** |
|
113 * USB watcher |
|
114 * Not owns. |
|
115 */ |
|
116 RUsbWatcher* iUsbWatcher; |
|
117 |
|
118 }; |
|
119 |
|
120 #endif // CSETPERSONALITY_H |