liblightify
groups.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int lightify_group_new (struct lightify_ctx *ctx, struct lightify_group **newgroup)
 
int lightify_group_set_name (struct lightify_group *grp, const unsigned char *name)
 
int lightify_group_set_id (struct lightify_group *grp, int id)
 
int lightify_group_remove (struct lightify_group *grp)
 

Function Documentation

int lightify_group_new ( struct lightify_ctx ctx,
struct lightify_group **  newgroup 
)

Generate a new group object

Parameters
ctxLibrary context
newgroupwhere to store new pointer of new group
Returns
negative on error. >=0 is success.

Definition at line 60 of file groups.c.

int lightify_group_remove ( struct lightify_group grp)

Remove group from linked list and free memory associated.

Parameters
grpto operate on
Returns
negative on error. >=0 is success.

Definition at line 84 of file groups.c.

int lightify_group_set_id ( struct lightify_group grp,
int  id 
)

Set Group's ID

Parameters
grpto operate on
idto set
Returns
negative on error. >=0 is success.

Definition at line 122 of file groups.c.

int lightify_group_set_name ( struct lightify_group grp,
const unsigned char *  name 
)

Set Group's name

Parameters
grpto operate on
nameto set
Returns
negative on error. >=0 is success.
Note
a maximum lenght of 16 chars is enforced.
a copy of the name is allocated and stored.

Definition at line 104 of file groups.c.