![]() |
![]() |
![]() |
libaccountsservice Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
ActUser; enum ActUserAccountType; ActUserClass; enum ActUserPasswordMode; gint act_user_collate (ActUser *user1
,ActUser *user2
); ActUserAccountType act_user_get_account_type (ActUser *user
); gboolean act_user_get_automatic_login (ActUser *user
); const char * act_user_get_email (ActUser *user
); const char * act_user_get_home_dir (ActUser *user
); const char * act_user_get_icon_file (ActUser *user
); const char * act_user_get_language (ActUser *user
); const char * act_user_get_location (ActUser *user
); gboolean act_user_get_locked (ActUser *user
); int act_user_get_login_frequency (ActUser *user
); const GVariant * act_user_get_login_history (ActUser *user
); gint64 act_user_get_login_time (ActUser *user
); guint act_user_get_num_sessions (ActUser *user
); const char * act_user_get_object_path (ActUser *user
); const char * act_user_get_password_hint (ActUser *user
); ActUserPasswordMode act_user_get_password_mode (ActUser *user
); const char * act_user_get_primary_session_id (ActUser *user
); const char * act_user_get_real_name (ActUser *user
); const char * act_user_get_shell (ActUser *user
); uid_t act_user_get_uid (ActUser *user
); const char * act_user_get_user_name (ActUser *user
); const char * act_user_get_x_session (ActUser *user
); gboolean act_user_is_loaded (ActUser *user
); gboolean act_user_is_local_account (ActUser *user
); gboolean act_user_is_logged_in (ActUser *user
); gboolean act_user_is_system_account (ActUser *user
); void act_user_set_account_type (ActUser *user
,ActUserAccountType account_type
); void act_user_set_automatic_login (ActUser *user
,gboolean enabled
); void act_user_set_email (ActUser *user
,const char *email
); void act_user_set_icon_file (ActUser *user
,const char *icon_file
); void act_user_set_language (ActUser *user
,const char *language
); void act_user_set_location (ActUser *user
,const char *location
); void act_user_set_locked (ActUser *user
,gboolean locked
); void act_user_set_password (ActUser *user
,const gchar *password
,const gchar *hint
); void act_user_set_password_mode (ActUser *user
,ActUserPasswordMode password_mode
); void act_user_set_real_name (ActUser *user
,const char *real_name
); void act_user_set_user_name (ActUser *user
,const char *user_name
); void act_user_set_x_session (ActUser *user
,const char *x_session
);
"account-type" gint : Read "automatic-login" gboolean : Read "email" gchar* : Read "home-directory" gchar* : Read "icon-file" gchar* : Read "is-loaded" gboolean : Read "language" gchar* : Read "local-account" gboolean : Read "location" gchar* : Read "locked" gboolean : Read "login-frequency" gint : Read "login-history" GVariant* : Read "login-time" gint64 : Read "password-hint" gchar* : Read "password-mode" gint : Read "real-name" gchar* : Read "shell" gchar* : Read "system-account" gboolean : Read "uid" gint : Read "user-name" gchar* : Read "x-session" gchar* : Read
typedef enum { ACT_USER_ACCOUNT_TYPE_STANDARD, ACT_USER_ACCOUNT_TYPE_ADMINISTRATOR, } ActUserAccountType;
typedef enum { ACT_USER_PASSWORD_MODE_REGULAR, ACT_USER_PASSWORD_MODE_SET_AT_LOGIN, ACT_USER_PASSWORD_MODE_NONE, } ActUserPasswordMode;
ActUserAccountType act_user_get_account_type (ActUser *user
);
Retrieves the account type of user
.
|
the user object to examine. |
Returns : |
a ActUserAccountType |
gboolean act_user_get_automatic_login (ActUser *user
);
Returns whether or not ActUser is automatically logged in at boot time.
|
a ActUser |
Returns : |
TRUE or FALSE
|
const char * act_user_get_email (ActUser *user
);
Retrieves the email address set by user
.
|
the user object to examine. |
Returns : |
a pointer to an array of characters which must not be modified or
freed, or NULL . [transfer none]
|
const char * act_user_get_home_dir (ActUser *user
);
Retrieves the home directory for user
.
|
the user object to examine. |
Returns : |
a pointer to an array of characters which must not be modified or
freed, or NULL . [transfer none]
|
const char * act_user_get_icon_file (ActUser *user
);
Returns the path to the account icon belonging to user
.
|
a ActUser |
Returns : |
a path to an icon. [transfer none] |
const char * act_user_get_language (ActUser *user
);
Returns the path to the configured locale of user
.
|
a ActUser |
Returns : |
a path to an icon. [transfer none] |
const char * act_user_get_location (ActUser *user
);
Retrieves the location set by user
.
|
the user object to examine. |
Returns : |
a pointer to an array of characters which must not be modified or
freed, or NULL . [transfer none]
|
gboolean act_user_get_locked (ActUser *user
);
Returns whether or not the ActUser account is locked.
|
a ActUser |
Returns : |
TRUE or FALSE
|
int act_user_get_login_frequency (ActUser *user
);
Returns the number of times user
has logged in.
|
a ActUser |
Returns : |
the login frequency |
const GVariant * act_user_get_login_history (ActUser *user
);
Returns the login history for user
.
|
a ActUser |
Returns : |
a pointer to GVariant of type "a(xxa{sv})"
which must not be modified or freed, or NULL . [transfer none]
|
gint64 act_user_get_login_time (ActUser *user
);
Returns the last login time for user
.
|
a ActUser |
Returns : |
the login time. [transfer none] |
const char * act_user_get_object_path (ActUser *user
);
Returns the user accounts service object path of user
,
or NULL
if user
doesn't have an object path associated
with it.
|
a ActUser |
Returns : |
the object path of the user. [transfer none] |
const char * act_user_get_password_hint (ActUser *user
);
Retrieves the password hint set by user
.
|
the user object to examine. |
Returns : |
a pointer to an array of characters which must not be modified or
freed, or NULL . [transfer none]
|
ActUserPasswordMode act_user_get_password_mode (ActUser *user
);
Retrieves the password mode of user
.
|
the user object to examine. |
Returns : |
a ActUserPasswordMode |
const char * act_user_get_primary_session_id (ActUser *user
);
Returns the primary ConsoleKit session id of user
, or NULL
if user
isn't
logged in.
|
a ActUser |
Returns : |
the primary ConsoleKit session id of the user. [transfer none] |
const char * act_user_get_real_name (ActUser *user
);
Retrieves the display name of user
.
|
the user object to examine. |
Returns : |
a pointer to an array of characters which must not be modified or
freed, or NULL . [transfer none]
|
const char * act_user_get_shell (ActUser *user
);
Retrieves the shell assigned to user
.
|
the user object to examine. |
Returns : |
a pointer to an array of characters which must not be modified or
freed, or NULL . [transfer none]
|
uid_t act_user_get_uid (ActUser *user
);
Retrieves the ID of user
.
|
the user object to examine. |
Returns : |
a pointer to an array of characters which must not be modified or
freed, or NULL . [transfer none]
|
const char * act_user_get_user_name (ActUser *user
);
Retrieves the login name of user
.
|
the user object to examine. |
Returns : |
a pointer to an array of characters which must not be modified or
freed, or NULL . [transfer none]
|
const char * act_user_get_x_session (ActUser *user
);
Returns the path to the configured X session for user
.
|
a ActUser |
Returns : |
a path to an icon. [transfer none] |
gboolean act_user_is_loaded (ActUser *user
);
Determines whether or not the user object is loaded and ready to read from.
"is-loaded" property must be TRUE
before calling
act_user_manager_list_users()
|
a ActUser |
Returns : |
TRUE or FALSE
|
gboolean act_user_is_local_account (ActUser *user
);
Retrieves whether the user is a local account or not.
|
the user object to examine. |
Returns : |
TRUE if the user is local. [transfer none]
|
gboolean act_user_is_logged_in (ActUser *user
);
Returns whether or not ActUser is currently logged in.
|
a ActUser |
Returns : |
TRUE or FALSE
|
gboolean act_user_is_system_account (ActUser *user
);
Returns whether or not ActUser represents a 'system account' like 'root' or 'nobody'.
|
a ActUser |
Returns : |
TRUE or FALSE
|
void act_user_set_account_type (ActUser *user
,ActUserAccountType account_type
);
Changes the account type of user
.
Note this function is synchronous and ignores errors.
|
the user object to alter. |
|
a ActUserAccountType |
void act_user_set_automatic_login (ActUser *user
,gboolean enabled
);
If enabled is set to TRUE
then this user will automatically be logged in
at boot up time. Only one user can be configured to auto login at any given
time, so subsequent calls to act_user_set_automatic_login()
override previous
calls.
Note this function is synchronous and ignores errors.
|
whether or not to autologin for user. |
void act_user_set_email (ActUser *user
,const char *email
);
Assigns a new email to user
.
Note this function is synchronous and ignores errors.
|
the user object to alter. |
|
an email address |
void act_user_set_icon_file (ActUser *user
,const char *icon_file
);
Assigns a new icon for user
.
Note this function is synchronous and ignores errors.
|
the user object to alter. |
|
path to an icon |
void act_user_set_language (ActUser *user
,const char *language
);
Assigns a new locale for user
.
Note this function is synchronous and ignores errors.
|
the user object to alter. |
|
a locale (e.g. en_US.utf8) |
void act_user_set_location (ActUser *user
,const char *location
);
Assigns a new location for user
.
Note this function is synchronous and ignores errors.
|
the user object to alter. |
|
a location |
void act_user_set_locked (ActUser *user
,gboolean locked
);
Note this function is synchronous and ignores errors.
|
the user object to alter. |
|
whether or not the account is locked |
void act_user_set_password (ActUser *user
,const gchar *password
,const gchar *hint
);
Changes the password of user
to password
.
hint
is displayed to the user if they forget the password.
Note this function is synchronous and ignores errors.
|
the user object to alter. |
|
a password |
|
a hint to help user recall password |
void act_user_set_password_mode (ActUser *user
,ActUserPasswordMode password_mode
);
Changes the password of user
. If password_mode
is
ACT_USER_PASSWORD_MODE_SET_AT_LOGIN then the user will
be asked for a new password at the next login. If password_mode
is ACT_USER_PASSWORD_MODE_NONE then the user will not require
a password to log in.
Note this function is synchronous and ignores errors.
|
the user object to alter. |
|
a ActUserPasswordMode |
void act_user_set_real_name (ActUser *user
,const char *real_name
);
Assigns a new name for user
.
Note this function is synchronous and ignores errors.
|
the user object to alter. |
|
a new name |
void act_user_set_user_name (ActUser *user
,const char *user_name
);
Assigns a new username for user
.
Note this function is synchronous and ignores errors.
|
the user object to alter. |
|
a new user name |
void act_user_set_x_session (ActUser *user
,const char *x_session
);
Assigns a new x session for user
.
Note this function is synchronous and ignores errors.
|
the user object to alter. |
|
an x session (e.g. gnome) |
"account-type"
property "account-type" gint : Read
The account type for this user.
Allowed values: [0,1]
Default value: 0
"automatic-login"
property "automatic-login" gboolean : Read
Automatic Login.
Default value: FALSE
"home-directory"
property "home-directory" gchar* : Read
The home directory for this user.
Default value: NULL
"icon-file"
property "icon-file" gchar* : Read
The path to an icon for this user.
Default value: NULL
"login-frequency"
property "login-frequency" gint : Read
login frequency.
Allowed values: >= 0
Default value: 0
"login-history"
property "login-history" GVariant* : Read
The login history for this user.
Allowed values: GVariant<a(xxa{sv})>
Default value: NULL
"login-time"
property "login-time" gint64 : Read
The last login time for this user.
Allowed values: >= 0
Default value: 0
"password-hint"
property "password-hint" gchar* : Read
Hint to help this user remember his password.
Default value: NULL
"password-mode"
property "password-mode" gint : Read
The password mode for this user.
Allowed values: [0,2]
Default value: 0
"real-name"
property "real-name" gchar* : Read
The real name to display for this user.
Default value: NULL
"user-name"
property "user-name" gchar* : Read
The login name for this user.
Default value: NULL