Rename structure 'gattlib_connection_t' to '_gattlib_device'

latest-fixes
Olivier Martin 2024-04-03 15:07:13 +02:00
parent 2861549a80
commit ce52533f39
4 changed files with 5 additions and 4 deletions

View File

@ -48,7 +48,8 @@ struct gattlib_handler {
#endif
};
struct _gatt_connection_t {
struct _gattlib_device {
// Context specific to the backend implementation (eg: dbus backend)
void* context;
GMutex connection_mutex;

View File

@ -148,7 +148,7 @@ done:
static gboolean primary(gpointer user_data)
{
struct _gatt_connection_t *connection = (struct _gatt_connection_t *)user_data;
struct _gattlib_device *connection = (struct _gattlib_device *)user_data;
gattlib_context_t* conn_context = connection->context;
GAttrib *attrib = conn_context->attrib;
char uuid_str[MAX_LEN_UUID_STR + 1];

View File

@ -327,7 +327,7 @@ static void cmd_connect(int argcp, char **argvp)
if (connection == NULL) {
set_state(STATE_DISCONNECTED);
} else {
struct _gatt_connection_t *gatt_connection = (struct _gatt_connection_t *)g_connection;
struct _gattlib_device *gatt_connection = (struct _gattlib_device *)g_connection;
gattlib_context_t* conn_context = gatt_connection->context;
g_io_add_watch(conn_context->io, G_IO_HUP, channel_watcher, NULL);
}

View File

@ -149,7 +149,7 @@ extern "C" {
#define GATTLIB_LOG(level, args...) if (level <= GATTLIB_LOG_LEVEL) { gattlib_log(level, args); }
typedef struct _gatt_connection_t gatt_connection_t;
typedef struct _gattlib_device gatt_connection_t;
typedef struct _gatt_stream_t gatt_stream_t;
/**