summaryrefslogtreecommitdiffstats
path: root/server/main_channel.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-03-14 17:11:31 +0100
committerHans de Goede <hdegoede@redhat.com>2013-03-15 09:44:50 +0100
commit0711a4a464ca90f5ac34ba1363a8c4916d415103 (patch)
tree3233ea34b909088f32d89e09ec4bb4b91f889304 /server/main_channel.c
parent3a2f42555dbae4357aa9fc2e83c9b31a837ac98d (diff)
downloadspice-0711a4a464ca90f5ac34ba1363a8c4916d415103.tar.gz
spice-0711a4a464ca90f5ac34ba1363a8c4916d415103.tar.xz
spice-0711a4a464ca90f5ac34ba1363a8c4916d415103.zip
main-channel: Add a main_channel_client_push_notify function
Sometimes we want to send a notify to a single client, rather then to all of them. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'server/main_channel.c')
-rw-r--r--server/main_channel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/main_channel.c b/server/main_channel.c
index 55c32913..618f5bf1 100644
--- a/server/main_channel.c
+++ b/server/main_channel.c
@@ -575,13 +575,18 @@ void main_channel_push_uuid(MainChannelClient *mcc, const uint8_t uuid[16])
red_channel_client_pipe_add_push(&mcc->base, item);
}
-// TODO - some notifications are new client only (like "keyboard is insecure" on startup)
void main_channel_push_notify(MainChannel *main_chan, const char *msg)
{
red_channel_pipes_new_add_push(&main_chan->base,
main_notify_item_new, (void *)msg);
}
+void main_channel_client_push_notify(MainChannelClient *mcc, const char *msg)
+{
+ PipeItem *item = main_notify_item_new(&mcc->base, (void *)msg, 1);
+ red_channel_client_pipe_add_push(&mcc->base, item);
+}
+
static uint64_t get_time_stamp(void)
{
struct timespec time_space;