diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | ChangeLog | 818 | ||||
| -rw-r--r-- | ChangeLog.libs | 339 | ||||
| -rw-r--r-- | ChangeLog.utils | 817 | ||||
| -rw-r--r-- | Makefile.am | 6 | ||||
| -rw-r--r-- | acinclude.m4 | 7 | ||||
| -rw-r--r-- | audio/Makefile.am | 20 | ||||
| -rw-r--r-- | audio/telephony-dummy.c (renamed from src/telephony.c) | 17 | ||||
| -rw-r--r-- | audio/telephony.h (renamed from src/telephony.h) | 4 | ||||
| -rw-r--r-- | common/textfile.c | 2 | ||||
| -rw-r--r-- | src/Makefile.am | 18 | ||||
| -rw-r--r-- | src/adapter.c | 161 | ||||
| -rw-r--r-- | src/bluetoothd.8 | 15 | ||||
| -rw-r--r-- | src/dbus-database.c | 214 | ||||
| -rw-r--r-- | src/dbus-database.h | 32 | ||||
| -rw-r--r-- | src/main.c | 2 | ||||
| -rw-r--r-- | test/Makefile.am | 5 | ||||
| -rwxr-xr-x | test/list-devices (renamed from src/list-devices) | 0 | ||||
| -rw-r--r-- | test/service-did.xml (renamed from src/service-did.xml) | 0 | ||||
| -rw-r--r-- | test/service-ftp.xml (renamed from src/service-ftp.xml) | 0 | ||||
| -rw-r--r-- | test/service-opp.xml (renamed from src/service-opp.xml) | 0 | ||||
| -rw-r--r-- | test/service-record.dtd (renamed from src/service-record.dtd) | 0 | ||||
| -rw-r--r-- | test/service-spp.xml (renamed from src/service-spp.xml) | 0 | ||||
| -rwxr-xr-x | test/simple-agent (renamed from src/simple-agent) | 0 | ||||
| -rwxr-xr-x | test/simple-service (renamed from src/simple-service) | 0 | ||||
| -rwxr-xr-x | test/test-adapter (renamed from src/test-adapter) | 0 | ||||
| -rwxr-xr-x | test/test-device (renamed from src/test-device) | 0 | ||||
| -rwxr-xr-x | test/test-discovery (renamed from src/test-discovery) | 0 | ||||
| -rwxr-xr-x | test/test-manager (renamed from src/test-manager) | 0 | 
29 files changed, 1017 insertions, 1461 deletions
| @@ -31,6 +31,7 @@ parser.c  bluez.pc  include/bluetooth  src/bluetoothd +audio/telephony.c  doc/*.bak  doc/*.stamp @@ -14,3 +14,821 @@ ver 4.1:  ver 4.0:  	Initial public release. + +ver 3.36: +	Add init routines for TI BRF chips. +	Add extra attributes to the serial port record. +	Add example record for headset audio gateway record. +	Use Handsfree version 0x0105 for the gateway role. +	Fix SDP record registration with specific record handles. +	Fix BCSP sent/receive handling. +	Fix various includes for cross-compilation. +	Allow link mode settings for outgoing connections. +	Allow bonding during periodic inquiry. + +ver 3.35: +	Add two additional company identifiers. +	Add UUID-128 support for service discovery. +	Fix usage of friendly names for service discovery. +	Fix authorization when experiemental is disabled. +	Fix uninitialized variable in passkey request handling. +	Enable output of timestamps for l2test and rctest. + +ver 3.34: +	Replace various SDP functions with safe versions. +	Add additional length validation for incoming SDP packets. +	Use safe function versions for SDP client handling. +	Fix issue with RemoveDevice during discovery procedure. +	Fix collect for non-persistent service records. + +ver 3.33: +	Add functions for reading and writing the link policy settings. +	Add definition for authentication requirements. +	Add support for handling Simple Pairing. +	Add Simple Pairing support to Agent interface. +	Add ReleaseMode method to Adapter interface. +	Add DiscoverServices method to Device interface. +	Remove obsolete code and cleanup the repository. +	Move over to use the libgdbus API. +	Enable PIE by default if supported. + +ver 3.32: +	Add OCF constants for synchronous flow control enabling. +	Add support for switching HID proxy devices from Dell. +	Add more Bluetooth client/server helper functions. +	Add support for input service idle timeout option. +	Fix BNEP reconnection handling. +	Fix return value for snd_pcm_hw_params() calls. +	Use upper-case addresses for object paths. +	Remove HAL support helpers. +	Remove inotify support. +	Remove service daemon activation handling. +	Remove uneeded D-Bus API extension. + +ver 3.31: +	Create device object for all pairing cases. +	Convert authorization to internal function calls. +	Add initial support for Headset Audio Gateway role. +	Add generic Bluetooth helper functions for GLib. +	Fix endiannes handling of connection handles. +	Don't optimize when debug is enabled. + +ver 3.30: +	Convert audio service into a plugin. +	Convert input service into a plugin. +	Convert serial service into a plugin. +	Convert network service into a plugin. +	Emit old device signals when a property is changed. +	Fix missing DiscoverDevices and CancelDiscovery methods. +	Add another company identifier. +	Add basic support for Bluetooth sessions. +	Add avinfo utility for AVDTP/A2DP classification. +	Remove build option for deprecated sdpd binary. + +ver 3.29: +	Introduce new D-Bus based API. +	Add more SBC optimizations. +	Add support for PS3 remote devices. +	Fix alignment trap in SDP server. +	Fix memory leak in sdp_get_uuidseq_attr function. + +ver 3.28: +	Add support for MCAP UUIDs. +	Add support for role switch for audio service. +	Add disconnect timer for audio service. +	Add disconnect detection to ALSA plugin. +	Add more SBC optimizations. +	Fix alignment issue of SDP server. +	Remove support for SDP parsing via expat. + +ver 3.27: +	Update uinput.h with extra key definitions. +	Add support for input connect/disconnect callbacks. +	Add ifdefs around some baud rate definitions. +	Add another company identifier. +	Add proper HFP service level connection handling. +	Add basic headset automatic disconnect support. +	Add support for new SBC API. +	Fix SBC decoder noise at high bitpools. +	Use 32-bit multipliers for further SBC optimization. +	Check for RFCOMM connection state in SCO connect callback. +	Make use of parameters selected in ALSA plugin. + +ver 3.26: +	Fix compilation issues with UCHAR_MAX, USHRT_MAX and UINT_MAX. +	Improve handling of different audio transports. +	Enable services by default and keep old daemons disabled. + +ver 3.25: +	Add limited support for Handsfree profile. +	Add limited support for MPEG12/MP3 codec. +	Add basic support for UNITINFO and SUBUNITINFO. +	Add more SBC optimizations. +	Fix external service (un)registration. +	Allow GetInfo and GetAddress to fail. + +ver 3.24: +	Add definitions for MDP. +	Add TCP connection support for serial proxy. +	Add fix for Logitech HID proxy switching. +	Add missing macros, MIN, MAX, ABS and CLAMP. +	Add more SBC encoder optimizations. +	Add initial mechanism to handle headset commands. +	Fix connecting to handsfree profile headsets. +	Use proper function for checking signal name. + +ver 3.23: +	Fix remote name request handling bug. +	Fix key search function to honor the mmap area size. +	Fix Avahi integration of network service. +	Add new plugin communication for audio service. +	Enable basic AVRCP support by default. +	More optimizations to the SBC library. +	Create common error definitions. + +ver 3.22: +	Add missing include file from audio service. +	Add SBC conformance test utility. +	Add basic uinput support for AVRCP. +	Fix L2CAP socket leak in audio service. +	Fix buffer usage in GStreamer plugin. +	Fix remote name request event handling. + +ver 3.21: +	Add constant for Bluetooth socket options level. +	Add initial AVRCP support. +	Add A2DP sink support to GStreamer plugin. +	Fix interoperability with A2DP suspend. +	Fix sign error in 8-subband encoder. +	Fix handling of service classes length size. +	Store Extended Inquiry Response data information. +	Publish device id information through EIR. +	Support higher baud rates for Ericcson based chips. + +ver 3.20: +	Fix GStreamer plugin file type detection. +	Fix potential infinite loop in inotify support. +	Fix D-Bus signatures for dict handling. +	Fix issues with service activation. +	Fix SDP failure handling of audio service. +	Fix various memory leaks in input service. +	Add secure device creation method to input service. +	Add service information methods to serial service. +	Add config file support to network service. +	Add scripting capability to network service. +	Add special on-mode handling. +	Add optimization for SBC encoder. +	Add tweaks for D-Bus 1.1.x libraries. +	Add support for inquiry transmit power level. + +ver 3.19: +	Limit range of bitpool announced while in ACP side. +	Use poll instead of usleep to wait for worker thread. +	Use default event mask from the specification. +	Add L2CAP mode constants. +	Add HID proxy support for Logitech diNovo Edge dongle. +	Add refresh option to re-request device names. +	Show correct connection link type. + +ver 3.18: +	Don't allocate memory for the Bluetooth base UUID. +	Implement proper locking for headsets. +	Fix various A2DP SEP locking issues. +	Fix and cleanup audio stream handling. +	Fix stream starting if suspend request is pending. +	Fix A2DP and AVDTP endianess problems. +	Add network timeout and retransmission support. +	Add more detailed decoding of EIR elements. + +ver 3.17: +	Fix supported commands bit calculation. +	Fix crashes in audio and network services. +	Check PAN source and destination roles. +	Only export the needed symbols for the plugins. + +ver 3.16: +	Update company identifier list. +	Add support for headsets with SCO audio over HCI. +	Add support for auto-create through ALSA plugin. +	Add support for ALSA plugin parameters. +	Add GStreamer plugin with SBC decoder and encoder. +	Fix network service NAP, GN and PANU servers. +	Set EIR information from SDP database. + +ver 3.15: +	Add A2DP support to the audio service. +	Add proxy support to the serial service. +	Extract main service class for later use. +	Set service classes value from SDP database. + +ver 3.14: +	Add missing signals for the adapter interface. +	Add definitions and functions for Simple Pairing. +	Add basic commands for Simple Pairing. +	Add correct Simple Pairing and EIR interaction. +	Add missing properties for remote information. +	Add EPoX endian quirk to the input service. +	Fix HID descriptor import and storage functions. +	Fix handling of adapters in raw mode. +	Fix remote device listing methods. + +ver 3.13: +	Fix some issues with the headset support. +	Fix concurrent pending connection attempts. +	Fix usage of devname instead of netdev. +	Add identifier for Nokia SyncML records. +	Add command for reading the CSR chip revision. +	Add generic CSR radio test support. +	Update HCI command table. + +ver 3.12: +	Add missing HCI command text descriptions +	Add missing HCI commands structures. +	Add missing HCI event structures. +	Add common bachk() function. +	Add support for limited discovery mode. +	Add support for setting of event mask. +	Add GetRemoteServiceIdentifiers method. +	Add skeleton for local D-Bus server. +	Add headset gain control methods. +	Fix various headset implementation issues. +	Fix various serial port service issues. +	Fix various input service issues. +	Let CUPS plugin discover printers in range. +	Improve the BCM2035 UART init routine. +	Ignore connection events for non-ACL links. + +ver 3.11: +	Update API documentation. +	Minimize SDP root records and browse groups. +	Use same decoder for text and URL strings. +	Fix URL data size handling. +	Fix SDP pattern extraction for XML. +	Fix network connection persistent state. +	Add network connection helper methods. +	Add initial version of serial port support. +	Add class of device tracking. + +ver 3.10.1: +	Add option to disable installation of manual pages. +	Fix input service encryption setup. +	Fix serial service methods. +	Fix network service connection handling. +	Provide a simple init script. + +ver 3.10: +	Add initial version of network service. +	Add initial version of serial service. +	Add initial version of input service. +	Add initial version of audio service. +	Add authorization framework. +	Add integer based SBC library. +	Add version code for Bluetooth 2.1 specification. +	Add ESCO_LINK connection type constant. +	Export sdp_uuid32_to_uuid128() function. + +ver 3.9: +	Add RemoteDeviceDisconnectRequested signal. +	Add updated service framework. +	Add embedded GLib library. +	Add support for using system GLib library. +	Create internal SDP server library. + +ver 3.8: +	Sort discovered devices list based on their RSSI. +	Send DiscoverableTimeoutChanged signal. +	Fix local and remote name validity checking. +	Add ListRemoteDevices and ListRecentRemoteDevices methods. +	Add basic integration of confirmation concept. +	Add support for service record description via XML. +	Add support for external commands to the RFCOMM utility. +	Add experimental service and authorization API. +	Add functions for registering binary records. + +ver 3.7: +	Fix class of device handling. +	Fix error replies with pairing and security mode 3. +	Fix disconnect method for RFCOMM connections. +	Add match pattern for service searches. +	Add support for prioritized watches. +	Add additional PDU length checks. +	Fix CSRC value for partial responses. + +ver 3.6.1: +	Fix IO channel race conditions. +	Fix pairing issues on big endian systems. +	Fix pairing issues with page timeout errors. +	Fix pairing state for security mode 3 requests. +	Switch to user as default security manager mode. + +ver 3.6: +	Update D-Bus based RFCOMM interface support. +	Use L2CAP raw sockets for HCI connection creation. +	Add periodic discovery support to the D-Bus interface. +	Add initial support for device names via EIR. +	Add proper UTF-8 validation of device names. +	Add support for the J-Three keyboard. +	Fix issues with the asynchronous API for SDP. + +ver 3.5: +	Fix and cleanup watch functionality. +	Add support for periodic inquiry mode. +	Add support for asynchronous SDP requests. +	Add more request owner tracking. +	Add asynchronous API for SDP. +	Document pageto and discovto options. + +ver 3.4: +	Improve error reporting for failed HCI commands. +	Improve handling of CancelBonding. +	Fixed bonding reply message when disconnected. +	Fix UUID128 string lookup handling. +	Fix malloc() versus bt_malloc() usage. + +ver 3.3: +	Don't change inquiry mode for Bluetooth 1.1 adapters. +	Add udev rules for Bluetooth serial PCMCIA cards. +	Add Cancel and Release methods for passkey agents. +	Add GetRemoteClass method. +	Convert to using ppoll() and pselect(). +	Initialize allocated memory to zero. +	Remove bcm203x firmware loader. +	Remove kernel specific timeouts. +	Add additional private data field for SDP sessions. +	Add host controller to host flow control defines. +	Add host number of completed packets defines. +	Initialize various memory to zero before usage. + +ver 3.2: +	Only check for the low-level D-Bus library. +	Update possible device minor classes. +	Fix timeout for pending reply. +	Add more Inquiry with RSSI quirks. +	Sleep only 100 msecs for device detection. +	Don't send BondingCreated on link key renewal. +	Allow storing of all UTF-8 remote device names. +	Create storage filenames with a generic function. +	Fix handling of SDP strings. +	Add adapter type for SDIO cards. +	Add features bit for link supervision timeout. + +ver 3.1: +	Add missing placeholders for feature bits. +	Fix handling of raw mode devices. +	Fix busy loop in UUID extraction routine. +	Remove inquiry mode setting. +	Remove auth and encrypt settings. + +ver 3.0: +	Implement the new BlueZ D-Bus API. +	Fix broken behavior with EVT_CMD_STATUS. +	Add features bit for pause encryption. +	Add additional EIR error code. +	Add more company identifiers. +	Add another Phonebook Access identifier. +	Update sniff subrating data structures. + +ver 2.25: +	Use %jx instead of %llx for uint64_t and int64_t. +	Allow null-terminated text strings. +	Add UUID for N-Gage games. +	Add UUID for Apple Macintosh Attributes. +	Add Apple attributes and iSync records. +	Add definitions for Apple Agent. +	Add support for the Handsfree Audio Gateway service. +	Add support for choosing a specific record handle. +	Add support for dialup/telephone connections. +	Add definitions for Apple Agent. +	Add support for record handle on service registration. + +ver 2.24: +	Fix display of SDP text and data strings. +	Add support for device scan property. +	Add support for additional access protocols. +	Update the D-Bus policy configuration file. + +ver 2.23: +	Update the new D-Bus interface. +	Make dfutool ready for big endian architectures. +	Add support for AVRCP specific service records. +	Add support for writing complex BCCMD commands. +	Add the new BCCMD interface utility. +	Add MicroBCSP implementation from CSR. +	Add constants and definitions for sniff subrating. +	Add support for allocation of binary text elements. +	Add HCI emulation tool. +	Add fake HID support for old EPoX presenters. +	Reject connections from unknown HID devices. +	Fix service discovery deadlocks with Samsung D600 phones. + +ver 2.22: +	Remove D-Bus 0.23 support. +	Add initial version of the new D-Bus interface. +	Add support for extended inquiry response commands. +	Add support for the Logitech diNovo Media Desktop Laser. +	Add compile time buffer checks (FORTIFY SOURCE). +	Decode reserved LMP feature bits. +	Fix errno overwrite problems. +	Fix profile descriptor problem with Samsung phones. + +ver 2.21: +	Move create_dirs() and create_file() into the textfile library. +	Let textfile_put() also replace the last key value pair. +	Fix memory leaks with textfile_get() usage. +	Fix infinite loops and false positive matches. +	Don't retrieve stored link keys for RAW devices. +	Document the putkey and delkey commands. +	Show supported commands also in clear text. +	Support volatile changes of the BD_ADDR for CSR chips. +	Add support for identification of supported commands. +	Add missing OCF declarations for the security filter. +	Add two new company identifiers. + +ver 2.20: +	Add UUIDs for video distribution profile. +	Add UUIDs for phonebook access profile. +	Add attribute identifier for supported repositories. +	Add definitions for extended inquiry response. +	Add functions for extended inquiry response. +	Add support for extended inquiry response. +	Add support for HotSync service record. +	Add support for ActiveSync service record. +	Add ActiveSync networking support. +	Fix D-Bus crashes with new API versions. + +ver 2.19: +	Fix the GCC 4.0 warnings. +	Fix the routing for dealing with raw devices. +	Fix off by one memory allocation error. +	Fix security problem with escape characters in device name. +	Add per device service record functions. +	Send D-Bus signals for inquiry results and remote name resolves. +	Add support for device specific SDP records. + +ver 2.18: +	Support D-Bus 0.23 and 0.33 API versions. +	Support reading of complex BCCMD values. +	Support minimum and maximum encryption key length. +	Add support for reading and writing the inquiry scan type. +	Add definitions for connection accept timeout and scan enable. +	Add support for inquiry scan type. +	Add tool for the CSR BCCMD interface. +	Add first draft of the Audio/Video control utility. +	Add disconnect timer support for the A2DP ALSA plugin. +	Make SBC parameters configurable. +	Replace non-printable characters in device names. +	Remove hci_vhci.h header file. +	Remove hci_uart.h header file. + +ver 2.17: +	Set the storage directory through ${localstatedir}. +	Add the textfile library for ASCII based file access. +	Add support for return link keys event. +	Add support for voice setting configuration. +	Add support for page scan timeout configuration. +	Add support for storing and deleting of stored link keys. +	Add support for searching for services with UUID-128. +	Add support for retrieving all possible service records. +	Add support for a raw mode view of service records. +	Add support for HID information caching in hidd. +	Add support for authentication in pand and dund. +	Add support for changing BD_ADDR of CSR chips. +	Add pskey utility for changing CSR persistent storage values. +	Add the firmware upgrade utility. +	Add connection caching for the A2DP ALSA plugin. +	Add functions for stored link keys. +	Add definitions for PIN type and unit key. +	Add SDP_WAIT_ON_CLOSE flag for sdp_connect(). +	Include stdio.h in bluetooth.h header file. +	Include sys/socket.h in the header files. + +ver 2.16: +	Store link keys in ASCII based file format. +	Support device name caching. +	Support zero length data sizes in l2test. +	Change default l2ping data size to 44 bytes. +	Hide the server record and the public browse group root. +	Read BD_ADDR if not set and if it is a raw device. +	Add SDP language attributes. +	Add support for browsing the L2CAP group. +	Add support for stored pin codes for outgoing connections. +	Add support for local commands and extended features. +	Add support for reading CSR panic and fault codes. +	Add config option for setting the inquiry mode. +	Add OUI decoding support. +	Use unlimited inquiry responses as default. +	Use cached device names for PIN request. +	Use the clock offset when getting the remote names. +	Add function for reading local supported commands. +	Add function for reading local extended features. +	Add function for reading remote extended features. +	Add function for getting the remote name with a clock offset. +	Add function for extracting the OUI from a BD_ADDR. +	Add inquiry info structure with RSSI and page scan mode. +	Fix buffer allocation for features to string conversion. +	Support inquiry with unlimited number of responses. + +ver 2.15: +	Enable the RFCOMM service level security. +	Add deprecated functions for reading the name. +	Add command for reading the clock offset. +	Add command for reading the clock. +	Add function for reading the clock. +	Add function for reading the local Bluetooth address. +	Add function for reading the local supported features. +	Don't configure raw devices. +	Don't set inquiry scan or page scan on raw devices. +	Don't show extended information for raw devices. +	Support L2CAP signal sizes bigger than 2048 bytes. +	Cleanup of the socket handling code of the test programs. +	Use better way for unaligned access. +	Remove sdp_internal.h and its usage. + +ver 2.14: +	Make use of additional connection information. +	Use library function for reading the RSSI. +	Use library function for reading the link quality. +	Use library function for reading the transmit power level. +	Use library functions for the link supervision timeout. +	Add tool for changing the device address. +	Add function for reading the RSSI. +	Add function for reading the link quality. +	Add function for reading the transmit power level. +	Add functions for the link supervision timeout. +	Remove deprecated functions. +	Update AM_PATH_BLUEZ macro. + +ver 2.13: +	Use file permission 0600 for the link key file. +	Add support for HID attribute descriptions. +	Add support for Device ID attributes. +	Add Device ID and HID attribute definitions. +	Update the UUID constants and its translations. +	Update L2CAP socket option definitions. +	Update connection information definitions. +	Various whitespace cleanups. + +ver 2.12: +	Inherit the device specific options from the default. +	Use --device for selecting the source device. +	Add --nosdp option for devices with resource limitation. +	Add support and parameter option for secure mode. +	Add a lot of build ids and hardware revisions. +	Add service classes and profile ids for WAP. +	Add simple AM_PATH_BLUEZ macro. +	Update UUID translation tables. +	Correct kernel interface for CMTP and HIDP support. + +ver 2.11: +	Initial support for the kernel security manager. +	Various cleanups to avoid inclusion of kernel headers. +	Fix output when the CUPS backend is called without arguments. +	Fix problems with a 64 bit userland. +	Use Bluetooth library functions if available. +	Use standard numbering scheme of SDP record handles. +	Use bit zero for vendor packets in the filter type bitmask. +	Add SIM Access types for service discovery. +	Add more audio/video profile translations. +	Add another company identifier. +	Add the missing HCI error codes. +	Add RFCOMM socket options. +	Add definition for the SECURE link mode. +	Add functions for reading and writing the inquiry mode. +	Add functions for AFH related settings and information. +	Add version identifier for the Bluetooth 2.0 specification. +	Add a master option to the hidd. +	Add support for changing the link key of a connection. +	Add support for requesting encryption on keyboards. +	Add support for revision information of Digianswer devices. +	Add support for the Zoom, IBM and TDK PCMCIA cards. +	Add checks for the OpenOBEX and the ALSA libraries. +	Add experimental mRouter support. + +ver 2.10: +	Use a define for the configuration directory. +	Fix string initialization for flags translation. +	Fix and extend the unaligned access macros. +	Make compiling with debug information optional. +	Don't override CFLAGS from configure. +	Check for usb_get_busses() and usb_interrupt_read(). +	Add optional support for compiling with PIE. +	Make installation of the init scripts optional. +	Make compiling with debug information optional. +	Don't override CFLAGS from configure. + +ver 2.9: +	Retry SDP connect if busy in the CUPS backend. +	Use packet type and allow role switch in hcitool. +	Use the functions from the USB library for hid2hci. +	Add Broadcom firmware loader. +	Add EPoX endian quirk for buggy keyboards. +	Add L2CAP info type and info result definitions. +	Add value for L2CAP_CONF_RFC_MODE. +	Change RSSI value to signed instead of unsigned. +	Allow UUID32 values as protocol identifiers. +	Update the autoconf/automake scripts. + +ver 2.8: +	Use LIBS and LDADD instead of LDFLAGS. +	Use HIDP subclass field for HID boot protocol. +	Set olen before calling getsockopt() in pand. +	Restore signals for dev-up script. +	Add PID file support for pand. +	Add size parameter to expand_name() in hcid. +	Add support for audio source and audio sink SDP records. +	Add support for HID virtual cable unplug. +	Add support for AmbiCom BT2000C card. +	Add defines and UUID's for audio/video profiles. +	Add AVDTP protocol identifier. +	Add HIDP subclass field. +	Add PKGConfig support. +	Fix the event code of inquiry with RSSI. +	Remove dummy SDP library. + +ver 2.7: +	Fix display of decoded LMP features. +	Update company identifiers. +	Add AFH related types. +	Add first bits from EDR prototyping specification. +	Add support for inquiry with RSSI. +	Add HCRP related SDP functions. +	Add HIDP header file. +	Add support for getting the AFH channel map. +	Add support for AFH mode. +	Add support for inquiry mode. +	Add Bluetooth backend for CUPS. +	Add the hid2hci utility. +	Add the hidd utility. +	Add the pand utility. +	Add the dund utility. +	More endian bug fixes. +	Give udev some time to create the RFCOMM device nodes. +	Release the TTY if no device node is found. +	New startup script for the Bluetooth subsystem. +	Update to the autoconf stuff. + +ver 2.6: +	Change default prefix to /usr. +	Add manpages for hcid and hcid.conf. +	Add the sdpd server daemon. +	Add the sdptool utility. +	Add the ciptool utility. +	Add new company identifiers. +	Add BNEP and CMTP header files. +	Add the SDP library. +	Use R2 for default value of pscan_rep_mode. + +ver 2.5: +	Add decoding of Bluetooth 1.2 features. +	Add link manager version parameter for Bluetooth 1.2. +	Add new company identifiers. +	Add D-Bus support for PIN request. +	Support for transmit power level. +	Support for park, sniff and hold mode. +	Support for role switch. +	Support for reading the clock offset. +	Support for requesting authentication. +	Support for setting connection encryption. +	Show revision information for Broadcom devices. +	Replace unprintable characters in device name. +	Use R1 for default value of pscan_rep_mode. +	Fix some 64-bit problems. +	Fix some endian problems. +	Report an error on PIN helper failure. +	Update bluepin script for GTK2. + +ver 2.4: +	Increase number of inquiry responses. +	Support for transmit power level. +	Display all 8 bytes of the features. +	Add support for reading and writing of IAC. +	Correct decoding class of device. +	Use Ericsson revision command for ST Microelectronics devices. +	Display AVM firmware version with 'revision' command. +	New code for CSR specific revision information. +	Support for ST Microelectronics specific initialization. +	Support for 3Com card version 3.0. +	Support for TDK, IBM and Socket cards. +	Support for initial baud rate. +	Update man pages. +	Fixes for some memory leaks. + +ver 2.3: +	Added const qualifiers to appropriate function arguments. +	Minor fixes. +	CSR firmware version is now displayed by 'revision' command. +	Voice command is working properly on big endian machines. +	Added support for Texas Bluetooth modules. +	Added support for high UART baud rates on Ericsson modules. +	BCSP initialization fixes. +	Support for role switch command (hcitool). +	RFCOMM config file parser fixes. +	Update man pages. +	Removed GLib dependency. + +ver 2.2: +	Updated RFCOMM header file. +	Additional HCI command and event defines. +	Support for voice settings (hciconfig). +	Minor hcitool fixes. +	Improved configure script. +	Added Headset testing tool. +	Updated man pages. +	RPM package. + +ver 2.1.1: +	Resurrect hci_remote_name. + +ver 2.1: +	Added hci_{read, write}_class_of_dev(). +	Added hci_{read, write}_current_iac_lap(). +	Added hci_write_local_name(). +	Added RFCOMM header file. +	Minor fixes. +	Improved BCSP initialization (hciattach). +	Support for displaying link quality (hcitool). +	Support for changing link supervision timeout (hcitool). +	New RFCOMM TTY configuration tool (rfcomm). +	Minor fixes and updates. + +ver 2.0: +	Additional company IDs. +	BCSP initialization (hciattach). +	Minor hciconfig fixes. + +ver 2.0-pr13: +	Support for multiple pairing modes. +	Link key database handling fixes. + +ver 2.0-pre12: +	Removed max link key limit. Keys never expire. +	Link key database is always updated. Reread PIN on SIGHUP (hcid). +	Bluetooth script starts SDPd, if installed. +	Other minor fixes. + +ver 2.0-pre11: +	Improved link key management and more verbose logging (hcid). +	Fixed scan command (hcitool). + +ver 2.0-pre10: +	Fix hci_inquiry function to return errors and accept user buffers. +	New functions hci_devba, hci_devid, hci_for_each_dev and hci_get_route. +	Additional company IDs. +	Makefile and other minor fixes. +	Support for reading RSSI, remote name and changing +	connection type (hcitool).  +	Device initialization fixes (hcid). +	Other minor fixes and improvements. +	Build environment cleanup and fixes. + +ver 2.0-pre9: +	Improved bluepin. Working X authentication. +	Improved hcitool. New flexible cmd syntax, additional commands. +	Human readable display of the device features. +	LMP features to string translation support. +	Additional HCI command and event defines. +	Extended hci_filter API. + +ver 2.0-pre8: +	Additional HCI ioctls and defines. +	All strings and buffers are allocated dynamically. +	ba2str, str2ba automatically swap bdaddress. +	Additional hciconfig commands. Support for ACL and SCO MTU ioctls. +	Support for Inventel and COM1 UART based devices. +	Minor hcitool fixes. +	Improved l2test. New L2CAP test modes. +	Minor fixes and cleanup. + +ver 2.0-pre7: +	Bluetooth libraries and header files is now a separate package. +	New build environment uses automake and libtool. +	Massive header files cleanup. +	Bluetooth utilities is now a separate package. +	New build environment uses automake. +	Moved all config files and security data to /etc/bluetooth. +	Various cleanups. + +ver 2.0-pre6: +	API cleanup and additions. +	Improved hcitool. +	l2test minor output fixes. +	hciattach opt to display list of supported devices. + +ver 2.0-pre4: +	HCI filter enhancements. + +ver 2.0-pre3: +	Cleanup. + +ver 2.0-pre2: +	Additional HCI library functions. +	Improved CSR baud rate initialization. +	PCMCIA scripts fixes and enhancements. +	Documentation update. + +ver 2.0-pre1: +	New UART initialization utility. +	Hot plugging support for UART based PCMCIA devices. +	SCO testing utility. +	New authentication utility (bluepin). +	Minor fixes and improvements. diff --git a/ChangeLog.libs b/ChangeLog.libs deleted file mode 100644 index 2ef82dcd..00000000 --- a/ChangeLog.libs +++ /dev/null @@ -1,339 +0,0 @@ -ver 3.36: -	Fix various includes for cross-compilation. - -ver 3.35: -	Add two additional company identifiers. - -ver 3.34: -	Replace various SDP functions with safe versions. -	Add additional length validation for incoming SDP packets. - -ver 3.33: -	Add functions for reading and writing the link policy settings. -	Add definition for authentication requirements. -	Enable PIE by default if supported. - -ver 3.32: -	Add OCF constants for synchronous flow control enabling. - -ver 3.31: -	Don't optimize when debug is enabled. - -ver 3.30: -	Add another company identifier. - -ver 3.29: -	Fix memory leak in sdp_get_uuidseq_attr function. - -ver 3.28: -	Add support for MCAP UUIDs. - -ver 3.27: -	Add another company identifier. - -ver 3.26: -	Fix compilation problem with USHRT_MAX and UCHAR_MAX. - -ver 3.25: -	Update copyright information. - -ver 3.24: -	Add definitions for MDP. - -ver 3.23: -	Fix remote name request handling bug. - -ver 3.22: -	Fix remote name request event handling. - -ver 3.21: -	Add constant for Bluetooth socket options level. - -ver 3.20: -	Add support for inquiry transmit power level. - -ver 3.19: -	Add L2CAP mode constants. - -ver 3.18: -	Don't allocate memory for the Bluetooth base UUID. - -ver 3.17: -	Fix supported commands bit calculation. - -ver 3.16: -	Update company identifier list. - -ver 3.15: -	Extract main service class for later use. - -ver 3.14: -	Add definitions and functions for Simple Pairing. - -ver 3.13: -	Update HCI command table. - -ver 3.12: -	Add missing HCI command text descriptions -	Add missing HCI commands structures. -	Add missing HCI event structures. -	Add common bachk() function. - -ver 3.11: -	Fix URL data size handling. - -ver 3.10: -	Add version code for Bluetooth 2.1 specification. -	Add ESCO_LINK connection type constant. -	Export sdp_uuid32_to_uuid128() function. - -ver 3.9: -	Update copyright information. - -ver 3.8: -	Add functions for registering binary records. - -ver 3.7: -	Add additional PDU length checks. -	Fix CSRC value for partial responses. - -ver 3.6: -	Fix issues with the asynchronous API for SDP. - -ver 3.5: -	Add asynchronous API for SDP. - -ver 3.4: -	Fix UUID128 string lookup handling. -	Fix malloc() versus bt_malloc() usage. - -ver 3.3: -	Remove kernel specific timeouts. -	Add additional private data field for SDP sessions. -	Add host controller to host flow control defines. -	Add host number of completed packets defines. -	Initialize various memory to zero before usage. - -ver 3.2: -	Fix handling of SDP strings. -	Add adapter type for SDIO cards. -	Add features bit for link supervision timeout. - -ver 3.1: -	Add missing placeholders for feature bits. - -ver 3.0: -	Fix broken behavior with EVT_CMD_STATUS. -	Add features bit for pause encryption. -	Add additional EIR error code. -	Add more company identifiers. -	Add another Phonebook Access identifier. -	Update sniff subrating data structures. - -ver 2.25: -	Add definitions for Apple Agent. -	Add support for record handle on service registration. - -ver 2.24: -	Add support for additional access protocols. - -ver 2.23: -	Add constants and definitions for sniff subrating. -	Add support for allocation of binary text elements. -	Fix service discovery deadlocks with Samsung D600 phones. - -ver 2.22: -	Decode reserved LMP feature bits. -	Fix errno overwrite problems. -	Fix profile descriptor problem with Samsung phones. -	Add compile time buffer checks (FORTIFY SOURCE). - -ver 2.21: -	Add support for identification of supported commands. -	Add missing OCF declarations for the security filter. -	Add two new company identifiers. - -ver 2.20: -	Add UUIDs for video distribution profile. -	Add UUIDs for phonebook access profile. -	Add attribute identifier for supported repositories. -	Add definitions for extended inquiry response. -	Add functions for extended inquiry response. - -ver 2.19: -	Fix the GCC 4.0 warnings. -	Fix the routing for dealing with raw devices. -	Add per device service record functions. - -ver 2.18: -	Add support for reading and writing the inquiry scan type. -	Add definitions for connection accept timeout and scan enable. -	Remove hci_vhci.h header file. -	Remove hci_uart.h header file. - -ver 2.17: -	Include stdio.h in bluetooth.h header file. -	Include sys/socket.h in the header files. -	Add functions for stored link keys. -	Add definitions for PIN type and unit key. -	Add SDP_WAIT_ON_CLOSE flag for sdp_connect(). - -ver 2.16: -	Fix buffer allocation for features to string conversion. -	Add function for reading local supported commands. -	Add function for reading local extended features. -	Add function for reading remote extended features. -	Add function for getting the remote name with a clock offset. -	Add function for extracting the OUI from a BD_ADDR. -	Add inquiry info structure with RSSI and page scan mode. -	Support inquiry with unlimited number of responses. - -ver 2.15: -	Use better way for unaligned access. -	Remove sdp_internal.h and its usage. -	Add deprecated functions for reading the name. -	Add function for reading the clock. -	Add function for reading the local Bluetooth address. -	Add function for reading the local supported features. - -ver 2.14: -	Add function for reading the RSSI. -	Add function for reading the link quality. -	Add function for reading the transmit power level. -	Add functions for the link supervision timeout. -	Remove deprecated functions. -	Update AM_PATH_BLUEZ macro. - -ver 2.13: -	Add Device ID and HID attribute definitions. -	Update the UUID constants and its translations. -	Update L2CAP socket option definitions. -	Update connection information definitions. - -ver 2.12: -	Correct kernel interface for CMTP and HIDP support. -	Add service classes and profile ids for WAP. -	Add simple AM_PATH_BLUEZ macro. - -ver 2.11: -	Initial support for the kernel security manager. -	Use bit zero for vendor packets in the filter type bitmask. -	Add SIM Access types for service discovery. -	Add more audio/video profile translations. -	Add another company identifier. -	Add the missing HCI error codes. -	Add RFCOMM socket options. -	Add definition for the SECURE link mode. -	Add functions for reading and writing the inquiry mode. -	Add functions for AFH related settings and information. -	Add version identifier for the Bluetooth 2.0 specification. - -ver 2.10: -	Fix and extend the unaligned access macros. -	Make compiling with debug information optional. -	Don't override CFLAGS from configure. - -ver 2.9: -	Add L2CAP info type and info result definitions. -	Add value for L2CAP_CONF_RFC_MODE. -	Change RSSI value to signed instead of unsigned. -	Allow UUID32 values as protocol identifiers. - -ver 2.8: -	Fix the event code of inquiry with RSSI. -	Add defines and UUID's for audio/video profiles. -	Add AVDTP protocol identifier. -	Add HIDP subclass field. -	Add PKGConfig support. -	Remove dummy SDP library. - -ver 2.7: -	Fix display of decoded LMP features. -	Update company identifiers. -	Add AFH related types. -	Add first bits from EDR prototyping specification. -	Add support for inquiry with RSSI. -	Add HCRP related SDP functions. -	Add HIDP header file. - -ver 2.6: -	Use R2 for default value of pscan_rep_mode. -	Add new company identifiers. -	Add BNEP and CMTP header files. -	Add the SDP library. - -ver 2.5: -	Add decoding of Bluetooth 1.2 features. -	Add link manager version parameter for Bluetooth 1.2. -	Add new company identifiers. -	Support for transmit power level. -	Support for park, sniff and hold mode. -	Support for role switch. -	Support for reading the clock offset. -	Use R1 for default value of pscan_rep_mode. - -ver 2.4: -	Added const qualifiers to appropriate function arguments. -	Minor fixes. - -ver 2.3: -	Fix hci_for_each_dev() for big endian machines. -	Support for voice settings. -	RPM package. - -ver 2.2: -	Updated RFCOMM header file. -	Additional HCI command and event defines. - -ver 2.1.1: -	Resurrect hci_remote_name. - -ver 2.1: -	New HCI functions: -		hci_{read, write}_class_of_dev(), -		hci_{read, write}_current_iac_lap(), -		hci_write_local_name() -	Added RFCOMM header file. -	Minor fixes. - -ver 2.0: -	Additional company IDs. -	Minor fixes. - -ver 2.0-pre10: -	Fix hci_inquiry function to return errors and accept user buffers. -	New functions hci_devba, hci_devid, hci_for_each_dev and hci_get_route. -	Additional company IDs. -	Makefile and other minor fixes. - -ver 2.0-pre9: -	LMP features to string translation support. -	Additional HCI command and event defines. -	Extended hci_filter API. - -ver 2.0-pre8: -	Additional HCI ioctls and defines. -	All strings and buffers are allocated dynamically. -	ba2str, str2ba automatically swap bdaddress. -	Minor fixes and cleanup. - -ver 2.0-pre7: -	Bluetooth libraries and header files is now a separate package. -	New build environment uses automake and libtool. -	Massive header files cleanup. - -ver 2.0-pre6: -	API cleanup and additions. - -ver 2.0-pre4: -	HCI filter enhancements. - -ver 2.0-pre3: -	Cleanup. - -ver 2.0-pre2: -	Additional HCI library functions. -	Documentation update. -	 -ver 2.0-pre1: -	Minor fixes and improvements. diff --git a/ChangeLog.utils b/ChangeLog.utils deleted file mode 100644 index c2c382b3..00000000 --- a/ChangeLog.utils +++ /dev/null @@ -1,817 +0,0 @@ -ver 3.36: -	Add init routines for TI BRF chips. -	Add extra attributes to the serial port record. -	Add example record for headset audio gateway record. -	Use Handsfree version 0x0105 for the gateway role. -	Fix SDP record registration with specific record handles. -	Fix BCSP sent/receive handling. -	Fix various includes for cross-compilation. -	Allow link mode settings for outgoing connections. -	Allow bonding during periodic inquiry. - -	Note: -	This version needs at least bluez-libs-3.36 - -ver 3.35: -	Add UUID-128 support for service discovery. -	Fix usage of friendly names for service discovery. -	Fix authorization when experiemental is disabled. -	Fix uninitialized variable in passkey request handling. -	Enable output of timestamps for l2test and rctest. - -	Note: -	This version needs at least bluez-libs-3.35 - -ver 3.34: -	Use safe function versions for SDP client handling. -	Fix issue with RemoveDevice during discovery procedure. -	Fix collect for non-persistent service records. - -	Note: -	This version needs at least bluez-libs-3.34 - -ver 3.33: -	Add support for handling Simple Pairing. -	Add Simple Pairing support to Agent interface. -	Add ReleaseMode method to Adapter interface. -	Add DiscoverServices method to Device interface. -	Remove obsolete code and cleanup the repository. -	Move over to use the libgdbus API. - -	Note: -	This version needs at least bluez-libs-3.33 - -ver 3.32: -	Add support for switching HID proxy devices from Dell. -	Add more Bluetooth client/server helper functions. -	Add support for input service idle timeout option. -	Fix BNEP reconnection handling. -	Fix return value for snd_pcm_hw_params() calls. -	Use upper-case addresses for object paths. -	Remove HAL support helpers. -	Remove inotify support. -	Remove service daemon activation handling. -	Remove uneeded D-Bus API extension. - -	Note: -	This version needs at least bluez-libs-3.32 - -ver 3.31: -	Create device object for all pairing cases. -	Convert authorization to internal function calls. -	Add initial support for Headset Audio Gateway role. -	Add generic Bluetooth helper functions for GLib. -	Fix endiannes handling of connection handles. -	Don't optimize when debug is enabled. - -	Note: -	This version needs at least bluez-libs-3.31 - -ver 3.30: -	Convert audio service into a plugin. -	Convert input service into a plugin. -	Convert serial service into a plugin. -	Convert network service into a plugin. -	Emit old device signals when a property is changed. -	Fix missing DiscoverDevices and CancelDiscovery methods. -	Add basic support for Bluetooth sessions. -	Add avinfo utility for AVDTP/A2DP classification. -	Remove build option for deprecated sdpd binary. - -	Note: -	This version needs at least bluez-libs-3.30 - -ver 3.29: -	Introduce new D-Bus based API. -	Add more SBC optimizations. -	Add support for PS3 remote devices. -	Fix alignment trap in SDP server. - -	Note: -	This version needs at least bluez-libs-3.29 - -ver 3.28: -	Add support for role switch for audio service. -	Add disconnect timer for audio service. -	Add disconnect detection to ALSA plugin. -	Add more SBC optimizations. -	Fix alignment issue of SDP server. -	Remove support for SDP parsing via expat. - -	Note: -	This version needs at least bluez-libs-3.28 - -ver 3.27: -	Update uinput.h with extra key definitions. -	Add support for input connect/disconnect callbacks. -	Add ifdefs around some baud rate definitions. -	Add proper HFP service level connection handling. -	Add basic headset automatic disconnect support. -	Add support for new SBC API. -	Fix SBC decoder noise at high bitpools. -	Use 32-bit multipliers for further SBC optimization. -	Check for RFCOMM connection state in SCO connect callback. -	Make use of parameters selected in ALSA plugin. - -	Note: -	This version needs at least bluez-libs-3.27 - -ver 3.26: -	Fix compilation issues with UCHAR_MAX, USHRT_MAX and UINT_MAX. -	Improve handling of different audio transports. -	Enable services by default and keep old daemons disabled. - -	Note: -	This version needs at least bluez-libs-3.26 - -ver 3.25: -	Add limited support for Handsfree profile. -	Add limited support for MPEG12/MP3 codec. -	Add basic support for UNITINFO and SUBUNITINFO. -	Add more SBC optimizations. -	Fix external service (un)registration. -	Allow GetInfo and GetAddress to fail. - -	Note: -	This version needs at least bluez-libs-3.25 - -ver 3.24: -	Add TCP connection support for serial proxy. -	Add fix for Logitech HID proxy switching. -	Add missing macros, MIN, MAX, ABS and CLAMP. -	Add more SBC encoder optimizations. -	Add initial mechanism to handle headset commands. -	Fix connecting to handsfree profile headsets. -	Use proper function for checking signal name. - -	Note: -	This version needs at least bluez-libs-3.24 - -ver 3.23: -	Fix key search function to honor the mmap area size. -	Fix Avahi integration of network service. -	Add new plugin communication for audio service. -	Enable basic AVRCP support by default. -	More optimizations to the SBC library. -	Create common error definitions. - -	Note: -	This version needs at least bluez-libs-3.23 - -ver 3.22: -	Add missing include file from audio service. -	Add SBC conformance test utility. -	Add basic uinput support for AVRCP. -	Fix L2CAP socket leak in audio service. -	Fix buffer usage in GStreamer plugin. - -	Note: -	This version needs at least bluez-libs-3.22 - -ver 3.21: -	Add initial AVRCP support. -	Add A2DP sink support to GStreamer plugin. -	Fix interoperability with A2DP suspend. -	Fix sign error in 8-subband encoder. -	Fix handling of service classes length size. -	Store Extended Inquiry Response data information. -	Publish device id information through EIR. -	Support higher baud rates for Ericcson based chips. - -	Note: -	This version needs at least bluez-libs-3.21 - -ver 3.20: -	Fix GStreamer plugin file type detection. -	Fix potential infinite loop in inotify support. -	Fix D-Bus signatures for dict handling. -	Fix issues with service activation. -	Fix SDP failure handling of audio service. -	Fix various memory leaks in input service. -	Add secure device creation method to input service. -	Add service information methods to serial service. -	Add config file support to network service. -	Add scripting capability to network service. -	Add special on-mode handling. -	Add optimization for SBC encoder. -	Add tweaks for D-Bus 1.1.x libraries. -	Add support for inquiry transmit power level. - -	Note: -	This version needs at least bluez-libs-3.20 - -ver 3.19: -	Limit range of bitpool announced while in ACP side. -	Use poll instead of usleep to wait for worker thread. -	Use default event mask from the specification. -	Add HID proxy support for Logitech diNovo Edge dongle. -	Add refresh option to re-request device names. -	Show correct connection link type. - -	Note: -	This version needs at least bluez-libs-3.19 - -ver 3.18: -	Implement proper locking for headsets. -	Fix various A2DP SEP locking issues. -	Fix and cleanup audio stream handling. -	Fix stream starting if suspend request is pending. -	Fix A2DP and AVDTP endianess problems. -	Add network timeout and retransmission support. -	Add more detailed decoding of EIR elements. - -	Note: -	This version needs at least bluez-libs-3.18 - -ver 3.17: -	Fix crashes in audio and network services. -	Check PAN source and destination roles. -	Only export the needed symbols for the plugins. - -	Note: -	This version needs at least bluez-libs-3.17 - -ver 3.16: -	Add support for headsets with SCO audio over HCI. -	Add support for auto-create through ALSA plugin. -	Add support for ALSA plugin parameters. -	Add GStreamer plugin with SBC decoder and encoder. -	Fix network service NAP, GN and PANU servers. -	Set EIR information from SDP database. - -	Note: -	This version needs at least bluez-libs-3.16 - -ver 3.15: -	Add A2DP support to the audio service. -	Add proxy support to the serial service. -	Set service classes value from SDP database. - -	Note: -	This version needs at least bluez-libs-3.15 - -ver 3.14: -	Add missing signals for the adapter interface. -	Add basic commands for Simple Pairing. -	Add correct Simple Pairing and EIR interaction. -	Add missing properties for remote information. -	Add EPoX endian quirk to the input service. -	Fix HID descriptor import and storage functions. -	Fix handling of adapters in raw mode. -	Fix remote device listing methods. - -	Note: -	This version needs at least bluez-libs-3.14 - -ver 3.13: -	Fix some issues with the headset support. -	Fix concurrent pending connection attempts. -	Fix usage of devname instead of netdev. -	Add identifier for Nokia SyncML records. -	Add command for reading the CSR chip revision. -	Add generic CSR radio test support. - -	Note: -	This version needs at least bluez-libs-3.13 - -ver 3.12: -	Add support for limited discovery mode. -	Add support for setting of event mask. -	Add GetRemoteServiceIdentifiers method. -	Add skeleton for local D-Bus server. -	Add headset gain control methods. -	Fix various headset implementation issues. -	Fix various serial port service issues. -	Fix various input service issues. -	Let CUPS plugin discover printers in range. -	Improve the BCM2035 UART init routine. -	Ignore connection events for non-ACL links. - -	Note: -	This version needs at least bluez-libs-3.12 - -ver 3.11: -	Update API documentation. -	Minimize SDP root records and browse groups. -	Use same decoder for text and URL strings. -	Fix SDP pattern extraction for XML. -	Fix network connection persistent state. -	Add network connection helper methods. -	Add initial version of serial port support. -	Add class of device tracking. - -	Note: -	This version needs at least bluez-libs-3.11 - -ver 3.10.1: -	Add option to disable installation of manual pages. -	Fix input service encryption setup. -	Fix serial service methods. -	Fix network service connection handling. -	Provide a simple init script. - -ver 3.10: -	Add initial version of network service. -	Add initial version of serial service. -	Add initial version of input service. -	Add initial version of audio service. -	Add authorization framework. -	Add integer based SBC library. - -	Note: -	This version needs at least bluez-libs-3.10 - -ver 3.9: -	Add RemoteDeviceDisconnectRequested signal. -	Add updated service framework. -	Add embedded GLib library. -	Add support for using system GLib library. -	Create internal SDP server library. - -	Note: -	This version needs at least bluez-libs-3.9 - -ver 3.8: -	Sort discovered devices list based on their RSSI. -	Send DiscoverableTimeoutChanged signal. -	Fix local and remote name validity checking. -	Add ListRemoteDevices and ListRecentRemoteDevices methods. -	Add basic integration of confirmation concept. -	Add support for service record description via XML. -	Add support for external commands to the RFCOMM utility. -	Add experimental service and authorization API. - -	Note: -	This version needs at least bluez-libs-3.8 - -ver 3.7: -	Fix class of device handling. -	Fix error replies with pairing and security mode 3. -	Fix disconnect method for RFCOMM connections. -	Add match pattern for service searches. -	Add support for prioritized watches. - -	Note: -	This version needs at least bluez-libs-3.7 - -ver 3.6.1: -	Fix IO channel race conditions. -	Fix pairing issues on big endian systems. -	Fix pairing issues with page timeout errors. -	Fix pairing state for security mode 3 requests. -	Switch to user as default security manager mode. - -ver 3.6: -	Update D-Bus based RFCOMM interface support. -	Use L2CAP raw sockets for HCI connection creation. -	Add periodic discovery support to the D-Bus interface. -	Add initial support for device names via EIR. -	Add proper UTF-8 validation of device names. -	Add support for the J-Three keyboard. - -	Note: -	This version needs at least bluez-libs-3.6 - -ver 3.5: -	Fix and cleanup watch functionality. -	Add support for periodic inquiry mode. -	Add support for asynchronous SDP requests. -	Add more request owner tracking. -	Document pageto and discovto options. - -	Note: -	This version needs at least bluez-libs-3.5 - -ver 3.4: -	Improve error reporting for failed HCI commands. -	Improve handling of CancelBonding. -	Fixed bonding reply message when disconnected. - -	Note: -	This version needs at least bluez-libs-3.4 - -ver 3.3: -	Don't change inquiry mode for Bluetooth 1.1 adapters. -	Add udev rules for Bluetooth serial PCMCIA cards. -	Add Cancel and Release methods for passkey agents. -	Add GetRemoteClass method. -	Convert to using ppoll() and pselect(). -	Initialize allocated memory to zero. -	Remove bcm203x firmware loader. - -	Note: -	This version needs at least bluez-libs-3.3 - -ver 3.2: -	Only check for the low-level D-Bus library. -	Update possible device minor classes. -	Fix timeout for pending reply. -	Add more Inquiry with RSSI quirks. -	Sleep only 100 msecs for device detection. -	Don't send BondingCreated on link key renewal. -	Allow storing of all UTF-8 remote device names. -	Create storage filenames with a generic function. - -	Note: -	This version needs at least bluez-libs-3.2 - -ver 3.1: -	Fix handling of raw mode devices. -	Fix busy loop in UUID extraction routine. -	Remove inquiry mode setting. -	Remove auth and encrypt settings. - -	Note: -	This version needs at least bluez-libs-3.1 - -ver 3.0: -	Implement the new BlueZ D-Bus API. - -	Note: -	This version needs at least bluez-libs-3.0 - -ver 2.25: -	Use %jx instead of %llx for uint64_t and int64_t. -	Allow null-terminated text strings. -	Add UUID for N-Gage games. -	Add UUID for Apple Macintosh Attributes. -	Add Apple attributes and iSync records. -	Add definitions for Apple Agent. -	Add support for the Handsfree Audio Gateway service. -	Add support for choosing a specific record handle. -	Add support for dialup/telephone connections. - -	Note: -	This version needs at least bluez-libs-2.25 - -ver 2.24: -	Fix display of SDP text and data strings. -	Add support for device scan property. -	Update the D-Bus policy configuration file. - -	Note: -	This version needs at least bluez-libs-2.24 - -ver 2.23: -	Update the new D-Bus interface. -	Make dfutool ready for big endian architectures. -	Add support for AVRCP specific service records. -	Add support for writing complex BCCMD commands. -	Add the new BCCMD interface utility. -	Add MicroBCSP implementation from CSR. -	Add HCI emulation tool. -	Add fake HID support for old EPoX presenters. -	Reject connections from unknown HID devices. - -	Note: -	This version needs at least bluez-libs-2.23 - -ver 2.22: -	Remove D-Bus 0.23 support. -	Add initial version of the new D-Bus interface. -	Add support for extended inquiry response commands. -	Add support for the Logitech diNovo Media Desktop Laser. -	Add compile time buffer checks (FORTIFY SOURCE). - -	Note: -	This version needs at least bluez-libs-2.22 - -ver 2.21: -	Move create_dirs() and create_file() into the textfile library. -	Let textfile_put() also replace the last key value pair. -	Fix memory leaks with textfile_get() usage. -	Fix infinite loops and false positive matches. -	Don't retrieve stored link keys for RAW devices. -	Document the putkey and delkey commands. -	Show supported commands also in clear text. -	Support volatile changes of the BD_ADDR for CSR chips. - -	Note: -	This version needs at least bluez-libs-2.21 - -ver 2.20: -	Add support for extended inquiry response. -	Add support for HotSync service record. -	Add support for ActiveSync service record. -	Add ActiveSync networking support. -	Fix D-Bus crashes with new API versions. - -	Note: -	This version needs at least bluez-libs-2.20 - -ver 2.19: -	Fix the GCC 4.0 warnings. -	Fix off by one memory allocation error. -	Fix security problem with escape characters in device name. -	Send D-Bus signals for inquiry results and remote name resolves. -	Add support for device specific SDP records. - -	Note: -	This version needs at least bluez-libs-2.19 - -ver 2.18: -	Support D-Bus 0.23 and 0.33 API versions. -	Support reading of complex BCCMD values. -	Support minimum and maximum encryption key length. -	Add support for inquiry scan type. -	Add tool for the CSR BCCMD interface. -	Add first draft of the Audio/Video control utility. -	Add disconnect timer support for the A2DP ALSA plugin. -	Make SBC parameters configurable. -	Replace non-printable characters in device names. - -	Note: -	This version needs at least bluez-libs-2.18 - -ver 2.17: -	Set the storage directory through ${localstatedir}. -	Add the textfile library for ASCII based file access. -	Add support for return link keys event. -	Add support for voice setting configuration. -	Add support for page scan timeout configuration. -	Add support for storing and deleting of stored link keys. -	Add support for searching for services with UUID-128. -	Add support for retrieving all possible service records. -	Add support for a raw mode view of service records. -	Add support for HID information caching in hidd. -	Add support for authentication in pand and dund. -	Add support for changing BD_ADDR of CSR chips. -	Add pskey utility for changing CSR persistent storage values. -	Add the firmware upgrade utility. -	Add connection caching for the A2DP ALSA plugin. - -	Note: -	This version needs at least bluez-libs-2.17 - -ver 2.16: -	Store link keys in ASCII based file format. -	Support device name caching. -	Support zero length data sizes in l2test. -	Change default l2ping data size to 44 bytes. -	Hide the server record and the public browse group root. -	Read BD_ADDR if not set and if it is a raw device. -	Add SDP language attributes. -	Add support for browsing the L2CAP group. -	Add support for stored pin codes for outgoing connections. -	Add support for local commands and extended features. -	Add support for reading CSR panic and fault codes. -	Add config option for setting the inquiry mode. -	Add OUI decoding support. -	Use unlimited inquiry responses as default. -	Use cached device names for PIN request. -	Use the clock offset when getting the remote names. - -	Note: -	This version needs at least bluez-libs-2.16 - -ver 2.15: -	Enable the RFCOMM service level security. -	Add command for reading the clock offset. -	Add command for reading the clock. -	Don't configure raw devices. -	Don't set inquiry scan or page scan on raw devices. -	Don't show extended information for raw devices. -	Support L2CAP signal sizes bigger than 2048 bytes. -	Cleanup of the socket handling code of the test programs. - -	Note: -	This version needs at least bluez-libs-2.15 - -ver 2.14: -	Make use of additional connection information. -	Use library function for reading the RSSI. -	Use library function for reading the link quality. -	Use library function for reading the transmit power level. -	Use library functions for the link supervision timeout. -	Add tool for changing the device address. - -	Note: -	This version needs at least bluez-libs-2.14 - -ver 2.13: -	Use file permission 0600 for the link key file. -	Add support for HID attribute descriptions. -	Add support for Device ID attributes. -	Various whitespace cleanups. - -	Note: -	This version needs at least bluez-libs-2.13 - -ver 2.12: -	Inherit the device specific options from the default. -	Use --device for selecting the source device. -	Add --nosdp option for devices with resource limitation. -	Add support and parameter option for secure mode. -	Add a lot of build ids and hardware revisions. -	Update UUID translation tables. - -	Note: -	This version needs at least bluez-libs-2.12 - -ver 2.11: -	Various cleanups to avoid inclusion of kernel headers. -	Fix output when the CUPS backend is called without arguments. -	Fix problems with a 64 bit userland. -	Use Bluetooth library functions if available. -	Use standard numbering scheme of SDP record handles. -	Add a master option to the hidd. -	Add support for changing the link key of a connection. -	Add support for requesting encryption on keyboards. -	Add support for revision information of Digianswer devices. -	Add support for the Zoom, IBM and TDK PCMCIA cards. -	Add checks for the OpenOBEX and the ALSA libraries. -	Add experimental mRouter support. - -	Note: -	This version needs at least bluez-libs-2.11 - -ver 2.10: -	Use a define for the configuration directory. -	Fix string initialization for flags translation. -	Check for usb_get_busses() and usb_interrupt_read(). -	Add optional support for compiling with PIE. -	Make installation of the init scripts optional. -	Make compiling with debug information optional. -	Don't override CFLAGS from configure. - -	Note: -	This version needs at least bluez-libs-2.10 - -ver 2.9: -	Retry SDP connect if busy in the CUPS backend. -	Use packet type and allow role switch in hcitool. -	Use the functions from the USB library for hid2hci. -	Add Broadcom firmware loader. -	Add EPoX endian quirk for buggy keyboards. -	Update the autoconf/automake scripts. - -	Note: -	This version needs at least bluez-libs-2.9 - -ver 2.8: -	Use LIBS and LDADD instead of LDFLAGS. -	Use HIDP subclass field for HID boot protocol. -	Set olen before calling getsockopt() in pand. -	Restore signals for dev-up script. -	Add PID file support for pand. -	Add size parameter to expand_name() in hcid. -	Add support for audio source and audio sink SDP records. -	Add support for HID virtual cable unplug. -	Add support for AmbiCom BT2000C card. - -	Note: -	This version needs at least bluez-libs-2.8 - -ver 2.7: -	Add support for getting the AFH channel map. -	Add support for AFH mode. -	Add support for inquiry mode. -	Add Bluetooth backend for CUPS. -	Add the hid2hci utility. -	Add the hidd utility. -	Add the pand utility. -	Add the dund utility. -	More endian bug fixes. -	Give udev some time to create the RFCOMM device nodes. -	Release the TTY if no device node is found. -	New startup script for the Bluetooth subsystem. -	Update to the autoconf stuff. - -	Note: -	This version needs at least bluez-libs-2.7 - -ver 2.6: -	Change default prefix to /usr. -	Add manpages for hcid and hcid.conf. -	Add the sdpd server daemon. -	Add the sdptool utility. -	Add the ciptool utility. - -	Note: -	This version needs at least bluez-libs-2.6 - -ver 2.5: -	hcitool changes: -		Support for requesting authentication. -		Support for setting connection encryption. -		Fix some endian problems. -	hciconfig changes: -		Show revision information for Broadcom devices. -		Replace unprintable characters in device name. -	hcid changes: -		Add D-Bus support for PIN request. -		Report an error on PIN helper failure. -		Fix some 64-bit problems. -	Update bluepin script for GTK2. - -ver 2.4: -	hcitool changes: -		Increase number of inquiry responses. -		Support for transmit power level. -		Minor updates. -	hciconfig changes: -		Display all 8 bytes of the features. -		Add support for reading and writing of IAC. -		Correct decoding class of device. -		Use Ericsson revision command for ST Microelectronics devices. -		Display AVM firmware version with 'revision' command. -		New code for CSR specific revision information. -	hciattach changes: -		Support for ST Microelectronics specific initialization. -		Support for 3Com card version 3.0. -		Support for TDK, IBM and Socket cards. -		Support for initial baud rate. -	Update man pages. -	Fixes for some memory leaks. - -ver 2.3: -	hciconfig changes: -		CSR firmware version is now displayed by 'revision' command. -		Voice command is working properly on big endian machines. -	hciattach changes: -		Added support for Texas Bluetooth modules. -		Added support for high UART baud rates on Ericsson modules. -		BCSP initialization fixes. -	Support for role switch command (hcitool). -	RFCOMM config file parser fixes. -	Update man pages. -	Removed GLib dependency. - -ver 2.2: -	Support for voice settings (hciconfig). -	Minor hcitool fixes. -	Improved configure script. -	Added Headset testing tool. -	Updated man pages. -	RPM package. - -ver 2.1: -	Improved BCSP initialization (hciattach). -	Support for displaying link quality (hcitool). -	Support for changing link supervision timeout (hcitool). -	New RFCOMM TTY configuration tool (rfcomm). -	Minor fixes and updates. - -ver 2.0: -	BCSP initialization (hciattach). -	Minor hciconfig fixes.	 - -ver 2.0-pr13: -	Support for multiple pairing modes. -	Link key database handling fixes. - -ver 2.0-pre12: -	Removed max link key limit. Keys never expire. -	Link key database is always updated. Reread PIN on SIGHUP (hcid). -	Bluetooth script starts SDPd, if installed. -	Other minor fixes. - -ver 2.0-pre11: -	Improved link key management and more verbose logging (hcid). -	Fixed scan command (hcitool). - -ver 2.0-pre10: -	Support for reading RSSI, remote name and changing -	connection type (hcitool).  -	Device initialization fixes (hcid). -	Other minor fixes and improvements. -	Build environment cleanup and fixes. - -ver 2.0-pre9: -	Improved bluepin. Working X authentication. -	Improved hcitool. New flexible cmd syntax, additional commands. -	Human readable display of the device features. - -ver 2.0-pre8: -	Additional hciconfig commands. Support for ACL and SCO MTU ioctls. -	Support for Inventel and COM1 UART based devices. -	Minor hcitool fixes. -	Improved l2test. New L2CAP test modes. -	Minor cleanup. - -ver 2.0-pre7: -	Bluetooth utilities is now a separate package. -	New build environment uses automake. -	Moved all config files and security data to /etc/bluetooth. -	Various cleanups. - -	Note: -	Please move your /etc/hcid.conf to /etc/bluetooth - -ver 2.0-pre6: -	Improved hcitool. -	l2test minor output fixes. -	hciattach opt to display list of supported devices. - -ver 2.0-pre2: -	Additional HCI library functions. -	Improved CSR baud rate initialization. -	PCMCIA scripts fixes and enhancements. -	Documentation update. -	 -ver 2.0-pre1: -	New UART initialization utility. -	Hot plugging support for UART based PCMCIA devices. -	SCO testing utility. -	New authentication utility (bluepin). -	Minor fixes and improvements. diff --git a/Makefile.am b/Makefile.am index 56301e15..2b9deb50 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,11 +3,7 @@ SUBDIRS = include lib sbc gdbus common src \  	plugins network serial input audio \  	tools rfcomm compat cups test scripts doc -aclocaldir = $(datadir)/aclocal - -aclocal_DATA = bluez.m4 - -EXTRA_DIST = $(aclocal_DATA) +EXTRA_DIST = bluez.m4  pkgconfigdir = $(libdir)/pkgconfig diff --git a/acinclude.m4 b/acinclude.m4 index 2db14efb..ff404bef 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -194,6 +194,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [  	configfiles_enable=yes  	initscripts_enable=no  	pcmciarules_enable=no +	telephony_driver=dummy  	AC_ARG_ENABLE(fortify, AC_HELP_STRING([--disable-fortify], [disable compile time buffer checks]), [  		fortify_enable=${enableval} @@ -291,6 +292,12 @@ AC_DEFUN([AC_ARG_BLUEZ], [  		debug_enable=${enableval}  	]) +	AC_ARG_WITH(telephony, AC_HELP_STRING([--with-telephony=DRIVER], [select telephony driver]), [ +		telephony_driver=${withval} +	]) + +	AC_SUBST([TELEPHONY_DRIVER], [telephony-${telephony_driver}.c]) +  	if (test "${fortify_enable}" = "yes"); then  		CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"  	fi diff --git a/audio/Makefile.am b/audio/Makefile.am index d9f12f87..290633fb 100644 --- a/audio/Makefile.am +++ b/audio/Makefile.am @@ -1,15 +1,17 @@ +BUILT_SOURCES = telephony.c +  if AUDIOPLUGIN  plugindir = $(libdir)/bluetooth/plugins  plugin_LTLIBRARIES = audio.la  audio_la_SOURCES = main.c \ -	manager.h manager.c headset.h headset.c \ -	ipc.h ipc.c unix.h unix.c \ -	device.h device.c gateway.h gateway.c \ -	sink.c sink.h avdtp.c avdtp.h \ -	a2dp.c a2dp.h control.c control.h +	ipc.h ipc.c unix.h unix.c manager.h manager.c telephony.h \ +	device.h device.c headset.h headset.c gateway.h gateway.c \ +	avdtp.h avdtp.c a2dp.h a2dp.c sink.h sink.c control.h control.c + +nodist_audio_la_SOURCES = $(BUILT_SOURCES)  audio_la_LDFLAGS = -module -avoid-version -no-undefined \  			-export-symbols-regex bluetooth_plugin_desc @@ -55,8 +57,14 @@ endif  AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@ +CLEANFILES = $(BUILT_SOURCES) +  INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/src -EXTRA_DIST = audio.conf audio-api.txt test-audio asound.conf +EXTRA_DIST = audio.conf audio-api.txt test-audio asound.conf \ +						telephony-dummy.c  MAINTAINERCLEANFILES = Makefile.in + +telephony.c: @TELEPHONY_DRIVER@ +	@if [ ! -e $@ ] ; then $(LN_S) $< $@ ; fi diff --git a/src/telephony.c b/audio/telephony-dummy.c index f68b97de..b698893e 100644 --- a/src/telephony.c +++ b/audio/telephony-dummy.c @@ -2,6 +2,7 @@   *   *  BlueZ - Bluetooth protocol stack for Linux   * + *  Copyright (C) 2006-2007  Nokia Corporation   *  Copyright (C) 2004-2008  Marcel Holtmann <marcel@holtmann.org>   *   * @@ -25,20 +26,4 @@  #include <config.h>  #endif -#include <glib.h> -  #include "telephony.h" - -static GSList *drivers = NULL; - -int bt_telephony_register_driver(struct bt_telephony_driver *driver) -{ -	drivers = g_slist_append(drivers, driver); - -	return 0; -} - -void bt_telephony_unregister_driver(struct bt_telephony_driver *driver) -{ -	drivers = g_slist_remove(drivers, driver); -} diff --git a/src/telephony.h b/audio/telephony.h index b360a621..8a990113 100644 --- a/src/telephony.h +++ b/audio/telephony.h @@ -2,6 +2,7 @@   *   *  BlueZ - Bluetooth protocol stack for Linux   * + *  Copyright (C) 2006-2007  Nokia Corporation   *  Copyright (C) 2004-2008  Marcel Holtmann <marcel@holtmann.org>   *   * @@ -21,6 +22,3 @@   *   */ -struct bt_telephony_driver { -	const char *name; -}; diff --git a/common/textfile.c b/common/textfile.c index eef0f96a..af895e58 100644 --- a/common/textfile.c +++ b/common/textfile.c @@ -271,6 +271,8 @@ unlock:  	flock(fd, LOCK_UN);  close: +	fdatasync(fd); +  	close(fd);  	errno = err; diff --git a/src/Makefile.am b/src/Makefile.am index e44ae579..2a353a47 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,14 +15,11 @@ endif  sbin_PROGRAMS = bluetoothd -bluetoothd_SOURCES = main.c hcid.h sdpd.h \ -	sdpd-server.c sdpd-request.c sdpd-service.c \ -	sdpd-database.c security.c storage.c \ -	manager.h manager.c error.h error.c \ -	adapter.h adapter.c device.h device.c plugin.h plugin.c \ -	dbus-common.c dbus-common.h dbus-hci.h dbus-hci.c \ -	dbus-database.c dbus-database.h \ -	telephony.h telephony.c agent.h agent.c +bluetoothd_SOURCES = main.c security.c hcid.h sdpd.h \ +	sdpd-server.c sdpd-request.c sdpd-service.c sdpd-database.c \ +	plugin.h plugin.c storage.h storage.c agent.h agent.c \ +	error.h error.c manager.h manager.c adapter.h adapter.c \ +	device.h device.c dbus-common.c dbus-common.h dbus-hci.h dbus-hci.c  bluetoothd_LDADD = $(top_builddir)/common/libhelper.a \  	@GDBUS_LIBS@ @GMODULE_LIBS@ @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@ @@ -43,9 +40,6 @@ if MANPAGES  man_MANS = bluetoothd.8  endif -EXTRA_DIST = bluetooth.conf bluetoothd.8 main.conf \ -	list-devices test-discovery test-manager test-adapter test-device \ -	simple-service simple-agent service-record.dtd \ -	service-did.xml service-spp.xml service-opp.xml service-ftp.xml +EXTRA_DIST = bluetooth.conf bluetoothd.8 main.conf  MAINTAINERCLEANFILES = Makefile.in diff --git a/src/adapter.c b/src/adapter.c index 786c4953..a22112c8 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -50,12 +50,12 @@  #include "hcid.h"  #include "sdpd.h" +#include "sdp-xml.h"  #include "manager.h"  #include "adapter.h"  #include "device.h"  #include "dbus-common.h"  #include "dbus-hci.h" -#include "dbus-database.h"  #include "error.h"  #include "glib-helper.h"  #include "agent.h" @@ -75,8 +75,8 @@ static DBusConnection *connection = NULL;  static GSList *adapter_drivers = NULL;  struct record_list { -  sdp_list_t *recs; -  const gchar *addr; +	sdp_list_t *recs; +	const gchar *addr;  };  struct session_req { @@ -93,6 +93,27 @@ struct service_auth {  	void *user_data;  }; +static GSList *records = NULL; + +struct record_data { +	uint32_t handle; +	char *sender; +	guint listener_id; +}; + +static struct record_data *find_record(uint32_t handle, const char *sender) +{ +	GSList *list; + +	for (list = records; list; list = list->next) { +		struct record_data *data = list->data; +		if (handle == data->handle && !strcmp(sender, data->sender)) +			return data; +	} + +	return NULL; +} +  static inline DBusMessage *invalid_args(DBusMessage *msg)  {  	return g_dbus_create_error(msg, ERROR_INTERFACE ".InvalidArguments", @@ -120,7 +141,7 @@ static inline DBusMessage *no_such_adapter(DBusMessage *msg)  static inline DBusMessage *failed_strerror(DBusMessage *msg, int err)  {  	return g_dbus_create_error(msg, ERROR_INTERFACE ".Failed", -			strerror(err)); +							strerror(err));  }  static inline DBusMessage *in_progress(DBusMessage *msg, const char *str) @@ -1887,6 +1908,56 @@ static DBusMessage *unregister_agent(DBusConnection *conn,  	return dbus_message_new_method_return(msg);  } +static void exit_callback(void *user_data) +{ +	struct record_data *user_record = user_data; + +	debug("remove record"); + +	records = g_slist_remove(records, user_record); + +	remove_record_from_server(user_record->handle); + +	g_free(user_record->sender); +	g_free(user_record); +} + +static int add_xml_record(DBusConnection *conn, const char *sender, +		bdaddr_t *src, const char *record, dbus_uint32_t *handle) +{ +	struct record_data *user_record; +	sdp_record_t *sdp_record; + +	sdp_record = sdp_xml_parse_record(record, strlen(record)); +	if (!sdp_record) { +		error("Parsing of XML service record failed"); +		return -EIO; +	} + +	if (add_record_to_server(src, sdp_record) < 0) { +		error("Failed to register service record"); +		sdp_record_free(sdp_record); +		return -EIO; +	} + +	user_record = g_new0(struct record_data, 1); + +	user_record->handle = sdp_record->handle; + +	user_record->sender = g_strdup(sender); + +	records = g_slist_append(records, user_record); + +	user_record->listener_id = g_dbus_add_disconnect_watch(conn, sender, +					exit_callback, user_record, NULL); + +	debug("listener_id %d", user_record->listener_id); + +	*handle = user_record->handle; + +	return 0; +} +  static DBusMessage *add_service_record(DBusConnection *conn,  						DBusMessage *msg, void *data)  { @@ -1917,6 +1988,68 @@ static DBusMessage *add_service_record(DBusConnection *conn,  	return reply;  } +static DBusMessage *update_record(DBusConnection *conn, DBusMessage *msg, +		bdaddr_t *src, dbus_uint32_t handle, sdp_record_t *sdp_record) +{ +	int err; + +	if (remove_record_from_server(handle) < 0) { +		sdp_record_free(sdp_record); +		return g_dbus_create_error(msg, +				ERROR_INTERFACE ".NotAvailable", +				"Not Available"); +	} + +	sdp_record->handle = handle; +	err = add_record_to_server(src, sdp_record); +	if (err < 0) { +		sdp_record_free(sdp_record); +		error("Failed to update the service record"); +		return g_dbus_create_error(msg, +				ERROR_INTERFACE ".Failed", +				strerror(EIO)); +	} + +	return dbus_message_new_method_return(msg); +} + +static DBusMessage *update_xml_record(DBusConnection *conn, +					DBusMessage *msg, bdaddr_t *src) +{ +	struct record_data *user_record; +	sdp_record_t *sdp_record; +	const char *record; +	dbus_uint32_t handle; +	int len; + +	if (dbus_message_get_args(msg, NULL, +				DBUS_TYPE_UINT32, &handle, +				DBUS_TYPE_STRING, &record, +				DBUS_TYPE_INVALID) == FALSE) +		return NULL; + +	len = (record ? strlen(record) : 0); +	if (len == 0) +		return invalid_args(msg); + +	user_record = find_record(handle, dbus_message_get_sender(msg)); +	if (!user_record) +		return g_dbus_create_error(msg, +				ERROR_INTERFACE ".NotAvailable", +				"Not Available"); + +	sdp_record = sdp_xml_parse_record(record, len); +	if (!sdp_record) { +		error("Parsing of XML service record failed"); +		sdp_record_free(sdp_record); +		return g_dbus_create_error(msg, +				ERROR_INTERFACE ".Failed", +				strerror(EIO)); +	} + +	return update_record(conn, msg, src, handle, sdp_record); +} +  static DBusMessage *update_service_record(DBusConnection *conn,  						DBusMessage *msg, void *data)  { @@ -1928,6 +2061,26 @@ static DBusMessage *update_service_record(DBusConnection *conn,  	return update_xml_record(conn, msg, &src);  } +static int remove_record(DBusConnection *conn, const char *sender, +							dbus_uint32_t handle) +{ +	struct record_data *user_record; + +	debug("remove record 0x%x", handle); + +	user_record = find_record(handle, sender); +	if (!user_record) +		return -1; + +	debug("listner_id %d", user_record->listener_id); + +	g_dbus_remove_watch(conn, user_record->listener_id); + +	exit_callback(user_record); + +	return 0; +} +  static DBusMessage *remove_service_record(DBusConnection *conn,  						DBusMessage *msg, void *data)  { diff --git a/src/bluetoothd.8 b/src/bluetoothd.8 index 5b50b6df..28c03986 100644 --- a/src/bluetoothd.8 +++ b/src/bluetoothd.8 @@ -7,9 +7,6 @@ bluetoothd \- Bluetooth daemon  .B bluetoothd  [  .B \-n -] [ -.B \-f -.I config\-file  ]  .SH "DESCRIPTION" @@ -19,7 +16,7 @@ daemon, which manages all the Bluetooth devices.  .B bluetoothd  itself does not accept many command\-line options, as most of its  configuration is done in the  -.B hcid.conf +.B /etc/bluetooth/main.conf  file, which has its own man page.  .B bluetoothd  can also provide a number of services via the D-Bus message bus @@ -27,19 +24,17 @@ system.  .SH "OPTIONS"  .TP   .BI \-n -Don't fork to run daemon in background. +Don't run as daemon in background.  .TP  .BI \-d  Enable debug information output.  .TP  .BI \-m\ mtu\-size  Use specific MTU size for SDP server. -.TP  -.BI \-f\ config\-file -Use alternate configuration file instead of /etc/bluetooth/hcid.conf +  .SH "FILES"  .TP  -.I /etc/bluetooth/hcid.conf +.I /etc/bluetooth/main.conf  Default location of the global configuration file.  .TP  @@ -92,7 +87,5 @@ the following columns separated by whitespace:  \fIn\fP Remote device LMP sub-version integer. -.SH "SEE ALSO" -\fBhcid.conf\fR(5)  .SH "AUTHOR"  This manual page was written by Marcel Holtmann, Philipp Matthias Hahn and Fredrik Noring. diff --git a/src/dbus-database.c b/src/dbus-database.c deleted file mode 100644 index 4d2bb911..00000000 --- a/src/dbus-database.c +++ /dev/null @@ -1,214 +0,0 @@ -/* - * - *  BlueZ - Bluetooth protocol stack for Linux - * - *  Copyright (C) 2006-2007  Nokia Corporation - *  Copyright (C) 2004-2008  Marcel Holtmann <marcel@holtmann.org> - * - * - *  This program is free software; you can redistribute it and/or modify - *  it under the terms of the GNU General Public License as published by - *  the Free Software Foundation; either version 2 of the License, or - *  (at your option) any later version. - * - *  This program is distributed in the hope that it will be useful, - *  but WITHOUT ANY WARRANTY; without even the implied warranty of - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - *  GNU General Public License for more details. - * - *  You should have received a copy of the GNU General Public License - *  along with this program; if not, write to the Free Software - *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA - * - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <errno.h> -#include <stdlib.h> -#include <string.h> - -#include <bluetooth/bluetooth.h> -#include <bluetooth/hci.h> -#include <bluetooth/hci_lib.h> -#include <bluetooth/sdp.h> -#include <bluetooth/sdp_lib.h> - -#include <gdbus.h> - -#include "sdpd.h" -#include "sdp-xml.h" -#include "error.h" -#include "logging.h" - -static GSList *records = NULL; - -struct record_data { -	uint32_t handle; -	char *sender; -	guint listener_id; -}; - -static struct record_data *find_record(uint32_t handle, const char *sender) -{ -	GSList *list; - -	for (list = records; list; list = list->next) { -		struct record_data *data = list->data; -		if (handle == data->handle && !strcmp(sender, data->sender)) -			return data; -	} - -	return NULL; -} - -static void exit_callback(void *user_data) -{ -	struct record_data *user_record = user_data; - -	debug("remove record"); - -	records = g_slist_remove(records, user_record); - -	remove_record_from_server(user_record->handle); - -	g_free(user_record->sender); -	g_free(user_record); -} - -static inline DBusMessage *invalid_arguments(DBusMessage *msg) -{ -	return g_dbus_create_error(msg, ERROR_INTERFACE ".InvalidArguments", -					"Invalid arguments in method call"); -} - -static inline DBusMessage *not_available(DBusMessage *msg) -{ -	return g_dbus_create_error(msg, ERROR_INTERFACE ".NotAvailable", -							"Not Available"); -} - -static inline DBusMessage *failed(DBusMessage *msg) -{ -	return g_dbus_create_error(msg, ERROR_INTERFACE ".Failed", "Failed"); -} - -int add_xml_record(DBusConnection *conn, const char *sender, bdaddr_t *src, -				const char *record, dbus_uint32_t *handle) -{ -	struct record_data *user_record; -	sdp_record_t *sdp_record; - -	sdp_record = sdp_xml_parse_record(record, strlen(record)); -	if (!sdp_record) { -		error("Parsing of XML service record failed"); -		return -EIO; -	} - -	if (add_record_to_server(src, sdp_record) < 0) { -		error("Failed to register service record"); -		sdp_record_free(sdp_record); -		return -EIO; -	} - -	user_record = g_new0(struct record_data, 1); - -	user_record->handle = sdp_record->handle; - -	user_record->sender = g_strdup(sender); - -	records = g_slist_append(records, user_record); - -	user_record->listener_id = g_dbus_add_disconnect_watch(conn, sender, -					exit_callback, user_record, NULL); - -	debug("listener_id %d", user_record->listener_id); - -	*handle = user_record->handle; - -	return 0; -} - -static DBusMessage *update_record(DBusConnection *conn, DBusMessage *msg, -		bdaddr_t *src, dbus_uint32_t handle, sdp_record_t *sdp_record) -{ -	int err; - -	if (remove_record_from_server(handle) < 0) { -		sdp_record_free(sdp_record); -		return g_dbus_create_error(msg, -				ERROR_INTERFACE ".NotAvailable", -				"Not Available"); -	} - -	sdp_record->handle = handle; -	err = add_record_to_server(src, sdp_record); -	if (err < 0) { -		sdp_record_free(sdp_record); -		error("Failed to update the service record"); -		return g_dbus_create_error(msg, -				ERROR_INTERFACE ".Failed", -				strerror(EIO)); -	} - -	return dbus_message_new_method_return(msg); -} - -DBusMessage *update_xml_record(DBusConnection *conn, -				DBusMessage *msg, bdaddr_t *src) -{ -	struct record_data *user_record; -	sdp_record_t *sdp_record; -	const char *record; -	dbus_uint32_t handle; -	int len; - -	if (dbus_message_get_args(msg, NULL, -				DBUS_TYPE_UINT32, &handle, -				DBUS_TYPE_STRING, &record, -				DBUS_TYPE_INVALID) == FALSE) -		return NULL; - -	len = (record ? strlen(record) : 0); -	if (len == 0) -		return invalid_arguments(msg); - -	user_record = find_record(handle, dbus_message_get_sender(msg)); -	if (!user_record) -		return g_dbus_create_error(msg, -				ERROR_INTERFACE ".NotAvailable", -				"Not Available"); - -	sdp_record = sdp_xml_parse_record(record, len); -	if (!sdp_record) { -		error("Parsing of XML service record failed"); -		sdp_record_free(sdp_record); -		return g_dbus_create_error(msg, -				ERROR_INTERFACE ".Failed", -				strerror(EIO)); -	} - -	return update_record(conn, msg, src, handle, sdp_record); -} - -int remove_record(DBusConnection *conn, const char *sender, -						dbus_uint32_t handle) -{ -	struct record_data *user_record; - -	debug("remove record 0x%x", handle); - -	user_record = find_record(handle, sender); -	if (!user_record) -		return -1; - -	debug("listner_id %d", user_record->listener_id); - -	g_dbus_remove_watch(conn, user_record->listener_id); - -	exit_callback(user_record); - -	return 0; -} diff --git a/src/dbus-database.h b/src/dbus-database.h deleted file mode 100644 index 2f5606fc..00000000 --- a/src/dbus-database.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - *  BlueZ - Bluetooth protocol stack for Linux - * - *  Copyright (C) 2006-2007  Nokia Corporation - *  Copyright (C) 2004-2008  Marcel Holtmann <marcel@holtmann.org> - * - * - *  This program is free software; you can redistribute it and/or modify - *  it under the terms of the GNU General Public License as published by - *  the Free Software Foundation; either version 2 of the License, or - *  (at your option) any later version. - * - *  This program is distributed in the hope that it will be useful, - *  but WITHOUT ANY WARRANTY; without even the implied warranty of - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - *  GNU General Public License for more details. - * - *  You should have received a copy of the GNU General Public License - *  along with this program; if not, write to the Free Software - *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA - * - */ - -#define DATABASE_INTERFACE "org.bluez.Database" - -int add_xml_record(DBusConnection *conn, const char *sender, bdaddr_t *src, -				const char *record, dbus_uint32_t *handle); -DBusMessage *update_xml_record(DBusConnection *conn, -				DBusMessage *msg, bdaddr_t *src); -int remove_record(DBusConnection *conn, const char *sender, -						dbus_uint32_t handle); @@ -640,7 +640,7 @@ static gboolean option_debug = FALSE;  static GOptionEntry options[] = {  	{ "nodaemon", 'n', G_OPTION_FLAG_REVERSE,  				G_OPTION_ARG_NONE, &option_detach, -				"Don't fork daemon to background" }, +				"Don't run as daemon in background" },  	{ "debug", 'd', 0, G_OPTION_ARG_NONE, &option_debug,  				"Enable debug information output" },  	{ NULL }, diff --git a/test/Makefile.am b/test/Makefile.am index 16b80e7d..ba2bdc65 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -39,6 +39,9 @@ endif  INCLUDES = -I$(top_srcdir)/common -EXTRA_DIST = apitest hsplay hsmicro bdaddr.8 dbusdef.py +EXTRA_DIST = apitest hsplay hsmicro bdaddr.8 dbusdef.py \ +	list-devices test-discovery test-manager test-adapter test-device \ +	simple-service simple-agent service-record.dtd \ +	service-did.xml service-spp.xml service-opp.xml service-ftp.xml  MAINTAINERCLEANFILES = Makefile.in diff --git a/src/list-devices b/test/list-devices index ec6c580a..ec6c580a 100755 --- a/src/list-devices +++ b/test/list-devices diff --git a/src/service-did.xml b/test/service-did.xml index 52eb68c0..52eb68c0 100644 --- a/src/service-did.xml +++ b/test/service-did.xml diff --git a/src/service-ftp.xml b/test/service-ftp.xml index 1bda8857..1bda8857 100644 --- a/src/service-ftp.xml +++ b/test/service-ftp.xml diff --git a/src/service-opp.xml b/test/service-opp.xml index 351b4a41..351b4a41 100644 --- a/src/service-opp.xml +++ b/test/service-opp.xml diff --git a/src/service-record.dtd b/test/service-record.dtd index f53be5d0..f53be5d0 100644 --- a/src/service-record.dtd +++ b/test/service-record.dtd diff --git a/src/service-spp.xml b/test/service-spp.xml index 2b156c3f..2b156c3f 100644 --- a/src/service-spp.xml +++ b/test/service-spp.xml diff --git a/src/simple-agent b/test/simple-agent index 0d3dc1f7..0d3dc1f7 100755 --- a/src/simple-agent +++ b/test/simple-agent diff --git a/src/simple-service b/test/simple-service index 5279a3a6..5279a3a6 100755 --- a/src/simple-service +++ b/test/simple-service diff --git a/src/test-adapter b/test/test-adapter index 2ec8adef..2ec8adef 100755 --- a/src/test-adapter +++ b/test/test-adapter diff --git a/src/test-device b/test/test-device index f8f2d14a..f8f2d14a 100755 --- a/src/test-device +++ b/test/test-device diff --git a/src/test-discovery b/test/test-discovery index 874de66f..874de66f 100755 --- a/src/test-discovery +++ b/test/test-discovery diff --git a/src/test-manager b/test/test-manager index 759b6a48..759b6a48 100755 --- a/src/test-manager +++ b/test/test-manager | 
