doc: Add doxygen configuration and netlify publishing.

This commit is contained in:
iphydf 2022-02-05 14:37:01 +00:00
parent 7f0395b746
commit 2ed9b1927f
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
8 changed files with 3080 additions and 388 deletions

2638
.doxygen.conf Normal file

File diff suppressed because it is too large Load Diff

10
netlify.toml Normal file
View File

@ -0,0 +1,10 @@
[build]
command = """\
if cd doxygen-awesome-css; then \
git pull && cd ..; \
else \
git clone --depth=1 https://github.com/jothepro/doxygen-awesome-css.git;
fi && \
doxygen .doxygen.conf \
"""
publish = "_docs/html"

View File

@ -0,0 +1,17 @@
FROM alpine:latest AS build
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_CTYPE=en_US.UTF-8 \
LC_ALL=en_US.UTF-8
RUN apk add --no-cache doxygen git graphviz \
&& git clone --depth=1 https://github.com/jothepro/doxygen-awesome-css.git /work/doxygen-awesome-css
WORKDIR /work
COPY . /work/
RUN cat .doxygen.conf > doxygen.conf \
&& echo "WARN_AS_ERROR = YES" >> doxygen.conf \
&& doxygen doxygen.conf
FROM nginx:alpine
COPY --from=build /work/_docs/html/ /usr/share/nginx/html/

6
other/docker/doxygen/run Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
set -eux
docker build -t toxchat/toxcore:docs -f other/docker/doxygen/Dockerfile .
docker run --rm -it -p "28192:80" toxchat/toxcore:docs

View File

