2008-03-13 20:13:39 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
|
|
|
* All rights reserved. Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2020-04-12 13:35:37 +00:00
|
|
|
|
|
|
|
|
2008-03-13 20:13:39 +00:00
|
|
|
#include <bluetooth/bluetooth.h>
|
2009-02-20 18:25:41 +00:00
|
|
|
#include <bluetooth/DiscoveryAgent.h>
|
2013-01-10 16:33:36 +00:00
|
|
|
#include <bluetooth/debug.h>
|
2009-02-20 18:25:41 +00:00
|
|
|
|
2008-03-13 20:13:39 +00:00
|
|
|
#include <bluetoothserver_p.h>
|
|
|
|
|
|
|
|
#include "KitSupport.h"
|
|
|
|
|
2020-04-12 13:35:37 +00:00
|
|
|
|
|
|
|
BMessenger*
|
|
|
|
_RetrieveBluetoothMessenger(void)
|
2008-03-13 20:13:39 +00:00
|
|
|
{
|
2013-01-10 16:33:36 +00:00
|
|
|
CALLED();
|
2008-03-15 15:34:39 +00:00
|
|
|
// Fix/review: leaking memory here
|
2008-03-13 20:13:39 +00:00
|
|
|
BMessenger* fMessenger = new BMessenger(BLUETOOTH_SIGNATURE);
|
|
|
|
|
2010-02-08 22:50:38 +00:00
|
|
|
if (fMessenger == NULL || !fMessenger->IsValid()) {
|
|
|
|
delete fMessenger;
|
|
|
|
return NULL;
|
|
|
|
} else
|
|
|
|
return fMessenger;
|
2008-03-13 20:13:39 +00:00
|
|
|
}
|
2009-02-20 18:25:41 +00:00
|
|
|
|
|
|
|
|
2020-04-12 13:35:37 +00:00
|
|
|
uint8
|
|
|
|
GetInquiryTime()
|
2009-02-20 18:25:41 +00:00
|
|
|
{
|
2013-01-10 16:33:36 +00:00
|
|
|
CALLED();
|
2009-02-20 18:25:41 +00:00
|
|
|
return BT_DEFAULT_INQUIRY_TIME;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-04-12 13:35:37 +00:00
|
|
|
void
|
|
|
|
SetInquiryTime(uint8 time)
|
2009-02-20 18:25:41 +00:00
|
|
|
{
|
2013-01-10 16:33:36 +00:00
|
|
|
CALLED();
|
2009-02-20 18:25:41 +00:00
|
|
|
((void)(time));
|
|
|
|
}
|