[Spice-devel] [PATCH 1/2] doc: update to include USB redirection

Hans de Goede hdegoede at redhat.com
Wed Aug 31 05:42:41 PDT 2011


Looks good, ack to both.

On 08/31/2011 02:28 PM, Marc-André Lureau wrote:
> ---
>   doc/reference/spice-gtk-docs.xml     |    2 +
>   doc/reference/spice-gtk-sections.txt |   45 ++++++++++++++++++++++++++++++++++
>   doc/reference/spice-gtk.types        |    5 ++++
>   gtk/usb-device-manager.c             |   19 +++++++++++++-
>   4 files changed, 69 insertions(+), 2 deletions(-)
>
> diff --git a/doc/reference/spice-gtk-docs.xml b/doc/reference/spice-gtk-docs.xml
> index 1308041..c7f205b 100644
> --- a/doc/reference/spice-gtk-docs.xml
> +++ b/doc/reference/spice-gtk-docs.xml
> @@ -35,6 +35,7 @@
>         <xi:include href="xml/channel-playback.xml"/>
>         <xi:include href="xml/channel-record.xml"/>
>         <xi:include href="xml/channel-smartcard.xml"/>
> +<xi:include href="xml/channel-usbredir.xml"/>
>       </chapter>
>
>       <chapter>
> @@ -46,6 +47,7 @@
>         <title>Application Support, from spice-client-glib</title>
>         <xi:include href="xml/spice-audio.xml"/>
>         <xi:include href="xml/smartcard-manager.xml"/>
> +<xi:include href="xml/usb-device-manager.xml"/>
>         <xi:include href="xml/spice-util.xml"/>
>       </chapter>
>
> diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt
> index e463991..b4fd817 100644
> --- a/doc/reference/spice-gtk-sections.txt
> +++ b/doc/reference/spice-gtk-sections.txt
> @@ -235,6 +235,51 @@ spice_smartcard_manager
>   </SECTION>
>
>   <SECTION>
> +<FILE>channel-usbredir</FILE>
> +<TITLE>SpiceUsbredirChannel</TITLE>
> +SpiceUsbredirChannel
> +SpiceUsbredirChannelClass
> +<SUBSECTION Standard>
> +SPICE_USBREDIR_CHANNEL
> +SPICE_IS_USBREDIR_CHANNEL
> +SPICE_TYPE_USBREDIR_CHANNEL
> +spice_usbredir_channel_get_type
> +SPICE_USBREDIR_CHANNEL_CLASS
> +SPICE_IS_USBREDIR_CHANNEL_CLASS
> +SPICE_USBREDIR_CHANNEL_GET_CLASS
> +<SUBSECTION Private>
> +SpiceUsbredirChannelPrivate
> +</SECTION>
> +
> +<SECTION>
> +<FILE>usb-device-manager</FILE>
> +<TITLE>SpiceUsbDeviceManager</TITLE>
> +SPICE_TYPE_USB_DEVICE
> +SpiceUsbDeviceManager
> +SpiceUsbDeviceManagerClass
> +<SUBSECTION>
> +spice_usb_device_manager_get
> +spice_usb_device_manager_register_channel
> +spice_usb_device_manager_unregister_channel
> +spice_usb_device_manager_get_devices
> +spice_usb_device_manager_is_device_connected
> +spice_usb_device_manager_connect_device
> +spice_usb_device_manager_disconnect_device
> +SpiceUsbDevice
> +<SUBSECTION Standard>
> +SPICE_USB_DEVICE_MANAGER
> +SPICE_IS_USB_DEVICE_MANAGER
> +SPICE_TYPE_USB_DEVICE_MANAGER
> +spice_usb_device_manager_get_type
> +spice_usb_device_get_type
> +SPICE_USB_DEVICE_MANAGER_CLASS
> +SPICE_IS_USB_DEVICE_MANAGER_CLASS
> +SPICE_USB_DEVICE_MANAGER_GET_CLASS
> +<SUBSECTION Private>
> +SpiceUsbDeviceManagerPrivate
> +</SECTION>
> +
> +<SECTION>
>   <FILE>spice-widget</FILE>
>   <TITLE>SpiceDisplay</TITLE>
>   SpiceDisplay
> diff --git a/doc/reference/spice-gtk.types b/doc/reference/spice-gtk.types
> index 6639730..d8e0f28 100644
> --- a/doc/reference/spice-gtk.types
> +++ b/doc/reference/spice-gtk.types
> @@ -12,9 +12,11 @@
>   #include "channel-playback.h"
>   #include "channel-record.h"
>   #include "channel-smartcard.h"
> +#include "channel-usbredir.h"
>   #include "spice-widget.h"
>   #include "spice-grabsequence.h"
>   #include "smartcard-manager.h"
> +#include "usb-device-manager.h"
>
>   spice_audio_get_type
>   spice_channel_event_get_type
> @@ -33,3 +35,6 @@ spice_session_verify_get_type
>   spice_smartcard_channel_get_type
>   spice_smartcard_manager_get_type
>   spice_session_verify_get_type
> +spice_usbredir_channel_get_type
> +spice_usb_device_get_type
> +spice_usb_device_manager_get_type
> diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
> index 0e2a9ed..da0368f 100644
> --- a/gtk/usb-device-manager.c
> +++ b/gtk/usb-device-manager.c
> @@ -33,6 +33,21 @@
>   #include "spice-client.h"
>   #include "spice-marshal.h"
>
> +/**
> + * SECTION:usb-device-manager
> + * @short_description: USB device management
> + * @title: Spice USB Manager
> + * @section_id:
> + * @see_also:
> + * @stability: Stable
> + * @include: usb-device-manager.h
> + *
> + * #SpiceUsbDeviceManager monitors USB redirection channels and USB
> + * devices plugging/unplugging. If #SpiceUsbDeviceManager:auto-connect
> + * is set to %TRUE, it will automatically connect newly plugged USB
> + * devices to available channels.
> + */
> +
>   #define SPICE_USB_DEVICE_MANAGER_GET_PRIVATE(obj)                                  \
>       (G_TYPE_INSTANCE_GET_PRIVATE ((obj), SPICE_TYPE_USB_DEVICE_MANAGER, SpiceUsbDeviceManagerPrivate))
>
> @@ -391,7 +406,7 @@ static SpiceUsbredirChannel *spice_usb_device_manager_get_channel_for_dev(
>    * to it. A new #SpiceUsbDeviceManager instance will be created the first
>    * time this function is called
>    *
> - * Returns: a weak reference to the #SpiceUsbDeviceManager singleton
> + * Returns: (transfer none): a weak reference to the #SpiceUsbDeviceManager singleton
>    */
>   SpiceUsbDeviceManager *spice_usb_device_manager_get(GMainContext *main_context,
>                                                       GError **err)
> @@ -461,7 +476,7 @@ void spice_usb_device_manager_unregister_channel(SpiceUsbDeviceManager *self,
>    * spice_usb_device_manager_get_devices:
>    * @manager: the #SpiceUsbDeviceManager manager
>    *
> - * Returns: a %GPtrArray array of %SpiceUsbDevice
> + * Returns: (element-type SpiceUsbDevice) (transfer full): a %GPtrArray array of %SpiceUsbDevice
>    */
>   GPtrArray* spice_usb_device_manager_get_devices(SpiceUsbDeviceManager *self)
>   {


More information about the Spice-devel mailing list