[Spice-devel] [PATCH spice-server] fixup! Convert RedChannelClient hierarchy to GObject

Frediano Ziglio fziglio at redhat.com
Fri Sep 30 13:57:14 UTC 2016


Split lines with more than 100 characters

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/cursor-channel-client.c    |  6 ++++--
 server/cursor-channel-client.h    | 15 ++++++++++-----
 server/dcc.c                      |  6 ++++--
 server/dcc.h                      | 15 ++++++++++-----
 server/dummy-channel-client.c     |  6 ++++--
 server/dummy-channel-client.h     | 15 ++++++++++-----
 server/inputs-channel-client.c    |  6 ++++--
 server/inputs-channel-client.h    | 18 ++++++++++++------
 server/main-channel-client.c      | 15 ++++++++++-----
 server/main-channel-client.h      | 15 ++++++++++-----
 server/red-channel-client.c       | 19 ++++++++++++-------
 server/red-channel-client.h       | 15 ++++++++++-----
 server/smartcard-channel-client.c |  7 +++++--
 server/smartcard-channel-client.h | 15 ++++++++++-----
 14 files changed, 115 insertions(+), 58 deletions(-)

diff --git a/server/cursor-channel-client.c b/server/cursor-channel-client.c
index 51fef19..15bc4fa 100644
--- a/server/cursor-channel-client.c
+++ b/server/cursor-channel-client.c
@@ -42,7 +42,8 @@ enum {
 
 G_DEFINE_TYPE(CursorChannelClient, cursor_channel_client, RED_TYPE_CHANNEL_CLIENT)
 
-#define CURSOR_CHANNEL_CLIENT_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_CURSOR_CHANNEL_CLIENT, CursorChannelClientPrivate))
+#define CURSOR_CHANNEL_CLIENT_PRIVATE(o) \
+    (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_CURSOR_CHANNEL_CLIENT, CursorChannelClientPrivate))
 
 struct CursorChannelClientPrivate
 {
@@ -113,7 +114,8 @@ CursorChannelClient* cursor_channel_client_new(CursorChannel *cursor, RedClient
     GArray *common_caps_array = NULL, *caps_array = NULL;
 
     if (common_caps) {
-        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps), num_common_caps);
+        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps),
+                                              num_common_caps);
         g_array_append_vals(common_caps_array, common_caps, num_common_caps);
     }
     if (caps) {
diff --git a/server/cursor-channel-client.h b/server/cursor-channel-client.h
index a5f7220..2336b95 100644
--- a/server/cursor-channel-client.h
+++ b/server/cursor-channel-client.h
@@ -29,11 +29,16 @@ G_BEGIN_DECLS
 
 #define TYPE_CURSOR_CHANNEL_CLIENT cursor_channel_client_get_type()
 
-#define CURSOR_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_CURSOR_CHANNEL_CLIENT, CursorChannelClient))
-#define CURSOR_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_CURSOR_CHANNEL_CLIENT, CursorChannelClientClass))
-#define IS_CURSOR_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_CURSOR_CHANNEL_CLIENT))
-#define IS_CURSOR_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_CURSOR_CHANNEL_CLIENT))
-#define CURSOR_CHANNEL_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_CURSOR_CHANNEL_CLIENT, CursorChannelClientClass))
+#define CURSOR_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_CURSOR_CHANNEL_CLIENT, CursorChannelClient))
+#define CURSOR_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_CURSOR_CHANNEL_CLIENT, CursorChannelClientClass))
+#define IS_CURSOR_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_CURSOR_CHANNEL_CLIENT))
+#define IS_CURSOR_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_CURSOR_CHANNEL_CLIENT))
+#define CURSOR_CHANNEL_CLIENT_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_CURSOR_CHANNEL_CLIENT, CursorChannelClientClass))
 
 typedef struct CursorChannelClient CursorChannelClient;
 typedef struct CursorChannelClientClass CursorChannelClientClass;
diff --git a/server/dcc.c b/server/dcc.c
index 08866c9..6713b30 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -26,7 +26,8 @@
 
 G_DEFINE_TYPE(DisplayChannelClient, display_channel_client, RED_TYPE_CHANNEL_CLIENT)
 
-#define DISPLAY_CHANNEL_CLIENT_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_DISPLAY_CHANNEL_CLIENT, DisplayChannelClientPrivate))
+#define DISPLAY_CHANNEL_CLIENT_PRIVATE(o) \
+    (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_DISPLAY_CHANNEL_CLIENT, DisplayChannelClientPrivate))
 
 #define DISPLAY_CLIENT_SHORT_TIMEOUT 15000000000ULL //nano
 #define DISPLAY_FREE_LIST_DEFAULT_SIZE 128
