| Tizen Login Manager Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <tlm-account-plugin.h> struct TlmAccountPluginInterface; gboolean tlm_account_plugin_cleanup_guest_user (TlmAccountPlugin *self,const gchar *user_name,gboolean delete_account); gboolean tlm_account_plugin_is_valid_user (TlmAccountPlugin *self,const gchar *user_name); gboolean tlm_account_plugin_setup_guest_user_account (TlmAccountPlugin *self,const gchar *user_name);
TlmAccountPlugin is an interface for implementing tlm account plugins.
Tlm account plugins provide an API for system-specific account operations: setting up and cleaning up guest user account, and checking username validity. They should implement the plugin interface specified here.
See example plugin implementation here: https://github.com/01org/tlm/tree/master/src/plugins/default and here: https://github.com/01org/tlm/tree/master/src/plugins/gumd.
struct TlmAccountPluginInterface {
GTypeInterface parent;
gboolean (*setup_guest_user_account) (TlmAccountPlugin *self,
const gchar *user_name);
gboolean (*is_valid_user) (TlmAccountPlugin *self,
const gchar *user_name);
gboolean (*cleanup_guest_user) (TlmAccountPlugin *self,
const gchar *guest_user,
gboolean delete_account);
};
TlmAccountPluginInterface interface containing pointers to methods that all plugin implementations should provide.
| parent interface type. | |
implementation of tlm_account_plugin_setup_guest_user_account()
|
|
implementation of tlm_account_plugin_is_valid_user()
|
|
implementation of tlm_account_plugin_cleanup_guest_user()
|
gboolean tlm_account_plugin_cleanup_guest_user (TlmAccountPlugin *self,const gchar *user_name,gboolean delete_account);
When a guest user logs out, this method is called. It should clean up the home directory of the user, and, if delete_user is set, delete the user account.
|
plugin instance |
|
user name to clean up |
|
whether the user account should be deleted |
gboolean tlm_account_plugin_is_valid_user (TlmAccountPlugin *self,const gchar *user_name);
Checks if the user with a given user_name exists.
|
plugin instance |
|
user name to check |
gboolean tlm_account_plugin_setup_guest_user_account (TlmAccountPlugin *self,const gchar *user_name);
This method creates and sets up a guest user account with a provided
user_name.
|
plugin instance |
|
the user name |
Returns : |
whether the operation succeeded. |