summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-11-13 14:14:11 -0500
committerDan Winship <danw@gnome.org>2014-11-15 09:31:49 -0500
commita41aff37c887f427de04b60ac2da8ae945bc0ece (patch)
treec104467a91efa1f300df60bddbce621e7a2afe4c
parent0d6d793644e6884beb8d07cc2c83615af132458e (diff)
downloadNetworkManager-a41aff37c887f427de04b60ac2da8ae945bc0ece.tar.gz
libnm: add some missing (transfer) annotations
All the old "const GByteArray" methods got changed to return a GBytes instead, but since they aren't declared "const" any more, we need to explicitly annotate them "(transfer none)". Also, the scanner apparently doesn't recognize that an (out) "const char **" is "(transfer none)", so annotate that in two places too
-rw-r--r--libnm-core/nm-setting-8021x.c14
-rw-r--r--libnm-core/nm-setting-bond.c9
-rw-r--r--libnm-core/nm-setting-olpc-mesh.c5
-rw-r--r--libnm-core/nm-setting-wired.c9
-rw-r--r--libnm-core/nm-setting-wireless.c2
-rw-r--r--libnm/nm-access-point.c3
6 files changed, 25 insertions, 17 deletions
diff --git a/libnm-core/nm-setting-8021x.c b/libnm-core/nm-setting-8021x.c
index 2cad0234a2..144b9b5986 100644
--- a/libnm-core/nm-setting-8021x.c
+++ b/libnm-core/nm-setting-8021x.c
@@ -448,7 +448,7 @@ nm_setting_802_1x_get_ca_cert_scheme (NMSetting8021x *setting)
* reduces security by allowing man-in-the-middle attacks, because the identity
* of the network cannot be confirmed by the client.
*
- * Returns: the CA certificate data
+ * Returns: (transfer none): the CA certificate data
**/
GBytes *
nm_setting_802_1x_get_ca_cert_blob (NMSetting8021x *setting)
@@ -777,7 +777,7 @@ nm_setting_802_1x_get_client_cert_scheme (NMSetting8021x *setting)
* when EAP-TLS is used as either the "phase 1" or "phase 2" 802.1x
* authentication method.
*
- * Returns: the client certificate data
+ * Returns: (transfer none): the client certificate data
**/
GBytes *
nm_setting_802_1x_get_client_cert_blob (NMSetting8021x *setting)
@@ -1043,7 +1043,7 @@ nm_setting_802_1x_get_phase2_ca_cert_scheme (NMSetting8021x *setting)
* reduces security by allowing man-in-the-middle attacks, because the identity
* of the network cannot be confirmed by the client.
*
- * Returns: the "phase 2" CA certificate data
+ * Returns: (transfer none): the "phase 2" CA certificate data
**/
GBytes *
nm_setting_802_1x_get_phase2_ca_cert_blob (NMSetting8021x *setting)
@@ -1360,7 +1360,7 @@ nm_setting_802_1x_get_phase2_client_cert_scheme (NMSetting8021x *setting)
* when EAP-TLS is used as either the "phase 1" or "phase 2" 802.1x
* authentication method.
*
- * Returns: the "phase 2" client certificate data
+ * Returns: (transfer none): the "phase 2" client certificate data
**/
GBytes *
nm_setting_802_1x_get_phase2_client_cert_blob (NMSetting8021x *setting)
@@ -1530,7 +1530,7 @@ nm_setting_802_1x_get_password_flags (NMSetting8021x *setting)
* nm_setting_802_1x_get_password_raw:
* @setting: the #NMSetting8021x
*
- * Returns: the password used by the authentication method as a
+ * Returns: (transfer none): the password used by the authentication method as a
* UTF-8-encoded array of bytes, as specified by the
* #NMSetting8021x:password-raw property
**/
@@ -1619,7 +1619,7 @@ nm_setting_802_1x_get_private_key_scheme (NMSetting8021x *setting)
* unencrypted private key data may be readable by unprivileged users. Private
* keys should always be encrypted with a private key password.
*
- * Returns: the private key data
+ * Returns: (transfer none): the private key data
**/
GBytes *
nm_setting_802_1x_get_private_key_blob (NMSetting8021x *setting)
@@ -1954,7 +1954,7 @@ nm_setting_802_1x_get_phase2_private_key_scheme (NMSetting8021x *setting)
* unencrypted private key data may be readable by unprivileged users. Private
* keys should always be encrypted with a private key password.
*
- * Returns: the "phase 2" private key data
+ * Returns: (transfer none): the "phase 2" private key data
**/
GBytes *
nm_setting_802_1x_get_phase2_private_key_blob (NMSetting8021x *setting)
diff --git a/libnm-core/nm-setting-bond.c b/libnm-core/nm-setting-bond.c
index c5402c1a64..e793ac1c1e 100644
--- a/libnm-core/nm-setting-bond.c
+++ b/libnm-core/nm-setting-bond.c
@@ -136,10 +136,11 @@ nm_setting_bond_get_num_options (NMSettingBond *setting)
* @setting: the #NMSettingBond
* @idx: index of the desired option, from 0 to
* nm_setting_bond_get_num_options() - 1
- * @out_name: (out): on return, the name of the bonding option; this
- * value is owned by the setting and should not be modified
- * @out_value: (out): on return, the value of the name of the bonding
- * option; this value is owned by the setting and should not be modified
+ * @out_name: (out) (transfer none): on return, the name of the bonding option;
+ * this value is owned by the setting and should not be modified
+ * @out_value: (out) (transfer none): on return, the value of the name of the
+ * bonding option; this value is owned by the setting and should not be
+ * modified
*
* Given an index, return the value of the bonding option at that index. Indexes
* are *not* guaranteed to be static across modifications to options done by
diff --git a/libnm-core/nm-setting-olpc-mesh.c b/libnm-core/nm-setting-olpc-mesh.c
index 7be5dcadfd..5b4753a8a6 100644
--- a/libnm-core/nm-setting-olpc-mesh.c
+++ b/libnm-core/nm-setting-olpc-mesh.c
@@ -71,6 +71,11 @@ nm_setting_olpc_mesh_init (NMSettingOlpcMesh *setting)
{
}
+/**
+ * nm_setting_olpc_mesh_get_ssid:
+ *
+ * Returns: (transfer none):
+ */
GBytes *
nm_setting_olpc_mesh_get_ssid (NMSettingOlpcMesh *setting)
{
diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c
index 1a75ef5c05..37e2dfe5e4 100644
--- a/libnm-core/nm-setting-wired.c
+++ b/libnm-core/nm-setting-wired.c
@@ -412,10 +412,11 @@ nm_setting_wired_get_num_s390_options (NMSettingWired *setting)
* @setting: the #NMSettingWired
* @idx: index of the desired option, from 0 to
* nm_setting_wired_get_num_s390_options() - 1
- * @out_key: (out): on return, the key name of the s390 specific option; this
- * value is owned by the setting and should not be modified
- * @out_value: (out): on return, the value of the key of the s390 specific
- * option; this value is owned by the setting and should not be modified
+ * @out_key: (out) (transfer none): on return, the key name of the s390 specific
+ * option; this value is owned by the setting and should not be modified
+ * @out_value: (out) (transfer none): on return, the value of the key of the
+ * s390 specific option; this value is owned by the setting and should not be
+ * modified
*
* Given an index, return the value of the s390 option at that index. indexes
* are *not* guaranteed to be static across modifications to options done by
diff --git a/libnm-core/nm-setting-wireless.c b/libnm-core/nm-setting-wireless.c
index b481e54046..d501bf38a6 100644
--- a/libnm-core/nm-setting-wireless.c
+++ b/libnm-core/nm-setting-wireless.c
@@ -295,7 +295,7 @@ nm_setting_wireless_new (void)
* nm_setting_wireless_get_ssid:
* @setting: the #NMSettingWireless
*
- * Returns: the #NMSettingWireless:ssid property of the setting
+ * Returns: (transfer none): the #NMSettingWireless:ssid property of the setting
**/
GBytes *
nm_setting_wireless_get_ssid (NMSettingWireless *setting)
diff --git a/libnm/nm-access-point.c b/libnm/nm-access-point.c
index 29c7001258..e20cd9971e 100644
--- a/libnm/nm-access-point.c
+++ b/libnm/nm-access-point.c
@@ -122,7 +122,8 @@ nm_access_point_get_rsn_flags (NMAccessPoint *ap)
*
* Gets the SSID of the access point.
*
- * Returns: the #GBytes containing the SSID, or %NULL if the SSID is unknown.
+ * Returns: (transfer none): the #GBytes containing the SSID, or %NULL if the
+ * SSID is unknown.
**/
GBytes *
nm_access_point_get_ssid (NMAccessPoint *ap)