btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / servers / bluetooth / LocalDeviceImpl.h
blob7af07d4c763c9aada27dffa0072261a902268e82
1 /*
2 * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5 #ifndef _LOCALDEVICE_IMPL_H_
6 #define _LOCALDEVICE_IMPL_H_
8 #include <String.h>
10 #include <bluetooth/bluetooth.h>
12 #include "LocalDeviceHandler.h"
14 #include "HCIDelegate.h"
15 #include "HCIControllerAccessor.h"
16 #include "HCITransportAccessor.h"
18 class LocalDeviceImpl : public LocalDeviceHandler {
20 private:
21 LocalDeviceImpl(HCIDelegate* hd);
23 public:
25 // Factory methods
26 static LocalDeviceImpl* CreateControllerAccessor(BPath* path);
27 static LocalDeviceImpl* CreateTransportAccessor(BPath* path);
28 ~LocalDeviceImpl();
29 void Unregister();
31 void HandleEvent(struct hci_event_header* event);
33 // Request handling
34 status_t ProcessSimpleRequest(BMessage* request);
36 private:
37 void HandleUnexpectedEvent(struct hci_event_header* event);
38 void HandleExpectedRequest(struct hci_event_header* event,
39 BMessage* request);
41 // Events handling
42 void CommandComplete(struct hci_ev_cmd_complete* event, BMessage* request,
43 int32 index);
44 void CommandStatus(struct hci_ev_cmd_status* event, BMessage* request,
45 int32 index);
47 void NumberOfCompletedPackets(struct hci_ev_num_comp_pkts* event);
49 // Inquiry
50 void InquiryResult(uint8* numberOfResponses, BMessage* request);
51 void InquiryComplete(uint8* status, BMessage* request);
52 void RemoteNameRequestComplete(struct hci_ev_remote_name_request_complete_reply*
53 remotename, BMessage* request);
55 // Connection
56 void ConnectionComplete(struct hci_ev_conn_complete* event, BMessage* request);
57 void ConnectionRequest(struct hci_ev_conn_request* event, BMessage* request);
58 void DisconnectionComplete(struct hci_ev_disconnection_complete_reply* event,
59 BMessage* request);
61 // Pairing
62 void PinCodeRequest(struct hci_ev_pin_code_req* event, BMessage* request);
63 void RoleChange(struct hci_ev_role_change* event, BMessage* request);
64 void LinkKeyNotify(struct hci_ev_link_key_notify* event, BMessage* request);
65 void ReturnLinkKeys(struct hci_ev_return_link_keys* returnedKeys);
67 void LinkKeyRequested(struct hci_ev_link_key_req* keyReqyested,
68 BMessage* request);
70 void PageScanRepetitionModeChange(struct hci_ev_page_scan_rep_mode_change* event,
71 BMessage* request);
72 void MaxSlotChange(struct hci_ev_max_slot_change* event, BMessage* request);
74 void HardwareError(struct hci_ev_hardware_error* event);
78 #endif