class WIDCOMMSDK CBtIf
{
public:
CBtIf();
virtual ~CBtIf();
// Application can use this function to start an inquiry.
//
BOOL StartInquiry();
// Application can use this function to stop an inquiry.
//
void StopInquiry();
// Application can use this function to start service discovery
//
BOOL StartDiscovery (BD_ADDR p_bda, GUID *p_service_guid);
// Servers should call this method to switch role to master if
// they want to accept multiple connections
static BOOL SwitchRole(BD_ADDR p_bda, MASTER_SLAVE_ROLE new_role);
//
// Define return code for Bond function
//
typedef enum
{
SUCCESS,
ALREADY_BONDED,
BAD_PARAMETER,
FAIL
} BOND_RETURN_CODE;
// Initiate dedicated bonding
BOND_RETURN_CODE Bond(BD_ADDR bda, LPTSTR pin_code);
// query if a device is bonded
BOOL BondQuery(BD_ADDR bda);
// Remove Bonding
BOOL UnBond(BD_ADDR bda);
// Application can use this function to get list of services on the remote device
//
int ReadDiscoveryRecords (BD_ADDR p_bda, int max_size, CSdpDiscoveryRec *p_list, GUID *p_guid_filter = NULL);
virtual void OnInquiryComplete (BOOL success, short num_responses) {}// {}
virtual void OnDeviceResponded (BD_ADDR bda, DEV_CLASS devClass, BD_NAME bdName, BOOL bConnected) {} // = 0;
virtual void OnDiscoveryComplete () {}// = 0;
// standard GUID values for common Bluetooth service classes
static const GUID guid_SERVCLASS_SERVICE_DISCOVERY_SERVER;
static const GUID guid_SERVCLASS_BROWSE_GROUP_DESCRIPTOR;
static const GUID guid_SERVCLASS_PUBLIC_BROWSE_GROUP;
static const GUID guid_SERVCLASS_SERIAL_PORT;
static const GUID guid_SERVCLASS_LAN_ACCESS_USING_PPP;
static const GUID guid_SERVCLASS_DIALUP_NETWORKING;
static const GUID guid_SERVCLASS_IRMC_SYNC;
static const GUID guid_SERVCLASS_OBEX_OBJECT_PUSH;
static const GUID guid_SERVCLASS_OBEX_FILE_TRANSFER;
static const GUID guid_SERVCLASS_IRMC_SYNC_COMMAND;
static const GUID guid_SERVCLASS_HEADSET;
static const GUID guid_SERVCLASS_CORDLESS_TELEPHONY;
static const GUID guid_SERVCLASS_INTERCOM;
static const GUID guid_SERVCLASS_FAX;
static const GUID guid_SERVCLASS_HEADSET_AUDIO_GATEWAY;
static const GUID guid_SERVCLASS_PNP_INFORMATION;
static const GUID guid_SERVCLASS_GENERIC_NETWORKING;
static const GUID guid_SERVCLASS_GENERIC_FILETRANSFER;
static const GUID guid_SERVCLASS_GENERIC_AUDIO;
static const GUID guid_SERVCLASS_GENERIC_TELEPHONY;
private:
BOOL m_bInquiryActive;
BOOL m_bDiscoveryActive;
BOOL m_tempRegistry;
GUID m_TempRegistryGUID;
void DeleteTempRegistry();
BOOL AddTempRegistry(GUID *p_GUID);
CWBtAPI *m_pBtApi;
friend class CBtIfFriend;
// This class will not support the compiler-supplied copy constructor or assignment operator,
// so these are declared private to prevent inadvertent use by the application.
CBtIf(const CBtIf & x);
CBtIf& operator= (const CBtIf & x);
};