static void populate_gap_service(struct btd_gatt_database *database)
{
	bt_uuid_t uuid;
	struct gatt_db_attribute *service, *attrib;

	/* Add the GAP service */
	bt_uuid16_create(&uuid, UUID_GAP);
	service = gatt_db_add_service(database->db, &uuid, true, 7);

	/*
	 * Device Name characteristic.
	 */
	bt_uuid16_create(&uuid, GATT_CHARAC_DEVICE_NAME);
	gatt_db_service_add_characteristic(service, &uuid, BT_ATT_PERM_READ,
							BT_GATT_CHRC_PROP_READ,
							gap_device_name_read_cb,
							NULL, database);

	/*
	 * Device Appearance characteristic.
	 */
	bt_uuid16_create(&uuid, GATT_CHARAC_APPEARANCE);
	attrib = gatt_db_service_add_characteristic(service, &uuid,
							BT_ATT_PERM_READ,
							BT_GATT_CHRC_PROP_READ,
							gap_appearance_read_cb,
							NULL, database);
	gatt_db_attribute_set_fixed_length(attrib, 2);

	/*
	 * Central Address Resolution characteristic.
	 */
	bt_uuid16_create(&uuid, GATT_CHARAC_CAR);
	attrib = gatt_db_service_add_characteristic(service, &uuid,
							BT_ATT_PERM_READ,
							BT_GATT_CHRC_PROP_READ,
							gap_car_read_cb,
							NULL, database);
	gatt_db_attribute_set_fixed_length(attrib, 1);

	gatt_db_service_set_active(service, true);

	database_add_record(database, service);
}
static void populate_gap_service(struct btd_gatt_database *database)
{
	bt_uuid_t uuid;
	struct gatt_db_attribute *service, *attrib;

	 
	bt_uuid16_create(&uuid, UUID_GAP);
	service = gatt_db_add_service(database->db, &uuid, true, 7);

	 
	bt_uuid16_create(&uuid, GATT_CHARAC_DEVICE_NAME);
	gatt_db_service_add_characteristic(service, &uuid, BT_ATT_PERM_READ,
							BT_GATT_CHRC_PROP_READ,
							gap_device_name_read_cb,
							NULL, database);

	 
	bt_uuid16_create(&uuid, GATT_CHARAC_APPEARANCE);
	attrib = gatt_db_service_add_characteristic(service, &uuid,
							BT_ATT_PERM_READ,
							BT_GATT_CHRC_PROP_READ,
							gap_appearance_read_cb,
							NULL, database);
	gatt_db_attribute_set_fixed_length(attrib, 2);

	 
	bt_uuid16_create(&uuid, GATT_CHARAC_CAR);
	attrib = gatt_db_service_add_characteristic(service, &uuid,
							BT_ATT_PERM_READ,
							BT_GATT_CHRC_PROP_READ,
							gap_car_read_cb,
							NULL, database);
	gatt_db_attribute_set_fixed_length(attrib, 1);

	gatt_db_service_set_active(service, true);

	database_add_record(database, service);
}