summaryrefslogtreecommitdiff
path: root/android/hidhost.c
Commit message (Collapse)AuthorAgeFilesLines
* build: Replace use of g_memdup with util_memdupLuiz Augusto von Dentz2022-01-061-1/+2
| | | | | | | | | | | 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.
* 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
* lib: Move HOG UUID definitionManish Mandlik2020-06-161-2/+0
| | | | | HOG UUID is defined at multiple places in the code. Move that definition to lib/uuid.h where all other UUIDs are defined.
* input/hog-lib: Add support to gatt-dbLuiz Augusto von Dentz2016-12-291-0/+4
| | | | | | This add support of passing a gatt-db to avoid having to discover the services again, this should also make it easier to port to bt_gatt_client once Android code support it.
* hog: Move code from android to profilesLuiz Augusto von Dentz2015-11-131-1/+1
| | | | | This is a place holder until the code is ported to use shared API so it can be shared by android and D-Bus daemon.
* android/hidhost: Fix connecting HOGP over BREDRMariusz Skamra2015-05-221-1/+1
| | | | | | This patch fixes issue related to HID connection over BREDR. To avoid HOG connection with dual mode device connected over BREDR, bearer type is checked not the features of remote device.
* android/hog: Allow to pass custom fd for uhidSzymon Janc2015-03-161-1/+1
| | | | This will be useful for unitests.
* android/bluetooth: Remove address type from BT callbacksSzymon Janc2015-03-051-1/+1
| | | | | | GATT code should always use bt_get_id_addr() when directly dealing with remote address. This is to make sure that proper address and type is used.
* android/hidhost: Fix logical vs bitwise operationAndrei Emeltchenko2014-11-241-1/+1
| | | | "buf[0] & !1" is always 0, should be bitwise operation.
* android/hidhost: Support handshake messageJakub Tyszkowski2014-11-201-2/+30
|
* android/hidhost: Remove reconnect logicLukasz Rymanowski2014-09-051-19/+7
| | | | | GATT can handle reconnect now, so lets remove that part of code from here.
* android/hidhost: Fix indentationJakub Tyszkowski2014-09-041-1/+1
|
* android/hidhost: Allow to use cached dev when connectingLukasz Rymanowski2014-09-021-5/+6
| | | | There is no reason to not allow connect when there is cached hid device
* android/hidhost: Remove invalid connecting state notificationLukasz Rymanowski2014-09-021-3/+1
| | | | | | HIDHOST_STATE_CONNECTING is reserved for local initiated connections according to Android framework. Sending it on incoming connection might confuse Android state machines.
* android/hidhost: Add remove bond handlingLukasz Rymanowski2014-08-291-0/+25
| | | | With this patch HID/HOG is aware when remote device has been unpaired.
* android/hid: Force encryption for keyboardsJakub Tyszkowski2014-08-271-3/+23
| | | | | | | | Encryption is mandatory for keyboards. Instead of using hardcoded security level it's now set per device (with LOW as default) and raised for keyboards (after the SDP query is done). This level is then used to establish outgoing connections and raising the security level of the incomming ones.
* android/hid: Reject connections from unknown devicesJakub Tyszkowski2014-08-271-9/+24
| | | | Don't accept input from not bonded devices.
* anroid/hidhost: Set security to MEDIUM after connectMarcin Kraglak2014-07-301-0/+5
| | | | | According to spec connection with HoG device should always be encrypted.
* android/hidhost: Use bt_hog_send_report in bt_hid_set_reportSzymon Janc2014-07-021-1/+12
| | | | | If bt_hid_set_report is called for a HoG device send data using bt_hog_send_report.
* android/hidhost: Add hid_device_new helper functionLuiz Augusto von Dentz2014-06-251-12/+15
|
* android/hidhost: Fix adding hidhost device on devices listGrzegorz Kolodziejczyk2014-06-241-2/+3
| | | | | | | | Create hog connection cb functionality tried to operate on stored on list hidhost device. Adding hidhost device to list should be done before operating on it. It caused sending bogus connecting state change.
* android/hidhost: Add support for re-connecting HoGLuiz Augusto von Dentz2014-06-131-0/+24
| | | | | Once HoG disconnects scanning should be turned on so that once the device starts advertising again it should connected automatically.
* android/hidhost: Add support for HoGLuiz Augusto von Dentz2014-06-131-1/+115
| | | | | This enables using hidhost HAL for LE devices since this is how HoG is implemented in Android.
* android/hidhost: Rework uHID code to use bt_uhidLuiz Augusto von Dentz2014-05-301-122/+21
|
* android: Make multi-line comments style consistentSzymon Janc2014-04-291-21/+40
| | | | | Use common style for multi-line comments consistent with rest of codebase.
* android/hidhost: Remove not needed local variableSzymon Janc2014-04-231-3/+2
| | | | | Source address is always known since daemon supports only single adapter. No need to read it from btio.
* android/hidhost: Improve error messagesSzymon Janc2014-04-231-26/+38
|
* android/hidhost: Check if hex2buf succeedSzymon Janc2014-04-231-9/+14
| | | | Fail if received string contains illegal characters.
* android/hidhost: Don't use sscanf in hex2bufSzymon Janc2014-04-231-4/+30
| | | | | Add cheaper version (based on similar code in oFono) that doesn't require sscanf.
* android/hidhost: Cleanup handle_uhid_outputSzymon Janc2014-04-231-8/+7
|
* android/hidhost: Fix handle_uhid_outputSzymon Janc2014-04-231-2/+2
| | | | | Data from kernel is not in form of hex string. Just copy it instead of converting from hex string.
* android/hidhost: Fix hex string to buffer convertionSzymon Janc2014-04-091-9/+14
| | | | | Due to missing limit specifier buffer was always filled with last hex value in string.
* Replace bt_put_le16() by put_le16()Claudio Takahasi2014-03-141-1/+2
|
* android: Pass mode parameter to registered servicesSzymon Janc2014-03-041-1/+1
|
* android: Create comon header for IPCSzymon Janc2014-02-281-0/+1
| | | | | | | | | This header contains IPC specific structures and code not related to BT and audio HAL protocols. This allows to fully decouple IPC from HAL messages. This is first step to make HAL part of IPC unit-testable and reusable between BT HAL and audio HAL.
* android: Refactor IPC initSzymon Janc2014-02-281-26/+35
| | | | | This allows to pass socket path and max service ID while initializaing IPC. This is first step to allow use it both for BT and Audio HALs.
* android/hidhost: Trivial coding style fixAnderson Lizardo2014-02-121-2/+2
| | | | Fix two lines over 80 columns.
* android: Use 16-bit UUID for SDP searchAnderson Lizardo2014-02-121-4/+3
| | | | | | These UUIDs are assigned by BT-SIG and therefore there is no need to use full 128-bit UUIDs. This also avoids unnecessary conversion from string representation.
* android: Update copyright and license detailsMarcel Holtmann2014-02-111-10/+10
|
* android/hidhost: Use g_slist_free_full to free devices listLuiz Augusto von Dentz2014-02-061-18/+17
| | | | | | Calling g_slist_remove within the callback of g_slist_foreach is very inefficient as it has to iterate twice in the list to figure which element to remove.
* android: Trivial replacement of tabs where spaces are expectedAnderson Lizardo2014-01-271-1/+1
|
* android: Use src/log.h include instead of just log.hMarcel Holtmann2014-01-261-1/+1
|
* android/hidhost: Verify set info command correctnessSzymon Janc2014-01-241-0/+8
| | | | | Although it is not implemented verify command correctness for IPC completeness.
* android/hidhost: Fix vid and pid informationAndrzej Kaczmarek2014-01-221-18/+55
| | | | | | For HID device vendor, product and version numbers should be retrieved using Device ID profile which is mandatory for devices implementing HIDP.
* android/hidhost: Fix miscalculation of get report event notification lengthRavi kumar Veeramally2014-01-211-1/+1
| | | | Event length is size of struct + data len (if any). It is miscalulated.
* Rename glib-helper to uuid-helperJohan Hedberg2014-01-211-1/+1
|
* android/hidhost: Remove unnecessary checkRavi kumar Veeramally2014-01-201-10/+0
| | | | | HID device will return unsupported or invalid response for unsupported or invalid get/set protocol request. Need not to check prior to that.
* android/hidhost: Fix connection state notification on profile unregisterRavi kumar Veeramally2014-01-201-1/+0
| | | | | | | | Issue found while writing end2end tests. Usually profile unregister is called when final cleanup of bluetoothd. Freeing connected hid devices through g_slist_foreach is a asynchronous call. Profile is cleaned up and and ipc also complete cleanup. But free_hid_devices tries to notify hal which doesn't exist that time. So behaviour is unexpected.
* core: Add flags parameter to bt_search_serviceSzymon Janc2014-01-201-2/+2
| | | | This allows to pass custom SDP flags to sdp_connect.
* android/hidhost: Move set_report parameter check to daemonSzymon Janc2013-12-311-0/+10
| | | | | HAL library is to be as simple as possible and parameters values should be verified by daemon for robustness anyway. Move this check to daemon.