OobsGroup

OobsGroup — Object that represents an individual group.

Synopsis




                    OobsGroup;
OobsGroup*          oobs_group_new                      (const gchar *name);
const gchar*        oobs_group_get_name                 (OobsGroup *group);
void                oobs_group_set_name                 (OobsGroup *group,
                                                         const gchar *name);
void                oobs_group_set_password             (OobsGroup *group,
                                                         const gchar *password);
void                oobs_group_set_crypted_password     (OobsGroup *group,
                                                         const gchar *crypted_password);
gid_t               oobs_group_get_gid                  (OobsGroup *group);
void                oobs_group_set_gid                  (OobsGroup *group,
                                                         gid_t gid);
GList*              oobs_group_get_users                (OobsGroup *group);
void                oobs_group_add_user                 (OobsGroup *group,
                                                         OobsUser *user);
void                oobs_group_remove_user              (OobsGroup *group,
                                                         OobsUser *user);

Object Hierarchy


  GObject
   +----OobsGroup

Properties


  "crypted-password"         gchararray            : Read / Write
  "gid"                      gint                  : Read / Write
  "name"                     gchararray            : Read / Write
  "password"                 gchararray            : Write

Description

Details

OobsGroup

typedef struct _OobsGroup OobsGroup;


oobs_group_new ()

OobsGroup*          oobs_group_new                      (const gchar *name);

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

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 OobsGroup.

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_name ()

void                oobs_group_set_name                 (OobsGroup *group,
                                                         const gchar *name);

Sets the name of group to be name, overwriting the previous one.

group : An OobsGroup.
name : A new name for group.

oobs_group_set_password ()

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

Sets the group password for the group defined by OobsGroup, overwriting the previous one.

group : An OobsGroup.
password : A new password for group.

oobs_group_set_crypted_password ()

void                oobs_group_set_crypted_password     (OobsGroup *group,
                                                         const gchar *crypted_password);

Sets an already crypted password for the group defined by OobsGroup, overwriting the previous one.

group : An OobsGroup.
crypted_password : a new crypted password for group.

oobs_group_get_gid ()

gid_t               oobs_group_get_gid                  (OobsGroup *group);

Returns the group ID (GID) associated to OobsGroup

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.

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.

group : An OobsGroup.
Returns : a newly allocated GList, use g_list_free() to free it.

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.

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.

group : An OobsGroup.
user : An OobsUser to remove from the group.

Property Details

The "crypted-password" property

  "crypted-password"         gchararray            : Read / Write

Crypted password for the group.

Default value: NULL


The "gid" property

  "gid"                      gint                  : Read / Write

Main group GID for the group.

Allowed values: [0,65534]

Default value: 65534


The "name" property

  "name"                     gchararray            : Read / Write

Name for the group.

Default value: NULL


The "password" property

  "password"                 gchararray            : Write

Password for the group.

Default value: NULL