libnm/remote-connection: add filename property
This commit is contained in:
@@ -1351,6 +1351,7 @@ global:
|
|||||||
nm_connection_get_setting_tc_config;
|
nm_connection_get_setting_tc_config;
|
||||||
nm_device_ip_tunnel_get_flags;
|
nm_device_ip_tunnel_get_flags;
|
||||||
nm_ip_tunnel_flags_get_type;
|
nm_ip_tunnel_flags_get_type;
|
||||||
|
nm_remote_connection_get_filename;
|
||||||
nm_remote_connection_get_flags;
|
nm_remote_connection_get_flags;
|
||||||
nm_setting_connection_get_mdns;
|
nm_setting_connection_get_mdns;
|
||||||
nm_setting_connection_mdns_get_type;
|
nm_setting_connection_mdns_get_type;
|
||||||
|
@@ -51,6 +51,7 @@ enum {
|
|||||||
PROP_0,
|
PROP_0,
|
||||||
PROP_UNSAVED,
|
PROP_UNSAVED,
|
||||||
PROP_FLAGS,
|
PROP_FLAGS,
|
||||||
|
PROP_FILENAME,
|
||||||
PROP_VISIBLE,
|
PROP_VISIBLE,
|
||||||
|
|
||||||
LAST_PROP
|
LAST_PROP
|
||||||
@@ -61,6 +62,7 @@ typedef struct {
|
|||||||
|
|
||||||
gboolean unsaved;
|
gboolean unsaved;
|
||||||
guint32 flags;
|
guint32 flags;
|
||||||
|
const char *filename;
|
||||||
|
|
||||||
gboolean visible;
|
gboolean visible;
|
||||||
} NMRemoteConnectionPrivate;
|
} NMRemoteConnectionPrivate;
|
||||||
@@ -669,6 +671,22 @@ nm_remote_connection_get_flags (NMRemoteConnection *connection)
|
|||||||
return (NMSettingsConnectionFlags) NM_REMOTE_CONNECTION_GET_PRIVATE (connection)->flags;
|
return (NMSettingsConnectionFlags) NM_REMOTE_CONNECTION_GET_PRIVATE (connection)->flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nm_remote_connection_get_filename:
|
||||||
|
* @connection: the #NMRemoteConnection
|
||||||
|
*
|
||||||
|
* Returns: file that stores the connection in case the connection is file-backed.
|
||||||
|
*
|
||||||
|
* Since: 1.12
|
||||||
|
**/
|
||||||
|
const char *
|
||||||
|
nm_remote_connection_get_filename (NMRemoteConnection *connection)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (NM_IS_REMOTE_CONNECTION (connection), NULL);
|
||||||
|
|
||||||
|
return NM_REMOTE_CONNECTION_GET_PRIVATE (connection)->filename;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_remote_connection_get_visible:
|
* nm_remote_connection_get_visible:
|
||||||
* @connection: the #NMRemoteConnection
|
* @connection: the #NMRemoteConnection
|
||||||
@@ -760,6 +778,7 @@ init_dbus (NMObject *object)
|
|||||||
const NMPropertiesInfo property_info[] = {
|
const NMPropertiesInfo property_info[] = {
|
||||||
{ NM_REMOTE_CONNECTION_UNSAVED, &priv->unsaved },
|
{ NM_REMOTE_CONNECTION_UNSAVED, &priv->unsaved },
|
||||||
{ NM_REMOTE_CONNECTION_FLAGS, &priv->flags },
|
{ NM_REMOTE_CONNECTION_FLAGS, &priv->flags },
|
||||||
|
{ NM_REMOTE_CONNECTION_FILENAME, &priv->filename },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -893,6 +912,9 @@ get_property (GObject *object, guint prop_id,
|
|||||||
case PROP_FLAGS:
|
case PROP_FLAGS:
|
||||||
g_value_set_boolean (value, NM_REMOTE_CONNECTION_GET_PRIVATE (object)->flags);
|
g_value_set_boolean (value, NM_REMOTE_CONNECTION_GET_PRIVATE (object)->flags);
|
||||||
break;
|
break;
|
||||||
|
case PROP_FILENAME:
|
||||||
|
g_value_set_string (value, NM_REMOTE_CONNECTION_GET_PRIVATE (object)->filename);
|
||||||
|
break;
|
||||||
case PROP_VISIBLE:
|
case PROP_VISIBLE:
|
||||||
g_value_set_boolean (value, NM_REMOTE_CONNECTION_GET_PRIVATE (object)->visible);
|
g_value_set_boolean (value, NM_REMOTE_CONNECTION_GET_PRIVATE (object)->visible);
|
||||||
break;
|
break;
|
||||||
@@ -965,6 +987,21 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
|
|||||||
G_PARAM_READABLE |
|
G_PARAM_READABLE |
|
||||||
G_PARAM_STATIC_STRINGS));
|
G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMRemoteConnection:filename:
|
||||||
|
*
|
||||||
|
* File that stores the connection in case the connection is
|
||||||
|
* file-backed.
|
||||||
|
*
|
||||||
|
* Since: 1.12
|
||||||
|
**/
|
||||||
|
g_object_class_install_property
|
||||||
|
(object_class, PROP_FILENAME,
|
||||||
|
g_param_spec_string (NM_REMOTE_CONNECTION_FILENAME, "", "",
|
||||||
|
NULL,
|
||||||
|
G_PARAM_READABLE |
|
||||||
|
G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NMRemoteConnection:visible:
|
* NMRemoteConnection:visible:
|
||||||
*
|
*
|
||||||
|
@@ -42,6 +42,7 @@ G_BEGIN_DECLS
|
|||||||
#define NM_REMOTE_CONNECTION_PATH "path"
|
#define NM_REMOTE_CONNECTION_PATH "path"
|
||||||
#define NM_REMOTE_CONNECTION_UNSAVED "unsaved"
|
#define NM_REMOTE_CONNECTION_UNSAVED "unsaved"
|
||||||
#define NM_REMOTE_CONNECTION_FLAGS "flags"
|
#define NM_REMOTE_CONNECTION_FLAGS "flags"
|
||||||
|
#define NM_REMOTE_CONNECTION_FILENAME "filename"
|
||||||
#define NM_REMOTE_CONNECTION_VISIBLE "visible"
|
#define NM_REMOTE_CONNECTION_VISIBLE "visible"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -126,6 +127,9 @@ gboolean nm_remote_connection_get_unsaved (NMRemoteConnection *connection);
|
|||||||
NM_AVAILABLE_IN_1_12
|
NM_AVAILABLE_IN_1_12
|
||||||
NMSettingsConnectionFlags nm_remote_connection_get_flags (NMRemoteConnection *connection);
|
NMSettingsConnectionFlags nm_remote_connection_get_flags (NMRemoteConnection *connection);
|
||||||
|
|
||||||
|
NM_AVAILABLE_IN_1_12
|
||||||
|
const char *nm_remote_connection_get_filename (NMRemoteConnection *connection);
|
||||||
|
|
||||||
gboolean nm_remote_connection_get_visible (NMRemoteConnection *connection);
|
gboolean nm_remote_connection_get_visible (NMRemoteConnection *connection);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
Reference in New Issue
Block a user