A bit more styling on main headers

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26743 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Ruiz Dorantes 2008-08-02 21:15:02 +00:00
parent 7cc9a52df8
commit 001662ae04
18 changed files with 293 additions and 352 deletions

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BLUETOOTH_DEVICE_H #ifndef _BLUETOOTH_DEVICE_H
#define _BLUETOOTH_DEVICE_H #define _BLUETOOTH_DEVICE_H
@ -42,4 +39,4 @@ class BluetoothDevice {
using Bluetooth::BluetoothDevice; using Bluetooth::BluetoothDevice;
#endif #endif
#endif #endif // _BLUETOOTH_DEVICE_H

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _DEVICE_CLASS_H #ifndef _DEVICE_CLASS_H
#define _DEVICE_CLASS_H #define _DEVICE_CLASS_H
@ -66,4 +63,4 @@ class DeviceClass {
using Bluetooth::DeviceClass; using Bluetooth::DeviceClass;
#endif #endif
#endif #endif // _DEVICE_CLASS_H

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _DISCOVERY_AGENT_H #ifndef _DISCOVERY_AGENT_H
#define _DISCOVERY_AGENT_H #define _DISCOVERY_AGENT_H
@ -70,4 +67,4 @@ class DiscoveryAgent {
using Bluetooth::DiscoveryAgent; using Bluetooth::DiscoveryAgent;
#endif #endif
#endif #endif // _DISCOVERY_AGENT_H

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _DISCOVERY_LISTENER_H #ifndef _DISCOVERY_LISTENER_H
#define _DISCOVERY_LISTENER_H #define _DISCOVERY_LISTENER_H
@ -73,4 +70,4 @@ class DiscoveryListener : public BLooper {
using Bluetooth::DiscoveryListener; using Bluetooth::DiscoveryListener;
#endif #endif
#endif #endif // _DISCOVERY_LISTENER_H

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BTHCI_H_ #ifndef _BTHCI_H_
#define _BTHCI_H_ #define _BTHCI_H_
@ -38,4 +35,4 @@ typedef enum { BT_COMMAND = 0,
#define HCI_FEATURES_SIZE 8 /* LMP features */ #define HCI_FEATURES_SIZE 8 /* LMP features */
#define HCI_DEVICE_NAME_SIZE 248 /* unit name size */ #define HCI_DEVICE_NAME_SIZE 248 /* unit name size */
#endif #endif // _BTHCI_H_

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BTHCI_ACL_H_ #ifndef _BTHCI_ACL_H_
#define _BTHCI_ACL_H_ #define _BTHCI_ACL_H_
@ -36,4 +33,4 @@ struct hci_acl_header {
#define HCI_ACL_BROADCAST_PICONET 0x2 /* both directions */ #define HCI_ACL_BROADCAST_PICONET 0x2 /* both directions */
/* 11 - reserved for future use */ /* 11 - reserved for future use */
#endif #endif // _BTHCI_ACL_H_

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BTHCI_COMMAND_H_ #ifndef _BTHCI_COMMAND_H_
#define _BTHCI_COMMAND_H_ #define _BTHCI_COMMAND_H_
@ -337,4 +334,4 @@ struct hci_command_header {
/* Vendor specific commands */ /* Vendor specific commands */
#define OGF_VENDOR_CMD 0x3F #define OGF_VENDOR_CMD 0x3F
#endif #endif // _BTHCI_COMMAND_H_

View File

@ -1,11 +1,8 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
* Copyright 2008 Mika Lindqvist, monni1995_at_gmail.com * Copyright 2008 Mika Lindqvist, monni1995_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BTHCI_EVENT_H_ #ifndef _BTHCI_EVENT_H_
#define _BTHCI_EVENT_H_ #define _BTHCI_EVENT_H_
@ -318,8 +315,6 @@ struct hci_ev_sychronous_connection_changed {
#define HCI_EVENT_REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION 0x3D #define HCI_EVENT_REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION 0x3D
/* HAIKU Internal Events, not produced by the transport devices but /* HAIKU Internal Events, not produced by the transport devices but
* by some entity of the Haiku Bluetooth Stack. * by some entity of the Haiku Bluetooth Stack.
* The MSB 0xE is chosen for this purpose * The MSB 0xE is chosen for this purpose
@ -329,4 +324,4 @@ struct hci_ev_sychronous_connection_changed {
#define HCI_HAIKU_EVENT_DEVICE_REMOVED 0xE1 #define HCI_HAIKU_EVENT_DEVICE_REMOVED 0xE1
#endif #endif // _BTHCI_EVENT_H_

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BTHCI_MODULE_H_ #ifndef _BTHCI_MODULE_H_
#define _BTHCI_MODULE_H_ #define _BTHCI_MODULE_H_
@ -35,4 +32,4 @@ typedef struct bt_hci_module_info {
} bt_hci_module_info ; } bt_hci_module_info ;
#endif #endif // _BTHCI_MODULE_H_

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BTHCI_TRANSPORT_H_ #ifndef _BTHCI_TRANSPORT_H_
#define _BTHCI_TRANSPORT_H_ #define _BTHCI_TRANSPORT_H_
@ -99,4 +96,4 @@ enum {
at moment refer to ioctl GET_NOTIFICATION_PORT)*/ at moment refer to ioctl GET_NOTIFICATION_PORT)*/
#define BT_USERLAND_PORT_NAME "BT kernel-user Land" #define BT_USERLAND_PORT_NAME "BT kernel-user Land"
#endif #endif // _BTHCI_TRANSPORT_H_

View File

@ -1,8 +1,6 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BTL2CAP_H_ #ifndef _BTL2CAP_H_
@ -18,4 +16,4 @@ struct sockaddr_l2cap {
}; };
#endif #endif // _BTL2CAP_H_

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2008 Mika Lindqvist, monni1995_at_gmail.com * Copyright 2008 Mika Lindqvist, monni1995_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _LINKKEY_UTILS_H #ifndef _LINKKEY_UTILS_H
#define _LINKKEY_UTILS_H #define _LINKKEY_UTILS_H
@ -19,7 +16,7 @@ class LinkKeyUtils {
public: public:
static bool Compare(linkkey_t* lk1, linkkey_t* lk2) static bool Compare(linkkey_t* lk1, linkkey_t* lk2)
{ {
return (memcmp(lk1, lk2, sizeof(linkkey_t)) == 0); return memcmp(lk1, lk2, sizeof(linkkey_t)) == 0;
} }
static linkkey_t NullKey() static linkkey_t NullKey()
@ -29,15 +26,13 @@ public:
static char* ToString(const linkkey_t lk) static char* ToString(const linkkey_t lk)
{ {
// TODO: not safe // TODO: not safe
static char str[50]; static char str[50];
sprintf(str, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:" sprintf(str, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:"
"%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X", "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
lk.l[0], lk.l[1], lk.l[2], lk.l[3], lk.l[0], lk.l[1], lk.l[2], lk.l[3], lk.l[4], lk.l[5],
lk.l[4], lk.l[5], lk.l[6], lk.l[7], lk.l[6], lk.l[7], lk.l[8], lk.l[9], lk.l[10], lk.l[11],
lk.l[8], lk.l[9], lk.l[10], lk.l[11],
lk.l[12], lk.l[13], lk.l[14], lk.l[15]); lk.l[12], lk.l[13], lk.l[14], lk.l[15]);
return str; return str;
@ -45,22 +40,20 @@ public:
static linkkey_t FromString(const char *lkstr) static linkkey_t FromString(const char *lkstr)
{ {
if (lkstr != NULL) if (lkstr != NULL) {
{
int l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15; int l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15;
size_t count = sscanf(lkstr, "%2X:%2X:%2X:%2X:%2X:%2X:%2X:%2X:" size_t count = sscanf(lkstr, "%2X:%2X:%2X:%2X:%2X:%2X:%2X:%2X:"
"%2X:%2X:%2X:%2X:%2X:%2X:%2X:%2X", "%2X:%2X:%2X:%2X:%2X:%2X:%2X:%2X", &l0, &l1, &l2, &l3,
&l0, &l1, &l2, &l3, &l4, &l5, &l6, &l7, &l4, &l5, &l6, &l7, &l8, &l9, &l10, &l11, &l12, &l13,
&l8, &l9, &l10, &l11, &l12, &l13, &l14, &l15); &l14, &l15);
if (count == 16) if (count == 16) {
{ return (linkkey_t){{l0, l1, l2, l3, l4, l5, l6, l7, l8,
return (linkkey_t) {{l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15}}; l9, l10, l11, l12, l13, l14, l15}};
} }
} }
return NullKey(); return NullKey();
} }
}; };
@ -70,4 +63,4 @@ public:
using Bluetooth::LinkKeyUtils; using Bluetooth::LinkKeyUtils;
#endif #endif
#endif #endif // _LINKKEY_UTILS_H

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _LOCAL_DEVICE_H #ifndef _LOCAL_DEVICE_H
#define _LOCAL_DEVICE_H #define _LOCAL_DEVICE_H
@ -72,4 +69,4 @@ class LocalDevice : public BluetoothDevice {
using Bluetooth::LocalDevice; using Bluetooth::LocalDevice;
#endif #endif
#endif #endif // _LOCAL_DEVICE_H

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _REMOTE_DEVICE_H #ifndef _REMOTE_DEVICE_H
#define _REMOTE_DEVICE_H #define _REMOTE_DEVICE_H
@ -77,4 +74,4 @@ class RemoteDevice : public BluetoothDevice {
using Bluetooth::RemoteDevice; using Bluetooth::RemoteDevice;
#endif #endif
#endif #endif // _REMOTE_DEVICE_H

View File

@ -1,11 +1,8 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
* Copyright 2008 Mika Lindqvist, monni1995_at_gmail.com * Copyright 2008 Mika Lindqvist, monni1995_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BDADDR_UTILS_H #ifndef _BDADDR_UTILS_H
#define _BDADDR_UTILS_H #define _BDADDR_UTILS_H
@ -78,4 +75,4 @@ using Bluetooth::bdaddrUtils;
#endif #endif
#endif #endif // _BDADDR_UTILS_H

View File

@ -1,11 +1,8 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
* Copyright 2008 Mika Lindqvist, monni1995_at_gmail.com * Copyright 2008 Mika Lindqvist, monni1995_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BLUETOOTH_H #ifndef _BLUETOOTH_H
#define _BLUETOOTH_H #define _BLUETOOTH_H
@ -55,4 +52,4 @@ typedef struct int128 uint128;
#define BLUETOOTH_PROTO_MAX 256 #define BLUETOOTH_PROTO_MAX 256
#endif #endif // _BLUETOOTH_H

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BLUETOOTH_ERROR_H #ifndef _BLUETOOTH_ERROR_H
#define _BLUETOOTH_ERROR_H #define _BLUETOOTH_ERROR_H
@ -71,4 +68,4 @@
#define HOST_BUSY_PAIRING 0x38 #define HOST_BUSY_PAIRING 0x38
#endif #endif // _BLUETOOTH_ERROR_H

View File

@ -1,10 +1,7 @@
/* /*
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
*
* All rights reserved. Distributed under the terms of the MIT License. * All rights reserved. Distributed under the terms of the MIT License.
*
*/ */
#ifndef _BLUETOOTH_UTIL_H #ifndef _BLUETOOTH_UTIL_H
#define _BLUETOOTH_UTIL_H #define _BLUETOOTH_UTIL_H
@ -55,4 +52,4 @@ static inline char* btstrerror(int error_code)
} }
#endif #endif // _BLUETOOTH_UTIL_H