123234fa5SOliver Ruiz Dorantes /* 223234fa5SOliver Ruiz Dorantes * Copyright 2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com 323234fa5SOliver Ruiz Dorantes * 423234fa5SOliver Ruiz Dorantes * All rights reserved. Distributed under the terms of the MIT License. 523234fa5SOliver Ruiz Dorantes * 623234fa5SOliver Ruiz Dorantes */ 723234fa5SOliver Ruiz Dorantes 823234fa5SOliver Ruiz Dorantes 923234fa5SOliver Ruiz Dorantes #include <bluetooth/bluetooth.h> 1023234fa5SOliver Ruiz Dorantes #include <bluetoothserver_p.h> 1123234fa5SOliver Ruiz Dorantes 1223234fa5SOliver Ruiz Dorantes #include "KitSupport.h" 1323234fa5SOliver Ruiz Dorantes 1423234fa5SOliver Ruiz Dorantes 15*0ba3dcf5SOliver Ruiz Dorantes 16*0ba3dcf5SOliver Ruiz Dorantes 1723234fa5SOliver Ruiz Dorantes BMessenger* _RetrieveBluetoothMessenger(void) 1823234fa5SOliver Ruiz Dorantes { 19*0ba3dcf5SOliver Ruiz Dorantes // Fix/review: leaking memory here 2023234fa5SOliver Ruiz Dorantes BMessenger* fMessenger = new BMessenger(BLUETOOTH_SIGNATURE); 2123234fa5SOliver Ruiz Dorantes 2223234fa5SOliver Ruiz Dorantes if (fMessenger == NULL || !fMessenger->IsValid()) 2323234fa5SOliver Ruiz Dorantes return NULL; 2423234fa5SOliver Ruiz Dorantes else 2523234fa5SOliver Ruiz Dorantes return fMessenger; 2623234fa5SOliver Ruiz Dorantes } 27