1 /* |
|
2 * Copyright (c) 2010 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 #include <usbuinotif.h> |
|
19 #include <NormalHardcodedAssert.h> |
|
20 |
|
21 #include "stifassertmacros.h" |
|
22 |
|
23 #include "mockcusbnotifmanager.h" |
|
24 |
|
25 #include "debug.h" |
|
26 #include "panic.h" |
|
27 |
|
28 // --------------------------------------------------------------------------- |
|
29 // ?description_if_needed |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 CUsbNotifManager::CUsbNotifManager() : |
|
33 iNotifId(INVALID_VALUE), |
|
34 iObserver(INVALID_VALUE), |
|
35 iUsbIconBlinking(EFalse), |
|
36 iUsbIconShown(EFalse) |
|
37 { |
|
38 iCat.iUid = INVALID_VALUE; |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // ?description_if_needed |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 void CUsbNotifManager::ConstructL() |
|
46 { |
|
47 LOG( ( "[USBOTGWATCHER]\tMockCUsbNotifManager::ConstructL" ) ); |
|
48 |
|
49 } |
|
50 |
|
51 CUsbNotifManager* CUsbNotifManager::NewL(CUsbOtgWatcher& aOtgWatcher) |
|
52 { |
|
53 LOG( ( "[USBOTGWATCHER]\tMockCUsbNotifManager::NewL" ) ); |
|
54 |
|
55 CUsbNotifManager* self = new( ELeave ) CUsbNotifManager(); |
|
56 CleanupStack::PushL( self ); |
|
57 self->ConstructL(); |
|
58 CleanupStack::Pop( self ); |
|
59 return self; |
|
60 } |
|
61 |
|
62 // --------------------------------------------------------------------------- |
|
63 // ?description_if_needed |
|
64 // --------------------------------------------------------------------------- |
|
65 // |
|
66 CUsbNotifManager::~CUsbNotifManager() |
|
67 { |
|
68 LOG( ( "[USBOTGWATCHER]\tMockCUsbNotifManager::~CUsbNotifManager" ) ); |
|
69 |
|
70 } |
|
71 |
|
72 // --------------------------------------------------------------------------- |
|
73 // ?description_if_needed |
|
74 // --------------------------------------------------------------------------- |
|
75 // |
|
76 void CUsbNotifManager::ShowNotifierL(TUid aCat, TUint aNotifId, MWaitNotifierObserver* aObserver ) |
|
77 { |
|
78 LOG3 ("[USBOTGWATCHER]\tMockCUsbNotifManager::ShowNotifier aCat = 0x%X aNotifId = %d, aObserver=0x%X", aCat, aNotifId, aObserver); |
|
79 iCat = aCat; |
|
80 iNotifId = aNotifId; |
|
81 iObserver = aObserver; |
|
82 } |
|
83 |
|
84 void CUsbNotifManager::BlinkIndicatorL(TBool aBlinking) |
|
85 { |
|
86 LOG1 ( "[USBOTGWATCHER]\tMockCUsbNotifManager::BlinkIndicatorL, aBlinking=%d", aBlinking); |
|
87 |
|
88 iUsbIconBlinking = aBlinking; |
|
89 } |
|
90 |
|
91 void CUsbNotifManager::ShowIndicatorL(TBool aVisible) |
|
92 { |
|
93 LOG1 ( "[USBOTGWATCHER]\tMockCUsbNotifManager::ShowIndicatorL, aVisible=%d", aVisible); |
|
94 |
|
95 iUsbIconShown = aVisible; |
|
96 iUsbIconBlinking = EFalse; |
|
97 } |
|
98 |
|
99 // --------------------------------------------------------------------------- |
|
100 // --------------------------------------------------------------------------- |
|
101 // |
|
102 void CUsbNotifManager::NotifierShowCompletedL(CUsbNotifier& aWaitNotifier, TInt aResult, TInt aFeedback) |
|
103 { |
|
104 LOG1 ( "[USBOTGWATCHER]\tMockCUsbNotifManager::NotifierShowCompleted aResult = %d", aResult); |
|
105 |
|
106 } |
|
107 |
|
108 void CUsbNotifManager::CloseAllNotifiers() |
|
109 { |
|
110 LOG( ( "[USBOTGWATCHER]\tMockCUsbNotifManager::CloseAllNotifiers" ) ); |
|
111 |
|
112 } |
|
113 |
|