Skip to content

Commit a1e2458

Browse files
committed
docs: Fix doxygen config and remove some redundant comments.
Doxygen doesn't like these. We should probably remove all redundant comments, but this was the set of comments doxygen complained about.
1 parent b0f6331 commit a1e2458

File tree

5 files changed

+2
-200
lines changed

5 files changed

+2
-200
lines changed

docs/Doxyfile

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,17 +1614,6 @@ HTML_FORMULA_FORMAT = png
16141614

16151615
FORMULA_FONTSIZE = 10
16161616

1617-
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
1618-
# generated for formulas are transparent PNGs. Transparent PNGs are not
1619-
# supported properly for IE 6.0, but are supported on all modern browsers.
1620-
#
1621-
# Note that when changing this option you need to delete any form_*.png files in
1622-
# the HTML output directory before the changes have effect.
1623-
# The default value is: YES.
1624-
# This tag requires that the tag GENERATE_HTML is set to YES.
1625-
1626-
FORMULA_TRANSPARENT = YES
1627-
16281617
# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
16291618
# to create new LaTeX commands to be used in formulas as building blocks. See
16301619
# the section "Including formulas" for details.
@@ -2307,15 +2296,6 @@ EXTERNAL_PAGES = YES
23072296
# Configuration options related to the dot tool
23082297
#---------------------------------------------------------------------------
23092298

2310-
# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
2311-
# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
2312-
# NO turns the diagrams off. Note that this option also works with HAVE_DOT
2313-
# disabled, but it is recommended to install and use dot, since it yields more
2314-
# powerful graphs.
2315-
# The default value is: YES.
2316-
2317-
CLASS_DIAGRAMS = YES
2318-
23192299
# You can include diagrams made with dia in doxygen documentation. Doxygen will
23202300
# then run dia to produce the diagram and insert it in the documentation. The
23212301
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
@@ -2348,23 +2328,6 @@ HAVE_DOT = NO
23482328

23492329
DOT_NUM_THREADS = 0
23502330

2351-
# When you want a differently looking font in the dot files that doxygen
2352-
# generates you can specify the font name using DOT_FONTNAME. You need to make
2353-
# sure dot is able to find the font, which can be done by putting it in a
2354-
# standard location or by setting the DOTFONTPATH environment variable or by
2355-
# setting DOT_FONTPATH to the directory containing the font.
2356-
# The default value is: Helvetica.
2357-
# This tag requires that the tag HAVE_DOT is set to YES.
2358-
2359-
DOT_FONTNAME = Helvetica
2360-
2361-
# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
2362-
# dot graphs.
2363-
# Minimum value: 4, maximum value: 24, default value: 10.
2364-
# This tag requires that the tag HAVE_DOT is set to YES.
2365-
2366-
DOT_FONTSIZE = 10
2367-
23682331
# By default doxygen will tell dot to use the default font as specified with
23692332
# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
23702333
# the path where dot can find it using this tag.
@@ -2599,18 +2562,6 @@ DOT_GRAPH_MAX_NODES = 50
25992562

26002563
MAX_DOT_GRAPH_DEPTH = 0
26012564

2602-
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
2603-
# background. This is disabled by default, because dot on Windows does not seem
2604-
# to support this out of the box.
2605-
#
2606-
# Warning: Depending on the platform used, enabling this option may lead to
2607-
# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
2608-
# read).
2609-
# The default value is: NO.
2610-
# This tag requires that the tag HAVE_DOT is set to YES.
2611-
2612-
DOT_TRANSPARENT = NO
2613-
26142565
# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
26152566
# files in one run (i.e. multiple -o and -T options on the command line). This
26162567
# makes dot run faster, but since only newer versions of dot (>1.8.10) support
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
93c9c4ba12e450afd01aabd31ae1da970c841e13984b68969d183b11e6266e1a /usr/local/bin/tox-bootstrapd
1+
23e142729a72618462018b25c830dbad5b023d0fa3de9ae53d376f43dc46b481 /usr/local/bin/tox-bootstrapd

toxav/toxav_old.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,64 +16,23 @@ int toxav_add_av_groupchat(Tox *tox, audio_data_cb *audio_callback, void *userda
1616
return add_av_groupchat(tox->m->log, tox, tox->m->conferences_object, audio_callback, userdata);
1717
}
1818

