diff --git a/src/libeis-client.c b/src/libeis-client.c index 2c5b305..3bce045 100644 --- a/src/libeis-client.c +++ b/src/libeis-client.c @@ -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) diff --git a/src/libeis-private.h b/src/libeis-private.h index d7f52e5..f30f351 100644 --- a/src/libeis-private.h +++ b/src/libeis-private.h @@ -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; diff --git a/src/libeis.h b/src/libeis.h index 475147a..00d14a4 100644 --- a/src/libeis.h +++ b/src/libeis.h @@ -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.