1
Appendix: Generating This Documentation
2
=======================================
7
This documentation is created with `Sphinx <http://sphinx-doc.org>`_ and `Breathe <http://michaeljones.github.io/breathe/index.html>`_. Here are the required tools:
9
1. Doxygen is required. `Install <http://www.stack.nl/~dimitri/doxygen/download.html#srcbin>`_ it for your platform.
11
2. The easiest way to install all the tools is with `Python Package Index (PyPI) <http://pypi.python.org>`_. Just run this and it will install Sphinx, Breathe, and all the required tools if they are not installed::
13
$ sudo pip install breathe
15
3. Otherwise if PyPI is not available, consult Sphinx and Breathe sites for installation instructions and you may need to install these manually:
17
- `Sphinx <http://sphinx-doc.org>`_
18
- `Breathe <http://michaeljones.github.io/breathe/index.html>`_
23
Rendering The Documentation
24
------------------------------
25
The main source of the documentation is currently the '''Trac''' pages at https://trac.pjsip.org/repos/wiki/pjsip-doc/index. The copies in SVN are just copies for backup.
27
To render the documentation as HTML in `_build/html` directory::
29
$ cd $PJDIR/doc/pjsip-book
30
$ python fetch_trac.py
38
How to Use Integrate Book with Doxygen
39
--------------------------------------
42
will be rendered like this:
43
+++++++++++++++++++++++++++
45
This is how to quote a code with syntax coloring:
49
pj::AudioMediaPlayer *player = new AudioMediaPlayer;
50
player->createPlayer("announcement.wav");
52
There are many ways to refer a symbol:
54
* A method: :cpp:func:`pj::AudioMediaPlayer::createPlayer()`
55
* A method with alternate display: :cpp:func:`a method <pj::AudioMediaPlayer::createPlayer()>`
56
* A class :cpp:class:`pj::AudioMediaPlayer`
57
* A class with alternate display: :cpp:class:`a class <pj::AudioMediaPlayer>`
59
For that links to work, we need to display the link target declaration (a class or method)
60
somewhere in the doc, like this:
62
.. doxygenclass:: pj::AudioMediaPlayer
66
Alternatively we can display a single method declaration like this:
68
.. doxygenfunction:: pj::AudioMediaPlayer::createPlayer()
72
We can also display class declaration with specific members.
74
For more info see `Breathe documentation <http://michaeljones.github.io/breathe/domains.html>`_
77
.. default-domain:: cpp
79
will be rendered like this:
80
+++++++++++++++++++++++++++
82
This is how to quote a code with syntax coloring:
86
pj::AudioMediaPlayer *player = new AudioMediaPlayer;
87
player->createPlayer("announcement.wav");
89
There are many ways to refer a symbol:
91
* A method: :cpp:func:`pj::AudioMediaPlayer::createPlayer()`
92
* A method with alternate display: :cpp:func:`a method <pj::AudioMediaPlayer::createPlayer()>`
93
* A class :cpp:class:`pj::AudioMediaPlayer`
94
* A class with alternate display: :cpp:class:`a class <pj::AudioMediaPlayer>`
96
For that links to work, we need to display the link target declaration (a class or method) somewhere in the doc, like this:
98
.. doxygenclass:: pj::AudioMediaPlayer
102
Alternatively we can display a single method declaration like this:
104
.. doxygenfunction:: pj::AudioMediaPlayer::createPlayer()
108
We can also display class declaration with specific members.
110
For more info see `Breathe documentation <http://michaeljones.github.io/breathe/domains.html>`_