[Spice-commits] 3 commits - doc/reference src/channel-display.c src/channel-display-priv.h src/channel-main.c src/spice-file-transfer-task.h

Pavel Grunt pgrunt at kemper.freedesktop.org
Wed May 25 15:02:37 UTC 2016


 doc/reference/spice-gtk-sections.txt |    4 ++--
 src/channel-display-priv.h           |    2 +-
 src/channel-display.c                |    4 ++--
 src/channel-main.c                   |   24 ++++++++++++++++++++++++
 src/spice-file-transfer-task.h       |   29 ++++++-----------------------
 5 files changed, 35 insertions(+), 28 deletions(-)

New commits:
commit 0736283e97e7d5fee72d1f2d1109aee24236378f
Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Tue May 24 11:44:23 2016 +0200

    streaming: Constify the video stream's dest and clip parameters
    
    They are only supposed to be changed when receiving the relevant server
    message.
    
    Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/src/channel-display-priv.h b/src/channel-display-priv.h
index 94a90e6..3155015 100644
--- a/src/channel-display-priv.h
+++ b/src/channel-display-priv.h
@@ -103,7 +103,7 @@ struct display_stream {
 
     /* from messages */
     display_surface             *surface;
-    SpiceClip                   *clip;
+    const SpiceClip             *clip;
     QRegion                     region;
     int                         have_region;
 
diff --git a/src/channel-display.c b/src/channel-display.c
index 3ee515b..a1ed493 100644
--- a/src/channel-display.c
+++ b/src/channel-display.c
@@ -1131,7 +1131,7 @@ static void display_handle_stream_create(SpiceChannel *channel, SpiceMsgIn *in)
     }
 }
 
-static SpiceRect *stream_get_dest(display_stream *st, SpiceMsgIn *frame_msg)
+static const SpiceRect *stream_get_dest(display_stream *st, SpiceMsgIn *frame_msg)
 {
     if (frame_msg == NULL ||
         spice_msg_in_type(frame_msg) != SPICE_MSG_DISPLAY_STREAM_DATA_SIZED) {
@@ -1213,7 +1213,7 @@ void stream_display_frame(display_stream *st, SpiceMsgIn *frame_msg,
                           uint8_t* data)
 {
     int width, height;
-    SpiceRect *dest;
+    const SpiceRect *dest;
     int stride;
 
     stream_get_dimensions(st, frame_msg, &width, &height);
commit 2210a5c22027492677a6009ab82d99a400e10fb1
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Wed May 25 07:30:01 2016 +0200

    file-transfer-task: Hide internals of SpiceFileTransferTask
    
    Acked-by: Fabiano FidĂȘncio <fidencio at redhat.com>

diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt
index b67dd35..9a86553 100644
--- a/doc/reference/spice-gtk-sections.txt
+++ b/doc/reference/spice-gtk-sections.txt
@@ -494,8 +494,6 @@ SpiceWebdavChannelPrivate
 <SECTION>
 <FILE>file-transfer-task</FILE>
 <TITLE>SpiceFileTransferTask</TITLE>
-SpiceFileTransferTask
-SpiceFileTransferTaskClass
 <SUBSECTION>
 spice_file_transfer_task_get_progress
 spice_file_transfer_task_get_filename
@@ -509,5 +507,7 @@ SPICE_FILE_TRANSFER_TASK_CLASS
 SPICE_IS_FILE_TRANSFER_TASK_CLASS
 SPICE_FILE_TRANSFER_TASK_GET_CLASS
 <SUBSECTION Private>
+SpiceFileTransferTask
+SpiceFileTransferTaskClass
 SpiceFileTransferTaskPrivate
 </SECTION>
diff --git a/src/channel-main.c b/src/channel-main.c
index dec5d73..b91daa5 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -71,6 +71,30 @@ typedef struct spice_migrate spice_migrate;
  *
  * Since: 0.31
  */
+
+/**
+ * SpiceFileTransferTask:
+ *
+ * The #SpiceFileTransferTask struct is opaque and should not be accessed directly.
+ */
+struct _SpiceFileTransferTask
+{
+    GObject parent;
+
+    SpiceFileTransferTaskPrivate *priv;
+};
+
+/**
+ * SpiceFileTransferTaskClass:
+ * @parent_class: Parent class.
+ *
+ * Class structure for #SpiceFileTransferTask.
+ */
+struct _SpiceFileTransferTaskClass
+{
+    GObjectClass parent_class;
+};
+
 G_DEFINE_TYPE(SpiceFileTransferTask, spice_file_transfer_task, G_TYPE_OBJECT)
 
 #define FILE_TRANSFER_TASK_PRIVATE(o) \
diff --git a/src/spice-file-transfer-task.h b/src/spice-file-transfer-task.h
index fba132e..389668e 100644
--- a/src/spice-file-transfer-task.h
+++ b/src/spice-file-transfer-task.h
@@ -40,29 +40,6 @@ typedef struct _SpiceFileTransferTask SpiceFileTransferTask;
 typedef struct _SpiceFileTransferTaskClass SpiceFileTransferTaskClass;
 typedef struct _SpiceFileTransferTaskPrivate SpiceFileTransferTaskPrivate;
 
-/**
- * SpiceFileTransferTask:
- *
- * The #SpiceFileTransferTask struct is opaque and should not be accessed directly.
- */
-struct _SpiceFileTransferTask
-{
-    GObject parent;
-
-    SpiceFileTransferTaskPrivate *priv;
-};
-
-/**
- * SpiceFileTransferTaskClass:
- * @parent_class: Parent class.
- *
- * Class structure for #SpiceFileTransferTask.
- */
-struct _SpiceFileTransferTaskClass
-{
-    GObjectClass parent_class;
-};
-
 GType spice_file_transfer_task_get_type(void) G_GNUC_CONST;
 
 char* spice_file_transfer_task_get_filename(SpiceFileTransferTask *self);
commit 6b529a4042fc70997290ef4df059533b044e375c
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Wed May 25 07:30:00 2016 +0200

    file-trasfer-task: Protect header include
    
    As stated in the commit d2f33178c40ac51b1c8b1bf796a328631d9869c7 Glib
    applications should only include "spice-client.h".
    
    Acked-by: Fabiano FidĂȘncio <fidencio at redhat.com>

diff --git a/src/spice-file-transfer-task.h b/src/spice-file-transfer-task.h
index 18dc509..fba132e 100644
--- a/src/spice-file-transfer-task.h
+++ b/src/spice-file-transfer-task.h
@@ -18,6 +18,12 @@
 #ifndef __SPICE_FILE_TRANSFER_TASK_H__
 #define __SPICE_FILE_TRANSFER_TASK_H__
 
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#warning "Only <spice-client.h> can be included directly"
+#endif
+
+#include "spice-client.h"
+
 #include <glib-object.h>
 
 G_BEGIN_DECLS


More information about the Spice-commits mailing list