19-
/** @brief Join a AV group (you need to have been invited first).
20-
*
21-
* @return group number on success.
22-
* @retval -1 on failure.
23-
*
24-
* Note that total size of pcm in bytes is equal to `samples * channels * sizeof(int16_t)`.
25-
*/
2619
int toxav_join_av_groupchat(Tox *tox, uint32_t friendnumber, const uint8_t *data, uint16_t length,
2720
audio_data_cb *audio_callback, void *userdata)
2821
{
2922
return join_av_groupchat(tox->m->log, tox, tox->m->conferences_object, friendnumber, data, length, audio_callback, userdata);
3023
}
3124

32-
/** @brief Send audio to the group chat.
33-
*
34-
* @retval 0 on success.
35-
* @retval -1 on failure.
36-
*
37-
* Note that total size of pcm in bytes is equal to `samples * channels * sizeof(int16_t)`.
38-
*
39-
* Valid number of samples are `(sample rate) * (audio length) / 1000`
40-
* (Valid values for audio length are: 2.5, 5, 10, 20, 40 or 60 ms)
41-
* Valid number of channels are 1 or 2.
42-
* Valid sample rates are 8000, 12000, 16000, 24000, or 48000.
43-
*
44-
* Recommended values are: samples = 960, channels = 1, sample_rate = 48000
45-
*/
4625
int toxav_group_send_audio(Tox *tox, uint32_t groupnumber, const int16_t *pcm, unsigned int samples, uint8_t channels,
4726
uint32_t sample_rate)
4827
{
4928
return group_send_audio(tox->m->conferences_object, groupnumber, pcm, samples, channels, sample_rate);
5029
}
5130

52-
/** @brief Enable A/V in a groupchat.
53-
*
54-
* A/V must be enabled on a groupchat for audio to be sent to it and for
55-
* received audio to be handled.
56-
*
57-
* An A/V group created with `toxav_add_av_groupchat` or `toxav_join_av_groupchat`
58-
* will start with A/V enabled.
59-
*
60-
* An A/V group loaded from a savefile will start with A/V disabled.
61-
*
62-
* @retval 0 on success.
63-
* @retval -1 on failure.
64-
*
65-
* Note that total size of pcm in bytes is equal to `samples * channels * sizeof(int16_t)`.
66-
*/
6731
int toxav_groupchat_enable_av(Tox *tox, uint32_t groupnumber, audio_data_cb *audio_callback, void *userdata)
6832
{
6933
return groupchat_enable_av(tox->m->log, tox, tox->m->conferences_object, groupnumber, audio_callback, userdata);
7034
}
7135

72-
/** @brief Disable A/V in a groupchat.
73-
*
74-
* @retval 0 on success.
75-
* @retval -1 on failure.
76-
*/
7736
int toxav_groupchat_disable_av(Tox *tox, uint32_t groupnumber)
7837
{
7938
return groupchat_disable_av(tox->m->conferences_object, groupnumber);

toxcore/DHT.c

Lines changed: 0 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,6 @@ static IP_Port ip_port_normalize(const IP_Port *ip_port)
211211
return res;
212212
}
213213

