Commit 87424665 authored by Christian Kellner's avatar Christian Kellner
Browse files

device: rename _get_key to _get_keystate

We are not getting the actual key, but the keystate.
parent 4802af3a
......@@ -886,7 +886,7 @@ bolt_device_update_from_udev (BoltDevice *dev,
}
BoltKeyState
bolt_device_get_key (BoltDevice *dev)
bolt_device_get_keystate (BoltDevice *dev)
{
return dev->key;
}
......
......@@ -56,7 +56,7 @@ void bolt_device_authorize (BoltDevice *dev,
GAsyncReadyCallback callback,
gpointer user_data);
BoltKeyState bolt_device_get_key (BoltDevice *dev);
BoltKeyState bolt_device_get_keystate (BoltDevice *dev);
const char * bolt_device_get_name (BoltDevice *dev);
......
......@@ -688,7 +688,7 @@ maybe_authorize_device (BoltManager *mgr,
level = bolt_device_get_security (dev);
if (level == BOLT_SECURITY_SECURE &&
bolt_device_get_key (dev) != BOLT_KEY_MISSING)
bolt_device_get_keystate (dev) != BOLT_KEY_MISSING)
{
g_autoptr(GError) err = NULL;
key = bolt_store_get_key (mgr->store, uid, &err);
......
......@@ -167,7 +167,7 @@ test_store_basic (TestStore *tt, gconstpointer user_data)
g_assert_cmpuint (bolt_device_get_policy (stored), ==, BOLT_POLICY_AUTO);
g_assert_cmpuint (bolt_device_get_stored (stored), ==, TRUE);
g_assert_cmpuint (bolt_device_get_key (stored), ==, BOLT_KEY_MISSING);
g_assert_cmpuint (bolt_device_get_keystate (stored), ==, BOLT_KEY_MISSING);
g_clear_object (&stored);
g_clear_object (&dev);
......@@ -205,7 +205,7 @@ test_store_basic (TestStore *tt, gconstpointer user_data)
g_assert_cmpuint (bolt_device_get_policy (stored), ==, BOLT_POLICY_MANUAL);
g_assert_cmpuint (bolt_device_get_stored (stored), ==, TRUE);
g_assert_cmpuint (bolt_device_get_key (stored), ==, 1);
g_assert_cmpuint (bolt_device_get_keystate (stored), ==, 1);
keystate = bolt_store_have_key (tt->store, uid);
g_assert_cmpuint (keystate, ==, 1);
......
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