www.pudn.com > BlueSoleil_SDK1.0.0.zip > Btsdk_Macro.h


/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
* 
* Copyright (c) 1999-2007 IVT Corporation 
* 
* All rights reserved. 
*  
---------------------------------------------------------------------------*/ 
  
///////////////////////////////////////////////////////////////////////////// 
// Module Name: 
//     Btsdk_Macro.h 
// Abstract: 
//     This Module defines macros used by APIs and structures. 
// Usage: 
//     #include "Btsdk_Macro.h" 
//  
// Author://      
//      
// Revision History: 
//     2007-12-25		Created 
//  
///////////////////////////////////////////////////////////////////////////// 
 
 
 
#ifndef _BTSDK_MACRO_H 
#define _BTSDK_MACRO_H 
 
 
typedef char BTINT8; 
typedef unsigned char BTUINT8; 
typedef unsigned char BTBOOL; 
typedef short BTINT16; 
typedef unsigned short BTUINT16; 
typedef long BTINT32; 
typedef unsigned long BTUINT32; 
typedef void * BTLPVOID; 
 
typedef BTUINT32 BTDEVHDL; 
typedef BTUINT32 BTSVCHDL; 
typedef BTUINT32 BTCONNHDL; 
typedef BTUINT32 BTSHCHDL; 
typedef BTUINT32 BTSDKHANDLE; 
 
#ifndef FUNC_EXPORT 
#define FUNC_EXPORT  
 
#endif 
 
 
#define BTSDK_TRUE		1 
#define BTSDK_FALSE		0 
 
 
 
/* Max size value used in service attribute structures */ 
#define BTSDK_SERVICENAME_MAXLENGTH				80 
#define BTSDK_MAX_SUPPORT_FORMAT				6		/* OPP format number */ 
#define BTSDK_PATH_MAXLENGTH					256		/* Shall not be larger than FTP_MAX_PATH and OPP_MAX_PATH */ 
#define BTSDK_CARDNAME_MAXLENGTH				256		/* Shall not be larger than OPP_MAX_NAME */ 
#define BTSDK_PACKETTYPE_MAXNUM					10		/* PAN supported network packet type */ 
 
/* Max size value used in device attribute structures */ 
#define BTSDK_DEVNAME_LEN						64		/* Shall not be larger than MAX_NAME_LEN */ 
#define BTSDK_SHORTCUT_NAME_LEN					100 
#define BTSDK_BDADDR_LEN						6 
#define BTSDK_LINKKEY_LEN						16 
#define BTSDK_PINCODE_LEN						16 
 
/* Invalid handle value for all handle type */ 
#define BTSDK_INVALID_HANDLE					0x00000000 
 
/* Error Code List */ 
#define BTSDK_OK												0x0000 
 
/* SDP error */ 
#define BTSDK_ER_SDP_INDEX										0x00C0 
#define BTSDK_ER_SERVER_IS_ACTIVE								(BTSDK_ER_SDP_INDEX + 0x0000) 
#define BTSDK_ER_NO_SERVICE										(BTSDK_ER_SDP_INDEX + 0x0001) 
#define BTSDK_ER_SERVICE_RECORD_NOT_EXIST						(BTSDK_ER_SDP_INDEX + 0x0002) 
 
/* General Error */ 
#define BTSDK_ER_GENERAL_INDEX									0x0300 
#define BTSDK_ER_HANDLE_NOT_EXIST								(BTSDK_ER_GENERAL_INDEX + 0x0001) 
#define BTSDK_ER_OPERATION_FAILURE								(BTSDK_ER_GENERAL_INDEX + 0x0002) 
#define BTSDK_ER_SDK_UNINIT										(BTSDK_ER_GENERAL_INDEX + 0x0003) 
#define BTSDK_ER_INVALID_PARAMETER								(BTSDK_ER_GENERAL_INDEX + 0x0004) 
#define BTSDK_ER_NULL_POINTER									(BTSDK_ER_GENERAL_INDEX + 0x0005) 
#define BTSDK_ER_NO_MEMORY										(BTSDK_ER_GENERAL_INDEX + 0x0006) 
#define BTSDK_ER_BUFFER_NOT_ENOUGH								(BTSDK_ER_GENERAL_INDEX + 0x0007) 
#define BTSDK_ER_FUNCTION_NOTSUPPORT							(BTSDK_ER_GENERAL_INDEX + 0x0008) 
#define BTSDK_ER_NO_FIXED_PIN_CODE								(BTSDK_ER_GENERAL_INDEX + 0x0009) 
#define BTSDK_ER_CONNECTION_EXIST								(BTSDK_ER_GENERAL_INDEX + 0x000A) 
#define BTSDK_ER_OPERATION_CONFLICT								(BTSDK_ER_GENERAL_INDEX + 0x000B) 
#define BTSDK_ER_NO_MORE_CONNECTION_ALLOWED						(BTSDK_ER_GENERAL_INDEX + 0x000C) 
#define BTSDK_ER_ITEM_EXIST										(BTSDK_ER_GENERAL_INDEX + 0x000D) 
#define BTSDK_ER_ITEM_INUSE										(BTSDK_ER_GENERAL_INDEX + 0x000E) 
#define BTSDK_ER_DEVICE_UNPAIRED								(BTSDK_ER_GENERAL_INDEX + 0x000F) 
 
