
/*===========================================================================

FILE:      AEEBT.h
 
SERVICES:  AEE Bluetooth Data Structures
 
DESCRIPTION: This is the  header file for Bluetooth Files

PUBLIC CLASSES:  Not Applicable

INITIALIZATION AND SEQUENCING REQUIREMENTS:


        Copyright © 1999-2002 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
===========================================================================*/
#ifndef _AEEBT_H_
#define _AEEBT_H_

#include "AEE.h"

#ifdef __cplusplus
extern "C" {
#endif

// Blue tooth RFCOMM Server Channel
typedef uint8 AEEBTRCServerChannel;

// Base Defines

#define AEEBT_MAX_DEVICENAME_LEN	24
#define AEEBT_MAX_SERVICENAME_LEN	32

// Blue tooth Device Address
typedef PACKED struct tagAEEBTAddr
{
  char	caddr[6];
} GCCPACKED AEEBTAddr;

typedef PACKED struct tagAEEBTDevice
{
  AEEBTAddr		  bdaddr;
  uint16          usvcclass;
  uint16          uMajorDeviceClass;
  uint16          uMinorDeviceClass;
} GCCPACKED AEEBTDevice;


typedef PACKED struct tagAEEBTDeviceName
{
  AEEBTAddr	      bdaddr;
  char            szDevName[ AEEBT_MAX_DEVICENAME_LEN ];
} GCCPACKED AEEBTDeviceName;


typedef PACKED struct tagAEEBTServerChannel
{
  AEEBTAddr	       bdaddr;
  uint16           usvcclass;
  uint16           uscn;
} GCCPACKED AEEBTServerChannel;


#define AEEBT_BD_ADDRS_EQUAL( p1, p2 ) (                                 \
          (memcmp( (byte*)(p1), (byte*)(p2),                          \
                    sizeof( AEEBTAddr) ) == 0) ? TRUE : FALSE )

// Events Generated by the OEM Layer For the AEE Layer
typedef int32 AEEBTSdpEvts;
#define  AEEBT_SDP_DISCOVERY_COMPLETE			1
#define  AEEBT_SDP_DISCOVERY_INPROGRESS			2
#define  AEEBT_SDP_DEVICE_DISCOVERY_RESP		3
#define  AEEBT_SDP_DEVICE_NAME_RESP				4
#define  AEEBT_SDP_TIMEOUT_RESP					5
#define  AEEBT_SDP_ERROR_RESP					6
#define	 AEEBT_SDP_SERVER_CHANNEL_NUMBER_RESP	7

/*-------------------------------------------------------------------------*/
/*  AEE Bluetooth state type enumeration.                                  */
/*-------------------------------------------------------------------------*/
// Used by BT SIO Interface
typedef int32	AEEBTSioState;

#define  	AEEBT_ST_IDLE			0x0001
#define		AEEBT_ST_LISTENING		0x0002
#define		AEEBT_ST_CONNECTING 	0x0004
#define		AEEBT_ST_CONNECTED		0x0008
#define		AEEBT_ST_CLOSED			0x00010
	// READABLE/WRITEABLE
#define		AEEBT_ST_READABLE		0x0020
#define		AEEBT_ST_WRITEABLE		0x0040

/* For use with Service Discovery SERVICE Class Bitmap*/
typedef int32	AEEBTServiceclass;

#define	   AEEBT_SERVICE_CLASS_UNKNOWN                    0x0000
#define    AEEBT_SERVICE_CLASS_LIMITED_DISCOVERABLE_MODE  0x0001
#define    AEEBT_SERVICE_CLASS_NETWORKING                 0x0002
#define    AEEBT_SERVICE_CLASS_RENDERING                  0x0004
#define    AEEBT_SERVICE_CLASS_CAPTURING                  0x0008
#define    AEEBT_SERVICE_CLASS_OBJECT_TRANSFER            0x0010
#define    AEEBT_SERVICE_CLASS_AUDIO                      0x0020
#define    AEEBT_SERVICE_CLASS_TELEPHONY                  0x0040
#define    AEEBT_SERVICE_CLASS_INFORMATION                0x0080
#define    AEEBT_SERVICE_CLASS_ALL                        0x00FF




