PolkitUnixUser

PolkitUnixUser — Unix users

Synopsis

                    PolkitUnixUser;
PolkitIdentity *    polkit_unix_user_new                (gint uid);
PolkitIdentity *    polkit_unix_user_new_for_name       (const gchar *name,
                                                         GError **error);
gint                polkit_unix_user_get_uid            (PolkitUnixUser *user);
void                polkit_unix_user_set_uid            (PolkitUnixUser *user,
                                                         gint uid);
const gchar *       polkit_unix_user_get_name           (PolkitUnixUser *user);

Object Hierarchy

  GObject
   +----PolkitUnixUser

Implemented Interfaces

PolkitUnixUser implements PolkitIdentity.

Properties

  "uid"                      gint                  : Read / Write / Construct

Description

An object representing a user identity on a UNIX system.

Details

PolkitUnixUser

typedef struct _PolkitUnixUser PolkitUnixUser;

The PolkitUnixUser struct should not be accessed directly.


polkit_unix_user_new ()

PolkitIdentity *    polkit_unix_user_new                (gint uid);

Creates a new PolkitUnixUser object for uid.

uid :

A UNIX user id.

Returns :

A PolkitUnixUser object. Free with g_object_unref(). [transfer full]

polkit_unix_user_new_for_name ()

PolkitIdentity *    polkit_unix_user_new_for_name       (const gchar *name,
                                                         GError **error);

Creates a new PolkitUnixUser object for a user with the user name name.

name :

A UNIX user name.

error :

Return location for error.

Returns :

A PolkitUnixUser object or NULL if error is set. [allow-none][transfer full]

polkit_unix_user_get_uid ()

gint                polkit_unix_user_get_uid            (PolkitUnixUser *user);

Gets the UNIX user id for user.

user :

A PolkitUnixUser.

Returns :

A UNIX user id.

polkit_unix_user_set_uid ()

void                polkit_unix_user_set_uid            (PolkitUnixUser *user,
                                                         gint uid);

Sets uid for user.

user :

A PolkitUnixUser.

uid :

A UNIX user id.

polkit_unix_user_get_name ()

const gchar *       polkit_unix_user_get_name           (PolkitUnixUser *user);

Get the user's name.

user :

A PolkitUnixUser.

Returns :

User name string or NULL if user uid not found. [allow-none][transfer none]

Property Details

The "uid" property

  "uid"                      gint                  : Read / Write / Construct

The UNIX user id.

Allowed values: >= 0

Default value: 0