RD_ListLogs 7 October 2015 Rivendell C Library Manual rd_listlogs Rivendell List Logs C Library Function Todd Baker bakert@rfa.org Rivendell C Library Author #include <rivwebcapi/rd_listlogs.h> int RD_ListLogs struct rd_logline * logline[] const char hostname[] const char username[] const char passwd[] const char ticket[] const char logname[] const char servicename[] const int trackable const char filter[] const int recent const char user_agent[] unsigned * numrecs Description RD_ListLogs is the function to use to list the log files that are stored within the Rivendell Database. This function lists the names of the Log Files in the system. RD_ListLogs function call fields FIELD NAME FIELD TYPE MEANING REMARKS *logline[] Pointer to rd_logline structure Memory location to store logline 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. servicename character array Service Name Optional logname character array Log Name Optional trackable integer Limit returns to logs that contain voicetrack(s). 0=No, 1=Yes (Default). Optional filter Character Array Limit returns to logs that contain the specified string in their Name, Description or Service fields. Optional recent integer Return only the 14 most recently modified logs. 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_log structure which is stored in the provided memory locations. The rd_log structure has the following fields: struct rd_log { char log_name[41]; char log_service[41]; char log_description[257]; char log_origin_username[1021]; struct tm log_origin_datetime; struct tm log_purge_date; struct tm log_link_datetime; struct tm log_modified_datetime; int log_autorefresh; char log_startdate[30]; char log_enddate[30]; int log_scheduled_tracks; int log_completed_tracks; int log_music_links; int log_music_linked; int log_traffic_links; int log_traffic_linked; }; 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_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.