xref: /haiku/src/kits/bluetooth/KitSupport.cpp (revision 899e0ef82b5624ace2ccfa5f5a58c8ebee54aaef)
1 /*
2  * Copyright 2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include <bluetooth/bluetooth.h>
8 #include <bluetooth/DiscoveryAgent.h>
9 #include <bluetooth/debug.h>
10 
11 #include <bluetoothserver_p.h>
12 
13 #include "KitSupport.h"
14 
15 
16 BMessenger*
17 _RetrieveBluetoothMessenger(void)
18 {
19 	CALLED();
20 	// Fix/review: leaking memory here
21 	BMessenger* fMessenger = new BMessenger(BLUETOOTH_SIGNATURE);
22 
23 	if (fMessenger == NULL || !fMessenger->IsValid()) {
24 		delete fMessenger;
25 		return NULL;
26 	} else
27 		return fMessenger;
28 }
29 
30 
31 uint8
32 GetInquiryTime()
33 {
34 	CALLED();
35 	return BT_DEFAULT_INQUIRY_TIME;
36 }
37 
38 
39 void
40 SetInquiryTime(uint8 time)
41 {
42 	CALLED();
43 	((void)(time));
44 }
45