/* HCI Error */ 
#define BTSDK_ER_HCI_INDEX										0x0400 
#define BTSDK_ER_UNKNOWN_HCI_COMMAND							(BTSDK_ER_HCI_INDEX + 0x0001) 
#define BTSDK_ER_NO_CONNECTION									(BTSDK_ER_HCI_INDEX + 0x0002) 
#define BTSDK_ER_HARDWARE_FAILURE								(BTSDK_ER_HCI_INDEX + 0x0003) 
#define BTSDK_ER_PAGE_TIMEOUT									(BTSDK_ER_HCI_INDEX + 0x0004) 
#define BTSDK_ER_AUTHENTICATION_FAILURE							(BTSDK_ER_HCI_INDEX + 0x0005) 
#define BTSDK_ER_KEY_MISSING									(BTSDK_ER_HCI_INDEX + 0x0006) 
#define BTSDK_ER_MEMORY_FULL									(BTSDK_ER_HCI_INDEX + 0x0007) 
#define BTSDK_ER_CONNECTION_TIMEOUT								(BTSDK_ER_HCI_INDEX + 0x0008) 
#define BTSDK_ER_MAX_NUMBER_OF_CONNECTIONS						(BTSDK_ER_HCI_INDEX + 0x0009) 
#define BTSDK_ER_MAX_NUMBER_OF_SCO_CONNECTIONS					(BTSDK_ER_HCI_INDEX + 0x000A) 
#define BTSDK_ER_ACL_CONNECTION_ALREADY_EXISTS					(BTSDK_ER_HCI_INDEX + 0x000B) 
#define BTSDK_ER_COMMAND_DISALLOWED								(BTSDK_ER_HCI_INDEX + 0x000C) 
#define BTSDK_ER_HOST_REJECTED_LIMITED_RESOURCES				(BTSDK_ER_HCI_INDEX + 0x000D) 
#define BTSDK_ER_HOST_REJECTED_SECURITY_REASONS					(BTSDK_ER_HCI_INDEX + 0x000E) 
#define BTSDK_ER_HOST_REJECTED_PERSONAL_DEVICE					(BTSDK_ER_HCI_INDEX + 0x000F) 
#define BTSDK_ER_HOST_TIMEOUT									(BTSDK_ER_HCI_INDEX + 0x0010) 
#define BTSDK_ER_UNSUPPORTED_FEATURE							(BTSDK_ER_HCI_INDEX + 0x0011) 
#define BTSDK_ER_INVALID_HCI_COMMAND_PARAMETERS					(BTSDK_ER_HCI_INDEX + 0x0012) 
#define BTSDK_ER_PEER_DISCONNECTION_USER_END					(BTSDK_ER_HCI_INDEX + 0x0013) 
#define BTSDK_ER_PEER_DISCONNECTION_LOW_RESOURCES				(BTSDK_ER_HCI_INDEX + 0x0014) 
#define BTSDK_ER_PEER_DISCONNECTION_TO_POWER_OFF				(BTSDK_ER_HCI_INDEX + 0x0015) 
#define BTSDK_ER_LOCAL_DISCONNECTION							(BTSDK_ER_HCI_INDEX + 0x0016) 
#define BTSDK_ER_REPEATED_ATTEMPTS								(BTSDK_ER_HCI_INDEX + 0x0017) 
#define BTSDK_ER_PAIRING_NOT_ALLOWED							(BTSDK_ER_HCI_INDEX + 0x0018) 
#define BTSDK_ER_UNKNOWN_LMP_PDU								(BTSDK_ER_HCI_INDEX + 0x0019) 
#define BTSDK_ER_UNSUPPORTED_REMOTE_FEATURE						(BTSDK_ER_HCI_INDEX + 0x001A) 
#define BTSDK_ER_SCO_OFFSET_REJECTED							(BTSDK_ER_HCI_INDEX + 0x001B) 
#define BTSDK_ER_SCO_INTERVAL_REJECTED							(BTSDK_ER_HCI_INDEX + 0x001C) 
#define BTSDK_ER_SCO_AIR_MODE_REJECTED							(BTSDK_ER_HCI_INDEX + 0x001D) 
#define BTSDK_ER_INVALID_LMP_PARAMETERS							(BTSDK_ER_HCI_INDEX + 0x001E) 
#define BTSDK_ER_UNSPECIFIED_ERROR								(BTSDK_ER_HCI_INDEX + 0x001F) 
#define BTSDK_ER_UNSUPPORTED_LMP_PARAMETER_VALUE				(BTSDK_ER_HCI_INDEX + 0x0020) 
#define BTSDK_ER_ROLE_CHANGE_NOT_ALLOWED						(BTSDK_ER_HCI_INDEX + 0x0021) 
#define BTSDK_ER_LMP_RESPONSE_TIMEOUT							(BTSDK_ER_HCI_INDEX + 0x0022) 
#define BTSDK_ER_LMP_ERROR_TRANSACTION_COLLISION				(BTSDK_ER_HCI_INDEX + 0x0023) 
#define BTSDK_ER_LMP_PDU_NOT_ALLOWED							(BTSDK_ER_HCI_INDEX + 0x0024) 
#define BTSDK_ER_ENCRYPTION_MODE_NOT_ACCEPTABLE					(BTSDK_ER_HCI_INDEX + 0x0025) 
#define BTSDK_ER_UNIT_KEY_USED									(BTSDK_ER_HCI_INDEX + 0x0026) 
#define BTSDK_ER_QOS_IS_NOT_SUPPORTED							(BTSDK_ER_HCI_INDEX + 0x0027) 
#define BTSDK_ER_INSTANT_PASSED									(BTSDK_ER_HCI_INDEX + 0x0028) 
#define BTSDK_ER_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED			(BTSDK_ER_HCI_INDEX + 0x0029) 
#define BTSDK_ER_DIFFERENT_TRANSACTION_COLLISION				(BTSDK_ER_HCI_INDEX + 0x002A) 
#define BTSDK_ER_QOS_UNACCEPTABLE_PARAMETER						(BTSDK_ER_HCI_INDEX + 0x002C) 
#define BTSDK_ER_QOS_REJECTED									(BTSDK_ER_HCI_INDEX + 0x002D) 
#define BTSDK_ER_CHANNEL_CLASS_NOT_SUPPORTED					(BTSDK_ER_HCI_INDEX + 0x002E) 
#define BTSDK_ER_INSUFFICIENT_SECURITY							(BTSDK_ER_HCI_INDEX + 0x002F) 
#define BTSDK_ER_PARAMETER_OUT_OF_RANGE							(BTSDK_ER_HCI_INDEX + 0x0030) 
#define BTSDK_ER_ROLE_SWITCH_PENDING							(BTSDK_ER_HCI_INDEX + 0x0032) 
#define BTSDK_ER_RESERVED_SLOT_VIOLATION						(BTSDK_ER_HCI_INDEX + 0x0034) 
#define BTSDK_ER_ROLE_SWITCH_FAILED								(BTSDK_ER_HCI_INDEX + 0x0035) 
 
