diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c
index 9a92090..b696fe3 100644
--- a/src/shared/gatt-db.c
+++ b/src/shared/gatt-db.c
return attrib->handle;
}
+struct gatt_db_attribute *
+gatt_db_attribute_get_service(const struct gatt_db_attribute *attrib)
+{
+ if (!attrib)
+ return NULL;
+
+ return attrib->service->attributes[0];
+}
+
bool gatt_db_attribute_get_service_uuid(const struct gatt_db_attribute *attrib,
bt_uuid_t *uuid)
{
diff --git a/src/shared/gatt-db.h b/src/shared/gatt-db.h
index 41464ad..163a981 100644
--- a/src/shared/gatt-db.h
+++ b/src/shared/gatt-db.h
uint16_t gatt_db_attribute_get_handle(const struct gatt_db_attribute *attrib);
+struct gatt_db_attribute *
+gatt_db_attribute_get_service(const struct gatt_db_attribute *attrib);
+
bool gatt_db_attribute_get_service_uuid(const struct gatt_db_attribute *attrib,
bt_uuid_t *uuid);