RD_ListCartSchedCodes
7
October 2015
Rivendell C Library Manual
rd_listcartschedcodes
Rivendell List Cart Scheduler Codes C Library Function
Todd
Baker
bakert@rfa.org
Rivendell C Library Author
#include <rivwebcapi/rd_listcartschedcodes.h>
int RD_ListCartSchedCodes
struct rd_schedcodes * cart[]
const char hostname[]
const char username[]
const char passwd[]
const char ticket[]
const unsigned cartnumber
const char user_agent[]
unsigned * numrecs
Description
RD_ListCartSchedCodes is the function to use
to list the Scheduler Codes that are currently assigned to a cart in the Rivendell Database.
This function lists the scheduler codes in a pre-existing cart.
RD_ListCartSchedCodes function call fields
FIELD NAME
FIELD TYPE
MEANING
REMARKS
*schedcodes
Pointer to rd_schedcodes structure
Memory location to store scheduler code 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.
cartnumber
unsigned integer
Cart Number
Mandatory
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_schedcodes structure which
is stored in the provided memory locations. The rd_schedcodes structure has the following fields:
struct rd_schedcodes {
char code[11];
char description[255];
};
All character arrays above are the sizes listed and must be null-terminated.
Character encoding is UTF-8.
RETURN VALUE
On success, zero is returned. Using the provided parameters an rd_schedcodes
structure is returned and the number of records is returned.
If a server error occurs a -1 is returned.
If a client error occurs a specific error number is returned.
ERRORS
400 Missing Cart Number.
403 User Authentification Error.
404 No Such Cart Exists or Unauthorized.
nnn Unknown Error Occurred.