diff --git a/Makefile.plugins b/Makefile.plugins
index 0448b91..52b51c5 100644
--- a/Makefile.plugins
+++ b/Makefile.plugins
profiles/health/hdp_util.h profiles/health/hdp_util.c
endif
-builtin_modules += gatt
-builtin_sources += profiles/gatt/gas.c
+builtin_modules += gap
+builtin_sources += profiles/gap/gas.c
builtin_modules += scanparam
builtin_sources += profiles/scanparam/scan.c
diff --git a/profiles/gatt/gas.c b/profiles/gap/gas.c
similarity index 86%
rename from profiles/gatt/gas.c
rename to profiles/gap/gas.c
index 9d5d31e..a4028dd 100644
--- a/profiles/gatt/gas.c
+++ b/profiles/gap/gas.c
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
*/
#ifdef HAVE_CONFIG_H
guint attioid;
};
-static GSList *devices = NULL;
+static GSList *devices;
static void gas_free(struct gas *gas)
{
const struct gas *gas = a;
const struct btd_device *device = b;
- return (gas->device == device ? 0 : -1);
+ return gas->device == device ? 0 : -1;
}
static void gap_appearance_cb(guint8 status, const guint8 *pdu, guint16 plen,
gas_free(gas);
}
-static int gatt_driver_probe(struct btd_service *service)
+static int gap_driver_probe(struct btd_service *service)
{
struct btd_device *device = btd_service_get_device(service);
struct gatt_primary *gap;
return gas_register(device, &gap->range);
}
-static void gatt_driver_remove(struct btd_service *service)
+static void gap_driver_remove(struct btd_service *service)
{
struct btd_device *device = btd_service_get_device(service);
gas_unregister(device);
}
-static struct btd_profile gatt_profile = {
- .name = "gap-gatt-profile",
- .remote_uuid = GATT_UUID,
- .device_probe = gatt_driver_probe,
- .device_remove = gatt_driver_remove
+static struct btd_profile gap_profile = {
+ .name = "gap-profile",
+ .remote_uuid = GAP_UUID,
+ .device_probe = gap_driver_probe,
+ .device_remove = gap_driver_remove
};
-static int gatt_init(void)
+static int gap_init(void)
{
- btd_profile_register(&gatt_profile);
+ devices = NULL;
+
+ btd_profile_register(&gap_profile);
return 0;
}
-static void gatt_exit(void)
+static void gap_exit(void)
{
- btd_profile_unregister(&gatt_profile);
+ btd_profile_unregister(&gap_profile);
}
-BLUETOOTH_PLUGIN_DEFINE(gatt, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,
- gatt_init, gatt_exit)
+BLUETOOTH_PLUGIN_DEFINE(gap, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,
+ gap_init, gap_exit)