diff --git a/src/adapter.c b/src/adapter.c
index e969c48..5a1816c 100644
--- a/src/adapter.c
+++ b/src/adapter.c
}
struct btd_device *adapter_get_device(struct btd_adapter *adapter,
- const gchar *address, uint8_t addr_type)
+ const char *address, uint8_t addr_type)
{
struct btd_device *device;
return TRUE;
}
-static gint device_path_cmp(struct btd_device *device, const gchar *path)
+static gint device_path_cmp(struct btd_device *device, const char *path)
{
- const gchar *dev_path = device_get_path(device);
+ const char *dev_path = device_get_path(device);
return strcasecmp(dev_path, path);
}
return adapter->dev_id;
}
-const gchar *adapter_get_path(struct btd_adapter *adapter)
+const char *adapter_get_path(struct btd_adapter *adapter)
{
if (!adapter)
return NULL;
while (!g_queue_is_empty(adapter->auths)) {
struct service_auth *auth = adapter->auths->head->data;
struct btd_device *device = auth->device;
- const gchar *dev_path;
+ const char *dev_path;
if (device_is_trusted(device) == TRUE) {
auth->cb(NULL, auth->user_data);
diff --git a/src/adapter.h b/src/adapter.h
index 2462e31..e8a60f8 100644
--- a/src/adapter.h
+++ b/src/adapter.h
uint32_t btd_adapter_get_class(struct btd_adapter *adapter);
const char *btd_adapter_get_name(struct btd_adapter *adapter);
struct btd_device *adapter_get_device(struct btd_adapter *adapter,
- const gchar *address, uint8_t addr_type);
+ const char *address, uint8_t addr_type);
sdp_list_t *btd_adapter_get_services(struct btd_adapter *adapter);
struct btd_device *adapter_find_device(struct btd_adapter *adapter, const char *dest);
void adapter_set_discovering(struct btd_adapter *adapter,
gboolean discovering);
uint16_t adapter_get_dev_id(struct btd_adapter *adapter);
-const gchar *adapter_get_path(struct btd_adapter *adapter);
+const char *adapter_get_path(struct btd_adapter *adapter);
const bdaddr_t *adapter_get_address(struct btd_adapter *adapter);
void adapter_update_found_devices(struct btd_adapter *adapter,
const bdaddr_t *bdaddr,
diff --git a/src/agent.c b/src/agent.c
index 5fe5492..0fde3ef 100644
--- a/src/agent.c
+++ b/src/agent.c
void *user_data, GDestroyNotify destroy)
{
struct agent_request *req;
- const gchar *dev_path = device_get_path(device);
+ const char *dev_path = device_get_path(device);
int err;
if (agent->request)
GDestroyNotify destroy)
{
struct agent_request *req;
- const gchar *dev_path = device_get_path(device);
+ const char *dev_path = device_get_path(device);
int err;
if (agent->request)
void *user_data, GDestroyNotify destroy)
{
struct agent_request *req;
- const gchar *dev_path = device_get_path(device);
+ const char *dev_path = device_get_path(device);
int err;
if (agent->request)
GDestroyNotify destroy)
{
struct agent_request *req;
- const gchar *dev_path = device_get_path(device);
+ const char *dev_path = device_get_path(device);
int err;
if (agent->request)
uint32_t passkey, uint16_t entered)
{
DBusMessage *message;
- const gchar *dev_path = device_get_path(device);
+ const char *dev_path = device_get_path(device);
message = dbus_message_new_method_call(agent->owner, agent->path,
AGENT_INTERFACE, "DisplayPasskey");
void *user_data, GDestroyNotify destroy)
{
struct agent_request *req;
- const gchar *dev_path = device_get_path(device);
+ const char *dev_path = device_get_path(device);
int err;
if (agent->request)
diff --git a/src/device.c b/src/device.c
index 20099e6..61c25f4 100644
--- a/src/device.c
+++ b/src/device.c
struct btd_device {
bdaddr_t bdaddr;
uint8_t bdaddr_type;
- gchar *path;
+ char *path;
bool svc_resolved;
GSList *eir_uuids;
char name[MAX_NAME_LENGTH + 1];
char device_addr[18];
char *str;
char class[9];
- gchar **uuids = NULL;
+ char **uuids = NULL;
gsize length = 0;
device->store_id = 0;
GSList *l;
int i;
- uuids = g_new0(gchar *, g_slist_length(device->uuids) + 1);
+ uuids = g_new0(char *, g_slist_length(device->uuids) + 1);
for (i = 0, l = device->uuids; l; l = g_slist_next(l), i++)
uuids[i] = l->data;
g_key_file_set_string_list(key_file, "General", "Services",
- (const gchar **)uuids, i);
+ (const char **)uuids, i);
} else {
g_key_file_remove_key(key_file, "General", "Services", NULL);
}
}
static char *load_cached_name(struct btd_device *device, const char *local,
- const gchar *peer)
+ const char *peer)
{
char filename[PATH_MAX + 1];
GKeyFile *key_file;
return str;
}
-static void load_info(struct btd_device *device, const gchar *local,
- const gchar *peer, GKeyFile *key_file)
+static void load_info(struct btd_device *device, const char *local,
+ const char *peer, GKeyFile *key_file)
{
char *str;
gboolean store_needed = FALSE;
gboolean blocked;
- gchar **uuids;
+ char **uuids;
int source, vendor, product, version;
char **techno, **t;
gboolean bredr = FALSE;
uuids = g_key_file_get_string_list(key_file, "General", "Services",
NULL, NULL);
if (uuids) {
- gchar **uuid;
+ char **uuid;
for (uuid = uuids; *uuid; uuid++) {
GSList *match;
store_device_info(device);
}
-static void load_att_info(struct btd_device *device, const gchar *local,
- const gchar *peer)
+static void load_att_info(struct btd_device *device, const char *local,
+ const char *peer)
{
char filename[PATH_MAX + 1];
GKeyFile *key_file;
}
static struct btd_device *device_new(struct btd_adapter *adapter,
- const gchar *address)
+ const char *address)
{
- gchar *address_up;
+ char *address_up;
struct btd_device *device;
- const gchar *adapter_path = adapter_get_path(adapter);
+ const char *adapter_path = adapter_get_path(adapter);
device = g_try_malloc0(sizeof(struct btd_device));
if (device == NULL)
}
struct btd_device *device_create(struct btd_adapter *adapter,
- const gchar *address, uint8_t bdaddr_type)
+ const char *address, uint8_t bdaddr_type)
{
struct btd_device *device;
const bdaddr_t *src;
btd_device_unref(device);
}
-gint device_address_cmp(struct btd_device *device, const gchar *address)
+gint device_address_cmp(struct btd_device *device, const char *address)
{
char addr[18];
for (seq = recs; seq; seq = seq->next) {
sdp_record_t *rec = (sdp_record_t *) seq->data;
sdp_list_t *svcclass = NULL;
- gchar *profile_uuid;
+ char *profile_uuid;
GSList *l;
if (!rec)
return &device->bdaddr;
}
-const gchar *device_get_path(struct btd_device *device)
+const char *device_get_path(struct btd_device *device)
{
if (!device)
return NULL;
void btd_device_unref(struct btd_device *device)
{
- gchar *path;
+ char *path;
device->ref--;
diff --git a/src/device.h b/src/device.h
index ae70690..96e81f0 100644
--- a/src/device.h
+++ b/src/device.h
uint16_t btd_device_get_product(struct btd_device *device);
uint16_t btd_device_get_version(struct btd_device *device);
void device_remove(struct btd_device *device, gboolean remove_stored);
-gint device_address_cmp(struct btd_device *device, const gchar *address);
+gint device_address_cmp(struct btd_device *device, const char *address);
gint device_bdaddr_cmp(struct btd_device *device, bdaddr_t *bdaddr);
GSList *device_get_uuids(struct btd_device *device);
void device_probe_profiles(struct btd_device *device, GSList *profiles);
void device_remove_profile(gpointer a, gpointer b);
struct btd_adapter *device_get_adapter(struct btd_device *device);
const bdaddr_t *device_get_address(struct btd_device *device);
-const gchar *device_get_path(struct btd_device *device);
+const char *device_get_path(struct btd_device *device);
gboolean device_is_bredr(struct btd_device *device);
gboolean device_is_le(struct btd_device *device);
gboolean device_is_temporary(struct btd_device *device);
diff --git a/src/glib-helper.c b/src/glib-helper.c
index 9d482fb..a9a9a6e 100644
--- a/src/glib-helper.c
+++ b/src/glib-helper.c
char *bt_uuid2string(uuid_t *uuid)
{
- gchar *str;
+ char *str;
uuid_t uuid128;
unsigned int data0;
unsigned short data1;
diff --git a/src/glib-helper.h b/src/glib-helper.h
index f414e0c..c0d7f9e 100644
--- a/src/glib-helper.h
+++ b/src/glib-helper.h
char *bt_modalias(uint16_t source, uint16_t vendor,
uint16_t product, uint16_t version);
-gchar *bt_uuid2string(uuid_t *uuid);
+char *bt_uuid2string(uuid_t *uuid);
char *bt_name2string(const char *string);
int bt_string2uuid(uuid_t *uuid, const char *string);
diff --git a/src/sdp-xml.c b/src/sdp-xml.c
index 80f180e..8cb1e2d 100644
--- a/src/sdp-xml.c
+++ b/src/sdp-xml.c
return NULL;
}
static void element_start(GMarkupParseContext *context,
- const gchar *element_name, const gchar **attribute_names,
- const gchar **attribute_values, gpointer user_data, GError **err)
+ const char *element_name, const char **attribute_names,
+ const char **attribute_values, gpointer user_data, GError **err)
{
struct context_data *ctx_data = user_data;
}
static void element_end(GMarkupParseContext *context,
- const gchar *element_name, gpointer user_data, GError **err)
+ const char *element_name, gpointer user_data, GError **err)
{
struct context_data *ctx_data = user_data;
struct sdp_xml_data *elem;
diff --git a/src/storage.c b/src/storage.c
index be3bbf2..28abeb3 100644
--- a/src/storage.c
+++ b/src/storage.c
return 0;
}
-sdp_record_t *record_from_string(const gchar *str)
+sdp_record_t *record_from_string(const char *str)
{
sdp_record_t *rec;
int size, i, len;
diff --git a/src/storage.h b/src/storage.h
index 8d171b0..53e9834 100644
--- a/src/storage.h
+++ b/src/storage.h
int read_pairable_timeout(const char *src, int *timeout);
int read_on_mode(const char *src, char *mode, int length);
int read_local_name(const bdaddr_t *bdaddr, char *name);
-sdp_record_t *record_from_string(const gchar *str);
+sdp_record_t *record_from_string(const char *str);
sdp_record_t *find_record_in_list(sdp_list_t *recs, const char *uuid);
int read_device_pairable(const bdaddr_t *local, gboolean *mode);