summaryrefslogtreecommitdiff
path: root/android/avctp.c
Commit message (Collapse)AuthorAgeFilesLines
* build: Replace use of g_memdup with util_memdupLuiz Augusto von Dentz2022-01-061-2/+3
| | | | | | | | | | | This replaces the uses of g_memdup with util_memdup since the former has been deprecated: warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead [-Wdeprecated-declarations] g_memdup2 requires bumping glib version which would likely have its own problems thus why util_memdup was introduced.
* uinput: Remove local copy of uinput.hLuiz Augusto von Dentz2021-11-221-5/+3
| | | | | | | | | | uinput.h is part of kernel uapi nowadays so it can be included directly from linux/uinput.h which has a compatible definition with 32 bits systems: https://github.com/bluez/bluez/issues/84#issuecomment-942155841 Fixes: https://github.com/bluez/bluez/issues/84
* android: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- Apache-2.0 : 80 LGPL-2.1-or-later : 42 GPL-2.0-or-later : 9 License: Apache-2.0 android/bluetoothd-wrapper.c android/tester-hidhost.c android/tester-map-client.c android/hal-audio-aptx.c android/hal-audio.c android/hal-handsfree-client.c android/tester-gatt.c android/hal-pan.c android/hal-socket.c android/tester-hdp.c android/tester-pan.c android/tester-avrcp.c android/hal-a2dp-sink.c android/hal-gatt.c android/hal-avrcp.c android/tester-a2dp.c android/hal-audio.h android/hal-bluetooth.c android/tester-socket.c android/hal-health.c android/hal-a2dp.c android/hal-ipc.c android/hal-avrcp-ctrl.c android/hal-sco.c android/hal-ipc.h android/tester-main.c android/hal-audio-sbc.c android/hal-utils.c android/hal-map-client.c android/hal-handsfree.c android/hal-log.h android/hal.h android/hal-utils.h android/tester-bluetooth.c android/hal-hidhost.c android/audio_utils/resampler.h android/audio_utils/resampler.c android/system/audio.h android/hardware/bt_sock.h android/hardware/bt_gatt_client.h android/hardware/bt_hh.h android/hardware/bluetooth.h android/hardware/hardware.h android/hardware/bt_hf_client.h android/hardware/bt_rc.h android/hardware/bt_hf.h android/hardware/bt_pan.h android/hardware/bt_gatt_types.h android/hardware/hardware.c android/hardware/audio_effect.h android/hardware/audio.h android/hardware/bt_gatt_server.h android/hardware/bt_gatt.h android/hardware/bt_hl.h android/hardware/bt_mce.h android/hardware/bt_av.h android/client/if-hh.c android/client/if-sco.c android/client/pollhandler.h android/client/haltest.c android/client/tabcompletion.c android/client/if-hf-client.c android/client/history.h android/client/if-audio.c android/client/terminal.h android/client/if-av.c android/client/if-main.h android/client/if-av-sink.c android/client/terminal.c android/client/if-mce.c android/client/if-hf.c android/client/pollhandler.c android/client/if-sock.c android/client/if-rc-ctrl.c android/client/if-rc.c android/client/history.c android/client/if-pan.c android/client/if-gatt.c android/client/if-bt.c android/client/if-hl.c License: LGPL-2.1-or-later android/sco.h android/socket.c android/tester-main.h android/hidhost.h android/map-client.h android/utils.h android/hal-msg.h android/health.h android/avrcp-lib.c android/bluetoothd-snoop.c android/a2dp.c android/bluetooth.h android/a2dp-sink.c android/handsfree-client.c android/audio-msg.h android/main.c android/pan.c android/ipc-tester.c android/health.c android/socket.h android/handsfree.h android/avrcp-lib.h android/a2dp-sink.h android/system-emulator.c android/gatt.c android/avrcp.h android/pan.h android/test-ipc.c android/hidhost.c android/a2dp.h android/avrcp.c android/sco-msg.h android/bluetooth.c android/map-client.c android/handsfree-client.h android/ipc.c android/handsfree.c android/gatt.h android/ipc.h android/ipc-common.h android/compat/wordexp.h android/cutils/properties.h License: GPL-2.0-or-later android/avdtp.h android/avctp.c android/avdtptest.c android/sco.c android/log.c android/avdtp.c android/avctp.h android/compat/readline/history.h android/compat/readline/readline.h
* android/avctp: Fix reference countingSzymon Janc2015-03-301-10/+12
| | | | Drop extra reference before exiting function.
* android/avctp: Fix crashes caused by re-entrant callsLuiz Augusto von Dentz2015-03-261-24/+50
| | | | | This make sure that while processing a PDU the session callbacks are not able to destroy the session causing crashes.
* android: Use local libbluetooth includesMarcel Holtmann2015-02-281-2/+2
|
* android/avctp: Add define for AV/C data MTU and offsetLuiz Augusto von Dentz2014-06-061-4/+0
| | | | This defines the MTU and offset of AV/C data in AVCTP PDU.
* android: Make multi-line comments style consistentSzymon Janc2014-04-291-5/+10
| | | | | Use common style for multi-line comments consistent with rest of codebase.
* android/avctp: Add avctp_send_browsing functionLuiz Augusto von Dentz2014-04-251-0/+12
| | | | This function can be used to send responses over browsing channel.
* android/avctp: Add proper checks for invalid browsing PDUsLuiz Augusto von Dentz2014-04-251-1/+8
|
* android/avctp: Make browsing handler return ssize_tLuiz Augusto von Dentz2014-04-251-3/+9
| | | | | This makes possible to return errors such as -EAGAIN to indicate the request would block and a response will be sent asynchronously.
* android/avctp: Make avctp_send_vendor to take struct iovecLuiz Augusto von Dentz2014-04-151-6/+2
| | | | This makes it possible to pass data without copying.
* android/avctp: Make avctp_send_vendor_req to take struct iovecLuiz Augusto von Dentz2014-04-151-61/+91
| | | | This makes it possible to pass data without copying.
* android/avctp: Make avctp_send_browsing_req to take struct iovecLuiz Augusto von Dentz2014-04-151-24/+41
| | | | This makes it possible to pass data without copying.
* android/avctp: Add parameters to avctp passthrough sendAndrei Emeltchenko2014-03-131-16/+58
| | | | This allows to use vendor unique commands
* AVCTP: Fix sending wrong response formatLuiz Augusto von Dentz2014-03-041-2/+2
| | | | | | Reject and Not Implemented responses of PASS THROUGH commands shall contain the data of the previous frame accourding to AVC Panel Subunit specification page 87.
* android/avctp: Make handler return ssize_tLuiz Augusto von Dentz2014-03-041-5/+12
| | | | | This makes possible to return errors such as -EAGAIN to indicate the request would block and a response will be sent asynchronously.
* android/avctp: Fix leaking passthrough handlerLuiz Augusto von Dentz2014-03-021-0/+2
| | | | | In case the handler is not destroyed by the owner automatically free it as there is no use for it after the session is freed.
* android/avctp: Checks error on send_eventLuiz Augusto von Dentz2014-02-241-1/+11
| | | | In case of EINTR retry sending the event otherwise print the errno.
* android/avctp: Fix failing silently if uinput is not initializedLuiz Augusto von Dentz2014-02-241-3/+6
| | | | | | This adds a check for uinput before attempting to use send_key and if it is not initialized response with AVC_CTYPE_NOT_IMPLEMENTED which is the same code used when a unkown key is received.
* android/avctp: Set uinput to invalid fd when creating sessionAndrei Emeltchenko2014-02-241-0/+1
| | | | | When AVCTP session was created uinput was zero which is valid file descriptor and that was conflicting with socketpair() fds.
* audio/AVCTP: Lookup key name from key_map tableLuiz Augusto von Dentz2014-02-051-28/+8
| | | | The key_map table already contain the key name.
* audio/AVCTP: Add keys that can be mapped to uinputLuiz Augusto von Dentz2014-02-051-0/+28
| | | | This adds the remaining AV/C keys that can be mapped to uinput.
* android/avctp: Move AVC_HEADER_LENGTH from avctp headerAndrei Emeltchenko2014-01-291-0/+2
| | | | | | There is currently inconsistence in the avctp code with AVC_HEADER_LENGTH defined in avctp.h but AVCTP_HEADER_LENGTH defined in avctp.c. Move definition to place it is actually used in consistent way.
* android/avctp: Fix wrong error messageAndrei Emeltchenko2014-01-291-1/+1
|
* android/avctp: Use predefined HEADER_LENGTH instead of sizeofAndrei Emeltchenko2014-01-291-6/+6
| | | | | Make code consistent with using HEADER_LENGTH defined. Remove also type conversion.
* android/avctp: Trivial cleanup codeAndrei Emeltchenko2014-01-271-3/+2
| | | | Avoid extra header calculation and fix wrong line indentation.
* android/AVRCP: Add initial socket handlingLuiz Augusto von Dentz2014-01-261-4/+1
| | | | This adds the initial socket listening and handling incoming connections.
* android/AVCTP: Add avctp_set_destroy_cbLuiz Augusto von Dentz2014-01-261-0/+13
| | | | | This adds avctp_set_destroy_cb that can be use to set a callback when the AVCTP has been disconnected.
* android/AVCTP: Strip dependenciesLuiz Augusto von Dentz2014-01-261-675/+119
| | | | | This strips AVCTP code of any dependency of core and btio to make it transport agnostic.
* android: Add copy of current AVCTP implementionLuiz Augusto von Dentz2014-01-261-0/+2028
These files are not added to any makefile on purpose because they still have external dependencies.