| 1 |
|
| 2 |
|
| 3 |
nc. |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#include "config.h" |
| 20 |
|
| 21 |
#include <glib-object.h> |
| 22 |
#include <glib/gi18n.h> |
| 23 |
|
| 24 |
#include "goaidentity.h" |
| 25 |
|
| 26 |
G_DEFINE_INTERFACE (GoaIdentity, goa_identity, G_TYPE_OBJECT); |
| 27 |
|
| 28 |
static void |
| 29 |
goa_identity_default_init (GoaIdentityInterface *interface) |
| 30 |
{ |
| 31 |
g_object_interface_install_property (interface, |
| 32 |
g_param_spec_string ("identifier", |
| 33 |
"identifier", |
| 34 |
"identifier", |
| 35 |
NULL, G_PARAM_READABLE)); |
| 36 |
g_object_interface_install_property (interface, |
| 37 |
g_param_spec_boolean ("is-signed-in", |
| 38 |
"Is signed in", |
| 39 |
"Whether or not identity is currently signed in", |
| 40 |
FALSE, |
| 41 |
G_PARAM_READABLE)); |
| 42 |
g_object_interface_install_property (interface, |
| 43 |
g_param_spec_int64 ("start-timestamp", |
| 44 |
"Start Timestamp", |
| 45 |
"A timestamp of when the identities credentials first became valid", |
| 46 |
-1, |
| 47 |
G_MAXINT64, |
| 48 |
-1, G_PARAM_READABLE)); |
| 49 |
g_object_interface_install_property (interface, |
| 50 |
g_param_spec_int64 ("renewal-timestamp", |
| 51 |
"Renewal Timestamp", |
| 52 |
"A timestamp of when the identities credentials can no longer be renewed", |
| 53 |
-1, |
| 54 |
G_MAXINT64, |
| 55 |
-1, G_PARAM_READABLE)); |
| 56 |
g_object_interface_install_property (interface, |
| 57 |
g_param_spec_int64 ("expiration-timestamp", |
| 58 |
"Expiration Timestamp", |
| 59 |
"A timestamp of when the identities credentials expire", |
| 60 |
-1, |
| 61 |
G_MAXINT64, |
| 62 |
-1, G_PARAM_READABLE)); |
| 63 |
} |
| 64 |
|
| 65 |
const char * |
| 66 |
goa_identity_get_identifier (GoaIdentity *self) |
| 67 |
{ |
| 68 |
return GOA_IDENTITY_GET_IFACE (self)->get_identifier (self); |
| 69 |
} |
| 70 |
|
| 71 |
gboolean |
| 72 |
goa_identity_is_signed_in (GoaIdentity *self) |
| 73 |
{ |
| 74 |
return GOA_IDENTITY_GET_IFACE (self)->is_signed_in (self); |
| 75 |
} |