summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2016-04-01 13:37:48 +0100
committerJonathon Jongsma <jjongsma@redhat.com>2016-04-07 11:42:24 -0500
commit87b6b9273d61293c1468044f1e1a2c738ce5089b (patch)
treeeb1da6bf0b29e763a020fdbfa395a428bb0bcb22
parent1cec1c5118b65124de6bc6f984f376ff4e297bfb (diff)
reds: Remove red_char_device_new()
Nothing is using it anymore now that CharDevice classes are gobjectified.
-rw-r--r--server/char-device.c42
-rw-r--r--server/char-device.h9
2 files changed, 1 insertions, 50 deletions
diff --git a/server/char-device.c b/server/char-device.c
index bd2737fe..693e8bb4 100644
--- a/server/char-device.c
+++ b/server/char-device.c
@@ -103,13 +103,6 @@ typedef struct RedCharDeviceMsgToClientItem {
RedCharDeviceMsgToClient *msg;
} RedCharDeviceMsgToClientItem;
-static RedCharDevice *red_char_device_new(SpiceCharDeviceInstance *sin,
- RedsState *reds,
- uint32_t client_tokens_interval,
- uint32_t self_tokens,
- RedCharDeviceCallbacks *cbs,
- void *opaque);
-
static RedCharDeviceMsgToClient *
red_char_device_read_one_msg_from_device(RedCharDevice *dev)
{
@@ -731,17 +724,6 @@ void red_char_device_write_buffer_release(RedCharDevice *dev,
* char_device_state management *
********************************/
-RedCharDevice *red_char_device_create(SpiceCharDeviceInstance *sin,
- RedsState *reds,
- uint32_t client_tokens_interval,
- uint32_t self_tokens,
- RedCharDeviceCallbacks *cbs,
- void *opaque)
-{
- return red_char_device_new(sin, reds, client_tokens_interval,
- self_tokens, cbs, opaque);
-}
-
void red_char_device_reset_dev_instance(RedCharDevice *state,
SpiceCharDeviceInstance *sin)
{
@@ -1253,30 +1235,6 @@ red_char_device_init(RedCharDevice *self)
g_signal_connect(self, "notify::sin", G_CALLBACK(red_char_device_on_sin_changed), NULL);
}
-static RedCharDevice *
-red_char_device_new(SpiceCharDeviceInstance *sin,
- RedsState *reds,
- uint32_t client_tokens_interval,
- uint32_t self_tokens,
- RedCharDeviceCallbacks *cbs,
- void *opaque)
-{
- RedCharDevice *char_dev;
-
- char_dev = g_object_new(RED_TYPE_CHAR_DEVICE,
- "sin", sin,
- "spice-server", reds,
- "client-tokens-interval", (guint64) client_tokens_interval,
- "self-tokens", (guint64) self_tokens,
- "opaque", opaque,
- NULL);
-
- /* TODO: redundant with the "opaque" property in g_object_new */
- red_char_device_set_callbacks(char_dev, cbs, opaque);
-
- return char_dev;
-}
-
/* TODO: needs to be moved to class vfuncs once all child classes are gobjects */
void
red_char_device_set_callbacks(RedCharDevice *dev,
diff --git a/server/char-device.h b/server/char-device.h
index 88961cc9..020aa1a2 100644
--- a/server/char-device.h
+++ b/server/char-device.h
@@ -62,7 +62,7 @@ void red_char_device_set_callbacks(RedCharDevice *dev,
*
* How to use the api:
* ==================
- * device attached: call red_char_device_create
+ * device attached: create new object instantiating a RedCharDevice child class
* device detached: call red_char_device_destroy/reset
*
* client connected and associated with a device: red_char_device__add
@@ -167,13 +167,6 @@ struct RedCharDeviceCallbacks {
void (*remove_client)(RedClient *client, void *opaque);
};
-RedCharDevice *red_char_device_create(SpiceCharDeviceInstance *sin,
- RedsState *reds,
- uint32_t client_tokens_interval,
- uint32_t self_tokens,
- RedCharDeviceCallbacks *cbs,
- void *opaque);
-
void red_char_device_reset_dev_instance(RedCharDevice *dev,
SpiceCharDeviceInstance *sin);
void red_char_device_destroy(RedCharDevice *dev);