xref: /haiku/src/kits/bluetooth/KitSupport.cpp (revision 19733b44fa2862d0629d5dbfff0389bba79007d7)
123234fa5SOliver Ruiz Dorantes /*
223234fa5SOliver Ruiz Dorantes  * Copyright 2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
323234fa5SOliver Ruiz Dorantes  * All rights reserved. Distributed under the terms of the MIT License.
423234fa5SOliver Ruiz Dorantes  */
5*19733b44SAlexander von Gluck IV 
6*19733b44SAlexander von Gluck IV 
723234fa5SOliver Ruiz Dorantes #include <bluetooth/bluetooth.h>
8fa262f22SOliver Ruiz Dorantes #include <bluetooth/DiscoveryAgent.h>
9fef016caSFredrik Modéen #include <bluetooth/debug.h>
10fa262f22SOliver Ruiz Dorantes 
1123234fa5SOliver Ruiz Dorantes #include <bluetoothserver_p.h>
1223234fa5SOliver Ruiz Dorantes 
1323234fa5SOliver Ruiz Dorantes #include "KitSupport.h"
1423234fa5SOliver Ruiz Dorantes 
15*19733b44SAlexander von Gluck IV 
16*19733b44SAlexander von Gluck IV BMessenger*
_RetrieveBluetoothMessenger(void)17*19733b44SAlexander von Gluck IV _RetrieveBluetoothMessenger(void)
1823234fa5SOliver Ruiz Dorantes {
19fef016caSFredrik Modéen 	CALLED();
200ba3dcf5SOliver Ruiz Dorantes 	// Fix/review: leaking memory here
2123234fa5SOliver Ruiz Dorantes 	BMessenger* fMessenger = new BMessenger(BLUETOOTH_SIGNATURE);
2223234fa5SOliver Ruiz Dorantes 
23cee04e80SArtur Wyszynski 	if (fMessenger == NULL || !fMessenger->IsValid()) {
24cee04e80SArtur Wyszynski 		delete fMessenger;
2523234fa5SOliver Ruiz Dorantes 		return NULL;
26cee04e80SArtur Wyszynski 	} else
2723234fa5SOliver Ruiz Dorantes 		return fMessenger;
2823234fa5SOliver Ruiz Dorantes }
29fa262f22SOliver Ruiz Dorantes 
30fa262f22SOliver Ruiz Dorantes 
31*19733b44SAlexander von Gluck IV uint8
GetInquiryTime()32*19733b44SAlexander von Gluck IV GetInquiryTime()
33fa262f22SOliver Ruiz Dorantes {
34fef016caSFredrik Modéen 	CALLED();
35fa262f22SOliver Ruiz Dorantes 	return BT_DEFAULT_INQUIRY_TIME;
36fa262f22SOliver Ruiz Dorantes }
37fa262f22SOliver Ruiz Dorantes 
38fa262f22SOliver Ruiz Dorantes 
39*19733b44SAlexander von Gluck IV void
SetInquiryTime(uint8 time)40*19733b44SAlexander von Gluck IV SetInquiryTime(uint8 time)
41fa262f22SOliver Ruiz Dorantes {
42fef016caSFredrik Modéen 	CALLED();
43fa262f22SOliver Ruiz Dorantes 	((void)(time));
44fa262f22SOliver Ruiz Dorantes }
45