| Top |
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.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
.
gboolean tlm_account_plugin_is_valid_user (TlmAccountPlugin *self,const gchar *user_name);
Checks if the user with a given user_name
exists.
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.
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.
GTypeInterface |
parent interface type. |
|
implementation of |
||
implementation of |
||
implementation of |
typedef struct _TlmAccountPlugin TlmAccountPlugin;
Opaque TlmAccountPlugin data structure.
“config” property“config” GHashTable *
This property holds a list of key-value pairs of plugin configuration taken from tlm.conf configuration file.
Flags: Read / Write / Construct Only