From eff48268031f9f6a5341b99ae808d6d376af8fdb Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Wed, 6 Sep 2023 09:56:26 +0700 Subject: [PATCH] Docs: more fixes on sample/source links (#3675) --- pjlib-util/docs/doxygen.cfg | 4 ++++ pjlib/docs/doxygen.cfg | 5 ++++- pjlib/include/pj/except.h | 8 ++++---- pjlib/include/pj/list.h | 4 ++-- pjlib/include/pj/log.h | 2 +- pjlib/include/pj/os.h | 2 +- pjlib/include/pj/pool.h | 2 +- pjlib/include/pj/string.h | 2 +- pjmedia/docs/doxygen.cfg | 4 ++++ pjmedia/include/pjmedia/port.h | 2 +- pjmedia/include/pjmedia/transport.h | 2 +- pjmedia/include/pjmedia/transport_srtp.h | 4 ++-- pjnath/docs/doc_ice.h | 2 +- pjnath/docs/doc_samples.h | 14 ++++++-------- pjnath/docs/doxygen.cfg | 4 ++++ pjsip/docs/doxygen.cfg | 4 ++++ pjsip/include/pjsua-lib/pjsua.h | 4 ++-- 17 files changed, 43 insertions(+), 26 deletions(-) diff --git a/pjlib-util/docs/doxygen.cfg b/pjlib-util/docs/doxygen.cfg index a159e4bf0..fc0afd0cc 100644 --- a/pjlib-util/docs/doxygen.cfg +++ b/pjlib-util/docs/doxygen.cfg @@ -259,6 +259,10 @@ GENERATE_DEPRECATEDLIST= YES # You can put \n's in the value part of an alias to insert newlines. ALIASES = +ALIASES += src{1}="\verbatim embed:rst:inline :source:`\1` \endverbatim" +ALIASES += srcdir{1}="\verbatim embed:rst:inline :sourcedir:`\1` \endverbatim" +ALIASES += img{1}="" +ALIASES += img{2}="\"\2\"" # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. diff --git a/pjlib/docs/doxygen.cfg b/pjlib/docs/doxygen.cfg index bdddb3389..c717d410a 100644 --- a/pjlib/docs/doxygen.cfg +++ b/pjlib/docs/doxygen.cfg @@ -260,7 +260,10 @@ GENERATE_DEPRECATEDLIST= YES ALIASES = ALIASES += src{1}="\verbatim embed:rst:inline :source:`\1` \endverbatim" - +ALIASES += srcdir{1}="\verbatim embed:rst:inline :sourcedir:`\1` \endverbatim" +ALIASES += img{1}="" +ALIASES += img{2}="\"\2\"" + # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. diff --git a/pjlib/include/pj/except.h b/pjlib/include/pj/except.h index 33dedc987..416a68ae9 100644 --- a/pjlib/include/pj/except.h +++ b/pjlib/include/pj/except.h @@ -40,8 +40,8 @@ PJ_BEGIN_DECL * \section pj_except_sample_sec Quick Example * * For the impatient, take a look at some examples: - * - @ref page_pjlib_samples_except_c - * - @ref page_pjlib_exception_test + * - Exception Handling sample: \src{pjlib/src/pjlib-samples/except.c} + * - Exception Handling test: \src{pjlib/src/pjlib-test/exception.c} * * \section pj_except_except Exception Handling * @@ -217,8 +217,8 @@ PJ_BEGIN_DECL * \section pj_except_examples_sec Examples * * For some examples on how to use the exception construct, please see: - * - @ref page_pjlib_samples_except_c - * - @ref page_pjlib_exception_test + * - Exception Handling sample: \src{pjlib/src/pjlib-samples/except.c} + * - Exception Handling test: \src{pjlib/src/pjlib-test/exception.c} */ /** diff --git a/pjlib/include/pj/list.h b/pjlib/include/pj/list.h index f1b5d4cdd..fa667296d 100644 --- a/pjlib/include/pj/list.h +++ b/pjlib/include/pj/list.h @@ -47,8 +47,8 @@ PJ_BEGIN_DECL * \section pj_list_example_sec Examples * * See below for examples on how to manipulate linked list: - * - @ref page_pjlib_samples_list_c - * - @ref page_pjlib_list_test + * - List sample: \src{pjlib/src/pjlib-samples/list.c} + * - List test: \src{pjlib/src/pjlib-test/list.c} */ diff --git a/pjlib/include/pj/log.h b/pjlib/include/pj/log.h index c7154f4f5..88188725b 100644 --- a/pjlib/include/pj/log.h +++ b/pjlib/include/pj/log.h @@ -59,7 +59,7 @@ PJ_BEGIN_DECL * \section pj_log_quick_sample_sec Examples * * For examples, see: - * - @ref page_pjlib_samples_log_c. + * - Simple Log sample: \src{pjlib/src/pjlib-samples/log.c} * */ diff --git a/pjlib/include/pj/os.h b/pjlib/include/pj/os.h index 029b5519a..b91378138 100644 --- a/pjlib/include/pj/os.h +++ b/pjlib/include/pj/os.h @@ -608,7 +608,7 @@ PJ_DECL(void*) pj_thread_local_get(long index); * \section pj_atomic_examples_sec Examples * * For some example codes, please see: - * - @ref page_pjlib_atomic_test + * - Atomic Variable test: \src{pjlib/src/pjlib-test/atomic.c} */ diff --git a/pjlib/include/pj/pool.h b/pjlib/include/pj/pool.h index 22cb71aae..9030a6ec7 100644 --- a/pjlib/include/pj/pool.h +++ b/pjlib/include/pj/pool.h @@ -276,7 +276,7 @@ PJ_BEGIN_DECL * \section PJ_POOL_EXAMPLES_SEC Examples * * For some sample codes on how to use the pool, please see: - * - @ref page_pjlib_pool_test + * - Pool test: \src{pjlib/src/pjlib-test/pool.c} * * @{ */ diff --git a/pjlib/include/pj/string.h b/pjlib/include/pj/string.h index 20f567244..208471176 100644 --- a/pjlib/include/pj/string.h +++ b/pjlib/include/pj/string.h @@ -65,7 +65,7 @@ PJ_BEGIN_DECL * \section pj_pstr_examples_sec Examples * * For some examples, please see: - * - @ref page_pjlib_string_test + * - String test: \src{pjlib/src/pjlib-test/string.c} */ /** diff --git a/pjmedia/docs/doxygen.cfg b/pjmedia/docs/doxygen.cfg index a7777e013..f688a16ff 100644 --- a/pjmedia/docs/doxygen.cfg +++ b/pjmedia/docs/doxygen.cfg @@ -259,6 +259,10 @@ GENERATE_DEPRECATEDLIST= YES # You can put \n's in the value part of an alias to insert newlines. ALIASES = +ALIASES += src{1}="\verbatim embed:rst:inline :source:`\1` \endverbatim" +ALIASES += srcdir{1}="\verbatim embed:rst:inline :sourcedir:`\1` \endverbatim" +ALIASES += img{1}="" +ALIASES += img{2}="\"\2\"" # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. diff --git a/pjmedia/include/pjmedia/port.h b/pjmedia/include/pjmedia/port.h index fa69794e6..42eaa138a 100644 --- a/pjmedia/include/pjmedia/port.h +++ b/pjmedia/include/pjmedia/port.h @@ -80,7 +80,7 @@ of one WAV file to another. In this case, application would create and arrange media ports connection as follows: - \image html sample-manual-resampling.jpg + \img{pjmedia/docs/sample-manual-resampling.jpg} Application would setup the media ports using the following pseudo- code: diff --git a/pjmedia/include/pjmedia/transport.h b/pjmedia/include/pjmedia/transport.h index 961f2c57b..ff7544366 100644 --- a/pjmedia/include/pjmedia/transport.h +++ b/pjmedia/include/pjmedia/transport.h @@ -49,7 +49,7 @@ * The connection between \ref PJMED_STRM and media transport is shown in * the diagram below: - \image html media-transport.PNG + \img{pjmedia/docs/media-transport.PNG} * \section PJMEDIA_TRANSPORT_H_USING Basic Media Transport Usage diff --git a/pjmedia/include/pjmedia/transport_srtp.h b/pjmedia/include/pjmedia/transport_srtp.h index af702ca97..64dab4af6 100644 --- a/pjmedia/include/pjmedia/transport_srtp.h +++ b/pjmedia/include/pjmedia/transport_srtp.h @@ -44,7 +44,7 @@ * media transport during stream creation), and the interconnection can be * depicted from the diagram below: * - \image html media-transport.PNG + \img{pjmedia/docs/media-transport.PNG} * I think the diagram above is self-explanatory. * @@ -53,7 +53,7 @@ * sending/receiving RTP/RTCP packets. When SRTP is used, the interconnection * between stream and transport is like the diagram below: * - \image html media-srtp-transport.PNG + \img{pjmedia/docs/media-srtp-transport.PNG} * So to stream, the SRTP transport behaves as if it is a media transport * (because it is a media transport), and to the media transport it behaves diff --git a/pjnath/docs/doc_ice.h b/pjnath/docs/doc_ice.h index 5c5d93333..54cf14766 100644 --- a/pjnath/docs/doc_ice.h +++ b/pjnath/docs/doc_ice.h @@ -94,7 +94,7 @@ provides the best example on how to do this. \section ice_samples_sec Samples -The \ref ice_demo_sample sample demonstrates how to use +The ICE demo sample \src{pjsip-apps/src/samples/icedemo.c} demonstrates how to use \ref PJNATH_ICE_STREAM_TRANSPORT without using signaling protocol such as SIP. It provides interactive user interface to create and manage the ICE sessions as well as to exchange SDP diff --git a/pjnath/docs/doc_samples.h b/pjnath/docs/doc_samples.h index 02bc08034..630a8a8f7 100644 --- a/pjnath/docs/doc_samples.h +++ b/pjnath/docs/doc_samples.h @@ -25,26 +25,24 @@ below were taken on a Windows machine, but the library is very portable and it is known to run on platforms such as Linux, MacOS X, Windows Mobile, Symbian, and so on. - - @ref ice_demo_sample \n + - ICE demo sample: \src{pjsip-apps/src/samples/icedemo.c}
\n This sample demonstrates how to use \ref PJNATH_ICE_STREAM_TRANSPORT without using signaling protocol such as SIP. It provides interactive user interface to create and manage the ICE sessions as well - as to exchange SDP with another ice_demo instance.\n\n - \image html ice_demo.jpg "ice_demo on WinXP" + as to exchange SDP with another ICE demo instance.\n\n + \img{pjnath/docs/ice_demo.jpg,ice_demo on WinXP} - - @ref turn_client_sample \n + - TURN client sample: \srcdir{pjnath/src/pjturn-client/}
\n This sample demonstrates how to use \ref PJNATH_TURN_SOCK and also \ref PJNATH_STUN_SOCK. It provides interactive user interface to manage allocation, permissions, and channel bindings.\n\n - \image html pjturn_client.jpg "pjturn_client on WinXP" + \img{pjnath/docs/pjturn_client.jpg,pjturn_client on WinXP} - - TURN server sample \n + - TURN server sample: \srcdir{pjnath/src/pjturn-srv/}
\n This is a simple sample TURN server application, which we mainly use for testing (as back then there is no TURN server available).\n - The source code for this application are in pjnath/src/pjturn-srv - directory. */ diff --git a/pjnath/docs/doxygen.cfg b/pjnath/docs/doxygen.cfg index 84ad4934d..304eb7558 100644 --- a/pjnath/docs/doxygen.cfg +++ b/pjnath/docs/doxygen.cfg @@ -259,6 +259,10 @@ GENERATE_DEPRECATEDLIST= YES # You can put \n's in the value part of an alias to insert newlines. ALIASES = +ALIASES += src{1}="\verbatim embed:rst:inline :source:`\1` \endverbatim" +ALIASES += srcdir{1}="\verbatim embed:rst:inline :sourcedir:`\1` \endverbatim" +ALIASES += img{1}="" +ALIASES += img{2}="\"\2\"" # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. diff --git a/pjsip/docs/doxygen.cfg b/pjsip/docs/doxygen.cfg index 57c1a15e7..13b3a850e 100644 --- a/pjsip/docs/doxygen.cfg +++ b/pjsip/docs/doxygen.cfg @@ -260,6 +260,10 @@ GENERATE_DEPRECATEDLIST= YES # You can put \n's in the value part of an alias to insert newlines. ALIASES = +ALIASES += src{1}="\verbatim embed:rst:inline :source:`\1` \endverbatim" +ALIASES += srcdir{1}="\verbatim embed:rst:inline :sourcedir:`\1` \endverbatim" +ALIASES += img{1}="" +ALIASES += img{2}="\"\2\"" # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 51a53a7ea..2e652a7e7 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -90,11 +90,11 @@ PJ_BEGIN_DECL * * Few samples are provided: * - - @ref page_pjsip_sample_simple_pjsuaua_c \n + - Simple pjsua app: \src{pjsip-apps/src/samples/simple_pjsua.c} \n Very simple SIP User Agent with registration, call, and media, using PJSUA-API, all in under 200 lines of code. - - @ref page_pjsip_samples_pjsua \n + - Pjsua app: \srcdir{pjsip-apps/src/pjsua/} \n This is the reference implementation for PJSIP and PJMEDIA. PJSUA is a console based application, designed to be simple enough to be readble, but powerful enough to demonstrate all features