8787 * If any other thread calls tox_self_set_name while this thread is allocating
8888 * memory, the length may have become invalid, and the call to
8989 * tox_self_get_name may cause undefined behaviour.
90+ *
91+ * @section deprecations
92+ *
93+ * Some functions and types are deprecated. We recommend compiling with
94+ * `-DTOX_HIDE_DEPRECATED` to hide them. They will be removed in the next major
95+ * version of Tox (and since we're in major version 0, that means the next
96+ * minor version).
9097 */
9198#ifndef C_TOXCORE_TOXCORE_TOX_H
9299#define C_TOXCORE_TOXCORE_TOX_H
@@ -512,6 +519,7 @@ typedef void tox_log_cb(Tox *tox, Tox_Log_Level level, const char *file, uint32_
512519 * private) in v0.3.0.
513520 */
514521typedef struct Tox_Options Tox_Options ;
522+ #ifndef TOX_HIDE_DEPRECATED
515523struct Tox_Options {
516524
517525 /**
@@ -687,6 +695,7 @@ struct Tox_Options {
687695 */
688696 bool experimental_disable_dns ;
689697};
698+ #endif /* TOX_HIDE_DEPRECATED */
690699
691700bool tox_options_get_ipv6_enabled (const Tox_Options * options );
692701
@@ -3165,6 +3174,7 @@ const char *tox_err_conference_by_id_to_string(Tox_Err_Conference_By_Id value);
31653174Tox_Conference_Number tox_conference_by_id (
31663175 const Tox * tox , const uint8_t id [TOX_CONFERENCE_ID_SIZE ], Tox_Err_Conference_By_Id * error );
31673176
3177+ #ifndef TOX_HIDE_DEPRECATED
31683178/**
31693179 * @brief Get the conference unique ID.
31703180 *
@@ -3179,6 +3189,7 @@ Tox_Conference_Number tox_conference_by_id(
31793189 */
31803190bool tox_conference_get_uid (
31813191 const Tox * tox , Tox_Conference_Number conference_number , uint8_t uid [TOX_CONFERENCE_UID_SIZE ]);
3192+ #endif /* TOX_HIDE_DEPRECATED */
31823193
31833194typedef enum Tox_Err_Conference_By_Uid {
31843195
@@ -3201,6 +3212,7 @@ typedef enum Tox_Err_Conference_By_Uid {
32013212
32023213const char * tox_err_conference_by_uid_to_string (Tox_Err_Conference_By_Uid value );
32033214
3215+ #ifndef TOX_HIDE_DEPRECATED
32043216/**
32053217 * @brief Return the conference number associated with the specified uid.
32063218 *
@@ -3213,6 +3225,7 @@ const char *tox_err_conference_by_uid_to_string(Tox_Err_Conference_By_Uid value)
32133225 */
32143226Tox_Conference_Number tox_conference_by_uid (
32153227 const Tox * tox , const uint8_t uid [TOX_CONFERENCE_UID_SIZE ], Tox_Err_Conference_By_Uid * error );
3228+ #endif /* TOX_HIDE_DEPRECATED */
32163229
32173230/** @} */
32183231
@@ -3820,6 +3833,7 @@ typedef enum Tox_Err_Group_Reconnect {
38203833
38213834const char * tox_err_group_reconnect_to_string (Tox_Err_Group_Reconnect value );
38223835
3836+ #ifndef TOX_HIDE_DEPRECATED
38233837/**
38243838 * Reconnects to a group.
38253839 *
@@ -3834,6 +3848,7 @@ const char *tox_err_group_reconnect_to_string(Tox_Err_Group_Reconnect value);
38343848 * @deprecated Use `tox_group_join` instead.
38353849 */
38363850bool tox_group_reconnect (Tox * tox , Tox_Group_Number group_number , Tox_Err_Group_Reconnect * error );
3851+ #endif /* TOX_HIDE_DEPRECATED */
38373852
38383853typedef enum Tox_Err_Group_Leave {
38393854
@@ -5747,6 +5762,7 @@ void tox_callback_group_moderation(Tox *tox, tox_group_moderation_cb *callback);
57475762//!TOKSTYLE-
57485763#ifndef DOXYGEN_IGNORE
57495764
5765+ #ifndef TOX_HIDE_DEPRECATED
57505766typedef Tox_Err_Options_New TOX_ERR_OPTIONS_NEW ;
57515767typedef Tox_Err_New TOX_ERR_NEW ;
57525768typedef Tox_Err_Bootstrap TOX_ERR_BOOTSTRAP ;
@@ -5786,6 +5802,7 @@ typedef Tox_Connection TOX_CONNECTION;
57865802typedef Tox_File_Control TOX_FILE_CONTROL ;
57875803typedef Tox_Conference_Type TOX_CONFERENCE_TYPE ;
57885804typedef enum Tox_File_Kind TOX_FILE_KIND ;
5805+ #endif /* TOX_HIDE_DEPRECATED */
57895806
57905807#endif
57915808//!TOKSTYLE+
0 commit comments