|
1 /* |
|
2 * Copyright (c) 2004-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 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 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Contains the types necesary for MIdleObserver TPrinter class definition. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef IDLEEVENT_H |
|
20 #define IDLEEVENT_H |
|
21 |
|
22 /** The severity associated of the notification. |
|
23 */ |
|
24 enum TSeverity |
|
25 { |
|
26 ///The event doesn't have a specific severity. Used in cases where severity is irrelevant, unknown or can be ignored. |
|
27 ENotSpecified, |
|
28 ///The event does not cause an error |
|
29 ENoError, |
|
30 ///The event was caused by a warning. Generally this is recoverable. |
|
31 EWarning, |
|
32 ///The event was caused by a fatal error. Generally this is not recoverable |
|
33 EFatal, |
|
34 ///The event was caused by a severe error. Generally this is a async leave |
|
35 ESevere |
|
36 }; |
|
37 |
|
38 /** The type of event the observer is being notified of. The types of events being raised vary by protocol |
|
39 */ |
|
40 enum TEventType |
|
41 { |
|
42 ///The protocol has made a connection to the printer, device or transport |
|
43 EConnect, |
|
44 ///The protocol has been disconnected from the printer, device or transport |
|
45 EDisconnect, |
|
46 ///The protocol can be disconnected |
|
47 EDisconnectReady, |
|
48 ///The protocol cannot be disconnected |
|
49 EDisconnectNotReady, |
|
50 ///The device or printer is ready to accept print jobs |
|
51 EPrintReady, |
|
52 ///The device or printer is not ready to accept print jobs |
|
53 EPrintNotReady, |
|
54 ///The event is notifying a change in the device status, or is reporting an error sent from the device |
|
55 EPrinterStatus, |
|
56 ///The event is notifying that the capabilities that the printer supports have changed |
|
57 EPrinterCapabilityChanged, |
|
58 ///The event is notifying that asynchronous leave has happened |
|
59 EAsynchronousLeave |
|
60 }; |
|
61 |
|
62 /** The event object. This object provides information about the event. |
|
63 */ |
|
64 class TEvent |
|
65 { |
|
66 public: |
|
67 /** The protocol that is sending the notification |
|
68 * @sa KImagePrint_PrinterProtocol_BPP @sa KImagePrint_PrinterProtocol_BIP @sa KImagePrint_PrinterProtocol_OPP |
|
69 * @sa KImagePrint_PrinterProtocol_DPOF @sa KImagePrint_PrinterProtocol_PictBridge |
|
70 */ |
|
71 TInt iProtocol; |
|
72 ///The associated severity of the event |
|
73 TSeverity iSeverity; |
|
74 ///What kind of event is being sent |
|
75 TEventType iEventType; |
|
76 }; |
|
77 |
|
78 |
|
79 #endif // IDLEEVENT_H |
|
80 |
|
81 // End of File |