Commit 6cc4a9df authored by Christian Kellner's avatar Christian Kellner
Browse files

device: unexport security (convert to enum)

Now that we have it on the Manager there is no need to have it on
every device as well.
parent dcc8251a
......@@ -84,6 +84,7 @@ enum {
PROP_0,
PROP_STORE,
PROP_SECURITY,
/* exported properties start here, */
PROP_UID,
......@@ -94,7 +95,6 @@ enum {
PROP_PARENT,
PROP_SYSFS,
PROP_SECURITY,
PROP_CONNTIME,
PROP_AUTHTIME,
......@@ -160,6 +160,10 @@ bolt_device_get_property (GObject *object,
g_value_set_object (value, dev->store);
break;
case PROP_SECURITY:
g_value_set_enum (value, dev->security);
break;
case PROP_UID:
g_value_set_string (value, dev->uid);
break;
......@@ -188,10 +192,6 @@ bolt_device_get_property (GObject *object,
g_value_set_string (value, dev->syspath);
break;
case PROP_SECURITY:
g_value_set_uint (value, dev->security);
break;
case PROP_CONNTIME:
g_value_set_uint64 (value, dev->conntime);
break;
......@@ -240,6 +240,10 @@ bolt_device_set_property (GObject *object,
g_object_notify_by_pspec (object, props[PROP_STORED]);
break;
case PROP_SECURITY:
dev->security = g_value_get_enum (value);
break;
case PROP_UID:
g_return_if_fail (dev->uid == NULL);
dev->uid = g_value_dup_string (value);
......@@ -284,10 +288,6 @@ bolt_device_set_property (GObject *object,
dev->syspath = g_value_dup_string (value);
break;
case PROP_SECURITY:
dev->security = g_value_get_uint (value);
break;
case PROP_CONNTIME:
dev->conntime = g_value_get_uint64 (value);
break;
......@@ -337,6 +337,14 @@ bolt_device_class_init (BoltDeviceClass *klass)
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
props[PROP_SECURITY] =
g_param_spec_enum ("security",
"Security", NULL,
BOLT_TYPE_SECURITY,
BOLT_SECURITY_NONE,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
props[PROP_UID] =
g_param_spec_string ("uid",
"Uid", NULL,
......@@ -392,15 +400,6 @@ bolt_device_class_init (BoltDeviceClass *klass)
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
props[PROP_SECURITY] =
g_param_spec_uint ("security",
"Security", NULL,
0,
BOLT_SECURITY_LAST,
BOLT_SECURITY_NONE,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
props[PROP_CONNTIME] =
g_param_spec_uint64 ("conntime",
"ConnectTime", NULL,
......
......@@ -44,7 +44,6 @@ enum {
PROP_STATUS,
PROP_PARENT,
PROP_SYSPATH,
PROP_SECURITY,
PROP_CONNTIME,
PROP_AUTHTIME,
......@@ -133,14 +132,6 @@ bolt_device_class_init (BoltDeviceClass *klass)
G_PARAM_READABLE |
G_PARAM_STATIC_NICK);
props[PROP_SECURITY] =
g_param_spec_enum ("security",
"Security", NULL,
BOLT_TYPE_SECURITY,
BOLT_SECURITY_NONE,
G_PARAM_READABLE |
G_PARAM_STATIC_NICK);
props[PROP_CONNTIME] =
g_param_spec_uint64 ("conntime",
"ConnectTime", NULL,
......
......@@ -65,7 +65,6 @@ print_device (BoltDevice *dev, gboolean verbose)
g_autofree char *syspath = NULL;
g_autofree char *parent = NULL;
g_autofree char *label = NULL;
BoltSecurity security = BOLT_SECURITY_NONE;
BoltDeviceType type;
BoltStatus status;
BoltKeyState keystate;
......@@ -87,7 +86,6 @@ print_device (BoltDevice *dev, gboolean verbose)
"type", &type,
"status", &status,
"uid", &uid,
"security", &security,
"parent", &parent,
"syspath", &syspath,
"conntime", &ct,
......@@ -173,11 +171,6 @@ print_device (BoltDevice *dev, gboolean verbose)
syspath);
}
g_print (" %s %s security: %s\n",
bolt_glyph (TREE_VERTICAL),
tree_branch,
bolt_security_to_string (security));
if (bolt_status_is_authorized (status))
{
g_autofree char *atstr = NULL;
......
......@@ -199,13 +199,6 @@
</doc:para></doc:description></doc:doc>
</property>
<property name="Security" type="u" access="read">
<doc:doc><doc:description><doc:para>
The security level of the domain the device is
connected to.
</doc:para></doc:description></doc:doc>
</property>
<property name="Stored" type="b" access="read">
<doc:doc><doc:description><doc:para>
Indication if the device is stored.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment