diff options
author | Sven Gothel <[email protected]> | 2020-06-26 07:15:52 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-06-26 07:15:52 +0200 |
commit | e7f6618a2b9eda80bef1901e331f7b7a4221d2bd (patch) | |
tree | c2c4fcadd59624f18e30d4acb9c72d79b735549b /api | |
parent | af5f9b2897ba50063b4e5af73190b32846413625 (diff) |
Align DBTDevice's C++ getGATTServices() w/ Java getServices(): Catch exception and return an empty list (on error/exception)
Diffstat (limited to 'api')
-rw-r--r-- | api/direct_bt/DBTDevice.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/api/direct_bt/DBTDevice.hpp b/api/direct_bt/DBTDevice.hpp index e01ecaab..5dc1a614 100644 --- a/api/direct_bt/DBTDevice.hpp +++ b/api/direct_bt/DBTDevice.hpp @@ -156,7 +156,13 @@ namespace direct_bt { /** Return shared ManufactureSpecificData as recognized at discovery, pre GATT discovery. */ std::shared_ptr<ManufactureSpecificData> const getManufactureSpecificData() const; - /** Return a list of services as recognized at discovery, pre GATT discovery. */ + /** + * Return a list of advertised services as recognized at discovery, pre GATT discovery. + * <p> + * To receive a complete list of GATT services including characteristics etc, + * use {@link #getGATTServices()}. + * </p> + */ std::vector<std::shared_ptr<uuid_t>> getServices() const; /** Returns index >= 0 if found, otherwise -1 */ @@ -311,7 +317,7 @@ namespace direct_bt { /** * Returns a list of shared GATTService available on this device if successful, - * otherwise returns an empty list. + * otherwise returns an empty list if an error occurred. * <p> * If this method has been called for the first time or no services has been detected yet, * a list of GATTService will be discovered. |