/* Bluetooth assigned UUIDs for Service Classes */
#define AEEBT_SD_SERVICE_CLASS_SERVICE_DISCOVERY_SERVER      0x1000
#define AEEBT_SD_SERVICE_CLASS_BROWSE_GROUP_DESCRIPTOR       0x1001
#define AEEBT_SD_SERVICE_CLASS_PUBLIC_BROWSE_GROUP           0x1002
#define AEEBT_SD_SERVICE_CLASS_SERIAL_PORT                   0x1101
#define AEEBT_SD_SERVICE_CLASS_LAN_ACCESS_PPP                0x1102
#define AEEBT_SD_SERVICE_CLASS_DIALUP_NETWORKING             0x1103
#define AEEBT_SD_SERVICE_CLASS_IR_MC_SYNC                    0x1104
#define AEEBT_SD_SERVICE_CLASS_OBEX_OBJECT_PUSH              0x1105
#define AEEBT_SD_SERVICE_CLASS_OBEX_FILE_TRANSFER            0x1106
#define AEEBT_SD_SERVICE_CLASS_IR_MC_SYNC_COMMAND            0x1107
#define AEEBT_SD_SERVICE_CLASS_HEADSET                       0x1108
#define AEEBT_SD_SERVICE_CLASS_CORDLESS_TELEPHONY            0x1109
#define AEEBT_SD_SERVICE_CLASS_INTERCOM                      0x1110
#define AEEBT_SD_SERVICE_CLASS_FAX                           0x1111
#define AEEBT_SD_SERVICE_CLASS_HEADSET_AUDIO_GATEWAY         0x1112
#define AEEBT_SD_SERVICE_CLASS_PNP_INFORMATION               0x1200
#define AEEBT_SD_SERVICE_CLASS_GENERIC_NETWORKING            0x1201
#define AEEBT_SD_SERVICE_CLASS_GENERIC_FILE_TRANSFER         0x1202
#define AEEBT_SD_SERVICE_CLASS_GENERIC_AUDIO                 0x1203
#define AEEBT_SD_SERVICE_CLASS_GENERIC_TELEPHONY             0x1204


typedef int32	AEEBTMajorDeviceClass;

#define  AEEBT_SD_MAJOR_DEVICE_CLASS_MISC                  0x0000
#define  AEEBT_SD_MAJOR_DEVICE_CLASS_COMPUTER              0x0100
#define  AEEBT_SD_MAJOR_DEVICE_CLASS_PHONE                 0x0200
#define  AEEBT_SD_MAJOR_DEVICE_CLASS_LAN_ACCESS_POINT      0x0300
#define  AEEBT_SD_MAJOR_DEVICE_CLASS_AUDIO                 0x0400
#define  AEEBT_SD_MAJOR_DEVICE_CLASS_PERIPHERAL            0x0500
#define  AEEBT_SD_MAJOR_DEVICE_CLASS_UNCLASSIFIED          0x1F00