/* OBEX error */ 
#define BTSDK_ER_OBEX_INDEX										0x0600 
#define BTSDK_ER_CONTINUE										(BTSDK_ER_OBEX_INDEX + 0x0090) 
#define BTSDK_ER_SUCCESS										(BTSDK_ER_OBEX_INDEX + 0x00A0) 
#define BTSDK_ER_CREATED										(BTSDK_ER_OBEX_INDEX + 0x00A1) 
#define BTSDK_ER_ACCEPTED										(BTSDK_ER_OBEX_INDEX + 0x00A2) 
#define BTSDK_ER_NON_AUTH_INFO									(BTSDK_ER_OBEX_INDEX + 0x00A3) 
#define BTSDK_ER_NO_CONTENT										(BTSDK_ER_OBEX_INDEX + 0x00A4) 
#define BTSDK_ER_RESET_CONTENT									(BTSDK_ER_OBEX_INDEX + 0x00A5) 
#define BTSDK_ER_PARTIAL_CONTENT								(BTSDK_ER_OBEX_INDEX + 0x00A6) 
#define BTSDK_ER_MULT_CHOICES									(BTSDK_ER_OBEX_INDEX + 0x00B0) 
#define BTSDK_ER_MOVE_PERM										(BTSDK_ER_OBEX_INDEX + 0x00B1) 
#define BTSDK_ER_MOVE_TEMP										(BTSDK_ER_OBEX_INDEX + 0x00B2) 
#define BTSDK_ER_SEE_OTHER										(BTSDK_ER_OBEX_INDEX + 0x00B3) 
#define BTSDK_ER_NOT_MODIFIED									(BTSDK_ER_OBEX_INDEX + 0x00B4) 
#define BTSDK_ER_USE_PROXY										(BTSDK_ER_OBEX_INDEX + 0x00B5) 
#define BTSDK_ER_BAD_REQUEST									(BTSDK_ER_OBEX_INDEX + 0x00C0) 
#define BTSDK_ER_UNAUTHORIZED									(BTSDK_ER_OBEX_INDEX + 0x00C1) 
#define BTSDK_ER_PAY_REQ										(BTSDK_ER_OBEX_INDEX + 0x00C2) 
#define BTSDK_ER_FORBIDDEN										(BTSDK_ER_OBEX_INDEX + 0x00C3) 
#define BTSDK_ER_NOTFOUND										(BTSDK_ER_OBEX_INDEX + 0x00C4) 
#define BTSDK_ER_METHOD_NOT_ALLOWED								(BTSDK_ER_OBEX_INDEX + 0x00C5) 
#define BTSDK_ER_NOT_ACCEPTABLE									(BTSDK_ER_OBEX_INDEX + 0x00C6) 
#define BTSDK_ER_PROXY_AUTH_REQ									(BTSDK_ER_OBEX_INDEX + 0x00C7) 
#define BTSDK_ER_REQUEST_TIMEOUT								(BTSDK_ER_OBEX_INDEX + 0x00C8) 
#define BTSDK_ER_CONFLICT										(BTSDK_ER_OBEX_INDEX + 0x00C9) 
#define BTSDK_ER_GONE											(BTSDK_ER_OBEX_INDEX + 0x00CA) 
#define BTSDK_ER_LEN_REQ										(BTSDK_ER_OBEX_INDEX + 0x00CB) 
#define BTSDK_ER_PREC_FAIL										(BTSDK_ER_OBEX_INDEX + 0x00CC) 
#define BTSDK_ER_REQ_ENTITY_TOO_LARGE							(BTSDK_ER_OBEX_INDEX + 0x00CD) 
#define BTSDK_ER_URL_TOO_LARGE									(BTSDK_ER_OBEX_INDEX + 0x00CE) 
#define BTSDK_ER_UNSUPPORTED_MEDIA_TYPE							(BTSDK_ER_OBEX_INDEX + 0x00CF) 
#define BTSDK_ER_SVR_ERR										(BTSDK_ER_OBEX_INDEX + 0x00D0) 
#define BTSDK_ER_NOTIMPLEMENTED									(BTSDK_ER_OBEX_INDEX + 0x00D1) 
#define BTSDK_ER_BAD_GATEWAY									(BTSDK_ER_OBEX_INDEX + 0x00D2) 
#define BTSDK_ER_SERVICE_UNAVAILABLE							(BTSDK_ER_OBEX_INDEX + 0x00D3) 
#define BTSDK_ER_GATEWAY_TIMEOUT								(BTSDK_ER_OBEX_INDEX + 0x00D4) 
#define BTSDK_ER_HTTP_NOTSUPPORT								(BTSDK_ER_OBEX_INDEX + 0x00D5) 
#define BTSDK_ER_DATABASE_FULL									(BTSDK_ER_OBEX_INDEX + 0x00E0) 
#define BTSDK_ER_DATABASE_LOCK									(BTSDK_ER_OBEX_INDEX + 0x00E1) 
 
