Partly fix handling of transport-info messages
[emacs-jabber-tox.git] / README
blob79494d76c13d3892ec4630c9f9fa4d584efc28a3
1 Tox (Talk Over XMPP, or something) is a utility for adding Jingle
2 functionality to a Jabber client, primarily voice communication.  It
3 interfaces to the Jabber client using DBus.
5 To actually get it to compile, you need the Farsight library.  If you
6 use Debian, the packages "libfarsight0.1-dev" and
7 "gstreamer0.10-plugins-farsight" and their dependencies should be
8 enough.  If you need to compile them yourself, look for Farsight at
9 http://farsight.freedesktop.org/ and Libjingle at
10 http://tapioca-voip.sourceforge.net/.  Do _not_ use Google's
11 libjingle.
13 The DBus interface is described below.  From this you should be able
14 to piece together a Jingle client.  Good luck!
16 Tox registers the well-known name net.sourceforge.emacs-jabber.Tox
17 (NB: hyphen, not underscore) on the session bus.
18 /net/sourceforge/emacs_jabber/Tox (NB: underscore, not hyphen) is the
19 path to the main object.
21 This object has one method in the interface
22 net.sourceforge.emacs_jabber.Tox (NB: underscore, not hyphen):
24 object_path CreateSession(byte direction)
26   Creates an audio session.  direction is 1 for "send only", 2 for
27   "receive only", and 3 for "send and receive".  The path to the new
28   session is returned.
30 The session object in turn has methods in the interface
31 net.sourceforge.emacs_jabber.ToxSession (NB: underscore, not hyphen):
33 void Destroy()
35   Destroys the session.
37 void SetDefaultAudioSink()
39   Create an "autoaudiosink" GStreamer element and connect it to the
40   session.  This usually means that you will hear things in your
41   speakers.
43 void SetOggVorbisAudioSource(string filename)
45   Set the named Ogg Vorbis file as audio source, i.e. what to send
46   over the session.
48 void AddRemoteCandidate(array components)
50   Add a transport candidate of the remote party, consisting of the
51   given components.  "components" is an array of structs with
52   signature "(susqsssyyss)" and meaning:
54            - Candidate ID
55            - Component (starting from 1)
56            - IP number (as a string)
57            - Port number
58            - Protocol ("tcp" or "udp")
59            - Protocol subtype (only "RTP" supported)
60            - Protocol profile (only "AVP" supported)
61            - Preference, between 0 and 100
62            - Type.  0 means local, 1 means derived (e.g. through
63              STUN), 2 means relay
64            - Username (may be empty)
65            - Password (may be empty)
67 signal NewNativeCandidate(array components)
69   Signalled when a new local candidate has been determined.  The
70   argument is the same as to AddRemoteCandidate.
72 signal NativeCandidatesPrepared(array components)
74   Signalled when the local candidates have been determined, and are
75   ready to send to the other party.  The argument is the same as to
76   AddRemoteCandidate.
78 void SetRemoteCodecs(array codecs)
80   Set the codecs that the remote party claims to support.  codecs is
81   an array of structs with signature "(isyuua{ss})" and meaning:
83            - numeric identifier
84            - codec name
85            - media type: 0 is audio, 1 is video
86            - clock rate
87            - number of channels
88            - optional parameters
90 array GetLocalCodecs()
92   Get the codecs supported by this implementation.  The return value
93   is of the same type as the argument to SetRemoteCodecs.
95 array GetCodecIntersection()
97   Get the intersection of supported codecs of remote and local
98   parties.  The return value is like the argument to SetRemoteCodecs.