DirectPrint/ImagePrintLibrary/inc/tidleevent.h
author Steven Cao <steven.1.cao@nokia.com>
Tue, 11 May 2010 14:10:02 +0800
changeset 19 2275db202402
parent 11 613a5ff70823
permissions -rw-r--r--
Pickup K3's code
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     1
/*
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     2
* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     3
* All rights reserved.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     4
* This component and the accompanying materials are made available
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     6
* which accompanies this distribution, and is available
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     8
*
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     9
* Initial Contributors:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    10
* Nokia Corporation - initial contribution.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    11
*
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    12
* Contributors:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    13
*
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    14
* Description:  Contains the types necesary for MIdleObserver TPrinter class definition.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    15
*
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    16
*/
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    17
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    18
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    19
#ifndef IDLEEVENT_H
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    20
#define IDLEEVENT_H
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    21
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    22
/** The severity associated of the notification.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    23
 */
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    24
enum TSeverity
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    25
	{
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    26
		///The event doesn't have a specific severity. Used in cases where severity is irrelevant, unknown or can be ignored.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    27
		ENotSpecified,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    28
		///The event does not cause an error
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    29
		ENoError,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    30
		///The event was caused by a warning. Generally this is recoverable.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    31
		EWarning,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    32
		///The event was caused by a fatal error. Generally this is not recoverable
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    33
		EFatal,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    34
		///The event was caused by a severe error. Generally this is a async leave
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    35
		ESevere
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    36
	};
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    37
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    38
/** The type of event the observer is being notified of. The types of events being raised vary by protocol
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    39
 */
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    40
enum TEventType
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    41
	{
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    42
		///The protocol has made a connection to the printer, device or transport
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    43
		EConnect,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    44
		///The protocol has been disconnected from the printer, device or transport
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    45
		EDisconnect,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    46
		///The protocol can be disconnected
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    47
		EDisconnectReady,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    48
		///The protocol cannot be disconnected
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    49
		EDisconnectNotReady,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    50
		///The device or printer is ready to accept print jobs
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    51
		EPrintReady,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    52
		///The device or printer is not ready to accept print jobs
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    53
		EPrintNotReady,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    54
		///The event is notifying a change in the device status, or is reporting an error sent from the device
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    55
		EPrinterStatus,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    56
		///The event is notifying that the capabilities that the printer supports have changed
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    57
		EPrinterCapabilityChanged,
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    58
		///The event is notifying that asynchronous leave has happened
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    59
		EAsynchronousLeave
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    60
	};
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    61
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    62
/** The event object. This object provides information about the event.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    63
 */
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    64
class TEvent
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    65
	{
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    66
	public:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    67
		/** The protocol that is sending the notification
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    68
		 *	@sa KImagePrint_PrinterProtocol_BPP @sa KImagePrint_PrinterProtocol_BIP @sa KImagePrint_PrinterProtocol_OPP 
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    69
		 *	@sa KImagePrint_PrinterProtocol_DPOF @sa KImagePrint_PrinterProtocol_PictBridge
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    70
		 */
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    71
		TInt iProtocol;
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    72
		///The associated severity of the event
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    73
		TSeverity iSeverity;
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    74
		///What kind of event is being sent
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    75
		TEventType iEventType;
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    76
	};
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    77
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    78
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    79
#endif	// IDLEEVENT_H
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    80
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    81
//  End of File