|
1 /* |
|
2 * Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "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 * Kanrikogaku Kenkyusho, Ltd. - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "directprintscheduler.h" |
|
20 #include "mprotprintingdevice.h" |
|
21 #include "tidleevent.h" |
|
22 #include "printmessagecodes.h" |
|
23 #include "clog.h" |
|
24 |
|
25 void CDirectPrintScheduler::Error(TInt aError) const |
|
26 { |
|
27 LOG1("CDirectPrintScheduler::Error aError: %d", aError); |
|
28 if( iIdleObserver ) |
|
29 { |
|
30 TEvent event; |
|
31 event.iProtocol = iCurrentProtocol; |
|
32 event.iSeverity = ESevere; |
|
33 event.iEventType = EAsynchronousLeave; |
|
34 LOG("CDirectPrintScheduler::Error informing observer"); |
|
35 iIdleObserver->StatusEvent( event, aError, ENoMessage ); |
|
36 } |
|
37 LOG("CDirectPrintScheduler::Error end"); |
|
38 } |
|
39 |
|
40 void CDirectPrintScheduler::SetIdleObserver( MProtIdleObserver& aIdleObserver ) |
|
41 { |
|
42 LOG("CDirectPrintScheduler::SetIdleObserver begin"); |
|
43 iIdleObserver = &aIdleObserver; |
|
44 LOG("CDirectPrintScheduler::SetIdleObserver end"); |
|
45 } |
|
46 |
|
47 void CDirectPrintScheduler::SetCurrentProtocol( TInt aProtocol ) |
|
48 { |
|
49 LOG1("CDirectPrintScheduler::SetCurrentProtocol aProtocol: %d", aProtocol); |
|
50 iCurrentProtocol = aProtocol; |
|
51 LOG("CDirectPrintScheduler::SetCurrentProtocol end"); |
|
52 } |
|
53 |
|
54 // End of File |