bool discoverable;
};
-struct watch_client {
+struct discovery_client {
struct btd_adapter *adapter;
DBusMessage *msg;
char *owner;
struct mgmt_cp_start_service_discovery *current_discovery_filter;
#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
- struct watch_client *client; /* active discovery client */
+ struct discovery_client *client; /* active discovery client */
#endif
GSList *discovery_found; /* list of found devices */
static void discovery_free(void *user_data)
{
- struct watch_client *client = user_data;
+ struct discovery_client *client = user_data;
#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
DBG("%p", client);
}
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
-static void discovery_remove(struct watch_client *client, bool exit)
+static void discovery_remove(struct discovery_client *client, bool exit)
#else
-static void discovery_remove(struct watch_client *client)
+static void discovery_remove(struct discovery_client *client)
#endif
{
static void trigger_start_discovery(struct btd_adapter *adapter, guint delay);
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
-static void discovery_reply(struct watch_client *client, uint8_t status)
+static void discovery_reply(struct discovery_client *client, uint8_t status)
#else
-static struct watch_client *discovery_complete(struct btd_adapter *adapter,
+static struct discovery_client *discovery_complete(struct btd_adapter *adapter,
uint8_t status)
#endif
{
#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
- struct watch_client *client = adapter->client;
+ struct discovery_client *client = adapter->client;
#endif
DBusMessage *reply;
#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
const void *param, void *user_data)
{
struct btd_adapter *adapter = user_data;
- struct watch_client *client;
+ struct discovery_client *client;
const struct mgmt_cp_start_discovery *rp = param;
DBG("status 0x%02x", status);
if (adapter->le_discovering == true) {
if (adapter->le_discovery_list) {
- struct watch_client *client;
+ struct discovery_client *client;
client = adapter->le_discovery_list->data;
g_dbus_remove_watch(dbus_conn, client->watch);
static void stop_discovery_complete(uint8_t status, uint16_t length,
const void *param, void *user_data)
{
- struct watch_client *client = user_data;
+ struct discovery_client *client = user_data;
struct btd_adapter *adapter = client->adapter;
DBusMessage *reply;
const void *param, void *user_data)
{
struct btd_adapter *adapter = user_data;
- struct watch_client *client;
+ struct discovery_client *client;
DBusMessage *reply;
DBG("status 0x%02x", status);
const void *param, void *user_data)
{
struct btd_adapter *adapter = user_data;
- struct watch_client *client;
+ struct discovery_client *client;
DBG("status 0x%02x", status);
static int compare_sender(gconstpointer a, gconstpointer b)
{
- const struct watch_client *client = a;
+ const struct discovery_client *client = a;
const char *sender = b;
return g_strcmp0(client->owner, sender);
bool has_filtered_discovery = false;
for (l = adapter->discovery_list; l != NULL; l = g_slist_next(l)) {
- struct watch_client *client = l->data;
+ struct discovery_client *client = l->data;
struct discovery_filter *item = client->discovery_filter;
if (!item) {
}
for (l = adapter->discovery_list; l; l = g_slist_next(l)) {
- struct watch_client *client = l->data;
+ struct discovery_client *client = l->data;
if (!client->discovery_filter)
continue;
}
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
-static int discovery_stop(struct watch_client *client, bool exit)
+static int discovery_stop(struct discovery_client *client, bool exit)
#else
-static int discovery_stop(struct watch_client *client)
+static int discovery_stop(struct discovery_client *client)
#endif
{
struct btd_adapter *adapter = client->adapter;
static void discovery_destroy(void *user_data)
{
- struct watch_client *client = user_data;
+ struct discovery_client *client = user_data;
struct btd_adapter *adapter = client->adapter;
DBG("owner %s", client->owner);
static void discovery_disconnect(DBusConnection *conn, void *user_data)
{
- struct watch_client *client = user_data;
+ struct discovery_client *client = user_data;
DBG("owner %s", client->owner);
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
*/
static bool get_discovery_client(struct btd_adapter *adapter,
const char *owner,
- struct watch_client **client)
+ struct discovery_client **client)
{
GSList *list = g_slist_find_custom(adapter->discovery_list, owner,
compare_sender);
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
static void le_discovery_destroy(void *user_data)
{
- struct watch_client *client = user_data;
+ struct discovery_client *client = user_data;
struct btd_adapter *adapter = client->adapter;
DBG("owner %s", client->owner);
static void le_discovery_disconnect(DBusConnection *conn, void *user_data)
{
- struct watch_client *client = user_data;
+ struct discovery_client *client = user_data;
struct btd_adapter *adapter = client->adapter;
struct mgmt_cp_stop_le_discovery cp;
{
struct btd_adapter *adapter = user_data;
const char *sender = dbus_message_get_sender(msg);
- struct watch_client *client;
+ struct discovery_client *client;
GSList *list;
const gchar *disc_type;
if (list)
return btd_error_busy(msg);
- client = g_new0(struct watch_client, 1);
+ client = g_new0(struct discovery_client, 1);
client->adapter = adapter;
client->owner = g_strdup(sender);
{
struct btd_adapter *adapter = user_data;
const char *sender = dbus_message_get_sender(msg);
- struct watch_client *client;
+ struct discovery_client *client;
GSList *list;
DBG("sender %s", sender);
if (list)
return btd_error_busy(msg);
- client = g_new0(struct watch_client, 1);
+ client = g_new0(struct discovery_client, 1);
client->adapter = adapter;
client->owner = g_strdup(sender);
struct btd_adapter *adapter = user_data;
const char *sender = dbus_message_get_sender(msg);
struct mgmt_cp_stop_le_discovery cp;
- struct watch_client *client;
+ struct discovery_client *client;
GSList *list;
DBG("sender %s", sender);
{
struct btd_adapter *adapter = user_data;
const char *sender = dbus_message_get_sender(msg);
- struct watch_client *client;
+ struct discovery_client *client;
bool is_discovering;
int err;
goto done;
}
- client = g_new0(struct watch_client, 1);
+ client = g_new0(struct discovery_client, 1);
client->adapter = adapter;
client->owner = g_strdup(sender);
DBusMessage *msg, void *user_data)
{
struct btd_adapter *adapter = user_data;
- struct watch_client *client;
+ struct discovery_client *client;
struct discovery_filter *discovery_filter;
const char *sender = dbus_message_get_sender(msg);
bool is_discovering;
DBG("successfully cleared pre-set filter");
} else if (discovery_filter) {
/* Client pre-setting his filter for first time */
- client = g_new0(struct watch_client, 1);
+ client = g_new0(struct discovery_client, 1);
client->adapter = adapter;
client->owner = g_strdup(sender);
client->discovery_filter = discovery_filter;
{
struct btd_adapter *adapter = user_data;
const char *sender = dbus_message_get_sender(msg);
- struct watch_client *client;
+ struct discovery_client *client;
GSList *list;
int err;
for (l = discovery_filter; l != NULL && got_match != true;
l = g_slist_next(l)) {
- struct watch_client *client = l->data;
+ struct discovery_client *client = l->data;
struct discovery_filter *item = client->discovery_filter;
/*
static void filter_duplicate_data(void *data, void *user_data)
{
- struct watch_client *client = data;
+ struct discovery_client *client = data;
bool *duplicate = user_data;
if (*duplicate || !client->discovery_filter)
/* Do a prefix match for both address and name if pattern is set */
for (l = adapter->discovery_list; l; l = g_slist_next(l)) {
- struct watch_client *client = l->data;
+ struct dicovery_client *client = l->data;
struct discovery_filter *filter = client->discovery_filter;
size_t pattern_len;