|
1 /* |
|
2 * Copyright (c) 2008-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 * |
|
16 */ |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #include "subcommandbase.h" |
|
24 #include "msmm_internal_def.h" |
|
25 #include "msmmserver.h" |
|
26 #include "eventhandler.h" |
|
27 |
|
28 #include <usb/usblogger.h> |
|
29 |
|
30 #ifdef __FLOG_ACTIVE |
|
31 _LIT8(KLogComponent, "UsbHostMsmmServer"); |
|
32 #endif |
|
33 |
|
34 THostMsSubCommandParam::THostMsSubCommandParam(MMsmmSrvProxy& aServer, |
|
35 MUsbMsEventHandler& aHandler, |
|
36 MUsbMsSubCommandCreator& aCreator, |
|
37 TDeviceEvent& aEvent) : |
|
38 iServer(aServer), |
|
39 iHandler(aHandler), |
|
40 iCreator(aCreator), |
|
41 iEvent(aEvent) |
|
42 { |
|
43 LOG_FUNC |
|
44 } |
|
45 |
|
46 TSubCommandBase::TSubCommandBase(THostMsSubCommandParam& aParameter): |
|
47 iServer(aParameter.iServer), |
|
48 iHandler(aParameter.iHandler), |
|
49 iCreator(aParameter.iCreator), |
|
50 iEvent(aParameter.iEvent), |
|
51 iIsExecuted(EFalse), |
|
52 iIsKeyCommand(ETrue) |
|
53 { |
|
54 LOG_FUNC |
|
55 } |
|
56 |
|
57 void TSubCommandBase::ExecuteL() |
|
58 { |
|
59 iIsExecuted = ETrue; |
|
60 DoExecuteL(); |
|
61 } |
|
62 |
|
63 void TSubCommandBase::AsyncCmdCompleteL() |
|
64 { |
|
65 LOG_FUNC |
|
66 DoAsyncCmdCompleteL(); |
|
67 } |
|
68 |
|
69 void TSubCommandBase::CancelAsyncCmd() |
|
70 { |
|
71 LOG_FUNC |
|
72 DoCancelAsyncCmd(); |
|
73 } |
|
74 |
|
75 void TSubCommandBase::DoAsyncCmdCompleteL() |
|
76 { |
|
77 LOG_FUNC |
|
78 // Empty implementation |
|
79 } |
|
80 |
|
81 void TSubCommandBase::DoCancelAsyncCmd() |
|
82 { |
|
83 LOG_FUNC |
|
84 // Empty implementation |
|
85 } |
|
86 |
|
87 // End of file |