summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore18
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac6
-rw-r--r--data/Makefile.am2
-rw-r--r--data/org.freedesktop.Telepathy.ConnectionManager.rakia.service.in4
-rw-r--r--data/org.freedesktop.Telepathy.ConnectionManager.sofiasip.service.in4
-rw-r--r--docs/Makefile.am6
-rw-r--r--docs/telepathy-rakia.8.in (renamed from docs/telepathy-sofiasip.8.in)12
-rw-r--r--extensions/Makefile.am (renamed from tpsip-extensions/Makefile.am)26
-rw-r--r--extensions/all.xml (renamed from tpsip-extensions/all.xml)0
-rw-r--r--extensions/channel.xml (renamed from tpsip-extensions/channel.xml)0
-rw-r--r--extensions/extensions.c (renamed from tpsip-extensions/extensions.c)0
-rw-r--r--extensions/extensions.h17
-rw-r--r--rakia/Makefile.am (renamed from tpsip/Makefile.am)16
-rw-r--r--rakia/base-connection-sofia.c (renamed from tpsip/base-connection-sofia.c)18
-rw-r--r--rakia/base-connection.c (renamed from tpsip/base-connection.c)74
-rw-r--r--rakia/base-connection.h (renamed from tpsip/base-connection.h)44
-rw-r--r--rakia/codec-param-formats.c (renamed from tpsip/codec-param-formats.c)76
-rw-r--r--rakia/codec-param-formats.h (renamed from tpsip/codec-param-formats.h)24
-rw-r--r--rakia/connection-aliasing.c (renamed from tpsip/connection-aliasing.c)42
-rw-r--r--rakia/connection-aliasing.h (renamed from tpsip/connection-aliasing.h)22
-rw-r--r--rakia/debug.c (renamed from tpsip/debug.c)52
-rw-r--r--rakia/debug.h (renamed from tpsip/debug.h)24
-rw-r--r--rakia/event-target.c (renamed from tpsip/event-target.c)96
-rw-r--r--rakia/event-target.h (renamed from tpsip/event-target.h)38
-rw-r--r--rakia/handles.c (renamed from tpsip/handles.c)26
-rw-r--r--rakia/handles.h (renamed from tpsip/handles.h)16
-rw-r--r--rakia/media-channel.c (renamed from tpsip/media-channel.c)410
-rw-r--r--rakia/media-channel.h (renamed from tpsip/media-channel.h)32
-rw-r--r--rakia/media-manager.c (renamed from tpsip/media-manager.c)184
-rw-r--r--rakia/media-manager.h (renamed from tpsip/media-manager.h)20
-rw-r--r--rakia/media-session.c (renamed from tpsip/media-session.c)492
-rw-r--r--rakia/media-session.h (renamed from tpsip/media-session.h)76
-rw-r--r--rakia/media-stream.c (renamed from tpsip/media-stream.c)290
-rw-r--r--rakia/media-stream.h (renamed from tpsip/media-stream.h)54
-rw-r--r--rakia/signals-marshal.list (renamed from tpsip/signals-marshal.list)0
-rw-r--r--rakia/sofia-decls.h (renamed from tpsip/sofia-decls.h)12
-rw-r--r--rakia/text-channel.c (renamed from tpsip/text-channel.c)198
-rw-r--r--rakia/text-channel.h (renamed from tpsip/text-channel.h)24
-rw-r--r--rakia/text-manager.c (renamed from tpsip/text-manager.c)172
-rw-r--r--rakia/text-manager.h (renamed from tpsip/text-manager.h)20
-rw-r--r--rakia/util.c (renamed from tpsip/util.c)16
-rw-r--r--rakia/util.h (renamed from tpsip/util.h)8
-rw-r--r--src/Makefile.am30
-rw-r--r--src/protocol.c78
-rw-r--r--src/protocol.h34
-rw-r--r--src/sip-connection-helpers.c104
-rw-r--r--src/sip-connection-helpers.h28
-rw-r--r--src/sip-connection-manager.c46
-rw-r--r--src/sip-connection-manager.h26
-rw-r--r--src/sip-connection-private.h14
-rw-r--r--src/sip-connection.c220
-rw-r--r--src/sip-connection.h36
-rw-r--r--src/telepathy-rakia.c (renamed from src/telepathy-sofiasip.c)14
-rw-r--r--src/write-mgr-file.c6
-rw-r--r--tests/tp_caller.c8
-rw-r--r--tests/twisted/Makefile.am4
-rw-r--r--tests/twisted/cm/protocol.py6
-rw-r--r--tests/twisted/sofiatest.py2
-rw-r--r--tests/twisted/tools/Makefile.am6
-rw-r--r--tests/twisted/tools/exec-with-log.sh.in8
-rw-r--r--tests/twisted/tools/rakia.service.in (renamed from tests/twisted/tools/sofiasip.service.in)2
-rw-r--r--tests/twisted/voip/voip_test.py2
-rw-r--r--tpsip-extensions/extensions.h17
64 files changed, 1684 insertions, 1684 deletions
diff --git a/.gitignore b/.gitignore
index b3b3013..791c257 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,14 @@
# Build targets
-src/sofiasip.manager
-src/telepathy-sofiasip
+src/rakia.manager
+src/telepathy-rakia
src/write-mgr-file
-tpsip-extensions/_gen
-tpsip-extensions/extensions.html
-data/org.freedesktop.Telepathy.ConnectionManager.sofiasip.service
-docs/telepathy-sofiasip.8
+extensions/_gen
+extensions/extensions.html
+data/org.freedesktop.Telepathy.ConnectionManager.rakia.service
+docs/telepathy-rakia.8
tests/twisted/tools/exec-with-log.sh
-tests/twisted/tools/org.freedesktop.Telepathy.ConnectionManager.sofiasip.service
-tests/twisted/tools/sofiasip-testing.log
+tests/twisted/tools/org.freedesktop.Telepathy.ConnectionManager.rakia.service
+tests/twisted/tools/rakia-testing.log
tests/twisted/tools/tmp-session-bus.conf
# Built source files
@@ -16,7 +16,7 @@ signals-marshal.[ch]
src/*-enumtypes.[ch]
# Distribution tarballs and distcheck trees.
-/telepathy-sofiasip-*
+/telepathy-rakia-*
# Output files and build directories
.deps
diff --git a/Makefile.am b/Makefile.am
index aab3064..a948786 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
#
-# Makefile.am for telepathy-sofiasip/src
+# Makefile.am for telepathy-rakia/src
#
# Copyright (C) 2006,2008 Nokia Corporation
# Contact: Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
@@ -16,8 +16,8 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = \
tools \
- tpsip \
- tpsip-extensions \
+ rakia \
+ extensions \
data \
docs \
m4 \
diff --git a/configure.ac b/configure.ac
index d36b679..2c7ee12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ([2.59])
-m4_define([THIS_PACKAGE],[telepathy-sofiasip])
+m4_define([THIS_PACKAGE],[telepathy-rakia])
m4_define([VERSION_MAJOR],[0])
m4_define([VERSION_MINOR],[7])
m4_define([VERSION_MICRO],[1])
@@ -133,8 +133,8 @@ fi
AC_CONFIG_FILES([
Makefile
- tpsip/Makefile
- tpsip-extensions/Makefile
+ rakia/Makefile
+ extensions/Makefile
src/Makefile
m4/Makefile
data/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index d431c34..b85be67 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -2,7 +2,7 @@
BUILT_FILES = $(service_in_files:.service.in=.service)
servicedir = $(datadir)/dbus-1/services
-service_in_files = org.freedesktop.Telepathy.ConnectionManager.sofiasip.service.in
+service_in_files = org.freedesktop.Telepathy.ConnectionManager.rakia.service.in
service_DATA = $(BUILT_FILES)
CLEANFILES = $(BUILT_FILES)
diff --git a/data/org.freedesktop.Telepathy.ConnectionManager.rakia.service.in b/data/org.freedesktop.Telepathy.ConnectionManager.rakia.service.in
new file mode 100644
index 0000000..a873a63
--- /dev/null
+++ b/data/org.freedesktop.Telepathy.ConnectionManager.rakia.service.in
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.freedesktop.Telepathy.ConnectionManager.rakia
+Exec=@libexecdir@/telepathy-rakia
+
diff --git a/data/org.freedesktop.Telepathy.ConnectionManager.sofiasip.service.in b/data/org.freedesktop.Telepathy.ConnectionManager.sofiasip.service.in
deleted file mode 100644
index b582e94..0000000
--- a/data/org.freedesktop.Telepathy.ConnectionManager.sofiasip.service.in
+++ /dev/null
@@ -1,4 +0,0 @@
-[D-BUS Service]
-Name=org.freedesktop.Telepathy.ConnectionManager.sofiasip
-Exec=@libexecdir@/telepathy-sofiasip
-
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 573583a..7498c5d 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -9,7 +9,7 @@ AUTOMAKE_OPTIONS = 1.6
# of using the various options.
# The name of the module, e.g. 'glib'.
-DOC_MODULE=telepathy-sofiasip
+DOC_MODULE=telepathy-rakia
# The top-level SGML file. You can change this if you want to.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
@@ -79,9 +79,9 @@ GTKDOC_LIBS=
EXTRA_DIST =
# Man page
-man_MANS = telepathy-sofiasip.8
+man_MANS = telepathy-rakia.8
CLEANFILES = $(man_MANS)
-EXTRA_DIST += telepathy-sofiasip.8.in
+EXTRA_DIST += telepathy-rakia.8.in
%.8: %.8.in Makefile
sed -e 's,[@]libexecdir[@],@libexecdir@,' < $< > $@
diff --git a/docs/telepathy-sofiasip.8.in b/docs/telepathy-rakia.8.in
index 2095bfb..b57c519 100644
--- a/docs/telepathy-sofiasip.8.in
+++ b/docs/telepathy-rakia.8.in
@@ -1,14 +1,14 @@
-.TH TELEPATHY-SOFIASIP "8" "February 2010" "Telepathy" "D-Bus services"
+.TH TELEPATHY-RAKIA "8" "February 2010" "Telepathy" "D-Bus services"
\" This man page was written by Simon McVittie for the Debian project,
\" but may be used by others.
\" Copyright © 2007-2010 Collabora Ltd. <http://www.collabora.co.uk/>
-\" It may be distributed under the same terms as telepathy-sofiasip itself.
+\" It may be distributed under the same terms as telepathy-rakia itself.
.SH NAME
-telepathy-sofiasip \- Telepathy connection manager for SIP
+telepathy-rakia \- Telepathy connection manager for SIP
.SH SYNOPSIS
-\fB@libexecdir@/telepathy\-sofiasip\fR
+\fB@libexecdir@/telepathy\-rakia\fR
.SH DESCRIPTION
-\fBtelepathy\-sofiasip\fR implements the Telepathy D-Bus specification for
+\fBtelepathy\-rakia\fR implements the Telepathy D-Bus specification for
the Session Initiation Protocol, allowing Telepathy clients like
.BR empathy (1)
to connect to Voice over IP providers that implement SIP.
@@ -30,7 +30,7 @@ may be prefixed with \fB+\fR to append messages to an existing file instead
of overwriting it.
.TP
\fBTPSIP_PERSIST\fR
-May be set to any value to avoid telepathy-sofiasip's usual automatic exit
+May be set to any value to avoid telepathy-rakia's usual automatic exit
when there have been no connections for a few seconds.
.TP
\fBTPORT_LOG\fR
diff --git a/tpsip-extensions/Makefile.am b/extensions/Makefile.am
index 6f50323..b0ea184 100644
--- a/tpsip-extensions/Makefile.am
+++ b/extensions/Makefile.am
@@ -10,19 +10,19 @@ EXTRA_DIST = \
all.xml \
channel.xml
-noinst_LTLIBRARIES = libtpsip-extensions.la
+noinst_LTLIBRARIES = librakia-extensions.la
-libtpsip_extensions_la_LIBADD = \
+librakia_extensions_la_LIBADD = \
$(TELEPATHY_GLIB_LIBS)
# The client-specific parts are built into a separate .o file, so the linker
# can discard them when linking services. The service-specific parts are
# in svc-*.c, so we don't need an extensions-svc.c.
-libtpsip_extensions_la_SOURCES = \
+librakia_extensions_la_SOURCES = \
extensions.c \
extensions.h
-nodist_libtpsip_extensions_la_SOURCES = \
+nodist_librakia_extensions_la_SOURCES = \
_gen/signals-marshal.c \
_gen/signals-marshal.h \
_gen/signals-marshal.list \
@@ -38,7 +38,7 @@ nodist_libtpsip_extensions_la_SOURCES = \
BUILT_SOURCES = \
_gen/all.xml \
_gen/channel.xml \
- $(nodist_libtpsip_extensions_la_SOURCES) \
+ $(nodist_librakia_extensions_la_SOURCES) \
extensions.html
CLEANFILES = $(BUILT_SOURCES)
@@ -67,19 +67,19 @@ _gen/signals-marshal.list: _gen/all.xml \
$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@
_gen/signals-marshal.h: _gen/signals-marshal.list
- $(GLIB_GENMARSHAL) --header --prefix=_tpsip_ext_marshal $< > $@
+ $(GLIB_GENMARSHAL) --header --prefix=_rakia_ext_marshal $< > $@
_gen/signals-marshal.c: _gen/signals-marshal.list
- $(GLIB_GENMARSHAL) --body --prefix=_tpsip_ext_marshal $< > $@
+ $(GLIB_GENMARSHAL) --body --prefix=_rakia_ext_marshal $< > $@
_gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \
$(tools_dir)/glib-client-marshaller-gen.py
$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< \
- _tpsip_ext > $@
+ _rakia_ext > $@
_gen/enums.h: _gen/all.xml $(tools_dir)/c-constants-generator.xsl
$(XSLTPROC) $(XSLTPROCFLAGS) \
- --stringparam mixed-case-prefix Tpsip \
+ --stringparam mixed-case-prefix Rakia \
$(tools_dir)/c-constants-generator.xsl \
$< > $@
@@ -87,7 +87,7 @@ _gen/interfaces.h: _gen/all.xml \
$(tools_dir)/glib-interfaces-generator.xsl \
$(tools_dir)/c-interfaces-generator.xsl
$(XSLTPROC) $(XSLTPROCFLAGS) \
- --stringparam mixed-case-prefix Tpsip \
+ --stringparam mixed-case-prefix Rakia \
$(tools_dir)/glib-interfaces-generator.xsl \
$< > $@
@@ -95,7 +95,7 @@ _gen/interfaces-body.h: _gen/all.xml \
$(tools_dir)/glib-interfaces-body-generator.xsl \
$(tools_dir)/c-interfaces-generator.xsl
$(XSLTPROC) $(XSLTPROCFLAGS) \
- --stringparam mixed-case-prefix Tpsip \
+ --stringparam mixed-case-prefix Rakia \
$(tools_dir)/glib-interfaces-body-generator.xsl \
$< > $@
@@ -112,9 +112,9 @@ _gen/svc-channel.c _gen/svc-channel.h: _gen/channel.xml \
$(tools_dir)/glib-ginterface-gen.py
$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \
--filename=_gen/svc-channel \
- --signal-marshal-prefix=_tpsip_ext \
+ --signal-marshal-prefix=_rakia_ext \
--include='<telepathy-glib/dbus.h>' \
--include='"_gen/signals-marshal.h"' \
--not-implemented-func='tp_dbus_g_method_return_not_implemented' \
--allow-unstable \
- $< Tpsip_Svc_
+ $< Rakia_Svc_
diff --git a/tpsip-extensions/all.xml b/extensions/all.xml
index 0cd4295..0cd4295 100644
--- a/tpsip-extensions/all.xml
+++ b/extensions/all.xml
diff --git a/tpsip-extensions/channel.xml b/extensions/channel.xml
index 2b8dbac..2b8dbac 100644
--- a/tpsip-extensions/channel.xml
+++ b/extensions/channel.xml
diff --git a/tpsip-extensions/extensions.c b/extensions/extensions.c
index eeda462..eeda462 100644
--- a/tpsip-extensions/extensions.c
+++ b/extensions/extensions.c
diff --git a/extensions/extensions.h b/extensions/extensions.h
new file mode 100644
index 0000000..0318277
--- /dev/null
+++ b/extensions/extensions.h
@@ -0,0 +1,17 @@
+#ifndef __SIP_EXTENSIONS_H__
+#define __SIP_EXTENSIONS_H__
+
+#include <glib-object.h>
+#include <telepathy-glib/channel.h>
+
+#include <extensions/_gen/enums.h>
+#include <extensions/_gen/svc-channel.h>
+
+G_BEGIN_DECLS
+
+#include <extensions/_gen/gtypes.h>
+#include <extensions/_gen/interfaces.h>
+
+G_END_DECLS
+
+#endif
diff --git a/tpsip/Makefile.am b/rakia/Makefile.am
index 9b3c1d5..3e8f03d 100644
--- a/tpsip/Makefile.am
+++ b/rakia/Makefile.am
@@ -1,21 +1,21 @@
#
-# Makefile.am for telepathy-sofiasip/tpsip
+# Makefile.am for telepathy-rakia/rakia
#
# Copyright (C) 2008 Nokia Corporation
# Contact: Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
# Licensed under LGPL. See file COPYING.
#
-noinst_LTLIBRARIES = libtpsip.la
+noinst_LTLIBRARIES = librakia.la
AM_CPPFLAGS = @GLIB_CFLAGS@ @TELEPATHY_GLIB_CFLAGS@ @SOFIA_SIP_UA_CFLAGS@ \
-I$(top_builddir) -I$(top_srcdir)
AM_CFLAGS = $(ERROR_CFLAGS) $(COVERAGE_CFLAGS)
-tpsip_includedir = $(includedir)/telepathy-sofiasip-0.7/tpsip
+rakia_includedir = $(includedir)/telepathy-rakia-0.7/rakia
-tpsip_include_HEADERS = \
+rakia_include_HEADERS = \
base-connection.h \
connection-aliasing.h \
sofia-decls.h \
@@ -31,7 +31,7 @@ BUILT_SOURCES = \
signals-marshal.h \
signals-marshal.c
-libtpsip_la_SOURCES = \
+librakia_la_SOURCES = \
base-connection.c \
base-connection-sofia.c \
connection-aliasing.c \
@@ -51,7 +51,7 @@ libtpsip_la_SOURCES = \
text-manager.c \
util.c
-nodist_libtpsip_la_SOURCES = \
+nodist_librakia_la_SOURCES = \
signals-marshal.h \
signals-marshal.c
@@ -62,7 +62,7 @@ CLEANFILES = $(BUILT_SOURCES)
CLEANFILES += *.gcno
signals-marshal.c: ${srcdir}/signals-marshal.list
- glib-genmarshal --body --prefix=_tpsip_marshal $< >$@ || rm -f $@
+ glib-genmarshal --body --prefix=_rakia_marshal $< >$@ || rm -f $@
signals-marshal.h: ${srcdir}/signals-marshal.list
- glib-genmarshal --header --prefix=_tpsip_marshal $< >$@ || rm -f $@
+ glib-genmarshal --header --prefix=_rakia_marshal $< >$@ || rm -f $@
diff --git a/tpsip/base-connection-sofia.c b/rakia/base-connection-sofia.c
index 6721c66..de68ea5 100644
--- a/tpsip/base-connection-sofia.c
+++ b/rakia/base-connection-sofia.c
@@ -1,5 +1,5 @@
/*
- * sip-connection-sofia.c - Source for TpsipConnection Sofia event handling
+ * sip-connection-sofia.c - Source for RakiaConnection Sofia event handling
* Copyright (C) 2006-2007 Nokia Corporation
* Copyright (C) 2007-2008 Collabora Ltd.
* @author Kai Vehmanen <first.surname@nokia.com>
@@ -22,11 +22,11 @@
#include "config.h"
-#include <tpsip/base-connection.h>
+#include <rakia/base-connection.h>
#include <sofia-sip/su_tag_io.h>
#define DEBUG_FLAG TPSIP_DEBUG_EVENTS
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
static void
priv_r_shutdown(int status,
@@ -105,13 +105,13 @@ priv_r_get_params (int status,
* See libsofia-sip-ua/nua/nua.h documentation.
*/
void
-tpsip_base_connection_sofia_callback (nua_event_t event,
+rakia_base_connection_sofia_callback (nua_event_t event,
int status,
char const *phrase,
nua_t *nua,
- TpsipBaseConnection *conn,
+ RakiaBaseConnection *conn,
nua_handle_t *nh,
- TpsipEventTarget *target,
+ RakiaEventTarget *target,
sip_t const *sip,
tagi_t tags[])
{
@@ -137,7 +137,7 @@ tpsip_base_connection_sofia_callback (nua_event_t event,
DEBUG("connection %p, refcount %d", conn, ((GObject *)conn)->ref_count);
{
- TpsipNuaEvent ev = {
+ RakiaNuaEvent ev = {
event,
status,
phrase,
@@ -148,7 +148,7 @@ tpsip_base_connection_sofia_callback (nua_event_t event,
if (target == NULL)
{
- target = (TpsipEventTarget *) conn;
+ target = (RakiaEventTarget *) conn;
DEBUG("dispatching to connection %p (unbound handle %p)", conn, nh);
}
else
@@ -157,7 +157,7 @@ tpsip_base_connection_sofia_callback (nua_event_t event,
DEBUG("dispatching to target %p (handle %p)", target, nh);
}
- if (!tpsip_event_target_emit_nua_event (target,
+ if (!rakia_event_target_emit_nua_event (target,
&ev,
tags))
{
diff --git a/tpsip/base-connection.c b/rakia/base-connection.c
index e437b00..597b5f5 100644
--- a/tpsip/base-connection.c
+++ b/rakia/base-connection.c
@@ -8,7 +8,7 @@
* @author Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
* @author Pekka Pessi <pekka.pessi@nokia.com>
*
- * Based on tpsip-connection and gabble implementation (gabble-connection).
+ * Based on rakia-connection and gabble implementation (gabble-connection).
* @author See gabble-connection.c
*
* This work is free software; you can redistribute it and/or
@@ -28,12 +28,12 @@
#include "config.h"
-#include <tpsip/base-connection.h>
+#include <rakia/base-connection.h>
#include <telepathy-glib/telepathy-glib.h>
-#include <tpsip/sofia-decls.h>
+#include <rakia/sofia-decls.h>
-struct _TpsipBaseConnectionPrivate
+struct _RakiaBaseConnectionPrivate
{
su_root_t *sofia_root;
@@ -51,62 +51,62 @@ enum {
static void event_target_iface_init (gpointer iface, gpointer data) {}
-G_DEFINE_TYPE_WITH_CODE (TpsipBaseConnection,
- tpsip_base_connection, TP_TYPE_BASE_CONNECTION,
+G_DEFINE_TYPE_WITH_CODE (RakiaBaseConnection,
+ rakia_base_connection, TP_TYPE_BASE_CONNECTION,
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACTS,
tp_contacts_mixin_iface_init);
G_IMPLEMENT_INTERFACE (TPSIP_TYPE_EVENT_TARGET, event_target_iface_init);
);
static void
-tpsip_base_connection_init (TpsipBaseConnection *self)
+rakia_base_connection_init (RakiaBaseConnection *self)
{
GObject *object = G_OBJECT (self);
TpBaseConnection *base = TP_BASE_CONNECTION (self);
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TPSIP_TYPE_BASE_CONNECTION,
- TpsipBaseConnectionPrivate);
+ RakiaBaseConnectionPrivate);
tp_contacts_mixin_init (object,
- G_STRUCT_OFFSET (TpsipBaseConnection, contacts_mixin));
+ G_STRUCT_OFFSET (RakiaBaseConnection, contacts_mixin));
/* org.freedesktop.Telepathy.Connection attributes */
tp_base_connection_register_with_contacts_mixin (base);
}
static void
-tpsip_base_connection_constructed(GObject *object)
+rakia_base_connection_constructed(GObject *object)
{
- if (G_OBJECT_CLASS(tpsip_base_connection_parent_class)->constructed)
- G_OBJECT_CLASS(tpsip_base_connection_parent_class)->constructed(object);
+ if (G_OBJECT_CLASS(rakia_base_connection_parent_class)->constructed)
+ G_OBJECT_CLASS(rakia_base_connection_parent_class)->constructed(object);
}
static void
-tpsip_base_connection_dispose(GObject *object)
+rakia_base_connection_dispose(GObject *object)
{
- TpsipBaseConnection *self = TPSIP_BASE_CONNECTION(object);
+ RakiaBaseConnection *self = TPSIP_BASE_CONNECTION(object);
if (self->priv->dispose_has_run)
return;
self->priv->dispose_has_run = 1;
- G_OBJECT_CLASS(tpsip_base_connection_parent_class)->dispose(object);
+ G_OBJECT_CLASS(rakia_base_connection_parent_class)->dispose(object);
}
void
-tpsip_base_connection_finalize(GObject *object)
+rakia_base_connection_finalize(GObject *object)
{
- G_OBJECT_CLASS(tpsip_base_connection_parent_class)->finalize(object);
+ G_OBJECT_CLASS(rakia_base_connection_parent_class)->finalize(object);
}
static void
-tpsip_base_connection_set_property (GObject *object,
+rakia_base_connection_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- TpsipBaseConnection *self = TPSIP_BASE_CONNECTION (object);
- TpsipBaseConnectionPrivate *priv = self->priv;
+ RakiaBaseConnection *self = TPSIP_BASE_CONNECTION (object);
+ RakiaBaseConnectionPrivate *priv = self->priv;
switch (property_id)
{
@@ -121,13 +121,13 @@ tpsip_base_connection_set_property (GObject *object,
}
static void
-tpsip_base_connection_get_property (GObject *object,
+rakia_base_connection_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- TpsipBaseConnection *self = TPSIP_BASE_CONNECTION (object);
- TpsipBaseConnectionPrivate *priv = self->priv;
+ RakiaBaseConnection *self = TPSIP_BASE_CONNECTION (object);
+ RakiaBaseConnectionPrivate *priv = self->priv;
switch (property_id)
{
@@ -144,17 +144,17 @@ tpsip_base_connection_get_property (GObject *object,
/* -------------------------------------------------------------------------- */
static void
-tpsip_base_connection_class_init (TpsipBaseConnectionClass *klass)
+rakia_base_connection_class_init (RakiaBaseConnectionClass *klass)
{
GObjectClass *object_class = (GObjectClass *) klass;
- g_type_class_add_private (klass, sizeof (TpsipBaseConnectionPrivate));
+ g_type_class_add_private (klass, sizeof (RakiaBaseConnectionPrivate));
- object_class->constructed = tpsip_base_connection_constructed;
- object_class->dispose = tpsip_base_connection_dispose;
- object_class->finalize = tpsip_base_connection_finalize;
- object_class->get_property = tpsip_base_connection_get_property;
- object_class->set_property = tpsip_base_connection_set_property;
+ object_class->constructed = rakia_base_connection_constructed;
+ object_class->dispose = rakia_base_connection_dispose;
+ object_class->finalize = rakia_base_connection_finalize;
+ object_class->get_property = rakia_base_connection_get_property;
+ object_class->set_property = rakia_base_connection_set_property;
g_object_class_install_property (object_class,
PROP_SOFIA_ROOT,
@@ -171,30 +171,30 @@ tpsip_base_connection_class_init (TpsipBaseConnectionClass *klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
tp_contacts_mixin_class_init (object_class,
- G_STRUCT_OFFSET(TpsipBaseConnectionClass, contacts_mixin_class));
+ G_STRUCT_OFFSET(RakiaBaseConnectionClass, contacts_mixin_class));
}
nua_handle_t *
-tpsip_base_connection_create_handle (TpsipBaseConnection *self,
+rakia_base_connection_create_handle (RakiaBaseConnection *self,
TpHandle tphandle)
{
- TpsipBaseConnectionClass *cls = TPSIP_BASE_CONNECTION_GET_CLASS (self);
+ RakiaBaseConnectionClass *cls = TPSIP_BASE_CONNECTION_GET_CLASS (self);
return cls->create_handle (self, tphandle);
}
void
-tpsip_base_connection_add_auth_handler (TpsipBaseConnection *self,
- TpsipEventTarget *target)
+rakia_base_connection_add_auth_handler (RakiaBaseConnection *self,
+ RakiaEventTarget *target)
{
- TpsipBaseConnectionClass *cls = TPSIP_BASE_CONNECTION_GET_CLASS (self);
+ RakiaBaseConnectionClass *cls = TPSIP_BASE_CONNECTION_GET_CLASS (self);
if (cls->add_auth_handler)
cls->add_auth_handler (self, target);
}
void
-tpsip_base_connection_save_event (TpsipBaseConnection *self,
+rakia_base_connection_save_event (RakiaBaseConnection *self,
nua_saved_event_t ret_saved [1])
{
nua_t *nua;
diff --git a/tpsip/base-connection.h b/rakia/base-connection.h
index b444aa2..dafb70f 100644
--- a/tpsip/base-connection.h
+++ b/rakia/base-connection.h
@@ -26,64 +26,64 @@
#include <telepathy-glib/base-connection.h>
#include <telepathy-glib/contacts-mixin.h>
-#include <tpsip/sofia-decls.h>
-#include <tpsip/event-target.h>
+#include <rakia/sofia-decls.h>
+#include <rakia/event-target.h>
G_BEGIN_DECLS
-typedef struct _TpsipBaseConnection TpsipBaseConnection;
-typedef struct _TpsipBaseConnectionClass TpsipBaseConnectionClass;
-typedef struct _TpsipBaseConnectionPrivate TpsipBaseConnectionPrivate;
+typedef struct _RakiaBaseConnection RakiaBaseConnection;
+typedef struct _RakiaBaseConnectionClass RakiaBaseConnectionClass;
+typedef struct _RakiaBaseConnectionPrivate RakiaBaseConnectionPrivate;
-struct _TpsipBaseConnectionClass {
+struct _RakiaBaseConnectionClass {
TpBaseConnectionClass parent_class;
TpContactsMixinClass contacts_mixin_class;
- nua_handle_t *(*create_handle) (TpsipBaseConnection *, TpHandle contact);
- void (*add_auth_handler) (TpsipBaseConnection *, TpsipEventTarget *);
+ nua_handle_t *(*create_handle) (RakiaBaseConnection *, TpHandle contact);
+ void (*add_auth_handler) (RakiaBaseConnection *, RakiaEventTarget *);
};
-struct _TpsipBaseConnection {
+struct _RakiaBaseConnection {
TpBaseConnection parent;
TpContactsMixin contacts_mixin;
- TpsipBaseConnectionPrivate *priv;
+ RakiaBaseConnectionPrivate *priv;
};
-GType tpsip_base_connection_get_type (void) G_GNUC_CONST;
+GType rakia_base_connection_get_type (void) G_GNUC_CONST;
/* TYPE MACROS */
#define TPSIP_TYPE_BASE_CONNECTION \
- (tpsip_base_connection_get_type())
+ (rakia_base_connection_get_type())
#define TPSIP_BASE_CONNECTION(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
- TPSIP_TYPE_BASE_CONNECTION, TpsipBaseConnection))
+ TPSIP_TYPE_BASE_CONNECTION, RakiaBaseConnection))
#define TPSIP_BASE_CONNECTION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), \
- TPSIP_TYPE_BASE_CONNECTION, TpsipBaseConnectionClass))
+ TPSIP_TYPE_BASE_CONNECTION, RakiaBaseConnectionClass))
#define TPSIP_IS_BASE_CONNECTION(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TPSIP_TYPE_BASE_CONNECTION))
#define TPSIP_IS_BASE_CONNECTION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), TPSIP_TYPE_BASE_CONNECTION))
#define TPSIP_BASE_CONNECTION_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
- TPSIP_TYPE_BASE_CONNECTION, TpsipBaseConnectionClass))
+ TPSIP_TYPE_BASE_CONNECTION, RakiaBaseConnectionClass))
/***********************************************************************
* Functions for accessing Sofia-SIP interface handles
***********************************************************************/
-nua_handle_t *tpsip_base_connection_create_handle (TpsipBaseConnection *,
+nua_handle_t *rakia_base_connection_create_handle (RakiaBaseConnection *,
TpHandle contact);
-void tpsip_base_connection_add_auth_handler (TpsipBaseConnection *self,
- TpsipEventTarget *target);
-void tpsip_base_connection_save_event (TpsipBaseConnection *self,
+void rakia_base_connection_add_auth_handler (RakiaBaseConnection *self,
+ RakiaEventTarget *target);
+void rakia_base_connection_save_event (RakiaBaseConnection *self,
nua_saved_event_t ret_saved [1]);
/** Callback for events delivered by the SIP stack. */
-void tpsip_base_connection_sofia_callback (nua_event_t event,
+void rakia_base_connection_sofia_callback (nua_event_t event,
int status, char const *phrase,
- nua_t *nua, TpsipBaseConnection *conn,
- nua_handle_t *nh, TpsipEventTarget *target,
+ nua_t *nua, RakiaBaseConnection *conn,
+ nua_handle_t *nh, RakiaEventTarget *target,
sip_t const *sip,
tagi_t tags[]);
diff --git a/tpsip/codec-param-formats.c b/rakia/codec-param-formats.c
index a0be89a..5751a35 100644
--- a/tpsip/codec-param-formats.c
+++ b/rakia/codec-param-formats.c
@@ -22,7 +22,7 @@
#include <string.h>
-#include <tpsip/util.h>
+#include <rakia/util.h>
/* Regexps for the name and the value parts of the parameter syntax */
#define FMTP_TOKEN_PARAM "[-A-Za-z0-9!#$%&'*+.^_`{|}~]+"
@@ -31,20 +31,20 @@
#define FMTP_MATCH_NAME_PARAM "p"
#define FMTP_MATCH_NAME_VALUE "v"
-typedef struct _TpsipCodecParamFormatting {
- TpsipCodecParamFormatFunc format;
- TpsipCodecParamParseFunc parse;
-} TpsipCodecParamFormatting;
+typedef struct _RakiaCodecParamFormatting {
+ RakiaCodecParamFormatFunc format;
+ RakiaCodecParamParseFunc parse;
+} RakiaCodecParamFormatting;
static GRegex *fmtp_attr_regex = NULL;
static GRegex *dtmf_events_regex = NULL;
static GHashTable *codec_param_formats[NUM_TP_MEDIA_STREAM_TYPES];
-static void tpsip_codec_param_formats_init ();
+static void rakia_codec_param_formats_init ();
/**
- * tpsip_codec_param_format:
+ * rakia_codec_param_format:
* @media: the media type
* @name: name of the codec, as per its MIME subtype registration
* @params: the map of codec parameters
@@ -55,12 +55,12 @@ static void tpsip_codec_param_formats_init ();
* as specified for the media type defined by @media and @name.
*/
void
-tpsip_codec_param_format (TpMediaStreamType media, const char *name,
+rakia_codec_param_format (TpMediaStreamType media, const char *name,
GHashTable *params, GString *out)
{
- TpsipCodecParamFormatting *fmt;
+ RakiaCodecParamFormatting *fmt;
- tpsip_codec_param_formats_init ();
+ rakia_codec_param_formats_init ();
/* XXX: thread unsafe, we don't care for now */
fmt = g_hash_table_lookup (codec_param_formats[media], name);
@@ -68,11 +68,11 @@ tpsip_codec_param_format (TpMediaStreamType media, const char *name,
if (fmt != NULL && fmt->format != NULL)
fmt->format (params, out);
else
- tpsip_codec_param_format_generic (params, out);
+ rakia_codec_param_format_generic (params, out);
}
/**
- * tpsip_codec_param_parse:
+ * rakia_codec_param_parse:
* @media: the media type
* @name: name of the codec, as per its MIME subtype registration
* @fmtp: a string with the codec-specific parameter data. May be #NULL.
@@ -83,15 +83,15 @@ tpsip_codec_param_format (TpMediaStreamType media, const char *name,
* The media type is defined by @media and @name.
*/
void
-tpsip_codec_param_parse (TpMediaStreamType media, const char *name,
+rakia_codec_param_parse (TpMediaStreamType media, const char *name,
const gchar *fmtp, GHashTable *out)
{
- TpsipCodecParamFormatting *fmt;
+ RakiaCodecParamFormatting *fmt;
if (fmtp == NULL)
return;
- tpsip_codec_param_formats_init ();
+ rakia_codec_param_formats_init ();
/* XXX: thread unsafe, we don't care for now */
fmt = g_hash_table_lookup (codec_param_formats[media], name);
@@ -99,11 +99,11 @@ tpsip_codec_param_parse (TpMediaStreamType media, const char *name,
if (fmt != NULL && fmt->parse != NULL)
fmt->parse (fmtp, out);
else
- tpsip_codec_param_parse_generic (fmtp, out);
+ rakia_codec_param_parse_generic (fmtp, out);
}
/**
- * tpsip_codec_param_register_format:
+ * rakia_codec_param_register_format:
* @media: the media type
* @name: name of the codec, as per its MIME subtype registration. Must be a static string.
* @format: pointer to the formatting function
@@ -113,15 +113,15 @@ tpsip_codec_param_parse (TpMediaStreamType media, const char *name,
* type.
*/
void
-tpsip_codec_param_register_format (TpMediaStreamType media, const char *name,
- TpsipCodecParamFormatFunc format,
- TpsipCodecParamParseFunc parse)
+rakia_codec_param_register_format (TpMediaStreamType media, const char *name,
+ RakiaCodecParamFormatFunc format,
+ RakiaCodecParamParseFunc parse)
{
- TpsipCodecParamFormatting *fmt;
+ RakiaCodecParamFormatting *fmt;
- tpsip_codec_param_formats_init ();
+ rakia_codec_param_formats_init ();
- fmt = g_slice_new (TpsipCodecParamFormatting);
+ fmt = g_slice_new (RakiaCodecParamFormatting);
fmt->format = format;
fmt->parse = parse;
@@ -149,12 +149,12 @@ format_param_generic (gpointer key, gpointer val, gpointer user_data)
{
g_string_append (out, name);
g_string_append_c (out, '=');
- tpsip_string_append_quoted (out, value);
+ rakia_string_append_quoted (out, value);
}
}
/**
- * tpsip_codec_param_format_generic:
+ * rakia_codec_param_format_generic:
* @params: the map of codec parameters
* @out: a #GString for the output
*
@@ -163,13 +163,13 @@ format_param_generic (gpointer key, gpointer val, gpointer user_data)
* pairs, as recommended in IETF RFC 4855 Section 3.
*/
void
-tpsip_codec_param_format_generic (GHashTable *params, GString *out)
+rakia_codec_param_format_generic (GHashTable *params, GString *out)
{
g_hash_table_foreach (params, format_param_generic, out);
}
/**
- * tpsip_codec_param_parse_generic:
+ * rakia_codec_param_parse_generic:
* @fmtp: a string value with the parameter description
* @out: the parameter map to populate
*
@@ -178,7 +178,7 @@ tpsip_codec_param_format_generic (GHashTable *params, GString *out)
* pairs, as recommended in IETF RFC 4855 Section 3.
*/
void
-tpsip_codec_param_parse_generic (const gchar *fmtp, GHashTable *out)
+rakia_codec_param_parse_generic (const gchar *fmtp, GHashTable *out)
{
GMatchInfo *match = NULL;
gint pos;
@@ -214,7 +214,7 @@ tpsip_codec_param_parse_generic (const gchar *fmtp, GHashTable *out)
if (value_end - 1 > value_start
&& fmtp[value_start] == '\"' && fmtp[value_end - 1] == '\"')
{
- value = tpsip_unquote_string (fmtp + value_start,
+ value = rakia_unquote_string (fmtp + value_start,
value_end - value_start);
}
else
@@ -242,7 +242,7 @@ tpsip_codec_param_parse_generic (const gchar *fmtp, GHashTable *out)
/* Custom format for audio/telephone-event */
static void
-tpsip_codec_param_format_telephone_event (GHashTable *params, GString *out)
+rakia_codec_param_format_telephone_event (GHashTable *params, GString *out)
{
const gchar *events;
@@ -255,11 +255,11 @@ tpsip_codec_param_format_telephone_event (GHashTable *params, GString *out)
}
/* format the rest of the parameters, if any */
- tpsip_codec_param_format_generic (params, out);
+ rakia_codec_param_format_generic (params, out);
}
static void
-tpsip_codec_param_parse_telephone_event (const gchar *fmtp, GHashTable *out)
+rakia_codec_param_parse_telephone_event (const gchar *fmtp, GHashTable *out)
{
GMatchInfo *match = NULL;
gint end_pos = 0;
@@ -283,18 +283,18 @@ tpsip_codec_param_parse_telephone_event (const gchar *fmtp, GHashTable *out)
g_match_info_free (match);
/* Parse the remaining parameters, if any */
- tpsip_codec_param_parse_generic (fmtp + end_pos, out);
+ rakia_codec_param_parse_generic (fmtp + end_pos, out);
}
/*
- * tpsip_codec_param_formats_init:
+ * rakia_codec_param_formats_init:
*
* Initializes the codec parameter formatting infrastructure.
* This function must be called before using any other functions in this module.
* Calling the function more than once has no effect.
*/
static void
-tpsip_codec_param_formats_init ()
+rakia_codec_param_formats_init ()
{
static volatile gsize been_here = 0;
@@ -311,10 +311,10 @@ tpsip_codec_param_formats_init ()
codec_param_formats[i] = g_hash_table_new (g_str_hash, g_str_equal);
}
- tpsip_codec_param_register_format (
+ rakia_codec_param_register_format (
TP_MEDIA_STREAM_TYPE_AUDIO, "telephone-event",
- tpsip_codec_param_format_telephone_event,
- tpsip_codec_param_parse_telephone_event);
+ rakia_codec_param_format_telephone_event,
+ rakia_codec_param_parse_telephone_event);
fmtp_attr_regex = g_regex_new (
"(?<" FMTP_MATCH_NAME_PARAM ">" FMTP_TOKEN_PARAM ")"
diff --git a/tpsip/codec-param-formats.h b/rakia/codec-param-formats.h
index 97c2405..f5a717f 100644
--- a/tpsip/codec-param-formats.h
+++ b/rakia/codec-param-formats.h
@@ -28,7 +28,7 @@
G_BEGIN_DECLS
/**
- * TpsipCodecParamFormatFunc:
+ * RakiaCodecParamFormatFunc:
* @params: the map of codec parameters
* @out: a #GString for the output
*
@@ -42,14 +42,14 @@ G_BEGIN_DECLS
* <para>The function is allowed to delete pairs from the @params hash table.
* This is useful to implement a custom formatter that processes the
* few parameters treated specially, removes them from the map, and
- * calls a more generic formatter such as tpsip_codec_param_format_generic().
+ * calls a more generic formatter such as rakia_codec_param_format_generic().
* </para>
* </note>
*/
-typedef void (* TpsipCodecParamFormatFunc) (GHashTable *params, GString *out);
+typedef void (* RakiaCodecParamFormatFunc) (GHashTable *params, GString *out);
/**
- * TpsipCodecParamParseFunc:
+ * RakiaCodecParamParseFunc:
* @str: a string value with format-specific parameter description
* @out: the parameter map to populate
*
@@ -57,23 +57,23 @@ typedef void (* TpsipCodecParamFormatFunc) (GHashTable *params, GString *out);
* A parser takes the string value coming from an <literal>a=fmtp</literal>
* SDP attribute, and populates the parameter hash table.
*/
-typedef void (* TpsipCodecParamParseFunc) (const gchar *str, GHashTable *out);
+typedef void (* RakiaCodecParamParseFunc) (const gchar *str, GHashTable *out);
-void tpsip_codec_param_format (TpMediaStreamType media, const char *name,
+void rakia_codec_param_format (TpMediaStreamType media, const char *name,
GHashTable *params, GString *out);
-void tpsip_codec_param_parse (TpMediaStreamType media, const char *name,
+void rakia_codec_param_parse (TpMediaStreamType media, const char *name,
const gchar *fmtp, GHashTable *out);
-void tpsip_codec_param_register_format (
+void rakia_codec_param_register_format (
TpMediaStreamType media,
const char *name,
- TpsipCodecParamFormatFunc format,
- TpsipCodecParamParseFunc parse);
+ RakiaCodecParamFormatFunc format,
+ RakiaCodecParamParseFunc parse);
-void tpsip_codec_param_format_generic (GHashTable *params, GString *out);
+void rakia_codec_param_format_generic (GHashTable *params, GString *out);
-void tpsip_codec_param_parse_generic (const gchar *str, GHashTable *out);
+void rakia_codec_param_parse_generic (const gchar *str, GHashTable *out);
G_END_DECLS
diff --git a/tpsip/connection-aliasing.c b/rakia/connection-aliasing.c
index 84b876e..403f55e 100644
--- a/tpsip/connection-aliasing.c
+++ b/rakia/connection-aliasing.c
@@ -1,5 +1,5 @@
/*
- * connection-aliasing.c - Implementation for TpsipConnectionAliasing interface
+ * connection-aliasing.c - Implementation for RakiaConnectionAliasing interface
* Copyright (C) 2008-2011 Nokia Corporation
* @author Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
* @author Pekka Pessi <pekka.pessi@nokia.com>
@@ -21,9 +21,9 @@
#include "config.h"
-#include <tpsip/connection-aliasing.h>
-#include <tpsip/base-connection.h>
-#include <tpsip/handles.h>
+#include <rakia/connection-aliasing.h>
+#include <rakia/base-connection.h>
+#include <rakia/handles.h>
#include <telepathy-glib/errors.h>
#include <telepathy-glib/gtypes.h>
@@ -31,12 +31,12 @@
#include <telepathy-glib/svc-connection.h>
#include <telepathy-glib/contacts-mixin.h>
-#include "tpsip/handles.h"
+#include "rakia/handles.h"
#include <string.h>
#define DEBUG_FLAG TPSIP_DEBUG_CONNECTION
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
enum {
PROP_NONE,
@@ -44,7 +44,7 @@ enum {
};
static void
-tpsip_connection_aliasing_base_init (gpointer klass)
+rakia_connection_aliasing_base_init (gpointer klass)
{
static gboolean initialized = FALSE;
@@ -61,15 +61,15 @@ tpsip_connection_aliasing_base_init (gpointer klass)
}
GType
-tpsip_connection_aliasing_get_type (void)
+rakia_connection_aliasing_get_type (void)
{
static GType type = 0;
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo info = {
- sizeof (TpsipConnectionAliasingInterface),
- tpsip_connection_aliasing_base_init, /* base_init */
+ sizeof (RakiaConnectionAliasingInterface),
+ rakia_connection_aliasing_base_init, /* base_init */
NULL, /* base_finalize */
NULL, /* class_init */
NULL, /* class_finalize */
@@ -80,7 +80,7 @@ tpsip_connection_aliasing_get_type (void)
};
type = g_type_register_static (G_TYPE_INTERFACE,
- "TpsipConnectionAliasingInterface", &info, 0);
+ "RakiaConnectionAliasingInterface", &info, 0);
g_type_interface_add_prerequisite (type, TPSIP_TYPE_BASE_CONNECTION);
g_type_interface_add_prerequisite (type,
@@ -91,7 +91,7 @@ tpsip_connection_aliasing_get_type (void)
}
static void
-tpsip_connection_get_alias_flags (TpSvcConnectionInterfaceAliasing *iface,
+rakia_connection_get_alias_flags (TpSvcConnectionInterfaceAliasing *iface,
DBusGMethodInvocation *context)
{
TpBaseConnection *base = TP_BASE_CONNECTION (iface);
@@ -113,7 +113,7 @@ conn_get_default_alias (TpBaseConnection *base,
/* TODO: create our custom handle repo to be able to get the URL off it.
* Then we can reuse the contact_handles parameter */
- url = tpsip_handle_inspect_uri (base, handle);
+ url = rakia_handle_inspect_uri (base, handle);
switch (url->url_type)
{
@@ -159,7 +159,7 @@ conn_get_alias (TpBaseConnection *base,
}
static void
-tpsip_connection_request_aliases (TpSvcConnectionInterfaceAliasing *iface,
+rakia_connection_request_aliases (TpSvcConnectionInterfaceAliasing *iface,
const GArray *contacts,
DBusGMethodInvocation *context)
{
@@ -205,7 +205,7 @@ tpsip_connection_request_aliases (TpSvcConnectionInterfaceAliasing *iface,
}
static void
-tpsip_connection_get_aliases (TpSvcConnectionInterfaceAliasing *iface,
+rakia_connection_get_aliases (TpSvcConnectionInterfaceAliasing *iface,
const GArray *contacts,
DBusGMethodInvocation *context)
{
@@ -296,7 +296,7 @@ collapse_whitespace (const gchar *str, gchar **to_free)
}
static void
-tpsip_connection_set_aliases (TpSvcConnectionInterfaceAliasing *iface,
+rakia_connection_set_aliases (TpSvcConnectionInterfaceAliasing *iface,
GHashTable *aliases,
DBusGMethodInvocation *context)
{
@@ -347,7 +347,7 @@ tpsip_connection_set_aliases (TpSvcConnectionInterfaceAliasing *iface,
}
static void
-tpsip_conn_aliasing_fill_contact_attributes (GObject *obj,
+rakia_conn_aliasing_fill_contact_attributes (GObject *obj,
const GArray *contacts, GHashTable *attributes_hash)
{
TpBaseConnection *base = TP_BASE_CONNECTION (obj);
@@ -375,22 +375,22 @@ tpsip_conn_aliasing_fill_contact_attributes (GObject *obj,
}
void
-tpsip_connection_aliasing_init (gpointer instance)
+rakia_connection_aliasing_init (gpointer instance)
{
tp_contacts_mixin_add_contact_attributes_iface (G_OBJECT (instance),
TP_IFACE_CONNECTION_INTERFACE_ALIASING,
- tpsip_conn_aliasing_fill_contact_attributes);
+ rakia_conn_aliasing_fill_contact_attributes);
}
void
-tpsip_connection_aliasing_svc_iface_init (gpointer g_iface, gpointer iface_data)
+rakia_connection_aliasing_svc_iface_init (gpointer g_iface, gpointer iface_data)
{
TpSvcConnectionInterfaceAliasingClass *klass =
(TpSvcConnectionInterfaceAliasingClass *) g_iface;
#define IMPLEMENT(x) tp_svc_connection_interface_aliasing_implement_##x (\
- klass, tpsip_connection_##x)
+ klass, rakia_connection_##x)
IMPLEMENT(get_alias_flags);
IMPLEMENT(request_aliases);
IMPLEMENT(get_aliases);
diff --git a/tpsip/connection-aliasing.h b/rakia/connection-aliasing.h
index 1b674d4..bc30565 100644
--- a/tpsip/connection-aliasing.h
+++ b/rakia/connection-aliasing.h
@@ -1,5 +1,5 @@
/*
- * tpsip/connection-aliasing.h - Aliasing interface implementation for SIP
+ * rakia/connection-aliasing.h - Aliasing interface implementation for SIP
* Copyright (C) 2008, 2011 Nokia Corporation
* @author Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
*
@@ -25,32 +25,32 @@
G_BEGIN_DECLS
-typedef struct _TpsipConnectionAliasing TpsipConnectionAliasing;
+typedef struct _RakiaConnectionAliasing RakiaConnectionAliasing;
-typedef struct _TpsipConnectionAliasingInterface
-TpsipConnectionAliasingInterface;
+typedef struct _RakiaConnectionAliasingInterface
+RakiaConnectionAliasingInterface;
/* TYPE MACROS */
#define TPSIP_TYPE_CONNECTION_ALIASING \
- (tpsip_connection_aliasing_get_type ())
+ (rakia_connection_aliasing_get_type ())
#define TPSIP_CONNECTION_ALIASING(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
- TPSIP_TYPE_CONNECTION_ALIASING, TpsipConnectionAliasing))
+ TPSIP_TYPE_CONNECTION_ALIASING, RakiaConnectionAliasing))
#define TPSIP_IS_CONNECTION_ALIASING(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TPSIP_TYPE_CONNECTION_ALIASING))
#define TPSIP_CONNECTION_ALIASING_GET_INTERFACE(obj) \
(G_TYPE_INSTANCE_GET_INTERFACE((obj), \
- TPSIP_TYPE_CONNECTION_ALIASING, TpsipConnectionAliasingInterface))
+ TPSIP_TYPE_CONNECTION_ALIASING, RakiaConnectionAliasingInterface))
-struct _TpsipConnectionAliasingInterface {
+struct _RakiaConnectionAliasingInterface {
GTypeInterface base_iface;
};
-GType tpsip_connection_aliasing_get_type (void) G_GNUC_CONST;
+GType rakia_connection_aliasing_get_type (void) G_GNUC_CONST;
-void tpsip_connection_aliasing_init (gpointer instance);
+void rakia_connection_aliasing_init (gpointer instance);
-void tpsip_connection_aliasing_svc_iface_init (gpointer g_iface,
+void rakia_connection_aliasing_svc_iface_init (gpointer g_iface,
gpointer iface_data);
G_END_DECLS
diff --git a/tpsip/debug.c b/rakia/debug.c
index 21af353..11f7b6a 100644
--- a/tpsip/debug.c
+++ b/rakia/debug.c
@@ -26,13 +26,13 @@
#include <telepathy-glib/debug.h>
#include <telepathy-glib/debug-sender.h>
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
#include <sofia-sip/su_log.h>
-static TpsipDebugFlags tpsip_debug_flags = 0;
+static RakiaDebugFlags rakia_debug_flags = 0;
-static const GDebugKey tpsip_debug_keys[] = {
+static const GDebugKey rakia_debug_keys[] = {
{ "media-channel", TPSIP_DEBUG_MEDIA },
{ "connection", TPSIP_DEBUG_CONNECTION },
{ "im", TPSIP_DEBUG_IM },
@@ -40,38 +40,38 @@ static const GDebugKey tpsip_debug_keys[] = {
{ "sofia", TPSIP_DEBUG_SOFIA },
};
-void tpsip_debug_set_flags_from_env ()
+void rakia_debug_set_flags_from_env ()
{
const gchar *flags_string;
flags_string = g_getenv ("TPSIP_DEBUG");
if (flags_string == NULL)
- flags_string = g_getenv ("SOFIASIP_DEBUG");
+ flags_string = g_getenv ("RAKIA_DEBUG");
if (flags_string != NULL)
{
tp_debug_set_flags (flags_string);
- tpsip_debug_set_flags (g_parse_debug_string (flags_string,
- tpsip_debug_keys,
- G_N_ELEMENTS(tpsip_debug_keys)));
+ rakia_debug_set_flags (g_parse_debug_string (flags_string,
+ rakia_debug_keys,
+ G_N_ELEMENTS(rakia_debug_keys)));
}
}
-void tpsip_debug_set_flags (TpsipDebugFlags new_flags)
+void rakia_debug_set_flags (RakiaDebugFlags new_flags)
{
- tpsip_debug_flags |= new_flags;
+ rakia_debug_flags |= new_flags;
}
-gboolean tpsip_debug_flag_is_set (TpsipDebugFlags flag)
+gboolean rakia_debug_flag_is_set (RakiaDebugFlags flag)
{
- return (flag & tpsip_debug_flags) ? TRUE : FALSE;
+ return (flag & rakia_debug_flags) ? TRUE : FALSE;
}
static GHashTable *flag_to_domains = NULL;
static const gchar *
-debug_flag_to_domain (TpsipDebugFlags flag)
+debug_flag_to_domain (RakiaDebugFlags flag)
{
if (G_UNLIKELY (flag_to_domains == NULL))
{
@@ -80,12 +80,12 @@ debug_flag_to_domain (TpsipDebugFlags flag)
flag_to_domains = g_hash_table_new_full (g_direct_hash, g_direct_equal,
NULL, g_free);
- for (i = 0; i < G_N_ELEMENTS(tpsip_debug_keys); i++)
+ for (i = 0; i < G_N_ELEMENTS(rakia_debug_keys); i++)
{
- GDebugKey key = (GDebugKey) tpsip_debug_keys[i];
+ GDebugKey key = (GDebugKey) rakia_debug_keys[i];
gchar *val;
- val = g_strdup_printf ("%s/%s", "tpsip", key.key);
+ val = g_strdup_printf ("%s/%s", "rakia", key.key);
g_hash_table_insert (flag_to_domains,
GUINT_TO_POINTER (key.value), val);
}
@@ -95,7 +95,7 @@ debug_flag_to_domain (TpsipDebugFlags flag)
}
void
-tpsip_debug_free (void)
+rakia_debug_free (void)
{
if (flag_to_domains == NULL)
return;
@@ -105,7 +105,7 @@ tpsip_debug_free (void)
}
static void
-log_to_debug_sender (TpsipDebugFlags flag,
+log_to_debug_sender (RakiaDebugFlags flag,
GLogLevelFlags level,
const gchar *message)
{
@@ -122,7 +122,7 @@ log_to_debug_sender (TpsipDebugFlags flag,
g_object_unref (dbg);
}
-void tpsip_log (TpsipDebugFlags flag,
+void rakia_log (RakiaDebugFlags flag,
GLogLevelFlags level,
const gchar *format,
...)
@@ -136,14 +136,14 @@ void tpsip_log (TpsipDebugFlags flag,
log_to_debug_sender (flag, level, message);
- if (flag & tpsip_debug_flags)
+ if (flag & rakia_debug_flags)
g_log (G_LOG_DOMAIN, level, "%s", message);
g_free (message);
}
static void
-tpsip_sofia_log_handler (void *logdata, const char *format, va_list args)
+rakia_sofia_log_handler (void *logdata, const char *format, va_list args)
{
#ifdef ENABLE_DEBUG
GString *buf = (GString *)logdata;
@@ -156,14 +156,14 @@ tpsip_sofia_log_handler (void *logdata, const char *format, va_list args)
if (buf->str[buf->len - 1] == '\n')
{
g_string_truncate (buf, buf->len - 1);
- tpsip_log (TPSIP_DEBUG_SOFIA, G_LOG_LEVEL_DEBUG, "%s", buf->str);
+ rakia_log (TPSIP_DEBUG_SOFIA, G_LOG_LEVEL_DEBUG, "%s", buf->str);
g_string_truncate (buf, 0);
}
#endif
}
gpointer
-tpsip_sofia_log_init ()
+rakia_sofia_log_init ()
{
GString *buf;
@@ -173,20 +173,20 @@ tpsip_sofia_log_init ()
buf = NULL;
#endif
- su_log_redirect (NULL, tpsip_sofia_log_handler, buf);
+ su_log_redirect (NULL, rakia_sofia_log_handler, buf);
return buf;
}
void
-tpsip_sofia_log_finalize (gpointer logdata)
+rakia_sofia_log_finalize (gpointer logdata)
{
#ifdef ENABLE_DEBUG
GString *buf = (GString *)logdata;
if (buf->len != 0)
{
- /* Don't use tpsip_log here because the CM has already been finalized, so
+ /* Don't use rakia_log here because the CM has already been finalized, so
* out TpDebugSender will have too. It isn't crucial, anyway. */
g_debug ("%s", buf->str);
g_message ("last Sofia log message was not newline-terminated");
diff --git a/tpsip/debug.h b/rakia/debug.h
index 30f23c1..58d7628 100644
--- a/tpsip/debug.h
+++ b/rakia/debug.h
@@ -31,33 +31,33 @@ typedef enum
TPSIP_DEBUG_IM = 1 << 2,
TPSIP_DEBUG_EVENTS = 1 << 3,
TPSIP_DEBUG_SOFIA = 1 << 4,
-} TpsipDebugFlags;
+} RakiaDebugFlags;
-void tpsip_debug_set_flags_from_env ();
-void tpsip_debug_set_flags (TpsipDebugFlags flags);
-gboolean tpsip_debug_flag_is_set (TpsipDebugFlags flag);
-void tpsip_log (TpsipDebugFlags flag, GLogLevelFlags level,
+void rakia_debug_set_flags_from_env ();
+void rakia_debug_set_flags (RakiaDebugFlags flags);
+gboolean rakia_debug_flag_is_set (RakiaDebugFlags flag);
+void rakia_log (RakiaDebugFlags flag, GLogLevelFlags level,
const gchar *format, ...) G_GNUC_PRINTF (3, 4);
-void tpsip_debug_free (void);
+void rakia_debug_free (void);
-gpointer tpsip_sofia_log_init ();
-void tpsip_sofia_log_finalize (gpointer logdata);
+gpointer rakia_sofia_log_init ();
+void rakia_sofia_log_finalize (gpointer logdata);
G_END_DECLS
#ifdef DEBUG_FLAG
#define DEBUG(format, ...) \
- tpsip_log(DEBUG_FLAG, G_LOG_LEVEL_DEBUG, "%s: " format, \
+ rakia_log(DEBUG_FLAG, G_LOG_LEVEL_DEBUG, "%s: " format, \
G_STRFUNC, ##__VA_ARGS__)
#define WARNING(format, ...) \
- tpsip_log(DEBUG_FLAG, G_LOG_LEVEL_WARNING, "%s: " format, \
+ rakia_log(DEBUG_FLAG, G_LOG_LEVEL_WARNING, "%s: " format, \
G_STRFUNC, ##__VA_ARGS__)
#define MESSAGE(format, ...) \
- tpsip_log(DEBUG_FLAG, G_LOG_LEVEL_MESSAGE, "%s: " format, \
+ rakia_log(DEBUG_FLAG, G_LOG_LEVEL_MESSAGE, "%s: " format, \
G_STRFUNC, ##__VA_ARGS__)
-/* #define DEBUGGING tpsip_debug_flag_is_set(DEBUG_FLAG) */
+/* #define DEBUGGING rakia_debug_flag_is_set(DEBUG_FLAG) */
#else /* DEBUG_FLAG */
diff --git a/tpsip/event-target.c b/rakia/event-target.c
index b90d378..74bec43 100644
--- a/tpsip/event-target.c
+++ b/rakia/event-target.c
@@ -1,5 +1,5 @@
/*
- * event-target.c - Implementation for TpsipEventTarget interface
+ * event-target.c - Implementation for RakiaEventTarget interface
* Copyright (C) 2008 Nokia Corporation
* @author Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
*
@@ -34,10 +34,10 @@ enum {
};
static guint signals[NUM_SIGNALS] = {0};
-static TpsipEventTarget * tpsip_event_target_gone_instance ();
+static RakiaEventTarget * rakia_event_target_gone_instance ();
static void
-tpsip_event_target_base_init (gpointer klass)
+rakia_event_target_base_init (gpointer klass)
{
static gboolean initialized = FALSE;
gint i;
@@ -47,8 +47,8 @@ tpsip_event_target_base_init (gpointer klass)
initialized = TRUE;
/**
- * TpsipEventTarget::nua-event:
- * @instance: an object implementing #TpsipEventTarget that emitted the signal
+ * RakiaEventTarget::nua-event:
+ * @instance: an object implementing #RakiaEventTarget that emitted the signal
* @event: Pointer to the event data structure
* @tags: Tag list containing dynamically typed information about the event
*
@@ -61,10 +61,10 @@ tpsip_event_target_base_init (gpointer klass)
g_signal_new ("nua-event",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED,
- 0 /* G_STRUCT_OFFSET (TpsipEventTargetInterface, nua_event) */,
+ 0 /* G_STRUCT_OFFSET (RakiaEventTargetInterface, nua_event) */,
g_signal_accumulator_true_handled,
NULL,
- _tpsip_marshal_BOOLEAN__POINTER_POINTER,
+ _rakia_marshal_BOOLEAN__POINTER_POINTER,
G_TYPE_BOOLEAN,
2,
G_TYPE_POINTER,
@@ -77,15 +77,15 @@ tpsip_event_target_base_init (gpointer klass)
}
GType
-tpsip_event_target_get_type (void)
+rakia_event_target_get_type (void)
{
static GType type = 0;
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo info = {
- sizeof (TpsipEventTargetInterface),
- tpsip_event_target_base_init, /* base_init */
+ sizeof (RakiaEventTargetInterface),
+ rakia_event_target_base_init, /* base_init */
NULL, /* base_finalize */
NULL, /* class_init */
NULL, /* class_finalize */
@@ -96,34 +96,34 @@ tpsip_event_target_get_type (void)
};
type = g_type_register_static (G_TYPE_INTERFACE,
- "TpsipEventTargetInterface", &info, 0);
+ "RakiaEventTargetInterface", &info, 0);
}
return type;
}
static void
-tpsip_event_target_retire_nua_handle (nua_handle_t *nh)
+rakia_event_target_retire_nua_handle (nua_handle_t *nh)
{
- static TpsipEventTarget *target_gone = NULL;
+ static RakiaEventTarget *target_gone = NULL;
if (G_UNLIKELY (target_gone == NULL))
- target_gone = tpsip_event_target_gone_instance ();
+ target_gone = rakia_event_target_gone_instance ();
nua_handle_bind (nh, target_gone);
nua_handle_unref (nh);
}
static void
-_tpsip_event_target_finalized (gpointer data, GObject *former_obj)
+_rakia_event_target_finalized (gpointer data, GObject *former_obj)
{
- tpsip_event_target_retire_nua_handle ((nua_handle_t *) data);
+ rakia_event_target_retire_nua_handle ((nua_handle_t *) data);
}
/**
- * tpsip_event_target_attach:
+ * rakia_event_target_attach:
* @nh: The NUA handle
- * @obj: an object implementing #TpsipEventTarget
+ * @obj: an object implementing #RakiaEventTarget
*
* Attach an event target object to the NUA handle using nua_handle_bind().
* The reference count of the NUA handle is incremented.
@@ -132,52 +132,52 @@ _tpsip_event_target_finalized (gpointer data, GObject *former_obj)
* handler for debugging purposes.
*/
void
-tpsip_event_target_attach (nua_handle_t *nh, GObject *obj)
+rakia_event_target_attach (nua_handle_t *nh, GObject *obj)
{
g_assert (nh != NULL);
nua_handle_bind (nh, TPSIP_EVENT_TARGET (obj));
nua_handle_ref (nh);
- g_object_weak_ref (obj, _tpsip_event_target_finalized, nh);
+ g_object_weak_ref (obj, _rakia_event_target_finalized, nh);
}
/**
- * tpsip_event_target_detach:
+ * rakia_event_target_detach:
* @nh: The NUA handle
*
* Detach the event target object previously attached to the NUA handle
- * using tpsip_event_target_attach().
+ * using rakia_event_target_attach().
* The reference count of the NUA handle is decremented, and the handle
* is bound to a special end-of-life event handler for debugging purposes.
*/
void
-tpsip_event_target_detach (nua_handle_t *nh)
+rakia_event_target_detach (nua_handle_t *nh)
{
GObject *obj;
g_assert (nh != NULL);
obj = G_OBJECT (nua_handle_magic (nh));
- g_object_weak_unref (obj, _tpsip_event_target_finalized, nh);
+ g_object_weak_unref (obj, _rakia_event_target_finalized, nh);
- tpsip_event_target_retire_nua_handle (nh);
+ rakia_event_target_retire_nua_handle (nh);
}
/**
- * tpsip_event_target_emit_nua_event:
+ * rakia_event_target_emit_nua_event:
* @instance: The object implementing this interface
* @event: Pointer to the event data structure
* @tags: Tag list containing dynamically typed information about the event
*
- * Emit the signal #TpsipEventTarget::nua-event, detailed with the event name,
+ * Emit the signal #RakiaEventTarget::nua-event, detailed with the event name,
* on an instance of a class implementing this interface.
* This function is normally called by the NUA callback.
* Returns: TRUE if a signal handler handled the event and returned TRUE.
*/
gboolean
-tpsip_event_target_emit_nua_event (gpointer instance,
- const TpsipNuaEvent *ev,
+rakia_event_target_emit_nua_event (gpointer instance,
+ const RakiaNuaEvent *ev,
tagi_t tags[])
{
gboolean retval = FALSE;
@@ -202,25 +202,25 @@ tpsip_event_target_emit_nua_event (gpointer instance,
return retval;
}
-/* TpsipEventTargetGone:
- * a special private implementation of TpsipEventTarget for a singleton
+/* RakiaEventTargetGone:
+ * a special private implementation of RakiaEventTarget for a singleton
* catch-all object to associate with handles that have been detached from
* other event targets.
*/
-typedef struct _TpsipEventTargetGone TpsipEventTargetGone;
-typedef struct _TpsipEventTargetGoneClass TpsipEventTargetGoneClass;
+typedef struct _RakiaEventTargetGone RakiaEventTargetGone;
+typedef struct _RakiaEventTargetGoneClass RakiaEventTargetGoneClass;
-struct _TpsipEventTargetGone {
+struct _RakiaEventTargetGone {
GObject parent;
};
-struct _TpsipEventTargetGoneClass {
+struct _RakiaEventTargetGoneClass {
GObjectClass parent_class;
};
static gboolean
-tpsip_late_nua_event_cb (TpsipEventTargetGone *self,
- const TpsipNuaEvent *event,
+rakia_late_nua_event_cb (RakiaEventTargetGone *self,
+ const RakiaNuaEvent *event,
tagi_t tags[],
gpointer foo)
{
@@ -233,39 +233,39 @@ tpsip_late_nua_event_cb (TpsipEventTargetGone *self,
}
static void
-tpsip_event_target_gone_iface_init (gpointer g_iface, gpointer iface_data)
+rakia_event_target_gone_iface_init (gpointer g_iface, gpointer iface_data)
{
}
-G_DEFINE_TYPE_WITH_CODE (TpsipEventTargetGone, tpsip_event_target_gone,
+G_DEFINE_TYPE_WITH_CODE (RakiaEventTargetGone, rakia_event_target_gone,
G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (TPSIP_TYPE_EVENT_TARGET, tpsip_event_target_gone_iface_init))
+ G_IMPLEMENT_INTERFACE (TPSIP_TYPE_EVENT_TARGET, rakia_event_target_gone_iface_init))
static void
-tpsip_event_target_gone_class_init (TpsipEventTargetGoneClass *klass)
+rakia_event_target_gone_class_init (RakiaEventTargetGoneClass *klass)
{
}
static void
-tpsip_event_target_gone_init (TpsipEventTargetGone *self)
+rakia_event_target_gone_init (RakiaEventTargetGone *self)
{
g_signal_connect (self, "nua-event",
- G_CALLBACK (tpsip_late_nua_event_cb),
+ G_CALLBACK (rakia_late_nua_event_cb),
NULL);
}
static gpointer
-_tpsip_event_target_gone_new_instance (gpointer foo)
+_rakia_event_target_gone_new_instance (gpointer foo)
{
- return g_object_new (tpsip_event_target_gone_get_type (), NULL);
+ return g_object_new (rakia_event_target_gone_get_type (), NULL);
}
-static TpsipEventTarget *
-tpsip_event_target_gone_instance ()
+static RakiaEventTarget *
+rakia_event_target_gone_instance ()
{
static GOnce init_gone_once = G_ONCE_INIT;
- g_once (&init_gone_once, _tpsip_event_target_gone_new_instance, NULL);
+ g_once (&init_gone_once, _rakia_event_target_gone_new_instance, NULL);
return TPSIP_EVENT_TARGET (init_gone_once.retval);
}
diff --git a/tpsip/event-target.h b/rakia/event-target.h
index a2427a4..c6aae9c 100644
--- a/tpsip/event-target.h
+++ b/rakia/event-target.h
@@ -1,5 +1,5 @@
/*
- * event-target.h - Header for TpsipEventTarget interface and related utilities
+ * event-target.h - Header for RakiaEventTarget interface and related utilities
* Copyright (C) 2008 Nokia Corporation
* @author Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
*
@@ -22,14 +22,14 @@
#define __TPSIP_EVENT_TARGET_H__
#include <glib-object.h>
-#include <tpsip/sofia-decls.h>
+#include <rakia/sofia-decls.h>
G_BEGIN_DECLS
-typedef struct _TpsipNuaEvent TpsipNuaEvent;
+typedef struct _RakiaNuaEvent RakiaNuaEvent;
/**
- * TpsipNuaEvent:
+ * RakiaNuaEvent:
* @nua_event: The NUA event identifier
* @status: a SIP status code, or a status value used by Sofia-SIP
* @text: The text corresponding to the status code
@@ -40,7 +40,7 @@ typedef struct _TpsipNuaEvent TpsipNuaEvent;
* This structure contains data passed to the NUA event callback.
* The event tag list is not included and passed as a separate parameter.
*/
-struct _TpsipNuaEvent {
+struct _RakiaNuaEvent {
nua_event_t nua_event;
gint status;
const gchar *text;
@@ -50,41 +50,41 @@ struct _TpsipNuaEvent {
};
/**
- * TpsipEventTarget:
+ * RakiaEventTarget:
*
* A typedef representing any implementation of this interface.
*/
-typedef struct _TpsipEventTarget TpsipEventTarget;
+typedef struct _RakiaEventTarget RakiaEventTarget;
-typedef struct _TpsipEventTargetInterface TpsipEventTargetInterface;
+typedef struct _RakiaEventTargetInterface RakiaEventTargetInterface;
/* TYPE MACROS */
#define TPSIP_TYPE_EVENT_TARGET \
- (tpsip_event_target_get_type ())
+ (rakia_event_target_get_type ())
#define TPSIP_EVENT_TARGET(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_EVENT_TARGET, TpsipEventTarget))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_EVENT_TARGET, RakiaEventTarget))
#define TPSIP_IS_EVENT_TARGET(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TPSIP_TYPE_EVENT_TARGET))
#define TPSIP_EVENT_TARGET_GET_INTERFACE(obj) \
- (G_TYPE_INSTANCE_GET_INTERFACE((obj), TPSIP_TYPE_EVENT_TARGET, TpsipEventTargetInterface))
+ (G_TYPE_INSTANCE_GET_INTERFACE((obj), TPSIP_TYPE_EVENT_TARGET, RakiaEventTargetInterface))
-struct _TpsipEventTargetInterface {
+struct _RakiaEventTargetInterface {
GTypeInterface base_iface;
/*
- gboolean (* nua_event) (TpsipEventTarget *self,
- const TpsipEvent *event,
+ gboolean (* nua_event) (RakiaEventTarget *self,
+ const RakiaEvent *event,
tagi_t tags[]);
*/
};
-GType tpsip_event_target_get_type (void) G_GNUC_CONST;
+GType rakia_event_target_get_type (void) G_GNUC_CONST;
-void tpsip_event_target_attach (nua_handle_t *nh, GObject *target);
-void tpsip_event_target_detach (nua_handle_t *nh);
+void rakia_event_target_attach (nua_handle_t *nh, GObject *target);
+void rakia_event_target_detach (nua_handle_t *nh);
-gboolean tpsip_event_target_emit_nua_event (gpointer instance,
- const TpsipNuaEvent *event,
+gboolean rakia_event_target_emit_nua_event (gpointer instance,
+ const RakiaNuaEvent *event,
tagi_t tags[]);
G_END_DECLS
diff --git a/tpsip/handles.c b/rakia/handles.c
index ad1f328..5031dd0 100644
--- a/tpsip/handles.c
+++ b/rakia/handles.c
@@ -1,5 +1,5 @@
/*
- * tpsip/handles.c - Handler helpers
+ * rakia/handles.c - Handler helpers
* Copyright (C) 2005 Collabora Ltd.
* Copyright (C) 2006-2011 Nokia Corporation
*
@@ -22,25 +22,25 @@
#include <stdlib.h>
-#include <tpsip/handles.h>
+#include <rakia/handles.h>
#include <sofia-sip/sip_header.h>
#define DEBUG_FLAG TPSIP_DEBUG_CONNECTION
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
static GQuark
-tpsip_handle_url_quark ()
+rakia_handle_url_quark ()
{
static GQuark quark = 0;
if (G_UNLIKELY (quark == 0))
- quark = g_quark_from_static_string ("tpsip-handle-url");
+ quark = g_quark_from_static_string ("rakia-handle-url");
return quark;
}
const url_t*
-tpsip_handle_inspect_uri (TpBaseConnection *base,
+rakia_handle_inspect_uri (TpBaseConnection *base,
TpHandle handle)
{
TpHandleRepoIface *repo;
@@ -57,7 +57,7 @@ tpsip_handle_inspect_uri (TpBaseConnection *base,
return NULL;
}
- url_quark = tpsip_handle_url_quark ();
+ url_quark = rakia_handle_url_quark ();
url = tp_handle_get_qdata (repo, handle, url_quark);
@@ -72,7 +72,7 @@ tpsip_handle_inspect_uri (TpBaseConnection *base,
}
TpHandle
-tpsip_handle_ensure (TpBaseConnection *conn,
+rakia_handle_ensure (TpBaseConnection *conn,
url_t const *uri,
char const *alias)
{
@@ -97,7 +97,7 @@ tpsip_handle_ensure (TpBaseConnection *conn,
}
TpHandle
-tpsip_handle_by_requestor (TpBaseConnection *conn,
+rakia_handle_by_requestor (TpBaseConnection *conn,
sip_t const *sip)
{
url_t const *uri;
@@ -109,11 +109,11 @@ tpsip_handle_by_requestor (TpBaseConnection *conn,
uri = sip->sip_from->a_url;
display = sip->sip_from->a_display;
- return tpsip_handle_ensure (conn, uri, display);
+ return rakia_handle_ensure (conn, uri, display);
}
void
-tpsip_handle_unref (TpBaseConnection *conn,
+rakia_handle_unref (TpBaseConnection *conn,
TpHandle handle)
{
TpHandleRepoIface *repo;
@@ -127,7 +127,7 @@ tpsip_handle_unref (TpBaseConnection *conn,
}
char const *
-tpsip_handle_inspect (TpBaseConnection *conn,
+rakia_handle_inspect (TpBaseConnection *conn,
TpHandle handle)
{
TpHandleRepoIface *repo;
@@ -243,7 +243,7 @@ priv_lowercase_url_part (su_home_t *home, const char *src)
#define TPSIP_RESERVED_CHARS_ALLOWED_IN_USERNAME "!*'()&=+$,;?/"
gchar *
-tpsip_normalize_contact (const gchar *sipuri,
+rakia_normalize_contact (const gchar *sipuri,
const url_t *base_url,
const gchar *transport,
GError **error)
diff --git a/tpsip/handles.h b/rakia/handles.h
index 53dbf93..914f167 100644
--- a/tpsip/handles.h
+++ b/rakia/handles.h
@@ -1,5 +1,5 @@
/*
- * tpsip/handle.h - Telepathy SIP handle management
+ * rakia/handle.h - Telepathy SIP handle management
* Copyright (C) 2011 Nokia Corporation
* @author Pekka Pessi <pekka.pessi@nokia.com>
*
@@ -26,18 +26,18 @@
G_BEGIN_DECLS
-TpHandle tpsip_handle_ensure (TpBaseConnection *, url_t const *, char const *);
-TpHandle tpsip_handle_by_requestor (TpBaseConnection *, sip_t const *sip);
-void tpsip_handle_unref (TpBaseConnection *, TpHandle handle);
-char const *tpsip_handle_inspect (TpBaseConnection *, TpHandle handle);
-const url_t *tpsip_handle_inspect_uri (TpBaseConnection *, TpHandle handle);
+TpHandle rakia_handle_ensure (TpBaseConnection *, url_t const *, char const *);
+TpHandle rakia_handle_by_requestor (TpBaseConnection *, sip_t const *sip);
+void rakia_handle_unref (TpBaseConnection *, TpHandle handle);
+char const *rakia_handle_inspect (TpBaseConnection *, TpHandle handle);
+const url_t *rakia_handle_inspect_uri (TpBaseConnection *, TpHandle handle);
-gchar * tpsip_handle_normalize (TpHandleRepoIface *repo,
+gchar * rakia_handle_normalize (TpHandleRepoIface *repo,
const gchar *sipuri,
gpointer context,
GError **error);
-gchar *tpsip_normalize_contact (const gchar *sipuri,
+gchar *rakia_normalize_contact (const gchar *sipuri,
const url_t *base_url,
const gchar *transport,
GError **error);
diff --git a/tpsip/media-channel.c b/rakia/media-channel.c
index 4484725..089b2b9 100644
--- a/tpsip/media-channel.c
+++ b/rakia/media-channel.c
@@ -1,5 +1,5 @@
/*
- * sip-media-channel.c - Source for TpsipMediaChannel
+ * sip-media-channel.c - Source for RakiaMediaChannel
* Copyright (C) 2005-2008 Collabora Ltd.
* Copyright (C) 2005-2010 Nokia Corporation
* @author Kai Vehmanen <first.surname@nokia.com>
@@ -25,7 +25,7 @@
#include "config.h"
-#include "tpsip/media-channel.h"
+#include "rakia/media-channel.h"
#include <stdlib.h>
#include <string.h>
@@ -37,13 +37,13 @@
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/svc-channel.h>
-#include <tpsip/event-target.h>
+#include <rakia/event-target.h>
#define DEBUG_FLAG TPSIP_DEBUG_MEDIA
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
-#include <tpsip/media-session.h>
-#include <tpsip/base-connection.h>
+#include <rakia/media-session.h>
+#include <rakia/base-connection.h>
#define TPSIP_CHANNEL_CALL_STATE_PROCEEDING_MASK \
(TP_CHANNEL_CALL_STATE_RINGING | \
@@ -58,7 +58,7 @@ static void dtmf_iface_init (gpointer, gpointer);
static void call_state_iface_init (gpointer, gpointer);
static void hold_iface_init (gpointer, gpointer);
-G_DEFINE_TYPE_WITH_CODE (TpsipMediaChannel, tpsip_media_channel,
+G_DEFINE_TYPE_WITH_CODE (RakiaMediaChannel, rakia_media_channel,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (TPSIP_TYPE_EVENT_TARGET, event_target_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
@@ -81,7 +81,7 @@ G_DEFINE_TYPE_WITH_CODE (TpsipMediaChannel, tpsip_media_channel,
G_IMPLEMENT_INTERFACE (TP_TYPE_EXPORTABLE_CHANNEL, NULL);
G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL));
-static const gchar *tpsip_media_channel_interfaces[] = {
+static const gchar *rakia_media_channel_interfaces[] = {
TP_IFACE_CHANNEL_INTERFACE_GROUP,
TP_IFACE_CHANNEL_INTERFACE_MEDIA_SIGNALLING,
TP_IFACE_CHANNEL_INTERFACE_DTMF,
@@ -143,12 +143,12 @@ static guint signals[NUM_SIGNALS] = { 0 };
/* private structure */
-typedef struct _TpsipMediaChannelPrivate TpsipMediaChannelPrivate;
+typedef struct _RakiaMediaChannelPrivate RakiaMediaChannelPrivate;
-struct _TpsipMediaChannelPrivate
+struct _RakiaMediaChannelPrivate
{
- TpsipBaseConnection *conn;
- TpsipMediaSession *session;
+ RakiaBaseConnection *conn;
+ RakiaMediaSession *session;
gchar *object_path;
TpHandle handle;
TpHandle initiator;
@@ -163,16 +163,16 @@ struct _TpsipMediaChannelPrivate
gboolean dispose_has_run;
};
-#define TPSIP_MEDIA_CHANNEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_MEDIA_CHANNEL, TpsipMediaChannelPrivate))
+#define TPSIP_MEDIA_CHANNEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_MEDIA_CHANNEL, RakiaMediaChannelPrivate))
/***********************************************************************
* Set: Gobject interface
***********************************************************************/
static void
-tpsip_media_channel_init (TpsipMediaChannel *self)
+rakia_media_channel_init (RakiaMediaChannel *self)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
/* allocate any data required by the object here */
priv->call_states = g_hash_table_new (NULL, NULL);
@@ -180,17 +180,17 @@ tpsip_media_channel_init (TpsipMediaChannel *self)
/* initialise the properties mixin *before* GObject
* sets the construct-time properties */
tp_properties_mixin_init (G_OBJECT (self),
- G_STRUCT_OFFSET (TpsipMediaChannel, properties));
+ G_STRUCT_OFFSET (RakiaMediaChannel, properties));
}
static void
-tpsip_media_channel_constructed (GObject *obj)
+rakia_media_channel_constructed (GObject *obj)
{
- TpsipMediaChannel *chan = TPSIP_MEDIA_CHANNEL (obj);
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (chan);
+ RakiaMediaChannel *chan = TPSIP_MEDIA_CHANNEL (obj);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (chan);
TpBaseConnection *conn = (TpBaseConnection *)(priv->conn);
GObjectClass *parent_object_class =
- G_OBJECT_CLASS (tpsip_media_channel_parent_class);
+ G_OBJECT_CLASS (rakia_media_channel_parent_class);
TpDBusDaemon *bus;
TpHandleRepoIface *contact_repo;
TpIntSet *add;
@@ -212,7 +212,7 @@ tpsip_media_channel_constructed (GObject *obj)
/* initialize group mixin */
tp_group_mixin_init (obj,
- G_STRUCT_OFFSET (TpsipMediaChannel, group),
+ G_STRUCT_OFFSET (RakiaMediaChannel, group),
contact_repo,
conn->self_handle);
@@ -234,26 +234,26 @@ tpsip_media_channel_constructed (GObject *obj)
TP_CHANNEL_GROUP_FLAG_CAN_RESCIND | TP_CHANNEL_GROUP_FLAG_PROPERTIES, 0);
}
-static void tpsip_media_channel_dispose (GObject *object);
-static void tpsip_media_channel_finalize (GObject *object);
-static void tpsip_media_channel_get_property (GObject *object,
+static void rakia_media_channel_dispose (GObject *object);
+static void rakia_media_channel_finalize (GObject *object);
+static void rakia_media_channel_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void tpsip_media_channel_set_property (GObject *object,
+static void rakia_media_channel_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
-static void priv_create_session (TpsipMediaChannel *channel,
+static void priv_create_session (RakiaMediaChannel *channel,
nua_handle_t *nh,
TpHandle peer);
-static void priv_destroy_session(TpsipMediaChannel *channel);
+static void priv_destroy_session(RakiaMediaChannel *channel);
-static void priv_outbound_call (TpsipMediaChannel *channel,
+static void priv_outbound_call (RakiaMediaChannel *channel,
TpHandle peer);
-static gboolean tpsip_media_channel_remove_with_reason (
+static gboolean rakia_media_channel_remove_with_reason (
GObject *iface,
TpHandle handle,
const gchar *message,
@@ -261,7 +261,7 @@ static gboolean tpsip_media_channel_remove_with_reason (
GError **error);
static void
-tpsip_media_channel_class_init (TpsipMediaChannelClass *klass)
+rakia_media_channel_class_init (RakiaMediaChannelClass *klass)
{
static TpDBusPropertiesMixinPropImpl channel_props[] = {
{ "ChannelType", "channel-type", NULL },
@@ -300,14 +300,14 @@ tpsip_media_channel_class_init (TpsipMediaChannelClass *klass)
DEBUG("enter");
- g_type_class_add_private (klass, sizeof (TpsipMediaChannelPrivate));
+ g_type_class_add_private (klass, sizeof (RakiaMediaChannelPrivate));
- object_class->constructed = tpsip_media_channel_constructed;
- object_class->dispose = tpsip_media_channel_dispose;
- object_class->finalize = tpsip_media_channel_finalize;
+ object_class->constructed = rakia_media_channel_constructed;
+ object_class->dispose = rakia_media_channel_dispose;
+ object_class->finalize = rakia_media_channel_finalize;
- object_class->get_property = tpsip_media_channel_get_property;
- object_class->set_property = tpsip_media_channel_set_property;
+ object_class->get_property = rakia_media_channel_get_property;
+ object_class->set_property = rakia_media_channel_set_property;
g_object_class_override_property (object_class, PROP_HANDLE_TYPE,
"handle-type");
@@ -322,7 +322,7 @@ tpsip_media_channel_class_init (TpsipMediaChannelClass *klass)
g_object_class_override_property (object_class, PROP_CHANNEL_PROPERTIES,
"channel-properties");
- param_spec = g_param_spec_object ("connection", "TpsipConnection object",
+ param_spec = g_param_spec_object ("connection", "RakiaConnection object",
"SIP connection object that owns this SIP media channel object.",
TPSIP_TYPE_BASE_CONNECTION,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -405,33 +405,33 @@ tpsip_media_channel_class_init (TpsipMediaChannelClass *klass)
G_TYPE_NONE, 0);
tp_properties_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpsipMediaChannelClass, properties_class),
+ G_STRUCT_OFFSET (RakiaMediaChannelClass, properties_class),
media_channel_property_signatures, NUM_TP_PROPS, NULL);
klass->dbus_props_class.interfaces =
prop_interfaces;
tp_dbus_properties_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpsipMediaChannelClass, dbus_props_class));
+ G_STRUCT_OFFSET (RakiaMediaChannelClass, dbus_props_class));
tp_group_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpsipMediaChannelClass, group_class),
- _tpsip_media_channel_add_member,
+ G_STRUCT_OFFSET (RakiaMediaChannelClass, group_class),
+ _rakia_media_channel_add_member,
NULL);
tp_group_mixin_class_allow_self_removal (object_class);
tp_group_mixin_class_set_remove_with_reason_func(object_class,
- tpsip_media_channel_remove_with_reason);
+ rakia_media_channel_remove_with_reason);
tp_group_mixin_init_dbus_properties (object_class);
}
static void
-tpsip_media_channel_get_property (GObject *object,
+rakia_media_channel_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- TpsipMediaChannel *chan = TPSIP_MEDIA_CHANNEL (object);
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (chan);
+ RakiaMediaChannel *chan = TPSIP_MEDIA_CHANNEL (object);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (chan);
TpBaseConnection *base_conn = TP_BASE_CONNECTION (priv->conn);
switch (property_id) {
@@ -477,7 +477,7 @@ tpsip_media_channel_get_property (GObject *object,
g_value_set_boolean (value, (priv->initiator == base_conn->self_handle));
break;
case PROP_INTERFACES:
- g_value_set_static_boxed (value, tpsip_media_channel_interfaces);
+ g_value_set_static_boxed (value, rakia_media_channel_interfaces);
break;
case PROP_CHANNEL_DESTROYED:
g_value_set_boolean (value, priv->closed);
@@ -541,7 +541,7 @@ tpsip_media_channel_get_property (GObject *object,
}
static gboolean
-tpsip_media_channel_set_tp_property (TpsipMediaChannel *chan,
+rakia_media_channel_set_tp_property (RakiaMediaChannel *chan,
const GValue *value,
GParamSpec *pspec)
{
@@ -567,13 +567,13 @@ tpsip_media_channel_set_tp_property (TpsipMediaChannel *chan,
}
static void
-tpsip_media_channel_set_property (GObject *object,
+rakia_media_channel_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- TpsipMediaChannel *chan = TPSIP_MEDIA_CHANNEL (object);
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (chan);
+ RakiaMediaChannel *chan = TPSIP_MEDIA_CHANNEL (object);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (chan);
switch (property_id) {
case PROP_HANDLE_TYPE:
@@ -611,16 +611,16 @@ tpsip_media_channel_set_property (GObject *object,
case PROP_STUN_SERVER:
priv->stun_server = g_value_dup_string (value);
/* Also expose as a legacy Telepathy property */
- tpsip_media_channel_set_tp_property (chan, value, pspec);
+ rakia_media_channel_set_tp_property (chan, value, pspec);
break;
case PROP_STUN_PORT:
priv->stun_port = g_value_get_uint (value);
/* Also expose as a legacy Telepathy property */
- tpsip_media_channel_set_tp_property (chan, value, pspec);
+ rakia_media_channel_set_tp_property (chan, value, pspec);
break;
default:
/* some properties live in the mixin */
- if (tpsip_media_channel_set_tp_property (chan, value, pspec))
+ if (rakia_media_channel_set_tp_property (chan, value, pspec))
return;
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -629,10 +629,10 @@ tpsip_media_channel_set_property (GObject *object,
}
static void
-tpsip_media_channel_dispose (GObject *object)
+rakia_media_channel_dispose (GObject *object)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (object);
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (object);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
TpHandleRepoIface *contact_handles;
if (priv->dispose_has_run)
@@ -643,7 +643,7 @@ tpsip_media_channel_dispose (GObject *object)
priv->dispose_has_run = TRUE;
if (!priv->closed)
- tpsip_media_channel_close (self);
+ rakia_media_channel_close (self);
contact_handles = tp_base_connection_get_handles (
TP_BASE_CONNECTION (priv->conn), TP_HANDLE_TYPE_CONTACT);
@@ -653,17 +653,17 @@ tpsip_media_channel_dispose (GObject *object)
g_object_unref (priv->conn);
- if (G_OBJECT_CLASS (tpsip_media_channel_parent_class)->dispose)
- G_OBJECT_CLASS (tpsip_media_channel_parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (rakia_media_channel_parent_class)->dispose)
+ G_OBJECT_CLASS (rakia_media_channel_parent_class)->dispose (object);
DEBUG("exit");
}
static void
-tpsip_media_channel_finalize (GObject *object)
+rakia_media_channel_finalize (GObject *object)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (object);
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (object);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
g_hash_table_destroy (priv->call_states);
@@ -675,7 +675,7 @@ tpsip_media_channel_finalize (GObject *object)
tp_properties_mixin_finalize (object);
- G_OBJECT_CLASS (tpsip_media_channel_parent_class)->finalize (object);
+ G_OBJECT_CLASS (rakia_media_channel_parent_class)->finalize (object);
DEBUG("exit");
}
@@ -685,25 +685,25 @@ tpsip_media_channel_finalize (GObject *object)
***********************************************************************/
/**
- * tpsip_media_channel_close_async
+ * rakia_media_channel_close_async
*
* Implements DBus method Close
* on interface org.freedesktop.Telepathy.Channel
*/
static void
-tpsip_media_channel_dbus_close (TpSvcChannel *iface,
+rakia_media_channel_dbus_close (TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- tpsip_media_channel_close (self);
+ rakia_media_channel_close (self);
tp_svc_channel_return_from_close (context);
}
void
-tpsip_media_channel_close (TpsipMediaChannel *obj)
+rakia_media_channel_close (RakiaMediaChannel *obj)
{
- TpsipMediaChannelPrivate *priv;
+ RakiaMediaChannelPrivate *priv;
DEBUG("enter");
@@ -716,7 +716,7 @@ tpsip_media_channel_close (TpsipMediaChannel *obj)
priv->closed = TRUE;
if (priv->session) {
- tpsip_media_session_terminate (priv->session);
+ rakia_media_session_terminate (priv->session);
g_assert (priv->session == NULL);
}
@@ -726,13 +726,13 @@ tpsip_media_channel_close (TpsipMediaChannel *obj)
}
/**
- * tpsip_media_channel_get_channel_type
+ * rakia_media_channel_get_channel_type
*
* Implements DBus method GetChannelType
* on interface org.freedesktop.Telepathy.Channel
*/
static void
-tpsip_media_channel_get_channel_type (TpSvcChannel *obj,
+rakia_media_channel_get_channel_type (TpSvcChannel *obj,
DBusGMethodInvocation *context)
{
tp_svc_channel_return_from_get_channel_type (context,
@@ -741,17 +741,17 @@ tpsip_media_channel_get_channel_type (TpSvcChannel *obj,
/**
- * tpsip_media_channel_get_handle
+ * rakia_media_channel_get_handle
*
* Implements DBus method GetHandle
* on interface org.freedesktop.Telepathy.Channel
*/
static void
-tpsip_media_channel_get_handle (TpSvcChannel *iface,
+rakia_media_channel_get_handle (TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
if (priv->handle != 0)
tp_svc_channel_return_from_get_handle (context, TP_HANDLE_TYPE_CONTACT,
@@ -761,17 +761,17 @@ tpsip_media_channel_get_handle (TpSvcChannel *iface,
}
/**
- * tpsip_media_channel_get_interfaces
+ * rakia_media_channel_get_interfaces
*
* Implements DBus method GetInterfaces
* on interface org.freedesktop.Telepathy.Channel
*/
static void
-tpsip_media_channel_get_interfaces (TpSvcChannel *iface,
+rakia_media_channel_get_interfaces (TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
tp_svc_channel_return_from_get_interfaces (context,
- tpsip_media_channel_interfaces);
+ rakia_media_channel_interfaces);
}
/***********************************************************************
@@ -779,7 +779,7 @@ tpsip_media_channel_get_interfaces (TpSvcChannel *iface,
***********************************************************************/
/**
- * tpsip_media_channel_get_session_handlers
+ * rakia_media_channel_get_session_handlers
*
* Implements DBus method GetSessionHandlers
* on interface org.freedesktop.Telepathy.Channel.Interface.MediaSignalling
@@ -791,11 +791,11 @@ tpsip_media_channel_get_interfaces (TpSvcChannel *iface,
* Returns: TRUE if successful, FALSE if an error was thrown.
*/
static void
-tpsip_media_channel_get_session_handlers (TpSvcChannelInterfaceMediaSignalling *iface,
+rakia_media_channel_get_session_handlers (TpSvcChannelInterfaceMediaSignalling *iface,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- TpsipMediaChannelPrivate *priv;
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannelPrivate *priv;
GPtrArray *ret;
GValue handler = { 0 };
@@ -850,17 +850,17 @@ tpsip_media_channel_get_session_handlers (TpSvcChannelInterfaceMediaSignalling *
***********************************************************************/
/**
- * tpsip_media_channel_list_streams
+ * rakia_media_channel_list_streams
*
* Implements D-Bus method ListStreams
* on interface org.freedesktop.Telepathy.Channel.Type.StreamedMedia
*/
static void
-tpsip_media_channel_list_streams (TpSvcChannelTypeStreamedMedia *iface,
+rakia_media_channel_list_streams (TpSvcChannelTypeStreamedMedia *iface,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- TpsipMediaChannelPrivate *priv;
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannelPrivate *priv;
GPtrArray *ret = NULL;
priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
@@ -868,7 +868,7 @@ tpsip_media_channel_list_streams (TpSvcChannelTypeStreamedMedia *iface,
ret = g_ptr_array_new ();
if (priv->session != NULL)
- tpsip_media_session_list_streams (priv->session, ret);
+ rakia_media_session_list_streams (priv->session, ret);
tp_svc_channel_type_streamed_media_return_from_list_streams (context, ret);
@@ -876,18 +876,18 @@ tpsip_media_channel_list_streams (TpSvcChannelTypeStreamedMedia *iface,
}
/**
- * tpsip_media_channel_remove_streams
+ * rakia_media_channel_remove_streams
*
* Implements D-Bus method RemoveStreams
* on interface org.freedesktop.Telepathy.Channel.Type.StreamedMedia
*/
static void
-tpsip_media_channel_remove_streams (TpSvcChannelTypeStreamedMedia *iface,
+rakia_media_channel_remove_streams (TpSvcChannelTypeStreamedMedia *iface,
const GArray *streams,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- TpsipMediaChannelPrivate *priv;
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannelPrivate *priv;
GError *error = NULL;
priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
@@ -899,7 +899,7 @@ tpsip_media_channel_remove_streams (TpSvcChannelTypeStreamedMedia *iface,
}
else if (priv->session != NULL)
{
- tpsip_media_session_remove_streams(priv->session,
+ rakia_media_session_remove_streams(priv->session,
streams,
&error);
}
@@ -920,19 +920,19 @@ tpsip_media_channel_remove_streams (TpSvcChannelTypeStreamedMedia *iface,
}
/**
- * tpsip_media_channel_request_stream_direction
+ * rakia_media_channel_request_stream_direction
*
* Implements D-Bus method RequestStreamDirection
* on interface org.freedesktop.Telepathy.Channel.Type.StreamedMedia
*/
static void
-tpsip_media_channel_request_stream_direction (TpSvcChannelTypeStreamedMedia *iface,
+rakia_media_channel_request_stream_direction (TpSvcChannelTypeStreamedMedia *iface,
guint stream_id,
guint stream_direction,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- TpsipMediaChannelPrivate *priv;
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannelPrivate *priv;
GError *error = NULL;
priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
@@ -947,7 +947,7 @@ tpsip_media_channel_request_stream_direction (TpSvcChannelTypeStreamedMedia *ifa
if (priv->session != NULL)
{
- tpsip_media_session_request_stream_direction (priv->session,
+ rakia_media_session_request_stream_direction (priv->session,
stream_id,
stream_direction,
&error);
@@ -971,21 +971,21 @@ tpsip_media_channel_request_stream_direction (TpSvcChannelTypeStreamedMedia *ifa
/**
- * tpsip_media_channel_request_streams
+ * rakia_media_channel_request_streams
*
* Implements D-Bus method RequestStreams
* on interface org.freedesktop.Telepathy.Channel.Type.StreamedMedia
*/
static void
-tpsip_media_channel_request_streams (TpSvcChannelTypeStreamedMedia *iface,
+rakia_media_channel_request_streams (TpSvcChannelTypeStreamedMedia *iface,
guint contact_handle,
const GArray *types,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
GError *error = NULL;
GPtrArray *ret = NULL;
- TpsipMediaChannelPrivate *priv;
+ RakiaMediaChannelPrivate *priv;
TpHandleRepoIface *contact_repo;
DEBUG("enter");
@@ -1014,7 +1014,7 @@ tpsip_media_channel_request_streams (TpSvcChannelTypeStreamedMedia *iface,
ret = g_ptr_array_sized_new (types->len);
- if (tpsip_media_session_request_streams (priv->session, types, ret, &error))
+ if (rakia_media_session_request_streams (priv->session, types, ret, &error))
{
g_assert (types->len == ret->len);
tp_svc_channel_type_streamed_media_return_from_request_streams (context,
@@ -1036,9 +1036,9 @@ tpsip_media_channel_request_streams (TpSvcChannelTypeStreamedMedia *iface,
***********************************************************************/
void
-tpsip_media_channel_create_initial_streams (TpsipMediaChannel *self)
+rakia_media_channel_create_initial_streams (RakiaMediaChannel *self)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
g_assert (priv->initiator != priv->handle);
@@ -1052,13 +1052,13 @@ tpsip_media_channel_create_initial_streams (TpsipMediaChannel *self)
g_assert (priv->session != NULL);
if (priv->initial_audio)
- tpsip_media_session_add_stream (priv->session,
+ rakia_media_session_add_stream (priv->session,
TP_MEDIA_STREAM_TYPE_AUDIO,
TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL,
TRUE);
if (priv->initial_video)
- tpsip_media_session_add_stream (priv->session,
+ rakia_media_session_add_stream (priv->session,
TP_MEDIA_STREAM_TYPE_VIDEO,
TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL,
TRUE);
@@ -1070,11 +1070,11 @@ tpsip_media_channel_create_initial_streams (TpsipMediaChannel *self)
* session data are reported by the NUA stack.
*/
static void
-tpsip_media_channel_handle_incoming_call (TpsipMediaChannel *self,
+rakia_media_channel_handle_incoming_call (RakiaMediaChannel *self,
nua_handle_t *nh,
const sdp_session_t *sdp)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
TpBaseConnection *conn = TP_BASE_CONNECTION (priv->conn);
g_assert (priv->initiator != conn->self_handle);
@@ -1113,38 +1113,38 @@ tpsip_media_channel_handle_incoming_call (TpsipMediaChannel *self,
priv_create_session (self, nh, priv->initiator);
g_assert (priv->session != NULL);
- tpsip_media_session_receive_invite (priv->session);
+ rakia_media_session_receive_invite (priv->session);
}
static gboolean
-priv_nua_i_invite_cb (TpsipMediaChannel *self,
- const TpsipNuaEvent *ev,
+priv_nua_i_invite_cb (RakiaMediaChannel *self,
+ const RakiaNuaEvent *ev,
tagi_t tags[],
gpointer foo)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
/* nua_i_invite delivered for a bound handle means a re-INVITE */
g_return_val_if_fail (priv->session != NULL, FALSE);
- tpsip_media_session_receive_reinvite (priv->session);
+ rakia_media_session_receive_reinvite (priv->session);
return TRUE;
}
static guint
-tpsip_media_channel_get_call_state (TpsipMediaChannel *self,
+rakia_media_channel_get_call_state (RakiaMediaChannel *self,
TpHandle peer)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
return GPOINTER_TO_UINT (g_hash_table_lookup (priv->call_states,
GUINT_TO_POINTER (peer)));
}
static void
-tpsip_media_channel_peer_error (TpsipMediaChannel *self,
+rakia_media_channel_peer_error (RakiaMediaChannel *self,
TpHandle peer,
guint status,
const char* message)
@@ -1168,7 +1168,7 @@ tpsip_media_channel_peer_error (TpsipMediaChannel *self,
break;
case 404:
case 480:
- reason = (tpsip_media_channel_get_call_state (self, peer)
+ reason = (rakia_media_channel_get_call_state (self, peer)
& TPSIP_CHANNEL_CALL_STATE_PROCEEDING_MASK)
? TP_CHANNEL_GROUP_CHANGE_REASON_NO_ANSWER
: TP_CHANNEL_GROUP_CHANGE_REASON_OFFLINE;
@@ -1196,12 +1196,12 @@ tpsip_media_channel_peer_error (TpsipMediaChannel *self,
}
guint
-tpsip_media_channel_change_call_state (TpsipMediaChannel *self,
+rakia_media_channel_change_call_state (RakiaMediaChannel *self,
TpHandle peer,
guint flags_add,
guint flags_remove)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
gpointer key = GUINT_TO_POINTER (peer);
guint old_state;
guint new_state;
@@ -1229,19 +1229,19 @@ tpsip_media_channel_change_call_state (TpsipMediaChannel *self,
}
static gboolean
-priv_nua_i_bye_cb (TpsipMediaChannel *self,
- const TpsipNuaEvent *ev,
+priv_nua_i_bye_cb (RakiaMediaChannel *self,
+ const RakiaNuaEvent *ev,
tagi_t tags[],
gpointer foo)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
TpGroupMixin *mixin = TP_GROUP_MIXIN (self);
TpIntSet *remove;
TpHandle peer;
g_return_val_if_fail (priv->session != NULL, FALSE);
- peer = tpsip_media_session_get_peer (priv->session);
+ peer = rakia_media_session_get_peer (priv->session);
remove = tp_intset_new ();
tp_intset_add (remove, peer);
tp_intset_add (remove, mixin->self_handle);
@@ -1256,12 +1256,12 @@ priv_nua_i_bye_cb (TpsipMediaChannel *self,
}
static gboolean
-priv_nua_i_cancel_cb (TpsipMediaChannel *self,
- const TpsipNuaEvent *ev,
+priv_nua_i_cancel_cb (RakiaMediaChannel *self,
+ const RakiaNuaEvent *ev,
tagi_t tags[],
gpointer foo)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
TpGroupMixin *mixin = TP_GROUP_MIXIN (self);
TpIntSet *remove;
TpHandle actor = 0;
@@ -1291,7 +1291,7 @@ priv_nua_i_cancel_cb (TpsipMediaChannel *self,
}
}
- peer = tpsip_media_session_get_peer (priv->session);
+ peer = rakia_media_session_get_peer (priv->session);
switch (cause)
{
@@ -1321,12 +1321,12 @@ priv_nua_i_cancel_cb (TpsipMediaChannel *self,
}
static gboolean
-priv_nua_i_state_cb (TpsipMediaChannel *self,
- const TpsipNuaEvent *ev,
+priv_nua_i_state_cb (RakiaMediaChannel *self,
+ const RakiaNuaEvent *ev,
tagi_t tags[],
gpointer foo)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
const sdp_session_t *r_sdp = NULL;
int offer_recv = 0;
int answer_recv = 0;
@@ -1348,7 +1348,7 @@ priv_nua_i_state_cb (TpsipMediaChannel *self,
/* We get the session data for initial media properties with this event;
* initialize the session before we can create any streams below.
*/
- tpsip_media_channel_handle_incoming_call (self, ev->nua_handle, r_sdp);
+ rakia_media_channel_handle_incoming_call (self, ev->nua_handle, r_sdp);
}
g_return_val_if_fail (priv->session != NULL, FALSE);
@@ -1356,14 +1356,14 @@ priv_nua_i_state_cb (TpsipMediaChannel *self,
if (r_sdp)
{
g_return_val_if_fail (answer_recv || offer_recv, FALSE);
- if (!tpsip_media_session_set_remote_media (priv->session, r_sdp))
+ if (!rakia_media_session_set_remote_media (priv->session, r_sdp))
{
- tpsip_media_channel_close (self);
+ rakia_media_channel_close (self);
return TRUE;
}
}
- peer = tpsip_media_session_get_peer (priv->session);
+ peer = rakia_media_session_get_peer (priv->session);
switch ((enum nua_callstate)ss_state)
{
@@ -1371,15 +1371,15 @@ priv_nua_i_state_cb (TpsipMediaChannel *self,
switch (status)
{
case 180:
- tpsip_media_channel_change_call_state (self, peer,
+ rakia_media_channel_change_call_state (self, peer,
TP_CHANNEL_CALL_STATE_RINGING, 0);
break;
case 182:
- tpsip_media_channel_change_call_state (self, peer,
+ rakia_media_channel_change_call_state (self, peer,
TP_CHANNEL_CALL_STATE_QUEUED, 0);
break;
case 183:
- tpsip_media_channel_change_call_state (self, peer,
+ rakia_media_channel_change_call_state (self, peer,
TP_CHANNEL_CALL_STATE_IN_PROGRESS, 0);
break;
}
@@ -1392,7 +1392,7 @@ priv_nua_i_state_cb (TpsipMediaChannel *self,
case nua_callstate_ready:
/* Clear any pre-establishment call states */
- tpsip_media_channel_change_call_state (self, peer, 0,
+ rakia_media_channel_change_call_state (self, peer, 0,
TPSIP_CHANNEL_CALL_STATE_PROCEEDING_MASK);
if (status < 300)
@@ -1410,32 +1410,32 @@ priv_nua_i_state_cb (TpsipMediaChannel *self,
tp_intset_destroy (add);
- tpsip_media_session_accept (priv->session);
+ rakia_media_session_accept (priv->session);
}
else if (status == 491)
- tpsip_media_session_resolve_glare (priv->session);
+ rakia_media_session_resolve_glare (priv->session);
else
{
/* Was something wrong with our re-INVITE? We can't cope anyway. */
MESSAGE ("can't handle non-fatal response %d %s", status, ev->text);
- tpsip_media_session_terminate (priv->session);
+ rakia_media_session_terminate (priv->session);
}
break;
case nua_callstate_terminated:
/* In cases of self-inflicted termination,
* we should have already gone through the moves */
- if (tpsip_media_session_get_state (priv->session)
+ if (rakia_media_session_get_state (priv->session)
== TPSIP_MEDIA_SESSION_STATE_ENDED)
break;
if (status >= 300)
{
- tpsip_media_channel_peer_error (
+ rakia_media_channel_peer_error (
self, peer, status, ev->text);
}
- tpsip_media_session_change_state (priv->session,
+ rakia_media_session_change_state (priv->session,
TPSIP_MEDIA_SESSION_STATE_ENDED);
break;
@@ -1446,12 +1446,12 @@ priv_nua_i_state_cb (TpsipMediaChannel *self,
return TRUE;
}
-static void priv_session_state_changed_cb (TpsipMediaSession *session,
+static void priv_session_state_changed_cb (RakiaMediaSession *session,
guint old_state,
guint state,
- TpsipMediaChannel *channel)
+ RakiaMediaChannel *channel)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (channel);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (channel);
TpGroupMixin *mixin = TP_GROUP_MIXIN (channel);
TpHandle self_handle;
TpHandle peer;
@@ -1460,7 +1460,7 @@ static void priv_session_state_changed_cb (TpsipMediaSession *session,
DEBUG("enter");
self_handle = mixin->self_handle;
- peer = tpsip_media_session_get_peer (session);
+ peer = rakia_media_session_get_peer (session);
switch (state)
{
@@ -1560,9 +1560,9 @@ static void priv_session_state_changed_cb (TpsipMediaSession *session,
0, 0);
/* Close the channel; destroy the session first to avoid
- * the tpsip_media_session_terminate() path in this case */
+ * the rakia_media_session_terminate() path in this case */
priv_destroy_session (channel);
- tpsip_media_channel_close (channel);
+ rakia_media_channel_close (channel);
break;
}
@@ -1571,16 +1571,16 @@ static void priv_session_state_changed_cb (TpsipMediaSession *session,
}
void
-tpsip_media_channel_attach_to_nua_handle (TpsipMediaChannel *self,
+rakia_media_channel_attach_to_nua_handle (RakiaMediaChannel *self,
nua_handle_t *nh)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
- tpsip_event_target_attach (nh, (GObject *) self);
+ rakia_event_target_attach (nh, (GObject *) self);
/* have the connection handle authentication, before all other
* response callbacks */
- tpsip_base_connection_add_auth_handler (priv->conn, TPSIP_EVENT_TARGET (self));
+ rakia_base_connection_add_auth_handler (priv->conn, TPSIP_EVENT_TARGET (self));
g_signal_connect (self,
"nua-event::nua_i_invite",
@@ -1604,15 +1604,15 @@ tpsip_media_channel_attach_to_nua_handle (TpsipMediaChannel *self,
/**
* priv_create_session:
*
- * Creates a TpsipMediaSession object for given peer.
+ * Creates a RakiaMediaSession object for given peer.
**/
static void
-priv_create_session (TpsipMediaChannel *channel,
+priv_create_session (RakiaMediaChannel *channel,
nua_handle_t *nh,
TpHandle peer)
{
- TpsipMediaChannelPrivate *priv;
- TpsipMediaSession *session;
+ RakiaMediaChannelPrivate *priv;
+ RakiaMediaSession *session;
TpBaseConnection *conn;
TpHandleRepoIface *contact_repo;
gchar *object_path;
@@ -1667,10 +1667,10 @@ priv_create_session (TpsipMediaChannel *channel,
}
static void
-priv_destroy_session(TpsipMediaChannel *channel)
+priv_destroy_session(RakiaMediaChannel *channel)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (channel);
- TpsipMediaSession *session;
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (channel);
+ RakiaMediaSession *session;
TpBaseConnection *conn;
TpHandleRepoIface *contact_repo;
@@ -1684,7 +1684,7 @@ priv_destroy_session(TpsipMediaChannel *channel)
conn = (TpBaseConnection *)(priv->conn);
contact_repo = tp_base_connection_get_handles (conn,
TP_HANDLE_TYPE_CONTACT);
- tp_handle_unref (contact_repo, tpsip_media_session_get_peer (session));
+ tp_handle_unref (contact_repo, rakia_media_session_get_peer (session));
priv->session = NULL;
g_object_unref (session);
@@ -1696,21 +1696,21 @@ priv_destroy_session(TpsipMediaChannel *channel)
* Creates an outbound call session if a session does not exist
*/
static void
-priv_outbound_call (TpsipMediaChannel *channel,
+priv_outbound_call (RakiaMediaChannel *channel,
TpHandle peer)
{
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (channel);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (channel);
nua_handle_t *nh;
if (priv->session == NULL)
{
DEBUG("making outbound call - setting peer handle to %u", peer);
- nh = tpsip_base_connection_create_handle (priv->conn, peer);
+ nh = rakia_base_connection_create_handle (priv->conn, peer);
priv_create_session (channel, nh, peer);
/* Bind the channel object to the handle to handle NUA events */
- tpsip_media_channel_attach_to_nua_handle (channel, nh);
+ rakia_media_channel_attach_to_nua_handle (channel, nh);
nua_handle_unref (nh);
}
@@ -1721,13 +1721,13 @@ priv_outbound_call (TpsipMediaChannel *channel,
}
gboolean
-_tpsip_media_channel_add_member (GObject *iface,
+_rakia_media_channel_add_member (GObject *iface,
TpHandle handle,
const gchar *message,
GError **error)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
TpGroupMixin *mixin = TP_GROUP_MIXIN (iface);
DEBUG("mixin->self_handle=%d, handle=%d", mixin->self_handle, handle);
@@ -1770,7 +1770,7 @@ _tpsip_media_channel_add_member (GObject *iface,
DEBUG("accepting an incoming invite");
g_return_val_if_fail (priv->session != NULL, FALSE);
- tpsip_media_session_accept (priv->session);
+ rakia_media_session_accept (priv->session);
return TRUE;
}
@@ -1783,7 +1783,7 @@ _tpsip_media_channel_add_member (GObject *iface,
}
static gint
-tpsip_status_from_tp_reason (TpChannelGroupChangeReason reason)
+rakia_status_from_tp_reason (TpChannelGroupChangeReason reason)
{
switch (reason)
{
@@ -1805,14 +1805,14 @@ tpsip_status_from_tp_reason (TpChannelGroupChangeReason reason)
}
static gboolean
-tpsip_media_channel_remove_with_reason (GObject *obj,
+rakia_media_channel_remove_with_reason (GObject *obj,
TpHandle handle,
const gchar *message,
guint reason,
GError **error)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (obj);
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (obj);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
TpGroupMixin *mixin = TP_GROUP_MIXIN (obj);
TpIntSet *set = NULL;
TpHandle self_handle;
@@ -1844,7 +1844,7 @@ tpsip_media_channel_remove_with_reason (GObject *obj,
* Now we always want to remove both members on behalf of the local user */
set = tp_intset_new ();
tp_intset_add (set, self_handle);
- tp_intset_add (set, tpsip_media_session_get_peer (priv->session));
+ tp_intset_add (set, rakia_media_session_get_peer (priv->session));
tp_group_mixin_change_members (obj, "",
NULL, /* add */
set, /* remove */
@@ -1859,32 +1859,32 @@ tpsip_media_channel_remove_with_reason (GObject *obj,
gint status;
- status = tpsip_status_from_tp_reason (reason);
+ status = rakia_status_from_tp_reason (reason);
/* XXX: raise NotAvailable if it's the wrong state? */
- tpsip_media_session_respond (priv->session, status, message);
+ rakia_media_session_respond (priv->session, status, message);
/* This session is effectively ended, prevent the nua_i_state handler
* from useless work */
- tpsip_media_session_change_state (priv->session,
+ rakia_media_session_change_state (priv->session,
TPSIP_MEDIA_SESSION_STATE_ENDED);
}
else
{
/* Want to terminate the call in whatever other situation;
* rescinding is handled by sending CANCEL */
- tpsip_media_session_terminate (priv->session);
+ rakia_media_session_terminate (priv->session);
}
return TRUE;
}
static void
-tpsip_media_channel_get_call_states (TpSvcChannelInterfaceCallState *iface,
+rakia_media_channel_get_call_states (TpSvcChannelInterfaceCallState *iface,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
tp_svc_channel_interface_call_state_return_from_get_call_states (
context,
@@ -1892,11 +1892,11 @@ tpsip_media_channel_get_call_states (TpSvcChannelInterfaceCallState *iface,
}
static void
-tpsip_media_channel_get_hold_state (TpSvcChannelInterfaceHold *iface,
+rakia_media_channel_get_hold_state (TpSvcChannelInterfaceHold *iface,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- TpsipMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannelPrivate *priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
TpLocalHoldState hold_state = TP_LOCAL_HOLD_STATE_UNHELD;
TpLocalHoldStateReason hold_reason = TP_LOCAL_HOLD_STATE_REASON_NONE;
@@ -1918,12 +1918,12 @@ tpsip_media_channel_get_hold_state (TpSvcChannelInterfaceHold *iface,
}
static void
-tpsip_media_channel_request_hold (TpSvcChannelInterfaceHold *iface,
+rakia_media_channel_request_hold (TpSvcChannelInterfaceHold *iface,
gboolean hold,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- TpsipMediaChannelPrivate *priv;
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannelPrivate *priv;
priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
@@ -1936,7 +1936,7 @@ tpsip_media_channel_request_hold (TpSvcChannelInterfaceHold *iface,
}
else if (priv->session != NULL)
{
- tpsip_media_session_request_hold (priv->session, hold);
+ rakia_media_session_request_hold (priv->session, hold);
}
else
{
@@ -1950,13 +1950,13 @@ tpsip_media_channel_request_hold (TpSvcChannelInterfaceHold *iface,
}
static void
-tpsip_media_channel_start_tone (TpSvcChannelInterfaceDTMF *iface,
+rakia_media_channel_start_tone (TpSvcChannelInterfaceDTMF *iface,
guint stream_id,
guchar event,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- TpsipMediaChannelPrivate *priv;
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannelPrivate *priv;
GError *error = NULL;
DEBUG("enter");
@@ -1974,7 +1974,7 @@ tpsip_media_channel_start_tone (TpSvcChannelInterfaceDTMF *iface,
priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
- if (!tpsip_media_session_start_telephony_event (priv->session,
+ if (!rakia_media_session_start_telephony_event (priv->session,
stream_id,
event,
&error))
@@ -1988,12 +1988,12 @@ tpsip_media_channel_start_tone (TpSvcChannelInterfaceDTMF *iface,
}
static void
-tpsip_media_channel_stop_tone (TpSvcChannelInterfaceDTMF *iface,
+rakia_media_channel_stop_tone (TpSvcChannelInterfaceDTMF *iface,
guint stream_id,
DBusGMethodInvocation *context)
{
- TpsipMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
- TpsipMediaChannelPrivate *priv;
+ RakiaMediaChannel *self = TPSIP_MEDIA_CHANNEL (iface);
+ RakiaMediaChannelPrivate *priv;
GError *error = NULL;
DEBUG("enter");
@@ -2002,7 +2002,7 @@ tpsip_media_channel_stop_tone (TpSvcChannelInterfaceDTMF *iface,
priv = TPSIP_MEDIA_CHANNEL_GET_PRIVATE (self);
- if (!tpsip_media_session_stop_telephony_event (priv->session,
+ if (!rakia_media_session_stop_telephony_event (priv->session,
stream_id,
&error))
{
@@ -2025,9 +2025,9 @@ channel_iface_init(gpointer g_iface, gpointer iface_data)
TpSvcChannelClass *klass = (TpSvcChannelClass *)g_iface;
tp_svc_channel_implement_close (
- klass, tpsip_media_channel_dbus_close);
+ klass, rakia_media_channel_dbus_close);
#define IMPLEMENT(x) tp_svc_channel_implement_##x (\
- klass, tpsip_media_channel_##x)
+ klass, rakia_media_channel_##x)
IMPLEMENT(get_channel_type);
IMPLEMENT(get_handle);
IMPLEMENT(get_interfaces);
@@ -2040,7 +2040,7 @@ streamed_media_iface_init(gpointer g_iface, gpointer iface_data)
TpSvcChannelTypeStreamedMediaClass *klass = (TpSvcChannelTypeStreamedMediaClass *)g_iface;
#define IMPLEMENT(x) tp_svc_channel_type_streamed_media_implement_##x (\
- klass, tpsip_media_channel_##x)
+ klass, rakia_media_channel_##x)
IMPLEMENT(list_streams);
IMPLEMENT(remove_streams);
IMPLEMENT(request_stream_direction);
@@ -2054,7 +2054,7 @@ media_signalling_iface_init(gpointer g_iface, gpointer iface_data)
TpSvcChannelInterfaceMediaSignallingClass *klass = (TpSvcChannelInterfaceMediaSignallingClass *)g_iface;
#define IMPLEMENT(x) tp_svc_channel_interface_media_signalling_implement_##x (\
- klass, tpsip_media_channel_##x)
+ klass, rakia_media_channel_##x)
IMPLEMENT(get_session_handlers);
#undef IMPLEMENT
}
@@ -2065,7 +2065,7 @@ dtmf_iface_init (gpointer g_iface, gpointer iface_data)
TpSvcChannelInterfaceDTMFClass *klass = (TpSvcChannelInterfaceDTMFClass *)g_iface;
#define IMPLEMENT(x) tp_svc_channel_interface_dtmf_implement_##x (\
- klass, tpsip_media_channel_##x)
+ klass, rakia_media_channel_##x)
IMPLEMENT(start_tone);
IMPLEMENT(stop_tone);
#undef IMPLEMENT
@@ -2077,7 +2077,7 @@ call_state_iface_init (gpointer g_iface,
{
TpSvcChannelInterfaceCallStateClass *klass = g_iface;
#define IMPLEMENT(x) tp_svc_channel_interface_call_state_implement_##x (\
- klass, tpsip_media_channel_##x)
+ klass, rakia_media_channel_##x)
IMPLEMENT (get_call_states);
#undef IMPLEMENT
}
@@ -2089,7 +2089,7 @@ hold_iface_init (gpointer g_iface,
TpSvcChannelInterfaceHoldClass *klass = g_iface;
#define IMPLEMENT(x) tp_svc_channel_interface_hold_implement_##x (\
- klass, tpsip_media_channel_##x)
+ klass, rakia_media_channel_##x)
IMPLEMENT (get_hold_state);
IMPLEMENT (request_hold);
#undef IMPLEMENT
diff --git a/tpsip/media-channel.h b/rakia/media-channel.h
index 9cb28b7..6b8b07d 100644
--- a/tpsip/media-channel.h
+++ b/rakia/media-channel.h
@@ -1,5 +1,5 @@
/*
- * sip-media-channel.h - Header for TpsipMediaChannel
+ * sip-media-channel.h - Header for RakiaMediaChannel
* Copyright (C) 2005 Collabora Ltd.
* Copyright (C) 2005-2009 Nokia Corporation
*
@@ -28,61 +28,61 @@
#include <telepathy-glib/handle.h>
#include <telepathy-glib/properties-mixin.h>
-#include <tpsip/sofia-decls.h>
+#include <rakia/sofia-decls.h>
G_BEGIN_DECLS
-typedef struct _TpsipMediaChannel TpsipMediaChannel;
-typedef struct _TpsipMediaChannelClass TpsipMediaChannelClass;
+typedef struct _RakiaMediaChannel RakiaMediaChannel;
+typedef struct _RakiaMediaChannelClass RakiaMediaChannelClass;
-struct _TpsipMediaChannelClass {
+struct _RakiaMediaChannelClass {
GObjectClass parent_class;
TpGroupMixinClass group_class;
TpPropertiesMixinClass properties_class;
TpDBusPropertiesMixinClass dbus_props_class;
};
-struct _TpsipMediaChannel {
+struct _RakiaMediaChannel {
GObject parent;
TpGroupMixin group;
TpPropertiesMixin properties;
};
-GType tpsip_media_channel_get_type(void);
+GType rakia_media_channel_get_type(void);
/* TYPE MACROS */
#define TPSIP_TYPE_MEDIA_CHANNEL \
- (tpsip_media_channel_get_type())
+ (rakia_media_channel_get_type())
#define TPSIP_MEDIA_CHANNEL(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_MEDIA_CHANNEL, TpsipMediaChannel))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_MEDIA_CHANNEL, RakiaMediaChannel))
#define TPSIP_MEDIA_CHANNEL_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_MEDIA_CHANNEL, TpsipMediaChannelClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_MEDIA_CHANNEL, RakiaMediaChannelClass))
#define TPSIP_IS_MEDIA_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TPSIP_TYPE_MEDIA_CHANNEL))
#define TPSIP_IS_MEDIA_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), TPSIP_TYPE_MEDIA_CHANNEL))
#define TPSIP_MEDIA_CHANNEL_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_MEDIA_CHANNEL, TpsipMediaChannelClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_MEDIA_CHANNEL, RakiaMediaChannelClass))
/***********************************************************************
* Additional declarations (not based on generated templates)
***********************************************************************/
-void tpsip_media_channel_close (TpsipMediaChannel *self);
+void rakia_media_channel_close (RakiaMediaChannel *self);
-gboolean _tpsip_media_channel_add_member (GObject *iface,
+gboolean _rakia_media_channel_add_member (GObject *iface,
TpHandle handle,
const gchar *message,
GError **error);
-void tpsip_media_channel_create_initial_streams (TpsipMediaChannel *self);
+void rakia_media_channel_create_initial_streams (RakiaMediaChannel *self);
-void tpsip_media_channel_attach_to_nua_handle (TpsipMediaChannel *self,
+void rakia_media_channel_attach_to_nua_handle (RakiaMediaChannel *self,
nua_handle_t *nh);
guint
-tpsip_media_channel_change_call_state (TpsipMediaChannel *self,
+rakia_media_channel_change_call_state (RakiaMediaChannel *self,
TpHandle peer,
guint flags_add,
guint flags_remove);
diff --git a/tpsip/media-manager.c b/rakia/media-manager.c
index 7858954..57dd807 100644
--- a/tpsip/media-manager.c
+++ b/rakia/media-manager.c
@@ -20,7 +20,7 @@
#include "config.h"
-#include "tpsip/media-manager.h"
+#include "rakia/media-manager.h"
#include <string.h>
@@ -28,25 +28,25 @@
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/interfaces.h>
-#include "tpsip/media-channel.h"
-#include "tpsip/base-connection.h"
-#include "tpsip/handles.h"
+#include "rakia/media-channel.h"
+#include "rakia/base-connection.h"
+#include "rakia/handles.h"
#include <sofia-sip/sip_status.h>
#define DEBUG_FLAG TPSIP_DEBUG_CONNECTION
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
typedef enum {
TPSIP_MEDIA_CHANNEL_CREATE_WITH_AUDIO = 1 << 0,
TPSIP_MEDIA_CHANNEL_CREATE_WITH_VIDEO = 1 << 1,
-} TpsipMediaChannelCreationFlags;
+} RakiaMediaChannelCreationFlags;
static void channel_manager_iface_init (gpointer, gpointer);
-static void tpsip_media_manager_constructed (GObject *object);
-static void tpsip_media_manager_close_all (TpsipMediaManager *fac);
+static void rakia_media_manager_constructed (GObject *object);
+static void rakia_media_manager_close_all (RakiaMediaManager *fac);
-G_DEFINE_TYPE_WITH_CODE (TpsipMediaManager, tpsip_media_manager,
+G_DEFINE_TYPE_WITH_CODE (RakiaMediaManager, rakia_media_manager,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_MANAGER,
channel_manager_iface_init))
@@ -59,12 +59,12 @@ enum
LAST_PROPERTY
};
-typedef struct _TpsipMediaManagerPrivate TpsipMediaManagerPrivate;
-struct _TpsipMediaManagerPrivate
+typedef struct _RakiaMediaManagerPrivate RakiaMediaManagerPrivate;
+struct _RakiaMediaManagerPrivate
{
/* unreferenced (since it owns this manager) */
TpBaseConnection *conn;
- /* array of referenced (TpsipMediaChannel *) */
+ /* array of referenced (RakiaMediaChannel *) */
GPtrArray *channels;
/* for unique channel object paths, currently always increments */
guint channel_index;
@@ -78,12 +78,12 @@ struct _TpsipMediaManagerPrivate
gboolean dispose_has_run;
};
-#define TPSIP_MEDIA_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_MEDIA_MANAGER, TpsipMediaManagerPrivate))
+#define TPSIP_MEDIA_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_MEDIA_MANAGER, RakiaMediaManagerPrivate))
static void
-tpsip_media_manager_init (TpsipMediaManager *fac)
+rakia_media_manager_init (RakiaMediaManager *fac)
{
- TpsipMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
+ RakiaMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
priv->conn = NULL;
priv->channels = g_ptr_array_sized_new (1);
@@ -92,40 +92,40 @@ tpsip_media_manager_init (TpsipMediaManager *fac)
}
static void
-tpsip_media_manager_dispose (GObject *object)
+rakia_media_manager_dispose (GObject *object)
{
- TpsipMediaManager *fac = TPSIP_MEDIA_MANAGER (object);
- TpsipMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
+ RakiaMediaManager *fac = TPSIP_MEDIA_MANAGER (object);
+ RakiaMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
if (priv->dispose_has_run)
return;
priv->dispose_has_run = TRUE;
- tpsip_media_manager_close_all (fac);
+ rakia_media_manager_close_all (fac);
g_assert (priv->channels == NULL);
- if (G_OBJECT_CLASS (tpsip_media_manager_parent_class)->dispose)
- G_OBJECT_CLASS (tpsip_media_manager_parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (rakia_media_manager_parent_class)->dispose)
+ G_OBJECT_CLASS (rakia_media_manager_parent_class)->dispose (object);
}
static void
-tpsip_media_manager_finalize (GObject *object)
+rakia_media_manager_finalize (GObject *object)
{
- TpsipMediaManager *fac = TPSIP_MEDIA_MANAGER (object);
- TpsipMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
+ RakiaMediaManager *fac = TPSIP_MEDIA_MANAGER (object);
+ RakiaMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
g_free (priv->stun_server);
}
static void
-tpsip_media_manager_get_property (GObject *object,
+rakia_media_manager_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- TpsipMediaManager *fac = TPSIP_MEDIA_MANAGER (object);
- TpsipMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
+ RakiaMediaManager *fac = TPSIP_MEDIA_MANAGER (object);
+ RakiaMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
switch (property_id) {
case PROP_CONNECTION:
@@ -144,13 +144,13 @@ tpsip_media_manager_get_property (GObject *object,
}
static void
-tpsip_media_manager_set_property (GObject *object,
+rakia_media_manager_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- TpsipMediaManager *fac = TPSIP_MEDIA_MANAGER (object);
- TpsipMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
+ RakiaMediaManager *fac = TPSIP_MEDIA_MANAGER (object);
+ RakiaMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
switch (property_id) {
case PROP_CONNECTION:
@@ -170,21 +170,21 @@ tpsip_media_manager_set_property (GObject *object,
}
static void
-tpsip_media_manager_class_init (TpsipMediaManagerClass *klass)
+rakia_media_manager_class_init (RakiaMediaManagerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GParamSpec *param_spec;
- g_type_class_add_private (klass, sizeof (TpsipMediaManagerPrivate));
+ g_type_class_add_private (klass, sizeof (RakiaMediaManagerPrivate));
- object_class->constructed = tpsip_media_manager_constructed;
- object_class->get_property = tpsip_media_manager_get_property;
- object_class->set_property = tpsip_media_manager_set_property;
- object_class->dispose = tpsip_media_manager_dispose;
- object_class->finalize = tpsip_media_manager_finalize;
+ object_class->constructed = rakia_media_manager_constructed;
+ object_class->get_property = rakia_media_manager_get_property;
+ object_class->set_property = rakia_media_manager_set_property;
+ object_class->dispose = rakia_media_manager_dispose;
+ object_class->finalize = rakia_media_manager_finalize;
param_spec = g_param_spec_object ("connection",
- "TpsipBaseConnection object",
+ "RakiaBaseConnection object",
"SIP connection that owns this media channel manager",
TPSIP_TYPE_BASE_CONNECTION,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -205,9 +205,9 @@ tpsip_media_manager_class_init (TpsipMediaManagerClass *klass)
}
static void
-tpsip_media_manager_close_all (TpsipMediaManager *fac)
+rakia_media_manager_close_all (RakiaMediaManager *fac)
{
- TpsipMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
+ RakiaMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
if (priv->status_changed_id != 0)
{
@@ -226,7 +226,7 @@ tpsip_media_manager_close_all (TpsipMediaManager *fac)
for (i = 0; i < channels->len; i++)
{
- TpsipMediaChannel *chan = g_ptr_array_index (channels, i);
+ RakiaMediaChannel *chan = g_ptr_array_index (channels, i);
g_object_unref (chan);
}
@@ -237,13 +237,13 @@ tpsip_media_manager_close_all (TpsipMediaManager *fac)
/**
* media_channel_closed_cb:
* Signal callback for when a media channel is closed. Removes the references
- * that #TpsipMediaManager holds to them.
+ * that #RakiaMediaManager holds to them.
*/
static void
-media_channel_closed_cb (TpsipMediaChannel *chan, gpointer user_data)
+media_channel_closed_cb (RakiaMediaChannel *chan, gpointer user_data)
{
- TpsipMediaManager *fac = TPSIP_MEDIA_MANAGER (user_data);
- TpsipMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
+ RakiaMediaManager *fac = TPSIP_MEDIA_MANAGER (user_data);
+ RakiaMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
tp_channel_manager_emit_channel_closed_for_object (fac,
TP_EXPORTABLE_CHANNEL (chan));
@@ -258,16 +258,16 @@ media_channel_closed_cb (TpsipMediaChannel *chan, gpointer user_data)
/**
* new_media_channel
*
- * Creates a new empty TpsipMediaChannel.
+ * Creates a new empty RakiaMediaChannel.
*/
-static TpsipMediaChannel *
-new_media_channel (TpsipMediaManager *fac,
+static RakiaMediaChannel *
+new_media_channel (RakiaMediaManager *fac,
TpHandle initiator,
TpHandle maybe_peer,
- TpsipMediaChannelCreationFlags flags)
+ RakiaMediaChannelCreationFlags flags)
{
- TpsipMediaManagerPrivate *priv;
- TpsipMediaChannel *chan = NULL;
+ RakiaMediaManagerPrivate *priv;
+ RakiaMediaChannel *chan = NULL;
gchar *object_path;
const gchar *nat_traversal = "none";
gboolean initial_audio;
@@ -323,8 +323,8 @@ new_media_channel (TpsipMediaManager *fac,
}
static void
-incoming_call_cb (TpsipMediaChannel *channel,
- TpsipMediaManager *fac)
+incoming_call_cb (RakiaMediaChannel *channel,
+ RakiaMediaManager *fac)
{
g_signal_handlers_disconnect_by_func (channel,
G_CALLBACK (incoming_call_cb), fac);
@@ -333,18 +333,18 @@ incoming_call_cb (TpsipMediaChannel *channel,
}
static gboolean
-tpsip_nua_i_invite_cb (TpBaseConnection *conn,
- const TpsipNuaEvent *ev,
+rakia_nua_i_invite_cb (TpBaseConnection *conn,
+ const RakiaNuaEvent *ev,
tagi_t tags[],
- TpsipMediaManager *fac)
+ RakiaMediaManager *fac)
{
- TpsipMediaChannel *channel;
+ RakiaMediaChannel *channel;
TpHandle handle;
guint channel_flags = 0;
/* figure out a handle for the identity */
- handle = tpsip_handle_by_requestor (conn, ev->sip);
+ handle = rakia_handle_by_requestor (conn, ev->sip);
if (!handle)
{
MESSAGE ("incoming INVITE with invalid sender information");
@@ -353,7 +353,7 @@ tpsip_nua_i_invite_cb (TpBaseConnection *conn,
}
DEBUG("Got incoming invite from <%s>",
- tpsip_handle_inspect (conn, handle));
+ rakia_handle_inspect (conn, handle));
if (handle == conn->self_handle)
{
@@ -364,25 +364,25 @@ tpsip_nua_i_invite_cb (TpBaseConnection *conn,
channel = new_media_channel (fac, handle, handle, channel_flags);
- tpsip_handle_unref (conn, handle);
+ rakia_handle_unref (conn, handle);
/* We delay emission of NewChannel(s) until we have the data on
* initial media */
g_signal_connect (channel, "incoming-call",
G_CALLBACK (incoming_call_cb), fac);
- tpsip_media_channel_attach_to_nua_handle (channel, ev->nua_handle);
+ rakia_media_channel_attach_to_nua_handle (channel, ev->nua_handle);
return TRUE;
}
static void
-connection_status_changed_cb (TpsipBaseConnection *conn,
+connection_status_changed_cb (RakiaBaseConnection *conn,
guint status,
guint reason,
- TpsipMediaManager *self)
+ RakiaMediaManager *self)
{
- TpsipMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (self);
+ RakiaMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (self);
switch (status)
{
@@ -390,12 +390,12 @@ connection_status_changed_cb (TpsipBaseConnection *conn,
priv->invite_received_id = g_signal_connect (conn,
"nua-event::nua_i_invite",
- G_CALLBACK (tpsip_nua_i_invite_cb), self);
+ G_CALLBACK (rakia_nua_i_invite_cb), self);
break;
case TP_CONNECTION_STATUS_DISCONNECTED:
- tpsip_media_manager_close_all (self);
+ rakia_media_manager_close_all (self);
if (priv->invite_received_id != 0)
{
@@ -410,12 +410,12 @@ connection_status_changed_cb (TpsipBaseConnection *conn,
}
static void
-tpsip_media_manager_constructed (GObject *object)
+rakia_media_manager_constructed (GObject *object)
{
- TpsipMediaManager *self = TPSIP_MEDIA_MANAGER (object);
- TpsipMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (self);
+ RakiaMediaManager *self = TPSIP_MEDIA_MANAGER (object);
+ RakiaMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (self);
GObjectClass *parent_object_class =
- G_OBJECT_CLASS (tpsip_media_manager_parent_class);
+ G_OBJECT_CLASS (rakia_media_manager_parent_class);
if (parent_object_class->constructed != NULL)
parent_object_class->constructed (object);
@@ -425,12 +425,12 @@ tpsip_media_manager_constructed (GObject *object)
}
static void
-tpsip_media_manager_foreach_channel (TpChannelManager *manager,
+rakia_media_manager_foreach_channel (TpChannelManager *manager,
TpExportableChannelFunc foreach,
gpointer user_data)
{
- TpsipMediaManager *fac = TPSIP_MEDIA_MANAGER (manager);
- TpsipMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
+ RakiaMediaManager *fac = TPSIP_MEDIA_MANAGER (manager);
+ RakiaMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (fac);
guint i;
for (i = 0; i < priv->channels->len; i++)
@@ -463,7 +463,7 @@ static const gchar * const anon_channel_allowed_properties[] = {
};
static void
-tpsip_media_manager_type_foreach_channel_class (GType type,
+rakia_media_manager_type_foreach_channel_class (GType type,
TpChannelManagerTypeChannelClassFunc func,
gpointer user_data)
{
@@ -494,17 +494,17 @@ typedef enum
} RequestMethod;
static gboolean
-tpsip_media_manager_requestotron (TpChannelManager *manager,
+rakia_media_manager_requestotron (TpChannelManager *manager,
gpointer request_token,
GHashTable *request_properties,
RequestMethod method)
{
- TpsipMediaManager *self = TPSIP_MEDIA_MANAGER (manager);
- TpsipMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (self);
+ RakiaMediaManager *self = TPSIP_MEDIA_MANAGER (manager);
+ RakiaMediaManagerPrivate *priv = TPSIP_MEDIA_MANAGER_GET_PRIVATE (self);
TpBaseConnection *conn = (TpBaseConnection *) priv->conn;
TpHandleType handle_type;
TpHandle handle;
- TpsipMediaChannel *channel = NULL;
+ RakiaMediaChannel *channel = NULL;
GError *error = NULL;
GSList *request_tokens;
guint chan_flags = 0;
@@ -625,12 +625,12 @@ tpsip_media_manager_requestotron (TpChannelManager *manager,
if (add_peer_to_remote_pending)
{
- if (!_tpsip_media_channel_add_member ((GObject *) channel, handle,
+ if (!_rakia_media_channel_add_member ((GObject *) channel, handle,
"", &error))
{
/* FIXME: do we really want to emit Closed in this case?
* There wasn't a NewChannel/NewChannels emission */
- tpsip_media_channel_close (channel);
+ rakia_media_channel_close (channel);
goto error;
}
}
@@ -648,7 +648,7 @@ tpsip_media_manager_requestotron (TpChannelManager *manager,
TP_EXPORTABLE_CHANNEL (channel), request_tokens);
g_slist_free (request_tokens);
- tpsip_media_channel_create_initial_streams (channel);
+ rakia_media_channel_create_initial_streams (channel);
return TRUE;
@@ -660,29 +660,29 @@ error:
}
static gboolean
-tpsip_media_manager_request_channel (TpChannelManager *manager,
+rakia_media_manager_request_channel (TpChannelManager *manager,
gpointer request_token,
GHashTable *request_properties)
{
- return tpsip_media_manager_requestotron (manager, request_token,
+ return rakia_media_manager_requestotron (manager, request_token,
request_properties, METHOD_REQUEST);
}
static gboolean
-tpsip_media_manager_create_channel (TpChannelManager *manager,
+rakia_media_manager_create_channel (TpChannelManager *manager,
gpointer request_token,
GHashTable *request_properties)
{
- return tpsip_media_manager_requestotron (manager, request_token,
+ return rakia_media_manager_requestotron (manager, request_token,
request_properties, METHOD_CREATE);
}
static gboolean
-tpsip_media_manager_ensure_channel (TpChannelManager *manager,
+rakia_media_manager_ensure_channel (TpChannelManager *manager,
gpointer request_token,
GHashTable *request_properties)
{
- return tpsip_media_manager_requestotron (manager, request_token,
+ return rakia_media_manager_requestotron (manager, request_token,
request_properties, METHOD_ENSURE);
}
@@ -692,10 +692,10 @@ channel_manager_iface_init (gpointer g_iface,
{
TpChannelManagerIface *iface = g_iface;
- iface->foreach_channel = tpsip_media_manager_foreach_channel;
+ iface->foreach_channel = rakia_media_manager_foreach_channel;
iface->type_foreach_channel_class =
- tpsip_media_manager_type_foreach_channel_class;
- iface->request_channel = tpsip_media_manager_request_channel;
- iface->create_channel = tpsip_media_manager_create_channel;
- iface->ensure_channel = tpsip_media_manager_ensure_channel;
+ rakia_media_manager_type_foreach_channel_class;
+ iface->request_channel = rakia_media_manager_request_channel;
+ iface->create_channel = rakia_media_manager_create_channel;
+ iface->ensure_channel = rakia_media_manager_ensure_channel;
}
diff --git a/tpsip/media-manager.h b/rakia/media-manager.h
index 8bd7e14..7b962be 100644
--- a/tpsip/media-manager.h
+++ b/rakia/media-manager.h
@@ -1,5 +1,5 @@
/*
- * tpsip/media-manager.h - Media channel manager for SIP
+ * rakia/media-manager.h - Media channel manager for SIP
* Copyright (C) 2007 Collabora Ltd.
* Copyright (C) 2007-2008 Nokia Corporation
*
@@ -25,32 +25,32 @@
G_BEGIN_DECLS
-typedef struct _TpsipMediaManager TpsipMediaManager;
-typedef struct _TpsipMediaManagerClass TpsipMediaManagerClass;
+typedef struct _RakiaMediaManager RakiaMediaManager;
+typedef struct _RakiaMediaManagerClass RakiaMediaManagerClass;
-struct _TpsipMediaManagerClass {
+struct _RakiaMediaManagerClass {
GObjectClass parent_class;
};
-struct _TpsipMediaManager {
+struct _RakiaMediaManager {
GObject parent;
};
-GType tpsip_media_manager_get_type(void);
+GType rakia_media_manager_get_type(void);
/* TYPE MACROS */
#define TPSIP_TYPE_MEDIA_MANAGER \
- (tpsip_media_manager_get_type())
+ (rakia_media_manager_get_type())
#define TPSIP_MEDIA_MANAGER(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_MEDIA_MANAGER, TpsipMediaManager))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_MEDIA_MANAGER, RakiaMediaManager))
#define TPSIP_MEDIA_MANAGER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_MEDIA_MANAGER, TpsipMediaManagerClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_MEDIA_MANAGER, RakiaMediaManagerClass))
#define TPSIP_IS_MEDIA_MANAGER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TPSIP_TYPE_MEDIA_MANAGER))
#define TPSIP_IS_MEDIA_MANAGER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), TPSIP_TYPE_MEDIA_MANAGER))
#define TPSIP_MEDIA_MANAGER_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_MEDIA_MANAGER, TpsipMediaManagerClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_MEDIA_MANAGER, RakiaMediaManagerClass))
G_END_DECLS
diff --git a/tpsip/media-session.c b/rakia/media-session.c
index b63630e..2766321 100644
--- a/tpsip/media-session.c
+++ b/rakia/media-session.c
@@ -1,5 +1,5 @@
/*
- * sip-media-session.c - Source for TpsipMediaSession
+ * sip-media-session.c - Source for RakiaMediaSession
* Copyright (C) 2005 Collabora Ltd.
* Copyright (C) 2005-2010 Nokia Corporation
* @author Kai Vehmanen <first.surname@nokia.com>
@@ -25,7 +25,7 @@
#include "config.h"
-#include "tpsip/media-session.h"
+#include "rakia/media-session.h"
#include <dbus/dbus-glib.h>
#include <stdlib.h>
@@ -42,15 +42,15 @@
#include "config.h"
-#include <tpsip/base-connection.h>
+#include <rakia/base-connection.h>
-#include "tpsip/media-channel.h"
-#include "tpsip/media-stream.h"
+#include "rakia/media-channel.h"
+#include "rakia/media-stream.h"
#include "signals-marshal.h"
#define DEBUG_FLAG TPSIP_DEBUG_MEDIA
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
/* The timeout for outstanding re-INVITE transactions in seconds.
* Chosen to match the allowed cancellation timeout for proxies
@@ -59,8 +59,8 @@
static void session_handler_iface_init (gpointer, gpointer);
-G_DEFINE_TYPE_WITH_CODE(TpsipMediaSession,
- tpsip_media_session,
+G_DEFINE_TYPE_WITH_CODE(RakiaMediaSession,
+ rakia_media_session,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_MEDIA_SESSION_HANDLER,
session_handler_iface_init)
@@ -124,12 +124,12 @@ static const char* session_states[] =
#endif /* ENABLE_DEBUG */
/* private structure */
-typedef struct _TpsipMediaSessionPrivate TpsipMediaSessionPrivate;
+typedef struct _RakiaMediaSessionPrivate RakiaMediaSessionPrivate;
-struct _TpsipMediaSessionPrivate
+struct _RakiaMediaSessionPrivate
{
TpDBusDaemon *dbus_daemon;
- TpsipMediaChannel *channel; /* see gobj. prop. 'media-channel' */
+ RakiaMediaChannel *channel; /* see gobj. prop. 'media-channel' */
gchar *object_path; /* see gobj. prop. 'object-path' */
nua_handle_t *nua_op; /* see gobj. prop. 'nua-handle' */
TpHandle peer; /* see gobj. prop. 'peer' */
@@ -137,7 +137,7 @@ struct _TpsipMediaSessionPrivate
gchar *remote_ptime; /* see gobj. prop. 'remote-ptime' */
gchar *remote_max_ptime; /* see gobj. prop. 'remote-max-ptime' */
gboolean rtcp_enabled; /* see gobj. prop. 'rtcp-enabled' */
- TpsipMediaSessionState state; /* session state */
+ RakiaMediaSessionState state; /* session state */
TpLocalHoldState hold_state; /* local hold state aggregated from stream directions */
TpLocalHoldStateReason hold_reason; /* last used hold state change reason */
nua_saved_event_t saved_event[1]; /* Saved incoming request event */
@@ -156,33 +156,33 @@ struct _TpsipMediaSessionPrivate
gboolean dispose_has_run;
};
-#define TPSIP_MEDIA_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_MEDIA_SESSION, TpsipMediaSessionPrivate))
+#define TPSIP_MEDIA_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_MEDIA_SESSION, RakiaMediaSessionPrivate))
-static void tpsip_media_session_get_property (GObject *object,
+static void rakia_media_session_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void tpsip_media_session_set_property (GObject *object,
+static void rakia_media_session_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
-static TpsipMediaStream *
-tpsip_media_session_get_stream (TpsipMediaSession *self,
+static RakiaMediaStream *
+rakia_media_session_get_stream (RakiaMediaSession *self,
guint stream_id,
GError **error);
-static void priv_request_response_step (TpsipMediaSession *session);
-static void priv_session_invite (TpsipMediaSession *session, gboolean reinvite);
-static void priv_local_media_changed (TpsipMediaSession *session);
-static gboolean priv_update_remote_media (TpsipMediaSession *session,
+static void priv_request_response_step (RakiaMediaSession *session);
+static void priv_session_invite (RakiaMediaSession *session, gboolean reinvite);
+static void priv_local_media_changed (RakiaMediaSession *session);
+static gboolean priv_update_remote_media (RakiaMediaSession *session,
gboolean authoritative);
-static void priv_save_event (TpsipMediaSession *self);
-static void priv_zap_event (TpsipMediaSession *self);
+static void priv_save_event (RakiaMediaSession *self);
+static void priv_zap_event (RakiaMediaSession *self);
-static void tpsip_media_session_init (TpsipMediaSession *obj)
+static void rakia_media_session_init (RakiaMediaSession *obj)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (obj);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (obj);
priv->state = TPSIP_MEDIA_SESSION_STATE_CREATED;
priv->hold_state = TP_LOCAL_HOLD_STATE_UNHELD;
@@ -194,13 +194,13 @@ static void tpsip_media_session_init (TpsipMediaSession *obj)
}
static GObject *
-tpsip_media_session_constructor (GType type, guint n_props,
+rakia_media_session_constructor (GType type, guint n_props,
GObjectConstructParam *props)
{
GObject *obj;
- TpsipMediaSessionPrivate *priv;
+ RakiaMediaSessionPrivate *priv;
- obj = G_OBJECT_CLASS (tpsip_media_session_parent_class)->
+ obj = G_OBJECT_CLASS (rakia_media_session_parent_class)->
constructor (type, n_props, props);
priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (TPSIP_MEDIA_SESSION (obj));
@@ -210,13 +210,13 @@ tpsip_media_session_constructor (GType type, guint n_props,
return obj;
}
-static void tpsip_media_session_get_property (GObject *object,
+static void rakia_media_session_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- TpsipMediaSession *session = TPSIP_MEDIA_SESSION (object);
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSession *session = TPSIP_MEDIA_SESSION (object);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
switch (property_id)
{
@@ -298,13 +298,13 @@ static void tpsip_media_session_get_property (GObject *object,
}
}
-static void tpsip_media_session_set_property (GObject *object,
+static void rakia_media_session_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- TpsipMediaSession *session = TPSIP_MEDIA_SESSION (object);
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSession *session = TPSIP_MEDIA_SESSION (object);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
switch (property_id)
{
@@ -339,31 +339,31 @@ static void tpsip_media_session_set_property (GObject *object,
}
}
-static void tpsip_media_session_dispose (GObject *object);
-static void tpsip_media_session_finalize (GObject *object);
+static void rakia_media_session_dispose (GObject *object);
+static void rakia_media_session_finalize (GObject *object);
static void
-tpsip_media_session_class_init (TpsipMediaSessionClass *klass)
+rakia_media_session_class_init (RakiaMediaSessionClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GParamSpec *param_spec;
- g_type_class_add_private (klass, sizeof (TpsipMediaSessionPrivate));
+ g_type_class_add_private (klass, sizeof (RakiaMediaSessionPrivate));
- object_class->constructor = tpsip_media_session_constructor;
+ object_class->constructor = rakia_media_session_constructor;
- object_class->get_property = tpsip_media_session_get_property;
- object_class->set_property = tpsip_media_session_set_property;
+ object_class->get_property = rakia_media_session_get_property;
+ object_class->set_property = rakia_media_session_set_property;
- object_class->dispose = tpsip_media_session_dispose;
- object_class->finalize = tpsip_media_session_finalize;
+ object_class->dispose = rakia_media_session_dispose;
+ object_class->finalize = rakia_media_session_finalize;
param_spec = g_param_spec_object ("dbus-daemon", "TpDBusDaemon",
"Connection to D-Bus.", TP_TYPE_DBUS_DAEMON,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_DBUS_DAEMON, param_spec);
- param_spec = g_param_spec_object ("media-channel", "TpsipMediaChannel object",
+ param_spec = g_param_spec_object ("media-channel", "RakiaMediaChannel object",
"SIP media channel object that owns this media session object"
" (not reference counted).",
TPSIP_TYPE_MEDIA_CHANNEL,
@@ -442,15 +442,15 @@ tpsip_media_session_class_init (TpsipMediaSessionClass *klass)
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
NULL, NULL,
- _tpsip_marshal_VOID__UINT_UINT,
+ _rakia_marshal_VOID__UINT_UINT,
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
}
static void
-tpsip_media_session_dispose (GObject *object)
+rakia_media_session_dispose (GObject *object)
{
- TpsipMediaSession *self = TPSIP_MEDIA_SESSION (object);
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSession *self = TPSIP_MEDIA_SESSION (object);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
if (priv->dispose_has_run)
return;
@@ -464,17 +464,17 @@ tpsip_media_session_dispose (GObject *object)
tp_clear_object (&priv->dbus_daemon);
- if (G_OBJECT_CLASS (tpsip_media_session_parent_class)->dispose)
- G_OBJECT_CLASS (tpsip_media_session_parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (rakia_media_session_parent_class)->dispose)
+ G_OBJECT_CLASS (rakia_media_session_parent_class)->dispose (object);
DEBUG("exit");
}
static void
-tpsip_media_session_finalize (GObject *object)
+rakia_media_session_finalize (GObject *object)
{
- TpsipMediaSession *self = TPSIP_MEDIA_SESSION (object);
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSession *self = TPSIP_MEDIA_SESSION (object);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
guint i;
/* terminating the session should have discarded the NUA handle */
@@ -483,7 +483,7 @@ tpsip_media_session_finalize (GObject *object)
/* free any data held directly by the object here */
for (i = 0; i < priv->streams->len; i++) {
- TpsipMediaStream *stream = g_ptr_array_index (priv->streams, i);
+ RakiaMediaStream *stream = g_ptr_array_index (priv->streams, i);
if (stream != NULL)
{
WARNING ("stream %u (%p) left over, reaping", i, stream);
@@ -504,7 +504,7 @@ tpsip_media_session_finalize (GObject *object)
g_free (priv->local_ip_address);
g_free (priv->object_path);
- G_OBJECT_CLASS (tpsip_media_session_parent_class)->finalize (object);
+ G_OBJECT_CLASS (rakia_media_session_parent_class)->finalize (object);
DEBUG("exit");
}
@@ -512,28 +512,28 @@ tpsip_media_session_finalize (GObject *object)
/**
- * tpsip_media_session_error
+ * rakia_media_session_error
*
* Implements DBus method Error
* on interface org.freedesktop.Telepathy.Media.SessionHandler
*/
static void
-tpsip_media_session_error (TpSvcMediaSessionHandler *iface,
+rakia_media_session_error (TpSvcMediaSessionHandler *iface,
guint errno,
const gchar *message,
DBusGMethodInvocation *context)
{
- TpsipMediaSession *obj = TPSIP_MEDIA_SESSION (iface);
+ RakiaMediaSession *obj = TPSIP_MEDIA_SESSION (iface);
SESSION_DEBUG (obj, "Media.SessionHandler::Error called (%s), terminating session", message);
- tpsip_media_session_terminate (obj);
+ rakia_media_session_terminate (obj);
tp_svc_media_session_handler_return_from_error (context);
}
-static void priv_emit_new_stream (TpsipMediaSession *self,
- TpsipMediaStream *stream)
+static void priv_emit_new_stream (RakiaMediaSession *self,
+ RakiaMediaStream *stream)
{
gchar *object_path;
guint id;
@@ -559,17 +559,17 @@ static void priv_emit_new_stream (TpsipMediaSession *self,
/**
- * tpsip_media_session_ready
+ * rakia_media_session_ready
*
* Implements DBus method Ready
* on interface org.freedesktop.Telepathy.Media.SessionHandler
*/
static void
-tpsip_media_session_ready (TpSvcMediaSessionHandler *iface,
+rakia_media_session_ready (TpSvcMediaSessionHandler *iface,
DBusGMethodInvocation *context)
{
- TpsipMediaSession *obj = TPSIP_MEDIA_SESSION (iface);
- TpsipMediaSessionPrivate *priv;
+ RakiaMediaSession *obj = TPSIP_MEDIA_SESSION (iface);
+ RakiaMediaSessionPrivate *priv;
guint i;
DEBUG ("enter");
@@ -584,7 +584,7 @@ tpsip_media_session_ready (TpSvcMediaSessionHandler *iface,
for (i = 0; i < priv->streams->len; i++)
{
- TpsipMediaStream *stream = g_ptr_array_index (priv->streams, i);
+ RakiaMediaStream *stream = g_ptr_array_index (priv->streams, i);
if (stream)
priv_emit_new_stream (obj, stream);
}
@@ -598,21 +598,21 @@ tpsip_media_session_ready (TpSvcMediaSessionHandler *iface,
***********************************************************************/
TpHandle
-tpsip_media_session_get_peer (TpsipMediaSession *session)
+rakia_media_session_get_peer (RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
return priv->peer;
}
-TpsipMediaSessionState
-tpsip_media_session_get_state (TpsipMediaSession *session)
+RakiaMediaSessionState
+rakia_media_session_get_state (RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
return priv->state;
}
static gboolean
-tpsip_media_session_supports_media_type (guint media_type)
+rakia_media_session_supports_media_type (guint media_type)
{
switch (media_type)
{
@@ -624,26 +624,26 @@ tpsip_media_session_supports_media_type (guint media_type)
}
static void
-priv_close_all_streams (TpsipMediaSession *session)
+priv_close_all_streams (RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
guint i;
for (i = 0; i < priv->streams->len; i++)
{
- TpsipMediaStream *stream;
+ RakiaMediaStream *stream;
stream = g_ptr_array_index (priv->streams, i);
if (stream != NULL)
- tpsip_media_stream_close (stream);
+ rakia_media_stream_close (stream);
g_assert (g_ptr_array_index (priv->streams, i) == NULL);
}
}
static void
-priv_apply_streams_pending_direction (TpsipMediaSession *session,
+priv_apply_streams_pending_direction (RakiaMediaSession *session,
guint pending_send_mask)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
- TpsipMediaStream *stream;
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaStream *stream;
guint i;
/* If there has been a local change pending a re-INVITE,
@@ -656,15 +656,15 @@ priv_apply_streams_pending_direction (TpsipMediaSession *session,
{
stream = g_ptr_array_index(priv->streams, i);
if (stream != NULL)
- tpsip_media_stream_apply_pending_direction (stream, pending_send_mask);
+ rakia_media_stream_apply_pending_direction (stream, pending_send_mask);
}
}
void
-tpsip_media_session_change_state (TpsipMediaSession *session,
- TpsipMediaSessionState new_state)
+rakia_media_session_change_state (RakiaMediaSession *session,
+ RakiaMediaSessionState new_state)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
guint old_state;
if (priv->state == new_state)
@@ -716,14 +716,14 @@ tpsip_media_session_change_state (TpsipMediaSession *session,
#ifdef ENABLE_DEBUG
void
-tpsip_media_session_debug (TpsipMediaSession *session,
+rakia_media_session_debug (RakiaMediaSession *session,
const gchar *format, ...)
{
- TpsipMediaSessionPrivate *priv;
+ RakiaMediaSessionPrivate *priv;
va_list list;
gchar buf[240];
- if (!tpsip_debug_flag_is_set (DEBUG_FLAG))
+ if (!rakia_debug_flag_is_set (DEBUG_FLAG))
return;
priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
@@ -739,9 +739,9 @@ tpsip_media_session_debug (TpsipMediaSession *session,
}
#endif /* ENABLE_DEBUG */
-void tpsip_media_session_terminate (TpsipMediaSession *session)
+void rakia_media_session_terminate (RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
DEBUG ("enter");
@@ -789,14 +789,14 @@ void tpsip_media_session_terminate (TpsipMediaSession *session)
}
}
- tpsip_media_session_change_state (session, TPSIP_MEDIA_SESSION_STATE_ENDED);
+ rakia_media_session_change_state (session, TPSIP_MEDIA_SESSION_STATE_ENDED);
}
gboolean
-tpsip_media_session_set_remote_media (TpsipMediaSession *session,
+rakia_media_session_set_remote_media (RakiaMediaSession *session,
const sdp_session_t* sdp)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
gboolean authoritative;
DEBUG ("enter");
@@ -804,7 +804,7 @@ tpsip_media_session_set_remote_media (TpsipMediaSession *session,
if (priv->state == TPSIP_MEDIA_SESSION_STATE_INVITE_SENT
|| priv->state == TPSIP_MEDIA_SESSION_STATE_REINVITE_SENT)
{
- tpsip_media_session_change_state (
+ rakia_media_session_change_state (
session,
TPSIP_MEDIA_SESSION_STATE_RESPONSE_RECEIVED);
}
@@ -862,10 +862,10 @@ finally:
void
priv_add_stream_list_entry (GPtrArray *list,
- TpsipMediaStream *stream,
- TpsipMediaSession *session)
+ RakiaMediaStream *stream,
+ RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
GValue entry = { 0 };
GType stream_type;
guint id;
@@ -902,7 +902,7 @@ priv_add_stream_list_entry (GPtrArray *list,
g_ptr_array_add (list, g_value_get_boxed (&entry));
}
-gboolean tpsip_media_session_request_streams (TpsipMediaSession *session,
+gboolean rakia_media_session_request_streams (RakiaMediaSession *session,
const GArray *media_types,
GPtrArray *ret,
GError **error)
@@ -914,7 +914,7 @@ gboolean tpsip_media_session_request_streams (TpsipMediaSession *session,
/* Validate the media types before creating any streams */
for (i = 0; i < media_types->len; i++) {
guint media_type = g_array_index (media_types, guint, i);
- if (!tpsip_media_session_supports_media_type (media_type))
+ if (!rakia_media_session_supports_media_type (media_type))
{
g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
"media type #%u is not supported", i);
@@ -924,9 +924,9 @@ gboolean tpsip_media_session_request_streams (TpsipMediaSession *session,
for (i = 0; i < media_types->len; i++) {
guint media_type = g_array_index (media_types, guint, i);
- TpsipMediaStream *stream;
+ RakiaMediaStream *stream;
- stream = tpsip_media_session_add_stream (session,
+ stream = rakia_media_session_add_stream (session,
media_type,
TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL,
TRUE);
@@ -949,11 +949,11 @@ gboolean tpsip_media_session_request_streams (TpsipMediaSession *session,
}
gboolean
-tpsip_media_session_remove_streams (TpsipMediaSession *self,
+rakia_media_session_remove_streams (RakiaMediaSession *self,
const GArray *stream_ids,
GError **error)
{
- TpsipMediaStream *stream;
+ RakiaMediaStream *stream;
guint stream_id;
guint i;
@@ -962,10 +962,10 @@ tpsip_media_session_remove_streams (TpsipMediaSession *self,
for (i = 0; i < stream_ids->len; i++)
{
stream_id = g_array_index (stream_ids, guint, i);
- stream = tpsip_media_session_get_stream (self, stream_id, error);
+ stream = rakia_media_session_get_stream (self, stream_id, error);
if (stream == NULL)
return FALSE;
- tpsip_media_stream_close (stream);
+ rakia_media_stream_close (stream);
}
priv_local_media_changed (self);
@@ -973,11 +973,11 @@ tpsip_media_session_remove_streams (TpsipMediaSession *self,
return TRUE;
}
-void tpsip_media_session_list_streams (TpsipMediaSession *session,
+void rakia_media_session_list_streams (RakiaMediaSession *session,
GPtrArray *ret)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
- TpsipMediaStream *stream;
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaStream *stream;
guint i;
for (i = 0; i < priv->streams->len; i++)
@@ -989,15 +989,15 @@ void tpsip_media_session_list_streams (TpsipMediaSession *session,
}
gboolean
-tpsip_media_session_request_stream_direction (TpsipMediaSession *self,
+rakia_media_session_request_stream_direction (RakiaMediaSession *self,
guint stream_id,
guint direction,
GError **error)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
- TpsipMediaStream *stream;
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaStream *stream;
- stream = tpsip_media_session_get_stream (self, stream_id, error);
+ stream = rakia_media_session_get_stream (self, stream_id, error);
if (stream == NULL)
{
g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
@@ -1013,10 +1013,10 @@ tpsip_media_session_request_stream_direction (TpsipMediaSession *self,
{
/* While processing a session offer, we can only mask out direction
* requested by the remote peer */
- direction &= tpsip_media_stream_get_requested_direction (stream);
+ direction &= rakia_media_stream_get_requested_direction (stream);
}
- tpsip_media_stream_set_direction (stream,
+ rakia_media_stream_set_direction (stream,
direction,
TP_MEDIA_STREAM_PENDING_REMOTE_SEND);
@@ -1024,10 +1024,10 @@ tpsip_media_session_request_stream_direction (TpsipMediaSession *self,
}
static void
-priv_save_event (TpsipMediaSession *self)
+priv_save_event (RakiaMediaSession *self)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
- TpsipBaseConnection *conn = NULL;
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaBaseConnection *conn = NULL;
priv_zap_event (self);
@@ -1035,7 +1035,7 @@ priv_save_event (TpsipMediaSession *self)
g_return_if_fail (conn != NULL);
- tpsip_base_connection_save_event (conn, priv->saved_event);
+ rakia_base_connection_save_event (conn, priv->saved_event);
g_object_unref (conn);
@@ -1049,9 +1049,9 @@ priv_save_event (TpsipMediaSession *self)
}
static void
-priv_zap_event (TpsipMediaSession *self)
+priv_zap_event (RakiaMediaSession *self)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
if (priv->saved_event[0])
{
@@ -1063,9 +1063,9 @@ priv_zap_event (TpsipMediaSession *self)
}
void
-tpsip_media_session_receive_invite (TpsipMediaSession *self)
+rakia_media_session_receive_invite (RakiaMediaSession *self)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
g_return_if_fail (priv->state == TPSIP_MEDIA_SESSION_STATE_CREATED);
g_return_if_fail (priv->nua_op != NULL);
@@ -1074,13 +1074,13 @@ tpsip_media_session_receive_invite (TpsipMediaSession *self)
nua_respond (priv->nua_op, SIP_180_RINGING, TAG_END());
- tpsip_media_session_change_state (self, TPSIP_MEDIA_SESSION_STATE_INVITE_RECEIVED);
+ rakia_media_session_change_state (self, TPSIP_MEDIA_SESSION_STATE_INVITE_RECEIVED);
}
void
-tpsip_media_session_receive_reinvite (TpsipMediaSession *self)
+rakia_media_session_receive_reinvite (RakiaMediaSession *self)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
/* Check for permitted state transitions */
switch (priv->state)
@@ -1097,13 +1097,13 @@ tpsip_media_session_receive_reinvite (TpsipMediaSession *self)
priv_save_event (self);
- tpsip_media_session_change_state (self, TPSIP_MEDIA_SESSION_STATE_REINVITE_RECEIVED);
+ rakia_media_session_change_state (self, TPSIP_MEDIA_SESSION_STATE_REINVITE_RECEIVED);
}
void
-tpsip_media_session_accept (TpsipMediaSession *self)
+rakia_media_session_accept (RakiaMediaSession *self)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
if (priv->accepted)
return;
@@ -1122,11 +1122,11 @@ tpsip_media_session_accept (TpsipMediaSession *self)
}
void
-tpsip_media_session_respond (TpsipMediaSession *self,
+rakia_media_session_respond (RakiaMediaSession *self,
gint status,
const char *message)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
SESSION_DEBUG (self, "responding: %03d %s", status, message ? message : "");
@@ -1137,17 +1137,17 @@ tpsip_media_session_respond (TpsipMediaSession *self,
nua_respond (priv->nua_op, status, message, TAG_END());
}
-gboolean tpsip_media_session_is_accepted (TpsipMediaSession *self)
+gboolean rakia_media_session_is_accepted (RakiaMediaSession *self)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
return priv->accepted;
}
static gboolean
priv_glare_retry (gpointer session)
{
- TpsipMediaSession *self = session;
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSession *self = session;
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
SESSION_DEBUG (self, "glare resolution interval is over");
@@ -1160,9 +1160,9 @@ priv_glare_retry (gpointer session)
}
void
-tpsip_media_session_resolve_glare (TpsipMediaSession *self)
+rakia_media_session_resolve_glare (RakiaMediaSession *self)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
guint interval;
if (priv->state != TPSIP_MEDIA_SESSION_STATE_REINVITE_SENT)
@@ -1195,17 +1195,17 @@ tpsip_media_session_resolve_glare (TpsipMediaSession *self)
SESSION_DEBUG (self, "glare resolution interval %u msec", interval);
- tpsip_media_session_change_state (
+ rakia_media_session_change_state (
self, TPSIP_MEDIA_SESSION_STATE_REINVITE_PENDING);
}
-static TpsipMediaStream *
-tpsip_media_session_get_stream (TpsipMediaSession *self,
+static RakiaMediaStream *
+rakia_media_session_get_stream (RakiaMediaSession *self,
guint stream_id,
GError **error)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
- TpsipMediaStream *stream;
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaStream *stream;
g_assert (priv->streams != NULL);
@@ -1229,28 +1229,28 @@ tpsip_media_session_get_stream (TpsipMediaSession *self,
}
TpLocalHoldState
-tpsip_media_session_get_hold_state (TpsipMediaSession *self)
+rakia_media_session_get_hold_state (RakiaMediaSession *self)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
return priv->hold_state;
}
static gboolean
-tpsip_media_session_is_local_hold_ongoing (TpsipMediaSession *self)
+rakia_media_session_is_local_hold_ongoing (RakiaMediaSession *self)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
return (priv->hold_state == TP_LOCAL_HOLD_STATE_HELD
|| priv->hold_state == TP_LOCAL_HOLD_STATE_PENDING_HOLD);
}
static void
-priv_initiate_hold (TpsipMediaSession *self,
+priv_initiate_hold (RakiaMediaSession *self,
gboolean hold,
TpLocalHoldStateReason reason)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
gboolean stream_hold_requested = FALSE;
- TpsipMediaStream *stream;
+ RakiaMediaStream *stream;
guint i;
DEBUG("enter");
@@ -1279,7 +1279,7 @@ priv_initiate_hold (TpsipMediaSession *self,
{
stream = g_ptr_array_index(priv->streams, i);
if (stream != NULL
- && tpsip_media_stream_request_hold_state (stream, hold))
+ && rakia_media_stream_request_hold_state (stream, hold))
stream_hold_requested = TRUE;
}
@@ -1301,10 +1301,10 @@ priv_initiate_hold (TpsipMediaSession *self,
}
static void
-priv_finalize_hold (TpsipMediaSession *self)
+priv_finalize_hold (RakiaMediaSession *self)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
- TpsipMediaStream *stream;
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaStream *stream;
TpLocalHoldState final_hold_state;
guint hold_mask;
guint unhold_mask;
@@ -1360,10 +1360,10 @@ priv_finalize_hold (TpsipMediaSession *self)
stream = g_ptr_array_index(priv->streams, i);
if (stream != NULL)
{
- guint direction = tpsip_media_stream_get_requested_direction (stream);
+ guint direction = rakia_media_stream_get_requested_direction (stream);
direction &= hold_mask;
direction |= unhold_mask;
- tpsip_media_stream_set_direction (stream,
+ rakia_media_stream_set_direction (stream,
direction,
TP_MEDIA_STREAM_PENDING_REMOTE_SEND
| TP_MEDIA_STREAM_PENDING_LOCAL_SEND);
@@ -1372,7 +1372,7 @@ priv_finalize_hold (TpsipMediaSession *self)
}
void
-tpsip_media_session_request_hold (TpsipMediaSession *self,
+rakia_media_session_request_hold (RakiaMediaSession *self,
gboolean hold)
{
priv_initiate_hold (self,
@@ -1381,18 +1381,18 @@ tpsip_media_session_request_hold (TpsipMediaSession *self,
}
gboolean
-tpsip_media_session_start_telephony_event (TpsipMediaSession *self,
+rakia_media_session_start_telephony_event (RakiaMediaSession *self,
guint stream_id,
guchar event,
GError **error)
{
- TpsipMediaStream *stream;
+ RakiaMediaStream *stream;
- stream = tpsip_media_session_get_stream (self, stream_id, error);
+ stream = rakia_media_session_get_stream (self, stream_id, error);
if (stream == NULL)
return FALSE;
- if (tpsip_media_stream_get_media_type (stream) != TP_MEDIA_STREAM_TYPE_AUDIO)
+ if (rakia_media_stream_get_media_type (stream) != TP_MEDIA_STREAM_TYPE_AUDIO)
{
g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
"non-audio stream %u does not support telephony events", stream_id);
@@ -1401,23 +1401,23 @@ tpsip_media_session_start_telephony_event (TpsipMediaSession *self,
DEBUG("starting telephony event %u on stream %u", (guint) event, stream_id);
- tpsip_media_stream_start_telephony_event (stream, event);
+ rakia_media_stream_start_telephony_event (stream, event);
return TRUE;
}
gboolean
-tpsip_media_session_stop_telephony_event (TpsipMediaSession *self,
+rakia_media_session_stop_telephony_event (RakiaMediaSession *self,
guint stream_id,
GError **error)
{
- TpsipMediaStream *stream;
+ RakiaMediaStream *stream;
- stream = tpsip_media_session_get_stream (self, stream_id, error);
+ stream = rakia_media_session_get_stream (self, stream_id, error);
if (stream == NULL)
return FALSE;
- if (tpsip_media_stream_get_media_type (stream) != TP_MEDIA_STREAM_TYPE_AUDIO)
+ if (rakia_media_stream_get_media_type (stream) != TP_MEDIA_STREAM_TYPE_AUDIO)
{
g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
"non-audio stream %u does not support telephony events; spurious use of the stop event?", stream_id);
@@ -1426,16 +1426,16 @@ tpsip_media_session_stop_telephony_event (TpsipMediaSession *self,
DEBUG("stopping the telephony event on stream %u", stream_id);
- tpsip_media_stream_stop_telephony_event (stream);
+ rakia_media_stream_stop_telephony_event (stream);
return TRUE;
}
gint
-tpsip_media_session_rate_native_transport (TpsipMediaSession *session,
+rakia_media_session_rate_native_transport (RakiaMediaSession *session,
const GValue *transport)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
gint result = 0;
gchar *address = NULL;
guint proto = TP_MEDIA_STREAM_BASE_PROTO_UDP;
@@ -1460,24 +1460,24 @@ tpsip_media_session_rate_native_transport (TpsipMediaSession *session,
}
static void
-priv_session_set_streams_playing (TpsipMediaSession *session, gboolean playing)
+priv_session_set_streams_playing (RakiaMediaSession *session, gboolean playing)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
- TpsipMediaStream *stream;
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaStream *stream;
guint i;
for (i = 0; i < priv->streams->len; i++)
{
stream = g_ptr_array_index(priv->streams, i);
if (stream != NULL)
- tpsip_media_stream_set_playing (stream, playing);
+ rakia_media_stream_set_playing (stream, playing);
}
}
static void
-priv_local_media_changed (TpsipMediaSession *session)
+priv_local_media_changed (RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
switch (priv->state)
{
@@ -1526,10 +1526,10 @@ priv_local_media_changed (TpsipMediaSession *session)
}
static void
-priv_update_remote_hold (TpsipMediaSession *session)
+priv_update_remote_hold (RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
- TpsipMediaStream *stream;
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaStream *stream;
gboolean has_streams = FALSE;
gboolean remote_held = TRUE;
guint direction;
@@ -1541,7 +1541,7 @@ priv_update_remote_hold (TpsipMediaSession *session)
stream = g_ptr_array_index(priv->streams, i);
if (stream != NULL)
{
- direction = tpsip_media_stream_get_requested_direction (stream);
+ direction = rakia_media_stream_get_requested_direction (stream);
if ((direction & TP_MEDIA_STREAM_DIRECTION_SEND) != 0)
remote_held = FALSE;
@@ -1556,19 +1556,19 @@ priv_update_remote_hold (TpsipMediaSession *session)
DEBUG("the session is remotely %s", remote_held? "held" : "unheld");
if (remote_held)
- tpsip_media_channel_change_call_state (priv->channel,
+ rakia_media_channel_change_call_state (priv->channel,
priv->peer,
TP_CHANNEL_CALL_STATE_HELD,
0);
else
- tpsip_media_channel_change_call_state (priv->channel,
+ rakia_media_channel_change_call_state (priv->channel,
priv->peer,
0,
TP_CHANNEL_CALL_STATE_HELD);
}
gchar *
-tpsip_sdp_get_string_attribute (const sdp_attribute_t *attrs, const char *name)
+rakia_sdp_get_string_attribute (const sdp_attribute_t *attrs, const char *name)
{
sdp_attribute_t *attr;
@@ -1580,9 +1580,9 @@ tpsip_sdp_get_string_attribute (const sdp_attribute_t *attrs, const char *name)
}
static gboolean
-priv_update_remote_media (TpsipMediaSession *session, gboolean authoritative)
+priv_update_remote_media (RakiaMediaSession *session, gboolean authoritative)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
const sdp_session_t *sdp = priv->remote_sdp;
const sdp_media_t *media;
gboolean has_supported_media = FALSE;
@@ -1595,12 +1595,12 @@ priv_update_remote_media (TpsipMediaSession *session, gboolean authoritative)
/* Update the session-wide parameters
* before updating streams' media */
- priv->remote_ptime = tpsip_sdp_get_string_attribute (
+ priv->remote_ptime = rakia_sdp_get_string_attribute (
sdp->sdp_attributes, "ptime");
- priv->remote_max_ptime = tpsip_sdp_get_string_attribute (
+ priv->remote_max_ptime = rakia_sdp_get_string_attribute (
sdp->sdp_attributes, "maxptime");
- priv->rtcp_enabled = !tpsip_sdp_rtcp_bandwidth_throttled (
+ priv->rtcp_enabled = !rakia_sdp_rtcp_bandwidth_throttled (
sdp->sdp_bandwidths);
/*
@@ -1610,7 +1610,7 @@ priv_update_remote_media (TpsipMediaSession *session, gboolean authoritative)
*/
if (authoritative)
direction_up_mask
- = tpsip_media_session_is_local_hold_ongoing (session)
+ = rakia_media_session_is_local_hold_ongoing (session)
? TP_MEDIA_STREAM_DIRECTION_SEND
: TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL;
else
@@ -1632,16 +1632,16 @@ priv_update_remote_media (TpsipMediaSession *session, gboolean authoritative)
for (i = 0; media != NULL; media = media->m_next, i++)
{
- TpsipMediaStream *stream = NULL;
+ RakiaMediaStream *stream = NULL;
guint media_type;
- media_type = tpsip_tp_media_type (media->m_type);
+ media_type = rakia_tp_media_type (media->m_type);
if (i >= priv->streams->len)
- stream = tpsip_media_session_add_stream (
+ stream = rakia_media_session_add_stream (
session,
media_type,
- tpsip_media_stream_direction_from_remote_media (media),
+ rakia_media_stream_direction_from_remote_media (media),
FALSE);
else
stream = g_ptr_array_index(priv->streams, i);
@@ -1656,12 +1656,12 @@ priv_update_remote_media (TpsipMediaSession *session, gboolean authoritative)
{
DEBUG("the stream has been rejected, closing");
}
- else if (tpsip_media_stream_get_media_type (stream) != media_type)
+ else if (rakia_media_stream_get_media_type (stream) != media_type)
{
/* XXX: close this stream and create a new one in its place? */
WARNING ("The peer has changed the media type, don't know what to do");
}
- else if (tpsip_media_stream_set_remote_media (stream,
+ else if (rakia_media_stream_set_remote_media (stream,
media,
direction_up_mask,
pending_send_mask))
@@ -1671,7 +1671,7 @@ priv_update_remote_media (TpsipMediaSession *session, gboolean authoritative)
}
/* There have been problems with the stream update, kill the stream */
- tpsip_media_stream_close (stream);
+ rakia_media_stream_close (stream);
}
g_assert(media == NULL);
g_assert(i <= priv->streams->len);
@@ -1692,12 +1692,12 @@ priv_update_remote_media (TpsipMediaSession *session, gboolean authoritative)
*/
do
{
- TpsipMediaStream *stream;
+ RakiaMediaStream *stream;
stream = g_ptr_array_index(priv->streams, i);
if (stream != NULL)
{
MESSAGE ("closing a mismatched stream %u", i);
- tpsip_media_stream_close (stream);
+ rakia_media_stream_close (stream);
}
}
while (++i < priv->streams->len);
@@ -1712,9 +1712,9 @@ priv_update_remote_media (TpsipMediaSession *session, gboolean authoritative)
}
static void
-priv_session_rollback (TpsipMediaSession *session)
+priv_session_rollback (RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
DEBUG("enter");
@@ -1727,7 +1727,7 @@ priv_session_rollback (TpsipMediaSession *session)
}
if (priv->backup_remote_sdp == NULL)
{
- tpsip_media_session_terminate (session);
+ rakia_media_session_terminate (session);
return;
}
@@ -1753,15 +1753,15 @@ priv_session_rollback (TpsipMediaSession *session)
TAG_END());
}
- tpsip_media_session_change_state (session, TPSIP_MEDIA_SESSION_STATE_ACTIVE);
+ rakia_media_session_change_state (session, TPSIP_MEDIA_SESSION_STATE_ACTIVE);
}
static gboolean
-priv_session_local_sdp (TpsipMediaSession *session,
+priv_session_local_sdp (RakiaMediaSession *session,
GString *user_sdp,
gboolean authoritative)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
gboolean has_supported_media = FALSE;
guint len;
guint i;
@@ -1779,11 +1779,11 @@ priv_session_local_sdp (TpsipMediaSession *session,
for (i = 0; i < len; i++)
{
- TpsipMediaStream *stream = g_ptr_array_index (priv->streams, i);
+ RakiaMediaStream *stream = g_ptr_array_index (priv->streams, i);
if (stream)
{
user_sdp = g_string_append (user_sdp,
- tpsip_media_stream_local_sdp (stream));
+ rakia_media_stream_local_sdp (stream));
has_supported_media = TRUE;
}
else
@@ -1796,9 +1796,9 @@ priv_session_local_sdp (TpsipMediaSession *session,
}
static void
-priv_session_invite (TpsipMediaSession *session, gboolean reinvite)
+priv_session_invite (RakiaMediaSession *session, gboolean reinvite)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
GString *user_sdp;
DEBUG("enter");
@@ -1823,7 +1823,7 @@ priv_session_invite (TpsipMediaSession *session, gboolean reinvite)
TAG_END());
priv->pending_offer = FALSE;
- tpsip_media_session_change_state (
+ rakia_media_session_change_state (
session,
reinvite? TPSIP_MEDIA_SESSION_STATE_REINVITE_SENT
: TPSIP_MEDIA_SESSION_STATE_INVITE_SENT);
@@ -1835,9 +1835,9 @@ priv_session_invite (TpsipMediaSession *session, gboolean reinvite)
}
static void
-priv_session_respond (TpsipMediaSession *session)
+priv_session_respond (RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
GString *user_sdp;
g_return_if_fail (priv->nua_op != NULL);
@@ -1866,7 +1866,7 @@ priv_session_respond (TpsipMediaSession *session)
if (priv->saved_event[0])
nua_destroy_event (priv->saved_event);
- tpsip_media_session_change_state (session, TPSIP_MEDIA_SESSION_STATE_ACTIVE);
+ rakia_media_session_change_state (session, TPSIP_MEDIA_SESSION_STATE_ACTIVE);
}
else
{
@@ -1879,16 +1879,16 @@ priv_session_respond (TpsipMediaSession *session)
}
static gboolean
-priv_is_codec_intersect_pending (TpsipMediaSession *session)
+priv_is_codec_intersect_pending (RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
guint i;
for (i = 0; i < priv->streams->len; i++)
{
- TpsipMediaStream *stream = g_ptr_array_index (priv->streams, i);
+ RakiaMediaStream *stream = g_ptr_array_index (priv->streams, i);
if (stream != NULL
- && tpsip_media_stream_is_codec_intersect_pending (stream))
+ && rakia_media_stream_is_codec_intersect_pending (stream))
return TRUE;
}
@@ -1905,9 +1905,9 @@ priv_is_codec_intersect_pending (TpsipMediaSession *session)
* - whether session is locally accepted
*/
static void
-priv_request_response_step (TpsipMediaSession *session)
+priv_request_response_step (RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
if (priv->local_non_ready != 0)
{
@@ -1923,7 +1923,7 @@ priv_request_response_step (TpsipMediaSession *session)
case TPSIP_MEDIA_SESSION_STATE_RESPONSE_RECEIVED:
if (priv->accepted
&& !priv_is_codec_intersect_pending (session))
- tpsip_media_session_change_state (session,
+ rakia_media_session_change_state (session,
TPSIP_MEDIA_SESSION_STATE_ACTIVE);
break;
case TPSIP_MEDIA_SESSION_STATE_INVITE_RECEIVED:
@@ -1949,20 +1949,20 @@ priv_request_response_step (TpsipMediaSession *session)
}
static void
-priv_stream_close_cb (TpsipMediaStream *stream,
- TpsipMediaSession *session)
+priv_stream_close_cb (RakiaMediaStream *stream,
+ RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv;
+ RakiaMediaSessionPrivate *priv;
guint id;
DEBUG("enter");
priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
- id = tpsip_media_stream_get_id (stream);
+ id = rakia_media_stream_get_id (stream);
g_return_if_fail (g_ptr_array_index(priv->streams, id) == stream);
- if (!tpsip_media_stream_is_local_ready (stream))
+ if (!rakia_media_stream_is_local_ready (stream))
{
g_assert (priv->local_non_ready > 0);
--priv->local_non_ready;
@@ -1976,10 +1976,10 @@ priv_stream_close_cb (TpsipMediaStream *stream,
tp_svc_channel_type_streamed_media_emit_stream_removed (priv->channel, id);
}
-static void priv_stream_ready_cb (TpsipMediaStream *stream,
- TpsipMediaSession *session)
+static void priv_stream_ready_cb (RakiaMediaStream *stream,
+ RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv;
+ RakiaMediaSessionPrivate *priv;
DEBUG ("enter");
@@ -1991,15 +1991,15 @@ static void priv_stream_ready_cb (TpsipMediaStream *stream,
priv_request_response_step (session);
}
-static void priv_stream_supported_codecs_cb (TpsipMediaStream *stream,
+static void priv_stream_supported_codecs_cb (RakiaMediaStream *stream,
guint num_codecs,
- TpsipMediaSession *session)
+ RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv;
+ RakiaMediaSessionPrivate *priv;
priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
- g_assert (!tpsip_media_stream_is_codec_intersect_pending (stream));
+ g_assert (!rakia_media_stream_is_codec_intersect_pending (stream));
if (num_codecs == 0)
{
@@ -2009,7 +2009,7 @@ static void priv_stream_supported_codecs_cb (TpsipMediaStream *stream,
case TPSIP_MEDIA_SESSION_STATE_RESPONSE_RECEIVED:
case TPSIP_MEDIA_SESSION_STATE_INVITE_RECEIVED:
DEBUG("no codec intersection, closing the stream");
- tpsip_media_stream_close (stream);
+ rakia_media_stream_close (stream);
break;
case TPSIP_MEDIA_SESSION_STATE_REINVITE_RECEIVED:
/* In this case, we have the stream negotiated already,
@@ -2033,34 +2033,34 @@ static void priv_stream_supported_codecs_cb (TpsipMediaStream *stream,
}
static void
-priv_stream_state_changed_cb (TpsipMediaStream *stream,
+priv_stream_state_changed_cb (RakiaMediaStream *stream,
guint state,
- TpsipMediaChannel *channel)
+ RakiaMediaChannel *channel)
{
g_assert (TPSIP_IS_MEDIA_CHANNEL (channel));
tp_svc_channel_type_streamed_media_emit_stream_state_changed(
channel,
- tpsip_media_stream_get_id (stream), state);
+ rakia_media_stream_get_id (stream), state);
}
static void
-priv_stream_direction_changed_cb (TpsipMediaStream *stream,
+priv_stream_direction_changed_cb (RakiaMediaStream *stream,
guint direction,
guint pending_send_flags,
- TpsipMediaChannel *channel)
+ RakiaMediaChannel *channel)
{
g_assert (TPSIP_IS_MEDIA_CHANNEL (channel));
tp_svc_channel_type_streamed_media_emit_stream_direction_changed (
channel,
- tpsip_media_stream_get_id (stream), direction, pending_send_flags);
+ rakia_media_stream_get_id (stream), direction, pending_send_flags);
}
static void
-priv_stream_hold_state_cb (TpsipMediaStream *stream,
+priv_stream_hold_state_cb (RakiaMediaStream *stream,
GParamSpec *pspec,
- TpsipMediaSession *session)
+ RakiaMediaSession *session)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (session);
gboolean hold;
guint i;
@@ -2101,26 +2101,26 @@ priv_stream_hold_state_cb (TpsipMediaStream *stream,
}
static void
-priv_stream_unhold_failure_cb (TpsipMediaStream *stream,
- TpsipMediaSession *session)
+priv_stream_unhold_failure_cb (RakiaMediaStream *stream,
+ RakiaMediaSession *session)
{
priv_initiate_hold (session,
TRUE,
TP_LOCAL_HOLD_STATE_REASON_RESOURCE_NOT_AVAILABLE);
}
-TpsipMediaStream*
-tpsip_media_session_add_stream (TpsipMediaSession *self,
+RakiaMediaStream*
+rakia_media_session_add_stream (RakiaMediaSession *self,
guint media_type,
TpMediaStreamDirection direction,
gboolean created_locally)
{
- TpsipMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
- TpsipMediaStream *stream = NULL;
+ RakiaMediaSessionPrivate *priv = TPSIP_MEDIA_SESSION_GET_PRIVATE (self);
+ RakiaMediaStream *stream = NULL;
DEBUG ("enter");
- if (tpsip_media_session_supports_media_type (media_type)) {
+ if (rakia_media_session_supports_media_type (media_type)) {
guint stream_id;
gchar *object_path;
guint pending_send_flags;
@@ -2136,7 +2136,7 @@ tpsip_media_session_add_stream (TpsipMediaSession *self,
if (!created_locally)
direction &= ~TP_MEDIA_STREAM_DIRECTION_SEND;
- if (tpsip_media_session_is_local_hold_ongoing (self))
+ if (rakia_media_session_is_local_hold_ongoing (self))
direction &= ~TP_MEDIA_STREAM_DIRECTION_RECEIVE;
stream = g_object_new (TPSIP_TYPE_MEDIA_STREAM,
@@ -2212,7 +2212,7 @@ session_handler_iface_init (gpointer g_iface, gpointer iface_data)
TpSvcMediaSessionHandlerClass *klass = (TpSvcMediaSessionHandlerClass *)g_iface;
#define IMPLEMENT(x) tp_svc_media_session_handler_implement_##x (\
- klass, (tp_svc_media_session_handler_##x##_impl) tpsip_media_session_##x)
+ klass, (tp_svc_media_session_handler_##x##_impl) rakia_media_session_##x)
IMPLEMENT(error);
IMPLEMENT(ready);
#undef IMPLEMENT
@@ -2221,7 +2221,7 @@ session_handler_iface_init (gpointer g_iface, gpointer iface_data)
/* Checks if RTCP is not disabled with bandwidth modifiers
* as described in RFC 3556 */
gboolean
-tpsip_sdp_rtcp_bandwidth_throttled (const sdp_bandwidth_t *b)
+rakia_sdp_rtcp_bandwidth_throttled (const sdp_bandwidth_t *b)
{
const sdp_bandwidth_t *b_RS = NULL;
const sdp_bandwidth_t *b_RR = NULL;
diff --git a/tpsip/media-session.h b/rakia/media-session.h
index 8553fd6..158e23b 100644
--- a/tpsip/media-session.h
+++ b/rakia/media-session.h
@@ -1,5 +1,5 @@
/*
- * sip-media-session.h - Header for TpsipMediaSession
+ * sip-media-session.h - Header for RakiaMediaSession
* Copyright (C) 2005 Collabora Ltd.
* Copyright (C) 2005-2010 Nokia Corporation
*
@@ -21,7 +21,7 @@
#ifndef __TPSIP_MEDIA_SESSION_H__
#define __TPSIP_MEDIA_SESSION_H__
-#include <tpsip/media-stream.h>
+#include <rakia/media-stream.h>
#include <glib-object.h>
#include <telepathy-glib/handle.h>
@@ -39,97 +39,97 @@ typedef enum {
TPSIP_MEDIA_SESSION_STATE_REINVITE_RECEIVED,
TPSIP_MEDIA_SESSION_STATE_REINVITE_PENDING,
TPSIP_MEDIA_SESSION_STATE_ENDED
-} TpsipMediaSessionState;
+} RakiaMediaSessionState;
-typedef struct _TpsipMediaSession TpsipMediaSession;
-typedef struct _TpsipMediaSessionClass TpsipMediaSessionClass;
+typedef struct _RakiaMediaSession RakiaMediaSession;
+typedef struct _RakiaMediaSessionClass RakiaMediaSessionClass;
-struct _TpsipMediaSessionClass {
+struct _RakiaMediaSessionClass {
GObjectClass parent_class;
};
-struct _TpsipMediaSession {
+struct _RakiaMediaSession {
GObject parent;
};
-GType tpsip_media_session_get_type(void);
+GType rakia_media_session_get_type(void);
/* TYPE MACROS */
#define TPSIP_TYPE_MEDIA_SESSION \
- (tpsip_media_session_get_type())
+ (rakia_media_session_get_type())
#define TPSIP_MEDIA_SESSION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_MEDIA_SESSION, TpsipMediaSession))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_MEDIA_SESSION, RakiaMediaSession))
#define TPSIP_MEDIA_SESSION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_MEDIA_SESSION, TpsipMediaSessionClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_MEDIA_SESSION, RakiaMediaSessionClass))
#define TPSIP_IS_MEDIA_SESSION(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TPSIP_TYPE_MEDIA_SESSION))
#define TPSIP_IS_MEDIA_SESSION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), TPSIP_TYPE_MEDIA_SESSION))
#define TPSIP_MEDIA_SESSION_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_MEDIA_SESSION, TpsipMediaSessionClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_MEDIA_SESSION, RakiaMediaSessionClass))
/***********************************************************************
* Additional declarations (not based on generated templates)
***********************************************************************/
-TpHandle tpsip_media_session_get_peer (TpsipMediaSession *session);
-void tpsip_media_session_terminate (TpsipMediaSession *session);
-TpsipMediaSessionState tpsip_media_session_get_state (TpsipMediaSession *session);
-void tpsip_media_session_change_state (TpsipMediaSession *session,
- TpsipMediaSessionState new_state);
-gboolean tpsip_media_session_set_remote_media (TpsipMediaSession *chan,
+TpHandle rakia_media_session_get_peer (RakiaMediaSession *session);
+void rakia_media_session_terminate (RakiaMediaSession *session);
+RakiaMediaSessionState rakia_media_session_get_state (RakiaMediaSession *session);
+void rakia_media_session_change_state (RakiaMediaSession *session,
+ RakiaMediaSessionState new_state);
+gboolean rakia_media_session_set_remote_media (RakiaMediaSession *chan,
const sdp_session_t* r_sdp);
-TpsipMediaStream* tpsip_media_session_add_stream (TpsipMediaSession *self,
+RakiaMediaStream* rakia_media_session_add_stream (RakiaMediaSession *self,
guint media_type,
TpMediaStreamDirection direction,
gboolean created_locally);
-gboolean tpsip_media_session_request_streams (TpsipMediaSession *session,
+gboolean rakia_media_session_request_streams (RakiaMediaSession *session,
const GArray *media_types,
GPtrArray *ret,
GError **error);
-gboolean tpsip_media_session_remove_streams (TpsipMediaSession *session,
+gboolean rakia_media_session_remove_streams (RakiaMediaSession *session,
const GArray *stream_ids,
GError **error);
-void tpsip_media_session_list_streams (TpsipMediaSession *session,
+void rakia_media_session_list_streams (RakiaMediaSession *session,
GPtrArray *ret);
-gboolean tpsip_media_session_request_stream_direction (TpsipMediaSession *session,
+gboolean rakia_media_session_request_stream_direction (RakiaMediaSession *session,
guint stream_id,
guint direction,
GError **error);
-void tpsip_media_session_receive_invite (TpsipMediaSession *self);
-void tpsip_media_session_receive_reinvite (TpsipMediaSession *self);
-void tpsip_media_session_accept (TpsipMediaSession *self);
-void tpsip_media_session_respond (TpsipMediaSession *self,
+void rakia_media_session_receive_invite (RakiaMediaSession *self);
+void rakia_media_session_receive_reinvite (RakiaMediaSession *self);
+void rakia_media_session_accept (RakiaMediaSession *self);
+void rakia_media_session_respond (RakiaMediaSession *self,
gint status,
const char *message);
-gboolean tpsip_media_session_is_accepted (TpsipMediaSession *self);
-void tpsip_media_session_resolve_glare (TpsipMediaSession *self);
+gboolean rakia_media_session_is_accepted (RakiaMediaSession *self);
+void rakia_media_session_resolve_glare (RakiaMediaSession *self);
-TpLocalHoldState tpsip_media_session_get_hold_state (TpsipMediaSession *session);
-void tpsip_media_session_request_hold (TpsipMediaSession *session,
+TpLocalHoldState rakia_media_session_get_hold_state (RakiaMediaSession *session);
+void rakia_media_session_request_hold (RakiaMediaSession *session,
gboolean hold);
-gboolean tpsip_media_session_start_telephony_event (TpsipMediaSession *self,
+gboolean rakia_media_session_start_telephony_event (RakiaMediaSession *self,
guint stream_id,
guchar event,
GError **error);
-gboolean tpsip_media_session_stop_telephony_event (TpsipMediaSession *self,
+gboolean rakia_media_session_stop_telephony_event (RakiaMediaSession *self,
guint stream_id,
GError **error);
-gint tpsip_media_session_rate_native_transport (TpsipMediaSession *session,
+gint rakia_media_session_rate_native_transport (RakiaMediaSession *session,
const GValue *transport);
-gboolean tpsip_sdp_rtcp_bandwidth_throttled (const sdp_bandwidth_t *b);
+gboolean rakia_sdp_rtcp_bandwidth_throttled (const sdp_bandwidth_t *b);
-gchar * tpsip_sdp_get_string_attribute (const sdp_attribute_t *attrs,
+gchar * rakia_sdp_get_string_attribute (const sdp_attribute_t *attrs,
const char *name);
#ifdef ENABLE_DEBUG
-#define SESSION_DEBUG(s, ...) tpsip_media_session_debug (s, __VA_ARGS__)
+#define SESSION_DEBUG(s, ...) rakia_media_session_debug (s, __VA_ARGS__)
-void tpsip_media_session_debug (TpsipMediaSession *session,
+void rakia_media_session_debug (RakiaMediaSession *session,
const gchar *format, ...);
#else
diff --git a/tpsip/media-stream.c b/rakia/media-stream.c
index 70170b4..f8f659e 100644
--- a/tpsip/media-stream.c
+++ b/rakia/media-stream.c
@@ -1,5 +1,5 @@
/*
- * sip-media-stream.c - Source for TpsipMediaStream
+ * sip-media-stream.c - Source for RakiaMediaStream
* Copyright (C) 2006 Collabora Ltd.
* Copyright (C) 2006-2010 Nokia Corporation
* @author Kai Vehmanen <first.surname@nokia.com>
@@ -24,7 +24,7 @@
*/
#include "config.h"
-#include "tpsip/media-stream.h"
+#include "rakia/media-stream.h"
#include <dbus/dbus-glib.h>
#include <stdlib.h>
@@ -41,16 +41,16 @@
#include "config.h"
-#include <tpsip/codec-param-formats.h>
+#include <rakia/codec-param-formats.h>
-#include "tpsip/media-session.h"
+#include "rakia/media-session.h"
#include <sofia-sip/msg_parser.h>
#include "signals-marshal.h"
#define DEBUG_FLAG TPSIP_DEBUG_MEDIA
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
#define same_boolean(old, new) ((!(old)) == (!(new)))
@@ -58,8 +58,8 @@
static void stream_handler_iface_init (gpointer, gpointer);
-G_DEFINE_TYPE_WITH_CODE(TpsipMediaStream,
- tpsip_media_stream,
+G_DEFINE_TYPE_WITH_CODE(RakiaMediaStream,
+ rakia_media_stream,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_MEDIA_STREAM_HANDLER,
stream_handler_iface_init);
@@ -101,15 +101,15 @@ enum
LAST_PROPERTY
};
-static GPtrArray *tpsip_media_stream_relay_info_empty = NULL;
+static GPtrArray *rakia_media_stream_relay_info_empty = NULL;
/* private structure */
-typedef struct _TpsipMediaStreamPrivate TpsipMediaStreamPrivate;
+typedef struct _RakiaMediaStreamPrivate RakiaMediaStreamPrivate;
-struct _TpsipMediaStreamPrivate
+struct _RakiaMediaStreamPrivate
{
TpDBusDaemon *dbus_daemon;
- TpsipMediaSession *session; /* see gobj. prop. 'media-session' */
+ RakiaMediaSession *session; /* see gobj. prop. 'media-session' */
gchar *object_path; /* see gobj. prop. 'object-path' */
guint id; /* see gobj. prop. 'id' */
guint media_type; /* see gobj. prop. 'media-type' */
@@ -145,15 +145,15 @@ struct _TpsipMediaStreamPrivate
gboolean dispose_has_run;
};
-#define TPSIP_MEDIA_STREAM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_MEDIA_STREAM, TpsipMediaStreamPrivate))
+#define TPSIP_MEDIA_STREAM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_MEDIA_STREAM, RakiaMediaStreamPrivate))
-static void push_remote_codecs (TpsipMediaStream *stream);
-static void push_remote_candidates (TpsipMediaStream *stream);
-static void push_active_candidate_pair (TpsipMediaStream *stream);
-static void priv_update_sending (TpsipMediaStream *stream,
+static void push_remote_codecs (RakiaMediaStream *stream);
+static void push_remote_candidates (RakiaMediaStream *stream);
+static void push_active_candidate_pair (RakiaMediaStream *stream);
+static void priv_update_sending (RakiaMediaStream *stream,
TpMediaStreamDirection direction);
-static void priv_update_local_sdp(TpsipMediaStream *stream);
-static void priv_generate_sdp (TpsipMediaStream *stream);
+static void priv_update_local_sdp(RakiaMediaStream *stream);
+static void priv_generate_sdp (RakiaMediaStream *stream);
#if 0
#ifdef ENABLE_DEBUG
@@ -175,9 +175,9 @@ static const char *debug_tp_transports[] = {
***********************************************************************/
static void
-tpsip_media_stream_init (TpsipMediaStream *self)
+rakia_media_stream_init (RakiaMediaStream *self)
{
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
priv->playing = FALSE;
priv->sending = FALSE;
@@ -198,12 +198,12 @@ tpsip_media_stream_init (TpsipMediaStream *self)
}
static void
-tpsip_media_stream_constructed (GObject *obj)
+rakia_media_stream_constructed (GObject *obj)
{
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (
TPSIP_MEDIA_STREAM (obj));
GObjectClass *parent_object_class =
- G_OBJECT_CLASS (tpsip_media_stream_parent_class);
+ G_OBJECT_CLASS (rakia_media_stream_parent_class);
/* call base class method */
if (parent_object_class->constructed != NULL)
@@ -228,13 +228,13 @@ tpsip_media_stream_constructed (GObject *obj)
}
static void
-tpsip_media_stream_get_property (GObject *object,
+rakia_media_stream_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- TpsipMediaStream *stream = TPSIP_MEDIA_STREAM (object);
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (stream);
+ RakiaMediaStream *stream = TPSIP_MEDIA_STREAM (object);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (stream);
switch (property_id)
{
@@ -276,7 +276,7 @@ tpsip_media_stream_get_property (GObject *object,
g_object_get_property (G_OBJECT (priv->session), "stun-servers", value);
break;
case PROP_RELAY_INFO:
- g_value_set_static_boxed (value, tpsip_media_stream_relay_info_empty);
+ g_value_set_static_boxed (value, rakia_media_stream_relay_info_empty);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -284,13 +284,13 @@ tpsip_media_stream_get_property (GObject *object,
}
static void
-tpsip_media_stream_set_property (GObject *object,
+rakia_media_stream_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- TpsipMediaStream *stream = TPSIP_MEDIA_STREAM (object);
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (stream);
+ RakiaMediaStream *stream = TPSIP_MEDIA_STREAM (object);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (stream);
switch (property_id)
{
@@ -331,11 +331,11 @@ tpsip_media_stream_set_property (GObject *object,
}
}
-static void tpsip_media_stream_dispose (GObject *object);
-static void tpsip_media_stream_finalize (GObject *object);
+static void rakia_media_stream_dispose (GObject *object);
+static void rakia_media_stream_finalize (GObject *object);
static void
-tpsip_media_stream_class_init (TpsipMediaStreamClass *klass)
+rakia_media_stream_class_init (RakiaMediaStreamClass *klass)
{
static TpDBusPropertiesMixinPropImpl stream_handler_props[] = {
{ "CreatedLocally", "created-locally", NULL },
@@ -358,22 +358,22 @@ tpsip_media_stream_class_init (TpsipMediaStreamClass *klass)
GType stream_type = G_OBJECT_CLASS_TYPE (klass);
GParamSpec *param_spec;
- g_type_class_add_private (klass, sizeof (TpsipMediaStreamPrivate));
+ g_type_class_add_private (klass, sizeof (RakiaMediaStreamPrivate));
- object_class->constructed = tpsip_media_stream_constructed;
+ object_class->constructed = rakia_media_stream_constructed;
- object_class->get_property = tpsip_media_stream_get_property;
- object_class->set_property = tpsip_media_stream_set_property;
+ object_class->get_property = rakia_media_stream_get_property;
+ object_class->set_property = rakia_media_stream_set_property;
- object_class->dispose = tpsip_media_stream_dispose;
- object_class->finalize = tpsip_media_stream_finalize;
+ object_class->dispose = rakia_media_stream_dispose;
+ object_class->finalize = rakia_media_stream_finalize;
param_spec = g_param_spec_object ("dbus-daemon", "TpDBusDaemon",
"Connection to D-Bus.", TP_TYPE_DBUS_DAEMON,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_DBUS_DAEMON, param_spec);
- param_spec = g_param_spec_object ("media-session", "TpsipMediaSession object",
+ param_spec = g_param_spec_object ("media-session", "RakiaMediaSession object",
"SIP media session object that owns this media stream object.",
TPSIP_TYPE_MEDIA_SESSION,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -407,7 +407,7 @@ tpsip_media_stream_class_init (TpsipMediaStreamClass *klass)
g_object_class_install_property (object_class, PROP_STATE, param_spec);
/* We don't change the following two as individual properties
- * after construction, use tpsip_media_stream_set_direction() */
+ * after construction, use rakia_media_stream_set_direction() */
param_spec = g_param_spec_uint ("direction", "Stream direction",
"A value indicating the current direction of the stream",
@@ -458,7 +458,7 @@ tpsip_media_stream_class_init (TpsipMediaStreamClass *klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_RELAY_INFO, param_spec);
- tpsip_media_stream_relay_info_empty = g_ptr_array_new ();
+ rakia_media_stream_relay_info_empty = g_ptr_array_new ();
/* signals not exported by DBus interface */
signals[SIG_READY] =
@@ -494,7 +494,7 @@ tpsip_media_stream_class_init (TpsipMediaStreamClass *klass)
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
NULL, NULL,
- _tpsip_marshal_VOID__UINT_UINT,
+ _rakia_marshal_VOID__UINT_UINT,
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
signals[SIG_LOCAL_MEDIA_UPDATED] =
@@ -517,14 +517,14 @@ tpsip_media_stream_class_init (TpsipMediaStreamClass *klass)
klass->dbus_props_class.interfaces = prop_interfaces;
tp_dbus_properties_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpsipMediaStreamClass, dbus_props_class));
+ G_STRUCT_OFFSET (RakiaMediaStreamClass, dbus_props_class));
}
void
-tpsip_media_stream_dispose (GObject *object)
+rakia_media_stream_dispose (GObject *object)
{
- TpsipMediaStream *self = TPSIP_MEDIA_STREAM (object);
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
+ RakiaMediaStream *self = TPSIP_MEDIA_STREAM (object);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
if (priv->dispose_has_run)
return;
@@ -533,17 +533,17 @@ tpsip_media_stream_dispose (GObject *object)
tp_clear_object (&priv->dbus_daemon);
- if (G_OBJECT_CLASS (tpsip_media_stream_parent_class)->dispose)
- G_OBJECT_CLASS (tpsip_media_stream_parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (rakia_media_stream_parent_class)->dispose)
+ G_OBJECT_CLASS (rakia_media_stream_parent_class)->dispose (object);
DEBUG ("exit");
}
void
-tpsip_media_stream_finalize (GObject *object)
+rakia_media_stream_finalize (GObject *object)
{
- TpsipMediaStream *self = TPSIP_MEDIA_STREAM (object);
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
+ RakiaMediaStream *self = TPSIP_MEDIA_STREAM (object);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
/* free any data held directly by the object here */
g_free (priv->object_path);
@@ -555,7 +555,7 @@ tpsip_media_stream_finalize (GObject *object)
g_free (priv->native_candidate_id);
g_free (priv->remote_candidate_id);
- G_OBJECT_CLASS (tpsip_media_stream_parent_class)->finalize (object);
+ G_OBJECT_CLASS (rakia_media_stream_parent_class)->finalize (object);
DEBUG ("exit");
}
@@ -565,13 +565,13 @@ tpsip_media_stream_finalize (GObject *object)
***********************************************************************/
/**
- * tpsip_media_stream_codec_choice
+ * rakia_media_stream_codec_choice
*
* Implements DBus method CodecChoice
* on interface org.freedesktop.Telepathy.Media.StreamHandler
*/
static void
-tpsip_media_stream_codec_choice (TpSvcMediaStreamHandler *iface,
+rakia_media_stream_codec_choice (TpSvcMediaStreamHandler *iface,
guint codec_id,
DBusGMethodInvocation *context)
{
@@ -584,40 +584,40 @@ tpsip_media_stream_codec_choice (TpSvcMediaStreamHandler *iface,
}
/**
- * tpsip_media_stream_error
+ * rakia_media_stream_error
*
* Implements DBus method Error
* on interface org.freedesktop.Telepathy.Media.StreamHandler
*/
static void
-tpsip_media_stream_error (TpSvcMediaStreamHandler *iface,
+rakia_media_stream_error (TpSvcMediaStreamHandler *iface,
guint errno,
const gchar *message,
DBusGMethodInvocation *context)
{
DEBUG("StreamHandler.Error called: %u %s", errno, message);
- tpsip_media_stream_close (TPSIP_MEDIA_STREAM (iface));
+ rakia_media_stream_close (TPSIP_MEDIA_STREAM (iface));
tp_svc_media_stream_handler_return_from_error (context);
}
/**
- * tpsip_media_stream_native_candidates_prepared
+ * rakia_media_stream_native_candidates_prepared
*
* Implements DBus method NativeCandidatesPrepared
* on interface org.freedesktop.Telepathy.Media.StreamHandler
*/
static void
-tpsip_media_stream_native_candidates_prepared (TpSvcMediaStreamHandler *iface,
+rakia_media_stream_native_candidates_prepared (TpSvcMediaStreamHandler *iface,
DBusGMethodInvocation *context)
{
/* purpose: "Informs the connection manager that all possible native candisates
* have been discovered for the moment."
*/
- TpsipMediaStream *obj = TPSIP_MEDIA_STREAM (iface);
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStream *obj = TPSIP_MEDIA_STREAM (iface);
+ RakiaMediaStreamPrivate *priv;
priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (obj);
@@ -635,19 +635,19 @@ tpsip_media_stream_native_candidates_prepared (TpSvcMediaStreamHandler *iface,
/**
- * tpsip_media_stream_new_active_candidate_pair
+ * rakia_media_stream_new_active_candidate_pair
*
* Implements DBus method NewActiveCandidatePair
* on interface org.freedesktop.Telepathy.Media.StreamHandler
*/
static void
-tpsip_media_stream_new_active_candidate_pair (TpSvcMediaStreamHandler *iface,
+rakia_media_stream_new_active_candidate_pair (TpSvcMediaStreamHandler *iface,
const gchar *native_candidate_id,
const gchar *remote_candidate_id,
DBusGMethodInvocation *context)
{
- TpsipMediaStream *obj = TPSIP_MEDIA_STREAM (iface);
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStream *obj = TPSIP_MEDIA_STREAM (iface);
+ RakiaMediaStreamPrivate *priv;
priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (obj);
@@ -672,19 +672,19 @@ tpsip_media_stream_new_active_candidate_pair (TpSvcMediaStreamHandler *iface,
/**
- * tpsip_media_stream_new_native_candidate
+ * rakia_media_stream_new_native_candidate
*
* Implements DBus method NewNativeCandidate
* on interface org.freedesktop.Telepathy.Media.StreamHandler
*/
static void
-tpsip_media_stream_new_native_candidate (TpSvcMediaStreamHandler *iface,
+rakia_media_stream_new_native_candidate (TpSvcMediaStreamHandler *iface,
const gchar *candidate_id,
const GPtrArray *transports,
DBusGMethodInvocation *context)
{
- TpsipMediaStream *obj = TPSIP_MEDIA_STREAM (iface);
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStream *obj = TPSIP_MEDIA_STREAM (iface);
+ RakiaMediaStreamPrivate *priv;
GPtrArray *candidates;
GValue candidate = { 0, };
GValue transport = { 0, };
@@ -704,7 +704,7 @@ tpsip_media_stream_new_native_candidate (TpSvcMediaStreamHandler *iface,
/* Rate the preferability of the address */
g_value_init (&transport, TP_STRUCT_TYPE_MEDIA_STREAM_HANDLER_TRANSPORT);
g_value_set_static_boxed (&transport, g_ptr_array_index (transports, 0));
- tr_goodness = tpsip_media_session_rate_native_transport (priv->session,
+ tr_goodness = rakia_media_session_rate_native_transport (priv->session,
&transport);
candidates = g_value_get_boxed (&priv->native_candidates);
@@ -739,10 +739,10 @@ tpsip_media_stream_new_native_candidate (TpSvcMediaStreamHandler *iface,
}
static void
-priv_set_local_codecs (TpsipMediaStream *self,
+priv_set_local_codecs (RakiaMediaStream *self,
const GPtrArray *codecs)
{
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
GValue val = { 0, };
SESSION_DEBUG(priv->session, "putting list of %d locally supported "
@@ -757,12 +757,12 @@ priv_set_local_codecs (TpsipMediaStream *self,
}
static void
-tpsip_media_stream_codecs_updated (TpSvcMediaStreamHandler *iface,
+rakia_media_stream_codecs_updated (TpSvcMediaStreamHandler *iface,
const GPtrArray *codecs,
DBusGMethodInvocation *context)
{
- TpsipMediaStream *self = TPSIP_MEDIA_STREAM (iface);
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
+ RakiaMediaStream *self = TPSIP_MEDIA_STREAM (iface);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
if (!priv->native_codecs_prepared)
{
@@ -796,13 +796,13 @@ tpsip_media_stream_codecs_updated (TpSvcMediaStreamHandler *iface,
}
/**
- * tpsip_media_stream_ready
+ * rakia_media_stream_ready
*
* Implements DBus method Ready
* on interface org.freedesktop.Telepathy.Media.StreamHandler
*/
static void
-tpsip_media_stream_ready (TpSvcMediaStreamHandler *iface,
+rakia_media_stream_ready (TpSvcMediaStreamHandler *iface,
const GPtrArray *codecs,
DBusGMethodInvocation *context)
{
@@ -814,8 +814,8 @@ tpsip_media_stream_ready (TpSvcMediaStreamHandler *iface,
* candidates first
*/
- TpsipMediaStream *obj = TPSIP_MEDIA_STREAM (iface);
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStream *obj = TPSIP_MEDIA_STREAM (iface);
+ RakiaMediaStreamPrivate *priv;
DEBUG ("enter");
@@ -862,7 +862,7 @@ tpsip_media_stream_ready (TpSvcMediaStreamHandler *iface,
}
static void
-tpsip_media_stream_set_local_codecs (TpSvcMediaStreamHandler *iface,
+rakia_media_stream_set_local_codecs (TpSvcMediaStreamHandler *iface,
const GPtrArray *codecs,
DBusGMethodInvocation *context)
{
@@ -871,13 +871,13 @@ tpsip_media_stream_set_local_codecs (TpSvcMediaStreamHandler *iface,
}
/**
- * tpsip_media_stream_stream_state
+ * rakia_media_stream_stream_state
*
* Implements DBus method StreamState
* on interface org.freedesktop.Telepathy.Media.StreamHandler
*/
static void
-tpsip_media_stream_stream_state (TpSvcMediaStreamHandler *iface,
+rakia_media_stream_stream_state (TpSvcMediaStreamHandler *iface,
guint state,
DBusGMethodInvocation *context)
{
@@ -887,8 +887,8 @@ tpsip_media_stream_stream_state (TpSvcMediaStreamHandler *iface,
* - set the stream state for session
*/
- TpsipMediaStream *obj = TPSIP_MEDIA_STREAM (iface);
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStream *obj = TPSIP_MEDIA_STREAM (iface);
+ RakiaMediaStreamPrivate *priv;
priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (obj);
if (priv->state != state)
@@ -902,13 +902,13 @@ tpsip_media_stream_stream_state (TpSvcMediaStreamHandler *iface,
}
/**
- * tpsip_media_stream_supported_codecs
+ * rakia_media_stream_supported_codecs
*
* Implements DBus method SupportedCodecs
* on interface org.freedesktop.Telepathy.Media.StreamHandler
*/
static void
-tpsip_media_stream_supported_codecs (TpSvcMediaStreamHandler *iface,
+rakia_media_stream_supported_codecs (TpSvcMediaStreamHandler *iface,
const GPtrArray *codecs,
DBusGMethodInvocation *context)
{
@@ -921,8 +921,8 @@ tpsip_media_stream_supported_codecs (TpSvcMediaStreamHandler *iface,
* - emit SupportedCodecs
*/
- TpsipMediaStream *self = TPSIP_MEDIA_STREAM (iface);
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStream *self = TPSIP_MEDIA_STREAM (iface);
+ RakiaMediaStreamPrivate *priv;
priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
DEBUG("got codec intersection containing %u codecs from stream-engine",
@@ -955,7 +955,7 @@ tpsip_media_stream_supported_codecs (TpSvcMediaStreamHandler *iface,
}
static void
-tpsip_media_stream_hold_state (TpSvcMediaStreamHandler *self,
+rakia_media_stream_hold_state (TpSvcMediaStreamHandler *self,
gboolean held,
DBusGMethodInvocation *context)
{
@@ -964,7 +964,7 @@ tpsip_media_stream_hold_state (TpSvcMediaStreamHandler *self,
}
static void
-tpsip_media_stream_unhold_failure (TpSvcMediaStreamHandler *self,
+rakia_media_stream_unhold_failure (TpSvcMediaStreamHandler *self,
DBusGMethodInvocation *context)
{
/* Not doing anything to hold_state or requested_hold_state,
@@ -980,21 +980,21 @@ tpsip_media_stream_unhold_failure (TpSvcMediaStreamHandler *self,
***********************************************************************/
guint
-tpsip_media_stream_get_id (TpsipMediaStream *self)
+rakia_media_stream_get_id (RakiaMediaStream *self)
{
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
return priv->id;
}
guint
-tpsip_media_stream_get_media_type (TpsipMediaStream *self)
+rakia_media_stream_get_media_type (RakiaMediaStream *self)
{
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
return priv->media_type;
}
void
-tpsip_media_stream_close (TpsipMediaStream *self)
+rakia_media_stream_close (RakiaMediaStream *self)
{
tp_svc_media_stream_handler_emit_close (self);
}
@@ -1003,15 +1003,15 @@ tpsip_media_stream_close (TpsipMediaStream *self)
* Described the local stream configuration in SDP (RFC2327),
* or NULL if stream not configured yet.
*/
-const char *tpsip_media_stream_local_sdp (TpsipMediaStream *obj)
+const char *rakia_media_stream_local_sdp (RakiaMediaStream *obj)
{
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStreamPrivate *priv;
priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (obj);
return priv->stream_sdp;
}
TpMediaStreamDirection
-tpsip_media_stream_direction_from_remote_media (const sdp_media_t *media)
+rakia_media_stream_direction_from_remote_media (const sdp_media_t *media)
{
sdp_mode_t mode = media->m_mode;
return ((mode & sdp_recvonly)? TP_MEDIA_STREAM_DIRECTION_SEND : 0)
@@ -1019,7 +1019,7 @@ tpsip_media_stream_direction_from_remote_media (const sdp_media_t *media)
}
static gboolean
-tpsip_sdp_codecs_differ (const sdp_rtpmap_t *m1, const sdp_rtpmap_t *m2)
+rakia_sdp_codecs_differ (const sdp_rtpmap_t *m1, const sdp_rtpmap_t *m2)
{
while (m1 != NULL && m2 != NULL)
{
@@ -1036,7 +1036,7 @@ tpsip_sdp_codecs_differ (const sdp_rtpmap_t *m1, const sdp_rtpmap_t *m2)
* direction change.
*/
static TpMediaStreamDirection
-priv_get_requested_direction (TpsipMediaStreamPrivate *priv)
+priv_get_requested_direction (RakiaMediaStreamPrivate *priv)
{
TpMediaStreamDirection direction;
@@ -1062,12 +1062,12 @@ priv_get_requested_direction (TpsipMediaStreamPrivate *priv)
* FALSE if the update is not acceptable.
*/
gboolean
-tpsip_media_stream_set_remote_media (TpsipMediaStream *stream,
+rakia_media_stream_set_remote_media (RakiaMediaStream *stream,
const sdp_media_t *new_media,
guint direction_up_mask,
guint pending_send_mask)
{
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStreamPrivate *priv;
sdp_connection_t *sdp_conn;
const sdp_media_t *old_media;
gboolean transport_changed = TRUE;
@@ -1122,7 +1122,7 @@ tpsip_media_stream_set_remote_media (TpsipMediaStream *stream,
}
old_direction = priv_get_requested_direction (priv);
- new_direction = tpsip_media_stream_direction_from_remote_media (new_media);
+ new_direction = rakia_media_stream_direction_from_remote_media (new_media);
/* Make sure the peer can only enable sending or receiving direction
* if it's allowed to */
@@ -1135,7 +1135,7 @@ tpsip_media_stream_set_remote_media (TpsipMediaStream *stream,
transport_changed = FALSE;
/* Check if the codec list needs to be updated */
- codecs_changed = tpsip_sdp_codecs_differ (old_media->m_rtpmaps,
+ codecs_changed = rakia_sdp_codecs_differ (old_media->m_rtpmaps,
new_media->m_rtpmaps);
/* Disable sending at this point if it will be disabled
@@ -1153,7 +1153,7 @@ tpsip_media_stream_set_remote_media (TpsipMediaStream *stream,
/* Make sure we stop sending before we use the new set of codecs
* intended for the new connection */
if (codecs_changed)
- tpsip_media_stream_set_sending (stream, FALSE);
+ rakia_media_stream_set_sending (stream, FALSE);
push_remote_candidates (stream);
}
@@ -1179,7 +1179,7 @@ tpsip_media_stream_set_remote_media (TpsipMediaStream *stream,
push_active_candidate_pair (stream);
/* Set the final direction and update pending send flags */
- tpsip_media_stream_set_direction (stream,
+ rakia_media_stream_set_direction (stream,
new_direction,
pending_send_mask);
@@ -1193,7 +1193,7 @@ tpsip_media_stream_set_remote_media (TpsipMediaStream *stream,
* @return G_MAXUINT if the media type cannot be mapped
*/
guint
-tpsip_tp_media_type (sdp_media_e sip_mtype)
+rakia_tp_media_type (sdp_media_e sip_mtype)
{
switch (sip_mtype)
{
@@ -1207,9 +1207,9 @@ tpsip_tp_media_type (sdp_media_e sip_mtype)
* Sets the media state to playing or non-playing. When not playing,
* received RTP packets may not be played locally.
*/
-void tpsip_media_stream_set_playing (TpsipMediaStream *stream, gboolean playing)
+void rakia_media_stream_set_playing (RakiaMediaStream *stream, gboolean playing)
{
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStreamPrivate *priv;
priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (stream);
if (same_boolean (priv->playing, playing))
@@ -1229,9 +1229,9 @@ void tpsip_media_stream_set_playing (TpsipMediaStream *stream, gboolean playing)
* captured media are not sent over the network.
*/
void
-tpsip_media_stream_set_sending (TpsipMediaStream *stream, gboolean sending)
+rakia_media_stream_set_sending (RakiaMediaStream *stream, gboolean sending)
{
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStreamPrivate *priv;
priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (stream);
if (same_boolean(priv->sending, sending))
@@ -1247,10 +1247,10 @@ tpsip_media_stream_set_sending (TpsipMediaStream *stream, gboolean sending)
}
static void
-priv_update_sending (TpsipMediaStream *stream,
+priv_update_sending (RakiaMediaStream *stream,
TpMediaStreamDirection direction)
{
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (stream);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (stream);
gboolean sending = TRUE;
/* XXX: the pending send flag check is probably an overkill
@@ -1259,20 +1259,20 @@ priv_update_sending (TpsipMediaStream *stream,
if ((direction & TP_MEDIA_STREAM_DIRECTION_SEND) == 0
|| priv->pending_remote_receive
|| (priv->pending_send_flags & TP_MEDIA_STREAM_PENDING_LOCAL_SEND) != 0
- || !tpsip_media_session_is_accepted (priv->session))
+ || !rakia_media_session_is_accepted (priv->session))
{
sending = FALSE;
}
- tpsip_media_stream_set_sending (stream, sending);
+ rakia_media_stream_set_sending (stream, sending);
}
void
-tpsip_media_stream_set_direction (TpsipMediaStream *stream,
+rakia_media_stream_set_direction (RakiaMediaStream *stream,
TpMediaStreamDirection direction,
guint pending_send_mask)
{
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStreamPrivate *priv;
guint pending_send_flags;
TpMediaStreamDirection old_sdp_direction;
@@ -1343,10 +1343,10 @@ tpsip_media_stream_set_direction (TpsipMediaStream *stream,
* also start sending if agreed by the stream direction.
*/
void
-tpsip_media_stream_apply_pending_direction (TpsipMediaStream *stream,
+rakia_media_stream_apply_pending_direction (RakiaMediaStream *stream,
guint pending_send_mask)
{
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (stream);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (stream);
guint flags;
@@ -1380,7 +1380,7 @@ tpsip_media_stream_apply_pending_direction (TpsipMediaStream *stream,
}
TpMediaStreamDirection
-tpsip_media_stream_get_requested_direction (TpsipMediaStream *self)
+rakia_media_stream_get_requested_direction (RakiaMediaStream *self)
{
return priv_get_requested_direction (TPSIP_MEDIA_STREAM_GET_PRIVATE (self));
}
@@ -1389,39 +1389,39 @@ tpsip_media_stream_get_requested_direction (TpsipMediaStream *self)
* Returns true if the stream has a valid SDP description and
* connection has been established with the stream engine.
*/
-gboolean tpsip_media_stream_is_local_ready (TpsipMediaStream *self)
+gboolean rakia_media_stream_is_local_ready (RakiaMediaStream *self)
{
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStreamPrivate *priv;
priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
g_assert (priv->stream_sdp == NULL || priv->ready_received);
return (priv->stream_sdp != NULL);
}
gboolean
-tpsip_media_stream_is_codec_intersect_pending (TpsipMediaStream *self)
+rakia_media_stream_is_codec_intersect_pending (RakiaMediaStream *self)
{
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
return priv->codec_intersect_pending;
}
void
-tpsip_media_stream_start_telephony_event (TpsipMediaStream *self, guchar event)
+rakia_media_stream_start_telephony_event (RakiaMediaStream *self, guchar event)
{
tp_svc_media_stream_handler_emit_start_telephony_event (
(TpSvcMediaStreamHandler *)self, event);
}
void
-tpsip_media_stream_stop_telephony_event (TpsipMediaStream *self)
+rakia_media_stream_stop_telephony_event (RakiaMediaStream *self)
{
tp_svc_media_stream_handler_emit_stop_telephony_event (
(TpSvcMediaStreamHandler *)self);
}
gboolean
-tpsip_media_stream_request_hold_state (TpsipMediaStream *self, gboolean hold)
+rakia_media_stream_request_hold_state (RakiaMediaStream *self, gboolean hold)
{
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
if ((!priv->requested_hold_state) != (!hold))
{
@@ -1433,9 +1433,9 @@ tpsip_media_stream_request_hold_state (TpsipMediaStream *self, gboolean hold)
}
static void
-priv_generate_sdp (TpsipMediaStream *self)
+priv_generate_sdp (RakiaMediaStream *self)
{
- TpsipMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
+ RakiaMediaStreamPrivate *priv = TPSIP_MEDIA_STREAM_GET_PRIVATE (self);
if (priv->stream_sdp != NULL)
return;
@@ -1452,9 +1452,9 @@ priv_generate_sdp (TpsipMediaStream *self)
*
* @pre Ready signal must be receiveid (priv->ready_received)
*/
-static void push_remote_codecs (TpsipMediaStream *stream)
+static void push_remote_codecs (RakiaMediaStream *stream)
{
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStreamPrivate *priv;
GPtrArray *codecs;
GHashTable *opt_params;
GType codecs_type;
@@ -1482,14 +1482,14 @@ static void push_remote_codecs (TpsipMediaStream *stream)
return;
}
- ptime = tpsip_sdp_get_string_attribute (sdpmedia->m_attributes, "ptime");
+ ptime = rakia_sdp_get_string_attribute (sdpmedia->m_attributes, "ptime");
if (ptime == NULL)
{
g_object_get (priv->session,
"remote-ptime", &ptime,
NULL);
}
- max_ptime = tpsip_sdp_get_string_attribute (sdpmedia->m_attributes, "maxptime");
+ max_ptime = rakia_sdp_get_string_attribute (sdpmedia->m_attributes, "maxptime");
if (max_ptime == NULL)
{
g_object_get (priv->session,
@@ -1522,7 +1522,7 @@ static void push_remote_codecs (TpsipMediaStream *stream)
g_hash_table_insert (opt_params,
g_strdup("maxptime"), g_strdup (max_ptime));
- tpsip_codec_param_parse (priv->media_type, rtpmap->rm_encoding,
+ rakia_codec_param_parse (priv->media_type, rtpmap->rm_encoding,
rtpmap->rm_fmtp, opt_params);
/* RFC2327: see "m=" line definition
@@ -1564,9 +1564,9 @@ static void push_remote_codecs (TpsipMediaStream *stream)
g_boxed_free (codecs_type, codecs);
}
-static void push_remote_candidates (TpsipMediaStream *stream)
+static void push_remote_candidates (RakiaMediaStream *stream)
{
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStreamPrivate *priv;
GValue candidate = { 0 };
GValue transport = { 0 };
GValue transport_rtcp = { 0 };
@@ -1629,7 +1629,7 @@ static void push_remote_candidates (TpsipMediaStream *stream)
DEBUG("remote RTP address=<%s>, port=<%u>", sdp_conn->c_address, port);
g_ptr_array_add (transports, g_value_get_boxed (&transport));
- if (!tpsip_sdp_rtcp_bandwidth_throttled (media->m_bandwidths))
+ if (!rakia_sdp_rtcp_bandwidth_throttled (media->m_bandwidths))
{
gboolean session_rtcp_enabled = TRUE;
g_object_get (priv->session,
@@ -1708,9 +1708,9 @@ static void push_remote_candidates (TpsipMediaStream *stream)
}
static void
-push_active_candidate_pair (TpsipMediaStream *stream)
+push_active_candidate_pair (RakiaMediaStream *stream)
{
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStreamPrivate *priv;
DEBUG("enter");
@@ -1784,7 +1784,7 @@ priv_append_rtpmaps (const GPtrArray *codecs, GString *mline, GString *alines)
GString *fmtp_value;
g_string_append_printf (alines, "a=fmtp:%u ", co_id);
fmtp_value = g_string_new (NULL);
- tpsip_codec_param_format (co_type, co_name,
+ rakia_codec_param_format (co_type, co_name,
co_params, fmtp_value);
g_string_append (alines, fmtp_value->str);
g_string_free (fmtp_value, TRUE);
@@ -1806,9 +1806,9 @@ priv_append_rtpmaps (const GPtrArray *codecs, GString *mline, GString *alines)
* object, state.
*/
static void
-priv_update_local_sdp(TpsipMediaStream *stream)
+priv_update_local_sdp(RakiaMediaStream *stream)
{
- TpsipMediaStreamPrivate *priv;
+ RakiaMediaStreamPrivate *priv;
GString *mline;
GString *alines;
gchar *cline;
@@ -1985,7 +1985,7 @@ stream_handler_iface_init (gpointer g_iface, gpointer iface_data)
TpSvcMediaStreamHandlerClass *klass = (TpSvcMediaStreamHandlerClass *)g_iface;
#define IMPLEMENT(x) tp_svc_media_stream_handler_implement_##x (\
- klass, (tp_svc_media_stream_handler_##x##_impl) tpsip_media_stream_##x)
+ klass, (tp_svc_media_stream_handler_##x##_impl) rakia_media_stream_##x)
IMPLEMENT(codec_choice);
IMPLEMENT(error);
IMPLEMENT(native_candidates_prepared);
diff --git a/tpsip/media-stream.h b/rakia/media-stream.h
index f1fc032..0e09a42 100644
--- a/tpsip/media-stream.h
+++ b/rakia/media-stream.h
@@ -1,5 +1,5 @@
/*
- * sip-media-stream.h - Header for TpsipMediaStream
+ * sip-media-stream.h - Header for RakiaMediaStream
* Copyright (C) 2005 Collabora Ltd.
* Copyright (C) 2005-2010 Nokia Corporation
*
@@ -28,63 +28,63 @@
G_BEGIN_DECLS
-typedef struct _TpsipMediaStream TpsipMediaStream;
-typedef struct _TpsipMediaStreamClass TpsipMediaStreamClass;
+typedef struct _RakiaMediaStream RakiaMediaStream;
+typedef struct _RakiaMediaStreamClass RakiaMediaStreamClass;
-struct _TpsipMediaStreamClass {
+struct _RakiaMediaStreamClass {
GObjectClass parent_class;
TpDBusPropertiesMixinClass dbus_props_class;
};
-struct _TpsipMediaStream {
+struct _RakiaMediaStream {
GObject parent;
};
-GType tpsip_media_stream_get_type(void);
+GType rakia_media_stream_get_type(void);
/* TYPE MACROS */
#define TPSIP_TYPE_MEDIA_STREAM \
- (tpsip_media_stream_get_type())
+ (rakia_media_stream_get_type())
#define TPSIP_MEDIA_STREAM(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_MEDIA_STREAM, TpsipMediaStream))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_MEDIA_STREAM, RakiaMediaStream))
#define TPSIP_MEDIA_STREAM_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_MEDIA_STREAM, TpsipMediaStreamClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_MEDIA_STREAM, RakiaMediaStreamClass))
#define TPSIP_IS_MEDIA_STREAM(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TPSIP_TYPE_MEDIA_STREAM))
#define TPSIP_IS_MEDIA_STREAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), TPSIP_TYPE_MEDIA_STREAM))
#define TPSIP_MEDIA_STREAM_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_MEDIA_STREAM, TpsipMediaStreamClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_MEDIA_STREAM, RakiaMediaStreamClass))
/***********************************************************************
* Additional declarations (not based on generated templates)
***********************************************************************/
-void tpsip_media_stream_close (TpsipMediaStream *self);
-guint tpsip_media_stream_get_id (TpsipMediaStream *self);
-guint tpsip_media_stream_get_media_type (TpsipMediaStream *self);
-const char *tpsip_media_stream_local_sdp (TpsipMediaStream *self);
-gboolean tpsip_media_stream_set_remote_media (TpsipMediaStream *self,
+void rakia_media_stream_close (RakiaMediaStream *self);
+guint rakia_media_stream_get_id (RakiaMediaStream *self);
+guint rakia_media_stream_get_media_type (RakiaMediaStream *self);
+const char *rakia_media_stream_local_sdp (RakiaMediaStream *self);
+gboolean rakia_media_stream_set_remote_media (RakiaMediaStream *self,
const sdp_media_t *media,
guint direction_up_mask,
guint pending_send_mask);
-void tpsip_media_stream_set_playing (TpsipMediaStream *self, gboolean playing);
-void tpsip_media_stream_set_sending (TpsipMediaStream *self, gboolean sending);
-void tpsip_media_stream_set_direction (TpsipMediaStream *stream,
+void rakia_media_stream_set_playing (RakiaMediaStream *self, gboolean playing);
+void rakia_media_stream_set_sending (RakiaMediaStream *self, gboolean sending);
+void rakia_media_stream_set_direction (RakiaMediaStream *stream,
TpMediaStreamDirection direction,
guint pending_send_mask);
-void tpsip_media_stream_apply_pending_direction (TpsipMediaStream *stream,
+void rakia_media_stream_apply_pending_direction (RakiaMediaStream *stream,
guint pending_send_mask);
-TpMediaStreamDirection tpsip_media_stream_get_requested_direction (TpsipMediaStream *self);
-gboolean tpsip_media_stream_is_local_ready (TpsipMediaStream *self);
-gboolean tpsip_media_stream_is_codec_intersect_pending (TpsipMediaStream *self);
-void tpsip_media_stream_start_telephony_event (TpsipMediaStream *self, guchar event);
-void tpsip_media_stream_stop_telephony_event (TpsipMediaStream *self);
-gboolean tpsip_media_stream_request_hold_state (TpsipMediaStream *self,
+TpMediaStreamDirection rakia_media_stream_get_requested_direction (RakiaMediaStream *self);
+gboolean rakia_media_stream_is_local_ready (RakiaMediaStream *self);
+gboolean rakia_media_stream_is_codec_intersect_pending (RakiaMediaStream *self);
+void rakia_media_stream_start_telephony_event (RakiaMediaStream *self, guchar event);
+void rakia_media_stream_stop_telephony_event (RakiaMediaStream *self);
+gboolean rakia_media_stream_request_hold_state (RakiaMediaStream *self,
gboolean hold);
-guint tpsip_tp_media_type (sdp_media_e sip_mtype);
-TpMediaStreamDirection tpsip_media_stream_direction_from_remote_media (
+guint rakia_tp_media_type (sdp_media_e sip_mtype);
+TpMediaStreamDirection rakia_media_stream_direction_from_remote_media (
const sdp_media_t *media);
G_END_DECLS
diff --git a/tpsip/signals-marshal.list b/rakia/signals-marshal.list
index ec706c4..ec706c4 100644
--- a/tpsip/signals-marshal.list
+++ b/rakia/signals-marshal.list
diff --git a/tpsip/sofia-decls.h b/rakia/sofia-decls.h
index d58b3fe..7f04e24 100644
--- a/tpsip/sofia-decls.h
+++ b/rakia/sofia-decls.h
@@ -22,21 +22,21 @@
#define _TPSIP_SOFIA_DECLS_H_
/* note: As one Sofia-SIP NUA instance is created per SIP connection,
- * TpsipConnection is used as the context pointer.
+ * RakiaConnection is used as the context pointer.
* See {top}/docs/design.txt for further information.
*
* Each NUA handle managed by Telepathy-SofiaSIP is bound to an object
- * implementing TpsipEventTarget. The managed NUA handle survives at
+ * implementing RakiaEventTarget. The managed NUA handle survives at
* least as long as the bound object. When the object is destroyed,
* the handle is bound to a special end-of-life event handler object.
* Thus, any NUA handle has either the magic value of NULL, or
* pointing to an event target object attached to this handle.
*/
-#define NUA_MAGIC_T struct _TpsipBaseConnection
-#define NUA_HMAGIC_T struct _TpsipEventTarget
-#define SU_ROOT_MAGIC_T struct _TpsipConnectionManager
-#define SU_TIMER_ARG_T struct _TpsipBaseConnection
+#define NUA_MAGIC_T struct _RakiaBaseConnection
+#define NUA_HMAGIC_T struct _RakiaEventTarget
+#define SU_ROOT_MAGIC_T struct _RakiaConnectionManager
+#define SU_TIMER_ARG_T struct _RakiaBaseConnection
#define SU_WAKEUP_ARG_T void
#define TPSIP_DEFAULT_STUN_PORT 3478
diff --git a/tpsip/text-channel.c b/rakia/text-channel.c
index 131f6ba..4d4bc8c 100644
--- a/tpsip/text-channel.c
+++ b/rakia/text-channel.c
@@ -1,5 +1,5 @@
/*
- * sip-text-channel.c - Source for TpsipTextChannel
+ * sip-text-channel.c - Source for RakiaTextChannel
* Copyright (C) 2005-2008 Collabora Ltd.
* Copyright (C) 2005-2009 Nokia Corporation
* @author Martti Mela <first.surname@nokia.com>
@@ -25,7 +25,7 @@
#include "config.h"
-#include "tpsip/text-channel.h"
+#include "rakia/text-channel.h"
#include <stdlib.h>
#include <string.h>
@@ -40,25 +40,25 @@
#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/svc-generic.h>
-#include "tpsip/event-target.h"
-#include "tpsip/base-connection.h"
+#include "rakia/event-target.h"
+#include "rakia/base-connection.h"
#include <sofia-sip/sip_protos.h>
#include <sofia-sip/sip_status.h>
#define DEBUG_FLAG TPSIP_DEBUG_IM
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
static gboolean
-tpsip_text_channel_nua_r_message_cb (TpsipTextChannel *self,
- const TpsipNuaEvent *ev,
+rakia_text_channel_nua_r_message_cb (RakiaTextChannel *self,
+ const RakiaNuaEvent *ev,
tagi_t tags[],
gpointer foo);
static void channel_iface_init (gpointer, gpointer);
static void destroyable_iface_init (gpointer, gpointer);
-G_DEFINE_TYPE_WITH_CODE (TpsipTextChannel, tpsip_text_channel, G_TYPE_OBJECT,
+G_DEFINE_TYPE_WITH_CODE (RakiaTextChannel, rakia_text_channel, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (TPSIP_TYPE_EVENT_TARGET, NULL);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
tp_dbus_properties_mixin_iface_init);
@@ -72,7 +72,7 @@ G_DEFINE_TYPE_WITH_CODE (TpsipTextChannel, tpsip_text_channel, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (TP_TYPE_EXPORTABLE_CHANNEL, NULL);
G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL));
-static const char *tpsip_text_channel_interfaces[] = {
+static const char *rakia_text_channel_interfaces[] = {
TP_IFACE_CHANNEL_INTERFACE_DESTROYABLE,
NULL
};
@@ -99,20 +99,20 @@ enum
/* private structures */
-typedef struct _TpsipTextPendingMessage TpsipTextPendingMessage;
+typedef struct _RakiaTextPendingMessage RakiaTextPendingMessage;
-struct _TpsipTextPendingMessage
+struct _RakiaTextPendingMessage
{
nua_handle_t *nh;
gchar *token;
TpMessageSendingFlags flags;
};
-typedef struct _TpsipTextChannelPrivate TpsipTextChannelPrivate;
+typedef struct _RakiaTextChannelPrivate RakiaTextChannelPrivate;
-struct _TpsipTextChannelPrivate
+struct _RakiaTextChannelPrivate
{
- TpsipBaseConnection *conn;
+ RakiaBaseConnection *conn;
gchar *object_path;
TpHandle handle;
TpHandle initiator;
@@ -126,12 +126,12 @@ struct _TpsipTextChannelPrivate
};
-#define _tpsip_text_pending_new0() \
- (g_slice_new0(TpsipTextPendingMessage))
+#define _rakia_text_pending_new0() \
+ (g_slice_new0(RakiaTextPendingMessage))
-#define TPSIP_TEXT_CHANNEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_TEXT_CHANNEL, TpsipTextChannelPrivate))
+#define TPSIP_TEXT_CHANNEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_TEXT_CHANNEL, RakiaTextChannelPrivate))
-static void tpsip_text_pending_free (TpsipTextPendingMessage *msg,
+static void rakia_text_pending_free (RakiaTextPendingMessage *msg,
TpHandleRepoIface *contact_handles)
{
if (msg->nh)
@@ -139,27 +139,27 @@ static void tpsip_text_pending_free (TpsipTextPendingMessage *msg,
g_free (msg->token);
- g_slice_free (TpsipTextPendingMessage, msg);
+ g_slice_free (RakiaTextPendingMessage, msg);
}
static void
-tpsip_text_channel_init (TpsipTextChannel *obj)
+rakia_text_channel_init (RakiaTextChannel *obj)
{
- TpsipTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (obj);
+ RakiaTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (obj);
DEBUG("enter");
priv->sending_messages = g_queue_new ();
}
-static void tpsip_text_channel_send_message (GObject *object,
+static void rakia_text_channel_send_message (GObject *object,
TpMessage *message,
TpMessageSendingFlags flags);
static void
-tpsip_text_channel_constructed (GObject *obj)
+rakia_text_channel_constructed (GObject *obj)
{
- TpsipTextChannelPrivate *priv;
+ RakiaTextChannelPrivate *priv;
TpBaseConnection *base_conn;
TpHandleRepoIface *contact_handles;
TpDBusDaemon *bus;
@@ -171,7 +171,7 @@ tpsip_text_channel_constructed (GObject *obj)
NULL
};
GObjectClass *parent_object_class =
- G_OBJECT_CLASS (tpsip_text_channel_parent_class);
+ G_OBJECT_CLASS (rakia_text_channel_parent_class);
if (parent_object_class->constructed != NULL)
parent_object_class->constructed (obj);
@@ -186,17 +186,17 @@ tpsip_text_channel_constructed (GObject *obj)
g_assert (priv->initiator != 0);
tp_handle_ref (contact_handles, priv->initiator);
- tpsip_base_connection_add_auth_handler (priv->conn, TPSIP_EVENT_TARGET (obj));
+ rakia_base_connection_add_auth_handler (priv->conn, TPSIP_EVENT_TARGET (obj));
g_signal_connect (obj,
"nua-event::nua_r_message",
- G_CALLBACK (tpsip_text_channel_nua_r_message_cb),
+ G_CALLBACK (rakia_text_channel_nua_r_message_cb),
NULL);
- tp_message_mixin_init (obj, G_STRUCT_OFFSET (TpsipTextChannel, message_mixin),
+ tp_message_mixin_init (obj, G_STRUCT_OFFSET (RakiaTextChannel, message_mixin),
base_conn);
- tp_message_mixin_implement_sending (obj, tpsip_text_channel_send_message,
+ tp_message_mixin_implement_sending (obj, rakia_text_channel_send_message,
G_N_ELEMENTS (types), types, 0,
TP_DELIVERY_REPORTING_SUPPORT_FLAG_RECEIVE_FAILURES |
TP_DELIVERY_REPORTING_SUPPORT_FLAG_RECEIVE_SUCCESSES,
@@ -207,19 +207,19 @@ tpsip_text_channel_constructed (GObject *obj)
}
-static void tpsip_text_channel_get_property(GObject *object,
+static void rakia_text_channel_get_property(GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void tpsip_text_channel_set_property(GObject *object,
+static void rakia_text_channel_set_property(GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
-static void tpsip_text_channel_dispose(GObject *object);
-static void tpsip_text_channel_finalize(GObject *object);
+static void rakia_text_channel_dispose(GObject *object);
+static void rakia_text_channel_finalize(GObject *object);
static void
-tpsip_text_channel_class_init(TpsipTextChannelClass *klass)
+rakia_text_channel_class_init(RakiaTextChannelClass *klass)
{
static TpDBusPropertiesMixinPropImpl channel_props[] = {
{ "ChannelType", "channel-type", NULL },
@@ -246,15 +246,15 @@ tpsip_text_channel_class_init(TpsipTextChannelClass *klass)
DEBUG("enter");
- g_type_class_add_private (klass, sizeof (TpsipTextChannelPrivate));
+ g_type_class_add_private (klass, sizeof (RakiaTextChannelPrivate));
- object_class->get_property = tpsip_text_channel_get_property;
- object_class->set_property = tpsip_text_channel_set_property;
+ object_class->get_property = rakia_text_channel_get_property;
+ object_class->set_property = rakia_text_channel_set_property;
- object_class->constructed = tpsip_text_channel_constructed;
+ object_class->constructed = rakia_text_channel_constructed;
- object_class->dispose = tpsip_text_channel_dispose;
- object_class->finalize = tpsip_text_channel_finalize;
+ object_class->dispose = rakia_text_channel_dispose;
+ object_class->finalize = rakia_text_channel_finalize;
g_object_class_override_property (object_class, PROP_HANDLE_TYPE,
"handle-type");
@@ -269,7 +269,7 @@ tpsip_text_channel_class_init(TpsipTextChannelClass *klass)
g_object_class_override_property (object_class, PROP_CHANNEL_PROPERTIES,
"channel-properties");
- param_spec = g_param_spec_object("connection", "TpsipConnection object",
+ param_spec = g_param_spec_object("connection", "RakiaConnection object",
"SIP connection object that owns this SIP media channel object.",
TPSIP_TYPE_BASE_CONNECTION,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -309,19 +309,19 @@ tpsip_text_channel_class_init(TpsipTextChannelClass *klass)
klass->dbus_props_class.interfaces =
prop_interfaces;
tp_dbus_properties_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpsipTextChannelClass, dbus_props_class));
+ G_STRUCT_OFFSET (RakiaTextChannelClass, dbus_props_class));
tp_message_mixin_init_dbus_properties (object_class);
}
static void
-tpsip_text_channel_get_property(GObject *object,
+rakia_text_channel_get_property(GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- TpsipTextChannel *chan = TPSIP_TEXT_CHANNEL(object);
- TpsipTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE(chan);
+ RakiaTextChannel *chan = TPSIP_TEXT_CHANNEL(object);
+ RakiaTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE(chan);
TpBaseConnection *base_conn = (TpBaseConnection *) priv->conn;
switch (property_id)
@@ -393,7 +393,7 @@ tpsip_text_channel_get_property(GObject *object,
break;
case PROP_INTERFACES:
- g_value_set_static_boxed (value, tpsip_text_channel_interfaces);
+ g_value_set_static_boxed (value, rakia_text_channel_interfaces);
break;
default:
@@ -402,13 +402,13 @@ tpsip_text_channel_get_property(GObject *object,
}
static void
-tpsip_text_channel_set_property(GObject *object,
+rakia_text_channel_set_property(GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- TpsipTextChannel *chan = TPSIP_TEXT_CHANNEL (object);
- TpsipTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (chan);
+ RakiaTextChannel *chan = TPSIP_TEXT_CHANNEL (object);
+ RakiaTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (chan);
switch (property_id)
{
@@ -444,10 +444,10 @@ tpsip_text_channel_set_property(GObject *object,
}
static void
-tpsip_text_channel_dispose(GObject *object)
+rakia_text_channel_dispose(GObject *object)
{
- TpsipTextChannel *self = TPSIP_TEXT_CHANNEL (object);
- TpsipTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
+ RakiaTextChannel *self = TPSIP_TEXT_CHANNEL (object);
+ RakiaTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
TpHandleRepoIface *contact_handles;
if (priv->dispose_has_run)
@@ -469,8 +469,8 @@ tpsip_text_channel_dispose(GObject *object)
if (priv->initiator != 0)
tp_handle_unref (contact_handles, priv->initiator);
- if (G_OBJECT_CLASS (tpsip_text_channel_parent_class)->dispose)
- G_OBJECT_CLASS (tpsip_text_channel_parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (rakia_text_channel_parent_class)->dispose)
+ G_OBJECT_CLASS (rakia_text_channel_parent_class)->dispose (object);
}
static void
@@ -478,15 +478,15 @@ zap_pending_messages (GQueue *pending_messages,
TpHandleRepoIface *contact_handles)
{
g_queue_foreach (pending_messages,
- (GFunc) tpsip_text_pending_free, contact_handles);
+ (GFunc) rakia_text_pending_free, contact_handles);
g_queue_clear (pending_messages);
}
static void
-tpsip_text_channel_finalize(GObject *object)
+rakia_text_channel_finalize(GObject *object)
{
- TpsipTextChannel *self = TPSIP_TEXT_CHANNEL (object);
- TpsipTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
+ RakiaTextChannel *self = TPSIP_TEXT_CHANNEL (object);
+ RakiaTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
TpHandleRepoIface *contact_handles;
contact_handles = tp_base_connection_get_handles (
@@ -501,29 +501,29 @@ tpsip_text_channel_finalize(GObject *object)
tp_message_mixin_finalize (object);
- G_OBJECT_CLASS (tpsip_text_channel_parent_class)->finalize (object);
+ G_OBJECT_CLASS (rakia_text_channel_parent_class)->finalize (object);
}
-static gint tpsip_acknowledged_messages_compare(gconstpointer msg,
+static gint rakia_acknowledged_messages_compare(gconstpointer msg,
gconstpointer id)
{
- TpsipTextPendingMessage *message = (TpsipTextPendingMessage *)msg;
+ RakiaTextPendingMessage *message = (RakiaTextPendingMessage *)msg;
nua_handle_t *nh = (nua_handle_t *) id;
return (message->nh != nh);
}
/**
- * tpsip_text_channel_close
+ * rakia_text_channel_close
*
* Implements DBus method Close
* on interface org.freedesktop.Telepathy.Channel
*/
static void
-tpsip_text_channel_close (TpSvcChannel *iface,
+rakia_text_channel_close (TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
- TpsipTextChannel *self = TPSIP_TEXT_CHANNEL (iface);
- TpsipTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE(self);
+ RakiaTextChannel *self = TPSIP_TEXT_CHANNEL (iface);
+ RakiaTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE(self);
if (priv->closed)
{
@@ -561,17 +561,17 @@ tpsip_text_channel_close (TpSvcChannel *iface,
}
/**
- * tpsip_text_channel_destroy
+ * rakia_text_channel_destroy
*
* Implements D-Bus method Destroy
* on interface org.freedesktop.Telepathy.Channel.Interface.Destroyable
*/
static void
-tpsip_text_channel_destroy (TpSvcChannelInterfaceDestroyable *iface,
+rakia_text_channel_destroy (TpSvcChannelInterfaceDestroyable *iface,
DBusGMethodInvocation *context)
{
- TpsipTextChannel *self = TPSIP_TEXT_CHANNEL (iface);
- TpsipTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
+ RakiaTextChannel *self = TPSIP_TEXT_CHANNEL (iface);
+ RakiaTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
TpHandleRepoIface *contact_handles;
contact_handles = tp_base_connection_get_handles (
@@ -581,17 +581,17 @@ tpsip_text_channel_destroy (TpSvcChannelInterfaceDestroyable *iface,
/* Close() and Destroy() have the same signature, so we can safely
* chain to the other function now */
- tpsip_text_channel_close ((TpSvcChannel *) self, context);
+ rakia_text_channel_close ((TpSvcChannel *) self, context);
}
/**
- * tpsip_text_channel_get_channel_type
+ * rakia_text_channel_get_channel_type
*
* Implements DBus method GetChannelType
* on interface org.freedesktop.Telepathy.Channel
*/
static void
-tpsip_text_channel_get_channel_type (TpSvcChannel *iface,
+rakia_text_channel_get_channel_type (TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
DEBUG("enter");
@@ -602,17 +602,17 @@ tpsip_text_channel_get_channel_type (TpSvcChannel *iface,
/**
- * tpsip_text_channel_get_handle
+ * rakia_text_channel_get_handle
*
* Implements DBus method GetHandle
* on interface org.freedesktop.Telepathy.Channel
*/
static void
-tpsip_text_channel_get_handle (TpSvcChannel *iface,
+rakia_text_channel_get_handle (TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
- TpsipTextChannel *obj = TPSIP_TEXT_CHANNEL (iface);
- TpsipTextChannelPrivate *priv;
+ RakiaTextChannel *obj = TPSIP_TEXT_CHANNEL (iface);
+ RakiaTextChannelPrivate *priv;
DEBUG("enter");
@@ -624,28 +624,28 @@ tpsip_text_channel_get_handle (TpSvcChannel *iface,
/**
- * tpsip_text_channel_get_interfaces
+ * rakia_text_channel_get_interfaces
*
* Implements DBus method GetInterfaces
* on interface org.freedesktop.Telepathy.Channel
*/
static void
-tpsip_text_channel_get_interfaces(TpSvcChannel *iface,
+rakia_text_channel_get_interfaces(TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
DEBUG("enter");
tp_svc_channel_return_from_get_interfaces (context,
- tpsip_text_channel_interfaces);
+ rakia_text_channel_interfaces);
}
static void
-tpsip_text_channel_send_message (GObject *object,
+rakia_text_channel_send_message (GObject *object,
TpMessage *message,
TpMessageSendingFlags flags)
{
- TpsipTextChannel *self = TPSIP_TEXT_CHANNEL(object);
- TpsipTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
- TpsipTextPendingMessage *msg = NULL;
+ RakiaTextChannel *self = TPSIP_TEXT_CHANNEL(object);
+ RakiaTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
+ RakiaTextPendingMessage *msg = NULL;
nua_handle_t *msg_nh = NULL;
GError *error = NULL;
const GHashTable *part;
@@ -690,7 +690,7 @@ tpsip_text_channel_send_message (GObject *object,
/* Okay, it's valid. Let's send it. */
- msg_nh = tpsip_base_connection_create_handle (priv->conn, priv->handle);
+ msg_nh = rakia_base_connection_create_handle (priv->conn, priv->handle);
if (msg_nh == NULL)
{
g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
@@ -698,14 +698,14 @@ tpsip_text_channel_send_message (GObject *object,
goto fail;
}
- tpsip_event_target_attach (msg_nh, (GObject *) self);
+ rakia_event_target_attach (msg_nh, (GObject *) self);
nua_message(msg_nh,
SIPTAG_CONTENT_TYPE_STR("text/plain"),
SIPTAG_PAYLOAD_STR(text),
TAG_END());
- msg = _tpsip_text_pending_new0 ();
+ msg = _rakia_text_pending_new0 ();
msg->nh = msg_nh;
msg->token = g_strdup_printf ("%u", priv->sent_id++);
msg->flags = flags;
@@ -751,12 +751,12 @@ text_send_error_to_dbus_error (TpChannelTextSendError error)
}
static void
-delivery_report (TpsipTextChannel *self,
+delivery_report (RakiaTextChannel *self,
const gchar *token,
TpDeliveryStatus status,
TpChannelTextSendError send_error)
{
- TpsipTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
+ RakiaTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
TpBaseConnection *base_conn;
TpMessage *msg;
@@ -787,13 +787,13 @@ delivery_report (TpsipTextChannel *self,
}
static gboolean
-tpsip_text_channel_nua_r_message_cb (TpsipTextChannel *self,
- const TpsipNuaEvent *ev,
+rakia_text_channel_nua_r_message_cb (RakiaTextChannel *self,
+ const RakiaNuaEvent *ev,
tagi_t tags[],
gpointer foo)
{
- TpsipTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
- TpsipTextPendingMessage *msg;
+ RakiaTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (self);
+ RakiaTextPendingMessage *msg;
TpHandleRepoIface *contact_repo;
TpChannelTextSendError send_error;
GList *node;
@@ -804,7 +804,7 @@ tpsip_text_channel_nua_r_message_cb (TpsipTextChannel *self,
node = g_queue_find_custom (priv->sending_messages,
ev->nua_handle,
- tpsip_acknowledged_messages_compare);
+ rakia_acknowledged_messages_compare);
/* Shouldn't happen... */
if (node == NULL)
@@ -813,7 +813,7 @@ tpsip_text_channel_nua_r_message_cb (TpsipTextChannel *self,
return FALSE;
}
- msg = (TpsipTextPendingMessage *)node->data;
+ msg = (RakiaTextPendingMessage *)node->data;
g_assert (msg != NULL);
@@ -875,18 +875,18 @@ tpsip_text_channel_nua_r_message_cb (TpsipTextChannel *self,
contact_repo = tp_base_connection_get_handles (
(TpBaseConnection *)(priv->conn), TP_HANDLE_TYPE_CONTACT);
- tpsip_text_pending_free(msg, contact_repo);
+ rakia_text_pending_free(msg, contact_repo);
return TRUE;
}
-void tpsip_text_channel_receive(TpsipTextChannel *chan,
+void rakia_text_channel_receive(RakiaTextChannel *chan,
const sip_t *sip,
TpHandle sender,
const char *text,
gsize len)
{
- TpsipTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (chan);
+ RakiaTextChannelPrivate *priv = TPSIP_TEXT_CHANNEL_GET_PRIVATE (chan);
TpMessage *msg;
TpBaseConnection *base_conn;
sip_call_id_t *hdr_call_id;
@@ -935,7 +935,7 @@ destroyable_iface_init (gpointer g_iface,
TpSvcChannelInterfaceDestroyableClass *klass = g_iface;
#define IMPLEMENT(x) tp_svc_channel_interface_destroyable_implement_##x (\
- klass, tpsip_text_channel_##x)
+ klass, rakia_text_channel_##x)
IMPLEMENT(destroy);
#undef IMPLEMENT
}
@@ -946,7 +946,7 @@ channel_iface_init(gpointer g_iface, gpointer iface_data)
TpSvcChannelClass *klass = (TpSvcChannelClass *)g_iface;
#define IMPLEMENT(x) tp_svc_channel_implement_##x (\
- klass, tpsip_text_channel_##x)
+ klass, rakia_text_channel_##x)
IMPLEMENT(close);
IMPLEMENT(get_channel_type);
IMPLEMENT(get_handle);
diff --git a/tpsip/text-channel.h b/rakia/text-channel.h
index 4be5d51..e74eb1c 100644
--- a/tpsip/text-channel.h
+++ b/rakia/text-channel.h
@@ -1,5 +1,5 @@
/*
- * sip-text-channel.h - Header for TpsipTextChannel
+ * sip-text-channel.h - Header for RakiaTextChannel
* Copyright (C) 2005-2008 Collabora Ltd.
* Copyright (C) 2005-2009 Nokia Corporation
*
@@ -26,42 +26,42 @@
#include <telepathy-glib/handle.h>
#include <telepathy-glib/message-mixin.h>
-#include <tpsip/sofia-decls.h>
+#include <rakia/sofia-decls.h>
G_BEGIN_DECLS
-typedef struct _TpsipTextChannel TpsipTextChannel;
-typedef struct _TpsipTextChannelClass TpsipTextChannelClass;
+typedef struct _RakiaTextChannel RakiaTextChannel;
+typedef struct _RakiaTextChannelClass RakiaTextChannelClass;
-struct _TpsipTextChannelClass {
+struct _RakiaTextChannelClass {
GObjectClass parent_class;
TpDBusPropertiesMixinClass dbus_props_class;
};
-struct _TpsipTextChannel {
+struct _RakiaTextChannel {
GObject parent;
TpMessageMixin message_mixin;
};
-GType tpsip_text_channel_get_type(void);
+GType rakia_text_channel_get_type(void);
/* TYPE MACROS */
#define TPSIP_TYPE_TEXT_CHANNEL \
- (tpsip_text_channel_get_type())
+ (rakia_text_channel_get_type())
#define TPSIP_TEXT_CHANNEL(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_TEXT_CHANNEL, TpsipTextChannel))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_TEXT_CHANNEL, RakiaTextChannel))
#define TPSIP_TEXT_CHANNEL_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_TEXT_CHANNEL, TpsipTextChannelClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_TEXT_CHANNEL, RakiaTextChannelClass))
#define TPSIP_IS_TEXT_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TPSIP_TYPE_TEXT_CHANNEL))
#define TPSIP_IS_TEXT_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), TPSIP_TYPE_TEXT_CHANNEL))
#define TPSIP_TEXT_CHANNEL_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_TEXT_CHANNEL, TpsipTextChannelClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_TEXT_CHANNEL, RakiaTextChannelClass))
-void tpsip_text_channel_receive (TpsipTextChannel *obj,
+void rakia_text_channel_receive (RakiaTextChannel *obj,
const sip_t *sip,
TpHandle sender,
const char *text,
diff --git a/tpsip/text-manager.c b/rakia/text-manager.c
index f3ae185..731694f 100644
--- a/tpsip/text-manager.c
+++ b/rakia/text-manager.c
@@ -20,7 +20,7 @@
#include "config.h"
-#include "tpsip/text-manager.h"
+#include "rakia/text-manager.h"
#include <string.h>
@@ -28,24 +28,24 @@
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/interfaces.h>
-#include "tpsip/text-channel.h"
-#include "tpsip/base-connection.h"
-#include "tpsip/handles.h"
+#include "rakia/text-channel.h"
+#include "rakia/base-connection.h"
+#include "rakia/handles.h"
#include <sofia-sip/msg_header.h>
#include <sofia-sip/sip_tag.h>
#include <sofia-sip/sip_status.h>
#define DEBUG_FLAG TPSIP_DEBUG_IM
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
static void channel_manager_iface_init (gpointer g_iface, gpointer iface_data);
static void connection_status_changed_cb (TpBaseConnection *conn,
- guint status, guint reason, TpsipTextManager *self);
-static void tpsip_text_manager_close_all (TpsipTextManager *self);
+ guint status, guint reason, RakiaTextManager *self);
+static void rakia_text_manager_close_all (RakiaTextManager *self);
-G_DEFINE_TYPE_WITH_CODE (TpsipTextManager, tpsip_text_manager,
+G_DEFINE_TYPE_WITH_CODE (RakiaTextManager, rakia_text_manager,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_MANAGER,
channel_manager_iface_init))
@@ -56,11 +56,11 @@ enum
LAST_PROPERTY
};
-typedef struct _TpsipTextManagerPrivate TpsipTextManagerPrivate;
-struct _TpsipTextManagerPrivate
+typedef struct _RakiaTextManagerPrivate RakiaTextManagerPrivate;
+struct _RakiaTextManagerPrivate
{
TpBaseConnection *conn;
- /* guint handle => TpsipTextChannel *channel */
+ /* guint handle => RakiaTextChannel *channel */
GHashTable *channels;
gulong status_changed_id;
@@ -69,12 +69,12 @@ struct _TpsipTextManagerPrivate
gboolean dispose_has_run;
};
-#define TPSIP_TEXT_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_TEXT_MANAGER, TpsipTextManagerPrivate))
+#define TPSIP_TEXT_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_TEXT_MANAGER, RakiaTextManagerPrivate))
static void
-tpsip_text_manager_init (TpsipTextManager *fac)
+rakia_text_manager_init (RakiaTextManager *fac)
{
- TpsipTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
+ RakiaTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
priv->conn = NULL;
priv->channels = g_hash_table_new_full (g_direct_hash, g_direct_equal,
@@ -84,12 +84,12 @@ tpsip_text_manager_init (TpsipTextManager *fac)
}
static void
-tpsip_text_manager_constructed (GObject *object)
+rakia_text_manager_constructed (GObject *object)
{
- TpsipTextManager *fac = TPSIP_TEXT_MANAGER (object);
- TpsipTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
+ RakiaTextManager *fac = TPSIP_TEXT_MANAGER (object);
+ RakiaTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
GObjectClass *parent_object_class =
- G_OBJECT_CLASS (tpsip_text_manager_parent_class);
+ G_OBJECT_CLASS (rakia_text_manager_parent_class);
if (parent_object_class->constructed != NULL)
parent_object_class->constructed (object);
@@ -99,31 +99,31 @@ tpsip_text_manager_constructed (GObject *object)
}
static void
-tpsip_text_manager_dispose (GObject *object)
+rakia_text_manager_dispose (GObject *object)
{
- TpsipTextManager *fac = TPSIP_TEXT_MANAGER (object);
- TpsipTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
+ RakiaTextManager *fac = TPSIP_TEXT_MANAGER (object);
+ RakiaTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
if (priv->dispose_has_run)
return;
priv->dispose_has_run = TRUE;
- tpsip_text_manager_close_all (fac);
+ rakia_text_manager_close_all (fac);
g_assert (priv->channels == NULL);
- if (G_OBJECT_CLASS (tpsip_text_manager_parent_class)->dispose)
- G_OBJECT_CLASS (tpsip_text_manager_parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (rakia_text_manager_parent_class)->dispose)
+ G_OBJECT_CLASS (rakia_text_manager_parent_class)->dispose (object);
}
static void
-tpsip_text_manager_get_property (GObject *object,
+rakia_text_manager_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- TpsipTextManager *fac = TPSIP_TEXT_MANAGER (object);
- TpsipTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
+ RakiaTextManager *fac = TPSIP_TEXT_MANAGER (object);
+ RakiaTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
switch (property_id) {
case PROP_CONNECTION:
@@ -136,13 +136,13 @@ tpsip_text_manager_get_property (GObject *object,
}
static void
-tpsip_text_manager_set_property (GObject *object,
+rakia_text_manager_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- TpsipTextManager *fac = TPSIP_TEXT_MANAGER (object);
- TpsipTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
+ RakiaTextManager *fac = TPSIP_TEXT_MANAGER (object);
+ RakiaTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
switch (property_id) {
case PROP_CONNECTION:
@@ -155,20 +155,20 @@ tpsip_text_manager_set_property (GObject *object,
}
static void
-tpsip_text_manager_class_init (TpsipTextManagerClass *klass)
+rakia_text_manager_class_init (RakiaTextManagerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GParamSpec *param_spec;
- g_type_class_add_private (klass, sizeof (TpsipTextManagerPrivate));
+ g_type_class_add_private (klass, sizeof (RakiaTextManagerPrivate));
- object_class->constructed = tpsip_text_manager_constructed;
- object_class->get_property = tpsip_text_manager_get_property;
- object_class->set_property = tpsip_text_manager_set_property;
- object_class->dispose = tpsip_text_manager_dispose;
+ object_class->constructed = rakia_text_manager_constructed;
+ object_class->get_property = rakia_text_manager_get_property;
+ object_class->set_property = rakia_text_manager_set_property;
+ object_class->dispose = rakia_text_manager_dispose;
param_spec = g_param_spec_object ("connection",
- "TpsipBaseConnection object",
+ "RakiaBaseConnection object",
"SIP connection that owns this text channel manager",
TPSIP_TYPE_BASE_CONNECTION,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -176,9 +176,9 @@ tpsip_text_manager_class_init (TpsipTextManagerClass *klass)
}
static void
-tpsip_text_manager_close_all (TpsipTextManager *fac)
+rakia_text_manager_close_all (RakiaTextManager *fac)
{
- TpsipTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
+ RakiaTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
GHashTable *channels;
if (priv->status_changed_id != 0)
@@ -213,12 +213,12 @@ _foreach_slave (gpointer key, gpointer value, gpointer user_data)
}
static void
-tpsip_text_manager_foreach_channel (TpChannelManager *manager,
+rakia_text_manager_foreach_channel (TpChannelManager *manager,
TpExportableChannelFunc func,
gpointer user_data)
{
- TpsipTextManager *fac = TPSIP_TEXT_MANAGER (manager);
- TpsipTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
+ RakiaTextManager *fac = TPSIP_TEXT_MANAGER (manager);
+ RakiaTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
struct _ForeachData data;
data.func = func;
@@ -231,13 +231,13 @@ tpsip_text_manager_foreach_channel (TpChannelManager *manager,
* text_channel_closed_cb:
*
* Signal callback for when a text channel is closed. Removes the references
- * that #TpsipChannelManager holds to them.
+ * that #RakiaChannelManager holds to them.
*/
static void
-channel_closed (TpsipTextChannel *chan, gpointer user_data)
+channel_closed (RakiaTextChannel *chan, gpointer user_data)
{
- TpsipTextManager *self = TPSIP_TEXT_MANAGER (user_data);
- TpsipTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (self);
+ RakiaTextManager *self = TPSIP_TEXT_MANAGER (user_data);
+ RakiaTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (self);
TpHandle contact_handle;
gboolean really_destroyed = TRUE;
@@ -269,16 +269,16 @@ channel_closed (TpsipTextChannel *chan, gpointer user_data)
/**
* new_text_channel
*
- * Creates a new empty TpsipTextChannel.
+ * Creates a new empty RakiaTextChannel.
*/
-static TpsipTextChannel *
-tpsip_text_manager_new_channel (TpsipTextManager *fac,
+static RakiaTextChannel *
+rakia_text_manager_new_channel (RakiaTextManager *fac,
TpHandle handle,
TpHandle initiator,
gpointer request_token)
{
- TpsipTextManagerPrivate *priv;
- TpsipTextChannel *chan;
+ RakiaTextManagerPrivate *priv;
+ RakiaTextChannel *chan;
gchar *object_path;
TpBaseConnection *conn;
GSList *request_tokens;
@@ -331,7 +331,7 @@ static const gchar * const text_channel_allowed_properties[] = {
};
static void
-tpsip_text_manager_type_foreach_channel_class (GType type,
+rakia_text_manager_type_foreach_channel_class (GType type,
TpChannelManagerTypeChannelClassFunc func,
gpointer user_data)
{
@@ -356,12 +356,12 @@ tpsip_text_manager_type_foreach_channel_class (GType type,
static gboolean
-tpsip_text_manager_requestotron (TpsipTextManager *self,
+rakia_text_manager_requestotron (RakiaTextManager *self,
gpointer request_token,
GHashTable *request_properties,
gboolean require_new)
{
- TpsipTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (self);
+ RakiaTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (self);
TpBaseConnection *base_conn = (TpBaseConnection *) priv->conn;
TpHandle handle;
GError *error = NULL;
@@ -390,7 +390,7 @@ tpsip_text_manager_requestotron (TpsipTextManager *self,
if (channel == NULL)
{
- tpsip_text_manager_new_channel (self,
+ rakia_text_manager_new_channel (self,
handle, base_conn->self_handle, request_token);
return TRUE;
}
@@ -415,57 +415,57 @@ error:
static gboolean
-tpsip_text_manager_create_channel (TpChannelManager *manager,
+rakia_text_manager_create_channel (TpChannelManager *manager,
gpointer request_token,
GHashTable *request_properties)
{
- TpsipTextManager *self = TPSIP_TEXT_MANAGER (manager);
+ RakiaTextManager *self = TPSIP_TEXT_MANAGER (manager);
- return tpsip_text_manager_requestotron (self, request_token,
+ return rakia_text_manager_requestotron (self, request_token,
request_properties, TRUE);
}
static gboolean
-tpsip_text_manager_request_channel (TpChannelManager *manager,
+rakia_text_manager_request_channel (TpChannelManager *manager,
gpointer request_token,
GHashTable *request_properties)
{
- TpsipTextManager *self = TPSIP_TEXT_MANAGER (manager);
+ RakiaTextManager *self = TPSIP_TEXT_MANAGER (manager);
- return tpsip_text_manager_requestotron (self, request_token,
+ return rakia_text_manager_requestotron (self, request_token,
request_properties, FALSE);
}
static gboolean
-tpsip_text_manager_ensure_channel (TpChannelManager *manager,
+rakia_text_manager_ensure_channel (TpChannelManager *manager,
gpointer request_token,
GHashTable *request_properties)
{
- TpsipTextManager *self = TPSIP_TEXT_MANAGER (manager);
+ RakiaTextManager *self = TPSIP_TEXT_MANAGER (manager);
- return tpsip_text_manager_requestotron (self, request_token,
+ return rakia_text_manager_requestotron (self, request_token,
request_properties, FALSE);
}
-static inline TpsipTextChannel *
-tpsip_text_manager_lookup_channel (TpsipTextManager *fac,
+static inline RakiaTextChannel *
+rakia_text_manager_lookup_channel (RakiaTextManager *fac,
TpHandle handle)
{
- TpsipTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
+ RakiaTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (fac);
return g_hash_table_lookup (priv->channels,
GUINT_TO_POINTER(handle));
}
static gboolean
-tpsip_nua_i_message_cb (TpBaseConnection *conn,
- const TpsipNuaEvent *ev,
+rakia_nua_i_message_cb (TpBaseConnection *conn,
+ const RakiaNuaEvent *ev,
tagi_t tags[],
- TpsipTextManager *fac)
+ RakiaTextManager *fac)
{
- TpsipTextChannel *channel;
+ RakiaTextChannel *channel;
TpHandle handle;
const sip_t *sip = ev->sip;
const char *text = "";
@@ -558,7 +558,7 @@ tpsip_nua_i_message_cb (TpBaseConnection *conn,
}
}
- handle = tpsip_handle_by_requestor (conn, sip);
+ handle = rakia_handle_by_requestor (conn, sip);
if (!handle)
{
@@ -576,18 +576,18 @@ tpsip_nua_i_message_cb (TpBaseConnection *conn,
TAG_END());
DEBUG("Got incoming message from <%s>",
- tpsip_handle_inspect (conn, handle));
+ rakia_handle_inspect (conn, handle));
- channel = tpsip_text_manager_lookup_channel (fac, handle);
+ channel = rakia_text_manager_lookup_channel (fac, handle);
if (!channel)
- channel = tpsip_text_manager_new_channel (fac,
+ channel = rakia_text_manager_new_channel (fac,
handle, handle, NULL);
- tpsip_text_channel_receive (channel,
+ rakia_text_channel_receive (channel,
sip, handle, text, len);
- tpsip_handle_unref (conn, handle);
+ rakia_handle_unref (conn, handle);
end:
g_free (allocated_text);
@@ -599,9 +599,9 @@ static void
connection_status_changed_cb (TpBaseConnection *conn,
guint status,
guint reason,
- TpsipTextManager *self)
+ RakiaTextManager *self)
{
- TpsipTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (self);
+ RakiaTextManagerPrivate *priv = TPSIP_TEXT_MANAGER_GET_PRIVATE (self);
switch (status)
{
@@ -609,12 +609,12 @@ connection_status_changed_cb (TpBaseConnection *conn,
priv->message_received_id = g_signal_connect (conn,
"nua-event::nua_i_message",
- G_CALLBACK (tpsip_nua_i_message_cb),
+ G_CALLBACK (rakia_nua_i_message_cb),
self);
break;
case TP_CONNECTION_STATUS_DISCONNECTED:
- tpsip_text_manager_close_all (self);
+ rakia_text_manager_close_all (self);
if (priv->message_received_id != 0)
{
@@ -633,10 +633,10 @@ channel_manager_iface_init (gpointer g_iface, gpointer iface_data)
{
TpChannelManagerIface *iface = g_iface;
- iface->foreach_channel = tpsip_text_manager_foreach_channel;
+ iface->foreach_channel = rakia_text_manager_foreach_channel;
iface->type_foreach_channel_class =
- tpsip_text_manager_type_foreach_channel_class;
- iface->create_channel = tpsip_text_manager_create_channel;
- iface->request_channel = tpsip_text_manager_request_channel;
- iface->ensure_channel = tpsip_text_manager_ensure_channel;
+ rakia_text_manager_type_foreach_channel_class;
+ iface->create_channel = rakia_text_manager_create_channel;
+ iface->request_channel = rakia_text_manager_request_channel;
+ iface->ensure_channel = rakia_text_manager_ensure_channel;
}
diff --git a/tpsip/text-manager.h b/rakia/text-manager.h
index cd4ea76..fc30edf 100644
--- a/tpsip/text-manager.h
+++ b/rakia/text-manager.h
@@ -1,5 +1,5 @@
/*
- * tpsip/text-manager.h - Text channel manager for SIP
+ * rakia/text-manager.h - Text channel manager for SIP
* Copyright (C) 2007 Collabora Ltd.
* Copyright (C) 2007-2011 Nokia Corporation
*
@@ -25,32 +25,32 @@
G_BEGIN_DECLS
-typedef struct _TpsipTextManager TpsipTextManager;
-typedef struct _TpsipTextManagerClass TpsipTextManagerClass;
+typedef struct _RakiaTextManager RakiaTextManager;
+typedef struct _RakiaTextManagerClass RakiaTextManagerClass;
-struct _TpsipTextManagerClass {
+struct _RakiaTextManagerClass {
GObjectClass parent_class;
};
-struct _TpsipTextManager {
+struct _RakiaTextManager {
GObject parent;
};
-GType tpsip_text_manager_get_type(void);
+GType rakia_text_manager_get_type(void);
/* TYPE MACROS */
#define TPSIP_TYPE_TEXT_MANAGER \
- (tpsip_text_manager_get_type())
+ (rakia_text_manager_get_type())
#define TPSIP_TEXT_MANAGER(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_TEXT_MANAGER, TpsipTextManager))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_TEXT_MANAGER, RakiaTextManager))
#define TPSIP_TEXT_MANAGER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_TEXT_MANAGER, TpsipTextManagerClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_TEXT_MANAGER, RakiaTextManagerClass))
#define TPSIP_IS_TEXT_MANAGER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TPSIP_TYPE_TEXT_MANAGER))
#define TPSIP_IS_TEXT_MANAGER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), TPSIP_TYPE_TEXT_MANAGER))
#define TPSIP_TEXT_MANAGER_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_TEXT_MANAGER, TpsipTextManagerClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_TEXT_MANAGER, RakiaTextManagerClass))
G_END_DECLS
diff --git a/tpsip/util.c b/rakia/util.c
index 0072fac..164ad1e 100644
--- a/tpsip/util.c
+++ b/rakia/util.c
@@ -25,7 +25,7 @@
#include <string.h>
gchar const *
-tpsip_version_string (void)
+rakia_version_string (void)
{
return "Telepathy-SofiaSIP/" TELEPATHY_SIP_VERSION;
}
@@ -51,7 +51,7 @@ static const guchar escape_table[256] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
/**
- * tpsip_string_append_quoted:
+ * rakia_string_append_quoted:
* @buf: a #GString to append the quoted text to
* @text: text to append as a quoted string
*
@@ -59,7 +59,7 @@ static const guchar escape_table[256] =
* or MIME syntax.
*/
void
-tpsip_string_append_quoted (GString *buf, const gchar *text)
+rakia_string_append_quoted (GString *buf, const gchar *text)
{
const gchar *p;
gchar quoted_pair[2] = { '\\', };
@@ -89,7 +89,7 @@ tpsip_string_append_quoted (GString *buf, const gchar *text)
}
/**
- * tpsip_quote_string:
+ * rakia_quote_string:
* @src: the source string
*
* Formats the content of @text as a quoted string accordingly to SIP
@@ -99,19 +99,19 @@ tpsip_string_append_quoted (GString *buf, const gchar *text)
* The string is to be freed with g_free().
*/
gchar *
-tpsip_quote_string (const gchar *src)
+rakia_quote_string (const gchar *src)
{
GString *buf;
buf = g_string_sized_new (2);
- tpsip_string_append_quoted (buf, src);
+ rakia_string_append_quoted (buf, src);
return g_string_free (buf, FALSE);
}
/**
- * tpsip_unquote_string:
+ * rakia_unquote_string:
* @src: the quoted string, including the encompassing double quotes
* @len: length of the string @src in bytes,
* or -1 if the string is null-terminated
@@ -123,7 +123,7 @@ tpsip_quote_string (const gchar *src)
* The string is to be freed with g_free().
*/
gchar *
-tpsip_unquote_string (const gchar *src, gssize len)
+rakia_unquote_string (const gchar *src, gssize len)
{
gchar *res;
gchar *p;
diff --git a/tpsip/util.h b/rakia/util.h
index 135caab..c4baef4 100644
--- a/tpsip/util.h
+++ b/rakia/util.h
@@ -25,13 +25,13 @@
G_BEGIN_DECLS
-gchar * tpsip_quote_string (const gchar *src);
+gchar * rakia_quote_string (const gchar *src);
-gchar * tpsip_unquote_string (const gchar *src, gssize len);
+gchar * rakia_unquote_string (const gchar *src, gssize len);
-void tpsip_string_append_quoted (GString *buf, const gchar *text);
+void rakia_string_append_quoted (GString *buf, const gchar *text);
-gchar const *tpsip_version_string ();
+gchar const *rakia_version_string ();
G_END_DECLS
diff --git a/src/Makefile.am b/src/Makefile.am
index f6082b8..7b37144 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,5 @@
#
-# Makefile.am for telepathy-sofiasip/src
+# Makefile.am for telepathy-rakia/src
#
# Copyright (C) 2006-2009 Nokia Corporation
# Contact: Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
@@ -17,7 +17,7 @@ managerdir = $(datadir)/telepathy/managers
AM_CPPFLAGS = $(DBUS_CFLAGS) $(GLIB_CFLAGS) $(SOFIA_SIP_UA_CFLAGS) \
$(TELEPATHY_GLIB_CFLAGS) $(IPHB_CFLAGS) \
-I$(top_builddir) -I$(top_srcdir) \
- -DG_LOG_DOMAIN=\"tpsip\"
+ -DG_LOG_DOMAIN=\"rakia\"
AM_CFLAGS = $(ERROR_CFLAGS) $(COVERAGE_CFLAGS)
ALL_LIBS = $(DBUS_LIBS) $(GLIB_LIBS) $(SOFIA_SIP_UA_LIBS) \
$(TELEPATHY_GLIB_LIBS) $(IPHB_LIBS)
@@ -25,10 +25,10 @@ ALL_LIBS = $(DBUS_LIBS) $(GLIB_LIBS) $(SOFIA_SIP_UA_LIBS) \
# ----------------------------------------------------------------------
# Build targets
-libexec_PROGRAMS = telepathy-sofiasip
-manager_DATA = sofiasip.manager
+libexec_PROGRAMS = telepathy-rakia
+manager_DATA = rakia.manager
noinst_PROGRAMS = write-mgr-file
-noinst_LTLIBRARIES = libtpsip-convenience.la
+noinst_LTLIBRARIES = librakia-convenience.la
# ----------------------------------------------------------------------
# Tests
@@ -54,7 +54,7 @@ noinst_LTLIBRARIES = libtpsip-convenience.la
--vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
$< > $@ || rm -f $@
-sofiasip.manager: write-mgr-file
+rakia.manager: write-mgr-file
if ./write-mgr-file > $@.tmp; then \
mv -f $@.tmp $@;\
else \
@@ -65,7 +65,7 @@ BUILT_SOURCES = \
sip-connection-enumtypes.h \
sip-connection-enumtypes.c
-libtpsip_convenience_la_SOURCES = \
+librakia_convenience_la_SOURCES = \
sip-connection.h \
sip-connection.c \
sip-connection-manager.h \
@@ -76,22 +76,22 @@ libtpsip_convenience_la_SOURCES = \
sip-connection-helpers.c \
sip-connection-private.h
-nodist_libtpsip_convenience_la_SOURCES = \
+nodist_librakia_convenience_la_SOURCES = \
$(BUILT_SOURCES)
-libtpsip_convenience_la_LIBADD = \
- $(top_builddir)/tpsip/libtpsip.la \
- $(top_builddir)/tpsip-extensions/libtpsip-extensions.la
+librakia_convenience_la_LIBADD = \
+ $(top_builddir)/rakia/librakia.la \
+ $(top_builddir)/extensions/librakia-extensions.la
-telepathy_sofiasip_SOURCES = \
- telepathy-sofiasip.c
+telepathy_rakia_SOURCES = \
+ telepathy-rakia.c
-telepathy_sofiasip_LDADD = libtpsip-convenience.la $(ALL_LIBS)
+telepathy_rakia_LDADD = librakia-convenience.la $(ALL_LIBS)
write_mgr_file_SOURCES = \
write-mgr-file.c
-write_mgr_file_LDADD = libtpsip-convenience.la $(ALL_LIBS)
+write_mgr_file_LDADD = librakia-convenience.la $(ALL_LIBS)
# ----------------------------------------------------------------------
# Install and distribution rules
diff --git a/src/protocol.c b/src/protocol.c
index be17538..44bbd4d 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -1,5 +1,5 @@
/*
- * protocol.c - source for TpsipProtocol
+ * protocol.c - source for RakiaProtocol
* Copyright (C) 2007-2010 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
@@ -25,14 +25,14 @@
#include <dbus/dbus-protocol.h>
#include <dbus/dbus-glib.h>
-#include <tpsip/sofia-decls.h>
-#include <tpsip/handles.h>
-#include <tpsip/media-manager.h>
-#include <tpsip/text-manager.h>
+#include <rakia/sofia-decls.h>
+#include <rakia/handles.h>
+#include <rakia/media-manager.h>
+#include <rakia/text-manager.h>
#include <sofia-sip/su_glib.h>
#define DEBUG_FLAG TPSIP_DEBUG_CONNECTION
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
#include "sip-connection.h"
#include "sip-connection-helpers.h"
@@ -41,15 +41,15 @@
#define VCARD_FIELD_NAME "x-" PROTOCOL_NAME
#define ENGLISH_NAME "SIP"
-G_DEFINE_TYPE (TpsipProtocol,
- tpsip_protocol,
+G_DEFINE_TYPE (RakiaProtocol,
+ rakia_protocol,
TP_TYPE_BASE_PROTOCOL)
enum {
PROP_SOFIA_ROOT = 1,
};
-struct _TpsipProtocolPrivate
+struct _RakiaProtocolPrivate
{
su_root_t *sofia_root;
};
@@ -61,7 +61,7 @@ enum {
PARAM_SET_SEPARATELY
};
-static TpCMParamSpec tpsip_params[] = {
+static TpCMParamSpec rakia_params[] = {
/* Account (a sip: URI)
*
* FIXME: validate account SIP URI properly, using appropriate RFCs */
@@ -150,19 +150,19 @@ static TpCMParamSpec tpsip_params[] = {
};
static void
-tpsip_protocol_init (TpsipProtocol *self)
+rakia_protocol_init (RakiaProtocol *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TPSIP_TYPE_PROTOCOL,
- TpsipProtocolPrivate);
+ RakiaProtocolPrivate);
}
static const TpCMParamSpec *
get_parameters (TpBaseProtocol *self G_GNUC_UNUSED)
{
- return tpsip_params;
+ return rakia_params;
}
-static TpsipConnectionKeepaliveMechanism
+static RakiaConnectionKeepaliveMechanism
priv_parse_keepalive (const gchar *str)
{
if (str == NULL || strcmp (str, "auto") == 0)
@@ -267,15 +267,15 @@ new_connection (TpBaseProtocol *protocol,
GHashTable *params,
GError **error)
{
- TpsipProtocol *self = TPSIP_PROTOCOL (protocol);
- TpsipConnection *conn;
+ RakiaProtocol *self = TPSIP_PROTOCOL (protocol);
+ RakiaConnection *conn;
guint i;
const gchar *account;
const gchar *transport;
const gchar *proxy_host;
guint16 port;
gchar *proxy;
- TpsipConnectionKeepaliveMechanism keepalive_mechanism;
+ RakiaConnectionKeepaliveMechanism keepalive_mechanism;
account = tp_asv_get_string (params, "account");
transport = tp_asv_get_string (params, "transport");
@@ -310,26 +310,26 @@ new_connection (TpBaseProtocol *protocol,
"transport", transport,
NULL);
- for (i = 0; tpsip_params[i].name != NULL; i++)
+ for (i = 0; rakia_params[i].name != NULL; i++)
{
- if (tpsip_params[i].offset == PARAM_SET_SEPARATELY)
+ if (rakia_params[i].offset == PARAM_SET_SEPARATELY)
{
- DEBUG ("Parameter %s is handled specially", tpsip_params[i].name);
+ DEBUG ("Parameter %s is handled specially", rakia_params[i].name);
continue;
}
- g_assert (tpsip_params[i].offset == PARAM_EASY);
+ g_assert (rakia_params[i].offset == PARAM_EASY);
- switch (tpsip_params[i].gtype)
+ switch (rakia_params[i].gtype)
{
case G_TYPE_STRING:
{
const gchar *s = tp_asv_get_string (params,
- tpsip_params[i].name);
+ rakia_params[i].name);
if (!tp_str_empty (s))
g_object_set (conn,
- tpsip_params[i].name, s,
+ rakia_params[i].name, s,
NULL);
}
break;
@@ -338,11 +338,11 @@ new_connection (TpBaseProtocol *protocol,
{
gboolean valid = FALSE;
guint u = tp_asv_get_uint32 (params,
- tpsip_params[i].name, &valid);
+ rakia_params[i].name, &valid);
if (valid)
g_object_set (conn,
- tpsip_params[i].name, u,
+ rakia_params[i].name, u,
NULL);
}
break;
@@ -350,12 +350,12 @@ new_connection (TpBaseProtocol *protocol,
case G_TYPE_BOOLEAN:
{
gboolean valid = FALSE;
- gboolean b = tp_asv_get_boolean (params, tpsip_params[i].name,
+ gboolean b = tp_asv_get_boolean (params, rakia_params[i].name,
&valid);
if (valid)
g_object_set (conn,
- tpsip_params[i].name, b,
+ rakia_params[i].name, b,
NULL);
}
break;
@@ -380,7 +380,7 @@ normalize_contact (TpBaseProtocol *self G_GNUC_UNUSED,
const gchar *contact,
GError **error)
{
- return tpsip_normalize_contact (contact, NULL, NULL, error);
+ return rakia_normalize_contact (contact, NULL, NULL, error);
}
static gchar *
@@ -411,7 +411,7 @@ get_connection_details (TpBaseProtocol *self,
if (connection_interfaces != NULL)
{
*connection_interfaces = g_strdupv (
- (GStrv) tpsip_connection_get_implemented_interfaces ());
+ (GStrv) rakia_connection_get_implemented_interfaces ());
}
if (channel_managers != NULL)
@@ -452,12 +452,12 @@ dup_authentication_types (TpBaseProtocol *base)
}
static void
-tpsip_protocol_get_property (GObject *object,
+rakia_protocol_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- TpsipProtocol *self = TPSIP_PROTOCOL (object);
+ RakiaProtocol *self = TPSIP_PROTOCOL (object);
switch (property_id)
{
@@ -472,12 +472,12 @@ tpsip_protocol_get_property (GObject *object,
}
static void
-tpsip_protocol_set_property (GObject *object,
+rakia_protocol_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- TpsipProtocol *self = TPSIP_PROTOCOL (object);
+ RakiaProtocol *self = TPSIP_PROTOCOL (object);
switch (property_id)
{
@@ -492,13 +492,13 @@ tpsip_protocol_set_property (GObject *object,
}
static void
-tpsip_protocol_class_init (TpsipProtocolClass *klass)
+rakia_protocol_class_init (RakiaProtocolClass *klass)
{
TpBaseProtocolClass *base_class = (TpBaseProtocolClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
GParamSpec *param_spec;
- g_type_class_add_private (klass, sizeof (TpsipProtocolPrivate));
+ g_type_class_add_private (klass, sizeof (RakiaProtocolPrivate));
base_class->get_parameters = get_parameters;
base_class->new_connection = new_connection;
@@ -508,8 +508,8 @@ tpsip_protocol_class_init (TpsipProtocolClass *klass)
base_class->get_connection_details = get_connection_details;
base_class->dup_authentication_types = dup_authentication_types;
- object_class->get_property = tpsip_protocol_get_property;
- object_class->set_property = tpsip_protocol_set_property;
+ object_class->get_property = rakia_protocol_get_property;
+ object_class->set_property = rakia_protocol_set_property;
param_spec = g_param_spec_pointer ("sofia-root", "Sofia-SIP root",
"the root object for Sofia-SIP",
@@ -519,7 +519,7 @@ tpsip_protocol_class_init (TpsipProtocolClass *klass)
}
TpBaseProtocol *
-tpsip_protocol_new (su_root_t *sofia_root)
+rakia_protocol_new (su_root_t *sofia_root)
{
return g_object_new (TPSIP_TYPE_PROTOCOL,
"name", PROTOCOL_NAME,
diff --git a/src/protocol.h b/src/protocol.h
index 7470af1..c7506ba 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -1,5 +1,5 @@
/*
- * protocol.h - header for TpsipProtocol
+ * protocol.h - header for RakiaProtocol
* Copyright (C) 2007-2010 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
@@ -23,52 +23,52 @@
#include <glib-object.h>
#include <telepathy-glib/base-protocol.h>
-#include <tpsip/sofia-decls.h>
+#include <rakia/sofia-decls.h>
#include <sofia-sip/su_glib.h>
G_BEGIN_DECLS
-typedef struct _TpsipProtocol TpsipProtocol;
-typedef struct _TpsipProtocolPrivate TpsipProtocolPrivate;
-typedef struct _TpsipProtocolClass TpsipProtocolClass;
-typedef struct _TpsipProtocolClassPrivate TpsipProtocolClassPrivate;
+typedef struct _RakiaProtocol RakiaProtocol;
+typedef struct _RakiaProtocolPrivate RakiaProtocolPrivate;
+typedef struct _RakiaProtocolClass RakiaProtocolClass;
+typedef struct _RakiaProtocolClassPrivate RakiaProtocolClassPrivate;
-struct _TpsipProtocolClass {
+struct _RakiaProtocolClass {
TpBaseProtocolClass parent_class;
- TpsipProtocolClassPrivate *priv;
+ RakiaProtocolClassPrivate *priv;
};
-struct _TpsipProtocol {
+struct _RakiaProtocol {
TpBaseProtocol parent;
- TpsipProtocolPrivate *priv;
+ RakiaProtocolPrivate *priv;
};
-GType tpsip_protocol_get_type (void);
+GType rakia_protocol_get_type (void);
#define TPSIP_TYPE_PROTOCOL \
- (tpsip_protocol_get_type ())
+ (rakia_protocol_get_type ())
#define TPSIP_PROTOCOL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
TPSIP_TYPE_PROTOCOL, \
- TpsipProtocol))
+ RakiaProtocol))
#define TPSIP_PROTOCOL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
TPSIP_TYPE_PROTOCOL, \
- TpsipProtocolClass))
+ RakiaProtocolClass))
#define TPSIP_IS_PROTOCOL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
TPSIP_TYPE_PROTOCOL))
#define TPSIP_PROTOCOL_GET_CLASS(klass) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
TPSIP_TYPE_PROTOCOL, \
- TpsipProtocolClass))
+ RakiaProtocolClass))
-gchar *tpsip_protocol_normalize_contact (const gchar *id,
+gchar *rakia_protocol_normalize_contact (const gchar *id,
GError **error);
-TpBaseProtocol *tpsip_protocol_new (su_root_t *sofia_root);
+TpBaseProtocol *rakia_protocol_new (su_root_t *sofia_root);
G_END_DECLS
diff --git a/src/sip-connection-helpers.c b/src/sip-connection-helpers.c
index 95de5ba..9fab39f 100644
--- a/src/sip-connection-helpers.c
+++ b/src/sip-connection-helpers.c
@@ -1,5 +1,5 @@
/*
- * sip-connection-helpers.c - Helper routines used by TpsipConnection
+ * sip-connection-helpers.c - Helper routines used by RakiaConnection
* Copyright (C) 2005 Collabora Ltd.
* Copyright (C) 2006-2009 Nokia Corporation
*
@@ -30,8 +30,8 @@
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/svc-connection.h>
-#include <tpsip/util.h>
-#include <tpsip/handles.h>
+#include <rakia/util.h>
+#include <rakia/handles.h>
#include "sip-connection-helpers.h"
@@ -42,7 +42,7 @@
#include "sip-connection-private.h"
#define DEBUG_FLAG TPSIP_DEBUG_CONNECTION
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
/* Default keepalive timeout in seconds,
* a value obtained from Sofia-SIP documentation */
@@ -58,21 +58,21 @@
#define TPSIP_CONNECTION_MINIMUM_KEEPALIVE_INTERVAL_REGISTER 50
static sip_to_t *
-priv_sip_to_url_make (TpsipConnection *conn,
+priv_sip_to_url_make (RakiaConnection *conn,
su_home_t *home,
TpHandle contact)
{
const url_t *url;
- url = tpsip_handle_inspect_uri (TP_BASE_CONNECTION (conn), contact);
+ url = rakia_handle_inspect_uri (TP_BASE_CONNECTION (conn), contact);
return sip_to_create (home, (const url_string_t *) url);
}
static sip_from_t *
-priv_sip_from_url_make (TpsipConnection *conn,
+priv_sip_from_url_make (RakiaConnection *conn,
su_home_t *home)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
sip_from_t *from;
gchar *alias = NULL;
@@ -89,7 +89,7 @@ priv_sip_from_url_make (TpsipConnection *conn,
/* Make the alias into a quoted string, escaping all characters
* that cannot go verbatim into a quoted string */
- alias_quoted = tpsip_quote_string (alias);
+ alias_quoted = rakia_quote_string (alias);
g_free (alias);
@@ -103,10 +103,10 @@ priv_sip_from_url_make (TpsipConnection *conn,
nua_handle_t *
-tpsip_conn_create_register_handle (TpsipConnection *conn,
+rakia_conn_create_register_handle (RakiaConnection *conn,
TpHandle contact)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
nua_handle_t *result = NULL;
su_home_t temphome[1] = { SU_HOME_INIT(temphome) };
sip_to_t *to;
@@ -125,10 +125,10 @@ tpsip_conn_create_register_handle (TpsipConnection *conn,
}
nua_handle_t *
-tpsip_conn_create_request_handle (TpsipConnection *conn,
+rakia_conn_create_request_handle (RakiaConnection *conn,
TpHandle contact)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
nua_handle_t *result = NULL;
su_home_t temphome[1] = { SU_HOME_INIT(temphome) };
sip_from_t *from;
@@ -153,9 +153,9 @@ tpsip_conn_create_request_handle (TpsipConnection *conn,
}
void
-tpsip_conn_update_proxy_and_transport (TpsipConnection *conn)
+rakia_conn_update_proxy_and_transport (RakiaConnection *conn)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
if (priv->proxy_url != NULL)
{
@@ -195,9 +195,9 @@ tpsip_conn_update_proxy_and_transport (TpsipConnection *conn)
}
const url_t *
-tpsip_conn_get_local_url (TpsipConnection *conn)
+rakia_conn_get_local_url (RakiaConnection *conn)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
url_t *url;
url = url_make (priv->sofia_home, "sip:*:*");
@@ -338,9 +338,9 @@ priv_nua_set_outbound_options (nua_t* nua, GHashTable* option_table)
}
void
-tpsip_conn_update_nua_outbound (TpsipConnection *conn)
+rakia_conn_update_nua_outbound (RakiaConnection *conn)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
GHashTable *option_table;
g_return_if_fail (priv->sofia_nua != NULL);
@@ -388,7 +388,7 @@ tpsip_conn_update_nua_outbound (TpsipConnection *conn)
}
static void
-priv_sanitize_keepalive_interval (TpsipConnectionPrivate *priv)
+priv_sanitize_keepalive_interval (RakiaConnectionPrivate *priv)
{
guint minimum_interval;
if (priv->keepalive_interval != 0)
@@ -406,9 +406,9 @@ priv_sanitize_keepalive_interval (TpsipConnectionPrivate *priv)
}
void
-tpsip_conn_update_nua_keepalive_interval (TpsipConnection *conn)
+rakia_conn_update_nua_keepalive_interval (RakiaConnection *conn)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
long keepalive_interval;
if (!priv->keepalive_interval_specified)
@@ -432,9 +432,9 @@ tpsip_conn_update_nua_keepalive_interval (TpsipConnection *conn)
}
void
-tpsip_conn_update_nua_contact_features (TpsipConnection *conn)
+rakia_conn_update_nua_contact_features (RakiaConnection *conn)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
char *contact_features;
guint timeout;
@@ -456,9 +456,9 @@ tpsip_conn_update_nua_contact_features (TpsipConnection *conn)
}
static void
-tpsip_conn_set_stun_server_address (TpsipConnection *conn, const gchar *address)
+rakia_conn_set_stun_server_address (RakiaConnection *conn, const gchar *address)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
g_return_if_fail (priv->media_manager != NULL);
g_object_set (priv->media_manager,
"stun-server", address,
@@ -469,8 +469,8 @@ tpsip_conn_set_stun_server_address (TpsipConnection *conn, const gchar *address)
static void
priv_stun_resolver_cb (sres_context_t *ctx, sres_query_t *query, sres_record_t **answers)
{
- TpsipConnection *conn = TPSIP_CONNECTION (ctx);
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnection *conn = TPSIP_CONNECTION (ctx);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
sres_a_record_t *ans = NULL;
if (NULL != answers)
@@ -496,7 +496,7 @@ priv_stun_resolver_cb (sres_context_t *ctx, sres_query_t *query, sres_record_t *
}
if (NULL != ans)
- tpsip_conn_set_stun_server_address (conn,
+ rakia_conn_set_stun_server_address (conn,
inet_ntoa (ans->a_addr));
else
DEBUG ("Couldn't resolv STUN server address, ignoring.");
@@ -505,20 +505,20 @@ priv_stun_resolver_cb (sres_context_t *ctx, sres_query_t *query, sres_record_t *
}
void
-tpsip_conn_resolv_stun_server (TpsipConnection *conn, const gchar *stun_host)
+rakia_conn_resolv_stun_server (RakiaConnection *conn, const gchar *stun_host)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
struct in_addr test_addr;
if (stun_host == NULL)
{
- tpsip_conn_set_stun_server_address (conn, NULL);
+ rakia_conn_set_stun_server_address (conn, NULL);
return;
}
if (inet_aton (stun_host, &test_addr))
{
- tpsip_conn_set_stun_server_address (conn, stun_host);
+ rakia_conn_set_stun_server_address (conn, stun_host);
return;
}
@@ -547,8 +547,8 @@ priv_stun_discover_cb (sres_context_t *ctx,
sres_query_t *query,
sres_record_t **answers)
{
- TpsipConnection *conn = TPSIP_CONNECTION (ctx);
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnection *conn = TPSIP_CONNECTION (ctx);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
sres_srv_record_t *sel = NULL;
int n_sel_items = 0;
int i;
@@ -633,16 +633,16 @@ priv_stun_discover_cb (sres_context_t *ctx,
DEBUG ("discovery got STUN server %s:%u",
sel->srv_target, sel->srv_port);
priv->stun_port = sel->srv_port;
- tpsip_conn_resolv_stun_server (conn, sel->srv_target);
+ rakia_conn_resolv_stun_server (conn, sel->srv_target);
}
sres_free_answers (priv->sofia_resolver, answers);
}
void
-tpsip_conn_discover_stun_server (TpsipConnection *conn)
+rakia_conn_discover_stun_server (RakiaConnection *conn)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
char *srv_domain;
if ((NULL == priv->account_url) || (NULL == priv->account_url->url_host))
@@ -675,15 +675,15 @@ tpsip_conn_discover_stun_server (TpsipConnection *conn)
}
gchar *
-tpsip_handle_normalize (TpHandleRepoIface *repo,
+rakia_handle_normalize (TpHandleRepoIface *repo,
const gchar *sipuri,
gpointer context,
GError **error)
{
- TpsipConnection *conn = TPSIP_CONNECTION (context);
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
+ RakiaConnection *conn = TPSIP_CONNECTION (context);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
- return tpsip_normalize_contact (sipuri, priv->account_url, priv->transport,
+ return rakia_normalize_contact (sipuri, priv->account_url, priv->transport,
error);
}
@@ -694,8 +694,8 @@ heartbeat_wakeup (su_root_magic_t *foo,
su_wait_t *wait,
void *user_data)
{
- TpsipConnection *self = (TpsipConnection *) user_data;
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
+ RakiaConnection *self = (RakiaConnection *) user_data;
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
gint keepalive_earliest;
DEBUG("tick");
@@ -705,7 +705,7 @@ heartbeat_wakeup (su_root_magic_t *foo,
if ((wait->revents & (SU_WAIT_IN | SU_WAIT_HUP | SU_WAIT_ERR)) != SU_WAIT_IN)
{
WARNING ("heartbeat descriptor invalidated prematurely with event mask %hd", wait->revents);
- tpsip_conn_heartbeat_shutdown (self);
+ rakia_conn_heartbeat_shutdown (self);
return 0;
}
@@ -719,7 +719,7 @@ heartbeat_wakeup (su_root_magic_t *foo,
0) < 0)
{
WARNING ("iphb_wait failed");
- tpsip_conn_heartbeat_shutdown (self);
+ rakia_conn_heartbeat_shutdown (self);
return 0;
}
@@ -729,10 +729,10 @@ heartbeat_wakeup (su_root_magic_t *foo,
#endif /* HAVE_LIBIPHB */
void
-tpsip_conn_heartbeat_init (TpsipConnection *self)
+rakia_conn_heartbeat_init (RakiaConnection *self)
{
#ifdef HAVE_LIBIPHB
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
int wait_id;
int reference_interval = 0;
su_root_t *root = NULL;
@@ -753,7 +753,7 @@ tpsip_conn_heartbeat_init (TpsipConnection *self)
if (su_wait_create (priv->heartbeat_wait,
iphb_get_fd (priv->heartbeat),
SU_WAIT_IN) != 0)
- tpsip_log (DEBUG_FLAG, G_LOG_LEVEL_CRITICAL,
+ rakia_log (DEBUG_FLAG, G_LOG_LEVEL_CRITICAL,
"could not create a wait object");
g_object_get (self, "sofia-root", &root, NULL);
@@ -771,17 +771,17 @@ tpsip_conn_heartbeat_init (TpsipConnection *self)
0, (gushort) MIN(priv->keepalive_interval, G_MAXUSHORT), 0) < 0)
{
WARNING ("iphb_wait failed");
- tpsip_conn_heartbeat_shutdown (self);
+ rakia_conn_heartbeat_shutdown (self);
}
#endif /* HAVE_LIBIPHB */
}
void
-tpsip_conn_heartbeat_shutdown (TpsipConnection *self)
+rakia_conn_heartbeat_shutdown (RakiaConnection *self)
{
#ifdef HAVE_LIBIPHB
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
su_root_t *root = NULL;
if (priv->heartbeat_wait_id == 0)
diff --git a/src/sip-connection-helpers.h b/src/sip-connection-helpers.h
index 97896b9..29ed642 100644
--- a/src/sip-connection-helpers.h
+++ b/src/sip-connection-helpers.h
@@ -1,5 +1,5 @@
/*
- * sip-connection-helpers.h - Helper routines used by TpsipConnection
+ * sip-connection-helpers.h - Helper routines used by RakiaConnection
* Copyright (C) 2005 Collabora Ltd.
* Copyright (C) 2005-2009 Nokia Corporation
*
@@ -24,7 +24,7 @@
#include <glib.h>
#include "sip-connection.h"
-#include <tpsip/sofia-decls.h>
+#include <rakia/sofia-decls.h>
G_BEGIN_DECLS
@@ -32,30 +32,30 @@ G_BEGIN_DECLS
* Functions for accessing Sofia-SIP interface handles
***********************************************************************/
-nua_handle_t *tpsip_conn_create_register_handle (TpsipConnection *conn,
+nua_handle_t *rakia_conn_create_register_handle (RakiaConnection *conn,
TpHandle contact);
-nua_handle_t *tpsip_conn_create_request_handle (TpsipConnection *conn,
+nua_handle_t *rakia_conn_create_request_handle (RakiaConnection *conn,
TpHandle contact);
/***********************************************************************
* Functions for managing NUA outbound/keepalive parameters and STUN settings
***********************************************************************/
-const url_t * tpsip_conn_get_local_url (TpsipConnection *conn);
-void tpsip_conn_update_proxy_and_transport (TpsipConnection *conn);
-void tpsip_conn_update_nua_outbound (TpsipConnection *conn);
-void tpsip_conn_update_nua_keepalive_interval (TpsipConnection *conn);
-void tpsip_conn_update_nua_contact_features (TpsipConnection *conn);
-void tpsip_conn_update_stun_server (TpsipConnection *conn);
-void tpsip_conn_resolv_stun_server (TpsipConnection *conn, const gchar *stun_host);
-void tpsip_conn_discover_stun_server (TpsipConnection *conn);
+const url_t * rakia_conn_get_local_url (RakiaConnection *conn);
+void rakia_conn_update_proxy_and_transport (RakiaConnection *conn);
+void rakia_conn_update_nua_outbound (RakiaConnection *conn);
+void rakia_conn_update_nua_keepalive_interval (RakiaConnection *conn);
+void rakia_conn_update_nua_contact_features (RakiaConnection *conn);
+void rakia_conn_update_stun_server (RakiaConnection *conn);
+void rakia_conn_resolv_stun_server (RakiaConnection *conn, const gchar *stun_host);
+void rakia_conn_discover_stun_server (RakiaConnection *conn);
/***********************************************************************
* Heartbeat management for keepalives
***********************************************************************/
-void tpsip_conn_heartbeat_init (TpsipConnection *self);
-void tpsip_conn_heartbeat_shutdown (TpsipConnection *self);
+void rakia_conn_heartbeat_init (RakiaConnection *self);
+void rakia_conn_heartbeat_shutdown (RakiaConnection *self);
G_END_DECLS
diff --git a/src/sip-connection-manager.c b/src/sip-connection-manager.c
index cf8e954..9ae2e4f 100644
--- a/src/sip-connection-manager.c
+++ b/src/sip-connection-manager.c
@@ -1,5 +1,5 @@
/*
- * sip-connection-manager.c - Source for TpsipConnectionManager
+ * sip-connection-manager.c - Source for RakiaConnectionManager
* Copyright (C) 2005-2007 Collabora Ltd.
* Copyright (C) 2005-2009 Nokia Corporation
* @author Kai Vehmanen <first.surname@nokia.com>
@@ -35,7 +35,7 @@
#include <telepathy-glib/errors.h>
#include <telepathy-glib/svc-connection-manager.h>
-#include <tpsip/sofia-decls.h>
+#include <rakia/sofia-decls.h>
#include <sofia-sip/su_glib.h>
#include "protocol.h"
@@ -43,13 +43,13 @@
#include "sip-connection.h"
#define DEBUG_FLAG TPSIP_DEBUG_CONNECTION
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
-G_DEFINE_TYPE(TpsipConnectionManager, tpsip_connection_manager,
+G_DEFINE_TYPE(RakiaConnectionManager, rakia_connection_manager,
TP_TYPE_BASE_CONNECTION_MANAGER)
-struct _TpsipConnectionManagerPrivate
+struct _RakiaConnectionManagerPrivate
{
su_root_t *sofia_root;
TpDebugSender *debug_sender;
@@ -58,10 +58,10 @@ struct _TpsipConnectionManagerPrivate
#define TPSIP_CONNECTION_MANAGER_GET_PRIVATE(obj) ((obj)->priv)
static void
-tpsip_connection_manager_init (TpsipConnectionManager *obj)
+rakia_connection_manager_init (RakiaConnectionManager *obj)
{
- TpsipConnectionManagerPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE (obj,
- TPSIP_TYPE_CONNECTION_MANAGER, TpsipConnectionManagerPrivate);
+ RakiaConnectionManagerPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE (obj,
+ TPSIP_TYPE_CONNECTION_MANAGER, RakiaConnectionManagerPrivate);
GSource *source;
obj->priv = priv;
@@ -80,44 +80,44 @@ tpsip_connection_manager_init (TpsipConnectionManager *obj)
}
static void
-tpsip_connection_manager_constructed (GObject *object)
+rakia_connection_manager_constructed (GObject *object)
{
- TpsipConnectionManager *self = TPSIP_CONNECTION_MANAGER (object);
+ RakiaConnectionManager *self = TPSIP_CONNECTION_MANAGER (object);
TpBaseConnectionManager *base = (TpBaseConnectionManager *) self;
void (*constructed) (GObject *) =
- ((GObjectClass *) tpsip_connection_manager_parent_class)->constructed;
+ ((GObjectClass *) rakia_connection_manager_parent_class)->constructed;
TpBaseProtocol *protocol;
if (constructed != NULL)
constructed (object);
- protocol = tpsip_protocol_new (self->priv->sofia_root);
+ protocol = rakia_protocol_new (self->priv->sofia_root);
tp_base_connection_manager_add_protocol (base, protocol);
g_object_unref (protocol);
}
-static void tpsip_connection_manager_finalize (GObject *object);
+static void rakia_connection_manager_finalize (GObject *object);
static void
-tpsip_connection_manager_class_init (TpsipConnectionManagerClass *klass)
+rakia_connection_manager_class_init (RakiaConnectionManagerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
TpBaseConnectionManagerClass *base_class =
(TpBaseConnectionManagerClass *)klass;
- g_type_class_add_private (klass, sizeof (TpsipConnectionManagerPrivate));
+ g_type_class_add_private (klass, sizeof (RakiaConnectionManagerPrivate));
- object_class->constructed = tpsip_connection_manager_constructed;
- object_class->finalize = tpsip_connection_manager_finalize;
+ object_class->constructed = rakia_connection_manager_constructed;
+ object_class->finalize = rakia_connection_manager_finalize;
- base_class->cm_dbus_name = "sofiasip";
+ base_class->cm_dbus_name = "rakia";
}
void
-tpsip_connection_manager_finalize (GObject *object)
+rakia_connection_manager_finalize (GObject *object)
{
- TpsipConnectionManager *self = TPSIP_CONNECTION_MANAGER (object);
- TpsipConnectionManagerPrivate *priv = TPSIP_CONNECTION_MANAGER_GET_PRIVATE (self);
+ RakiaConnectionManager *self = TPSIP_CONNECTION_MANAGER (object);
+ RakiaConnectionManagerPrivate *priv = TPSIP_CONNECTION_MANAGER_GET_PRIVATE (self);
GSource *source;
source = su_root_gsource(priv->sofia_root);
@@ -130,7 +130,7 @@ tpsip_connection_manager_finalize (GObject *object)
priv->debug_sender = NULL;
}
- tpsip_debug_free ();
+ rakia_debug_free ();
- G_OBJECT_CLASS (tpsip_connection_manager_parent_class)->finalize (object);
+ G_OBJECT_CLASS (rakia_connection_manager_parent_class)->finalize (object);
}
diff --git a/src/sip-connection-manager.h b/src/sip-connection-manager.h
index 9d49228..1def40a 100644
--- a/src/sip-connection-manager.h
+++ b/src/sip-connection-manager.h
@@ -1,5 +1,5 @@
/*
- * sip-connection-manager.h - Header for TpsipConnectionManager
+ * sip-connection-manager.h - Header for RakiaConnectionManager
* Copyright (C) 2005 Collabora Ltd.
* Copyright (C) 2005-2008 Nokia Corporation
*
@@ -27,36 +27,36 @@
G_BEGIN_DECLS
-typedef struct _TpsipConnectionManager TpsipConnectionManager;
-typedef struct _TpsipConnectionManagerClass TpsipConnectionManagerClass;
-typedef struct _TpsipConnectionManagerPrivate TpsipConnectionManagerPrivate;
+typedef struct _RakiaConnectionManager RakiaConnectionManager;
+typedef struct _RakiaConnectionManagerClass RakiaConnectionManagerClass;
+typedef struct _RakiaConnectionManagerPrivate RakiaConnectionManagerPrivate;
-struct _TpsipConnectionManagerClass {
+struct _RakiaConnectionManagerClass {
TpBaseConnectionManagerClass parent_class;
};
-struct _TpsipConnectionManager {
+struct _RakiaConnectionManager {
TpBaseConnectionManager parent;
- TpsipConnectionManagerPrivate *priv;
+ RakiaConnectionManagerPrivate *priv;
};
-GType tpsip_connection_manager_get_type(void);
+GType rakia_connection_manager_get_type(void);
/* TYPE MACROS */
#define TPSIP_TYPE_CONNECTION_MANAGER \
- (tpsip_connection_manager_get_type())
+ (rakia_connection_manager_get_type())
#define TPSIP_CONNECTION_MANAGER(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_CONNECTION_MANAGER, TpsipConnectionManager))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_CONNECTION_MANAGER, RakiaConnectionManager))
#define TPSIP_CONNECTION_MANAGER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_CONNECTION_MANAGER, TpsipConnectionManagerClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_CONNECTION_MANAGER, RakiaConnectionManagerClass))
#define TPSIP_IS_CONNECTION_MANAGER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TPSIP_TYPE_CONNECTION_MANAGER))
#define TPSIP_IS_CONNECTION_MANAGER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), TPSIP_TYPE_CONNECTION_MANAGER))
#define TPSIP_CONNECTION_MANAGER_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_CONNECTION_MANAGER, TpsipConnectionManagerClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_CONNECTION_MANAGER, RakiaConnectionManagerClass))
-extern const TpCMProtocolSpec tpsip_protocols[];
+extern const TpCMProtocolSpec rakia_protocols[];
G_END_DECLS
diff --git a/src/sip-connection-private.h b/src/sip-connection-private.h
index dbe30c4..5641b65 100644
--- a/src/sip-connection-private.h
+++ b/src/sip-connection-private.h
@@ -1,5 +1,5 @@
/*
- * sip-connection-private.h - Private structures for TpsipConnection
+ * sip-connection-private.h - Private structures for RakiaConnection
* Copyright (C) 2005-2007 Collabora Ltd.
* Copyright (C) 2005-2009 Nokia Corporation
*
@@ -23,8 +23,8 @@
#include "config.h"
-#include <tpsip/media-manager.h>
-#include <tpsip/sofia-decls.h>
+#include <rakia/media-manager.h>
+#include <rakia/sofia-decls.h>
#include <sofia-sip/sresolv.h>
#include <telepathy-glib/simple-password-manager.h>
@@ -33,7 +33,7 @@
#include <libiphb.h>
#endif
-struct _TpsipConnectionPrivate
+struct _RakiaConnectionPrivate
{
nua_t *sofia_nua;
su_home_t *sofia_home;
@@ -51,7 +51,7 @@ struct _TpsipConnectionPrivate
gchar *registrar_realm;
- TpsipMediaManager *media_manager;
+ RakiaMediaManager *media_manager;
TpSimplePasswordManager *password_manager;
gchar *address;
@@ -59,7 +59,7 @@ struct _TpsipConnectionPrivate
gchar *password;
gchar *alias;
gchar *transport;
- TpsipConnectionKeepaliveMechanism keepalive_mechanism;
+ RakiaConnectionKeepaliveMechanism keepalive_mechanism;
guint keepalive_interval;
gboolean discover_stun;
gchar *stun_host;
@@ -79,6 +79,6 @@ struct _TpsipConnectionPrivate
/* #define TPSIP_PROTOCOL_STRING "sip" */
-#define TPSIP_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_CONNECTION, TpsipConnectionPrivate))
+#define TPSIP_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPSIP_TYPE_CONNECTION, RakiaConnectionPrivate))
#endif /*__TPSIP_CONNECTION_PRIVATE_H__*/
diff --git a/src/sip-connection.c b/src/sip-connection.c
index 1e1ef89..bf93bc4 100644
--- a/src/sip-connection.c
+++ b/src/sip-connection.c
@@ -1,5 +1,5 @@
/*
- * sip-connection.c - Source for TpsipConnection
+ * sip-connection.c - Source for RakiaConnection
* Copyright (C) 2005-2007 Collabora Ltd.
* Copyright (C) 2005-2009 Nokia Corporation
* @author Kai Vehmanen <first.surname@nokia.com>
@@ -35,11 +35,11 @@
#include <telepathy-glib/svc-connection.h>
#include <telepathy-glib/svc-generic.h>
-#include <tpsip/event-target.h>
-#include <tpsip/handles.h>
-#include <tpsip/connection-aliasing.h>
-#include <tpsip/media-manager.h>
-#include <tpsip/text-manager.h>
+#include <rakia/event-target.h>
+#include <rakia/handles.h>
+#include <rakia/connection-aliasing.h>
+#include <rakia/media-manager.h>
+#include <rakia/text-manager.h>
#include "sip-connection.h"
@@ -50,14 +50,14 @@
#include <sofia-sip/msg_header.h>
#define DEBUG_FLAG TPSIP_DEBUG_CONNECTION
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
-G_DEFINE_TYPE_WITH_CODE (TpsipConnection, tpsip_connection,
+G_DEFINE_TYPE_WITH_CODE (RakiaConnection, rakia_connection,
TPSIP_TYPE_BASE_CONNECTION,
G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_DBUS_PROPERTIES,
tp_dbus_properties_mixin_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_ALIASING,
- tpsip_connection_aliasing_svc_iface_init);
+ rakia_connection_aliasing_svc_iface_init);
G_IMPLEMENT_INTERFACE (TPSIP_TYPE_CONNECTION_ALIASING, NULL);
);
@@ -74,7 +74,7 @@ enum
PROP_PROXY, /**< outbound SIP proxy (SIP URI) */
PROP_REGISTRAR, /**< SIP registrar (SIP URI) */
PROP_LOOSE_ROUTING, /**< enable loose routing behavior */
- PROP_KEEPALIVE_MECHANISM, /**< keepalive mechanism as defined by TpsipConnectionKeepaliveMechanism */
+ PROP_KEEPALIVE_MECHANISM, /**< keepalive mechanism as defined by RakiaConnectionKeepaliveMechanism */
PROP_KEEPALIVE_INTERVAL, /**< keepalive interval in seconds */
PROP_DISCOVER_BINDING, /**< enable discovery of public binding */
PROP_DISCOVER_STUN, /**< Discover STUN server name using DNS SRV lookup */
@@ -118,22 +118,22 @@ priv_url_from_string_value (su_home_t *home, const GValue *value)
}
static void
-tpsip_create_handle_repos (TpBaseConnection *conn,
+rakia_create_handle_repos (TpBaseConnection *conn,
TpHandleRepoIface *repos[NUM_TP_HANDLE_TYPES])
{
repos[TP_HANDLE_TYPE_CONTACT] =
(TpHandleRepoIface *)g_object_new (TP_TYPE_DYNAMIC_HANDLE_REPO,
"handle-type", TP_HANDLE_TYPE_CONTACT,
- "normalize-function", tpsip_handle_normalize,
+ "normalize-function", rakia_handle_normalize,
"default-normalize-context", conn,
NULL);
}
static GPtrArray *
-tpsip_connection_create_channel_managers (TpBaseConnection *conn)
+rakia_connection_create_channel_managers (TpBaseConnection *conn)
{
- TpsipConnection *self = TPSIP_CONNECTION (conn);
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
+ RakiaConnection *self = TPSIP_CONNECTION (conn);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
GPtrArray *channel_managers = g_ptr_array_sized_new (2);
g_ptr_array_add (channel_managers,
@@ -152,23 +152,23 @@ tpsip_connection_create_channel_managers (TpBaseConnection *conn)
}
static void
-tpsip_connection_init (TpsipConnection *self)
+rakia_connection_init (RakiaConnection *self)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
priv->sofia_home = su_home_new(sizeof (su_home_t));
- tpsip_connection_aliasing_init (self);
+ rakia_connection_aliasing_init (self);
}
static void
-tpsip_connection_set_property (GObject *object,
+rakia_connection_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- TpsipConnection *self = (TpsipConnection*) object;
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
+ RakiaConnection *self = (RakiaConnection*) object;
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
switch (property_id) {
case PROP_ADDRESS: {
@@ -213,7 +213,7 @@ tpsip_connection_set_property (GObject *object,
break;
}
case PROP_KEEPALIVE_MECHANISM: {
- TpsipConnectionKeepaliveMechanism mech = g_value_get_enum (value);
+ RakiaConnectionKeepaliveMechanism mech = g_value_get_enum (value);
if (priv->keepalive_interval_specified && priv->keepalive_interval == 0)
{
if (mech != TPSIP_CONNECTION_KEEPALIVE_NONE
@@ -225,8 +225,8 @@ tpsip_connection_set_property (GObject *object,
priv->keepalive_mechanism = mech;
if (priv->sofia_nua != NULL)
{
- tpsip_conn_update_nua_outbound (self);
- tpsip_conn_update_nua_keepalive_interval (self);
+ rakia_conn_update_nua_outbound (self);
+ rakia_conn_update_nua_keepalive_interval (self);
}
}
break;
@@ -238,18 +238,18 @@ tpsip_connection_set_property (GObject *object,
{
priv->keepalive_mechanism = TPSIP_CONNECTION_KEEPALIVE_NONE;
if (priv->sofia_nua != NULL)
- tpsip_conn_update_nua_outbound (self);
+ rakia_conn_update_nua_outbound (self);
}
if (priv->sofia_nua)
{
- tpsip_conn_update_nua_keepalive_interval(self);
+ rakia_conn_update_nua_keepalive_interval(self);
}
break;
}
case PROP_DISCOVER_BINDING: {
priv->discover_binding = g_value_get_boolean (value);
if (priv->sofia_nua)
- tpsip_conn_update_nua_outbound (self);
+ rakia_conn_update_nua_outbound (self);
break;
}
case PROP_DISCOVER_STUN:
@@ -294,13 +294,13 @@ tpsip_connection_set_property (GObject *object,
}
static void
-tpsip_connection_get_property (GObject *object,
+rakia_connection_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- TpsipConnection *self = (TpsipConnection *) object;
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
+ RakiaConnection *self = (RakiaConnection *) object;
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
switch (property_id) {
case PROP_ADDRESS: {
@@ -382,23 +382,23 @@ tpsip_connection_get_property (GObject *object,
}
}
-static void tpsip_connection_dispose (GObject *object);
-static void tpsip_connection_finalize (GObject *object);
+static void rakia_connection_dispose (GObject *object);
+static void rakia_connection_finalize (GObject *object);
static gchar *
-tpsip_connection_unique_name (TpBaseConnection *base)
+rakia_connection_unique_name (TpBaseConnection *base)
{
- TpsipConnection *conn = TPSIP_CONNECTION (base);
- TpsipConnectionPrivate *priv;
+ RakiaConnection *conn = TPSIP_CONNECTION (base);
+ RakiaConnectionPrivate *priv;
g_assert (TPSIP_IS_CONNECTION (conn));
priv = TPSIP_CONNECTION_GET_PRIVATE (conn);
return g_strdup (priv->address);
}
-static void tpsip_connection_disconnected (TpBaseConnection *base);
-static void tpsip_connection_shut_down (TpBaseConnection *base);
-static gboolean tpsip_connection_start_connecting (TpBaseConnection *base,
+static void rakia_connection_disconnected (TpBaseConnection *base);
+static void rakia_connection_shut_down (TpBaseConnection *base);
+static gboolean rakia_connection_start_connecting (TpBaseConnection *base,
GError **error);
static const gchar *interfaces_always_present[] = {
@@ -408,46 +408,46 @@ static const gchar *interfaces_always_present[] = {
NULL };
const gchar **
-tpsip_connection_get_implemented_interfaces (void)
+rakia_connection_get_implemented_interfaces (void)
{
/* we don't have any conditionally-implemented interfaces */
return interfaces_always_present;
}
-static nua_handle_t *tpsip_connection_create_nua_handle (TpsipBaseConnection *,
+static nua_handle_t *rakia_connection_create_nua_handle (RakiaBaseConnection *,
TpHandle);
-static void tpsip_connection_add_auth_handler (TpsipBaseConnection *,
- TpsipEventTarget *);
+static void rakia_connection_add_auth_handler (RakiaBaseConnection *,
+ RakiaEventTarget *);
static void
-tpsip_connection_class_init (TpsipConnectionClass *klass)
+rakia_connection_class_init (RakiaConnectionClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
TpBaseConnectionClass *base_class = TP_BASE_CONNECTION_CLASS (klass);
- TpsipBaseConnectionClass *sip_class = TPSIP_BASE_CONNECTION_CLASS (klass);
+ RakiaBaseConnectionClass *sip_class = TPSIP_BASE_CONNECTION_CLASS (klass);
GParamSpec *param_spec;
/* Implement pure-virtual methods */
- sip_class->create_handle = tpsip_connection_create_nua_handle;
- sip_class->add_auth_handler = tpsip_connection_add_auth_handler;
+ sip_class->create_handle = rakia_connection_create_nua_handle;
+ sip_class->add_auth_handler = rakia_connection_add_auth_handler;
- base_class->create_handle_repos = tpsip_create_handle_repos;
- base_class->get_unique_connection_name = tpsip_connection_unique_name;
+ base_class->create_handle_repos = rakia_create_handle_repos;
+ base_class->get_unique_connection_name = rakia_connection_unique_name;
base_class->create_channel_managers =
- tpsip_connection_create_channel_managers;
+ rakia_connection_create_channel_managers;
base_class->create_channel_factories = NULL;
- base_class->disconnected = tpsip_connection_disconnected;
- base_class->start_connecting = tpsip_connection_start_connecting;
- base_class->shut_down = tpsip_connection_shut_down;
+ base_class->disconnected = rakia_connection_disconnected;
+ base_class->start_connecting = rakia_connection_start_connecting;
+ base_class->shut_down = rakia_connection_shut_down;
base_class->interfaces_always_present = interfaces_always_present;
- g_type_class_add_private (klass, sizeof (TpsipConnectionPrivate));
+ g_type_class_add_private (klass, sizeof (RakiaConnectionPrivate));
- object_class->dispose = tpsip_connection_dispose;
- object_class->finalize = tpsip_connection_finalize;
+ object_class->dispose = rakia_connection_dispose;
+ object_class->finalize = rakia_connection_finalize;
- object_class->set_property = tpsip_connection_set_property;
- object_class->get_property = tpsip_connection_get_property;
+ object_class->set_property = rakia_connection_set_property;
+ object_class->get_property = rakia_connection_get_property;
#define INST_PROP(x) \
g_object_class_install_property (object_class, x, param_spec)
@@ -501,7 +501,7 @@ tpsip_connection_class_init (TpsipConnectionClass *klass)
param_spec = g_param_spec_enum ("keepalive-mechanism", "Keepalive mechanism",
"Keepalive mechanism for SIP registration",
- tpsip_connection_keepalive_mechanism_get_type (),
+ rakia_connection_keepalive_mechanism_get_type (),
TPSIP_CONNECTION_KEEPALIVE_AUTO, /*default value*/
G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
INST_PROP(PROP_KEEPALIVE_MECHANISM);
@@ -574,11 +574,11 @@ tpsip_connection_class_init (TpsipConnectionClass *klass)
#undef INST_PROP
tp_dbus_properties_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpsipConnectionClass, properties_class));
+ G_STRUCT_OFFSET (RakiaConnectionClass, properties_class));
}
typedef struct {
- TpsipConnection* self;
+ RakiaConnection* self;
nua_handle_t *nh;
gchar *method;
gchar *realm;
@@ -586,7 +586,7 @@ typedef struct {
} PrivHandleAuthData;
static PrivHandleAuthData *
-priv_handle_auth_data_new (TpsipConnection* self,
+priv_handle_auth_data_new (RakiaConnection* self,
nua_handle_t *nh,
const gchar *method,
const gchar *realm,
@@ -618,7 +618,7 @@ priv_handle_auth_data_free (PrivHandleAuthData *data)
static void priv_password_manager_prompt_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data);
-static void priv_handle_auth_continue (TpsipConnection* self,
+static void priv_handle_auth_continue (RakiaConnection* self,
nua_handle_t *nh,
const gchar *method,
const gchar *realm,
@@ -626,13 +626,13 @@ static void priv_handle_auth_continue (TpsipConnection* self,
const gchar *password);
static gboolean
-priv_handle_auth (TpsipConnection* self,
+priv_handle_auth (RakiaConnection* self,
int status,
nua_handle_t *nh,
const sip_t *sip,
gboolean home_realm)
{
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
sip_www_authenticate_t const *wa;
sip_proxy_authenticate_t const *pa;
const char *method = NULL;
@@ -768,7 +768,7 @@ priv_password_manager_prompt_cb (GObject *source_object,
}
else
{
- TpsipConnectionPrivate *priv =
+ RakiaConnectionPrivate *priv =
TPSIP_CONNECTION_GET_PRIVATE (data->self);
password = password_string->str;
@@ -784,7 +784,7 @@ priv_password_manager_prompt_cb (GObject *source_object,
}
static void
-priv_handle_auth_continue (TpsipConnection* self,
+priv_handle_auth_continue (RakiaConnection* self,
nua_handle_t *nh,
const gchar *method,
const gchar *realm,
@@ -816,10 +816,10 @@ priv_handle_auth_continue (TpsipConnection* self,
}
static gboolean
-tpsip_connection_auth_cb (TpsipEventTarget *target,
- const TpsipNuaEvent *ev,
+rakia_connection_auth_cb (RakiaEventTarget *target,
+ const RakiaNuaEvent *ev,
tagi_t tags[],
- TpsipConnection *self)
+ RakiaConnection *self)
{
return priv_handle_auth (self,
ev->status,
@@ -829,25 +829,25 @@ tpsip_connection_auth_cb (TpsipEventTarget *target,
}
static void
-tpsip_connection_add_auth_handler (TpsipBaseConnection *self,
- TpsipEventTarget *target)
+rakia_connection_add_auth_handler (RakiaBaseConnection *self,
+ RakiaEventTarget *target)
{
g_signal_connect_object (target,
"nua-event",
- G_CALLBACK (tpsip_connection_auth_cb),
+ G_CALLBACK (rakia_connection_auth_cb),
self,
0);
}
static nua_handle_t *
-tpsip_connection_create_nua_handle (TpsipBaseConnection *base, TpHandle handle)
+rakia_connection_create_nua_handle (RakiaBaseConnection *base, TpHandle handle)
{
- return tpsip_conn_create_request_handle (TPSIP_CONNECTION (base), handle);
+ return rakia_conn_create_request_handle (TPSIP_CONNECTION (base), handle);
}
static gboolean
-tpsip_connection_nua_r_register_cb (TpsipConnection *self,
- const TpsipNuaEvent *ev,
+rakia_connection_nua_r_register_cb (RakiaConnection *self,
+ const RakiaNuaEvent *ev,
tagi_t tags[],
gpointer foo)
{
@@ -887,7 +887,7 @@ tpsip_connection_nua_r_register_cb (TpsipConnection *self,
conn_status = TP_CONNECTION_STATUS_CONNECTED;
reason = TP_CONNECTION_STATUS_REASON_REQUESTED;
- tpsip_conn_heartbeat_init (self);
+ rakia_conn_heartbeat_init (self);
}
}
@@ -897,10 +897,10 @@ tpsip_connection_nua_r_register_cb (TpsipConnection *self,
}
static void
-tpsip_connection_shut_down (TpBaseConnection *base)
+rakia_connection_shut_down (TpBaseConnection *base)
{
- TpsipConnection *self = TPSIP_CONNECTION (base);
- TpsipConnectionPrivate *priv;
+ RakiaConnection *self = TPSIP_CONNECTION (base);
+ RakiaConnectionPrivate *priv;
DEBUG ("enter");
@@ -909,7 +909,7 @@ tpsip_connection_shut_down (TpBaseConnection *base)
/* We disposed of the REGISTER handle in the disconnected method */
g_assert (priv->register_op == NULL);
- tpsip_conn_heartbeat_shutdown (self);
+ rakia_conn_heartbeat_shutdown (self);
if (priv->sofia_nua != NULL)
nua_shutdown (priv->sofia_nua);
@@ -920,11 +920,11 @@ tpsip_connection_shut_down (TpBaseConnection *base)
}
void
-tpsip_connection_dispose (GObject *object)
+rakia_connection_dispose (GObject *object)
{
- TpsipConnection *self = TPSIP_CONNECTION (object);
+ RakiaConnection *self = TPSIP_CONNECTION (object);
TpBaseConnection *base = (TpBaseConnection *)self;
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
if (priv->dispose_has_run)
return;
@@ -933,7 +933,7 @@ tpsip_connection_dispose (GObject *object)
/* release any references held by the object here */
- DEBUG("disposing of TpsipConnection %p", self);
+ DEBUG("disposing of RakiaConnection %p", self);
/* the base class is responsible for unreffing the self handle when we
* disconnect */
@@ -944,15 +944,15 @@ tpsip_connection_dispose (GObject *object)
* here we just nullify the references */
priv->media_manager = NULL;
- if (G_OBJECT_CLASS (tpsip_connection_parent_class)->dispose)
- G_OBJECT_CLASS (tpsip_connection_parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (rakia_connection_parent_class)->dispose)
+ G_OBJECT_CLASS (rakia_connection_parent_class)->dispose (object);
}
void
-tpsip_connection_finalize (GObject *obj)
+rakia_connection_finalize (GObject *obj)
{
- TpsipConnection *self = TPSIP_CONNECTION (obj);
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
+ RakiaConnection *self = TPSIP_CONNECTION (obj);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
/* free any data held directly by the object here */
@@ -981,15 +981,15 @@ tpsip_connection_finalize (GObject *obj)
tp_contacts_mixin_finalize (obj);
- G_OBJECT_CLASS (tpsip_connection_parent_class)->finalize (obj);
+ G_OBJECT_CLASS (rakia_connection_parent_class)->finalize (obj);
}
static gboolean
-tpsip_connection_start_connecting (TpBaseConnection *base,
+rakia_connection_start_connecting (TpBaseConnection *base,
GError **error)
{
- TpsipConnection *self = TPSIP_CONNECTION (base);
- TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
+ RakiaConnection *self = TPSIP_CONNECTION (base);
+ RakiaConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self);
TpHandleRepoIface *contact_repo;
const gchar *sip_address;
const url_t *local_url;
@@ -1014,7 +1014,7 @@ tpsip_connection_start_connecting (TpBaseConnection *base,
DEBUG("self_handle = %d, sip_address = %s", base->self_handle, sip_address);
- priv->account_url = tpsip_handle_inspect_uri (base, base->self_handle);
+ priv->account_url = rakia_handle_inspect_uri (base, base->self_handle);
if (priv->account_url == NULL)
{
g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
@@ -1022,11 +1022,11 @@ tpsip_connection_start_connecting (TpBaseConnection *base,
return FALSE;
}
- local_url = tpsip_conn_get_local_url (self);
+ local_url = rakia_conn_get_local_url (self);
/* step: create stack instance */
priv->sofia_nua = nua_create (root,
- tpsip_base_connection_sofia_callback,
+ rakia_base_connection_sofia_callback,
TPSIP_BASE_CONNECTION (self),
SOATAG_AF(SOA_AF_IP4_IP6),
SIPTAG_FROM_STR(sip_address),
@@ -1050,15 +1050,15 @@ tpsip_connection_start_connecting (TpBaseConnection *base,
}
/* Set configuration-dependent tags */
- tpsip_conn_update_proxy_and_transport (self);
- tpsip_conn_update_nua_outbound (self);
- tpsip_conn_update_nua_keepalive_interval (self);
- tpsip_conn_update_nua_contact_features (self);
+ rakia_conn_update_proxy_and_transport (self);
+ rakia_conn_update_nua_outbound (self);
+ rakia_conn_update_nua_keepalive_interval (self);
+ rakia_conn_update_nua_contact_features (self);
if (priv->stun_host != NULL)
- tpsip_conn_resolv_stun_server (self, priv->stun_host);
+ rakia_conn_resolv_stun_server (self, priv->stun_host);
else if (priv->discover_stun)
- tpsip_conn_discover_stun_server (self);
+ rakia_conn_discover_stun_server (self);
DEBUG("initialized a Sofia-SIP NUA at address %p", priv->sofia_nua);
@@ -1068,10 +1068,10 @@ tpsip_connection_start_connecting (TpBaseConnection *base,
g_signal_connect (self,
"nua-event::nua_r_register",
- G_CALLBACK (tpsip_connection_nua_r_register_cb),
+ G_CALLBACK (rakia_connection_nua_r_register_cb),
NULL);
- priv->register_op = tpsip_conn_create_register_handle (self,
+ priv->register_op = rakia_conn_create_register_handle (self,
base->self_handle);
if (priv->register_op == NULL)
{
@@ -1080,7 +1080,7 @@ tpsip_connection_start_connecting (TpBaseConnection *base,
return FALSE;
}
- tpsip_event_target_attach (priv->register_op, (GObject *) self);
+ rakia_event_target_attach (priv->register_op, (GObject *) self);
nua_register (priv->register_op, TAG_NULL());
@@ -1089,15 +1089,15 @@ tpsip_connection_start_connecting (TpBaseConnection *base,
/**
- * tpsip_connection_disconnected
+ * rakia_connection_disconnected
*
* Called after the connection becomes disconnected.
*/
static void
-tpsip_connection_disconnected (TpBaseConnection *base)
+rakia_connection_disconnected (TpBaseConnection *base)
{
- TpsipConnection *obj = TPSIP_CONNECTION (base);
- TpsipConnectionPrivate *priv;
+ RakiaConnection *obj = TPSIP_CONNECTION (base);
+ RakiaConnectionPrivate *priv;
priv = TPSIP_CONNECTION_GET_PRIVATE (obj);
diff --git a/src/sip-connection.h b/src/sip-connection.h
index dffbf6f..5e79773 100644
--- a/src/sip-connection.h
+++ b/src/sip-connection.h
@@ -1,5 +1,5 @@
/*
- * sip-connection.h - Header for TpsipConnection
+ * sip-connection.h - Header for RakiaConnection
* Copyright (C) 2005 Collabora Ltd.
* Copyright (C) 2005-2009 Nokia Corporation
*
@@ -23,7 +23,7 @@
#include <glib-object.h>
-#include <tpsip/base-connection.h>
+#include <rakia/base-connection.h>
#include <telepathy-glib/dbus-properties-mixin.h>
G_BEGIN_DECLS
@@ -35,41 +35,41 @@ typedef enum
TPSIP_CONNECTION_KEEPALIVE_REGISTER, /** Maintain registration with REGISTER requests */
TPSIP_CONNECTION_KEEPALIVE_OPTIONS, /** Maintain registration with OPTIONS requests */
TPSIP_CONNECTION_KEEPALIVE_STUN, /** Maintain registration with STUN as described in IETF draft-sip-outbound */
-} TpsipConnectionKeepaliveMechanism;
+} RakiaConnectionKeepaliveMechanism;
-typedef struct _TpsipConnection TpsipConnection;
-typedef struct _TpsipConnectionClass TpsipConnectionClass;
-typedef struct _TpsipConnectionPrivate TpsipConnectionPrivate;
+typedef struct _RakiaConnection RakiaConnection;
+typedef struct _RakiaConnectionClass RakiaConnectionClass;
+typedef struct _RakiaConnectionPrivate RakiaConnectionPrivate;
-struct _TpsipConnectionClass {
- TpsipBaseConnectionClass parent_class;
+struct _RakiaConnectionClass {
+ RakiaBaseConnectionClass parent_class;
TpDBusPropertiesMixinClass properties_class;
};
-struct _TpsipConnection {
- TpsipBaseConnection parent;
+struct _RakiaConnection {
+ RakiaBaseConnection parent;
};
/* TYPE MACROS */
#define TPSIP_TYPE_CONNECTION \
- (tpsip_connection_get_type())
+ (rakia_connection_get_type())
#define TPSIP_CONNECTION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_CONNECTION, TpsipConnection))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), TPSIP_TYPE_CONNECTION, RakiaConnection))
#define TPSIP_CONNECTION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_CONNECTION, TpsipConnectionClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass), TPSIP_TYPE_CONNECTION, RakiaConnectionClass))
#define TPSIP_IS_CONNECTION(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TPSIP_TYPE_CONNECTION))
#define TPSIP_IS_CONNECTION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), TPSIP_TYPE_CONNECTION))
#define TPSIP_CONNECTION_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_CONNECTION, TpsipConnectionClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TPSIP_TYPE_CONNECTION, RakiaConnectionClass))
-GType tpsip_connection_get_type (void) G_GNUC_CONST;
+GType rakia_connection_get_type (void) G_GNUC_CONST;
-void tpsip_connection_connect_auth_handler (TpsipConnection *self,
- TpsipEventTarget *target);
+void rakia_connection_connect_auth_handler (RakiaConnection *self,
+ RakiaEventTarget *target);
-const gchar **tpsip_connection_get_implemented_interfaces (void);
+const gchar **rakia_connection_get_implemented_interfaces (void);
G_END_DECLS
diff --git a/src/telepathy-sofiasip.c b/src/telepathy-rakia.c
index e3cc812..76dffe7 100644
--- a/src/telepathy-sofiasip.c
+++ b/src/telepathy-rakia.c
@@ -1,5 +1,5 @@
/*
- * sip-connection.c - Source for TpsipConnection
+ * sip-connection.c - Source for RakiaConnection
* Copyright (C) 2005 Collabora Ltd.
* Copyright (C) 2005-2008, 2010 Nokia Corporation
* @author Kai Vehmanen <first.surname@nokia.com>
@@ -26,7 +26,7 @@
#include "config.h"
-#include "tpsip/debug.h"
+#include "rakia/debug.h"
#include "sip-connection-manager.h"
#include <telepathy-glib/run.h>
@@ -52,22 +52,22 @@ main (int argc, char** argv)
g_log_set_always_fatal (fatal_mask);
#ifdef ENABLE_DEBUG
- tpsip_debug_set_flags_from_env ();
+ rakia_debug_set_flags_from_env ();
#endif
- if (g_getenv ("TPSIP_PERSIST") || g_getenv ("SOFIASIP_PERSIST"))
+ if (g_getenv ("TPSIP_PERSIST") || g_getenv ("RAKIA_PERSIST"))
{
tp_debug_set_persistent (TRUE);
}
tp_debug_divert_messages (g_getenv ("TPSIP_LOGFILE"));
- logdata = tpsip_sofia_log_init ();
+ logdata = rakia_sofia_log_init ();
- status = tp_run_connection_manager ("telepathy-sofiasip", VERSION,
+ status = tp_run_connection_manager ("telepathy-rakia", VERSION,
construct_cm, argc, argv);
- tpsip_sofia_log_finalize (logdata);
+ rakia_sofia_log_finalize (logdata);
return status;
}
diff --git a/src/write-mgr-file.c b/src/write-mgr-file.c
index 402e89e..468fc7a 100644
--- a/src/write-mgr-file.c
+++ b/src/write-mgr-file.c
@@ -336,10 +336,10 @@ main (void)
dbus_g_type_specialized_init ();
protocols = g_slist_prepend (protocols,
- tpsip_protocol_new (NULL));
+ rakia_protocol_new (NULL));
- s = mgr_file_contents (TP_CM_BUS_NAME_BASE "sofiasip",
- TP_CM_OBJECT_PATH_BASE "sofiasip",
+ s = mgr_file_contents (TP_CM_BUS_NAME_BASE "rakia",
+ TP_CM_OBJECT_PATH_BASE "rakia",
protocols, &error);
g_object_unref (protocols->data);
diff --git a/tests/tp_caller.c b/tests/tp_caller.c
index 8ded84f..d1404e0 100644
--- a/tests/tp_caller.c
+++ b/tests/tp_caller.c
@@ -1,5 +1,5 @@
/*
- * tp_test.c - telepathy-sofiasip test utility (modified from
+ * tp_test.c - telepathy-rakia test utility (modified from
* libtelepathy's proto.c)
*
* Copyright (C) 2005-2006 Nokia Corporation.
@@ -45,9 +45,9 @@
/*
* Test connection manager and account
*/
-#define CONNMGR_NAME "sofiasip"
-#define CONNMGR_BUS "org.freedesktop.Telepathy.ConnectionManager.sofiasip"
-#define CONNMGR_PATH "/org/freedesktop/Telepathy/ConnectionManager/sofiasip"
+#define CONNMGR_NAME "rakia"
+#define CONNMGR_BUS "org.freedesktop.Telepathy.ConnectionManager.rakia"
+#define CONNMGR_PATH "/org/freedesktop/Telepathy/ConnectionManager/rakia"
#define PROTOCOL "sip"
enum {
diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index e1d03b3..e8528a4 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -24,7 +24,7 @@ CHECK_TWISTED_SLEEP=0
check-twisted:
$(MAKE) -C tools
- rm -f tools/sofiasip-testing.log
+ rm -f tools/rakia-testing.log
sh $(srcdir)/tools/with-session-bus.sh \
--config-file=tools/tmp-session-bus.conf \
--sleep=$(CHECK_TWISTED_SLEEP) \
@@ -40,7 +40,7 @@ EXTRA_DIST = \
servicetest.py \
voip/voip_test.py
-CLEANFILES = sofiasip-[1-9]*.log *.pyc */*.pyc
+CLEANFILES = rakia-[1-9]*.log *.pyc */*.pyc
check_misc_sources = $(TESTS)
diff --git a/tests/twisted/cm/protocol.py b/tests/twisted/cm/protocol.py
index f0b0c40..f909f5f 100644
--- a/tests/twisted/cm/protocol.py
+++ b/tests/twisted/cm/protocol.py
@@ -1,5 +1,5 @@
"""
-Test tpsip's o.fd.T.Protocol implementation
+Test rakia's o.fd.T.Protocol implementation
"""
import dbus
@@ -9,8 +9,8 @@ from sofiatest import exec_test
import constants as cs
def test(q, bus, conn, sip):
- cm = bus.get_object(cs.CM + '.sofiasip',
- tp_path_prefix + '/ConnectionManager/sofiasip')
+ cm = bus.get_object(cs.CM + '.rakia',
+ tp_path_prefix + '/ConnectionManager/rakia')
cm_iface = dbus.Interface(cm, cs.CM)
cm_prop_iface = dbus.Interface(cm, cs.PROPERTIES_IFACE)
diff --git a/tests/twisted/sofiatest.py b/tests/twisted/sofiatest.py
index 23142b9..efed1e5 100644
--- a/tests/twisted/sofiatest.py
+++ b/tests/twisted/sofiatest.py
@@ -70,7 +70,7 @@ def prepare_test(event_func, register_cb, params=None):
bus = dbus.SessionBus()
conn = servicetest.make_connection(bus, event_func,
- 'sofiasip', 'sip', actual_params)
+ 'rakia', 'sip', actual_params)
port = int(actual_params['port'])
sip = SipProxy(host=actual_params['proxy-host'], port=port)
diff --git a/tests/twisted/tools/Makefile.am b/tests/twisted/tools/Makefile.am
index 1cb67b5..bd65dbd 100644
--- a/tests/twisted/tools/Makefile.am
+++ b/tests/twisted/tools/Makefile.am
@@ -12,8 +12,8 @@ org.freedesktop.Telepathy.ConnectionManager.%.service: %.service.in
sed -e "s|[@]abs_top_builddir[@]|@abs_top_builddir@|g" $< > $@
# D-Bus service file for testing
-service_in_files = sofiasip.service.in
-service_files = org.freedesktop.Telepathy.ConnectionManager.sofiasip.service
+service_in_files = rakia.service.in
+service_files = org.freedesktop.Telepathy.ConnectionManager.rakia.service
# D-Bus config file for testing
conf_in_files = tmp-session-bus.conf.in
@@ -29,4 +29,4 @@ EXTRA_DIST = \
CLEANFILES = \
$(BUILT_SOURCES) \
- sofiasip-testing.log
+ rakia-testing.log
diff --git a/tests/twisted/tools/exec-with-log.sh.in b/tests/twisted/tools/exec-with-log.sh.in
index 31f0474..1eb6c7d 100644
--- a/tests/twisted/tools/exec-with-log.sh.in
+++ b/tests/twisted/tools/exec-with-log.sh.in
@@ -5,12 +5,12 @@ cd "@abs_top_builddir@/tests/twisted/tools"
export TPSIP_DEBUG=all
export TPORT_LOG=1
ulimit -c unlimited
-exec > sofiasip-testing.log 2>&1
+exec > rakia-testing.log 2>&1
-if test -n "$SOFIASIP_TEST_VALGRIND"; then
+if test -n "$RAKIA_TEST_VALGRIND"; then
export G_DEBUG=gc-friendly
export G_SLICE=always-malloc
- SOFIASIP_WRAPPER="valgrind --leak-check=full"
+ RAKIA_WRAPPER="valgrind --leak-check=full"
fi
-exec $SOFIASIP_WRAPPER @abs_top_builddir@/src/telepathy-sofiasip
+exec $RAKIA_WRAPPER @abs_top_builddir@/src/telepathy-rakia
diff --git a/tests/twisted/tools/sofiasip.service.in b/tests/twisted/tools/rakia.service.in
index 2f9fbb9..f4b324c 100644
--- a/tests/twisted/tools/sofiasip.service.in
+++ b/tests/twisted/tools/rakia.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
-Name=org.freedesktop.Telepathy.ConnectionManager.sofiasip
+Name=org.freedesktop.Telepathy.ConnectionManager.rakia
Exec=@abs_top_builddir@/tests/twisted/tools/exec-with-log.sh
diff --git a/tests/twisted/voip/voip_test.py b/tests/twisted/voip/voip_test.py
index 7a28d16..b31928f 100644
--- a/tests/twisted/voip/voip_test.py
+++ b/tests/twisted/voip/voip_test.py
@@ -152,7 +152,7 @@ class VoipTestContext(object):
def accept(self, invite_message):
self.call_id = invite_message.headers['call-id'][0]
response = self.sip_proxy.responseFromRequest(200, invite_message)
- # Echo sofiasip's SDP back to it. It doesn't care.
+ # Echo rakia's SDP back to it. It doesn't care.
response.addHeader('content-type', 'application/sdp')
response.body = invite_message.body
response.addHeader('content-length', '%d' % len(response.body))
diff --git a/tpsip-extensions/extensions.h b/tpsip-extensions/extensions.h
deleted file mode 100644
index 47edead..0000000
--- a/tpsip-extensions/extensions.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef __SIP_EXTENSIONS_H__
-#define __SIP_EXTENSIONS_H__
-
-#include <glib-object.h>
-#include <telepathy-glib/channel.h>
-
-#include <tpsip-extensions/_gen/enums.h>
-#include <tpsip-extensions/_gen/svc-channel.h>
-
-G_BEGIN_DECLS
-
-#include <tpsip-extensions/_gen/gtypes.h>
-#include <tpsip-extensions/_gen/interfaces.h>
-
-G_END_DECLS
-
-#endif