Name

rd_addlog — Rivendell Add Log C Library Function

Synopsis

#include <rivwebcapi/rd_addlog.h>
int RD_AddLog(hostname[],  
 username[],  
 passwd[],  
 ticket[],  
 log_name[],  
 svc_name[],  
 user_agent[]); 
const char hostname[];
const char username[];
const char passwd[];
const char ticket[];
const char log_name[];
const char svc_name[];
const char user_agent[];
 

Description

RD_AddLog is the function to use to add a log to an existing Rivendell Database.

This function adds the specified log to the Rivendell database on hostname. Default values are used when the log is created.

Table 1. RD_AddLog function call fields

FIELD NAME FIELD TYPE MEANING REMARKS
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.
log_name Character Array Name to assign to new log Mandatory
svc_name Character Array Name of the Rivendell Service to own the new log Mandatory
user_agent Character Array User Agent Value put into HTTP request Optional (default is Rivendell-C-API/x.x.x)

RETURN VALUE

On success, zero is returned.

If a server error occurs a -1 is returned. If a client error occurs a specific error number is returned.

ERRORS

400 Invalid/Missing Parameter for LOG_NAME or SVC_NAME.

403 User Authentification Error.

404 User Permission Error or Invalid Service.

500 Unable to Create Log.

nnn Unknown Error Occurred.