RD_ListServices
7
October 2015
Rivendell C Library Manual
rd_listservices
Rivendell List Services C Library Function
Todd
Baker
bakert@rfa.org
Rivendell C Library Author
#include <rivwebcapi/rd_listservices.h>
int RD_ListServices
struct rd_logline * logline[]
const char hostname[]
const char username[]
const char passwd[]
const char ticket[]
const int trackable
const char user_agent[]
unsigned * numrecs
Description
RD_ListServices is the function to use
to list services that are stored within the Rivendell Database.
This function lists the names of the Services in the system.
RD_ListServices function call fields
FIELD NAME
FIELD TYPE
MEANING
REMARKS
*services[]
Pointer to rd_service structure
Memory location to store service 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.
trackable
integer
Limit returns to services that have a valid voicetracking configuration. 0=No(Default), 1=Yes.
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 rd_service structure which
is stored in the provided memory locations. The rd_service structure has the following fields:
struct rd_service {
char service_name [41];
char service_description[1021];
};
RETURN VALUE
On success, zero is returned. Using the provided parameters an rd_log
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
403 User Authentification Error.
nnn Unknown Error Occurred.