RD_ListCuts
7
October 2015
Rivendell C Library Manual
rd_listcuts
Rivendell List Cuts C Library Function
Todd
Baker
bakert@rfa.org
Rivendell C Library Author
#include <rivwebcapi/rd_listcuts.h>
int RD_ListCuts
struct rd_cut * cuts[]
const char hostname[]
const char username[]
const char passwd[]
const char ticket[]
const unsigned cartnumber
const unsigned cutnumber
const char user_agent[]
unsigned * numrecs
Description
RD_ListCuts is the function to use
to list the cuts that exist in a Rivendell Database Cart entry.
This function lists the fields in the pre-existing cut(s).
RD_ListCuts function call fields
FIELD NAME
FIELD TYPE
MEANING
REMARKS
*cuts
Pointer to rd_cut structure
Memory location to store cut 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_cut structure which
is stored in the provided memory locations. The rd_cut structure has the following fields:
struct rd_cut {
char cut_name[11];
unsigned cut_cart_number;
unsigned cut_cut_number;
int cut_evergreen;
char cut_description[257];
char cut_outcue[257];
char cut_isrc[49];
char cut_isci[129];
unsigned cut_length;
struct tm cut_origin_datetime;
struct tm cut_start_datetime;
struct tm cut_end_datetime;
int cut_sun;
int cut_mon;
int cut_tue;
int cut_wed;
int cut_thu;
int cut_fri;
int cut_sat;
char cut_start_daypart[14];
char cut_end_daypart[14];
char cut_origin_name[257];
char cut_origin_login_name[1021];
char cut_source_hostname[1021];
unsigned cut_weight;
struct tm cut_last_play_datetime;
unsigned cut_play_counter;
unsigned cut_local_counter;
unsigned cut_validity;
unsigned cut_coding_format;
unsigned cut_sample_rate;
unsigned cut_bit_rate;
unsigned cut_channels;
int cut_play_gain;
int cut_start_point;
int cut_end_point;
int cut_fadeup_point;
int cut_fadedown_point;
int cut_segue_start_point;
int cut_segue_end_point;
int cut_segue_gain;
int cut_hook_start_point;
int cut_hook_end_point;
int cut_talk_start_point;
int cut_talk_end_point;
};
All character arrays above are the sizes listed and must be null-terminated.
Charater encoding is UTF-8.
RETURN VALUE
On success, zero is returned. Using the provided parameters an rd_cut
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/Cut Number.
403 User Authentification Error.
404 No Such Cart Exists.
nnn Unknown Error Occurred.