btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / servers / bluetooth / HCIDelegate.h
blobbe9c34f7449dbc8867fa65ad51cf9dbd569b872d
1 /*
2 * Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
3 * Copyright 2008 Mika Lindqvist, monni1995_at_gmail.com
4 * All rights reserved. Distributed under the terms of the MIT License.
5 */
6 #ifndef _HCIDELEGATE_H_
7 #define _HCIDELEGATE_H_
9 #include <fcntl.h>
10 #include <unistd.h>
11 #include <stdio.h>
12 #include <Path.h>
14 #include <bluetooth/HCI/btHCI_transport.h>
16 typedef void* raw_command;
19 class HCIDelegate {
21 public:
22 HCIDelegate(BPath* path)
24 //TODO create such queue
25 fIdentifier = -1;
29 hci_id Id(void) const
31 return fIdentifier;
35 virtual ~HCIDelegate()
40 virtual status_t IssueCommand(raw_command rc, size_t size)=0;
41 // TODO means to be private use QueueCommand
42 virtual status_t Launch()=0;
45 void FreeWindow(uint8 slots)
47 // TODO: hci control flow
51 status_t QueueCommand(raw_command rc, size_t size)
53 // TODO: this is suposed to queue the command in a queue so all
54 // are actually send to HW to implement HCI FlowControl requeriments
55 return IssueCommand(rc, size);
58 protected:
60 hci_id fIdentifier;
62 private:
66 #endif