summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2013-06-28 13:35:41 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2013-07-08 18:16:04 +0200
commit0c8eccaff742fa1c7e55fa0ea4957bd23be5d3a5 (patch)
tree6654ce767e4bd898f8094bc45dc5fd5d47d4faf4
parente19957c3d5aa4cf87036a5c6f4fa9eac488ba225 (diff)
gi: Add (allow none) to optional const char * params
Without that annotation, it will not be possible to pass NULL to these methods when using a gi-based binding.
-rw-r--r--gtk/spice-audio.c6
-rw-r--r--gtk/usb-device-manager.c8
-rw-r--r--gtk/usb-device-widget.c3
3 files changed, 11 insertions, 6 deletions
diff --git a/gtk/spice-audio.c b/gtk/spice-audio.c
index 6cf8f01..dbd3a8b 100644
--- a/gtk/spice-audio.c
+++ b/gtk/spice-audio.c
@@ -195,8 +195,10 @@ static void session_enable_audio(GObject *gobject, GParamSpec *pspec,
/**
* spice_audio_new:
* @session: the #SpiceSession to connect to
- * @context: a #GMainContext to attach to (or %NULL for default).
- * @name: a name for the audio channels (or %NULL for application name).
+ * @context: (allow-none): a #GMainContext to attach to (or %NULL for
+ * default).
+ * @name: (allow-none): a name for the audio channels (or %NULL for
+ * application name).
*
* Once instantiated, #SpiceAudio will handle the playback and record
* channels to stream to your local audio system.
diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
index bdcfd13..8a20e9e 100644
--- a/gtk/usb-device-manager.c
+++ b/gtk/usb-device-manager.c
@@ -1305,8 +1305,9 @@ SpiceUsbDeviceManager *spice_usb_device_manager_get(SpiceSession *session,
/**
* spice_usb_device_manager_get_devices_with_filter:
* @manager: the #SpiceUsbDeviceManager manager
- * @filter: filter string for selecting which devices to return, see
- * #SpiceUsbDeviceManager:auto-connect-filter for the filter string format
+ * @filter: (allow-none): filter string for selecting which devices to return,
+ * see #SpiceUsbDeviceManager:auto-connect-filter for the f ilter
+ * string format
*
* Returns: (element-type SpiceUsbDevice) (transfer full): a
* %GPtrArray array of %SpiceUsbDevice
@@ -1658,7 +1659,8 @@ spice_usb_device_manager_can_redirect_device(SpiceUsbDeviceManager *self,
/**
* spice_usb_device_get_description:
* @device: #SpiceUsbDevice to get the description of
- * @format: an optionnal printf() format string with positional parameters
+ * @format: (allow-none): an optional printf() format string with
+ * positional parameters
*
* Get a string describing the device which is suitable as a description of
* the device for the end user. The returned string should be freed with
diff --git a/gtk/usb-device-widget.c b/gtk/usb-device-widget.c
index 8621a5e..69c74b3 100644
--- a/gtk/usb-device-widget.c
+++ b/gtk/usb-device-widget.c
@@ -328,7 +328,8 @@ static void spice_usb_device_widget_init(SpiceUsbDeviceWidget *self)
/**
* spice_usb_device_widget_new:
* @session: #SpiceSession for which to widget will control USB redirection
- * @device_format_string: String passed to spice_usb_device_get_description()
+ * @device_format_string: (allow-none): String passed to
+ * spice_usb_device_get_description()
*
* Returns: a new #SpiceUsbDeviceWidget instance
*/