diff options
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/Makefile.am | 18 | ||||
-rw-r--r-- | extensions/all.xml | 1 | ||||
-rw-r--r-- | extensions/call-stream.c | 161 | ||||
-rw-r--r-- | extensions/call-stream.h | 62 | ||||
-rw-r--r-- | extensions/call-stream.xml | 10 | ||||
-rw-r--r-- | extensions/extensions.h | 2 | ||||
-rw-r--r-- | extensions/misc.xml | 2 |
7 files changed, 254 insertions, 2 deletions
diff --git a/extensions/Makefile.am b/extensions/Makefile.am index cf9095925..9e30a81f2 100644 --- a/extensions/Makefile.am +++ b/extensions/Makefile.am @@ -13,6 +13,7 @@ AM_CFLAGS = \ EXTRA_DIST = \ all.xml \ call-content.xml \ + call-stream.xml \ channel.xml \ misc.xml @@ -28,6 +29,8 @@ libfuture_extensions_la_LIBADD = \ libfuture_extensions_la_SOURCES = \ call-content.c \ call-content.h \ + call-stream.c \ + call-stream.h \ extensions.c \ extensions-cli.c \ extensions.h @@ -44,12 +47,16 @@ nodist_libfuture_extensions_la_SOURCES = \ _gen/interfaces-body.h \ _gen/cli-call-content.h \ _gen/cli-call-content-body.h \ + _gen/cli-call-stream.h \ + _gen/cli-call-stream-body.h \ _gen/cli-channel.h \ _gen/cli-channel-body.h \ _gen/cli-misc.h \ _gen/cli-misc-body.h \ _gen/svc-call-content.h \ _gen/svc-call-content.c \ + _gen/svc-call-stream.h \ + _gen/svc-call-stream.c \ _gen/svc-channel.h \ _gen/svc-channel.c \ _gen/svc-misc.h \ @@ -58,6 +65,7 @@ nodist_libfuture_extensions_la_SOURCES = \ BUILT_SOURCES = \ _gen/all.xml \ _gen/call-content.xml \ + _gen/call-stream.xml \ _gen/channel.xml \ $(nodist_libfuture_extensions_la_SOURCES) @@ -142,6 +150,16 @@ _gen/cli-call-content-body.h _gen/cli-call-content.h: _gen/call-content.xml \ --tp-proxy-api=0.7.6 \ $< Future_Cli _gen/cli-call-content +_gen/cli-call-stream-body.h _gen/cli-call-stream.h: _gen/call-stream.xml \ + $(tools_dir)/glib-client-gen.py Makefile.am + $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \ + --group=call_stream \ + --subclass=FutureCallStream \ + --subclass-assert=FUTURE_IS_CALL_STREAM \ + --iface-quark-prefix=FUTURE_IFACE_QUARK \ + --tp-proxy-api=0.7.6 \ + $< Future_Cli _gen/cli-call-stream + # for now the Endpoint etc. interfaces are on every TpProxy - when we # have a TpCallEndpoint etc., they should appear on that diff --git a/extensions/all.xml b/extensions/all.xml index c1cc172fc..618cef7b0 100644 --- a/extensions/all.xml +++ b/extensions/all.xml @@ -5,6 +5,7 @@ <tp:title>Extensions from the future</tp:title> <xi:include href="call-content.xml"/> +<xi:include href="call-stream.xml"/> <xi:include href="channel.xml"/> <xi:include href="misc.xml"/> diff --git a/extensions/call-stream.c b/extensions/call-stream.c new file mode 100644 index 000000000..b99539896 --- /dev/null +++ b/extensions/call-stream.c @@ -0,0 +1,161 @@ +/* + * call-stream.c - proxy for a Stream in a Call channel + * + * Copyright (C) 2009 Collabora Ltd. <http://www.collabora.co.uk/> + * Copyright (C) 2009 Nokia Corporation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "extensions/call-stream.h" + +#include <telepathy-glib/proxy-subclass.h> +#include <telepathy-glib/telepathy-glib.h> + +#include "extensions/extensions.h" + +/* Generated code */ +#include "_gen/cli-call-stream-body.h" + +/** + * SECTION:call-stream + * @title: FutureCallStream + * @short_description: proxy for a Stream in a Call channel + * @see_also: #TpChannel + * + * FIXME + * + * Since: FIXME + */ + +/** + * FutureCallStreamClass: + * + * The class of a #FutureCallStream. + * + * Since: FIXME + */ +struct _FutureCallStreamClass { + TpProxyClass parent_class; + /*<private>*/ + gpointer priv; +}; + +/** + * FutureCallStream: + * + * A proxy object for a Telepathy connection manager. + * + * Since: FIXME + */ +struct _FutureCallStream { + TpProxy parent; + /*<private>*/ + FutureCallStreamPrivate *priv; +}; + +struct _FutureCallStreamPrivate { + int dummy; +}; + +G_DEFINE_TYPE (FutureCallStream, + future_call_stream, + TP_TYPE_PROXY); + +static void +future_call_stream_init (FutureCallStream *self) +{ + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, FUTURE_TYPE_CALL_STREAM, + FutureCallStreamPrivate); +} + +static void +future_call_stream_class_init (FutureCallStreamClass *klass) +{ + TpProxyClass *proxy_class = (TpProxyClass *) klass; + + g_type_class_add_private (klass, sizeof (FutureCallStreamPrivate)); + + proxy_class->must_have_unique_name = TRUE; + proxy_class->interface = FUTURE_IFACE_QUARK_CALL_STREAM; + future_call_stream_init_known_interfaces (); +} + +/** + * future_call_stream_new: + * @channel: the Call channel + * @object_path: the object path of the stream; may not be %NULL + * @error: used to indicate the error if %NULL is returned + * + * <!-- --> + * + * Returns: a new stream proxy, or %NULL on invalid arguments + * + * Since: FIXME + */ +FutureCallStream * +future_call_stream_new (TpChannel *channel, + const gchar *object_path, + GError **error) +{ + FutureCallStream *ret = NULL; + + g_return_val_if_fail (TP_IS_CHANNEL (channel), NULL); + g_return_val_if_fail (object_path != NULL, NULL); + + if (!tp_dbus_check_valid_object_path (object_path, error)) + goto finally; + + ret = FUTURE_CALL_STREAM (g_object_new (FUTURE_TYPE_CALL_STREAM, + /* FIXME: pass in the Channel as a property? */ + "dbus-daemon", tp_proxy_get_dbus_daemon (channel), + "bus-name", tp_proxy_get_bus_name (channel), + "object-path", object_path, + NULL)); + +finally: + return ret; +} + +/** + * future_call_stream_init_known_interfaces: + * + * Ensure that the known interfaces for FutureCallStream have been set up. + * This is done automatically when necessary, but for correct + * overriding of library interfaces by local extensions, you should + * call this function before calling + * tp_proxy_or_subclass_hook_on_interface_add() with first argument + * %FUTURE_TYPE_CALL_STREAM. + * + * Since: 0.7.32 + */ +void +future_call_stream_init_known_interfaces (void) +{ + static gsize once = 0; + + if (g_once_init_enter (&once)) + { + GType tp_type = FUTURE_TYPE_CALL_STREAM; + + tp_proxy_init_known_interfaces (); + tp_proxy_or_subclass_hook_on_interface_add (tp_type, + future_cli_call_stream_add_signals); + tp_proxy_subclass_add_error_mapping (tp_type, + TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR); + + g_once_init_leave (&once, 1); + } +} diff --git a/extensions/call-stream.h b/extensions/call-stream.h new file mode 100644 index 000000000..0a195bde0 --- /dev/null +++ b/extensions/call-stream.h @@ -0,0 +1,62 @@ +/* + * call-stream.h - proxy for a Stream in a Call channel + * + * Copyright (C) 2009 Collabora Ltd. <http://www.collabora.co.uk/> + * Copyright (C) 2009 Nokia Corporation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef FUTURE_CALL_STREAM_H +#define FUTURE_CALL_STREAM_H + +#include <telepathy-glib/channel.h> +#include <telepathy-glib/proxy.h> + +G_BEGIN_DECLS + +typedef struct _FutureCallStream FutureCallStream; +typedef struct _FutureCallStreamPrivate FutureCallStreamPrivate; +typedef struct _FutureCallStreamClass FutureCallStreamClass; + +GType future_call_stream_get_type (void); + +/* TYPE MACROS */ +#define FUTURE_TYPE_CALL_STREAM \ + (future_call_stream_get_type ()) +#define FUTURE_CALL_STREAM(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), FUTURE_TYPE_CALL_STREAM, \ + FutureCallStream)) +#define FUTURE_CALL_STREAM_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), FUTURE_TYPE_CALL_STREAM, \ + FutureCallStreamClass)) +#define FUTURE_IS_CALL_STREAM(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), FUTURE_TYPE_CALL_STREAM)) +#define FUTURE_IS_CALL_STREAM_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), FUTURE_TYPE_CALL_STREAM)) +#define FUTURE_CALL_STREAM_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), FUTURE_TYPE_CALL_STREAM, \ + FutureCallStreamClass)) + +FutureCallStream *future_call_stream_new (TpChannel *channel, + const gchar *object_path, GError **error); + +void future_call_stream_init_known_interfaces (void); + +G_END_DECLS + +#include "extensions/_gen/cli-call-stream.h" + +#endif diff --git a/extensions/call-stream.xml b/extensions/call-stream.xml new file mode 100644 index 000000000..3e85b3791 --- /dev/null +++ b/extensions/call-stream.xml @@ -0,0 +1,10 @@ +<tp:spec + xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" + xmlns:xi="http://www.w3.org/2001/XInclude"> + +<tp:title>Call Stream</tp:title> + +<xi:include href="Call_Stream.xml"/> +<xi:include href="Call_Stream_Interface_Media.xml"/> + +</tp:spec> diff --git a/extensions/extensions.h b/extensions/extensions.h index 87eeb2f2c..24d978748 100644 --- a/extensions/extensions.h +++ b/extensions/extensions.h @@ -8,10 +8,12 @@ #include "extensions/_gen/cli-channel.h" #include "extensions/_gen/cli-misc.h" #include "extensions/_gen/svc-call-content.h" +#include "extensions/_gen/svc-call-stream.h" #include "extensions/_gen/svc-channel.h" #include "extensions/_gen/svc-misc.h" #include "extensions/call-content.h" +#include "extensions/call-stream.h" G_BEGIN_DECLS diff --git a/extensions/misc.xml b/extensions/misc.xml index aad3b67a0..0384410f6 100644 --- a/extensions/misc.xml +++ b/extensions/misc.xml @@ -6,7 +6,5 @@ <xi:include href="Call_Content_Codec_Offer.xml"/> <xi:include href="Call_Stream_Endpoint.xml"/> -<xi:include href="Call_Stream_Interface_Media.xml"/> -<xi:include href="Call_Stream.xml"/> </tp:spec> |