Top |
gpointer | exclude-usernames-list | Read / Write |
gboolean | has-multiple-users | Read / Write |
gpointer | include-usernames-list | Read / Write |
gboolean | is-loaded | Read |
void | user-added | Run Last |
void | user-changed | Run Last |
void | user-is-logged-in-changed | Run Last |
void | user-removed | Run Last |
ActUserManager is a manager object that gives access to user creation, deletion, enumeration, etc.
There is typically a singleton ActUserManager object, which
can be obtained by act_user_manager_get_default()
.
gboolean act_user_manager_activate_user_session (ActUserManager *manager
,ActUser *user
);
Activate the session for a given user.
ActUser * act_user_manager_cache_user (ActUserManager *manager
,const char *username
,GError **error
);
Caches a user account so it shows up via act_user_manager_list_users()
.
void act_user_manager_cache_user_async (ActUserManager *manager
,const gchar *username
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously caches a user account so it shows up via
act_user_manager_list_users()
.
For more details, see act_user_manager_cache_user()
, which
is the synchronous version of this call.
manager |
||
username |
a unix user name |
|
cancellable |
optional GCancellable object,
|
[allow-none] |
callback |
a GAsyncReadyCallback to call when the request is satisfied. |
[scope async] |
user_data |
the data to pass to |
[closure] |
Since: 0.6.27
ActUser * act_user_manager_cache_user_finish (ActUserManager *manager
,GAsyncResult *result
,GError **error
);
Finishes an asynchronous user caching.
See act_user_manager_cache_user_async()
.
Since: 0.6.27
gboolean
act_user_manager_can_switch (ActUserManager *manager
);
Check whether the user can switch to another session.
ActUser * act_user_manager_create_user (ActUserManager *manager
,const char *username
,const char *fullname
,ActUserAccountType accounttype
,GError **error
);
Creates a user account on the system.
void act_user_manager_create_user_async (ActUserManager *manager
,const gchar *username
,const gchar *fullname
,ActUserAccountType accounttype
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously creates a user account on the system.
For more details, see act_user_manager_create_user()
, which
is the synchronous version of this call.
manager |
||
username |
a unix user name |
|
fullname |
a unix GECOS value |
|
accounttype |
||
cancellable |
optional GCancellable object,
|
[allow-none] |
callback |
a GAsyncReadyCallback to call when the request is satisfied. |
[scope async] |
user_data |
the data to pass to |
[closure] |
Since: 0.6.27
ActUser * act_user_manager_create_user_finish (ActUserManager *manager
,GAsyncResult *result
,GError **error
);
Finishes an asynchronous user creation.
See act_user_manager_create_user_async()
.
Since: 0.6.27
gboolean act_user_manager_delete_user (ActUserManager *manager
,ActUser *user
,gboolean remove_files
,GError **error
);
Deletes a user account on the system.
void act_user_manager_delete_user_async (ActUserManager *manager
,ActUser *user
,gboolean remove_files
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously deletes a user account from the system.
For more details, see act_user_manager_delete_user()
, which
is the synchronous version of this call.
manager |
||
user |
a ActUser object |
|
remove_files |
|
|
cancellable |
optional GCancellable object,
|
[allow-none] |
callback |
a GAsyncReadyCallback to call when the request is satisfied. |
[scope async] |
user_data |
the data to pass to |
[closure] |
Since: 0.6.27
gboolean act_user_manager_delete_user_finish (ActUserManager *manager
,GAsyncResult *result
,GError **error
);
Finishes an asynchronous user account deletion.
See act_user_manager_delete_user_async()
.
Since: 0.6.27
ActUserManager *
act_user_manager_get_default (void
);
Returns the user manager singleton instance. Calling this function will
automatically being loading the user list if it isn't loaded already.
The “is-loaded” property will be set to TRUE
when the users
are finished loading and then act_user_manager_list_users()
can be called.
ActUser * act_user_manager_get_user (ActUserManager *manager
,const char *username
);
Retrieves a pointer to the ActUser object for the login username
from manager
. Trying to use this object before its
“is-loaded” property is TRUE
will result in undefined
behavior.
ActUser * act_user_manager_get_user_by_id (ActUserManager *manager
,uid_t id
);
Retrieves a pointer to the ActUser object for the user with the
given uid from manager
. Trying to use this object before its
“is-loaded” property is TRUE
will result in undefined
behavior.
gboolean
act_user_manager_goto_login_session (ActUserManager *manager
);
Switch the display to the login manager.
GSList *
act_user_manager_list_users (ActUserManager *manager
);
Get a list of system user accounts
gboolean
act_user_manager_no_service (ActUserManager *manager
);
Check whether or not the accounts service is running.
gboolean act_user_manager_uncache_user (ActUserManager *manager
,const char *username
,GError **error
);
Releases all metadata about a user account, including icon,
language and session. If the user account is from a remote
server and the user has never logged in before, then that
account will no longer show up in ListCachedUsers()
output.
void act_user_manager_uncache_user_async (ActUserManager *manager
,const gchar *username
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gboolean act_user_manager_uncache_user_finish (ActUserManager *manager
,GAsyncResult *result
,GError **error
);
Finishes an asynchronous user uncaching.
See act_user_manager_uncache_user_async()
.
Since: 0.6.39
#define ACT_USER_MANAGER_ERROR act_user_manager_error_quark ()
The GError domain for ActUserManagerError errors
“exclude-usernames-list”
property“exclude-usernames-list” gpointer
Usernames who are specifically excluded.
Owner: ActUserManager
Flags: Read / Write
“has-multiple-users”
property“has-multiple-users” gboolean
Whether more than one normal user is present.
Owner: ActUserManager
Flags: Read / Write
Default value: FALSE
“include-usernames-list”
property“include-usernames-list” gpointer
Usernames who are specifically included.
Owner: ActUserManager
Flags: Read / Write
“is-loaded”
property“is-loaded” gboolean
Determines whether or not the manager object is loaded and ready to read from.
Owner: ActUserManager
Flags: Read
Default value: FALSE
“user-added”
signalvoid user_function (ActUserManager *gobject, ActUser *user, gpointer user_data)
Emitted when a user is added to the user manager.
gobject |
the object which received the signal |
|
user |
the ActUser that was added |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“user-changed”
signalvoid user_function (ActUserManager *gobject, ActUser *user, gpointer user_data)
One of the users has changed
gobject |
the object which received the signal |
|
user |
the ActUser that changed |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“user-is-logged-in-changed”
signalvoid user_function (ActUserManager *gobject, ActUser *user, gpointer user_data)
One of the users has logged in or out.
gobject |
the object which received the signal |
|
user |
the ActUser that changed login status |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“user-removed”
signalvoid user_function (ActUserManager *gobject, ActUser *user, gpointer user_data)
Emitted when a user is removed from the user manager.
gobject |
the object which received the signal |
|
user |
the ActUser that was removed |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last