Skip to content

Commit

Permalink
doc: Add doxygen configuration and netlify publishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Feb 5, 2022
1 parent 7f0395b commit 2ed9b19
Show file tree
Hide file tree
Showing 8 changed files with 3,081 additions and 389 deletions.
2,638 changes: 2,638 additions & 0 deletions .doxygen.conf

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -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"
17 changes: 17 additions & 0 deletions other/docker/doxygen/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 changes: 6 additions & 0 deletions other/docker/doxygen/run
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions toxav/rtp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
122 changes: 52 additions & 70 deletions toxav/toxav.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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.
*/
#ifndef TOXAV_DEFINED
#define TOXAV_DEFINED
typedef struct ToxAV ToxAV;
#endif /* TOXAV_DEFINED */


/*******************************************************************************
*
* :: Creation and destruction
* @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.
*/
typedef struct ToxAV ToxAV;


/** @{
* @brief Creation and destruction
*/

typedef enum Toxav_Err_New {

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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
Loading

0 comments on commit 2ed9b19

Please sign in to comment.