[Spice-devel] [PATCH spice-server 10/10] Make some function static
Frediano Ziglio
fziglio at redhat.com
Wed Mar 20 09:59:19 UTC 2019
Now that stuff are a bit more on their correct place some
function can be static.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/cursor-channel.c | 11 ++++++++---
server/cursor-channel.h | 10 ----------
server/display-channel.c | 12 +++++++++---
server/display-channel.h | 5 -----
4 files changed, 17 insertions(+), 21 deletions(-)
diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index d1294322..c88e5cd1 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -335,9 +335,14 @@ void cursor_channel_set_mouse_mode(CursorChannel *cursor, uint32_t mode)
cursor->mouse_mode = mode;
}
-void cursor_channel_connect(CursorChannel *cursor, RedClient *client, RedStream *stream,
- int migrate,
- RedChannelCapabilities *caps)
+/**
+ * Connect a new client to CursorChannel.
+ * This is the equivalent of RedChannel client connect callback.
+ * See comment on cursor_channel_new.
+ */
+static void
+cursor_channel_connect(CursorChannel *cursor, RedClient *client, RedStream *stream,
+ int migrate, RedChannelCapabilities *caps)
{
CursorChannelClient *ccc;
diff --git a/server/cursor-channel.h b/server/cursor-channel.h
index 767325ea..ce1b92cc 100644
--- a/server/cursor-channel.h
+++ b/server/cursor-channel.h
@@ -66,16 +66,6 @@ void cursor_channel_do_init (CursorChannel *cursor);
void cursor_channel_process_cmd (CursorChannel *cursor, RedCursorCmd *cursor_cmd);
void cursor_channel_set_mouse_mode(CursorChannel *cursor, uint32_t mode);
-/**
- * Connect a new client to CursorChannel.
- * This is the equivalent of RedChannel client connect callback.
- * See comment on cursor_channel_new.
- */
-void cursor_channel_connect (CursorChannel *cursor, RedClient *client,
- RedStream *stream,
- int migrate,
- RedChannelCapabilities *caps);
-
/**
* Migrate a client channel from a CursorChannel.
* This is the equivalent of RedChannel client migrate callback.
diff --git a/server/display-channel.c b/server/display-channel.c
index fde4d5c3..b797159f 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -26,6 +26,12 @@
G_DEFINE_TYPE(DisplayChannel, display_channel, TYPE_COMMON_GRAPHICS_CHANNEL)
+static void display_channel_connect(RedChannel *channel, RedClient *client,
+ RedStream *stream, int migration,
+ RedChannelCapabilities *caps);
+static void display_channel_disconnect(RedChannelClient *rcc);
+static void display_channel_migrate(RedChannelClient *rcc);
+
enum {
PROP0,
PROP_N_SURFACES,
@@ -2602,7 +2608,7 @@ void display_channel_set_running(DisplayChannel *display, bool running)
}
}
-void
+static void
display_channel_connect(RedChannel *channel, RedClient *client,
RedStream *stream, int migration,
RedChannelCapabilities *caps)
@@ -2625,7 +2631,7 @@ display_channel_connect(RedChannel *channel, RedClient *client,
dcc_start(dcc);
}
-void display_channel_disconnect(RedChannelClient *rcc)
+static void display_channel_disconnect(RedChannelClient *rcc)
{
DisplayChannel *display = DISPLAY_CHANNEL(red_channel_client_get_channel(rcc));
@@ -2652,7 +2658,7 @@ static void red_migrate_display(DisplayChannel *display, RedChannelClient *rcc)
}
}
-void display_channel_migrate(RedChannelClient *rcc)
+static void display_channel_migrate(RedChannelClient *rcc)
{
DisplayChannel *display = DISPLAY_CHANNEL(red_channel_client_get_channel(rcc));
red_migrate_display(display, rcc);
diff --git a/server/display-channel.h b/server/display-channel.h
index 989bf52b..bdf2f059 100644
--- a/server/display-channel.h
+++ b/server/display-channel.h
@@ -159,11 +159,6 @@ void display_channel_reset_image_cache(DisplayChannel *self);
void display_channel_debug_oom(DisplayChannel *display, const char *msg);
void display_channel_set_running(DisplayChannel *display, bool running);
-void display_channel_connect(RedChannel *channel, RedClient *client,
- RedStream *stream, int migration,
- RedChannelCapabilities *caps);
-void display_channel_disconnect(RedChannelClient *rcc);
-void display_channel_migrate(RedChannelClient *rcc);
G_END_DECLS
--
2.20.1
More information about the Spice-devel
mailing list