Re: [spice-gtk v1] Remove deprecated functions on clipboard sharing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

----- Original Message -----
> From: Victor Toso <me@xxxxxxxxxxxxxx>
> 
> Those functions are deprecated since 0.6 (2011) by commit:
> 
>  commit 7198a37b4dcf66411df176a7c7a340262745a921
>  Author: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
>  Date:   Fri Feb 18 19:42:04 2011 +0100
> 
>      gtk: add multiple selection clipboard sharing
> 
> Functions removed:
> * spice_main_clipboard_grab()
> * spice_main_clipboard_notify()
> * spice_main_clipboard_release()
> * spice_main_clipboard_request()
> 
> Signals removed:
> * SpiceMainChannel::main-clipboard
> * SpiceMainChannel::main-clipboard-grab
> * SpiceMainChannel::main-clipboard-request
> * SpiceMainChannel::main-clipboard-release
> 
> Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>

This will be API/ABI break. I think there is no urge to break it at this point, so it's fine to keep them for now. It is better to defer it until that happens for good reasons.

nack
 
> ---
>  src/channel-main.c      | 163
>  ------------------------------------------------
>  src/channel-main.h      |  11 ----
>  src/map-file            |   4 --
>  src/spice-glib-sym-file |   4 --
>  4 files changed, 182 deletions(-)
> 
> diff --git a/src/channel-main.c b/src/channel-main.c
> index dd78cad..a459da9 100644
> --- a/src/channel-main.c
> +++ b/src/channel-main.c
> @@ -157,10 +157,6 @@ enum {
>  enum {
>      SPICE_MAIN_MOUSE_UPDATE,
>      SPICE_MAIN_AGENT_UPDATE,
> -    SPICE_MAIN_CLIPBOARD,
> -    SPICE_MAIN_CLIPBOARD_GRAB,
> -    SPICE_MAIN_CLIPBOARD_REQUEST,
> -    SPICE_MAIN_CLIPBOARD_RELEASE,
>      SPICE_MAIN_CLIPBOARD_SELECTION,
>      SPICE_MAIN_CLIPBOARD_SELECTION_GRAB,
>      SPICE_MAIN_CLIPBOARD_SELECTION_REQUEST,
> @@ -632,27 +628,6 @@ static void
> spice_main_channel_class_init(SpiceMainChannelClass *klass)
>                       g_cclosure_marshal_VOID__VOID,
>                       G_TYPE_NONE,
>                       0);
> -    /**
> -     * SpiceMainChannel::main-clipboard:
> -     * @main: the #SpiceMainChannel that emitted the signal
> -     * @type: the VD_AGENT_CLIPBOARD data type
> -     * @data: clipboard data
> -     * @size: size of @data in bytes
> -     *
> -     * Provides guest clipboard data requested by
> spice_main_clipboard_request().
> -     *
> -     * Deprecated: 0.6: use SpiceMainChannel::main-clipboard-selection
> instead.
> -     **/
> -    signals[SPICE_MAIN_CLIPBOARD] =
> -        g_signal_new("main-clipboard",
> -                     G_OBJECT_CLASS_TYPE(gobject_class),
> -                     G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
> -                     0,
> -                     NULL, NULL,
> -                     g_cclosure_user_marshal_VOID__UINT_POINTER_UINT,
> -                     G_TYPE_NONE,
> -                     3,
> -                     G_TYPE_UINT, G_TYPE_POINTER, G_TYPE_UINT);
>  
>      /**
>       * SpiceMainChannel::main-clipboard-selection:
> @@ -677,27 +652,6 @@ static void
> spice_main_channel_class_init(SpiceMainChannelClass *klass)
>                       4,
>                       G_TYPE_UINT, G_TYPE_UINT, G_TYPE_POINTER, G_TYPE_UINT);
>  
> -    /**
> -     * SpiceMainChannel::main-clipboard-grab:
> -     * @main: the #SpiceMainChannel that emitted the signal
> -     * @types: the VD_AGENT_CLIPBOARD data types
> -     * @ntypes: the number of @types
> -     *
> -     * Inform when clipboard data is available from the guest, and for
> -     * which @types.
> -     *
> -     * Deprecated: 0.6: use SpiceMainChannel::main-clipboard-selection-grab
> instead.
> -     **/
> -    signals[SPICE_MAIN_CLIPBOARD_GRAB] =
> -        g_signal_new("main-clipboard-grab",
> -                     G_OBJECT_CLASS_TYPE(gobject_class),
> -                     G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
> -                     0,
> -                     NULL, NULL,
> -                     g_cclosure_user_marshal_BOOLEAN__POINTER_UINT,
> -                     G_TYPE_BOOLEAN,
> -                     2,
> -                     G_TYPE_POINTER, G_TYPE_UINT);
>  
>      /**
>       * SpiceMainChannel::main-clipboard-selection-grab:
> @@ -723,28 +677,6 @@ static void
> spice_main_channel_class_init(SpiceMainChannelClass *klass)
>                       G_TYPE_UINT, G_TYPE_POINTER, G_TYPE_UINT);
>  
>      /**
> -     * SpiceMainChannel::main-clipboard-request:
> -     * @main: the #SpiceMainChannel that emitted the signal
> -     * @types: the VD_AGENT_CLIPBOARD request type
> -     *
> -     * Request clipboard data from the client.
> -     *
> -     * Return value: %TRUE if the request is successful
> -     *
> -     * Deprecated: 0.6: use
> SpiceMainChannel::main-clipboard-selection-request instead.
> -     **/
> -    signals[SPICE_MAIN_CLIPBOARD_REQUEST] =
> -        g_signal_new("main-clipboard-request",
> -                     G_OBJECT_CLASS_TYPE(gobject_class),
> -                     G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
> -                     0,
> -                     NULL, NULL,
> -                     g_cclosure_user_marshal_BOOLEAN__UINT,
> -                     G_TYPE_BOOLEAN,
> -                     1,
> -                     G_TYPE_UINT);
> -
> -    /**
>       * SpiceMainChannel::main-clipboard-selection-request:
>       * @main: the #SpiceMainChannel that emitted the signal
>       * @selection: a VD_AGENT_CLIPBOARD_SELECTION clipboard
> @@ -768,25 +700,6 @@ static void
> spice_main_channel_class_init(SpiceMainChannelClass *klass)
>                       G_TYPE_UINT, G_TYPE_UINT);
>  
>      /**
> -     * SpiceMainChannel::main-clipboard-release:
> -     * @main: the #SpiceMainChannel that emitted the signal
> -     *
> -     * Inform when the clipboard is released from the guest, when no
> -     * clipboard data is available from the guest.
> -     *
> -     * Deprecated: 0.6: use
> SpiceMainChannel::main-clipboard-selection-release instead.
> -     **/
> -    signals[SPICE_MAIN_CLIPBOARD_RELEASE] =
> -        g_signal_new("main-clipboard-release",
> -                     G_OBJECT_CLASS_TYPE(gobject_class),
> -                     G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
> -                     0,
> -                     NULL, NULL,
> -                     g_cclosure_marshal_VOID__VOID,
> -                     G_TYPE_NONE,
> -                     0);
> -
> -    /**
>       * SpiceMainChannel::main-clipboard-selection-release:
>       * @main: the #SpiceMainChannel that emitted the signal
>       * @selection: a VD_AGENT_CLIPBOARD_SELECTION clipboard
> @@ -2005,10 +1918,6 @@ static void main_agent_handle_msg(SpiceChannel
> *channel,
>          VDAgentClipboard *cb = payload;
>          g_coroutine_signal_emit(self,
>          signals[SPICE_MAIN_CLIPBOARD_SELECTION], 0, selection,
>                                  cb->type, cb->data, msg->size -
>                                  sizeof(VDAgentClipboard));
> -
> -       if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD)
> -           g_coroutine_signal_emit(self, signals[SPICE_MAIN_CLIPBOARD], 0,
> -                              cb->type, cb->data, msg->size -
> sizeof(VDAgentClipboard));
>          break;
>      }
>      case VD_AGENT_CLIPBOARD_GRAB:
> @@ -2016,9 +1925,6 @@ static void main_agent_handle_msg(SpiceChannel
> *channel,
>          gboolean ret;
>          g_coroutine_signal_emit(self,
>          signals[SPICE_MAIN_CLIPBOARD_SELECTION_GRAB], 0, selection,
>                            (guint8*)payload, msg->size / sizeof(uint32_t),
>                            &ret);
> -        if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD)
> -            g_coroutine_signal_emit(self,
> signals[SPICE_MAIN_CLIPBOARD_GRAB], 0,
> -                              payload, msg->size / sizeof(uint32_t), &ret);
>          break;
>      }
>      case VD_AGENT_CLIPBOARD_REQUEST:
> @@ -2027,18 +1933,11 @@ static void main_agent_handle_msg(SpiceChannel
> *channel,
>          VDAgentClipboardRequest *req = payload;
>          g_coroutine_signal_emit(self,
>          signals[SPICE_MAIN_CLIPBOARD_SELECTION_REQUEST], 0, selection,
>                            req->type, &ret);
> -
> -        if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD)
> -            g_coroutine_signal_emit(self,
> signals[SPICE_MAIN_CLIPBOARD_REQUEST], 0,
> -                              req->type, &ret);
>          break;
>      }
>      case VD_AGENT_CLIPBOARD_RELEASE:
>      {
>          g_coroutine_signal_emit(self,
>          signals[SPICE_MAIN_CLIPBOARD_SELECTION_RELEASE], 0, selection);
> -
> -        if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD)
> -            g_coroutine_signal_emit(self,
> signals[SPICE_MAIN_CLIPBOARD_RELEASE], 0);
>          break;
>      }
>      case VD_AGENT_REPLY:
> @@ -2642,21 +2541,6 @@ void spice_main_set_display(SpiceMainChannel *channel,
> int id,
>  }
>  
>  /**
> - * spice_main_clipboard_grab:
> - * @channel: a #SpiceMainChannel
> - * @types: an array of #VD_AGENT_CLIPBOARD types available in the clipboard
> - * @ntypes: the number of @types
> - *
> - * Grab the guest clipboard, with #VD_AGENT_CLIPBOARD @types.
> - *
> - * Deprecated: 0.6: use spice_main_clipboard_selection_grab() instead.
> - **/
> -void spice_main_clipboard_grab(SpiceMainChannel *channel, guint32 *types,
> int ntypes)
> -{
> -    spice_main_clipboard_selection_grab(channel,
> VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD, types, ntypes);
> -}
> -
> -/**
>   * spice_main_clipboard_selection_grab:
>   * @channel: a #SpiceMainChannel
>   * @selection: one of the clipboard #VD_AGENT_CLIPBOARD_SELECTION_*
> @@ -2678,20 +2562,6 @@ void
> spice_main_clipboard_selection_grab(SpiceMainChannel *channel, guint select
>  }
>  
>  /**
> - * spice_main_clipboard_release:
> - * @channel: a #SpiceMainChannel
> - *
> - * Release the clipboard (for example, when the client loses the
> - * clipboard grab): Inform the guest no clipboard data is available.
> - *
> - * Deprecated: 0.6: use spice_main_clipboard_selection_release() instead.
> - **/
> -void spice_main_clipboard_release(SpiceMainChannel *channel)
> -{
> -    spice_main_clipboard_selection_release(channel,
> VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD);
> -}
> -
> -/**
>   * spice_main_clipboard_selection_release:
>   * @channel: a #SpiceMainChannel
>   * @selection: one of the clipboard #VD_AGENT_CLIPBOARD_SELECTION_*
> @@ -2716,24 +2586,6 @@ void
> spice_main_clipboard_selection_release(SpiceMainChannel *channel, guint sel
>  }
>  
>  /**
> - * spice_main_clipboard_notify:
> - * @channel: a #SpiceMainChannel
> - * @type: a #VD_AGENT_CLIPBOARD type
> - * @data: clipboard data
> - * @size: data length in bytes
> - *
> - * Send the clipboard data to the guest.
> - *
> - * Deprecated: 0.6: use spice_main_clipboard_selection_notify() instead.
> - **/
> -void spice_main_clipboard_notify(SpiceMainChannel *channel,
> -                                 guint32 type, const guchar *data, size_t
> size)
> -{
> -    spice_main_clipboard_selection_notify(channel,
> VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD,
> -                                          type, data, size);
> -}
> -
> -/**
>   * spice_main_clipboard_selection_notify:
>   * @channel: a #SpiceMainChannel
>   * @selection: one of the clipboard #VD_AGENT_CLIPBOARD_SELECTION_*
> @@ -2756,21 +2608,6 @@ void
> spice_main_clipboard_selection_notify(SpiceMainChannel *channel, guint sele
>  }
>  
>  /**
> - * spice_main_clipboard_request:
> - * @channel: a #SpiceMainChannel
> - * @type: a #VD_AGENT_CLIPBOARD type
> - *
> - * Request clipboard data of @type from the guest. The reply is sent
> - * through the #SpiceMainChannel::main-clipboard signal.
> - *
> - * Deprecated: 0.6: use spice_main_clipboard_selection_request() instead.
> - **/
> -void spice_main_clipboard_request(SpiceMainChannel *channel, guint32 type)
> -{
> -    spice_main_clipboard_selection_request(channel,
> VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD, type);
> -}
> -
> -/**
>   * spice_main_clipboard_selection_request:
>   * @channel: a #SpiceMainChannel
>   * @selection: one of the clipboard #VD_AGENT_CLIPBOARD_SELECTION_*
> diff --git a/src/channel-main.h b/src/channel-main.h
> index 2bb6d10..78afdb2 100644
> --- a/src/channel-main.h
> +++ b/src/channel-main.h
> @@ -100,17 +100,6 @@ gboolean spice_main_file_copy_finish(SpiceMainChannel
> *channel,
>  
>  void spice_main_request_mouse_mode(SpiceMainChannel *channel, int mode);
>  
> -#ifndef SPICE_DISABLE_DEPRECATED
> -G_DEPRECATED_FOR(spice_main_clipboard_selection_grab)
> -void spice_main_clipboard_grab(SpiceMainChannel *channel, guint32 *types,
> int ntypes);
> -G_DEPRECATED_FOR(spice_main_clipboard_selection_release)
> -void spice_main_clipboard_release(SpiceMainChannel *channel);
> -G_DEPRECATED_FOR(spice_main_clipboard_selection_notify)
> -void spice_main_clipboard_notify(SpiceMainChannel *channel, guint32 type,
> const guchar *data, size_t size);
> -G_DEPRECATED_FOR(spice_main_clipboard_selection_request)
> -void spice_main_clipboard_request(SpiceMainChannel *channel, guint32 type);
> -#endif
> -
>  G_END_DECLS
>  
>  #endif /* __SPICE_CLIENT_MAIN_CHANNEL_H__ */
> diff --git a/src/map-file b/src/map-file
> index 668ff41..b41c9e5 100644
> --- a/src/map-file
> +++ b/src/map-file
> @@ -68,10 +68,6 @@ spice_inputs_position;
>  spice_inputs_set_key_locks;
>  spice_main_agent_test_capability;
>  spice_main_channel_get_type;
> -spice_main_clipboard_grab;
> -spice_main_clipboard_notify;
> -spice_main_clipboard_release;
> -spice_main_clipboard_request;
>  spice_main_clipboard_selection_grab;
>  spice_main_clipboard_selection_notify;
>  spice_main_clipboard_selection_release;
> diff --git a/src/spice-glib-sym-file b/src/spice-glib-sym-file
> index e061744..079be2f 100644
> --- a/src/spice-glib-sym-file
> +++ b/src/spice-glib-sym-file
> @@ -47,10 +47,6 @@ spice_inputs_position
>  spice_inputs_set_key_locks
>  spice_main_agent_test_capability
>  spice_main_channel_get_type
> -spice_main_clipboard_grab
> -spice_main_clipboard_notify
> -spice_main_clipboard_release
> -spice_main_clipboard_request
>  spice_main_clipboard_selection_grab
>  spice_main_clipboard_selection_notify
>  spice_main_clipboard_selection_release
> --
> 2.13.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]