rd_listgroups — Rivendell List Groups C Library Function
#include <rivwebcapi/rd_listgroups.h>
int RD_ListGroups( | group[], | |
| hostname[], | ||
| username[], | ||
| passwd[], | ||
| ticket[], | ||
| groupname[], | ||
| user_agent[], | ||
numrecs); |
struct rd_group * group[];const char hostname[];const char username[];const char passwd[];const char ticket[];const char groupname[];const char user_agent[];unsigned * numrecs;RD_ListGroups is the function to use to list the fields that are stored for a user's groups within the Rivendell Database.
This function lists the fields in all pre-existing Groups for the Requesting User. Lists the group fields for each group that the User has permission to see.
Table 1. RD_ListGroups function call fields
| FIELD NAME | FIELD TYPE | MEANING | REMARKS |
|---|---|---|---|
| *group | Pointer to rd_group structure | Memory location to store group information | Mandatory |
| hostname | Character Array | Name Of Rivendell DB Host | Mandatory |
| username | Character Array | Rivendell User Name | Mandatory When NO Ticket Provided |
| passwd | Character Array | Rivendell User Password | Mandatory When NO Ticket Provided |
| ticket | Character Array | Rivendell Authentification Ticket | Mandatory When NO User/Password Pair Provided. |
| user_agent | Character Array | User Agent Value put into HTTP request | Optional (default is Rivendell-C-API/x.x.x) |
| *numrecs | pointer to integer | memory location for number of records returned | Mandatory |
When successful function will return the number of records sent (numrecs) and rd_group structure(s) which is stored in the provided memory locations. The rd_group structure has the following fields:
struct rd_group {
char grp_name[41]; /* Group Name */
char grp_desc[1021]; /* Description */
unsigned grp_default_cart_type; /* Default cart type */
unsigned grp_lo_limit; /* Group starting Cart Number */
unsigned grp_hi_limit; /* Group Ending Cart Number */
int grp_shelf_life;
char grp_default_title[1021];
int grp_enforce_range;
int grp_report_tfc;
int grp_report_mus;
int grp_now_next;
char grp_color[8];
char grp_reserved[457];
};
All character arrays above are the sizes listed and must be null-terminated.
Character encoding is UTF-8.
The cart number is a unsigned integer.
The Default cart_type is 1=Audio,2=Macro.