OobsGroup

OobsGroup — Object that represents an individual group

Functions

Properties

guint gid Read / Write
gchar * name Read / Write / Construct Only
gchar * password Read / Write

Object Hierarchy

    GObject
    ╰── OobsObject
        ╰── OobsGroup

Description

Functions

oobs_group_new ()

OobsGroup *
oobs_group_new (const gchar *name);

Returns a newly allocated OobsGroup with the name specified by name .

Parameters

name

group name.

 

Returns

A new OobsGroup.


oobs_group_get_name ()

const gchar *
oobs_group_get_name (OobsGroup *group);

Returns the name of the group represented by group .

Parameters

group

An OobsGroup.

 

Returns

A pointer to the group name as a string. This string must not be freed, modified or stored.


oobs_group_set_password ()

void
oobs_group_set_password (OobsGroup *group,
                         const gchar *password);


oobs_group_get_gid ()

gid_t
oobs_group_get_gid (OobsGroup *group);

Returns the group ID (GID) associated to OobsGroup

Parameters

group

An OobsGroup.

 

Returns

the group GID.


oobs_group_set_gid ()

void
oobs_group_set_gid (OobsGroup *group,
                    gid_t gid);

Sets the group ID (GID) of group to be gid.

Parameters

group

An OobsGroup.

 

gid

A new GID for group.

 

oobs_group_get_users ()

GList *
oobs_group_get_users (OobsGroup *group);

Returns a GList containing pointers to the OobsUser objects that represent the users represented by the group.

Parameters

group

An OobsGroup.

 

Returns

a newly allocated GList, use g_list_free() to free it.


oobs_group_clear_users ()

void
oobs_group_clear_users (OobsGroup *group);


oobs_group_add_user ()

void
oobs_group_add_user (OobsGroup *group,
                     OobsUser *user);

Adds a new user to the group. If the user is already in the group, it does nothing.

Parameters

group

An OobsGroup.

 

user

An OobsUser to add to the group.

 

oobs_group_remove_user ()

void
oobs_group_remove_user (OobsGroup *group,
                        OobsUser *user);

Removes an user from the group. If the user isn't a member of this group, this function does nothing.

Parameters

group

An OobsGroup.

 

user

An OobsUser to remove from the group.

 

oobs_group_is_root ()

gboolean
oobs_group_is_root (OobsGroup *group);

Checks whether a group is the root group, according to its name.

Parameters

group

An OobsGroup.

 

Returns

TRUE if group is the root group, FALSE otherwise.

Types and Values

Property Details

The “gid” property

  “gid”                      guint

Main group GID for the group.

Flags: Read / Write

Allowed values: <= G_MAXINT

Default value: 2147483647


The “name” property

  “name”                     gchar *

Name for the group.

Flags: Read / Write / Construct Only

Default value: NULL


The “password” property

  “password”                 gchar *

Password for the group.

Flags: Read / Write

Default value: NULL

See Also

OobsGroupsConfig