214-
/** @brief Compares pk1 and pk2 with pk.
215-
*
216-
* @retval 0 if both are same distance.
217-
* @retval 1 if pk1 is closer.
218-
* @retval 2 if pk2 is closer.
219-
*/
220214
int id_closest(const uint8_t *pk, const uint8_t *pk1, const uint8_t *pk2)
221215
{
222216
for (size_t i = 0; i < CRYPTO_PUBLIC_KEY_SIZE; ++i) {
@@ -280,27 +274,6 @@ const uint8_t *dht_get_shared_key_sent(DHT *dht, const uint8_t *public_key)
280274

281275
#define CRYPTO_SIZE (1 + CRYPTO_PUBLIC_KEY_SIZE * 2 + CRYPTO_NONCE_SIZE)
282276

283-
/**
284-
* @brief Create a request to peer.
285-
*
286-
* Packs the data and sender public key and encrypts the packet.
287-
*
288-
* @param[in] send_public_key public key of the sender.
289-
* @param[in] send_secret_key secret key of the sender.
290-
* @param[out] packet an array of @ref MAX_CRYPTO_REQUEST_SIZE big.
291-
* @param[in] recv_public_key public key of the receiver.
292-
* @param[in] data represents the data we send with the request.
293-
* @param[in] data_length the length of the data.
294-
* @param[in] request_id the id of the request (32 = friend request, 254 = ping request).
295-
*
296-
* @attention Constraints:
297-
* @code
298-
* sizeof(packet) >= MAX_CRYPTO_REQUEST_SIZE
299-
* @endcode
300-
*
301-
* @retval -1 on failure.
302-
* @return the length of the created packet on success.
303-
*/
304277
int create_request(const Random *rng, const uint8_t *send_public_key, const uint8_t *send_secret_key,
305278
uint8_t *packet, const uint8_t *recv_public_key,
306279
const uint8_t *data, uint32_t data_length, uint8_t request_id)
@@ -334,28 +307,6 @@ int create_request(const Random *rng, const uint8_t *send_public_key, const uint
334307
return len + CRYPTO_SIZE;
335308
}
336309

337-
/**
338-
* @brief Decrypts and unpacks a DHT request packet.
339-
*
340-
* Puts the senders public key in the request in @p public_key, the data from
341-
* the request in @p data.
342-
*
343-
* @param[in] self_public_key public key of the receiver (us).
344-
* @param[in] self_secret_key secret key of the receiver (us).
345-
* @param[out] public_key public key of the sender, copied from the input packet.
346-
* @param[out] data decrypted request data, copied from the input packet, must
347-
* have room for @ref MAX_CRYPTO_REQUEST_SIZE bytes.
348-
* @param[in] packet is the request packet.
349-
* @param[in] packet_length length of the packet.
350-
*
351-
* @attention Constraints:
352-
* @code
353-
* sizeof(data) >= MAX_CRYPTO_REQUEST_SIZE
354-
* @endcode
355-
*
356-
* @retval -1 if not valid request.
357-
* @return the length of the unpacked data.
358-
*/
359310
int handle_request(const uint8_t *self_public_key, const uint8_t *self_secret_key, uint8_t *public_key, uint8_t *data,
360311
uint8_t *request_id, const uint8_t *packet, uint16_t packet_length)
361312
{
@@ -394,9 +345,6 @@ int handle_request(const uint8_t *self_public_key, const uint8_t *self_secret_ke
394345
return len1;
395346
}
396347

397-
/** @return packet size of packed node with ip_family on success.
398-
* @retval -1 on failure.
399-
*/
400348
int packed_node_size(Family ip_family)
401349
{
402350
if (net_family_is_ipv4(ip_family) || net_family_is_tcp_ipv4(ip_family)) {
@@ -411,13 +359,6 @@ int packed_node_size(Family ip_family)
411359
}
412360

413361

414-
/** @brief Pack an IP_Port structure into data of max size length.
415-
*
416-
* Packed_length is the offset of data currently packed.
417-
*
418-
* @return size of packed IP_Port data on success.
419-
* @retval -1 on failure.
420-
*/
421362
int pack_ip_port(const Logger *logger, uint8_t *data, uint16_t length, const IP_Port *ip_port)
422363
{
423364
if (data == nullptr) {
@@ -473,11 +414,6 @@ int pack_ip_port(const Logger *logger, uint8_t *data, uint16_t length, const IP_
473414
}
474415
}
475416

476-
/** @brief Encrypt plain and write resulting DHT packet into packet with max size length.
477-
*
478-
* @return size of packet on success.
479-
* @retval -1 on failure.
480-
*/
481417
int dht_create_packet(const Random *rng, const uint8_t public_key[CRYPTO_PUBLIC_KEY_SIZE],
482418
const uint8_t *shared_key, const uint8_t type,
483419
const uint8_t *plain, size_t plain_length,
@@ -513,13 +449,6 @@ int dht_create_packet(const Random *rng, const uint8_t public_key[CRYPTO_PUBLIC_
513449
return 1 + CRYPTO_PUBLIC_KEY_SIZE + CRYPTO_NONCE_SIZE + encrypted_length;
514450
}
515451

516-
/** @brief Unpack IP_Port structure from data of max size length into ip_port.
517-
*
518-
* len_processed is the offset of data currently unpacked.
519-
*
520-
* @return size of unpacked ip_port on success.
521-
* @retval -1 on failure.
522-
*/
523452
int unpack_ip_port(IP_Port *ip_port, const uint8_t *data, uint16_t length, bool tcp_enabled)
524453
{
525454
if (data == nullptr) {
@@ -580,11 +509,6 @@ int unpack_ip_port(IP_Port *ip_port, const uint8_t *data, uint16_t length, bool
580509
}
581510
}
582511

583-
/** @brief Pack number of nodes into data of maxlength length.
584-
*
585-
* @return length of packed nodes on success.
586-
* @retval -1 on failure.
587-
*/
588512
int pack_nodes(const Logger *logger, uint8_t *data, uint16_t length, const Node_format *nodes, uint16_t number)
589513
{
590514
uint32_t packed_length = 0;
@@ -614,13 +538,6 @@ int pack_nodes(const Logger *logger, uint8_t *data, uint16_t length, const Node_
614538
return packed_length;
615539
}
616540

617-
/** @brief Unpack data of length into nodes of size max_num_nodes.
618-
* Put the length of the data processed in processed_data_len.
619-
* tcp_enabled sets if TCP nodes are expected (true) or not (false).
620-
*
621-
* @return number of unpacked nodes on success.
622-
* @retval -1 on failure.
623-
*/
624541
int unpack_nodes(Node_format *nodes, uint16_t max_num_nodes, uint16_t *processed_data_len, const uint8_t *data,
625542
uint16_t length, bool tcp_enabled)
626543
{
@@ -2043,11 +1960,6 @@ int dht_bootstrap_from_address(DHT *dht, const char *address, bool ipv6enabled,
20431960
return 0;
20441961
}
20451962

2046-
/** @brief Send the given packet to node with public_key.
2047-
*
2048-
* @return number of bytes sent.
2049-
* @retval -1 if failure.
2050-
*/
20511963
int route_packet(const DHT *dht, const uint8_t *public_key, const uint8_t *packet, uint16_t length)
20521964
{
20531965
for (uint32_t i = 0; i < LCLIENT_LIST; ++i) {
@@ -2923,11 +2835,6 @@ void dht_save(const DHT *dht, uint8_t *data)
29232835
/** Bootstrap from this number of nodes every time `dht_connect_after_load()` is called */
29242836
#define SAVE_BOOTSTAP_FREQUENCY 8
29252837

2926-
/** @brief Start sending packets after DHT loaded_friends_list and loaded_clients_list are set.
2927-
*
2928-
* @retval 0 if successful
2929-
* @retval -1 otherwise
2930-
*/
29312838
int dht_connect_after_load(DHT *dht)
29322839
{
29332840
if (dht == nullptr) {
@@ -2997,11 +2904,6 @@ static State_Load_Status dht_load_state_callback(void *outer, const uint8_t *dat
29972904
return STATE_LOAD_STATUS_CONTINUE;
29982905
}
29992906

3000-
/** @brief Load the DHT from data of size size.
3001-
*
3002-
* @retval -1 if failure.
3003-
* @retval 0 if success.
3004-
*/
30052907
int dht_load(DHT *dht, const uint8_t *data, uint32_t length)
30062908
{
30072909
const uint32_t cookie_len = sizeof(uint32_t);
@@ -3060,16 +2962,6 @@ bool dht_non_lan_connected(const DHT *dht)
30602962
return false;
30612963
}
30622964

3063-
/** @brief Copies our own ip_port structure to `dest`.
3064-
*
3065-
* WAN addresses take priority over LAN addresses.
3066-
*
3067-
* This function will zero the `dest` buffer before use.
3068-
*
3069-
* @retval 0 if our ip port can't be found (this usually means we're not connected to the DHT).
3070-
* @retval 1 if IP is a WAN address.
3071-
* @retval 2 if IP is a LAN address.
3072-
*/
30732965
unsigned int ipport_self_copy(const DHT *dht, IP_Port *dest)
30742966
{
30752967
ipport_reset(dest);

toxcore/crypto_core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ int32_t decrypt_data(const uint8_t *public_key, const uint8_t *secret_key, const
358358
/**
359359
* @brief Fast encrypt/decrypt operations.
360360
*
361-
* Use if this is not a one-time communication. @ref encrypt_precompute does the
361+
* Use if this is not a one-time communication. `encrypt_precompute` does the
362362
* shared-key generation once so it does not have to be performed on every
363363
* encrypt/decrypt.
364364
*/

0 commit comments

Comments
 (0)