/* Class of Device */ 
/*major service classes*/ 
#define BTSDK_SRVCLS_LDM						0x002000     /* Limited Discoverable Mode */ 
#define BTSDK_SRVCLS_POSITION					0x010000 
#define BTSDK_SRVCLS_NETWORK					0x020000 
#define BTSDK_SRVCLS_RENDER						0x040000 
#define BTSDK_SRVCLS_CAPTURE					0x080000 
#define BTSDK_SRVCLS_OBJECT						0x100000 
#define BTSDK_SRVCLS_AUDIO						0x200000 
#define BTSDK_SRVCLS_TELEPHONE					0x400000 
#define BTSDK_SRVCLS_INFOR						0x800000 
#define BTSDK_SRVCLS_MASK(a)					(((BTUINT32)(a) >> 13) & 0x7FF) 
 
/*major device classes*/			                                     
#define BTSDK_DEVCLS_MISC						0x000000 
#define BTSDK_DEVCLS_COMPUTER					0x000100 
#define BTSDK_DEVCLS_PHONE						0x000200 
#define BTSDK_DEVCLS_LAP						0x000300 
#define BTSDK_DEVCLS_AUDIO						0x000400 
#define BTSDK_DEVCLS_PERIPHERAL					0x000500 
#define BTSDK_DEVCLS_IMAGE             			0x000600 
#define BTSDK_DEVCLS_WEARABLE          			0x000700 
#define BTSDK_DEVCLS_UNCLASSIFIED				0x001F00 
#define BTSDK_DEVCLS_MASK(a)					(((BTUINT32)(a) >> 8) & 0x1F) 
#define BTSDK_MINDEVCLS_MASK(a)					(((BTUINT32)(a) >> 2) & 0x3F) 
 
/*the minor device class field - computer major class */ 
#define BTSDK_COMPCLS_UNCLASSIFIED				(BTSDK_DEVCLS_COMPUTER | 0x000000)  
#define BTSDK_COMPCLS_DESKTOP					(BTSDK_DEVCLS_COMPUTER | 0x000004) 
#define BTSDK_COMPCLS_SERVER            		(BTSDK_DEVCLS_COMPUTER | 0x000008) 
#define BTSDK_COMPCLS_LAPTOP            		(BTSDK_DEVCLS_COMPUTER | 0x00000C) 
#define BTSDK_COMPCLS_HANDHELD				  	(BTSDK_DEVCLS_COMPUTER | 0x000010) 
#define BTSDK_COMPCLS_PALMSIZED					(BTSDK_DEVCLS_COMPUTER | 0x000014) 
#define BTSDK_COMPCLS_WEARABLE					(BTSDK_DEVCLS_COMPUTER | 0x000018) 
 
