Skip to content

Commit 576f868

Browse files
committed
Re #1715: updated book with latest Rst
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@4763 74dad513-b988-da41-8d7b-12977e46ad98
1 parent e62cdc7 commit 576f868

File tree

8 files changed

+419
-284
lines changed

8 files changed

+419
-284
lines changed

doc/pjsip-book/breathe.rst

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
Appendix: Generating This Documentation
2+
=======================================
3+
4+
Requirements
5+
------------
6+
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:
8+
9+
1. Doxygen is required. `Install <http://www.stack.nl/~dimitri/doxygen/download.html#srcbin>`_ it for your platform.
10+
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::
12+
13+
$ sudo pip install breathe
14+
15+
3. Otherwise if PyPI is not available, consult Sphinx and Breathe sites for installation instructions and you may need to install these manually:
16+
17+
- `Sphinx <http://sphinx-doc.org>`_
18+
- `Breathe <http://michaeljones.github.io/breathe/index.html>`_
19+
- docutils
20+
- Pygments
21+
22+
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.
26+
27+
To render the documentation as HTML in `_build/html` directory::
28+
29+
$ cd $PJDIR/doc/pjsip-book
30+
$ python fetch_trac.py
31+
$ make
32+
33+
To build PDF, run::
34+
35+
$ make latexpdf
36+
37+
38+
How to Use Integrate Book with Doxygen
39+
--------------------------------------
40+
Quick sample::
41+
42+
will be rendered like this:
43+
+++++++++++++++++++++++++++
44+
45+
This is how to quote a code with syntax coloring:
46+
47+
.. code-block:: c++
48+
49+
pj::AudioMediaPlayer *player = new AudioMediaPlayer;
50+
player->createPlayer("announcement.wav");
51+
52+
There are many ways to refer a symbol:
53+
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>`
58+
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:
61+
62+
.. doxygenclass:: pj::AudioMediaPlayer
63+
:path: xml
64+
:members:
65+
66+
Alternatively we can display a single method declaration like this:
67+
68+
.. doxygenfunction:: pj::AudioMediaPlayer::createPlayer()
69+
:path: xml
70+
:no-link:
71+
72+
We can also display class declaration with specific members.
73+
74+
For more info see `Breathe documentation <http://michaeljones.github.io/breathe/domains.html>`_
75+
76+
77+
.. default-domain:: cpp
78+
79+
will be rendered like this:
80+
+++++++++++++++++++++++++++
81+
82+
This is how to quote a code with syntax coloring:
83+
84+
.. code-block:: c++
85+
86+
pj::AudioMediaPlayer *player = new AudioMediaPlayer;
87+
player->createPlayer("announcement.wav");
88+
89+
There are many ways to refer a symbol:
90+
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>`
95+
96+
For that links to work, we need to display the link target declaration (a class or method) somewhere in the doc, like this:
97+
98+
.. doxygenclass:: pj::AudioMediaPlayer
99+
:path: xml
100+
:members:
101+
102+
Alternatively we can display a single method declaration like this:
103+
104+
.. doxygenfunction:: pj::AudioMediaPlayer::createPlayer()
105+
:path: xml
106+
:no-link:
107+
108+
We can also display class declaration with specific members.
109+
110+
For more info see `Breathe documentation <http://michaeljones.github.io/breathe/domains.html>`_
111+
112+
113+

doc/pjsip-book/conf.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
master_doc = 'index'
4141

4242
# General information about the project.
43-
project = u'The PJSIP Book'
44-
copyright = u'2013, Teluu Ltd.'
43+
project = u'PJSUA2 Documentation'
44+
copyright = u'2014, Teluu Ltd.'
4545

4646
# The version info for the project you're documenting, acts as replacement for
4747
# |version| and |release|, also used in various other places throughout the
@@ -50,7 +50,7 @@
5050
# The short X.Y version.
5151
version = '1.0'
5252
# The full version, including alpha/beta/rc tags.
53-
release = '1.0-beta'
53+
release = '1.0-alpha'
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.
@@ -164,7 +164,7 @@
164164
#html_file_suffix = None
165165

166166
# Output file base name for HTML help builder.
167-
htmlhelp_basename = 'ThePJSIPBookdoc'
167+
htmlhelp_basename = 'PJSUA2Doc'
168168

169169

170170
# -- Options for LaTeX output --------------------------------------------------
@@ -183,7 +183,7 @@
183183
# Grouping the document tree into LaTeX files. List of tuples
184184
# (source start file, target name, title, author, documentclass [howto/manual]).
185185
latex_documents = [
186-
('index', 'ThePJSIPBook.tex', u'The PJSIP Book Documentation',
186+
('index', 'PJSUA2Doc.tex', u'PJSUA2 Documentation',
187187
u'Sauw Ming Liong, Benny Prijono', 'manual'),
188188
]
189189

@@ -213,7 +213,7 @@
213213
# One entry per manual page. List of tuples
214214
# (source start file, name, description, authors, manual section).
215215
man_pages = [
216-
('index', 'thepjsipbook', u'The PJSIP Book Documentation',
216+
('index', 'pjsua2doc', u'PJSUA2 Documentation',
217217
[u'Sauw Ming Liong', u'Benny Prijono'], 1)
218218
]
219219

@@ -227,7 +227,7 @@
227227
# (source start file, target name, title, author,
228228
# dir menu entry, description, category)
229229
texinfo_documents = [
230-
('index', 'ThePJSIPBook', u'The PJSIP Book Documentation',
230+
('index', 'PJSUA2Doc', u'PJSUA2 Documentation',
231231
u'Sauw Ming Liong@*Benny Prijono', 'ThePJSIPBook', 'One line description of project.',
232232
'Miscellaneous'),
233233
]

0 commit comments

Comments
 (0)