1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Symbian Foundation License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "CUsbMassStorageScheduler.h" |
|
17 #include "CUsbMassStorageServer.h" |
|
18 |
|
19 /** |
|
20 * @file |
|
21 * @internal |
|
22 * |
|
23 * Creates a new Active scheduler |
|
24 */ |
|
25 CUsbMassStorageScheduler* CUsbMassStorageScheduler::NewL() |
|
26 { |
|
27 CUsbMassStorageScheduler* self = new(ELeave) CUsbMassStorageScheduler; |
|
28 CleanupStack::PushL(self); |
|
29 self->ConstructL(); |
|
30 CleanupStack::Pop(self); |
|
31 return self; |
|
32 } |
|
33 |
|
34 void CUsbMassStorageScheduler::ConstructL() |
|
35 /** |
|
36 * Performs 2nd phase construction of the USB scheduler. |
|
37 * |
|
38 * @internal |
|
39 */ |
|
40 { |
|
41 // Do nothing for now. May be remove altogether |
|
42 } |
|
43 |
|
44 /** |
|
45 * Destructor |
|
46 * |
|
47 * @internal |
|
48 */ |
|
49 CUsbMassStorageScheduler::~CUsbMassStorageScheduler() |
|
50 { |
|
51 // Nothing to do |
|
52 } |
|
53 |
|
54 /** |
|
55 * Give us a reference to the server |
|
56 * |
|
57 * @internal |
|
58 * @param aServer A reference to the server |
|
59 */ |
|
60 void CUsbMassStorageScheduler::SetServer(CUsbMassStorageServer& aServer) |
|
61 { |
|
62 iMsServer = &aServer; |
|
63 } |
|
64 |
|
65 /** |
|
66 * Inform the server that an error has occurred |
|
67 * |
|
68 * @internal |
|
69 * @param aError Error that has occurred |
|
70 */ |
|
71 void CUsbMassStorageScheduler::Error(TInt aError) const |
|
72 { |
|
73 __PRINT1(_L("CUsbMassStorageScheduler::Error aError=%d"), aError); |
|
74 |
|
75 if (iMsServer) |
|
76 { |
|
77 iMsServer->Error(aError); |
|
78 } |
|
79 } |
|
80 |
|