typedef enum
{
  AEEBT_SD_MINOR_DEVICE_CLASS_UNCLASSIFIED         = 0x0000,

  AEEBT_SD_MINOR_DEVICE_CLASS_DESKTOP_WORKSTATION  = AEEBT_SD_MAJOR_DEVICE_CLASS_COMPUTER + 1,
  AEEBT_SD_MINOR_DEVICE_CLASS_SERVER_CLASS_COMPUTER,
  AEEBT_SD_MINOR_DEVICE_CLASS_LAPTOP,
  AEEBT_SD_MINOR_DEVICE_CLASS_HANDHELD_PC_OR_PDA,
  AEEBT_SD_MINOR_DEVICE_CLASS_PALM_SIZED_PC_OR_PDA,

  AEEBT_SD_MINOR_DEVICE_CLASS_CELLULAR             = AEEBT_SD_MAJOR_DEVICE_CLASS_PHONE + 1,
  AEEBT_SD_MINOR_DEVICE_CLASS_CORDLESS,
  AEEBT_SD_MINOR_DEVICE_CLASS_SMART_PHONE,
  AEEBT_SD_MINOR_DEVICE_CLASS_WIRED_MODEM_OR_VOICE_GATEWAY,

  AEEBT_SD_MINOR_DEVICE_CLASS_FULLY_AVAILABLE      = AEEBT_SD_MAJOR_DEVICE_CLASS_LAN_ACCESS_POINT,
  AEEBT_SD_MINOR_DEVICE_CLASS_1_TO_17_PERCENT_UTILIZED,
  AEEBT_SD_MINOR_DEVICE_CLASS_17_TO_33_PERCENT_UTILIZED,
  AEEBT_SD_MINOR_DEVICE_CLASS_33_TO_50_PERCENT_UTILIZED,
  AEEBT_SD_MINOR_DEVICE_CLASS_50_to_67_PERCENT_UTILIZED,
  AEEBT_SD_MINOR_DEVICE_CLASS_67_TO_83_PERCENT_UTILIZED,
  AEEBT_SD_MINOR_DEVICE_CLASS_83_TO_99_PERCENT_UTILIZED,
  AEEBT_SD_MINOR_DEVICE_CLASS_NO_SERVICE_AVAILABLE,

  BT_SD_MINOR_DEVICE_CLASS_HEADSET_PROFILE      = AEEBT_SD_MAJOR_DEVICE_CLASS_AUDIO + 1
} AEEBTMinorDeviceClass;
#ifdef __cplusplus
}
#endif
/*=====================================================================
  DATA STRUCTURE DOCUMENTATION
======================================================================= 

AEEBTAddr

Description:
   AEEBTAddr defines the Bluetooth address of the device. 

Definition:
   typedef PACKED struct tagAEEBTAddr
   {
     char	caddr[6];
   } GCCPACKED AEEBTAddr;

Members:
 
   caddr - Bluetooth address array


Comments:
   None.


See Also:
   None

======================================================================= 

AEEBTDevice

Description:
   AEEBTDevice specifies the Bluetooth attributes of a device. 

Definition:
   typedef PACKED struct tagAEEBTDevice
   {
     AEEBTAddr		  bdaddr;
     uint16          usvcclass;
     uint16          uMajorDeviceClass;
     uint16          uMinorDeviceClass;
   } GCCPACKED AEEBTDevice;

Members:
 
   bdaddr - Bluetooth device address

   usvclass - The service class of the device. Possible values are:
               AEEBT_SD_SERVICE_CLASS_SERVICE_DISCOVERY_SERVER
               AEEBT_SD_SERVICE_CLASS_BROWSE_GROUP_DESCRIPTOR
               AEEBT_SD_SERVICE_CLASS_PUBLIC_BROWSE_GROUP
               AEEBT_SD_SERVICE_CLASS_SERIAL_PORT
               AEEBT_SD_SERVICE_CLASS_LAN_ACCESS_PPP 
               AEEBT_SD_SERVICE_CLASS_DIALUP_NETWORKING
               AEEBT_SD_SERVICE_CLASS_IR_MC_SYNC
               AEEBT_SD_SERVICE_CLASS_OBEX_OBJECT_PUSH
               AEEBT_SD_SERVICE_CLASS_OBEX_FILE_TRANSFER
               AEEBT_SD_SERVICE_CLASS_IR_MC_SYNC_COMMAND
               AEEBT_SD_SERVICE_CLASS_HEADSET 
               AEEBT_SD_SERVICE_CLASS_CORDLESS_TELEPHONY
               AEEBT_SD_SERVICE_CLASS_INTERCOM
               AEEBT_SD_SERVICE_CLASS_FAX 
               AEEBT_SD_SERVICE_CLASS_HEADSET_AUDIO_GATEWAY
               AEEBT_SD_SERVICE_CLASS_PNP_INFORMATION
               AEEBT_SD_SERVICE_CLASS_GENERIC_NETWORKING 
               AEEBT_SD_SERVICE_CLASS_GENERIC_FILE_TRANSFER
               AEEBT_SD_SERVICE_CLASS_GENERIC_AUDIO
               AEEBT_SD_SERVICE_CLASS_GENERIC_TELEPHONY 

   uMajorDeviceClass - Major device class for this device. Possible values are:
               AEEBT_SD_MAJOR_DEVICE_CLASS_MISC
               AEEBT_SD_MAJOR_DEVICE_CLASS_COMPUTER           
               AEEBT_SD_MAJOR_DEVICE_CLASS_PHONE             
               AEEBT_SD_MAJOR_DEVICE_CLASS_LAN_ACCESS_POINT 
               AEEBT_SD_MAJOR_DEVICE_CLASS_AUDIO           
               AEEBT_SD_MAJOR_DEVICE_CLASS_PERIPHERAL     
               AEEBT_SD_MAJOR_DEVICE_CLASS_UNCLASSIFIED 

   uMinorDeviceClass - Minor device class for this device. Possible values are:
               AEEBT_SD_MINOR_DEVICE_CLASS_UNCLASSIFIED  
               AEEBT_SD_MINOR_DEVICE_CLASS_DESKTOP_WORKSTATION
               AEEBT_SD_MINOR_DEVICE_CLASS_SERVER_CLASS_COMPUTER
               AEEBT_SD_MINOR_DEVICE_CLASS_LAPTOP
               AEEBT_SD_MINOR_DEVICE_CLASS_HANDHELD_PC_OR_PDA
               AEEBT_SD_MINOR_DEVICE_CLASS_PALM_SIZED_PC_OR_PDA
               AEEBT_SD_MINOR_DEVICE_CLASS_CELLULAR 
               AEEBT_SD_MINOR_DEVICE_CLASS_CORDLESS
               AEEBT_SD_MINOR_DEVICE_CLASS_SMART_PHONE
               AEEBT_SD_MINOR_DEVICE_CLASS_WIRED_MODEM_OR_VOICE_GATEWAY
               AEEBT_SD_MINOR_DEVICE_CLASS_FULLY_AVAILABLE
               AEEBT_SD_MINOR_DEVICE_CLASS_1_TO_17_PERCENT_UTILIZED
               AEEBT_SD_MINOR_DEVICE_CLASS_17_TO_33_PERCENT_UTILIZED
               AEEBT_SD_MINOR_DEVICE_CLASS_33_TO_50_PERCENT_UTILIZED
               AEEBT_SD_MINOR_DEVICE_CLASS_50_to_67_PERCENT_UTILIZED
               AEEBT_SD_MINOR_DEVICE_CLASS_67_TO_83_PERCENT_UTILIZED
               AEEBT_SD_MINOR_DEVICE_CLASS_83_TO_99_PERCENT_UTILIZED
               AEEBT_SD_MINOR_DEVICE_CLASS_NO_SERVICE_AVAILABLE
Comments:
   None.


See Also:
   AEEBTDeviceList

======================================================================= 

AEEBTDeviceName

Description:
   AEEBTDeviceName specifies the Bluetooth device name of the device. The
   device name includes the Bluetooth address of the device.

Definition:
   typedef PACKED struct tagAEEBTDeviceName
   {
     AEEBTAddr	      bdaddr;
     char            szDevName[ AEEBT_MAX_DEVICENAME_LEN ];
   } GCCPACKED AEEBTDeviceName;

Members:
 
   bdaddr - Bluetooth address of the device
   szDevName - Name of the Bluetooth device.

Comments:
   None.


See Also:
   AEEBTAddr

======================================================================= 

AEEBTServerChannel

Description:
   AEEBTServerChannel specifies the channel number for a specific service
   from a remote Bluetooth.

Definition:
   typedef PACKED struct tagAEEBTServerChannel
   {
     AEEBTAddr	       bdaddr;
     uint16           usvcclass;
     uint16           uscn;
   } GCCPACKED AEEBTServerChannel;

Members:
 
   bdaddr      - Bluetooth address of the remote device
   usvcclass   - Service class for the specified service (see AEEBTDevice).
   uscn        - Channel no. for the service.

Comments:
   .


See Also:
   AEEBTAddr, AEEBTDevice

======================================================================= 

AEEBTRCServerChannel

Description:
   AEEBTRCServerChannel specifies the RFCOMM channel number for an
   RMCOMM service from a remote Bluetooth device.

Definition:
   typedef uint8 AEEBTRCServerChannel;

Members:
   None.

Comments:
   None.


See Also:
   None.


=======================================================================*/
#endif  //_AEEBT_H_

