summaryrefslogtreecommitdiffstats
path: root/server
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
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')
-rw-r--r--server/main_channel.c7
-rw-r--r--server/main_channel.h1
2 files changed, 7 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;
diff --git a/server/main_channel.h b/server/main_channel.h
index 5f77b74a..56663b7c 100644
--- a/server/main_channel.h
+++ b/server/main_channel.h
@@ -61,6 +61,7 @@ void main_channel_push_init(MainChannelClient *mcc, int display_channels_hint,
int current_mouse_mode, int is_client_mouse_allowed, int multi_media_time,
int ram_hint);
void main_channel_push_notify(MainChannel *main_chan, const char *msg);
+void main_channel_client_push_notify(MainChannelClient *mcc, const char *msg);
void main_channel_push_multi_media_time(MainChannel *main_chan, int time);
int main_channel_getsockname(MainChannel *main_chan, struct sockaddr *sa, socklen_t *salen);
int main_channel_getpeername(MainChannel *main_chan, struct sockaddr *sa, socklen_t *salen);