rd_listcarts — Rivendell List Carts C Library Function
#include <rivwebcapi/rd_listcarts.h>
int RD_ListCarts( | cart[], | |
| hostname[], | ||
| username[], | ||
| passwd[], | ||
| ticket[], | ||
| group_name[], | ||
| filter[], | ||
| type[], | ||
| user_agent[], | ||
numrecs); |
struct rd_cart * cart[];const char hostname[];const char username[];const char passwd[];const char ticket[];const char group_name[];const char filter[];const char type[];const char user_agent[];unsigned * numrecs;RD_ListCarts is the function to use to list the carts that already exists in the Rivendell Database.
This function lists the fields in a pre-existing cart. The user can also filter the records by group name, cart type, and/or a user provided search string.
Table 1. RD_ListCarts function call fields
| FIELD NAME | FIELD TYPE | MEANING | REMARKS |
|---|---|---|---|
| *cart | Pointer to rd_cart structure | Memory location to store cart 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. |
| group_name | character array | Group Name | Optional |
| filter | character array | Filter - searches for specific strings within the following fields: Title, Artist, Client, Agency, Album, Label, Publisher, Composer, Conductor, Song_Id, User_Defined, and Cart Number. | Optional |
| type | character array | Type of Cart records. If set can be Audio, or Macro. | Optional |
| 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 a rd_cart structure which is stored in the provided memory locations. (See the rd_listcartcuts(7) man page for a listing of the rd_cart structure).