Skip to content

Commit a3d1b85

Browse files
committed
docs: Public headers, Core/toxcore -> Tox/the Tox library
Toxcore public header documentation suffers from an identity crisis. It calls itself three different things: Tox, toxcore and Core, depending on the time period the comment was written in, the author of the comment, whether the comment refers to the Tox instance or the Tox[core] library (it doesn't seem like anything refers to the Tox protocol?), and maybe some other nuances. No one really calls it Core though, so this commit replaces the use of Core with Tox/toxcore, and edits other instances of the documentation referring to the library where I thought rewording was in order, though in the end it's more of a subjective personal preference.
1 parent f78d0f3 commit a3d1b85

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

toxav/toxav.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
*
1313
* @section av_events Events and callbacks
1414
*
15-
* As in Core API, events are handled by callbacks. One callback can be
15+
* As in the toxcore API, events are handled by callbacks. One callback can be
1616
* registered per event. All events have a callback function type named
1717
* `toxav_{event}_cb` and a function to register it named
1818
* `toxav_callback_{event}`. Passing a NULL callback will result in no callback
1919
* being registered for that event. Only one callback per event can be
2020
* registered, so if a client needs multiple event listeners, it needs to
21-
* implement the dispatch functionality itself. Unlike Core API, lack of some
22-
* event handlers will cause the the library to drop calls before they are
21+
* implement the dispatch functionality itself. Unlike the toxcore API, lack of
22+
* some event handlers will cause the the library to drop calls before they are
2323
* started. Hanging up call from a callback causes undefined behaviour.
2424
*
2525
* @section av_threading Threading implications
@@ -609,8 +609,8 @@ bool toxav_audio_set_bit_rate(ToxAV *av, uint32_t friend_number, uint32_t bit_ra
609609

610610
/**
611611
* The function type for the audio_bit_rate callback. The event is triggered
612-
* when the network becomes too saturated for current bit rates at which
613-
* point core suggests new bit rates.
612+
* when the network becomes too saturated for current bit rates at which point
613+
* ToxAV suggests new bit rates.
614614
*
615615
* @param friend_number The friend number of the friend for which to set the
616616
* bit rate.
@@ -659,8 +659,8 @@ bool toxav_video_set_bit_rate(ToxAV *av, uint32_t friend_number, uint32_t bit_ra
659659

660660
/**
661661
* The function type for the video_bit_rate callback. The event is triggered
662-
* when the network becomes too saturated for current bit rates at which
663-
* point core suggests new bit rates.
662+
* when the network becomes too saturated for current bit rates at which point
663+
* ToxAV suggests new bit rates.
664664
*
665665
* @param friend_number The friend number of the friend for which to set the
666666
* bit rate.

toxcore/tox.h

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ bool tox_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch);
197197
*
198198
* The values of these are not part of the ABI. Prefer to use the function
199199
* versions of them for code that should remain compatible with future versions
200-
* of toxcore.
200+
* of the Tox library.
201201
*/
202202

203203
/**
@@ -473,8 +473,7 @@ typedef enum Tox_Log_Level {
473473
const char *tox_log_level_to_string(Tox_Log_Level value);
474474

475475
/**
476-
* @brief This event is triggered when the toxcore library logs an internal
477-
* message.
476+
* @brief This event is triggered when Tox logs an internal message.
478477
*
479478
* This is mostly useful for debugging. This callback can be called from any
480479
* function, not just tox_iterate. This means the user data lifetime must at
@@ -541,8 +540,8 @@ struct Tox_Options {
541540
* need to be relayed through a TCP relay node, potentially slowing them
542541
* down.
543542
*
544-
* If a proxy is enabled, UDP will be disabled if either toxcore or the
545-
* proxy don't support proxying UDP messages.
543+
* If a proxy is enabled, UDP will be disabled if either the Tox library or
544+
* the proxy don't support proxying UDP messages.
546545
*/
547546
bool udp_enabled;
548547

@@ -621,7 +620,7 @@ struct Tox_Options {
621620
uint16_t tcp_port;
622621

623622
/**
624-
* Enables or disables UDP hole-punching in toxcore. (Default: enabled).
623+
* Enables or disables UDP hole-punching. (Default: enabled).
625624
*/
626625
bool hole_punching_enabled;
627626

@@ -633,8 +632,8 @@ struct Tox_Options {
633632
/**
634633
* The savedata.
635634
*
636-
* The data pointed at by this member is owned by the user, so must
637-
* outlive the options object.
635+
* The data pointed at by this member is owned by the user, so must outlive
636+
* the options object.
638637
*/
639638
const uint8_t *savedata_data;
640639

@@ -1934,9 +1933,9 @@ bool tox_hash(uint8_t hash[TOX_HASH_LENGTH], const uint8_t data[], size_t length
19341933
/**
19351934
* @brief A list of pre-defined file kinds.
19361935
*
1937-
* Toxcore itself does not behave differently for different file kinds. These
1938-
* are a hint to the client telling it what use the sender intended for the
1939-
* file. The `kind` parameter in the send function and recv callback are
1936+
* The Tox library itself does not behave differently for different file kinds.
1937+
* These are a hint to the client telling it what use the sender intended for
1938+
* the file. The `kind` parameter in the send function and recv callback are
19401939
* `uint32_t`, not Tox_File_Kind, because clients can invent their own file
19411940
* kind. Unknown file kinds should be treated as TOX_FILE_KIND_DATA.
19421941
*/
@@ -2240,8 +2239,8 @@ const char *tox_err_file_send_to_string(Tox_Err_File_Send value);
22402239
* File transmission occurs in chunks, which are requested through the
22412240
* `file_chunk_request` event.
22422241
*
2243-
* When a friend goes offline, all file transfers associated with the friend are
2244-
* purged from core.
2242+
* When a friend goes offline, all file transfers associated with the friend get
2243+
* purged.
22452244
*
22462245
* If the file contents change during a transfer, the behaviour is unspecified
22472246
* in general. What will actually happen depends on the mode in which the file
@@ -2251,7 +2250,7 @@ const char *tox_err_file_send_to_string(Tox_Err_File_Send value);
22512250
* - and sending mode was streaming (file_size = UINT64_MAX), the behaviour
22522251
* will be as expected.
22532252
* - and sending mode was file (file_size != UINT64_MAX), the
2254-
* file_chunk_request callback will receive length = 0 when Core thinks the
2253+
* file_chunk_request callback will receive length = 0 when Tox thinks the
22552254
* file transfer has finished. If the client remembers the file size as it
22562255
* was when sending the request, it will terminate the transfer normally. If
22572256
* the client re-reads the size, it will think the friend cancelled the
@@ -2275,9 +2274,9 @@ const char *tox_err_file_send_to_string(Tox_Err_File_Send value);
22752274
* @param file_size Size in bytes of the file the client wants to send,
22762275
* UINT64_MAX if unknown or streaming.
22772276
* @param file_id A file identifier of length TOX_FILE_ID_LENGTH that can be
2278-
* used to uniquely identify file transfers across core restarts. If NULL, a
2279-
* random one will be generated by core. It can then be obtained by using
2280-
* `tox_file_get_file_id()`.
2277+
* used to uniquely identify file transfers across Tox restarts. If NULL, a
2278+
* random one will be generated by the library. It can then be obtained by
2279+
* using `tox_file_get_file_id()`.
22812280
* @param filename Name of the file. Does not need to be the actual name. This
22822281
* name will be sent along with the file send request.
22832282
* @param filename_length Size in bytes of the filename.
@@ -2355,9 +2354,9 @@ const char *tox_err_file_send_chunk_to_string(Tox_Err_File_Send_Chunk value);
23552354
* This function is called in response to the `file_chunk_request` callback. The
23562355
* length parameter should be equal to the one received though the callback.
23572356
* If it is zero, the transfer is assumed complete. For files with known size,
2358-
* Core will know that the transfer is complete after the last byte has been
2357+
* Tox will know that the transfer is complete after the last byte has been
23592358
* received, so it is not necessary (though not harmful) to send a zero-length
2360-
* chunk to terminate. For streams, core will know that the transfer is finished
2359+
* chunk to terminate. For streams, Tox will know that the transfer is finished
23612360
* if a chunk with length less than the length requested in the callback is
23622361
* sent.
23632362
*
@@ -2401,7 +2400,7 @@ typedef void tox_file_chunk_request_cb(
24012400
*
24022401
* Pass NULL to unset.
24032402
*
2404-
* This event is triggered when Core is ready to send more file data.
2403+
* This event is triggered when Tox is ready to send more file data.
24052404
*/
24062405
void tox_callback_file_chunk_request(Tox *tox, tox_file_chunk_request_cb *callback);
24072406

@@ -2921,7 +2920,7 @@ const char *tox_err_conference_join_to_string(Tox_Err_Conference_Join value);
29212920
* to it until a handshaking procedure has been completed. A
29222921
* `conference_connected` event will then occur for the conference. The client
29232922
* will then remain connected to the conference until the conference is deleted,
2924-
* even across core restarts. Many operations on a conference will fail with a
2923+
* even across Tox restarts. Many operations on a conference will fail with a
29252924
* corresponding error if attempted on a conference to which the client is not
29262925
* yet connected.
29272926
*
@@ -3075,8 +3074,8 @@ size_t tox_conference_get_chatlist_size(const Tox *tox);
30753074
* Determine how much space to allocate for the array with the
30763075
* `tox_conference_get_chatlist_size` function.
30773076
*
3078-
* Note that `tox_get_savedata` saves all connected conferences;
3079-
* when toxcore is created from savedata in which conferences were saved, those
3077+
* Note that `tox_get_savedata` saves all connected conferences; when a Tox
3078+
* instance is created from savedata in which conferences were saved, those
30803079
* conferences will be connected at startup, and will be listed by
30813080
* `tox_conference_get_chatlist`.
30823081
*

0 commit comments

Comments
 (0)