Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Revision 439:c57413bf88a9, committed 2015-06-19
- Comitter:
- rgrover1
- Date:
- Fri Jun 19 15:51:55 2015 +0100
- Parent:
- 438:b55ce5f5715d
- Child:
- 440:21c83c010895
- Commit message:
- Synchronized with git rev 21c86533
Author: Rohit Grover
turn DiscoveredService into a class.
Changed in this revision
| public/ServiceDiscovery.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/public/ServiceDiscovery.h Fri Jun 19 15:51:55 2015 +0100
+++ b/public/ServiceDiscovery.h Fri Jun 19 15:51:55 2015 +0100
@@ -23,16 +23,38 @@
class ServiceDiscovery {
public:
- /**@brief Structure for holding information about the service and the characteristics found during
+ /**@brief Type for holding information about the service and the characteristics found during
* the discovery process.
*/
- struct DiscoveredService {
- void setup(ShortUUIDBytes_t uuidIn, Gap::Handle_t start, Gap::Handle_t end) {
+ class DiscoveredService {
+ public:
+ void setup(ShortUUIDBytes_t uuidIn, GattAttribute::Handle_t startHandleIn, GattAttribute::Handle_t endHandleIn) {
uuid = uuidIn;
- startHandle = start;
- endHandle = end;
+ startHandle = startHandleIn;
+ endHandle = endHandleIn;
+ }
+
+ public:
+ const ShortUUIDBytes_t& getShortUUID(void) const {
+ return uuid;
}
+ const GattAttribute::Handle_t& getStartHandle(void) const {
+ return startHandle;
+ }
+ const GattAttribute::Handle_t& getEndHandle(void) const {
+ return endHandle;
+ }
+
+ public:
+ DiscoveredService() : uuid(0), startHandle(GattAttribute::INVALID_HANDLE), endHandle(GattAttribute::INVALID_HANDLE) {
+ /* empty */
+ }
+
+ private:
+ DiscoveredService(const DiscoveredService &);
+
+ private:
ShortUUIDBytes_t uuid; /**< UUID of the service. */
GattAttribute::Handle_t startHandle; /**< Service Handle Range. */
GattAttribute::Handle_t endHandle; /**< Service Handle Range. */