/*the minor device class field - phone major class*/ 
#define BTSDK_PHONECLS_UNCLASSIFIED   			(BTSDK_DEVCLS_PHONE | 0x000000)  
#define BTSDK_PHONECLS_CELLULAR         		(BTSDK_DEVCLS_PHONE | 0x000004) 
#define BTSDK_PHONECLS_CORDLESS        			(BTSDK_DEVCLS_PHONE | 0x000008) 
#define BTSDK_PHONECLS_SMARTPHONE    			(BTSDK_DEVCLS_PHONE | 0x00000C) 
#define BTSDK_PHONECLS_WIREDMODEM    			(BTSDK_DEVCLS_PHONE | 0x000010) 
#define BTSDK_PHONECLS_COMMONISDNACCESS			(BTSDK_DEVCLS_PHONE | 0x000014) 
#define BTSDK_PHONECLS_SIMCARDREADER			(BTSDK_DEVCLS_PHONE | 0x000018) 
 
/*the minor device class field - LAN/Network access point major class*/ 
#define BTSDK_LAP_FULLY             	    	(BTSDK_DEVCLS_LAP | 0x000000) 
#define BTSDK_LAP_17              		       	(BTSDK_DEVCLS_LAP | 0x000020) 
#define BTSDK_LAP_33              		       	(BTSDK_DEVCLS_LAP | 0x000040) 
#define BTSDK_LAP_50                		   	(BTSDK_DEVCLS_LAP | 0x000060) 
#define BTSDK_LAP_67              		       	(BTSDK_DEVCLS_LAP | 0x000080) 
#define BTSDK_LAP_83              		       	(BTSDK_DEVCLS_LAP | 0x0000A0) 
#define BTSDK_LAP_99               		      	(BTSDK_DEVCLS_LAP | 0x0000C0) 
#define BTSDK_LAP_NOSRV       			       	(BTSDK_DEVCLS_LAP | 0x0000E0) 
 
/*the minor device class field - Audio/Video major class*/ 
#define BTSDK_AV_UNCLASSIFIED        		   	(BTSDK_DEVCLS_AUDIO | 0x000000) 
#define BTSDK_AV_HEADSET              		  	(BTSDK_DEVCLS_AUDIO | 0x000004) 
#define BTSDK_AV_HANDSFREE           		  	(BTSDK_DEVCLS_AUDIO | 0x000008) 
#define BTSDK_AV_HEADANDHAND           			(BTSDK_DEVCLS_AUDIO | 0x00000C) 
#define BTSDK_AV_MICROPHONE            			(BTSDK_DEVCLS_AUDIO | 0x000010)  
#define BTSDK_AV_LOUDSPEAKER           			(BTSDK_DEVCLS_AUDIO | 0x000014) 
#define BTSDK_AV_HEADPHONES            			(BTSDK_DEVCLS_AUDIO | 0x000018) 
#define BTSDK_AV_PORTABLEAUDIO     				(BTSDK_DEVCLS_AUDIO | 0x00001C) 
#define BTSDK_AV_CARAUDIO          		     	(BTSDK_DEVCLS_AUDIO | 0x000020) 
#define BTSDK_AV_SETTOPBOX       		       	(BTSDK_DEVCLS_AUDIO | 0x000024) 
#define BTSDK_AV_HIFIAUDIO          		   	(BTSDK_DEVCLS_AUDIO | 0x000028) 
#define BTSDK_AV_VCR                     		(BTSDK_DEVCLS_AUDIO | 0x00002C) 
#define BTSDK_AV_VIDEOCAMERA      		     	(BTSDK_DEVCLS_AUDIO | 0x000030) 
#define BTSDK_AV_CAMCORDER           	  		(BTSDK_DEVCLS_AUDIO | 0x000034) 
#define BTSDK_AV_VIDEOMONITOR	        	 	(BTSDK_DEVCLS_AUDIO | 0x000038) 
#define BTSDK_AV_VIDEODISPANDLOUDSPK		 	(BTSDK_DEVCLS_AUDIO | 0x00003C)  
#define BTSDK_AV_VIDEOCONFERENCE     	  		(BTSDK_DEVCLS_AUDIO | 0x000040) 
#define BTSDK_AV_GAMEORTOY             			(BTSDK_DEVCLS_AUDIO | 0x000048) 
 
/*the minor device class field - peripheral major class*/ 
#define BTSDK_PERIPHERAL_UNCLASSIFIED			(BTSDK_DEVCLS_PERIPHERAL | 0x000000)  
#define BTSDK_PERIPHERAL_JOYSTICK				(BTSDK_DEVCLS_PERIPHERAL | 0x000004) 
#define BTSDK_PERIPHERAL_GAMEPAD				(BTSDK_DEVCLS_PERIPHERAL | 0x000008) 
#define BTSDK_PERIPHERAL_REMCONTROL				(BTSDK_DEVCLS_PERIPHERAL | 0x00000C) 
#define BTSDK_PERIPHERAL_SENSE				 	(BTSDK_DEVCLS_PERIPHERAL | 0x000010) 
#define BTSDK_PERIPHERAL_TABLET				 	(BTSDK_DEVCLS_PERIPHERAL | 0x000014) 
#define BTSDK_PERIPHERAL_SIMCARDREADER			(BTSDK_DEVCLS_PERIPHERAL | 0x000018) 
#define BTSDK_PERIPHERAL_KEYBOARD			 	(BTSDK_DEVCLS_PERIPHERAL | 0x000040)     
#define BTSDK_PERIPHERAL_POINT			    	(BTSDK_DEVCLS_PERIPHERAL | 0x000080) 
#define BTSDK_PERIPHERAL_KEYORPOINT			 	(BTSDK_DEVCLS_PERIPHERAL | 0x0000C0) 
 
