summaryrefslogtreecommitdiff
path: root/plugins/wiimote.c
Commit message (Collapse)AuthorAgeFilesLines
* plugins: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- GPL-2.0-or-later : 7 License: GPL-2.0-or-later plugins/autopair.c plugins/hostname.c plugins/neard.c plugins/policy.c plugins/sixaxis.c plugins/wiimote.c plugins/external-dummy.c
* plugins: Fix local libbluetooth includes orderMarcel Holtmann2015-02-281-0/+1
|
* plugins: Use local libbluetooth includesMarcel Holtmann2015-02-281-1/+2
|
* core: Fix device_get_name() to always null-terminate what it returnsPetri Gynther2014-02-191-1/+0
| | | | | Fix device_get_name() to null-terminate the name string it returns. Modify all callers as needed.
* plugins: Use full include path for header filesMarcel Holtmann2014-01-251-5/+5
|
* Rename adapter_get_address to btd_adapter_get_addressSzymon Janc2013-11-271-1/+1
| | | | Allow this symbol to be exported and usable from external plugins.
* wiimote: add new documented device IDsDavid Herrmann2013-10-181-5/+7
| | | | | Add some new device IDs for the LEGO wiimote and Wii U Pro Controllers. Also add comments for each ID so we can track them better.
* core: Avoid unnecessary gboolean on pincode callback APIAnderson Lizardo2013-06-131-1/+2
| | | | | Use standard "bool" type instead. Callers in plugins/* are fixed on the same commit to avoid compilation errors.
* plugins: Extend the pin code callback with the call numberAlex Deymo2013-05-101-1/+6
| | | | | | | | | | | | | | | | The plugin's pin code callback doesn't know about the pairing process. It just provides a pin code based on the information provided to this function. Although limited state could be added through other new callbacks, this fix achieves this by providing more information to the callback itself. The new argument "attempt" states the pin callback attempt of the particular plugin for the current pairing of the device. This allows a plugin to try different pincodes for the same device in the same pairing process. To signal that the plugin doesn't provide any pin code for the provided device the current implementation returns 0 (an empty pin code). Analogously, with this fix, a plugin should return 0 when it doesn't have any other pin code to provide for the given device.
* Revert "Ensure config.h is included by using CPPFLAGS"Johan Hedberg2012-12-071-0/+4
| | | | | | | | | | | | | | This reverts commit 8a03376544b046a84301847d1594f6c3674983ff. The patch needs to be split up and the gdbus/ changes were bogus compared to the original commit message. Conflicts: Makefile.am Makefile.obexd profiles/cyclingspeed/cyclingspeed.c profiles/heartrate/heartrate.c src/error.c
* Ensure config.h is included by using CPPFLAGSLucas De Marchi2012-12-051-4/+0
| | | | | | | | | | Instead of trying to include config.h in each file over the tree and possibly forgetting to include it, give a "-include config.h" argument to the compiler so it's guaranteed that a) it will be included for all source files and b) it will be the first header included. gdbus/ directory is left out, since it would break other projects using it.
* wiimote: add Wii-Remote-Plus ID and name detectionDavid Herrmann2012-11-281-7/+26
| | | | | | | | | The Nintendo Wii Remote Plus uses a new product ID and name. To detect them properly, we need to add them to the wiimote-module. To avoid an overlong "if" statement, this converts the match-function to walk over an array and check all VID/PID pairs and device-names. This makes adding new devices much easier.
* device: Convert device_get_address into simple getterSzymon Janc2012-10-051-3/+1
| | | | | | | | This allow to remove number of local variables used only to get device address and pass it as pointer later on. bdaddr_type parameter is also removed as there is device_get_addr_type already present which can be used to get it if needed.
* adapter: Convert adapter_get_address into simple getterSzymon Janc2012-10-051-3/+2
| | | | | | | | | | | Most uses of adapter_get_address were in form of: bdaddr_t addr; adapter_get_address(adapter, &addr); foo(&addr); Changing it to getter makes code simpler and avoid number of not needed memcpy.
* wiimote: add Wii Balance Board detectionDavid Herrmann2012-09-211-0/+1
| | | | | Add the name of the Wii Balance Board so it can be paired with BlueZ like any other Wii Remote. Reported by Florian Echtler.
* Add profile abstraction (replaces btd_device drivers)Johan Hedberg2012-09-031-0/+2
| | | | | | | | | | | | | | | | | | This patch removes the btd_device_driver concept and replaces it with btd_profile. The new construct also contains the necessary parts for adapter drivers, so btd_adapter_driver is only needed for non-profile related functionality (most of which is in plugins/*). The main purpose of this new construct is to facilitate a centralized connection creation mechanism for profiles, ultimately enabling the addition of a Device.Connect() method instead of requiring a UI to know to call e.g. Input.Connect or Audio.Connect. This feature will also be extended to externally implemented profiles once the internal implementation gets more stable, such as OBEX (obexd) and HFP (oFono). The new D-Bus interface will also partially restore functionality which was previously available through the Serial interface.
* Add display parameter to plugin pincode callbackScott James Remnant2012-04-121-1/+1
| | | | | | Pass a display parameter to the plugin pincode callback, a plugin may set this to TRUE to indicate the PIN it generates should be displayed on the screen for entry into the remote device.
* wiimote: Detect Wii Remotes by device nameDavid Herrmann2012-03-151-5/+8
| | | | | | | | We currently detect Wii Remotes by DID information. However, not all Wii Remotes (especially 3rd party Wii Remotes) provide DID information. Moreover, they provide no way of identifying them aside from their device name. Hence, this adds an experimental name-detection for Wii Remotes.
* wiimote: Fix device_get_address to use new APIDavid Herrmann2011-12-301-1/+1
| | | | | | Commit b06899eace1f484b387aae0e568fb1da988b468c introduced a new API for device_get_address but apparently missed fixing the call in plugins/wiimote.c. This patch converts the plugin to use the new API.
* Remove use of read_device_id in wiimote pluginLuiz Augusto von Dentz2011-10-011-11/+12
| | | | Make use of btd_device_get_vendor and btd_device_get_product intead.
* Add support for wiimote pairingDavid Herrmann2011-07-141-0/+111
The Nintendo Wii Remote requires binary bluetooth addresses as PINs. This is not possible via dbus agent API. So this adds a plugin that registers a pin-callback and forces the right pin for every authentication request of wiimotes.