From 23e46d2de44a3d49063e852a38b020e7407a78bc Mon Sep 17 00:00:00 2001 From: Paul Nettle Date: Sun, 3 Sep 2017 08:15:12 -0500 Subject: The GGK server names are no longer in Globals.h but are now configured by ggkStart() allowing an application to change them based on configuration rather than compilation. Power-off-disconnect errors hacked out of existence. A few log lines that were set to trace converted to debug log levels to reduce logspam. --- include/Gobbledegook.h | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'include/Gobbledegook.h') diff --git a/include/Gobbledegook.h b/include/Gobbledegook.h index 6213c0f..1914490 100644 --- a/include/Gobbledegook.h +++ b/include/Gobbledegook.h @@ -187,7 +187,41 @@ extern "C" // // Similarly, the pointer to data returned to the data getter should point to non-volatile memory so that the server can use it // safely for an indefinite period of time. - int ggkStart(GGKServerDataGetter getter, GGKServerDataSetter setter, int maxAsyncInitTimeoutMS); + // + // serviceName: The name of our server (collectino of services) + // + // !!!IMPORTANT!!! + // + // This name must match tha name configured in the D-Bus permissions. See the Readme.md file for more information. + // + // This is used to build the path for our Bluetooth services. It also provides the base for the D-Bus owned name (see + // getOwnedName.) + // + // This value will be stored as lower-case only. + // + // Retrieve this value using the `TheServer->getName()` method + // + // advertisingName: The name for this controller, as advertised over LE + // + // IMPORTANT: Setting the advertisingName will change the system-wide name of the device. If that's not what you want, set + // BOTH advertisingName and advertisingShortName to as empty string ("") to prevent setting the advertising + // name. + // + // Retrieve this value using the `getAdvertisingName()` method + // + // advertisingShortName: The short name for this controller, as advertised over LE + // + // According to the spec, the short name is used in case the full name doesn't fit within Extended Inquiry Response (EIR) or + // Advertising Data (AD). + // + // IMPORTANT: Setting the advertisingName will change the system-wide name of the device. If that's not what you want, set + // BOTH advertisingName and advertisingShortName to as empty string ("") to prevent setting the advertising + // name. + // + // Retrieve this value using the `getAdvertisingShortName()` method + // + int ggkStart(const char *pServiceName, const char *pAdvertisingName, const char *pAdvertisingShortName, + GGKServerDataGetter getter, GGKServerDataSetter setter, int maxAsyncInitTimeoutMS); // Blocks for up to maxAsyncInitTimeoutMS milliseconds until the server shuts down. // -- cgit v1.2.3