/*the minor device class field - imaging major class*/ 
#define BTSDK_IMAGE_DISPLAY					   	(BTSDK_DEVCLS_IMAGE | 0x000010) 
#define BTSDK_IMAGE_CAMERA					   	(BTSDK_DEVCLS_IMAGE | 0x000020) 
#define BTSDK_IMAGE_SCANNER					   	(BTSDK_DEVCLS_IMAGE | 0x000040) 
#define BTSDK_IMAGE_PRINTER					   	(BTSDK_DEVCLS_IMAGE | 0x000080) 
 
/*the minor device class field - wearable major class*/ 
#define BTSDK_WERABLE_WATCH					   	(BTSDK_DEVCLS_WEARABLE | 0x000004) 
#define BTSDK_WERABLE_PAGER					   	(BTSDK_DEVCLS_WEARABLE | 0x000008) 
#define BTSDK_WERABLE_JACKET				   	(BTSDK_DEVCLS_WEARABLE | 0x00000C) 
#define BTSDK_WERABLE_HELMET				   	(BTSDK_DEVCLS_WEARABLE | 0x000010) 
#define BTSDK_WERABLE_GLASSES				   	(BTSDK_DEVCLS_WEARABLE | 0x000014) 
 
/* Class of Service */ 
#define BTSDK_CLS_SERIAL_PORT					0x1101 
#define BTSDK_CLS_LAN_ACCESS					0x1102 
#define BTSDK_CLS_DIALUP_NET					0x1103 
#define BTSDK_CLS_IRMC_SYNC						0x1104 
#define BTSDK_CLS_OBEX_OBJ_PUSH					0x1105 
#define BTSDK_CLS_OBEX_FILE_TRANS				0x1106 
#define BTSDK_CLS_IRMC_SYNC_CMD					0x1107 
#define BTSDK_CLS_HEADSET						0x1108 
#define BTSDK_CLS_CORDLESS_TELE					0x1109 
#define BTSDK_CLS_AUDIO_SOURCE					0x110A	 
#define BTSDK_CLS_AUDIO_SINK					0x110B 
#define BTSDK_CLS_AVRCP_TG						0x110C 
#define BTSDK_CLS_ADV_AUDIO_DISTRIB				0x110D 
#define BTSDK_CLS_AVRCP_CT						0x110E 
#define BTSDK_CLS_VIDEO_CONFERENCE				0x110F 
#define BTSDK_CLS_INTERCOM						0x1110 
#define BTSDK_CLS_FAX							0x1111 
#define BTSDK_CLS_HEADSET_AG					0x1112 
#define BTSDK_CLS_WAP							0x1113 
#define BTSDK_CLS_WAP_CLIENT					0x1114 
#define BTSDK_CLS_PAN_PANU						0x1115 
#define BTSDK_CLS_PAN_NAP						0x1116 
#define BTSDK_CLS_PAN_GN						0x1117 
#define BTSDK_CLS_DIRECT_PRINT					0x1118 
#define BTSDK_CLS_REF_PRINT						0x1119 
#define BTSDK_CLS_IMAGING						0x111A 
#define BTSDK_CLS_IMAG_RESPONDER				0x111B 
#define BTSDK_CLS_IMAG_AUTO_ARCH				0x111C 
#define BTSDK_CLS_IMAG_REF_OBJ					0x111D 
#define BTSDK_CLS_HANDSFREE						0x111E 
#define BTSDK_CLS_HANDSFREE_AG					0x111F 
#define BTSDK_CLS_DPS_REF_OBJ			        0x1120 
#define BTSDK_CLS_REFLECTED_UI			        0x1121 
#define BTSDK_CLS_BASIC_PRINT			        0x1122 
#define BTSDK_CLS_PRINT_STATUS			        0x1123 
#define BTSDK_CLS_HID							0x1124 
#define BTSDK_CLS_HCRP							0x1125 
#define BTSDK_CLS_HCR_PRINT						0x1126 
#define BTSDK_CLS_HCR_SCAN						0x1127 
#define BTSDK_CLS_SIM_ACCESS					0x112D 
#define BTSDK_CLS_PBAP_PCE					    0x112E 
#define BTSDK_CLS_PBAP_PSE					    0x112F 
#define BTSDK_CLS_PHONEBOOK_ACCESS			    0x1130 
#define BTSDK_CLS_PNP_INFO						0x1200 
 
/* Type of Connection Event */ 
#define BTSDK_APP_EV_CONN_IND					0x01	 
#define BTSDK_APP_EV_DISC_IND					0x02 
#define BTSDK_APP_EV_CONN_CFM					0x07	 
#define BTSDK_APP_EV_DISC_CFM					0x08 
 
