mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-14 16:49:17 +02:00
301 lines
8.7 KiB
XML
301 lines
8.7 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<refentry id="stdin" xmlns="http://docbook.org/ns/docbook" version="5.0">
|
|
<!--
|
|
Header
|
|
-->
|
|
<refmeta>
|
|
<refentrytitle>RD_ListCartsCuts</refentrytitle>
|
|
<manvolnum>7</manvolnum>
|
|
<refmiscinfo class='source'>October 2018</refmiscinfo>
|
|
<refmiscinfo class='manual'>Rivendell C Library Manual</refmiscinfo>
|
|
</refmeta>
|
|
<refnamediv>
|
|
<refname>rd_listcartscuts</refname>
|
|
<refpurpose>Rivendell List Cart/Cuts C Library Function</refpurpose>
|
|
</refnamediv>
|
|
<info>
|
|
<author>
|
|
<personname>
|
|
<firstname>Todd</firstname>
|
|
<surname>Baker</surname>
|
|
<email>bakert@rfa.org</email>
|
|
</personname>
|
|
<contrib>Rivendell C Library Author</contrib>
|
|
</author>
|
|
</info>
|
|
|
|
<!--
|
|
Body
|
|
-->
|
|
<refsynopsisdiv id='synopsis'>
|
|
<funcsynopsis>
|
|
<funcsynopsisinfo>#include <rivwebcapi/rd_listcartscuts.h></funcsynopsisinfo>
|
|
<funcprototype>
|
|
<funcdef>int <function>RD_ListCartsCuts</function></funcdef>
|
|
<paramdef> struct rd_cart * <parameter>cart[]</parameter></paramdef>
|
|
<paramdef>const char <parameter>hostname[]</parameter></paramdef>
|
|
<paramdef>const char <parameter>username[]</parameter></paramdef>
|
|
<paramdef>const char <parameter>passwd[]</parameter></paramdef>
|
|
<paramdef>const char <parameter>ticket[]</parameter></paramdef>
|
|
<paramdef>const char <parameter>group_name[]</parameter></paramdef>
|
|
<paramdef>const char <parameter>filter[]</parameter></paramdef>
|
|
<paramdef>const char <parameter>type[]</parameter></paramdef>
|
|
<paramdef>const char <parameter>user_agent[]</parameter></paramdef>
|
|
<paramdef>unsigned * <parameter>numrecs</parameter></paramdef>
|
|
</funcprototype>
|
|
|
|
<funcprototype>
|
|
<funcdef>struct rd_cut *<function>RD_ListCartsCuts_GetCut</function></funcdef>
|
|
<paramdef> struct rd_cart <parameter>carts[]</parameter></paramdef>
|
|
<paramdef>int <parameter>cart_rec</parameter></paramdef>
|
|
<paramdef>int <parameter>cut_rec</parameter></paramdef>
|
|
</funcprototype>
|
|
|
|
<funcprototype>
|
|
<funcdef>void <function>RD_ListCartsCuts_Free</function></funcdef>
|
|
<paramdef> struct rd_cart <parameter>carts[]</parameter></paramdef>
|
|
<paramdef> unsigned <parameter>numrecs</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
<refsect1 id='description'><title>Description</title>
|
|
<para>
|
|
This function lists the fields in one or more pre-existing cart(s).
|
|
The user can also filter the records by group name, cart type, and/or a
|
|
user provided search string.
|
|
Unlike <command>RD_ListCarts</command><manvolnum>7</manvolnum>,
|
|
<command>RD_ListCartsCuts</command><manvolnum>7</manvolnum> will
|
|
also fetch the full list of cuts associated with each cart.
|
|
</para>
|
|
<table xml:id="ex.listcartscuts" frame="all">
|
|
<title>RD_ListCartsCuts function call fields</title>
|
|
<tgroup cols="4" align="left" colsep="1" rowsep="1">
|
|
<colspec colname="FIELD NAME" />
|
|
<colspec colname="FIELD TYPE" />
|
|
<colspec colname="MEANING" />
|
|
<colspec colname="REMARKS" />
|
|
<thead>
|
|
<row>
|
|
<entry>
|
|
FIELD NAME
|
|
</entry>
|
|
<entry>
|
|
FIELD TYPE
|
|
</entry>
|
|
<entry>
|
|
MEANING
|
|
</entry>
|
|
<entry>
|
|
REMARKS
|
|
</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>
|
|
*cart
|
|
</entry>
|
|
<entry>
|
|
Pointer to rd_cart structure
|
|
</entry>
|
|
<entry>
|
|
Memory location to store cart information
|
|
</entry>
|
|
<entry>
|
|
Mandatory
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
hostname
|
|
</entry>
|
|
<entry>
|
|
Character Array
|
|
</entry>
|
|
<entry>
|
|
Name Of Rivendell DB Host
|
|
</entry>
|
|
<entry>
|
|
Mandatory
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
username
|
|
</entry>
|
|
<entry>
|
|
Character Array
|
|
</entry>
|
|
<entry>
|
|
Rivendell User Name
|
|
</entry>
|
|
<entry>
|
|
Mandatory When NO Ticket Provided
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
passwd
|
|
</entry>
|
|
<entry>
|
|
Character Array
|
|
</entry>
|
|
<entry>
|
|
Rivendell User Password
|
|
</entry>
|
|
<entry>
|
|
Mandatory When NO Ticket Provided
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
ticket
|
|
</entry>
|
|
<entry>
|
|
Character Array
|
|
</entry>
|
|
<entry>
|
|
Rivendell Authentification Ticket
|
|
</entry>
|
|
<entry>
|
|
Mandatory When NO User/Password Pair Provided.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
group_name
|
|
</entry>
|
|
<entry>
|
|
character array
|
|
</entry>
|
|
<entry>
|
|
Group Name
|
|
</entry>
|
|
<entry>
|
|
Optional
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
filter
|
|
</entry>
|
|
<entry>
|
|
character array
|
|
</entry>
|
|
<entry>
|
|
Filter - searches for specific strings within the following fields: Title, Artist, Client, Agency, Album, Label, Publisher, Composer, Conductor, Song_Id, User_Defined, and Cart Number.
|
|
</entry>
|
|
<entry>
|
|
Optional
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
type
|
|
</entry>
|
|
<entry>
|
|
character array
|
|
</entry>
|
|
<entry>
|
|
Type of Cart records. If set can be Audio, or Macro.
|
|
</entry>
|
|
<entry>
|
|
Optional
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
user_agent
|
|
</entry>
|
|
<entry>
|
|
Character Array
|
|
</entry>
|
|
<entry>
|
|
User Agent Value put into HTTP request
|
|
</entry>
|
|
<entry>
|
|
Optional (default is Rivendell-C-API/x.x.x)
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
*numrecs
|
|
</entry>
|
|
<entry>
|
|
pointer to integer
|
|
</entry>
|
|
<entry>
|
|
memory location for number of records returned
|
|
</entry>
|
|
<entry>
|
|
Mandatory
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
|
|
<para>
|
|
When successful the function will return the number of records sent
|
|
(numrecs) and a rd_cart structure which
|
|
is stored in the provided memory locations. (See the
|
|
<command>rd_listcartcuts</command><manvolnum>7</manvolnum> man page
|
|
for a listing of the rd_cart structure).
|
|
</para>
|
|
|
|
<refsect2 id='access_cut_information'><title>Accessing Cut Information</title>
|
|
<para>
|
|
Information about the cuts associated with each cart can be accessed
|
|
from the returned rd_cart structure through use of the
|
|
<command>RD_ListCartsCuts_GetCut()</command> function.
|
|
The <parameter>cart_rec</parameter> parameter should range between
|
|
<userinput>0</userinput> and one less than the value returned in the
|
|
<parameter>numrecs</parameter> argument to
|
|
<command>RD_ListCartsCuts</command>, while
|
|
the <parameter>cut_rec</parameter> parameter should range between
|
|
<userinput>0</userinput> and one less than the
|
|
value of the <parameter>cart_cut_quantity</parameter> member of the
|
|
cart's rd_cart structure.
|
|
</para>
|
|
<para>
|
|
Cut information is returned in the form of a rd_cut structure. (See the
|
|
<command>rd_listcartcuts</command><manvolnum>7</manvolnum> man page
|
|
for a listing of the rd_cut structure).
|
|
</para>
|
|
</refsect2>
|
|
|
|
<refsect2 id='freeing_memory'><title>Freeing Memory</title>
|
|
<para>
|
|
When the returned rd_cart structure is no longer required, it should
|
|
freed by passing it to the <command>RD_ListCartsCuts_Free()</command>
|
|
function.
|
|
</para>
|
|
</refsect2>
|
|
</refsect1>
|
|
|
|
<refsect1 id='returns'><title>RETURN VALUE</title>
|
|
<para>
|
|
On success, zero is returned. Using the provided parameters an rd_cart
|
|
structure is returned and the number of records is returned.
|
|
</para>
|
|
<para>
|
|
If a server error occurs a -1 is returned.
|
|
If a client error occurs a specific error number is returned.
|
|
</para>
|
|
<refsect2 id='errors'><title>Errors</title>
|
|
<para>
|
|
403 User Authentification Error.
|
|
</para>
|
|
<para>
|
|
404 No Such Group Exists.
|
|
</para>
|
|
<para>
|
|
nnn Unknown Error Occurred.
|
|
</para>
|
|
</refsect2>
|
|
</refsect1>
|
|
|
|
</refentry>
|