all/trivial: unify construct-only property comments
Unify marking GObject properties that are G_PARAM_CONSTRUCT_ONLY with a comment /* construct-only */
This commit is contained in:
@@ -519,7 +519,7 @@ set_property (GObject *object,
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_DEVICE_TYPE:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->device_type = g_value_get_uint (value);
|
||||
break;
|
||||
case PROP_MANAGED:
|
||||
|
@@ -369,11 +369,11 @@ set_property (GObject *object, guint prop_id,
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_DBUS_CONNECTION:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->connection = g_value_dup_boxed (value);
|
||||
break;
|
||||
case PROP_DBUS_PATH:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->path = g_value_dup_string (value);
|
||||
break;
|
||||
default:
|
||||
|
@@ -796,7 +796,7 @@ set_property (GObject *object, guint prop_id,
|
||||
switch (prop_id) {
|
||||
case PROP_BUS:
|
||||
case PROP_DBUS_CONNECTION:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
/* priv->bus is set from either of two properties so that it (a) remains
|
||||
* backwards compatible with the previous "bus" property, and that (b)
|
||||
* it can be created just like an NMObject using the "dbus-connection",
|
||||
|
@@ -1429,7 +1429,7 @@ set_property (GObject *object, guint prop_id,
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_BUS:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->bus = g_value_dup_boxed (value);
|
||||
if (!priv->bus)
|
||||
priv->bus = _nm_dbus_new_connection (NULL);
|
||||
|
@@ -799,7 +799,7 @@ set_property (GObject *object, guint prop_id,
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_DBUS_SERVICE_NAME:
|
||||
/* Construct-only */
|
||||
/* construct-only */
|
||||
priv->dbus_service_name = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_STATE:
|
||||
|
@@ -1200,13 +1200,13 @@ set_property (GObject *object, guint prop_id,
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_DBUS_OBJECT:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->object = g_value_dup_object (value);
|
||||
if (!priv->object)
|
||||
g_return_if_reached ();
|
||||
break;
|
||||
case PROP_DBUS_OBJECT_MANAGER:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->object_manager = g_value_dup_object (value);
|
||||
break;
|
||||
default:
|
||||
|
@@ -1025,7 +1025,7 @@ set_property (GObject *object, guint prop_id,
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_DBUS_SERVICE_NAME:
|
||||
/* Construct-only */
|
||||
/* construct-only */
|
||||
priv->dbus_service_name = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_STATE:
|
||||
|
@@ -1047,11 +1047,11 @@ set_property (GObject *object, guint prop_id,
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_DBUS_SERVICE_NAME:
|
||||
/* Construct-only */
|
||||
/* construct-only */
|
||||
priv->dbus_service_name = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_DBUS_WATCH_PEER:
|
||||
/* Construct-only */
|
||||
/* construct-only */
|
||||
priv->dbus_watch_peer = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_STATE:
|
||||
|
@@ -1029,15 +1029,15 @@ set_property (GObject *object, guint prop_id,
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_BT_NAME:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->name = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_BT_CAPABILITIES:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->capabilities = g_value_get_uint (value);
|
||||
break;
|
||||
case PROP_BT_DEVICE:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->bt_device = g_value_dup_object (value);
|
||||
g_signal_connect (priv->bt_device, "removed", G_CALLBACK (bluez_device_removed), object);
|
||||
break;
|
||||
|
@@ -1447,15 +1447,15 @@ set_property (GObject *object, guint prop_id,
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_PATH:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->path = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_DRIVER:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->driver = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_CONTROL_PORT:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->control_port = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_DATA_PORT:
|
||||
@@ -1463,7 +1463,7 @@ set_property (GObject *object, guint prop_id,
|
||||
priv->data_port = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_UID:
|
||||
/* Construct only */
|
||||
/* construct-only */
|
||||
priv->uid = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_IP4_METHOD:
|
||||
|
@@ -290,9 +290,9 @@ set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *p
|
||||
const char *str;
|
||||
gulong id;
|
||||
|
||||
/* all properties are construct-only */
|
||||
switch (prop_id) {
|
||||
case PROP_SUBJECT_TYPE:
|
||||
/* construct-only */
|
||||
i = g_value_get_int (value);
|
||||
g_return_if_fail (NM_IN_SET (i, (int) NM_AUTH_SUBJECT_TYPE_INTERNAL, (int) NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS));
|
||||
subject_type = i;
|
||||
@@ -300,6 +300,7 @@ set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *p
|
||||
g_return_if_fail (priv->subject_type == subject_type);
|
||||
break;
|
||||
case PROP_UNIX_PROCESS_DBUS_SENDER:
|
||||
/* construct-only */
|
||||
if ((str = g_value_get_string (value))) {
|
||||
priv->subject_type |= NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS;
|
||||
g_return_if_fail (priv->subject_type == NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS);
|
||||
@@ -307,6 +308,7 @@ set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *p
|
||||
}
|
||||
break;
|
||||
case PROP_UNIX_PROCESS_PID:
|
||||
/* construct-only */
|
||||
if ((id = g_value_get_ulong (value)) != G_MAXULONG) {
|
||||
priv->subject_type |= NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS;
|
||||
g_return_if_fail (priv->subject_type == NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS);
|
||||
@@ -314,6 +316,7 @@ set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *p
|
||||
}
|
||||
break;
|
||||
case PROP_UNIX_PROCESS_UID:
|
||||
/* construct-only */
|
||||
if ((id = g_value_get_ulong (value)) != G_MAXULONG) {
|
||||
priv->subject_type |= NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS;
|
||||
g_return_if_fail (priv->subject_type == NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS);
|
||||
@@ -407,7 +410,6 @@ nm_auth_subject_class_init (NMAuthSubjectClass *config_class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (config_class);
|
||||
|
||||
/* virtual methods */
|
||||
object_class->get_property = get_property;
|
||||
object_class->set_property = set_property;
|
||||
object_class->constructed = constructed;
|
||||
|
@@ -1437,15 +1437,17 @@ set_property (GObject *object,
|
||||
NMConfigData *self = NM_CONFIG_DATA (object);
|
||||
NMConfigDataPrivate *priv = NM_CONFIG_DATA_GET_PRIVATE (self);
|
||||
|
||||
/* This type is immutable. All properties are construct only. */
|
||||
switch (prop_id) {
|
||||
case PROP_CONFIG_MAIN_FILE:
|
||||
/* construct-only */
|
||||
priv->config_main_file = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_CONFIG_DESCRIPTION:
|
||||
/* construct-only */
|
||||
priv->config_description = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_KEYFILE_USER:
|
||||
/* construct-only */
|
||||
priv->keyfile_user = g_value_dup_boxed (value);
|
||||
if ( priv->keyfile_user
|
||||
&& !_nm_keyfile_has_values (priv->keyfile_user)) {
|
||||
@@ -1454,6 +1456,7 @@ set_property (GObject *object,
|
||||
}
|
||||
break;
|
||||
case PROP_KEYFILE_INTERN:
|
||||
/* construct-only */
|
||||
priv->keyfile_intern = g_value_dup_boxed (value);
|
||||
if ( priv->keyfile_intern
|
||||
&& !_nm_keyfile_has_values (priv->keyfile_intern)) {
|
||||
@@ -1462,6 +1465,7 @@ set_property (GObject *object,
|
||||
}
|
||||
break;
|
||||
case PROP_NO_AUTO_DEFAULT:
|
||||
/* construct-only */
|
||||
{
|
||||
char **value_arr = g_value_get_boxed (value);
|
||||
guint i, j = 0;
|
||||
|
Reference in New Issue
Block a user