From: Arman Uguray <armansito@chromium.org>
To: linux-bluetooth@vger.kernel.org
Cc: Arman Uguray <armansito@chromium.org>
Subject: [PATCH BlueZ v3 5/8] core: service: Remove GATT handle logic
Date: Tue, 13 Jan 2015 19:31:04 -0800 [thread overview]
Message-ID: <1421206267-26369-6-git-send-email-armansito@chromium.org> (raw)
In-Reply-To: <1421206267-26369-1-git-send-email-armansito@chromium.org>
This patch reverts the recent addition of GATT service handles to
btd_service.
---
src/service.c | 38 --------------------------------------
src/service.h | 7 -------
2 files changed, 45 deletions(-)
diff --git a/src/service.c b/src/service.c
index 2ea2b7a..b66b1c9 100644
--- a/src/service.c
+++ b/src/service.c
@@ -53,8 +53,6 @@ struct btd_service {
void *user_data;
btd_service_state_t state;
int err;
- uint16_t start_handle;
- uint16_t end_handle;
};
struct service_state_callback {
@@ -151,26 +149,6 @@ struct btd_service *service_create(struct btd_device *device,
return service;
}
-struct btd_service *service_create_gatt(struct btd_device *device,
- struct btd_profile *profile,
- uint16_t start_handle,
- uint16_t end_handle)
-{
- struct btd_service *service;
-
- if (!start_handle || !end_handle || start_handle > end_handle)
- return NULL;
-
- service = service_create(device, profile);
- if (!service)
- return NULL;
-
- service->start_handle = start_handle;
- service->end_handle = end_handle;
-
- return service;
-}
-
int service_probe(struct btd_service *service)
{
char addr[18];
@@ -322,22 +300,6 @@ int btd_service_get_error(const struct btd_service *service)
return service->err;
}
-bool btd_service_get_gatt_handles(const struct btd_service *service,
- uint16_t *start_handle,
- uint16_t *end_handle)
-{
- if (!service || !service->start_handle || !service->end_handle)
- return false;
-
- if (start_handle)
- *start_handle = service->start_handle;
-
- if (end_handle)
- *end_handle = service->end_handle;
-
- return true;
-}
-
unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)
{
struct service_state_callback *state_cb;
diff --git a/src/service.h b/src/service.h
index 3a0db6e..c1f97f6 100644
--- a/src/service.h
+++ b/src/service.h
@@ -44,10 +44,6 @@ void btd_service_unref(struct btd_service *service);
/* Service management functions used by the core */
struct btd_service *service_create(struct btd_device *device,
struct btd_profile *profile);
-struct btd_service *service_create_gatt(struct btd_device *device,
- struct btd_profile *profile,
- uint16_t start_handle,
- uint16_t end_handle);
int service_probe(struct btd_service *service);
void service_remove(struct btd_service *service);
@@ -63,9 +59,6 @@ struct btd_device *btd_service_get_device(const struct btd_service *service);
struct btd_profile *btd_service_get_profile(const struct btd_service *service);
btd_service_state_t btd_service_get_state(const struct btd_service *service);
int btd_service_get_error(const struct btd_service *service);
-bool btd_service_get_gatt_handles(const struct btd_service *service,
- uint16_t *start_handle,
- uint16_t *end_handle);
unsigned int btd_service_add_state_cb(btd_service_state_cb cb,
void *user_data);
--
2.2.0.rc0.207.ga3a616c
next prev parent reply other threads:[~2015-01-14 3:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 3:30 [PATCH BlueZ v3 0/8] Implement doc/gatt-api.txt for client Arman Uguray
2015-01-14 3:31 ` [PATCH BlueZ v3 1/8] shared/gatt-db: Add service getter by UUID Arman Uguray
2015-01-14 3:31 ` [PATCH BlueZ v3 2/8] core: device: Fix GATT profile probing Arman Uguray
2015-01-14 3:31 ` [PATCH BlueZ v3 3/8] core: device: Fix broken GATT UUID management Arman Uguray
2015-01-14 13:17 ` Luiz Augusto von Dentz
2015-01-14 19:38 ` Arman Uguray
2015-01-16 0:58 ` Arman Uguray
2015-01-16 8:53 ` Luiz Augusto von Dentz
2015-01-14 3:31 ` [PATCH BlueZ v3 4/8] profiles/gap: Fix probe/accept behavior Arman Uguray
2015-01-14 3:31 ` Arman Uguray [this message]
2015-01-14 3:31 ` [PATCH BlueZ v3 6/8] shared/gatt-db: Add "claimed" field to services Arman Uguray
2015-01-14 3:31 ` [PATCH BlueZ v3 7/8] core: gatt: Use "claimed" instead of "active" Arman Uguray
2015-01-14 3:31 ` [PATCH BlueZ v3 8/8] doc/gatt-api.txt: Update error names Arman Uguray
2015-01-16 14:21 ` [PATCH BlueZ v3 0/8] Implement doc/gatt-api.txt for client Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421206267-26369-6-git-send-email-armansito@chromium.org \
--to=armansito@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).