vfs: check userland buffers before reading them.
[haiku.git] / src / servers / bluetooth / LocalDeviceHandler.h
blob48b4bd9ae5ca7594ef90c4db0176dcdbe5a7474a
1 /*
2 * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
4 * All rights reserved. Distributed under the terms of the MIT License.
6 */
8 #ifndef _LOCALDEVICE_HANDLER_H_
9 #define _LOCALDEVICE_HANDLER_H_
11 #include <String.h>
13 #include <MessageQueue.h>
15 #include <bluetooth/bluetooth.h>
17 #include "HCIDelegate.h"
19 class LocalDeviceHandler {
21 public:
23 hci_id GetID();
25 bool Available();
26 void Acquire(void);
27 status_t Launch(void);
29 BMessage* GetPropertiesMessage(void) { return fProperties; }
30 bool IsPropertyAvailable(const char* property);
33 protected:
34 LocalDeviceHandler (HCIDelegate* hd);
35 virtual ~LocalDeviceHandler();
37 HCIDelegate* fHCIDelegate;
38 BMessage* fProperties;
40 void AddWantedEvent(BMessage* msg);
41 void ClearWantedEvent(BMessage* msg, uint16 event, uint16 opcode = 0);
42 void ClearWantedEvent(BMessage* msg);
44 BMessage* FindPetition(uint16 event, uint16 opcode = 0, int32* indexFound = NULL);
46 private:
48 BMessageQueue fEventsWanted;
53 #endif