/*
SktScanErrors.h
Error definitions for Socket ScanAPI
(c) Socket Mobile, Inc.
*/

/*
NOTES: 
IF ANY MODIFICATION IS MADE IN THIS FILE THE SCANAPI INTERFACE VERSION
WILL NEED TO BE UPDATED TO IDENTIFY THIS CHANGE.
THE SCANAPI INTERFACE VERSION IS DEFINED IN SktScanAPI.h
THE MODIFICATION MUST BE DESCRIBED IN ScanAPI.doc
*/



#ifndef _SktScanErrors_h_
#define _SktScanErrors_h_

// macro to know if the result is successful
#define SKTSUCCESS(result) (result>=0)

// macro to execute code only if the previous result
// was successful
#define SKTCHECKSUCCESS(result,Expression) SKTSUCCESS(result)?result=Expression:result


#define ESKT_WAITTIMEOUT					1L
#define ESKT_ALREADYDONE					2L
#define ESKT_PENDING						3L
#define ESKT_STILLPENDING					4L
#define ESKT_CREATED						5L

#define ESKT_NOERROR						0L

#define ESKT_TESTFAILED						-1L
#define ESKT_NOTENOUGHMEMORY				-2L
#define ESKT_UNABLECREATELOCK				-3L
#define ESKT_UNABLELOCK						-4L
#define ESKT_UNABLEUNLOCK					-5L
#define ESKT_LISTEMPTY						-6L
#define ESKT_UNABLECREATEEVENT				-7L
#define ESKT_UNABLESETEVENT					-8L
#define ESKT_UNABLERESETEVENT				-9L
#define ESKT_EVENTNOTCREATED				-10L
#define ESKT_INVALIDHANDLE					-11L
#define ESKT_UNABLECREATETHREAD				-12L
#define ESKT_THREADALREADYCREATED			-13L
#define ESKT_THREADSTILLRUNNING				-14L
#define ESKT_NOTSUPPORTED					-15L
#define ESKT_PENDINGOPERATIONNOTCOMPLETED	-16L
#define ESKT_NOTFOUND						-17L
#define ESKT_INVALIDPARAMETER				-18L
#define ESKT_NOTINITIALIZED					-19L
#define ESKT_TIMEOUTOUTOFRANGE				-20L
#define ESKT_UNABLEINITIALIZE				-21L
#define ESKT_UNABLEDEINITIALIZE				-22L
#define ESKT_UNKNOWNCONFIGURATION			-23L
#define ESKT_INVALIDCONFIGURATION			-24L
#define ESKT_ALREADYEXISTING				-25L
#define ESKT_BUFFERTOOSMALL					-26L
#define ESKT_UNABLEOPENDEVICE				-27L
#define ESKT_UNABLECONFIGUREDEVICE			-28L
#define ESKT_UNABLECONVERTSTRING			-29L
#define ESKT_UNABLECOPYSTRING				-30L
#define ESKT_DEVICENOTOPEN					-31L
#define ESKT_NOTAVAILABLE					-32L
#define ESKT_UNABLEWRITEFILE				-33L
#define ESKT_UNABLEREADFILE					-34L
#define ESKT_WAITFAILED						-35L
#define ESKT_INVALIDCHECKSUM				-36L
#define ESKT_COMMANDDENIED					-37L
#define ESKT_COMMUNICATIONERROR				-38L
#define ESKT_RECEIVEUNEXPECTEDCOMMAND		-39L
#define ESKT_UNABLECREATEGUID				-40L
#define ESKT_INVALIDVALUE					-41L
#define ESKT_REQUESTTIMEDOUT				-42L
#define ESKT_INVALIDOPERATION				-43L
#define ESKT_WRONGPROTOCOL					-44L
#define ESKT_QUEUERESETED					-45L
#define ESKT_EXCEEDINGMTUSIZE				-46L
#define ESKT_NOTHINGTOLISTEN				-47L
#define ESKT_OUTDATEDVERSION				-48L
#define ESKT_INVALIDXMLTAG					-49L

#define ESKT_UNABLEREGISTERFORHIDCHANGES	-50L
#define ESKT_UNABLERETRIEVEMESSAGE			-51L
#define ESKT_SYNTAXERROR					-52L
#define ESKT_UNABLEOPENFILE					-53L
#define ESKT_UNABLERETRIEVEPATH				-54L
#define ESKT_UNABLECREATEDIRECTORY			-55L
#define ESKT_UNABLEDELETEFILE				-56L
#define ESKT_UNABLEDELETEDIRECTORY			-57L

#define ESKT_UNABLEREADMODEMSTATUS			-60L

#define ESKT_UNABLEGETCLASSDEVICES			-61L
#define ESKT_UNABLEGETDEVICEINTERFACE		-62L
#define	ESKT_FILENOTFOUND					-63L
#define	ESKT_FILEACCESSDENIED				-64L

#define ESKT_UNABLEREADHIDINFO				-70L

#define ESKT_CONFLICTPROFILE				-80L
#define ESKT_DELETECURRENTPROFILE			-81L
#define ESKT_UNABLEINITIALIZEDATAEDITING	-82L
#define ESKT_UNKNOWNDATAEDITINGOPERATION	-83L
#define ESKT_INCORRECTNUMBEROFPARAMETERS	-84L
#define ESKT_INVALIDFORMAT					-85L
#define ESKT_INVALIDVERSION					-86L

#define ESKT_OVERLAYVIEWNOTSET				-90L
#define ESKT_CANCEL							-91L

#endif // _SktScanErrors_h_



