]> git.stg.codes - stg.git/commitdiff
-doc suffix removed from XML-RPC API documentation
authorMaxim Mamontov <faust@gts.dp.ua>
Wed, 20 Apr 2011 08:18:48 +0000 (11:18 +0300)
committerMaxim Mamontov <faust@gts.dp.ua>
Wed, 20 Apr 2011 08:18:48 +0000 (11:18 +0300)
14 files changed:
doc/xmlrpc-doc/API-admins.xml [deleted file]
doc/xmlrpc-doc/API-messages.xml [deleted file]
doc/xmlrpc-doc/API-system.xml [deleted file]
doc/xmlrpc-doc/API-tariffs.xml [deleted file]
doc/xmlrpc-doc/API-user.xml [deleted file]
doc/xmlrpc-doc/API.xml [deleted file]
doc/xmlrpc-doc/Makefile [deleted file]
doc/xmlrpc/API-admins.xml [new file with mode: 0644]
doc/xmlrpc/API-messages.xml [new file with mode: 0644]
doc/xmlrpc/API-system.xml [new file with mode: 0644]
doc/xmlrpc/API-tariffs.xml [new file with mode: 0644]
doc/xmlrpc/API-user.xml [new file with mode: 0644]
doc/xmlrpc/API.xml [new file with mode: 0644]
doc/xmlrpc/Makefile [new file with mode: 0644]