@ -24,6 +24,15 @@ sh_test(
tags = ["haskell"],
)
sh_test(
name = "cimplefmt_test",
size = "small",
srcs = ["//hs-cimple/tools:cimplefmt"],
args = ["$(locations %s)" % f for f in CIMPLE_FILES],
data = CIMPLE_FILES,
tags = ["haskell"],
)
cc_library(
name = "misc_tools",
testonly = 1,

View File

@ -70,7 +70,7 @@ struct RTPHeader {
/* Non-standard Tox-specific fields */
/**
* Bit mask of \ref RTPFlags setting features of the current frame.
* Bit mask of \c RTPFlags setting features of the current frame.
*/
uint64_t flags;
@ -106,7 +106,7 @@ struct RTPMessage {
* This is used in the old code that doesn't deal with large frames, i.e.
* the audio code or receiving code for old 16 bit messages. We use it to
* record the number of bytes received so far in a multi-part message. The
* multi-part message in the old code is stored in \ref RTPSession::mp.
* multi-part message in the old code is stored in \c RTPSession::mp.
*/
uint16_t len;

View File

@ -3,13 +3,13 @@
* Copyright © 2013-2015 Tox project.
*/
/** \page av Public audio/video API for Tox clients.
/** @file toxav.h
* @brief Public audio/video API for Tox clients.
*
* This API can handle multiple calls. Each call has its state, in very rare
* occasions the library can change the state of the call without apps knowledge.
*
*
* \subsection events Events and callbacks
* @section av_events Events and callbacks
*
* As in Core API, events are handled by callbacks. One callback can be
* registered per event. All events have a callback function type named
@ -21,8 +21,7 @@
* library to drop calls before they are started. Hanging up call from a
* callback causes undefined behaviour.
*
*
* \subsection threading Threading implications
* @section av_threading Threading implications
*
* Only toxav_iterate is thread-safe, all other functions must run from the
* tox thread.
@ -43,7 +42,7 @@
* fail if mutexes are held by tox thread in which case they will set SYNC
* error code.
*
* \subsection multi-threading Separate audio and video threads
* @subsection av_multi_threading Separate audio and video threads
*
* ToxAV supports either a single thread for audio and video or decoding and
* encoding them in separate threads. You have to choose one mode and can not
@ -72,25 +71,20 @@ typedef struct Tox Tox;
#endif /* TOX_DEFINED */
/**
* The ToxAV instance type. Each ToxAV instance can be bound to only one Tox
* instance, and Tox instance can have only one ToxAV instance. One must make
* sure to close ToxAV instance prior closing Tox instance otherwise undefined
* behaviour occurs. Upon closing of ToxAV instance, all active calls will be
* forcibly terminated without notifying peers.
* @brief The ToxAV instance type.
*
* Each ToxAV instance can be bound to only one Tox instance, and Tox instance
* can have only one ToxAV instance. One must make sure to close ToxAV instance
* prior closing Tox instance otherwise undefined behaviour occurs. Upon
* closing of ToxAV instance, all active calls will be forcibly terminated
* without notifying peers.
*/
#ifndef TOXAV_DEFINED
#define TOXAV_DEFINED
typedef struct ToxAV ToxAV;
#endif /* TOXAV_DEFINED */
/*******************************************************************************
*
* :: Creation and destruction
*
******************************************************************************/
/** @{
* @brief Creation and destruction
*/
typedef enum Toxav_Err_New {
@ -137,14 +131,12 @@ void toxav_kill(ToxAV *av);
*/
Tox *toxav_get_tox(const ToxAV *av);
/*******************************************************************************
*
* :: A/V event loop, single thread
*
******************************************************************************/
/** @} */
/** @{
* @brief A/V event loop, single thread
*/
/**
* Returns the interval in milliseconds when the next toxav_iterate call should
@ -160,14 +152,12 @@ uint32_t toxav_iteration_interval(const ToxAV *av);
*/
void toxav_iterate(ToxAV *av);
/*******************************************************************************
*
* :: A/V event loop, multiple threads
*
******************************************************************************/
/** @} */
/** @{
* @brief A/V event loop, multiple threads
*/
/**
* Returns the interval in milliseconds when the next toxav_audio_iterate call
@ -201,14 +191,12 @@ uint32_t toxav_video_iteration_interval(const ToxAV *av);
*/
void toxav_video_iterate(ToxAV *av);
/*******************************************************************************
*
* :: Call setup
*
******************************************************************************/
/** @} */
/** @{
* @brief Call setup
*/
typedef enum Toxav_Err_Call {
@ -339,14 +327,12 @@ typedef enum Toxav_Err_Answer {
bool toxav_answer(ToxAV *av, uint32_t friend_number, uint32_t audio_bit_rate, uint32_t video_bit_rate,
Toxav_Err_Answer *error);
/*******************************************************************************
*
* :: Call state graph
*
******************************************************************************/
/** @} */
/** @{
* @brief Call state graph
*/
enum Toxav_Friend_Call_State {
@ -411,14 +397,12 @@ typedef void toxav_call_state_cb(ToxAV *av, uint32_t friend_number, uint32_t sta
*/
void toxav_callback_call_state(ToxAV *av, toxav_call_state_cb *callback, void *user_data);
/*******************************************************************************
*
* :: Call control
*
******************************************************************************/
/** @} */
/** @{
* @brief Call control
*/
typedef enum Toxav_Call_Control {
@ -509,14 +493,12 @@ typedef enum Toxav_Err_Call_Control {
*/
bool toxav_call_control(ToxAV *av, uint32_t friend_number, Toxav_Call_Control control, Toxav_Err_Call_Control *error);
/*******************************************************************************
*
* :: Controlling bit rates
*
******************************************************************************/
/** @} */
/** @{
* @brief Controlling bit rates
*/
typedef enum Toxav_Err_Bit_Rate_Set {
@ -547,15 +529,13 @@ typedef enum Toxav_Err_Bit_Rate_Set {
} Toxav_Err_Bit_Rate_Set;
/** @} */
/*******************************************************************************
*
* :: A/V sending
*
******************************************************************************/
/** @{
* @brief A/V sending
*/
typedef enum Toxav_Err_Send_Frame {
@ -704,14 +684,12 @@ typedef void toxav_video_bit_rate_cb(ToxAV *av, uint32_t friend_number, uint32_t
*/
void toxav_callback_video_bit_rate(ToxAV *av, toxav_video_bit_rate_cb *callback, void *user_data);
/*******************************************************************************
*
* :: A/V receiving
*
******************************************************************************/
/** @} */
/** @{
* @brief A/V receiving
*/
/**
* The function type for the audio_receive_frame callback. The callback can be
@ -847,11 +825,14 @@ int toxav_groupchat_disable_av(Tox *tox, uint32_t groupnumber);
*/
bool toxav_groupchat_av_enabled(Tox *tox, uint32_t groupnumber);
/** @} */
#ifdef __cplusplus
}
#endif
//!TOKSTYLE-
#ifdef DOXYGEN_IGNORE
typedef Toxav_Err_Call TOXAV_ERR_CALL;
typedef Toxav_Err_New TOXAV_ERR_NEW;
@ -862,6 +843,7 @@ typedef Toxav_Err_Send_Frame TOXAV_ERR_SEND_FRAME;
typedef Toxav_Call_Control TOXAV_CALL_CONTROL;
typedef enum Toxav_Friend_Call_State TOXAV_FRIEND_CALL_STATE;
#endif
//!TOKSTYLE+
#endif // C_TOXCORE_TOXAV_TOXAV_H

File diff suppressed because it is too large Load Diff