/* Definitions for Compatibility */ 
#define BTSDK_APP_EV_CONN						0x01	 
#define BTSDK_APP_EV_DISC						0x02	 
 
 
#define BTSDK_APP_EV_BASE						0x100 
/* OPP specific event */ 
#define BTSDK_APP_EV_OPP_BASE				    0x200 
#define BTSDK_APP_EV_OPP_PULL					(BTSDK_APP_EV_OPP_BASE+2) 
#define BTSDK_APP_EV_OPP_PUSH					(BTSDK_APP_EV_OPP_BASE+3) 
#define BTSDK_APP_EV_OPP_PUSH_CARD				(BTSDK_APP_EV_OPP_BASE+4) 
#define BTSDK_APP_EV_OPP_EXCHG					(BTSDK_APP_EV_OPP_BASE+5) 
 
/* FTP specific event */ 
#define BTSDK_APP_EV_FTP_BASE					0x300 
#define BTSDK_APP_EV_FTP_PUT					(BTSDK_APP_EV_FTP_BASE+0) 
#define BTSDK_APP_EV_FTP_GET				    (BTSDK_APP_EV_FTP_BASE+1) 
#define BTSDK_APP_EV_FTP_DEL_FILE				(BTSDK_APP_EV_FTP_BASE+3) 
#define BTSDK_APP_EV_FTP_DEL_FOLDER				(BTSDK_APP_EV_FTP_BASE+4)	 
 
/* AVRCP specific event. */ 
#define BTSDK_APP_EV_AVRCP_BASE							0xB00 
/* AVRCP TG specific event. */ 
#define BTSDK_APP_EV_AVTG_BASE							BTSDK_APP_EV_AVRCP_BASE 
#define BTSDK_APP_EV_AVTG_ATTACHPLAYER_IND				(BTSDK_APP_EV_AVTG_BASE + 0x01) 
#define BTSDK_APP_EV_AVRCP_DETACHPLAYER_IND 			(BTSDK_APP_EV_AVTG_BASE + 0x03) 
#define BTSDK_APP_EV_AVRCP_IND_CONN 					BTSDK_APP_EV_AVTG_ATTACHPLAYER_IND 
#define BTSDK_APP_EV_AVRCP_IND_DISCONN 					BTSDK_APP_EV_AVRCP_DETACHPLAYER_IND 
 
 
//startbluetooth error extend 
#define BTSDK_ER_FAIL_INITIALIZE_BTSDK		(BTSDK_ER_APPEXTEND_INDEX + 0x0006) 
#define BTSDK_BLUETOOTH_STATUS_FLAG			0x0002 //status change about Bluetooth 
 
//status change about Bluetooth 
#define BTSDK_BTSTATUS_TURNON				0x0001 
#define BTSDK_BTSTATUS_TURNOFF				0x0002 
#define BTSDK_BTSTATUS_HWPLUGGED			0x0003 
#define BTSDK_BTSTATUS_HWPULLED				0x0004 
 
 
/*AV/C Panel Commands operation_id*/ 
#define BTSDK_AVRCP_OPID_AVC_PANEL_POWER 				0x40 
#define BTSDK_AVRCP_OPID_AVC_PANEL_VOLUME_UP 			0x41 
#define BTSDK_AVRCP_OPID_AVC_PANEL_VOLUME_DOWN 			0x42 
#define BTSDK_AVRCP_OPID_AVC_PANEL_MUTE					0x43 
#define BTSDK_AVRCP_OPID_AVC_PANEL_PLAY 				0x44 
#define BTSDK_AVRCP_OPID_AVC_PANEL_STOP  				0x45 
#define BTSDK_AVRCP_OPID_AVC_PANEL_PAUSE 				0x46 
#define BTSDK_AVRCP_OPID_AVC_PANEL_RECORD 				0x47 
#define BTSDK_AVRCP_OPID_AVC_PANEL_REWIND 				0x48 
#define BTSDK_AVRCP_OPID_AVC_PANEL_FAST_FORWARD 		0x49 
#define BTSDK_AVRCP_OPID_AVC_PANEL_EJECT 				0x4a 
#define BTSDK_AVRCP_OPID_AVC_PANEL_FORWARD 				0x4b 
#define BTSDK_AVRCP_OPID_AVC_PANEL_BACKWARD 			0x4c 
 
/*button state(0: pressed 1: released)*/ 
/*used by Btsdk_AVRCP_Passthrough_Cmd_Func parameter state_flag*/ 
#define BTSDK_AVRCP_BUTTON_STATE_PRESSED         		0 
#define BTSDK_AVRCP_BUTTON_STATE_RELEASED   			1 
 
/* Possible roles for member 'role' in _BtSdkConnectionPropertyStru */ 
#define BTSDK_CONNROLE_INITIATOR				0x2 
#define BTSDK_CONNROLE_ACCEPTOR					0x1 
 
/* Possible op_type member of Btsdk_FTPBrowseFolder */ 
#define FTP_OP_REFRESH	0 
#define FTP_OP_UPDIR	1 
#define FTP_OP_NEXT		2 
 
