mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
72 lines
2.1 KiB
ReStructuredText
72 lines
2.1 KiB
ReStructuredText
.. Linphone documentation master file, created by
|
|
sphinx-quickstart on Wed Aug 20 15:37:38 2014.
|
|
You can adapt this file completely to your liking, but it should at least
|
|
contain the root `toctree` directive.
|
|
|
|
Linphone for Python documentation
|
|
=================================
|
|
|
|
Getting started
|
|
---------------
|
|
|
|
Installing the Python module
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
You can install prebuilt packages of Linphone for Python. You will find the
|
|
releases at https://pypi.python.org/pypi/linphone. This includes only packages
|
|
for the Windows platform right now. The easiest way to install is to use pip,
|
|
eg.:
|
|
|
|
.. code-block:: none
|
|
|
|
> pip install linphone --pre
|
|
|
|
You can also find nightly-built packages for Windows, Mac OS X and Linux at
|
|
https://www.linphone.org/snapshots/linphone-python/.
|
|
|
|
Otherwise you can compile the Python module. To do so get the build system code
|
|
using the command:
|
|
|
|
.. code-block:: none
|
|
|
|
> git clone git://git.linphone.org/linphone-cmake-builder.git
|
|
|
|
Then follow the instructions in the *README.python* file.
|
|
|
|
Running some code
|
|
^^^^^^^^^^^^^^^^^
|
|
|
|
Here is a sample source code using PyQt4 that enables you to register on a SIP
|
|
server in just a few lines of code. This is a very basic example, but it shows
|
|
how to create a linphone.Core object that is the main object of Linphone. From
|
|
there, you can use the API reference below to use more advanced feature and
|
|
perform some SIP calls, use text messaging and more...
|
|
|
|
.. literalinclude:: pyqt_linphone_example.py
|
|
|
|
In the Linphone Python module package you installed previously you will also
|
|
find some unit tests that you can run. These unit tests will be located in the
|
|
*site-packages/linphone/unittests/* directory of Python installation where you
|
|
installed the Linphone Python module package. To run these unit tests, follow
|
|
the instructions contained in the README.txt file of this *unittests/*
|
|
directory.
|
|
|
|
API reference
|
|
-------------
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
.. automodule:: linphone
|
|
:members:
|
|
:undoc-members:
|
|
|
|
.. autoattribute:: linphone.__version__
|
|
|
|
|
|
Indices and tables
|
|
------------------
|
|
|
|
* :ref:`genindex`
|
|
* :ref:`search`
|
|
|