diff --git a/doc/xmlrpc-doc/API-admins.xml b/doc/xmlrpc-doc/API-admins.xml
deleted file mode 100644 (file)
index c8aaa9b..0000000
+++ /dev/null
@@ -1,418 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<chapter xmlns="http://docbook.org/ns/docbook">
-    <title>Управление админами</title>
-    <para>В этом разделе собраны вызовы API для управления с администраторами системы: удаление, добавление, изменение прав и т.д.</para>
-    <refentry id="stargazer.get_admin">
-        <refmeta>
-            <refentrytitle>stargazer.get_admin</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.get_admin</refname>
-            <refpurpose>Получает информацию об администраторе системы</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.get_admin</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.get_admin</function> получает информацию об администраторе системы.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин администратора</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>
-                    Возвращает структуру:
-                    <variablelist>
-                        <varlistentry>
-                            <term>boolean <parameter>result</parameter></term>
-                            <listitem>
-                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <parameter>login</parameter></term>
-                            <listitem>
-                                <para>Логин администратора</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>user_stat</parameter></term>
-                            <listitem>
-                                <para>Право на изменение статистики пользователя (включая состояние счета)</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>user_conf</parameter></term>
-                            <listitem>
-                                <para>Право на изменение конфигурации пользователя (включая пароль)</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>user_cash</parameter></term>
-                            <listitem>
-                                <para>Право на изменение состояния счета пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>user_passwd</parameter></term>
-                            <listitem>
-                                <para>Право на изменение пароля пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>user_add_del</parameter></term>
-                            <listitem>
-                                <para>Право на добавление и удаление пользователей</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>admin_chg</parameter></term>
-                            <listitem>
-                                <para>Право на управление администраторами</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>tariff_chg</parameter></term>
-                            <listitem>
-                                <para>Право на управление тарифами</para>
-                            </listitem>
-                        </varlistentry>
-                    </variablelist>
-                </para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
-                <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>,
-                <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
-                <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.get_admins">
-        <refmeta>
-            <refentrytitle>stargazer.get_admins</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.get_admins</refname>
-            <refpurpose>Получает информацию об админах</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.get_admins</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.get_admins</function> получает информацию об админах, зарегистрированных в системе.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>
-                    Возвращает массив структур:
-                    <variablelist>
-                        <varlistentry>
-                            <term>boolean <parameter>result</parameter></term>
-                            <listitem>
-                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <parameter>login</parameter></term>
-                            <listitem>
-                                <para>Логин администратора</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>user_stat</parameter></term>
-                            <listitem>
-                                <para>Право на изменение статистики пользователя (включая состояние счета)</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>user_conf</parameter></term>
-                            <listitem>
-                                <para>Право на изменение конфигурации пользователя (включая пароль)</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>user_cash</parameter></term>
-                            <listitem>
-                                <para>Право на изменение состояния счета пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>user_passwd</parameter></term>
-                            <listitem>
-                                <para>Право на изменение пароля пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>user_add_del</parameter></term>
-                            <listitem>
-                                <para>Право на добавление и удаление пользователей</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>admin_chg</parameter></term>
-                            <listitem>
-                                <para>Право на управление администраторами</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <parameter>tariff_chg</parameter></term>
-                            <listitem>
-                                <para>Право на управление тарифами</para>
-                            </listitem>
-                        </varlistentry>
-                    </variablelist>
-                </para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
-                <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>,
-                <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
-                <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.del_admin">
-        <refmeta>
-            <refentrytitle>stargazer.del_admin</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.del_admin</refname>
-            <refpurpose>Удаляет администратора из системы</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.del_admin</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.del_admin</function> удаляет администратора из системы.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин удаляемого администратора</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
-                <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
-                <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>,
-                <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.add_admin">
-        <refmeta>
-            <refentrytitle>stargazer.add_admin</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.add_admin</refname>
-            <refpurpose>Добавляет администратора в систему</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.add_admin</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.add_admin</function> добавляет администратора в систему.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин добавляемого администратора</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
-                <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
-                <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
-                <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.chg_admin">
-        <refmeta>
-            <refentrytitle>stargazer.chg_admin</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.chg_admin</refname>
-            <refpurpose>Изменяет права и/или пароль администратора</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.chg_admin</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                    <paramdef>struct <parameter>info</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.chg_admin</function> изменяет права и/или пароль администратора системы. Допустимо частичное указание параметров в структуре info. В этом случае изменение затронет только указанные параметры. Дополнительные поля структуры (не входящие в описание) будут проигнорированы.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин изменяемого администратора</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>struct <parameter>info</parameter></term>
-                    <listitem>
-                        <para>
-                            Структура с информацией об админе:
-                            <variablelist>
-                                <varlistentry>
-                                    <term>string <parameter>login</parameter></term>
-                                    <listitem>
-                                        <para>Логин администратора</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <parameter>user_stat</parameter></term>
-                                    <listitem>
-                                        <para>Право на изменение статистики пользователя (включая состояние счета)</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <parameter>user_conf</parameter></term>
-                                    <listitem>
-                                        <para>Право на изменение конфигурации пользователя (включая пароль)</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <parameter>user_cash</parameter></term>
-                                    <listitem>
-                                        <para>Право на изменение состояния счета пользователя</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <parameter>user_passwd</parameter></term>
-                                    <listitem>
-                                        <para>Право на изменение пароля пользователя</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <parameter>user_add_del</parameter></term>
-                                    <listitem>
-                                        <para>Право на добавление и удаление пользователей</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <parameter>admin_chg</parameter></term>
-                                    <listitem>
-                                        <para>Право на управление администраторами</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <parameter>tariff_chg</parameter></term>
-                                    <listitem>
-                                        <para>Право на управление тарифами</para>
-                                    </listitem>
-                                </varlistentry>
-                            </variablelist>
-                        </para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
-                <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
-                <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
-                <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-</chapter>
diff --git a/doc/xmlrpc-doc/API-messages.xml b/doc/xmlrpc-doc/API-messages.xml
deleted file mode 100644 (file)
index e7b48bc..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<chapter xmlns="http://docbook.org/ns/docbook">
-    <title>Управление сообщениями пользователю</title>
-    <para>В этом разделе собраны вызовы API для отправки сообщений пользователям.</para>
-    <refentry id="stargazer.send_user_message">
-        <refmeta>
-            <refentrytitle>stargazer.send_user_message</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.send_user_message</refname>
-            <refpurpose>Отправляет сообщение пользователям</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.send_user_message</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>array of strings <parameter>logins</parameter></paramdef>
-                    <paramdef>struct <parameter>info</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.send_user_message</function> отправляет сообщение пользователям, логины которых перечислены в списке.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>array of strings <parameter>logins</parameter></term>
-                    <listitem>
-                        <para>Список логинов пользователей</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>struct <parameter>info</parameter></term>
-                    <listitem>
-                        <para>
-                            Структура с параметрами сообщения:
-                            <variablelist>
-                                <varlistentry>
-                                    <term>int <parameter>version</parameter></term>
-                                    <listitem>
-                                        <para>Версия системы сообщений (не обязательный параметр, по умолчанию - 1)</para>
-                                    </listitem>
-                                </varlistentry>
-                            </variablelist>
-                            <variablelist>
-                                <varlistentry>
-                                    <term>int <parameter>type</parameter></term>
-                                    <listitem>
-                                        <para>Тип сообщения (не обязательный параметр, по умолчанию - 1)</para>
-                                    </listitem>
-                                </varlistentry>
-                            </variablelist>
-                            <variablelist>
-                                <varlistentry>
-                                    <term>int <parameter>repeat</parameter></term>
-                                    <listitem>
-                                        <para>Количество показов сообщеня</para>
-                                    </listitem>
-                                </varlistentry>
-                            </variablelist>
-                            <variablelist>
-                                <varlistentry>
-                                    <term>int <parameter>repeat_period</parameter></term>
-                                    <listitem>
-                                        <para>Период повторения показа сообщений (в минутах)</para>
-                                    </listitem>
-                                </varlistentry>
-                            </variablelist>
-                            <variablelist>
-                                <varlistentry>
-                                    <term>int <parameter>show_time</parameter></term>
-                                    <listitem>
-                                        <para>Время отображения сообщения (в секундах)</para>
-                                    </listitem>
-                                </varlistentry>
-                            </variablelist>
-                            <variablelist>
-                                <varlistentry>
-                                    <term>string <parameter>text</parameter></term>
-                                    <listitem>
-                                        <para>Текст сообщения в кодировке UTF-8</para>
-                                    </listitem>
-                                </varlistentry>
-                            </variablelist>
-                        </para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-    </refentry>
-</chapter>
diff --git a/doc/xmlrpc-doc/API-system.xml b/doc/xmlrpc-doc/API-system.xml
deleted file mode 100644 (file)
index 2752917..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<chapter xmlns="http://docbook.org/ns/docbook">
-    <title>Авторизация в системе</title>
-    <para>В этом разделе собраны функции, не относящиеся к манипулированию сущностями системы. А именно: отвечающие за авторизацию в системе, получение информации о системе и т.д.</para>
-    <refentry id="stargazer.login">
-        <refmeta>
-            <refentrytitle>stargazer.login</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.login</refname>
-            <refpurpose>Авторизация администратора в системе</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.login</function></funcdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                    <paramdef>string <parameter>password</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.login</function> авторизует администратора в системе. Если логин и пароль корректные - создается cookie и открывается сессия. В дальнейшем все вызовы API получают этот cookie. Если указаный администратор в системе не найден или его пароль не совпадает - сессия не открывается и cookie не создается.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин администратора</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>password</parameter></term>
-                    <listitem>
-                        <para>Пароль администратора</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>
-                    Возвращает структуру:
-                    <variablelist>
-                        <varlistentry>
-                            <term>bool <structfield>result</structfield></term>
-                            <listitem>
-                                <para>Результат операции. true - авторизация прошла успешно, false - авторизация завершилась неудачей.</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>cookie</structfield></term>
-                            <listitem>
-                                <para>Авторизационный cookie. В случе успешной авторизации представляет собой строку из 64 символов, передаваемую во все вызовы API. В случае неудачи - пустая строка.</para>
-                            </listitem>
-                        </varlistentry>
-                    </variablelist>
-                </para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para><link linkend="stargazer.logout">stargazer.logout</link></para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.logout">
-        <refmeta>
-            <refentrytitle>stargazer.logout</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.logout</refname>
-            <refpurpose>Завершение сессии администратора в системе</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.logout</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.logout</function> завершает сеанс работы авторизатора в системе.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает true в случае успеха и false в случае неудачи.</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para><link linkend="stargazer.login">stargazer.login</link></para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.info">
-        <refmeta>
-            <refentrytitle>stargazer.info</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.info</refname>
-            <refpurpose>Информация о сервере</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.info</function></funcdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.info</function> возвращает информацию о сервере Stargazer. Не требует авторизации.</para>
-            <refsect2>
-                <title>Return Value</title>
-                <para>
-                    Возвращает структуру:
-                    <variablelist>
-                        <varlistentry>
-                            <term>string <structfield>version</structfield></term>
-                            <listitem>
-                                <para>Версия Stargazer</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <structfield>tariff_num</structfield></term>
-                            <listitem>
-                                <para>Количество тарифов в системе</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <structfield>tariff</structfield></term>
-                            <listitem>
-                                <para>Версия тарифов (обычно 2)</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <structfield>users_num</structfield></term>
-                            <listitem>
-                                <para>Количество зарегистрированных пользователей в системе</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>uname</structfield></term>
-                            <listitem>
-                                <para>Строка uname</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <structfield>dir_num</structfield></term>
-                            <listitem>
-                                <para>Количество тарифицируемых направлений</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <structfield>day_fee</structfield></term>
-                            <listitem>
-                                <para>День снятия абонплаты</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>array of strings <structfield>dir_names</structfield></term>
-                            <listitem>
-                                <para>Названия направлений</para>
-                            </listitem>
-                        </varlistentry>
-                    </variablelist>
-                </para>
-            </refsect2>
-        </refsect1>
-    </refentry>
-</chapter>
-
diff --git a/doc/xmlrpc-doc/API-tariffs.xml b/doc/xmlrpc-doc/API-tariffs.xml
deleted file mode 100644 (file)
index d36b01d..0000000
+++ /dev/null
@@ -1,639 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<chapter xmlns="http://docbook.org/ns/docbook">
-    <title>Управление тарифами</title>
-    <para>В этом разделе собраны вызовы для манипулирования тарифными планами. Тарифный план включает в себя:</para>
-    <itemizedlist>
-        <listitem><para>название;</para></listitem>
-        <listitem><para>абонплата;</para></listitem>
-        <listitem><para>количество бесплатных мегабайт, включенных в абонплату;</para></listitem>
-        <listitem><para>стоимость "заморозки" пользователя;</para></listitem>
-        <listitem>
-            <para>тип подсчета трафика:</para>
-            <itemizedlist>
-                <listitem><para>только входящий,</para></listitem>
-                <listitem><para>только исходящий,</para></listitem>
-                <listitem><para>входящий и исходящий суммарно,</para></listitem>
-                <listitem><para>максимум из входящего и исходящего</para></listitem>
-            </itemizedlist>
-        </listitem>
-        <listitem>
-            <para>информацию о тарификации направлений:</para>
-            <itemizedlist>
-                <listitem><para>время начала дня;</para></listitem>
-                <listitem><para>конца дня;</para></listitem>
-                <listitem><para>цена за мегабайт трафика до порога днем;</para></listitem>
-                <listitem><para>цена за мегабайт трафика после порога днем;</para></listitem>
-                <listitem><para>цена за мегабайт трафика до порога ночью;</para></listitem>
-                <listitem><para>цена за мегабайт трафика после порога ночью;</para></listitem>
-                <listitem><para>пороговый объем трафика в мегабайтах;</para></listitem>
-                <listitem><para>флаг игнорирования времени суток;</para></listitem>
-                <listitem><para>флаг игнорирования порога.</para></listitem>
-            </itemizedlist>
-        </listitem>
-    </itemizedlist>
-    <refentry id="stargazer.get_tariff">
-        <refmeta>
-            <refentrytitle>stargazer.get_tariff</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.get_tariff</refname>
-            <refpurpose>Получает информацию о тарифном плане</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.get_tariff</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>tariff</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.get_tariff</function> получает информацию о тарифном плане.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>tariff</parameter></term>
-                    <listitem>
-                        <para>Название тарифа</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>
-                    Возвращает структуру:
-                    <variablelist>
-                        <varlistentry>
-                            <term>boolean <parameter>result</parameter></term>
-                            <listitem>
-                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <parameter>name</parameter></term>
-                            <listitem>
-                                <para>Название тарифа</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <parameter>fee</parameter></term>
-                            <listitem>
-                                <para>Абонплата</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <parameter>freemb</parameter></term>
-                            <listitem>
-                                <para>Количество бесплатных мегабайт включенных в абонплату</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <parameter>passivecost</parameter></term>
-                            <listitem>
-                                <para>Стоимость "заморозки" пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <parameter>trafftype</parameter></term>
-                            <listitem>
-                                <para>Тип подсчета трафика:
-                                    <simplelist type="vert">
-                                        <member>0 &#151; подсчитывать только исходящий трафик</member>
-                                        <member>1 &#151; подсчитывать только входящий трафик</member>
-                                        <member>2 &#151; подсчитывать суммарно входящий и исходящий трафик</member>
-                                        <member>3 &#151; подсчитывать максимальный из входящего и исходящего трафика</member>
-                                    </simplelist>
-                                </para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>array of struct <parameter>dirprices</parameter></term>
-                            <listitem>
-                                <para>Массив стурктур, описывающих тарификацию направлений:
-                                    <variablelist>
-                                        <varlistentry>
-                                            <term>int <parameter>hday</parameter></term>
-                                            <listitem>
-                                                <para>Часы начала дня</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>int <parameter>mday</parameter></term>
-                                            <listitem>
-                                                <para>Минуты начала дня</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>int <parameter>hnight</parameter></term>
-                                            <listitem>
-                                                <para>Часы начала ночи</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>int <parameter>mnight</parameter></term>
-                                            <listitem>
-                                                <para>Минуты начала ночи</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>double <parameter>pricedaya</parameter></term>
-                                            <listitem>
-                                                <para>Цена 1 мегабайта трафика днем до превышения порогового значения</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>double <parameter>pricedayb</parameter></term>
-                                            <listitem>
-                                                <para>Цена 1 мегабайта трафика днем после превышения порогового значения</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>double <parameter>pricenighta</parameter></term>
-                                            <listitem>
-                                                <para>Цена 1 мегабайта трафика ночью до превышения порогового значения</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>double <parameter>pricenightb</parameter></term>
-                                            <listitem>
-                                                <para>Цена 1 мегабайта трафика ночью после превышения порогового значения</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>int <parameter>threshold</parameter></term>
-                                            <listitem>
-                                                <para>Величина порога в мегабайтах</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>boolean <parameter>singleprice</parameter></term>
-                                            <listitem>
-                                                <para>Цена не зависит от времени суток</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>boolean <parameter>nodiscount</parameter></term>
-                                            <listitem>
-                                                <para>Цена не зависит от порога</para>
-                                            </listitem>
-                                        </varlistentry>
-                                    </variablelist>
-                                </para>
-                            </listitem>
-                        </varlistentry>
-                    </variablelist>
-                </para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
-                <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
-                <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>,
-                <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.get_tariffs">
-        <refmeta>
-            <refentrytitle>stargazer.get_tariffs</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.get_tariffs</refname>
-            <refpurpose>Получает информацию о тарифных планах</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.get_tariffs</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.get_tariffs</function> получает информацию о тарифных планах.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>
-                    Возвращает массив структур:
-                    <variablelist>
-                        <varlistentry>
-                            <term>boolean <parameter>result</parameter></term>
-                            <listitem>
-                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <parameter>name</parameter></term>
-                            <listitem>
-                                <para>Название тарифа</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <parameter>fee</parameter></term>
-                            <listitem>
-                                <para>Абонплата</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <parameter>freemb</parameter></term>
-                            <listitem>
-                                <para>Количество бесплатных мегабайт включенных в абонплату</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <parameter>passivecost</parameter></term>
-                            <listitem>
-                                <para>Стоимость "заморозки" пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <parameter>trafftype</parameter></term>
-                            <listitem>
-                                <para>Тип подсчета трафика:
-                                    <simplelist type="vert">
-                                        <member>0 &#151; подсчитывать только исходящий трафик</member>
-                                        <member>1 &#151; подсчитывать только входящий трафик</member>
-                                        <member>2 &#151; подсчитывать суммарно входящий и исходящий трафик</member>
-                                        <member>3 &#151; подсчитывать максимальный из входящего и исходящего трафика</member>
-                                    </simplelist>
-                                </para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>array of struct <parameter>dirprices</parameter></term>
-                            <listitem>
-                                <para>Массив стурктур, описывающих тарификацию направлений:
-                                    <variablelist>
-                                        <varlistentry>
-                                            <term>int <parameter>hday</parameter></term>
-                                            <listitem>
-                                                <para>Часы начала дня</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>int <parameter>mday</parameter></term>
-                                            <listitem>
-                                                <para>Минуты начала дня</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>int <parameter>hnight</parameter></term>
-                                            <listitem>
-                                                <para>Часы начала ночи</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>int <parameter>mnight</parameter></term>
-                                            <listitem>
-                                                <para>Минуты начала ночи</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>double <parameter>pricedaya</parameter></term>
-                                            <listitem>
-                                                <para>Цена 1 мегабайта трафика днем до превышения порогового значения</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>double <parameter>pricedayb</parameter></term>
-                                            <listitem>
-                                                <para>Цена 1 мегабайта трафика днем после превышения порогового значения</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>double <parameter>pricenighta</parameter></term>
-                                            <listitem>
-                                                <para>Цена 1 мегабайта трафика ночью до превышения порогового значения</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>double <parameter>pricenightb</parameter></term>
-                                            <listitem>
-                                                <para>Цена 1 мегабайта трафика ночью после превышения порогового значения</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>int <parameter>threshold</parameter></term>
-                                            <listitem>
-                                                <para>Величина порога в мегабайтах</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>boolean <parameter>singleprice</parameter></term>
-                                            <listitem>
-                                                <para>Цена не зависит от времени стуок</para>
-                                            </listitem>
-                                        </varlistentry>
-                                        <varlistentry>
-                                            <term>boolean <parameter>nodiscount</parameter></term>
-                                            <listitem>
-                                                <para>Цена не зависит от порога</para>
-                                            </listitem>
-                                        </varlistentry>
-                                    </variablelist>
-                                </para>
-                            </listitem>
-                        </varlistentry>
-                    </variablelist>
-                </para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
-                <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
-                <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>,
-                <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.add_tariff">
-        <refmeta>
-            <refentrytitle>stargazer.add_tariff</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.add_tariff</refname>
-            <refpurpose>Добавляет в систему новый тарифный план</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.add_tariff</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>tariff</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.add_tariff</function> добавляет в систему новый "пустой" тарифный план. Для его настройки используется метод <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>tariff</parameter></term>
-                    <listitem>
-                        <para>Название тарифа</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращет true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
-                <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
-                <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>,
-                <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.del_tariff">
-        <refmeta>
-            <refentrytitle>stargazer.del_tariff</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.del_tariff</refname>
-            <refpurpose>Удаляет из системы тарифный план</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.del_tariff</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>tariff</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.del_tariff</function> удаляет из системы тарифный план</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>tariff</parameter></term>
-                    <listitem>
-                        <para>Название тарифа</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращет true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
-                <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
-                <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
-                <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.chg_tariff">
-        <refmeta>
-            <refentrytitle>stargazer.chg_tariff</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.chg_tariff</refname>
-            <refpurpose>Изменяет информацию о тарифном плане</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.chg_tariff</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>tariff</parameter></paramdef>
-                    <paramdef>struct <parameter>info</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.chg_tariff</function> изменяет информацию о тарифном плане. Допустимо частичное указание параметров в структуре info. В этом случае изменение затронет только указанные параметры. Дополнительные поля структуры (не входящие в описание) будут проигнорированы.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>tariff</parameter></term>
-                    <listitem>
-                        <para>Название тарифа</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>struct <parameter>info</parameter></term>
-                    <listitem>
-                        <para>
-                            Структура с информацией о тарифном плане:
-                            <variablelist>
-                                <varlistentry>
-                                    <term>string <parameter>name</parameter></term>
-                                    <listitem>
-                                        <para>Название тарифа</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>double <parameter>fee</parameter></term>
-                                    <listitem>
-                                        <para>Абонплата</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>double <parameter>freemb</parameter></term>
-                                    <listitem>
-                                        <para>Количество свободных мегабайт, включенных в абонплату</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>double <parameter>passivecost</parameter></term>
-                                    <listitem>
-                                        <para>Стоимость заморозки пользователя</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>int <parameter>trafftype</parameter></term>
-                                    <listitem>
-                                        <para>Тип подсчета трафика:
-                                            <simplelist type="vert">
-                                                <member>0 &#151; подсчитывать только исходящий трафик</member>
-                                                <member>1 &#151; подсчитывать только входящий трафик</member>
-                                                <member>2 &#151; подсчитывать суммарно входящий и исходящий трафик</member>
-                                                <member>3 &#151; подсчитывать максимальный из входящего и исходящего трафика</member>
-                                            </simplelist>
-                                        </para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>array of struct <parameter>dirprices</parameter></term>
-                                    <listitem>
-                                        <para>Массив стурктур, описывающих тарификацию направлений:
-                                            <variablelist>
-                                                <varlistentry>
-                                                    <term>int <parameter>hday</parameter></term>
-                                                    <listitem>
-                                                        <para>Часы начала дня</para>
-                                                    </listitem>
-                                                </varlistentry>
-                                                <varlistentry>
-                                                    <term>int <parameter>mday</parameter></term>
-                                                    <listitem>
-                                                        <para>Минуты начала дня</para>
-                                                    </listitem>
-                                                </varlistentry>
-                                                <varlistentry>
-                                                    <term>int <parameter>hnight</parameter></term>
-                                                    <listitem>
-                                                        <para>Часы начала ночи</para>
-                                                    </listitem>
-                                                </varlistentry>
-                                                <varlistentry>
-                                                    <term>int <parameter>mnight</parameter></term>
-                                                    <listitem>
-                                                        <para>Минуты начала ночи</para>
-                                                    </listitem>
-                                                </varlistentry>
-                                                <varlistentry>
-                                                    <term>double <parameter>pricedaya</parameter></term>
-                                                    <listitem>
-                                                        <para>Цена 1 мегабайта трафика днем до превышения порогового значения</para>
-                                                    </listitem>
-                                                </varlistentry>
-                                                <varlistentry>
-                                                    <term>double <parameter>pricedayb</parameter></term>
-                                                    <listitem>
-                                                        <para>Цена 1 мегабайта трафика днем после превышения порогового значения</para>
-                                                    </listitem>
-                                                </varlistentry>
-                                                <varlistentry>
-                                                    <term>double <parameter>pricenighta</parameter></term>
-                                                    <listitem>
-                                                        <para>Цена 1 мегабайта трафика ночью до превышения порогового значения</para>
-                                                    </listitem>
-                                                </varlistentry>
-                                                <varlistentry>
-                                                    <term>double <parameter>pricenightb</parameter></term>
-                                                    <listitem>
-                                                        <para>Цена 1 мегабайта трафика ночью после превышения порогового значения</para>
-                                                    </listitem>
-                                                </varlistentry>
-                                                <varlistentry>
-                                                    <term>int <parameter>threshold</parameter></term>
-                                                    <listitem>
-                                                        <para>Величина порога в мегабайтах</para>
-                                                    </listitem>
-                                                </varlistentry>
-                                                <varlistentry>
-                                                    <term>boolean <parameter>singleprice</parameter></term>
-                                                    <listitem>
-                                                        <para>Цена не зависит от времени стуок</para>
-                                                    </listitem>
-                                                </varlistentry>
-                                                <varlistentry>
-                                                    <term>boolean <parameter>nodiscount</parameter></term>
-                                                    <listitem>
-                                                        <para>Цена не зависит от порога</para>
-                                                    </listitem>
-                                                </varlistentry>
-                                            </variablelist>
-                                        </para>
-                                    </listitem>
-                                </varlistentry>
-                            </variablelist>
-                        </para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращет true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
-                <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
-                <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
-                <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-</chapter>
diff --git a/doc/xmlrpc-doc/API-user.xml b/doc/xmlrpc-doc/API-user.xml
deleted file mode 100644 (file)
index fac4f2b..0000000
+++ /dev/null
@@ -1,1066 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<chapter xmlns="http://docbook.org/ns/docbook">
-    <title>Управление пользователями</title>
-    <refentry id="stargazer.get_user">
-        <refmeta>
-            <refentrytitle>stargazer.get_user</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.get_user</refname>
-            <refpurpose>Получение информации о пользователе</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.get_user</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.get_user</function> возвращает информацию о пользователе системы.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин пользователя</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>
-                    Возвращает структуру:
-                    <variablelist>
-                        <varlistentry>
-                            <term>bool <structfield>result</structfield></term>
-                            <listitem>
-                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>login</structfield></term>
-                            <listitem>
-                                <para>Логин пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>password</structfield></term>
-                            <listitem>
-                                <para>Пароль пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <structfield>cash</structfield></term>
-                            <listitem>
-                                <para>Количество денег на счету</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <structfield>freemb</structfield></term>
-                            <listitem>
-                                <para>Количество свободных мегабайт на счету</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <structfield>credit</structfield></term>
-                            <listitem>
-                                <para>Размер кредита</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <structfield>creditexpire</structfield></term>
-                            <listitem>
-                                <para>Время истечения срока кредита в формате Unix-timestamp</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>tariff</structfield></term>
-                            <listitem>
-                                <para>Текущий тариф пользователя. В случае, если заказано изменение тарифа в следующем месяце возвращаются оба тарифа, разделенные символом "/" (косая черта)</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>note</structfield></term>
-                            <listitem>
-                                <para>Примечания</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>phone</structfield></term>
-                            <listitem>
-                                <para>Контактный телефон</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>address</structfield></term>
-                            <listitem>
-                                <para>Адрес пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>email</structfield></term>
-                            <listitem>
-                                <para>E-Mail пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>array of strings <structfield>userdata</structfield></term>
-                            <listitem>
-                                <para>Набор полей UserData</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>name</structfield></term>
-                            <listitem>
-                                <para>Реальное имя пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>group</structfield></term>
-                            <listitem>
-                                <para>Группа пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <structfield>status</structfield></term>
-                            <listitem>
-                                <para>Статус пользователя. true - подключен, false - отключен</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <structfield>aonline</structfield></term>
-                            <listitem>
-                                <para>Признак "Always Online"</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <structfield>down</structfield></term>
-                            <listitem>
-                                <para>Пользователь отключен</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <structfield>passive</structfield></term>
-                            <listitem>
-                                <para>Пользователь "заморожен"</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <structfield>disableddetailstat</structfield></term>
-                            <listitem>
-                                <para>Для пользователя отключено ведение детальной статистики</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>currip</structfield></term>
-                            <listitem>
-                                <para>Текущий IP-адрес пользователя в формате A.B.C.D</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>ips</structfield></term>
-                            <listitem>
-                                <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <structfield>lastcash</structfield></term>
-                            <listitem>
-                                <para>Последнее пополнение счета</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <structfield>lasttimecash</structfield></term>
-                            <listitem>
-                                <para>Время последнего пополнения счета в формате Unix-timestamp</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <structfield>lastactivitytime</structfield></term>
-                            <listitem>
-                                <para>Время последней активности пользователя в формате Unix-timestamp</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <structfield>pingtime</structfield></term>
-                            <listitem>
-                                <para>Время последнего пинга пользователя в формате Unix-timestamp</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>struct <structfield>traff</structfield></term>
-                            <listitem>
-                                <para>Информация о трафике</para>
-                                <variablelist>
-                                    <varlistentry>
-                                        <term>array of i8 <structfield>mu</structfield></term>
-                                        <listitem>
-                                            <para>Исходяий трафик за месяц (по направлениям)</para>
-                                        </listitem>
-                                    </varlistentry>
-                                    <varlistentry>
-                                        <term>array of i8 <structfield>md</structfield></term>
-                                        <listitem>
-                                            <para>Входящий трафик за месяц (по направлениям)</para>
-                                        </listitem>
-                                    </varlistentry>
-                                    <varlistentry>
-                                        <term>array of i8 <structfield>su</structfield></term>
-                                        <listitem>
-                                            <para>Исходяий трафик за сессию (по направлениям)</para>
-                                        </listitem>
-                                    </varlistentry>
-                                    <varlistentry>
-                                        <term>array of i8 <structfield>sd</structfield></term>
-                                        <listitem>
-                                            <para>Входящий трафик за сессию (по направлениям)</para>
-                                        </listitem>
-                                    </varlistentry>
-                                </variablelist>
-                            </listitem>
-                        </varlistentry>
-                    </variablelist>
-                </para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
-                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
-                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
-                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
-                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
-                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
-                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
-                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.get_users">
-        <refmeta>
-            <refentrytitle>stargazer.get_users</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.get_users</refname>
-            <refpurpose>Получение информации о пользователях</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.get_users</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.get_users</function> возвращает информацию о пользователях системы.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>
-                    Возвращает массив структур:
-                    <variablelist>
-                        <varlistentry>
-                            <term>bool <structfield>result</structfield></term>
-                            <listitem>
-                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>login</structfield></term>
-                            <listitem>
-                                <para>Логин пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>password</structfield></term>
-                            <listitem>
-                                <para>Пароль пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <structfield>cash</structfield></term>
-                            <listitem>
-                                <para>Количество денег на счету</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <structfield>freemb</structfield></term>
-                            <listitem>
-                                <para>Количество свободных мегабайт на счету</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <structfield>credit</structfield></term>
-                            <listitem>
-                                <para>Размер кредита</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <structfield>creditexpire</structfield></term>
-                            <listitem>
-                                <para>Время истечения срока кредита в формате Unix-timestamp</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>tariff</structfield></term>
-                            <listitem>
-                                <para>Текущий тариф пользователя. В случае, если заказано изменение тарифа в следующем месяце возвращаются оба тарифа, разделенные символом "/" (косая черта)</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>note</structfield></term>
-                            <listitem>
-                                <para>Примечания</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>phone</structfield></term>
-                            <listitem>
-                                <para>Контактный телефон</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>address</structfield></term>
-                            <listitem>
-                                <para>Адрес пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>email</structfield></term>
-                            <listitem>
-                                <para>E-Mail пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>array of strings <structfield>userdata</structfield></term>
-                            <listitem>
-                                <para>Набор полей UserData</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>name</structfield></term>
-                            <listitem>
-                                <para>Реальное имя пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>group</structfield></term>
-                            <listitem>
-                                <para>Группа пользователя</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <structfield>status</structfield></term>
-                            <listitem>
-                                <para>Статус пользователя. true - подключен, false - отключен</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <structfield>aonline</structfield></term>
-                            <listitem>
-                                <para>Признак "Always Online"</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <structfield>down</structfield></term>
-                            <listitem>
-                                <para>Пользователь отключен</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <structfield>passive</structfield></term>
-                            <listitem>
-                                <para>Пользователь "заморожен"</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>boolean <structfield>disableddetailstat</structfield></term>
-                            <listitem>
-                                <para>Для пользователя отключено ведение детальной статистики</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>currip</structfield></term>
-                            <listitem>
-                                <para>Текущий IP-адрес пользователя в формате A.B.C.D</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>string <structfield>ips</structfield></term>
-                            <listitem>
-                                <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <structfield>lastcash</structfield></term>
-                            <listitem>
-                                <para>Последнее пополнение счета</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>double <structfield>lasttimecash</structfield></term>
-                            <listitem>
-                                <para>Время последнего пополнения счета в формате Unix-timestamp</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <structfield>lastactivitytime</structfield></term>
-                            <listitem>
-                                <para>Время последней активности пользователя в формате Unix-timestamp</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>int <structfield>pingtime</structfield></term>
-                            <listitem>
-                                <para>Время последнего пинга пользователя в формате Unix-timestamp</para>
-                            </listitem>
-                        </varlistentry>
-                        <varlistentry>
-                            <term>struct <structfield>traff</structfield></term>
-                            <listitem>
-                                <para>Информация о трафике</para>
-                                <variablelist>
-                                    <varlistentry>
-                                        <term>array of i8 <structfield>mu</structfield></term>
-                                        <listitem>
-                                            <para>Исходяий трафик за месяц (по направлениям)</para>
-                                        </listitem>
-                                    </varlistentry>
-                                    <varlistentry>
-                                        <term>array of i8 <structfield>md</structfield></term>
-                                        <listitem>
-                                            <para>Входящий трафик за месяц (по направлениям)</para>
-                                        </listitem>
-                                    </varlistentry>
-                                    <varlistentry>
-                                        <term>array of i8 <structfield>su</structfield></term>
-                                        <listitem>
-                                            <para>Исходяий трафик за сессию (по направлениям)</para>
-                                        </listitem>
-                                    </varlistentry>
-                                    <varlistentry>
-                                        <term>array of i8 <structfield>sd</structfield></term>
-                                        <listitem>
-                                            <para>Входящий трафик за сессию (по направлениям)</para>
-                                        </listitem>
-                                    </varlistentry>
-                                </variablelist>
-                            </listitem>
-                        </varlistentry>
-                    </variablelist>
-                </para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
-                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
-                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
-                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
-                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
-                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
-                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
-                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.add_user">
-        <refmeta>
-            <refentrytitle>stargazer.add_user</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.add_user</refname>
-            <refpurpose>Регистрация нового пользователя</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.add_user</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.add_user</function> регистрирует в системе нового "пустого" пользователя. Для изменения регистрационной информации сразу после создания используется метод <function><link linkend="stargazer.chg_user">stargazer.chg_user</link></function></para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин пользователя</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
-                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
-                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
-                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
-                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
-                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
-                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
-                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.chg_user">
-        <refmeta>
-            <refentrytitle>stargazer.chg_user</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.chg_user</refname>
-            <refpurpose>Изменение регистрационной информации и данных о трафике пользователя</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.chg_user</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                    <paramdef>struct <parameter>info</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.chg_user</function> сохраняет регистрационную информацию и данные о трафике пользователя. Допустимо частичное указание параметров в структуре info. В этом случае изменение затронет только указанные параметры. Дополнительные поля структуры (не входящие в описание) будут проигнорированы.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин пользователя</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>struct <parameter>info</parameter></term>
-                    <listitem>
-                        <para>
-                            Регистрационная информация и данные о трафике.
-                            <variablelist>
-                                <varlistentry>
-                                    <term>bool <structfield>result</structfield></term>
-                                    <listitem>
-                                        <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>string <structfield>login</structfield></term>
-                                    <listitem>
-                                        <para>Логин пользователя</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>string <structfield>password</structfield></term>
-                                    <listitem>
-                                        <para>Пароль пользователя</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>double <structfield>freemb</structfield></term>
-                                    <listitem>
-                                        <para>Количество свободных мегабайт на счету</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>double <structfield>credit</structfield></term>
-                                    <listitem>
-                                        <para>Размер кредита</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>int <structfield>creditexpire</structfield></term>
-                                    <listitem>
-                                        <para>Время истечения срока кредита в формате Unix-timestamp</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>string <structfield>note</structfield></term>
-                                    <listitem>
-                                        <para>Примечания</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>string <structfield>phone</structfield></term>
-                                    <listitem>
-                                        <para>Контактный телефон</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>string <structfield>address</structfield></term>
-                                    <listitem>
-                                        <para>Адрес пользователя</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>string <structfield>email</structfield></term>
-                                    <listitem>
-                                        <para>E-Mail пользователя</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>array of strings <structfield>userdata</structfield></term>
-                                    <listitem>
-                                        <para>Набор полей UserData</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>string <structfield>name</structfield></term>
-                                    <listitem>
-                                        <para>Реальное имя пользователя</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>string <structfield>group</structfield></term>
-                                    <listitem>
-                                        <para>Группа пользователя</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <structfield>status</structfield></term>
-                                    <listitem>
-                                        <para>Статус пользователя. true - подключен, false - отключен</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <structfield>aonline</structfield></term>
-                                    <listitem>
-                                        <para>Признак "Always Online"</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <structfield>down</structfield></term>
-                                    <listitem>
-                                        <para>Пользователь отключен</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <structfield>passive</structfield></term>
-                                    <listitem>
-                                        <para>Пользователь "заморожен"</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>boolean <structfield>disableddetailstat</structfield></term>
-                                    <listitem>
-                                        <para>Для пользователя отключено ведение детальной статистики</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>string <structfield>ips</structfield></term>
-                                    <listitem>
-                                        <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
-                                    </listitem>
-                                </varlistentry>
-                                <varlistentry>
-                                    <term>struct <structfield>traff</structfield></term>
-                                    <listitem>
-                                        <para>Информация о трафике</para>
-                                        <variablelist>
-                                            <varlistentry>
-                                                <term>array of i8 <structfield>mu</structfield></term>
-                                                <listitem>
-                                                    <para>Исходяий трафик за месяц (по направлениям)</para>
-                                                </listitem>
-                                            </varlistentry>
-                                            <varlistentry>
-                                                <term>array of i8 <structfield>md</structfield></term>
-                                                <listitem>
-                                                    <para>Входящий трафик за месяц (по направлениям)</para>
-                                                </listitem>
-                                            </varlistentry>
-                                        </variablelist>
-                                    </listitem>
-                                </varlistentry>
-                            </variablelist>
-                        </para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
-                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
-                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
-                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
-                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
-                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
-                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
-                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.del_user">
-        <refmeta>
-            <refentrytitle>stargazer.del_user</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.del_user</refname>
-            <refpurpose>Удаление пользователя</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.del_user</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.del_user</function> удаляет из системы пользователя с указанным логином.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин пользователя</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
-                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
-                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
-                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
-                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
-                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
-                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
-                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.add_user_cash">
-        <refmeta>
-            <refentrytitle>stargazer.add_user_cash</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.add_user_cash</refname>
-            <refpurpose>Добавление денег на счет пользователя</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.add_user_cash</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                    <paramdef>double <parameter>amount</parameter></paramdef>
-                    <paramdef>string <parameter>comment</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.add_user_cash</function> позволяет добавить деньги на счет указанного пользователя.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин пользователя</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>double <parameter>amount</parameter></term>
-                    <listitem>
-                        <para>Добавляемая сумма</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>comment</parameter></term>
-                    <listitem>
-                        <para>Коментарий</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
-                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
-                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
-                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
-                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
-                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
-                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
-                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.set_user_cash">
-        <refmeta>
-            <refentrytitle>stargazer.set_user_cash</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.set_user_cash</refname>
-            <refpurpose>Установка состояния счета пользователя</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.set_user_cash</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                    <paramdef>double <parameter>cash</parameter></paramdef>
-                    <paramdef>string <parameter>comment</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.set_user_cash</function> позволяет установить состояние счета пользователя.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин пользователя</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>double <parameter>cash</parameter></term>
-                    <listitem>
-                        <para>Устанавливаемая сумма</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>comment</parameter></term>
-                    <listitem>
-                        <para>Коментарий</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
-                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
-                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
-                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
-                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
-                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
-                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
-                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.chg_user_tariff">
-        <refmeta>
-            <refentrytitle>stargazer.chg_user_tariff</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.chg_user_tariff</refname>
-            <refpurpose>Изменение тарифного плана пользователя</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.chg_user_tariff</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>string <parameter>login</parameter></paramdef>
-                    <paramdef>string <parameter>tariff</parameter></paramdef>
-                    <paramdef>boolean <parameter>delayed</parameter></paramdef>
-                    <paramdef>string <parameter>comment</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.chg_user_tariff</function> позволяет изменить тарифный план пользователя или запланировать его изменение на начало нового месяца.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>login</parameter></term>
-                    <listitem>
-                        <para>Логин пользователя</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>tariff</parameter></term>
-                    <listitem>
-                        <para>Название нового тарифа</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>boolean <parameter>delayed</parameter></term>
-                    <listitem>
-                        <para>Отложенное изменение тарифа (в начале следующего месяца)</para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>string <parameter>comment</parameter></term>
-                    <listitem>
-                        <para>Коментарий</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает true в случае успеха и false в случае неудачи</para>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
-                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
-                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
-                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
-                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
-                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
-                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>
-                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-    <refentry id="stargazer.get_online_ips">
-        <refmeta>
-            <refentrytitle>stargazer.get_online_ips</refentrytitle>
-        </refmeta>
-        <refnamediv>
-            <refname>stargazer.get_online_ips</refname>
-            <refpurpose>Получение списка IP-адресов online-пользователей</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <funcsynopsis>
-                <funcprototype>
-                    <funcdef><function>stargazer.get_online_ips</function></funcdef>
-                    <paramdef>string <parameter>cookie</parameter></paramdef>
-                    <paramdef>array of strings <parameter>subnets</parameter></paramdef>
-                </funcprototype>
-            </funcsynopsis>
-        </refsynopsisdiv>
-        <refsect1>
-            <title>Description</title>
-            <para>Метод <function>stargazer.get_online_ips</function> позволяет получить список IP-адресов авторизованных пользователей системы для указанного списка подсетей.</para>
-            <variablelist>
-                <varlistentry>
-                    <term>string <parameter>cookie</parameter></term>
-                    <listitem>
-                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>array of strings <parameter>subnets</parameter></term>
-                    <listitem>
-                        <para>Список подсетей в CIDR-нотации</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-            <refsect2>
-                <title>Return Value</title>
-                <para>Возвращает структуру:</para>
-                <variablelist>
-                    <varlistentry>
-                        <term>bool <structfield>result</structfield></term>
-                        <listitem>
-                            <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie).</para>
-                        </listitem>
-                    </varlistentry>
-                    <varlistentry>
-                        <term>array of strings <structfield>ips</structfield></term>
-                        <listitem>
-                            <para>Список IP-адресов авторизованных пользователей из этих подсетей</para>
-                        </listitem>
-                    </varlistentry>
-                </variablelist>
-            </refsect2>
-        </refsect1>
-        <refsect1>
-            <title>See also</title>
-            <para>
-                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
-                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
-                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
-                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
-                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
-                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
-                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>
-                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
-            </para>
-        </refsect1>
-    </refentry>
-</chapter>
diff --git a/doc/xmlrpc-doc/API.xml b/doc/xmlrpc-doc/API.xml
deleted file mode 100644 (file)
index 173c65c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<book xmlns="http://docbook.org/ns/docbook"
-      xmlns:xi="http://www.w3.org/2001/XInclude">
-    <bookinfo>
-        <title>Описание XML-RPC API биллинговой системы Stargazer</title>
-        <author>i
-            <firstname>Maxim</firstname>
-            <surname>Mamontov</surname>
-            <email>faust@stg.dp.ua</email>
-        </author>
-        <date>22.05.2009</date>
-    </bookinfo>
-    <preface>
-        <title>Предисловие</title>
-        <para>XML-RPC API предоставляется посредством плагина mod_conf_rpc.so. Для его использования необходимо установить библиотеку xmlrpc-c версии не ниже 1.16.0.</para>
-        <para>Все API-вызовы сгруппированы по 4 категориям:</para>
-        <itemizedlist mark='opencircle'>
-            <listitem><para>Системные (авторизация, информация о системе и т.д.)</para></listitem>
-            <listitem><para>Управление пользователями</para></listitem>
-            <listitem><para>Управление тарифами</para></listitem>
-            <listitem><para>Управление админами</para></listitem>
-        </itemizedlist>
-        <para>Имя каждого вызова начинается с префикса "stargazer." (точка в конце обязательна). Обычно состоит из глагола, обозначающего дейстиве, и существительного, обозначающего объект. Например: <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link> или <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>.</para>
-        <para>Работа с системой имеет сессионный характер. При авторизации администратора в системе для него открывается сессия, идентифицируемая по сессионному cookie. Сессионный cookie &#151; уникальная строка, длиной в 64 символа, передаваемая во все API-вызовы в качетсве одного из параметров. Время жизни сессионного cookie ограничено вызовом <link linkend="stargazer.logout"><function>stargazer.logout</function></link> и тайм-аутом. Тайм-аут отсчитывается с момента последнего вызова API и конфигурируется на стороне сервера. Количество одновременно открытых сессий ограничено только ресурсами системы.</para>
-        <para>Вызовы <link linkend="stargazer.login"><function>stargazer.login</function></link> и <link linkend="stargazer.info"><function>stargazer.info</function></link> не требуют сессионного cookie.</para>
-        <para>Вызовы не предусматривающие возвращение какой-либо информации (например, <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link> или <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>) возвращают результат типа boolean. true в случае успеха и false в случае неудачи. Если вызов возвращает какую-нибуть информацию (например, <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>) то в нее добавляется поле result типа boolean. Оно принимает значение true в случае успешного вызова и false в случае неудачи. Это поле является обязательным для всех возвращаемых структур.</para>
-    </preface>
-    <xi:include href="API-system.xml"/>
-    <xi:include href="API-tariffs.xml"/>
-    <xi:include href="API-user.xml"/>
-    <xi:include href="API-messages.xml"/>
-    <xi:include href="API-admins.xml"/>
-</book>
diff --git a/doc/xmlrpc-doc/Makefile b/doc/xmlrpc-doc/Makefile
deleted file mode 100644 (file)
index d46679c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-all:
-       xsltproc -o book/ --xinclude /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/html/chunk.xsl API.xml
-
-clean:
-       rm book/*html
diff --git a/doc/xmlrpc/API-admins.xml b/doc/xmlrpc/API-admins.xml
new file mode 100644 (file)
index 0000000..c8aaa9b
--- /dev/null
@@ -0,0 +1,418 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter xmlns="http://docbook.org/ns/docbook">
+    <title>Управление админами</title>
+    <para>В этом разделе собраны вызовы API для управления с администраторами системы: удаление, добавление, изменение прав и т.д.</para>
+    <refentry id="stargazer.get_admin">
+        <refmeta>
+            <refentrytitle>stargazer.get_admin</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.get_admin</refname>
+            <refpurpose>Получает информацию об администраторе системы</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.get_admin</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.get_admin</function> получает информацию об администраторе системы.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин администратора</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>
+                    Возвращает структуру:
+                    <variablelist>
+                        <varlistentry>
+                            <term>boolean <parameter>result</parameter></term>
+                            <listitem>
+                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <parameter>login</parameter></term>
+                            <listitem>
+                                <para>Логин администратора</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>user_stat</parameter></term>
+                            <listitem>
+                                <para>Право на изменение статистики пользователя (включая состояние счета)</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>user_conf</parameter></term>
+                            <listitem>
+                                <para>Право на изменение конфигурации пользователя (включая пароль)</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>user_cash</parameter></term>
+                            <listitem>
+                                <para>Право на изменение состояния счета пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>user_passwd</parameter></term>
+                            <listitem>
+                                <para>Право на изменение пароля пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>user_add_del</parameter></term>
+                            <listitem>
+                                <para>Право на добавление и удаление пользователей</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>admin_chg</parameter></term>
+                            <listitem>
+                                <para>Право на управление администраторами</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>tariff_chg</parameter></term>
+                            <listitem>
+                                <para>Право на управление тарифами</para>
+                            </listitem>
+                        </varlistentry>
+                    </variablelist>
+                </para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
+                <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>,
+                <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
+                <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.get_admins">
+        <refmeta>
+            <refentrytitle>stargazer.get_admins</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.get_admins</refname>
+            <refpurpose>Получает информацию об админах</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.get_admins</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.get_admins</function> получает информацию об админах, зарегистрированных в системе.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>
+                    Возвращает массив структур:
+                    <variablelist>
+                        <varlistentry>
+                            <term>boolean <parameter>result</parameter></term>
+                            <listitem>
+                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <parameter>login</parameter></term>
+                            <listitem>
+                                <para>Логин администратора</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>user_stat</parameter></term>
+                            <listitem>
+                                <para>Право на изменение статистики пользователя (включая состояние счета)</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>user_conf</parameter></term>
+                            <listitem>
+                                <para>Право на изменение конфигурации пользователя (включая пароль)</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>user_cash</parameter></term>
+                            <listitem>
+                                <para>Право на изменение состояния счета пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>user_passwd</parameter></term>
+                            <listitem>
+                                <para>Право на изменение пароля пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>user_add_del</parameter></term>
+                            <listitem>
+                                <para>Право на добавление и удаление пользователей</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>admin_chg</parameter></term>
+                            <listitem>
+                                <para>Право на управление администраторами</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <parameter>tariff_chg</parameter></term>
+                            <listitem>
+                                <para>Право на управление тарифами</para>
+                            </listitem>
+                        </varlistentry>
+                    </variablelist>
+                </para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
+                <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>,
+                <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
+                <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.del_admin">
+        <refmeta>
+            <refentrytitle>stargazer.del_admin</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.del_admin</refname>
+            <refpurpose>Удаляет администратора из системы</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.del_admin</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.del_admin</function> удаляет администратора из системы.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин удаляемого администратора</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
+                <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
+                <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>,
+                <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.add_admin">
+        <refmeta>
+            <refentrytitle>stargazer.add_admin</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.add_admin</refname>
+            <refpurpose>Добавляет администратора в систему</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.add_admin</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.add_admin</function> добавляет администратора в систему.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин добавляемого администратора</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
+                <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
+                <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
+                <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.chg_admin">
+        <refmeta>
+            <refentrytitle>stargazer.chg_admin</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.chg_admin</refname>
+            <refpurpose>Изменяет права и/или пароль администратора</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.chg_admin</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                    <paramdef>struct <parameter>info</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.chg_admin</function> изменяет права и/или пароль администратора системы. Допустимо частичное указание параметров в структуре info. В этом случае изменение затронет только указанные параметры. Дополнительные поля структуры (не входящие в описание) будут проигнорированы.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин изменяемого администратора</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>struct <parameter>info</parameter></term>
+                    <listitem>
+                        <para>
+                            Структура с информацией об админе:
+                            <variablelist>
+                                <varlistentry>
+                                    <term>string <parameter>login</parameter></term>
+                                    <listitem>
+                                        <para>Логин администратора</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <parameter>user_stat</parameter></term>
+                                    <listitem>
+                                        <para>Право на изменение статистики пользователя (включая состояние счета)</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <parameter>user_conf</parameter></term>
+                                    <listitem>
+                                        <para>Право на изменение конфигурации пользователя (включая пароль)</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <parameter>user_cash</parameter></term>
+                                    <listitem>
+                                        <para>Право на изменение состояния счета пользователя</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <parameter>user_passwd</parameter></term>
+                                    <listitem>
+                                        <para>Право на изменение пароля пользователя</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <parameter>user_add_del</parameter></term>
+                                    <listitem>
+                                        <para>Право на добавление и удаление пользователей</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <parameter>admin_chg</parameter></term>
+                                    <listitem>
+                                        <para>Право на управление администраторами</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <parameter>tariff_chg</parameter></term>
+                                    <listitem>
+                                        <para>Право на управление тарифами</para>
+                                    </listitem>
+                                </varlistentry>
+                            </variablelist>
+                        </para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
+                <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
+                <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
+                <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+</chapter>
diff --git a/doc/xmlrpc/API-messages.xml b/doc/xmlrpc/API-messages.xml
new file mode 100644 (file)
index 0000000..e7b48bc
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter xmlns="http://docbook.org/ns/docbook">
+    <title>Управление сообщениями пользователю</title>
+    <para>В этом разделе собраны вызовы API для отправки сообщений пользователям.</para>
+    <refentry id="stargazer.send_user_message">
+        <refmeta>
+            <refentrytitle>stargazer.send_user_message</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.send_user_message</refname>
+            <refpurpose>Отправляет сообщение пользователям</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.send_user_message</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>array of strings <parameter>logins</parameter></paramdef>
+                    <paramdef>struct <parameter>info</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.send_user_message</function> отправляет сообщение пользователям, логины которых перечислены в списке.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>array of strings <parameter>logins</parameter></term>
+                    <listitem>
+                        <para>Список логинов пользователей</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>struct <parameter>info</parameter></term>
+                    <listitem>
+                        <para>
+                            Структура с параметрами сообщения:
+                            <variablelist>
+                                <varlistentry>
+                                    <term>int <parameter>version</parameter></term>
+                                    <listitem>
+                                        <para>Версия системы сообщений (не обязательный параметр, по умолчанию - 1)</para>
+                                    </listitem>
+                                </varlistentry>
+                            </variablelist>
+                            <variablelist>
+                                <varlistentry>
+                                    <term>int <parameter>type</parameter></term>
+                                    <listitem>
+                                        <para>Тип сообщения (не обязательный параметр, по умолчанию - 1)</para>
+                                    </listitem>
+                                </varlistentry>
+                            </variablelist>
+                            <variablelist>
+                                <varlistentry>
+                                    <term>int <parameter>repeat</parameter></term>
+                                    <listitem>
+                                        <para>Количество показов сообщеня</para>
+                                    </listitem>
+                                </varlistentry>
+                            </variablelist>
+                            <variablelist>
+                                <varlistentry>
+                                    <term>int <parameter>repeat_period</parameter></term>
+                                    <listitem>
+                                        <para>Период повторения показа сообщений (в минутах)</para>
+                                    </listitem>
+                                </varlistentry>
+                            </variablelist>
+                            <variablelist>
+                                <varlistentry>
+                                    <term>int <parameter>show_time</parameter></term>
+                                    <listitem>
+                                        <para>Время отображения сообщения (в секундах)</para>
+                                    </listitem>
+                                </varlistentry>
+                            </variablelist>
+                            <variablelist>
+                                <varlistentry>
+                                    <term>string <parameter>text</parameter></term>
+                                    <listitem>
+                                        <para>Текст сообщения в кодировке UTF-8</para>
+                                    </listitem>
+                                </varlistentry>
+                            </variablelist>
+                        </para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+    </refentry>
+</chapter>
diff --git a/doc/xmlrpc/API-system.xml b/doc/xmlrpc/API-system.xml
new file mode 100644 (file)
index 0000000..2752917
--- /dev/null
@@ -0,0 +1,179 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter xmlns="http://docbook.org/ns/docbook">
+    <title>Авторизация в системе</title>
+    <para>В этом разделе собраны функции, не относящиеся к манипулированию сущностями системы. А именно: отвечающие за авторизацию в системе, получение информации о системе и т.д.</para>
+    <refentry id="stargazer.login">
+        <refmeta>
+            <refentrytitle>stargazer.login</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.login</refname>
+            <refpurpose>Авторизация администратора в системе</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.login</function></funcdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                    <paramdef>string <parameter>password</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.login</function> авторизует администратора в системе. Если логин и пароль корректные - создается cookie и открывается сессия. В дальнейшем все вызовы API получают этот cookie. Если указаный администратор в системе не найден или его пароль не совпадает - сессия не открывается и cookie не создается.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин администратора</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>password</parameter></term>
+                    <listitem>
+                        <para>Пароль администратора</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>
+                    Возвращает структуру:
+                    <variablelist>
+                        <varlistentry>
+                            <term>bool <structfield>result</structfield></term>
+                            <listitem>
+                                <para>Результат операции. true - авторизация прошла успешно, false - авторизация завершилась неудачей.</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>cookie</structfield></term>
+                            <listitem>
+                                <para>Авторизационный cookie. В случе успешной авторизации представляет собой строку из 64 символов, передаваемую во все вызовы API. В случае неудачи - пустая строка.</para>
+                            </listitem>
+                        </varlistentry>
+                    </variablelist>
+                </para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para><link linkend="stargazer.logout">stargazer.logout</link></para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.logout">
+        <refmeta>
+            <refentrytitle>stargazer.logout</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.logout</refname>
+            <refpurpose>Завершение сессии администратора в системе</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.logout</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.logout</function> завершает сеанс работы авторизатора в системе.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает true в случае успеха и false в случае неудачи.</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para><link linkend="stargazer.login">stargazer.login</link></para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.info">
+        <refmeta>
+            <refentrytitle>stargazer.info</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.info</refname>
+            <refpurpose>Информация о сервере</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.info</function></funcdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.info</function> возвращает информацию о сервере Stargazer. Не требует авторизации.</para>
+            <refsect2>
+                <title>Return Value</title>
+                <para>
+                    Возвращает структуру:
+                    <variablelist>
+                        <varlistentry>
+                            <term>string <structfield>version</structfield></term>
+                            <listitem>
+                                <para>Версия Stargazer</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <structfield>tariff_num</structfield></term>
+                            <listitem>
+                                <para>Количество тарифов в системе</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <structfield>tariff</structfield></term>
+                            <listitem>
+                                <para>Версия тарифов (обычно 2)</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <structfield>users_num</structfield></term>
+                            <listitem>
+                                <para>Количество зарегистрированных пользователей в системе</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>uname</structfield></term>
+                            <listitem>
+                                <para>Строка uname</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <structfield>dir_num</structfield></term>
+                            <listitem>
+                                <para>Количество тарифицируемых направлений</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <structfield>day_fee</structfield></term>
+                            <listitem>
+                                <para>День снятия абонплаты</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>array of strings <structfield>dir_names</structfield></term>
+                            <listitem>
+                                <para>Названия направлений</para>
+                            </listitem>
+                        </varlistentry>
+                    </variablelist>
+                </para>
+            </refsect2>
+        </refsect1>
+    </refentry>
+</chapter>
+
diff --git a/doc/xmlrpc/API-tariffs.xml b/doc/xmlrpc/API-tariffs.xml
new file mode 100644 (file)
index 0000000..d36b01d
--- /dev/null
@@ -0,0 +1,639 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter xmlns="http://docbook.org/ns/docbook">
+    <title>Управление тарифами</title>
+    <para>В этом разделе собраны вызовы для манипулирования тарифными планами. Тарифный план включает в себя:</para>
+    <itemizedlist>
+        <listitem><para>название;</para></listitem>
+        <listitem><para>абонплата;</para></listitem>
+        <listitem><para>количество бесплатных мегабайт, включенных в абонплату;</para></listitem>
+        <listitem><para>стоимость "заморозки" пользователя;</para></listitem>
+        <listitem>
+            <para>тип подсчета трафика:</para>
+            <itemizedlist>
+                <listitem><para>только входящий,</para></listitem>
+                <listitem><para>только исходящий,</para></listitem>
+                <listitem><para>входящий и исходящий суммарно,</para></listitem>
+                <listitem><para>максимум из входящего и исходящего</para></listitem>
+            </itemizedlist>
+        </listitem>
+        <listitem>
+            <para>информацию о тарификации направлений:</para>
+            <itemizedlist>
+                <listitem><para>время начала дня;</para></listitem>
+                <listitem><para>конца дня;</para></listitem>
+                <listitem><para>цена за мегабайт трафика до порога днем;</para></listitem>
+                <listitem><para>цена за мегабайт трафика после порога днем;</para></listitem>
+                <listitem><para>цена за мегабайт трафика до порога ночью;</para></listitem>
+                <listitem><para>цена за мегабайт трафика после порога ночью;</para></listitem>
+                <listitem><para>пороговый объем трафика в мегабайтах;</para></listitem>
+                <listitem><para>флаг игнорирования времени суток;</para></listitem>
+                <listitem><para>флаг игнорирования порога.</para></listitem>
+            </itemizedlist>
+        </listitem>
+    </itemizedlist>
+    <refentry id="stargazer.get_tariff">
+        <refmeta>
+            <refentrytitle>stargazer.get_tariff</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.get_tariff</refname>
+            <refpurpose>Получает информацию о тарифном плане</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.get_tariff</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>tariff</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.get_tariff</function> получает информацию о тарифном плане.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>tariff</parameter></term>
+                    <listitem>
+                        <para>Название тарифа</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>
+                    Возвращает структуру:
+                    <variablelist>
+                        <varlistentry>
+                            <term>boolean <parameter>result</parameter></term>
+                            <listitem>
+                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <parameter>name</parameter></term>
+                            <listitem>
+                                <para>Название тарифа</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <parameter>fee</parameter></term>
+                            <listitem>
+                                <para>Абонплата</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <parameter>freemb</parameter></term>
+                            <listitem>
+                                <para>Количество бесплатных мегабайт включенных в абонплату</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <parameter>passivecost</parameter></term>
+                            <listitem>
+                                <para>Стоимость "заморозки" пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <parameter>trafftype</parameter></term>
+                            <listitem>
+                                <para>Тип подсчета трафика:
+                                    <simplelist type="vert">
+                                        <member>0 &#151; подсчитывать только исходящий трафик</member>
+                                        <member>1 &#151; подсчитывать только входящий трафик</member>
+                                        <member>2 &#151; подсчитывать суммарно входящий и исходящий трафик</member>
+                                        <member>3 &#151; подсчитывать максимальный из входящего и исходящего трафика</member>
+                                    </simplelist>
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>array of struct <parameter>dirprices</parameter></term>
+                            <listitem>
+                                <para>Массив стурктур, описывающих тарификацию направлений:
+                                    <variablelist>
+                                        <varlistentry>
+                                            <term>int <parameter>hday</parameter></term>
+                                            <listitem>
+                                                <para>Часы начала дня</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>int <parameter>mday</parameter></term>
+                                            <listitem>
+                                                <para>Минуты начала дня</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>int <parameter>hnight</parameter></term>
+                                            <listitem>
+                                                <para>Часы начала ночи</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>int <parameter>mnight</parameter></term>
+                                            <listitem>
+                                                <para>Минуты начала ночи</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>double <parameter>pricedaya</parameter></term>
+                                            <listitem>
+                                                <para>Цена 1 мегабайта трафика днем до превышения порогового значения</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>double <parameter>pricedayb</parameter></term>
+                                            <listitem>
+                                                <para>Цена 1 мегабайта трафика днем после превышения порогового значения</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>double <parameter>pricenighta</parameter></term>
+                                            <listitem>
+                                                <para>Цена 1 мегабайта трафика ночью до превышения порогового значения</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>double <parameter>pricenightb</parameter></term>
+                                            <listitem>
+                                                <para>Цена 1 мегабайта трафика ночью после превышения порогового значения</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>int <parameter>threshold</parameter></term>
+                                            <listitem>
+                                                <para>Величина порога в мегабайтах</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>boolean <parameter>singleprice</parameter></term>
+                                            <listitem>
+                                                <para>Цена не зависит от времени суток</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>boolean <parameter>nodiscount</parameter></term>
+                                            <listitem>
+                                                <para>Цена не зависит от порога</para>
+                                            </listitem>
+                                        </varlistentry>
+                                    </variablelist>
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                    </variablelist>
+                </para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
+                <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
+                <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>,
+                <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.get_tariffs">
+        <refmeta>
+            <refentrytitle>stargazer.get_tariffs</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.get_tariffs</refname>
+            <refpurpose>Получает информацию о тарифных планах</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.get_tariffs</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.get_tariffs</function> получает информацию о тарифных планах.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>
+                    Возвращает массив структур:
+                    <variablelist>
+                        <varlistentry>
+                            <term>boolean <parameter>result</parameter></term>
+                            <listitem>
+                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <parameter>name</parameter></term>
+                            <listitem>
+                                <para>Название тарифа</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <parameter>fee</parameter></term>
+                            <listitem>
+                                <para>Абонплата</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <parameter>freemb</parameter></term>
+                            <listitem>
+                                <para>Количество бесплатных мегабайт включенных в абонплату</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <parameter>passivecost</parameter></term>
+                            <listitem>
+                                <para>Стоимость "заморозки" пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <parameter>trafftype</parameter></term>
+                            <listitem>
+                                <para>Тип подсчета трафика:
+                                    <simplelist type="vert">
+                                        <member>0 &#151; подсчитывать только исходящий трафик</member>
+                                        <member>1 &#151; подсчитывать только входящий трафик</member>
+                                        <member>2 &#151; подсчитывать суммарно входящий и исходящий трафик</member>
+                                        <member>3 &#151; подсчитывать максимальный из входящего и исходящего трафика</member>
+                                    </simplelist>
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>array of struct <parameter>dirprices</parameter></term>
+                            <listitem>
+                                <para>Массив стурктур, описывающих тарификацию направлений:
+                                    <variablelist>
+                                        <varlistentry>
+                                            <term>int <parameter>hday</parameter></term>
+                                            <listitem>
+                                                <para>Часы начала дня</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>int <parameter>mday</parameter></term>
+                                            <listitem>
+                                                <para>Минуты начала дня</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>int <parameter>hnight</parameter></term>
+                                            <listitem>
+                                                <para>Часы начала ночи</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>int <parameter>mnight</parameter></term>
+                                            <listitem>
+                                                <para>Минуты начала ночи</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>double <parameter>pricedaya</parameter></term>
+                                            <listitem>
+                                                <para>Цена 1 мегабайта трафика днем до превышения порогового значения</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>double <parameter>pricedayb</parameter></term>
+                                            <listitem>
+                                                <para>Цена 1 мегабайта трафика днем после превышения порогового значения</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>double <parameter>pricenighta</parameter></term>
+                                            <listitem>
+                                                <para>Цена 1 мегабайта трафика ночью до превышения порогового значения</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>double <parameter>pricenightb</parameter></term>
+                                            <listitem>
+                                                <para>Цена 1 мегабайта трафика ночью после превышения порогового значения</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>int <parameter>threshold</parameter></term>
+                                            <listitem>
+                                                <para>Величина порога в мегабайтах</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>boolean <parameter>singleprice</parameter></term>
+                                            <listitem>
+                                                <para>Цена не зависит от времени стуок</para>
+                                            </listitem>
+                                        </varlistentry>
+                                        <varlistentry>
+                                            <term>boolean <parameter>nodiscount</parameter></term>
+                                            <listitem>
+                                                <para>Цена не зависит от порога</para>
+                                            </listitem>
+                                        </varlistentry>
+                                    </variablelist>
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                    </variablelist>
+                </para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
+                <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
+                <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>,
+                <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.add_tariff">
+        <refmeta>
+            <refentrytitle>stargazer.add_tariff</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.add_tariff</refname>
+            <refpurpose>Добавляет в систему новый тарифный план</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.add_tariff</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>tariff</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.add_tariff</function> добавляет в систему новый "пустой" тарифный план. Для его настройки используется метод <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>tariff</parameter></term>
+                    <listitem>
+                        <para>Название тарифа</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращет true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
+                <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
+                <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>,
+                <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.del_tariff">
+        <refmeta>
+            <refentrytitle>stargazer.del_tariff</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.del_tariff</refname>
+            <refpurpose>Удаляет из системы тарифный план</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.del_tariff</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>tariff</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.del_tariff</function> удаляет из системы тарифный план</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>tariff</parameter></term>
+                    <listitem>
+                        <para>Название тарифа</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращет true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
+                <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
+                <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
+                <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.chg_tariff">
+        <refmeta>
+            <refentrytitle>stargazer.chg_tariff</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.chg_tariff</refname>
+            <refpurpose>Изменяет информацию о тарифном плане</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.chg_tariff</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>tariff</parameter></paramdef>
+                    <paramdef>struct <parameter>info</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.chg_tariff</function> изменяет информацию о тарифном плане. Допустимо частичное указание параметров в структуре info. В этом случае изменение затронет только указанные параметры. Дополнительные поля структуры (не входящие в описание) будут проигнорированы.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>tariff</parameter></term>
+                    <listitem>
+                        <para>Название тарифа</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>struct <parameter>info</parameter></term>
+                    <listitem>
+                        <para>
+                            Структура с информацией о тарифном плане:
+                            <variablelist>
+                                <varlistentry>
+                                    <term>string <parameter>name</parameter></term>
+                                    <listitem>
+                                        <para>Название тарифа</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>double <parameter>fee</parameter></term>
+                                    <listitem>
+                                        <para>Абонплата</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>double <parameter>freemb</parameter></term>
+                                    <listitem>
+                                        <para>Количество свободных мегабайт, включенных в абонплату</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>double <parameter>passivecost</parameter></term>
+                                    <listitem>
+                                        <para>Стоимость заморозки пользователя</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>int <parameter>trafftype</parameter></term>
+                                    <listitem>
+                                        <para>Тип подсчета трафика:
+                                            <simplelist type="vert">
+                                                <member>0 &#151; подсчитывать только исходящий трафик</member>
+                                                <member>1 &#151; подсчитывать только входящий трафик</member>
+                                                <member>2 &#151; подсчитывать суммарно входящий и исходящий трафик</member>
+                                                <member>3 &#151; подсчитывать максимальный из входящего и исходящего трафика</member>
+                                            </simplelist>
+                                        </para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>array of struct <parameter>dirprices</parameter></term>
+                                    <listitem>
+                                        <para>Массив стурктур, описывающих тарификацию направлений:
+                                            <variablelist>
+                                                <varlistentry>
+                                                    <term>int <parameter>hday</parameter></term>
+                                                    <listitem>
+                                                        <para>Часы начала дня</para>
+                                                    </listitem>
+                                                </varlistentry>
+                                                <varlistentry>
+                                                    <term>int <parameter>mday</parameter></term>
+                                                    <listitem>
+                                                        <para>Минуты начала дня</para>
+                                                    </listitem>
+                                                </varlistentry>
+                                                <varlistentry>
+                                                    <term>int <parameter>hnight</parameter></term>
+                                                    <listitem>
+                                                        <para>Часы начала ночи</para>
+                                                    </listitem>
+                                                </varlistentry>
+                                                <varlistentry>
+                                                    <term>int <parameter>mnight</parameter></term>
+                                                    <listitem>
+                                                        <para>Минуты начала ночи</para>
+                                                    </listitem>
+                                                </varlistentry>
+                                                <varlistentry>
+                                                    <term>double <parameter>pricedaya</parameter></term>
+                                                    <listitem>
+                                                        <para>Цена 1 мегабайта трафика днем до превышения порогового значения</para>
+                                                    </listitem>
+                                                </varlistentry>
+                                                <varlistentry>
+                                                    <term>double <parameter>pricedayb</parameter></term>
+                                                    <listitem>
+                                                        <para>Цена 1 мегабайта трафика днем после превышения порогового значения</para>
+                                                    </listitem>
+                                                </varlistentry>
+                                                <varlistentry>
+                                                    <term>double <parameter>pricenighta</parameter></term>
+                                                    <listitem>
+                                                        <para>Цена 1 мегабайта трафика ночью до превышения порогового значения</para>
+                                                    </listitem>
+                                                </varlistentry>
+                                                <varlistentry>
+                                                    <term>double <parameter>pricenightb</parameter></term>
+                                                    <listitem>
+                                                        <para>Цена 1 мегабайта трафика ночью после превышения порогового значения</para>
+                                                    </listitem>
+                                                </varlistentry>
+                                                <varlistentry>
+                                                    <term>int <parameter>threshold</parameter></term>
+                                                    <listitem>
+                                                        <para>Величина порога в мегабайтах</para>
+                                                    </listitem>
+                                                </varlistentry>
+                                                <varlistentry>
+                                                    <term>boolean <parameter>singleprice</parameter></term>
+                                                    <listitem>
+                                                        <para>Цена не зависит от времени стуок</para>
+                                                    </listitem>
+                                                </varlistentry>
+                                                <varlistentry>
+                                                    <term>boolean <parameter>nodiscount</parameter></term>
+                                                    <listitem>
+                                                        <para>Цена не зависит от порога</para>
+                                                    </listitem>
+                                                </varlistentry>
+                                            </variablelist>
+                                        </para>
+                                    </listitem>
+                                </varlistentry>
+                            </variablelist>
+                        </para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращет true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
+                <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
+                <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
+                <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+</chapter>
diff --git a/doc/xmlrpc/API-user.xml b/doc/xmlrpc/API-user.xml
new file mode 100644 (file)
index 0000000..fac4f2b
--- /dev/null
@@ -0,0 +1,1066 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter xmlns="http://docbook.org/ns/docbook">
+    <title>Управление пользователями</title>
+    <refentry id="stargazer.get_user">
+        <refmeta>
+            <refentrytitle>stargazer.get_user</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.get_user</refname>
+            <refpurpose>Получение информации о пользователе</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.get_user</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.get_user</function> возвращает информацию о пользователе системы.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин пользователя</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>
+                    Возвращает структуру:
+                    <variablelist>
+                        <varlistentry>
+                            <term>bool <structfield>result</structfield></term>
+                            <listitem>
+                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>login</structfield></term>
+                            <listitem>
+                                <para>Логин пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>password</structfield></term>
+                            <listitem>
+                                <para>Пароль пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <structfield>cash</structfield></term>
+                            <listitem>
+                                <para>Количество денег на счету</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <structfield>freemb</structfield></term>
+                            <listitem>
+                                <para>Количество свободных мегабайт на счету</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <structfield>credit</structfield></term>
+                            <listitem>
+                                <para>Размер кредита</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <structfield>creditexpire</structfield></term>
+                            <listitem>
+                                <para>Время истечения срока кредита в формате Unix-timestamp</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>tariff</structfield></term>
+                            <listitem>
+                                <para>Текущий тариф пользователя. В случае, если заказано изменение тарифа в следующем месяце возвращаются оба тарифа, разделенные символом "/" (косая черта)</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>note</structfield></term>
+                            <listitem>
+                                <para>Примечания</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>phone</structfield></term>
+                            <listitem>
+                                <para>Контактный телефон</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>address</structfield></term>
+                            <listitem>
+                                <para>Адрес пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>email</structfield></term>
+                            <listitem>
+                                <para>E-Mail пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>array of strings <structfield>userdata</structfield></term>
+                            <listitem>
+                                <para>Набор полей UserData</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>name</structfield></term>
+                            <listitem>
+                                <para>Реальное имя пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>group</structfield></term>
+                            <listitem>
+                                <para>Группа пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <structfield>status</structfield></term>
+                            <listitem>
+                                <para>Статус пользователя. true - подключен, false - отключен</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <structfield>aonline</structfield></term>
+                            <listitem>
+                                <para>Признак "Always Online"</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <structfield>down</structfield></term>
+                            <listitem>
+                                <para>Пользователь отключен</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <structfield>passive</structfield></term>
+                            <listitem>
+                                <para>Пользователь "заморожен"</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <structfield>disableddetailstat</structfield></term>
+                            <listitem>
+                                <para>Для пользователя отключено ведение детальной статистики</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>currip</structfield></term>
+                            <listitem>
+                                <para>Текущий IP-адрес пользователя в формате A.B.C.D</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>ips</structfield></term>
+                            <listitem>
+                                <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <structfield>lastcash</structfield></term>
+                            <listitem>
+                                <para>Последнее пополнение счета</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <structfield>lasttimecash</structfield></term>
+                            <listitem>
+                                <para>Время последнего пополнения счета в формате Unix-timestamp</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <structfield>lastactivitytime</structfield></term>
+                            <listitem>
+                                <para>Время последней активности пользователя в формате Unix-timestamp</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <structfield>pingtime</structfield></term>
+                            <listitem>
+                                <para>Время последнего пинга пользователя в формате Unix-timestamp</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>struct <structfield>traff</structfield></term>
+                            <listitem>
+                                <para>Информация о трафике</para>
+                                <variablelist>
+                                    <varlistentry>
+                                        <term>array of i8 <structfield>mu</structfield></term>
+                                        <listitem>
+                                            <para>Исходяий трафик за месяц (по направлениям)</para>
+                                        </listitem>
+                                    </varlistentry>
+                                    <varlistentry>
+                                        <term>array of i8 <structfield>md</structfield></term>
+                                        <listitem>
+                                            <para>Входящий трафик за месяц (по направлениям)</para>
+                                        </listitem>
+                                    </varlistentry>
+                                    <varlistentry>
+                                        <term>array of i8 <structfield>su</structfield></term>
+                                        <listitem>
+                                            <para>Исходяий трафик за сессию (по направлениям)</para>
+                                        </listitem>
+                                    </varlistentry>
+                                    <varlistentry>
+                                        <term>array of i8 <structfield>sd</structfield></term>
+                                        <listitem>
+                                            <para>Входящий трафик за сессию (по направлениям)</para>
+                                        </listitem>
+                                    </varlistentry>
+                                </variablelist>
+                            </listitem>
+                        </varlistentry>
+                    </variablelist>
+                </para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
+                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
+                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
+                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
+                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
+                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
+                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
+                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.get_users">
+        <refmeta>
+            <refentrytitle>stargazer.get_users</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.get_users</refname>
+            <refpurpose>Получение информации о пользователях</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.get_users</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.get_users</function> возвращает информацию о пользователях системы.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>
+                    Возвращает массив структур:
+                    <variablelist>
+                        <varlistentry>
+                            <term>bool <structfield>result</structfield></term>
+                            <listitem>
+                                <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>login</structfield></term>
+                            <listitem>
+                                <para>Логин пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>password</structfield></term>
+                            <listitem>
+                                <para>Пароль пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <structfield>cash</structfield></term>
+                            <listitem>
+                                <para>Количество денег на счету</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <structfield>freemb</structfield></term>
+                            <listitem>
+                                <para>Количество свободных мегабайт на счету</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <structfield>credit</structfield></term>
+                            <listitem>
+                                <para>Размер кредита</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <structfield>creditexpire</structfield></term>
+                            <listitem>
+                                <para>Время истечения срока кредита в формате Unix-timestamp</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>tariff</structfield></term>
+                            <listitem>
+                                <para>Текущий тариф пользователя. В случае, если заказано изменение тарифа в следующем месяце возвращаются оба тарифа, разделенные символом "/" (косая черта)</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>note</structfield></term>
+                            <listitem>
+                                <para>Примечания</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>phone</structfield></term>
+                            <listitem>
+                                <para>Контактный телефон</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>address</structfield></term>
+                            <listitem>
+                                <para>Адрес пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>email</structfield></term>
+                            <listitem>
+                                <para>E-Mail пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>array of strings <structfield>userdata</structfield></term>
+                            <listitem>
+                                <para>Набор полей UserData</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>name</structfield></term>
+                            <listitem>
+                                <para>Реальное имя пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>group</structfield></term>
+                            <listitem>
+                                <para>Группа пользователя</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <structfield>status</structfield></term>
+                            <listitem>
+                                <para>Статус пользователя. true - подключен, false - отключен</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <structfield>aonline</structfield></term>
+                            <listitem>
+                                <para>Признак "Always Online"</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <structfield>down</structfield></term>
+                            <listitem>
+                                <para>Пользователь отключен</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <structfield>passive</structfield></term>
+                            <listitem>
+                                <para>Пользователь "заморожен"</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>boolean <structfield>disableddetailstat</structfield></term>
+                            <listitem>
+                                <para>Для пользователя отключено ведение детальной статистики</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>currip</structfield></term>
+                            <listitem>
+                                <para>Текущий IP-адрес пользователя в формате A.B.C.D</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>string <structfield>ips</structfield></term>
+                            <listitem>
+                                <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <structfield>lastcash</structfield></term>
+                            <listitem>
+                                <para>Последнее пополнение счета</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>double <structfield>lasttimecash</structfield></term>
+                            <listitem>
+                                <para>Время последнего пополнения счета в формате Unix-timestamp</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <structfield>lastactivitytime</structfield></term>
+                            <listitem>
+                                <para>Время последней активности пользователя в формате Unix-timestamp</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>int <structfield>pingtime</structfield></term>
+                            <listitem>
+                                <para>Время последнего пинга пользователя в формате Unix-timestamp</para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>struct <structfield>traff</structfield></term>
+                            <listitem>
+                                <para>Информация о трафике</para>
+                                <variablelist>
+                                    <varlistentry>
+                                        <term>array of i8 <structfield>mu</structfield></term>
+                                        <listitem>
+                                            <para>Исходяий трафик за месяц (по направлениям)</para>
+                                        </listitem>
+                                    </varlistentry>
+                                    <varlistentry>
+                                        <term>array of i8 <structfield>md</structfield></term>
+                                        <listitem>
+                                            <para>Входящий трафик за месяц (по направлениям)</para>
+                                        </listitem>
+                                    </varlistentry>
+                                    <varlistentry>
+                                        <term>array of i8 <structfield>su</structfield></term>
+                                        <listitem>
+                                            <para>Исходяий трафик за сессию (по направлениям)</para>
+                                        </listitem>
+                                    </varlistentry>
+                                    <varlistentry>
+                                        <term>array of i8 <structfield>sd</structfield></term>
+                                        <listitem>
+                                            <para>Входящий трафик за сессию (по направлениям)</para>
+                                        </listitem>
+                                    </varlistentry>
+                                </variablelist>
+                            </listitem>
+                        </varlistentry>
+                    </variablelist>
+                </para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
+                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
+                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
+                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
+                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
+                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
+                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
+                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.add_user">
+        <refmeta>
+            <refentrytitle>stargazer.add_user</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.add_user</refname>
+            <refpurpose>Регистрация нового пользователя</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.add_user</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.add_user</function> регистрирует в системе нового "пустого" пользователя. Для изменения регистрационной информации сразу после создания используется метод <function><link linkend="stargazer.chg_user">stargazer.chg_user</link></function></para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин пользователя</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
+                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
+                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
+                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
+                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
+                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
+                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
+                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.chg_user">
+        <refmeta>
+            <refentrytitle>stargazer.chg_user</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.chg_user</refname>
+            <refpurpose>Изменение регистрационной информации и данных о трафике пользователя</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.chg_user</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                    <paramdef>struct <parameter>info</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.chg_user</function> сохраняет регистрационную информацию и данные о трафике пользователя. Допустимо частичное указание параметров в структуре info. В этом случае изменение затронет только указанные параметры. Дополнительные поля структуры (не входящие в описание) будут проигнорированы.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин пользователя</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>struct <parameter>info</parameter></term>
+                    <listitem>
+                        <para>
+                            Регистрационная информация и данные о трафике.
+                            <variablelist>
+                                <varlistentry>
+                                    <term>bool <structfield>result</structfield></term>
+                                    <listitem>
+                                        <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>string <structfield>login</structfield></term>
+                                    <listitem>
+                                        <para>Логин пользователя</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>string <structfield>password</structfield></term>
+                                    <listitem>
+                                        <para>Пароль пользователя</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>double <structfield>freemb</structfield></term>
+                                    <listitem>
+                                        <para>Количество свободных мегабайт на счету</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>double <structfield>credit</structfield></term>
+                                    <listitem>
+                                        <para>Размер кредита</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>int <structfield>creditexpire</structfield></term>
+                                    <listitem>
+                                        <para>Время истечения срока кредита в формате Unix-timestamp</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>string <structfield>note</structfield></term>
+                                    <listitem>
+                                        <para>Примечания</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>string <structfield>phone</structfield></term>
+                                    <listitem>
+                                        <para>Контактный телефон</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>string <structfield>address</structfield></term>
+                                    <listitem>
+                                        <para>Адрес пользователя</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>string <structfield>email</structfield></term>
+                                    <listitem>
+                                        <para>E-Mail пользователя</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>array of strings <structfield>userdata</structfield></term>
+                                    <listitem>
+                                        <para>Набор полей UserData</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>string <structfield>name</structfield></term>
+                                    <listitem>
+                                        <para>Реальное имя пользователя</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>string <structfield>group</structfield></term>
+                                    <listitem>
+                                        <para>Группа пользователя</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <structfield>status</structfield></term>
+                                    <listitem>
+                                        <para>Статус пользователя. true - подключен, false - отключен</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <structfield>aonline</structfield></term>
+                                    <listitem>
+                                        <para>Признак "Always Online"</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <structfield>down</structfield></term>
+                                    <listitem>
+                                        <para>Пользователь отключен</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <structfield>passive</structfield></term>
+                                    <listitem>
+                                        <para>Пользователь "заморожен"</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>boolean <structfield>disableddetailstat</structfield></term>
+                                    <listitem>
+                                        <para>Для пользователя отключено ведение детальной статистики</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>string <structfield>ips</structfield></term>
+                                    <listitem>
+                                        <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
+                                    </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                    <term>struct <structfield>traff</structfield></term>
+                                    <listitem>
+                                        <para>Информация о трафике</para>
+                                        <variablelist>
+                                            <varlistentry>
+                                                <term>array of i8 <structfield>mu</structfield></term>
+                                                <listitem>
+                                                    <para>Исходяий трафик за месяц (по направлениям)</para>
+                                                </listitem>
+                                            </varlistentry>
+                                            <varlistentry>
+                                                <term>array of i8 <structfield>md</structfield></term>
+                                                <listitem>
+                                                    <para>Входящий трафик за месяц (по направлениям)</para>
+                                                </listitem>
+                                            </varlistentry>
+                                        </variablelist>
+                                    </listitem>
+                                </varlistentry>
+                            </variablelist>
+                        </para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
+                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
+                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
+                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
+                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
+                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
+                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
+                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.del_user">
+        <refmeta>
+            <refentrytitle>stargazer.del_user</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.del_user</refname>
+            <refpurpose>Удаление пользователя</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.del_user</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.del_user</function> удаляет из системы пользователя с указанным логином.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин пользователя</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
+                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
+                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
+                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
+                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
+                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
+                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
+                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.add_user_cash">
+        <refmeta>
+            <refentrytitle>stargazer.add_user_cash</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.add_user_cash</refname>
+            <refpurpose>Добавление денег на счет пользователя</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.add_user_cash</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                    <paramdef>double <parameter>amount</parameter></paramdef>
+                    <paramdef>string <parameter>comment</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.add_user_cash</function> позволяет добавить деньги на счет указанного пользователя.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин пользователя</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>double <parameter>amount</parameter></term>
+                    <listitem>
+                        <para>Добавляемая сумма</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>comment</parameter></term>
+                    <listitem>
+                        <para>Коментарий</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
+                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
+                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
+                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
+                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
+                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
+                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
+                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.set_user_cash">
+        <refmeta>
+            <refentrytitle>stargazer.set_user_cash</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.set_user_cash</refname>
+            <refpurpose>Установка состояния счета пользователя</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.set_user_cash</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                    <paramdef>double <parameter>cash</parameter></paramdef>
+                    <paramdef>string <parameter>comment</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.set_user_cash</function> позволяет установить состояние счета пользователя.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин пользователя</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>double <parameter>cash</parameter></term>
+                    <listitem>
+                        <para>Устанавливаемая сумма</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>comment</parameter></term>
+                    <listitem>
+                        <para>Коментарий</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
+                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
+                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
+                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
+                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
+                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
+                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
+                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.chg_user_tariff">
+        <refmeta>
+            <refentrytitle>stargazer.chg_user_tariff</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.chg_user_tariff</refname>
+            <refpurpose>Изменение тарифного плана пользователя</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.chg_user_tariff</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>string <parameter>login</parameter></paramdef>
+                    <paramdef>string <parameter>tariff</parameter></paramdef>
+                    <paramdef>boolean <parameter>delayed</parameter></paramdef>
+                    <paramdef>string <parameter>comment</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.chg_user_tariff</function> позволяет изменить тарифный план пользователя или запланировать его изменение на начало нового месяца.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>login</parameter></term>
+                    <listitem>
+                        <para>Логин пользователя</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>tariff</parameter></term>
+                    <listitem>
+                        <para>Название нового тарифа</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>boolean <parameter>delayed</parameter></term>
+                    <listitem>
+                        <para>Отложенное изменение тарифа (в начале следующего месяца)</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>string <parameter>comment</parameter></term>
+                    <listitem>
+                        <para>Коментарий</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает true в случае успеха и false в случае неудачи</para>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
+                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
+                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
+                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
+                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
+                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
+                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>
+                <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+    <refentry id="stargazer.get_online_ips">
+        <refmeta>
+            <refentrytitle>stargazer.get_online_ips</refentrytitle>
+        </refmeta>
+        <refnamediv>
+            <refname>stargazer.get_online_ips</refname>
+            <refpurpose>Получение списка IP-адресов online-пользователей</refpurpose>
+        </refnamediv>
+        <refsynopsisdiv>
+            <funcsynopsis>
+                <funcprototype>
+                    <funcdef><function>stargazer.get_online_ips</function></funcdef>
+                    <paramdef>string <parameter>cookie</parameter></paramdef>
+                    <paramdef>array of strings <parameter>subnets</parameter></paramdef>
+                </funcprototype>
+            </funcsynopsis>
+        </refsynopsisdiv>
+        <refsect1>
+            <title>Description</title>
+            <para>Метод <function>stargazer.get_online_ips</function> позволяет получить список IP-адресов авторизованных пользователей системы для указанного списка подсетей.</para>
+            <variablelist>
+                <varlistentry>
+                    <term>string <parameter>cookie</parameter></term>
+                    <listitem>
+                        <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>array of strings <parameter>subnets</parameter></term>
+                    <listitem>
+                        <para>Список подсетей в CIDR-нотации</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <refsect2>
+                <title>Return Value</title>
+                <para>Возвращает структуру:</para>
+                <variablelist>
+                    <varlistentry>
+                        <term>bool <structfield>result</structfield></term>
+                        <listitem>
+                            <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie).</para>
+                        </listitem>
+                    </varlistentry>
+                    <varlistentry>
+                        <term>array of strings <structfield>ips</structfield></term>
+                        <listitem>
+                            <para>Список IP-адресов авторизованных пользователей из этих подсетей</para>
+                        </listitem>
+                    </varlistentry>
+                </variablelist>
+            </refsect2>
+        </refsect1>
+        <refsect1>
+            <title>See also</title>
+            <para>
+                <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
+                <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
+                <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
+                <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
+                <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
+                <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
+                <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>
+                <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
+            </para>
+        </refsect1>
+    </refentry>
+</chapter>
diff --git a/doc/xmlrpc/API.xml b/doc/xmlrpc/API.xml
new file mode 100644 (file)
index 0000000..173c65c
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<book xmlns="http://docbook.org/ns/docbook"
+      xmlns:xi="http://www.w3.org/2001/XInclude">
+    <bookinfo>
+        <title>Описание XML-RPC API биллинговой системы Stargazer</title>
+        <author>i
+            <firstname>Maxim</firstname>
+            <surname>Mamontov</surname>
+            <email>faust@stg.dp.ua</email>
+        </author>
+        <date>22.05.2009</date>
+    </bookinfo>
+    <preface>
+        <title>Предисловие</title>
+        <para>XML-RPC API предоставляется посредством плагина mod_conf_rpc.so. Для его использования необходимо установить библиотеку xmlrpc-c версии не ниже 1.16.0.</para>
+        <para>Все API-вызовы сгруппированы по 4 категориям:</para>
+        <itemizedlist mark='opencircle'>
+            <listitem><para>Системные (авторизация, информация о системе и т.д.)</para></listitem>
+            <listitem><para>Управление пользователями</para></listitem>
+            <listitem><para>Управление тарифами</para></listitem>
+            <listitem><para>Управление админами</para></listitem>
+        </itemizedlist>
+        <para>Имя каждого вызова начинается с префикса "stargazer." (точка в конце обязательна). Обычно состоит из глагола, обозначающего дейстиве, и существительного, обозначающего объект. Например: <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link> или <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>.</para>
+        <para>Работа с системой имеет сессионный характер. При авторизации администратора в системе для него открывается сессия, идентифицируемая по сессионному cookie. Сессионный cookie &#151; уникальная строка, длиной в 64 символа, передаваемая во все API-вызовы в качетсве одного из параметров. Время жизни сессионного cookie ограничено вызовом <link linkend="stargazer.logout"><function>stargazer.logout</function></link> и тайм-аутом. Тайм-аут отсчитывается с момента последнего вызова API и конфигурируется на стороне сервера. Количество одновременно открытых сессий ограничено только ресурсами системы.</para>
+        <para>Вызовы <link linkend="stargazer.login"><function>stargazer.login</function></link> и <link linkend="stargazer.info"><function>stargazer.info</function></link> не требуют сессионного cookie.</para>
+        <para>Вызовы не предусматривающие возвращение какой-либо информации (например, <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link> или <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>) возвращают результат типа boolean. true в случае успеха и false в случае неудачи. Если вызов возвращает какую-нибуть информацию (например, <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>) то в нее добавляется поле result типа boolean. Оно принимает значение true в случае успешного вызова и false в случае неудачи. Это поле является обязательным для всех возвращаемых структур.</para>
+    </preface>
+    <xi:include href="API-system.xml"/>
+    <xi:include href="API-tariffs.xml"/>
+    <xi:include href="API-user.xml"/>
+    <xi:include href="API-messages.xml"/>
+    <xi:include href="API-admins.xml"/>
+</book>
diff --git a/doc/xmlrpc/Makefile b/doc/xmlrpc/Makefile
new file mode 100644 (file)
index 0000000..d46679c
--- /dev/null
@@ -0,0 +1,5 @@
+all:
+       xsltproc -o book/ --xinclude /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/html/chunk.xsl API.xml
+
+clean:
+       rm book/*html