libeis: add eis_client_get/set_user_data

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-10-22 14:05:09 +10:00
parent 51bec40aa5
commit 54c06f8d1e
3 changed files with 11 additions and 0 deletions

View file

@ -62,6 +62,10 @@ OBJECT_IMPLEMENT_UNREF(eis_client);
_public_
OBJECT_IMPLEMENT_GETTER(eis_client, name, const char*);
_public_
OBJECT_IMPLEMENT_SETTER(eis_client, user_data, void*);
_public_
OBJECT_IMPLEMENT_GETTER(eis_client, user_data, void*);
_public_ struct eis*
eis_client_get_context(struct eis_client *client)

View file

@ -61,6 +61,7 @@ enum eis_client_state {
struct eis_client {
struct object object;
void *user_data;
struct list link;
struct source *source;
uint32_t id;

View file

@ -248,6 +248,12 @@ eis_client_ref(struct eis_client *client);
struct eis_client *
eis_client_unref(struct eis_client *client);
void *
eis_client_get_user_data(struct eis_client *eis_client);
void
eis_client_set_user_data(struct eis_client *eis_client, void *user_data);
/**
* Return the name set by this client. The server is under no obligation to
* use this name.