/* Type of Callback Indication */ 
#define BTSDK_INQUIRY_RESULT_IND  		0x04 
#define BTSDK_INQUIRY_COMPLETE_IND 		0x05 
#define BTSDK_CONNECTION_EVENT_IND  	0x09 
 
/* Discovery Mode for Btsdk_SetDiscoveryMode() and Btsdk_GetDiscoveryMode() */ 
#define BTSDK_GENERAL_DISCOVERABLE				0x01 
#define BTSDK_LIMITED_DISCOVERABLE				0x02 
#define BTSDK_DISCOVERABLE						BTSDK_GENERAL_DISCOVERABLE 
#define BTSDK_CONNECTABLE						0x04 
#define BTSDK_PAIRABLE							0x08 
#define BTSDK_DISCOVERY_DEFAULT_MODE			(BTSDK_DISCOVERABLE | BTSDK_CONNECTABLE | BTSDK_PAIRABLE) 
 
/*for win32 only*/ 
/* PAN Event */ 
#define BTSDK_PAN_EV_BASE			0x00000100 
#define BTSDK_PAN_EV_IP_CHANGE		BTSDK_PAN_EV_BASE + 1 
 
 
#define	DEVICE_CLASS_MASK		0x1FFC 
#define IS_SAME_TYPE_DEVICE_CLASS(a, b)	(((a) & DEVICE_CLASS_MASK) == ((b) & DEVICE_CLASS_MASK)) 
 
/* Default role of local device when creating a new ACL connection. */ 
#define BTSDK_MASTER_ROLE						0x00 
#define BTSDK_SLAVE_ROLE						0x01 
 
/* Possible values for "flag" parameter of Btsdk_StartEnumRemoteDevice. */ 
#define BTSDK_ERD_FLAG_NOLIMIT		0x00000000 
#define BTSDK_ERD_FLAG_PAIRED		0x00000001 
#define BTSDK_ERD_FLAG_CONNECTED	0x00000002 
#define BTSDK_ERD_FLAG_INQUIRED		0x00000004 
#define BTSDK_ERD_FLAG_TRUSTED		0x00000020 
#define BTSDK_ERD_FLAG_DEVCLASS		0x00010000 
 
/* Possible values for "mask" member of BtSdkRemoteDevicePropertyStru structure. */ 
#define BTSDK_RDPM_HANDLE			0x0001 
#define BTSDK_RDPM_ADDRESS			0x0002 
#define BTSDK_RDPM_NAME				0x0004 
#define BTSDK_RDPM_CLASS			0x0008 
#define BTSDK_RDPM_LMPINFO			0x0010 
#define BTSDK_RDPM_LINKKEY			0x0020 
 
/* Possible ACL connection packet type */ 
#define BTSDK_ACL_PKT_2DH1			0x0002		/* Only supported by V2.0EDR */ 
#define BTSDK_ACL_PKT_3DH1			0x0004		/* Only supported by V2.0EDR */ 
#define BTSDK_ACL_PKT_DM1			0x0008 
#define BTSDK_ACL_PKT_DH1			0x0010 
#define BTSDK_ACL_PKT_2DH3			0x0100		/* Only supported by V2.0EDR */ 
#define BTSDK_ACL_PKT_3DH3			0x0200		/* Only supported by V2.0EDR */ 
#define BTSDK_ACL_PKT_DM3			0x0400 
#define BTSDK_ACL_PKT_DH3			0x0800 
#define BTSDK_ACL_PKT_2DH5			0x1000		/* Only supported by V2.0EDR */ 
#define BTSDK_ACL_PKT_3DH5			0x2000		/* Only supported by V2.0EDR */ 
#define BTSDK_ACL_PKT_DM5			0x4000 
#define BTSDK_ACL_PKT_DH5			0x8000 
 
/* Possible flags for member 'mask' in _BtSdkSDPSearchPatternStru */ 
#define BTSDK_SSPM_UUID16					0x0001 
#define BTSDK_SSPM_UUID32					0x0002 
#define BTSDK_SSPM_UUID128					0x0004 
 
/* Possible flags for member 'mask' in _BtSdkRemoteServiceAttrStru */ 
#define BTSDK_RSAM_SERVICENAME					0x0001 
#define BTSDK_RSAM_EXTATTRIBUTES				0x0002 
 
#define BTSDK_MAX_SEARCH_PATTERNS				12 
 
/* Possible parameters for Btsdk_VDIInstallDev */ 
#define HARDWAREID_MDMDUN		TEXT("{F12D3CF8-B11D-457e-8641-BE2AF2D6D204}\\MDMBTGEN336") 
#define HARDWAREID_MDMFAX		TEXT("{F12D3CF8-B11D-457e-8641-BE2AF2D6D204}\\MDMBTFAX") 
 
/* Parameters for Btsdk_PlugOutVComm and Btsdk_PlugInVComm */ 
#define COMM_SET_USAGETYPE	0x00000001 
#define COMM_SET_RECORD		0x00000010 
 
 
 
#endif