@@ -499,7 +500,8 @@ DisplayChannelClient *dcc_new(DisplayChannel *display,
     GArray *common_caps_array = NULL, *caps_array = NULL;
 
     if (common_caps) {
-        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps), num_common_caps);
+        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps),
+                                              num_common_caps);
         g_array_append_vals(common_caps_array, common_caps, num_common_caps);
     }
     if (caps) {
diff --git a/server/dcc.h b/server/dcc.h
index c967a8c..2456f09 100644
--- a/server/dcc.h
+++ b/server/dcc.h
@@ -30,11 +30,16 @@ G_BEGIN_DECLS
 
 #define TYPE_DISPLAY_CHANNEL_CLIENT display_channel_client_get_type()
 
-#define DISPLAY_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_DISPLAY_CHANNEL_CLIENT, DisplayChannelClient))
-#define DISPLAY_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_DISPLAY_CHANNEL_CLIENT, DisplayChannelClientClass))
-#define IS_DISPLAY_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_DISPLAY_CHANNEL_CLIENT))
-#define IS_DISPLAY_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_DISPLAY_CHANNEL_CLIENT))
-#define DISPLAY_CHANNEL_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_DISPLAY_CHANNEL_CLIENT, DisplayChannelClientClass))
+#define DISPLAY_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_DISPLAY_CHANNEL_CLIENT, DisplayChannelClient))
+#define DISPLAY_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_DISPLAY_CHANNEL_CLIENT, DisplayChannelClientClass))
+#define IS_DISPLAY_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_DISPLAY_CHANNEL_CLIENT))
+#define IS_DISPLAY_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_DISPLAY_CHANNEL_CLIENT))
+#define DISPLAY_CHANNEL_CLIENT_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_DISPLAY_CHANNEL_CLIENT, DisplayChannelClientClass))
 
 typedef struct DisplayChannelClient DisplayChannelClient;
 typedef struct DisplayChannelClientClass DisplayChannelClientClass;
diff --git a/server/dummy-channel-client.c b/server/dummy-channel-client.c
index 34868a9..1b72137 100644
--- a/server/dummy-channel-client.c
+++ b/server/dummy-channel-client.c
@@ -27,7 +27,8 @@ G_DEFINE_TYPE_WITH_CODE(DummyChannelClient, dummy_channel_client, RED_TYPE_CHANN
                         G_IMPLEMENT_INTERFACE(G_TYPE_INITABLE,
                                               dummy_channel_client_initable_interface_init))
 
-#define DUMMY_CHANNEL_CLIENT_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_DUMMY_CHANNEL_CLIENT, DummyChannelClientPrivate))
+#define DUMMY_CHANNEL_CLIENT_PRIVATE(o) \
+    (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_DUMMY_CHANNEL_CLIENT, DummyChannelClientPrivate))
 
 struct DummyChannelClientPrivate
 {
@@ -131,7 +132,8 @@ RedChannelClient* dummy_channel_client_create(RedChannel *channel,
     GArray *common_caps_array = NULL, *caps_array = NULL;
 
     if (common_caps) {
-        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps), num_common_caps);
+        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps),
+                                              num_common_caps);
         g_array_append_vals(common_caps_array, common_caps, num_common_caps);
     }
     if (caps) {
diff --git a/server/dummy-channel-client.h b/server/dummy-channel-client.h
index df3e982..8013aa2 100644
--- a/server/dummy-channel-client.h
+++ b/server/dummy-channel-client.h
@@ -25,11 +25,16 @@ G_BEGIN_DECLS
 
 #define TYPE_DUMMY_CHANNEL_CLIENT dummy_channel_client_get_type()
 
-#define DUMMY_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DUMMY_CHANNEL_CLIENT, DummyChannelClient))
-#define DUMMY_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DUMMY_CHANNEL_CLIENT, DummyChannelClientClass))
-#define IS_DUMMY_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DUMMY_CHANNEL_CLIENT))
-#define IS_DUMMY_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DUMMY_CHANNEL_CLIENT))
-#define DUMMY_CHANNEL_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DUMMY_CHANNEL_CLIENT, DummyChannelClientClass))
+#define DUMMY_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DUMMY_CHANNEL_CLIENT, DummyChannelClient))
+#define DUMMY_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DUMMY_CHANNEL_CLIENT, DummyChannelClientClass))
+#define IS_DUMMY_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DUMMY_CHANNEL_CLIENT))
+#define IS_DUMMY_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DUMMY_CHANNEL_CLIENT))
+#define DUMMY_CHANNEL_CLIENT_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DUMMY_CHANNEL_CLIENT, DummyChannelClientClass))
 
 typedef struct DummyChannelClient DummyChannelClient;
 typedef struct DummyChannelClientClass DummyChannelClientClass;
diff --git a/server/inputs-channel-client.c b/server/inputs-channel-client.c
index a4f2dd1..76de382 100644
--- a/server/inputs-channel-client.c
+++ b/server/inputs-channel-client.c
@@ -24,7 +24,8 @@
 
 G_DEFINE_TYPE(InputsChannelClient, inputs_channel_client, RED_TYPE_CHANNEL_CLIENT)
 
-#define INPUTS_CHANNEL_CLIENT_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_INPUTS_CHANNEL_CLIENT, InputsChannelClientPrivate))
+#define INPUTS_CHANNEL_CLIENT_PRIVATE(o) \
+    (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_INPUTS_CHANNEL_CLIENT, InputsChannelClientPrivate))
 
 struct InputsChannelClientPrivate
 {
@@ -56,7 +57,8 @@ RedChannelClient* inputs_channel_client_create(RedChannel *channel,
     GArray *common_caps_array = NULL, *caps_array = NULL;
 
     if (common_caps) {
-        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps), num_common_caps);
+        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps),
+                                              num_common_caps);
         g_array_append_vals(common_caps_array, common_caps, num_common_caps);
     }
     if (caps) {
diff --git a/server/inputs-channel-client.h b/server/inputs-channel-client.h
index 754d359..7550b3c 100644
--- a/server/inputs-channel-client.h
+++ b/server/inputs-channel-client.h
@@ -27,11 +27,16 @@ G_BEGIN_DECLS
 
 #define TYPE_INPUTS_CHANNEL_CLIENT inputs_channel_client_get_type()
 
-#define INPUTS_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_INPUTS_CHANNEL_CLIENT, InputsChannelClient))
-#define INPUTS_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_INPUTS_CHANNEL_CLIENT, InputsChannelClientClass))
-#define IS_INPUTS_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_INPUTS_CHANNEL_CLIENT))
-#define IS_INPUTS_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_INPUTS_CHANNEL_CLIENT))
-#define INPUTS_CHANNEL_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_INPUTS_CHANNEL_CLIENT, InputsChannelClientClass))
+#define INPUTS_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_INPUTS_CHANNEL_CLIENT, InputsChannelClient))
+#define INPUTS_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_INPUTS_CHANNEL_CLIENT, InputsChannelClientClass))
+#define IS_INPUTS_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_INPUTS_CHANNEL_CLIENT))
+#define IS_INPUTS_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_INPUTS_CHANNEL_CLIENT))
+#define INPUTS_CHANNEL_CLIENT_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_INPUTS_CHANNEL_CLIENT, InputsChannelClientClass))
 
 typedef struct InputsChannelClient InputsChannelClient;
 typedef struct InputsChannelClientClass InputsChannelClientClass;
@@ -64,7 +69,8 @@ uint16_t inputs_channel_client_get_motion_count(InputsChannelClient* self);
 /* only for migration */
 void inputs_channel_client_set_motion_count(InputsChannelClient* self, uint16_t count);
 void inputs_channel_client_on_mouse_motion(InputsChannelClient* self);
-void inputs_channel_client_send_migrate_data(RedChannelClient *rcc, SpiceMarshaller *m, RedPipeItem *item);
+void inputs_channel_client_send_migrate_data(RedChannelClient *rcc,
+                                             SpiceMarshaller *m, RedPipeItem *item);
 void inputs_channel_client_handle_migrate_data(InputsChannelClient *icc, uint16_t motion_count);
 
 G_END_DECLS
diff --git a/server/main-channel-client.c b/server/main-channel-client.c
index ec9c3e1..00c90b5 100644
--- a/server/main-channel-client.c
+++ b/server/main-channel-client.c
@@ -44,7 +44,8 @@ enum NetTestStage {
 
 G_DEFINE_TYPE(MainChannelClient, main_channel_client, RED_TYPE_CHANNEL_CLIENT)
 
-#define MAIN_CHANNEL_CLIENT_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_MAIN_CHANNEL_CLIENT, MainChannelClientPrivate))
+#define MAIN_CHANNEL_CLIENT_PRIVATE(o) \
+    (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_MAIN_CHANNEL_CLIENT, MainChannelClientPrivate))
 
 struct MainChannelClientPrivate {
     uint32_t connection_id;
@@ -178,10 +179,13 @@ static void main_channel_client_constructed(GObject *object)
     G_OBJECT_CLASS(main_channel_client_parent_class)->constructed(object);
 #ifdef RED_STATISTICS
     MainChannelClient *self = MAIN_CHANNEL_CLIENT(object);
-    RedsState *reds = red_channel_get_server(red_channel_client_get_channel(RED_CHANNEL_CLIENT(object)));
+    RedsState *reds =
+        red_channel_get_server(red_channel_client_get_channel(RED_CHANNEL_CLIENT(object)));
 
-    if (!(self->priv->ping_timer = reds_get_core_interface(reds)->timer_add(reds_get_core_interface(reds),
-                                                                            ping_timer_cb, self))) {
+    self->priv->ping_timer =
+        reds_get_core_interface(reds)->timer_add(reds_get_core_interface(reds),
+                                                 ping_timer_cb, self);
+    if (!self->priv->ping_timer) {
         spice_error("ping timer create failed");
     }
     self->priv->ping_interval = PING_INTERVAL;
@@ -653,7 +657,8 @@ MainChannelClient *main_channel_client_create(MainChannel *main_chan, RedClient
     GArray *common_caps_array = NULL, *caps_array = NULL;
 
     if (common_caps) {
-        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps), num_common_caps);
+        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps),
+                                              num_common_caps);
         g_array_append_vals(common_caps_array, common_caps, num_common_caps);
     }
     if (caps) {
diff --git a/server/main-channel-client.h b/server/main-channel-client.h
index f95ddef..360c61e 100644
--- a/server/main-channel-client.h
+++ b/server/main-channel-client.h
@@ -29,11 +29,16 @@ typedef struct MainChannel MainChannel;
 
 #define TYPE_MAIN_CHANNEL_CLIENT main_channel_client_get_type()
 
-#define MAIN_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_MAIN_CHANNEL_CLIENT, MainChannelClient))
-#define MAIN_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_MAIN_CHANNEL_CLIENT, MainChannelClientClass))
-#define IS_MAIN_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_MAIN_CHANNEL_CLIENT))
-#define IS_MAIN_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_MAIN_CHANNEL_CLIENT))
-#define MAIN_CHANNEL_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_MAIN_CHANNEL_CLIENT, MainChannelClientClass))
+#define MAIN_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_MAIN_CHANNEL_CLIENT, MainChannelClient))
+#define MAIN_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_MAIN_CHANNEL_CLIENT, MainChannelClientClass))
+#define IS_MAIN_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_MAIN_CHANNEL_CLIENT))
+#define IS_MAIN_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_MAIN_CHANNEL_CLIENT))
+#define MAIN_CHANNEL_CLIENT_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_MAIN_CHANNEL_CLIENT, MainChannelClientClass))
 
 typedef struct MainChannelClient MainChannelClient;
 typedef struct MainChannelClientClass MainChannelClientClass;
diff --git a/server/red-channel-client.c b/server/red-channel-client.c
index 546d58d..1e80199 100644
--- a/server/red-channel-client.c
+++ b/server/red-channel-client.c
@@ -46,7 +46,8 @@ G_DEFINE_TYPE_WITH_CODE(RedChannelClient, red_channel_client, G_TYPE_OBJECT,
                         G_IMPLEMENT_INTERFACE(G_TYPE_INITABLE,
                                               red_channel_client_initable_interface_init))
 
-#define CHANNEL_CLIENT_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), RED_TYPE_CHANNEL_CLIENT, RedChannelClientPrivate))
+#define CHANNEL_CLIENT_PRIVATE(o) \
+    (G_TYPE_INSTANCE_GET_PRIVATE((o), RED_TYPE_CHANNEL_CLIENT, RedChannelClientPrivate))
 
 static gboolean red_channel_client_initable_init(GInitable *initable,
                                                  GCancellable *cancellable,
@@ -202,7 +203,8 @@ red_channel_client_set_property(GObject *object,
                 if (caps) {
                     self->priv->remote_caps.num_common_caps = caps->len;
                     free(self->priv->remote_caps.common_caps);
-                    self->priv->remote_caps.common_caps = spice_memdup(caps->data, caps->len * sizeof(uint32_t));
+                    self->priv->remote_caps.common_caps =
+                        spice_memdup(caps->data, caps->len * sizeof(uint32_t));
                 }
             }
             break;
@@ -212,7 +214,8 @@ red_channel_client_set_property(GObject *object,
                 if (caps) {
                     self->priv->remote_caps.num_caps = caps->len;
                     free(self->priv->remote_caps.caps);
-                    self->priv->remote_caps.caps = spice_memdup(caps->data, caps->len * sizeof(uint32_t));
+                    self->priv->remote_caps.caps =
+                        spice_memdup(caps->data, caps->len * sizeof(uint32_t));
                 }
             }
             break;
@@ -308,7 +311,8 @@ static void red_channel_client_class_init(RedChannelClientClass *klass)
     g_object_class_install_property(object_class,
                                     PROP_MONITOR_LATENCY,
                                     g_param_spec_boolean("monitor-latency", "monitor-latency",
-                                                         "Whether to monitor latency for this client",
+                                                         "Whether to monitor latency "
+                                                         "for this client",
                                                          FALSE,
                                                          G_PARAM_STATIC_STRINGS
                                                          | G_PARAM_READWRITE |
@@ -335,8 +339,8 @@ static void
 red_channel_client_init(RedChannelClient *self)
 {
     self->priv = CHANNEL_CLIENT_PRIVATE(self);
-    self->priv->ack_data.messages_window = ~0;  // blocks send message (maybe use send_data.blocked +
-                                             // block flags)
+    // blocks send message (maybe use send_data.blocked + block flags)
+    self->priv->ack_data.messages_window = ~0;
     self->priv->ack_data.client_generation = ~0;
     self->priv->ack_data.client_window = CLIENT_ACK_WINDOW;
     self->priv->send_data.main.marshaller = spice_marshaller_new();
@@ -914,7 +918,8 @@ RedChannelClient *red_channel_client_create(RedChannel *channel, RedClient *clie
     GArray *common_caps_array = NULL, *caps_array = NULL;
 
     if (common_caps) {
-        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps), num_common_caps);
+        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps),
+                                              num_common_caps);
         g_array_append_vals(common_caps_array, common_caps, num_common_caps);
     }
     if (caps) {
diff --git a/server/red-channel-client.h b/server/red-channel-client.h
index 45dca61..0b180b3 100644
--- a/server/red-channel-client.h
+++ b/server/red-channel-client.h
@@ -38,11 +38,16 @@ G_BEGIN_DECLS
 
 #define RED_TYPE_CHANNEL_CLIENT red_channel_client_get_type()
 
-#define RED_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), RED_TYPE_CHANNEL_CLIENT, RedChannelClient))
-#define RED_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), RED_TYPE_CHANNEL_CLIENT, RedChannelClientClass))
-#define RED_IS_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), RED_TYPE_CHANNEL_CLIENT))
-#define RED_IS_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), RED_TYPE_CHANNEL_CLIENT))
-#define RED_CHANNEL_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), RED_TYPE_CHANNEL_CLIENT, RedChannelClientClass))
+#define RED_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj), RED_TYPE_CHANNEL_CLIENT, RedChannelClient))
+#define RED_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass), RED_TYPE_CHANNEL_CLIENT, RedChannelClientClass))
+#define RED_IS_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj), RED_TYPE_CHANNEL_CLIENT))
+#define RED_IS_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass), RED_TYPE_CHANNEL_CLIENT))
+#define RED_CHANNEL_CLIENT_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS((obj), RED_TYPE_CHANNEL_CLIENT, RedChannelClientClass))
 
 typedef struct RedChannel RedChannel;
 typedef struct RedClient RedClient;
diff --git a/server/smartcard-channel-client.c b/server/smartcard-channel-client.c
index beda2fc..ec99e07 100644
--- a/server/smartcard-channel-client.c
+++ b/server/smartcard-channel-client.c
@@ -22,7 +22,9 @@
 
 G_DEFINE_TYPE(SmartCardChannelClient, smart_card_channel_client, RED_TYPE_CHANNEL_CLIENT)
 
-#define SMARTCARD_CHANNEL_CLIENT_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_SMARTCARD_CHANNEL_CLIENT, SmartCardChannelClientPrivate))
+#define SMARTCARD_CHANNEL_CLIENT_PRIVATE(o) \
+    (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_SMARTCARD_CHANNEL_CLIENT, \
+                                 SmartCardChannelClientPrivate))
 
 struct SmartCardChannelClientPrivate
 {
@@ -108,7 +110,8 @@ SmartCardChannelClient* smartcard_channel_client_create(RedChannel *channel,
     GArray *common_caps_array = NULL, *caps_array = NULL;
 
     if (common_caps) {
-        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps), num_common_caps);
+        common_caps_array = g_array_sized_new(FALSE, FALSE, sizeof (*common_caps),
+                                              num_common_caps);
         g_array_append_vals(common_caps_array, common_caps, num_common_caps);
     }
     if (caps) {
diff --git a/server/smartcard-channel-client.h b/server/smartcard-channel-client.h
index 800b7a0..4fe1c72 100644
--- a/server/smartcard-channel-client.h
+++ b/server/smartcard-channel-client.h
@@ -26,11 +26,16 @@ G_BEGIN_DECLS
 
 #define TYPE_SMARTCARD_CHANNEL_CLIENT smart_card_channel_client_get_type()
 
-#define SMARTCARD_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_SMARTCARD_CHANNEL_CLIENT, SmartCardChannelClient))
-#define SMARTCARD_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_SMARTCARD_CHANNEL_CLIENT, SmartCardChannelClientClass))
-#define IS_SMARTCARD_CHANNEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_SMARTCARD_CHANNEL_CLIENT))
-#define IS_SMARTCARD_CHANNEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_SMARTCARD_CHANNEL_CLIENT))
-#define SMARTCARD_CHANNEL_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_SMARTCARD_CHANNEL_CLIENT, SmartCardChannelClientClass))
+#define SMARTCARD_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_SMARTCARD_CHANNEL_CLIENT, SmartCardChannelClient))
+#define SMARTCARD_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_SMARTCARD_CHANNEL_CLIENT, SmartCardChannelClientClass))
+#define IS_SMARTCARD_CHANNEL_CLIENT(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_SMARTCARD_CHANNEL_CLIENT))
+#define IS_SMARTCARD_CHANNEL_CLIENT_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_SMARTCARD_CHANNEL_CLIENT))
+#define SMARTCARD_CHANNEL_CLIENT_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_SMARTCARD_CHANNEL_CLIENT, SmartCardChannelClientClass))
 
 typedef struct SmartCardChannelClient SmartCardChannelClient;
 typedef struct SmartCardChannelClientClass SmartCardChannelClientClass;
-- 
2.7.4



More information about the Spice-devel mailing list