[Telepathy-commits] [telepathy-gabble/master] rename gabble-media-session.h to media-session.h
Dafydd Harries
dafydd.harries at collabora.co.uk
Tue Aug 19 10:53:15 PDT 2008
20080714115817-c9803-0ea97d887f52df557246d41914d4b7a2988df9f5.gz
---
src/Makefile.am | 2 +-
src/gabble-media-channel.c | 4 +-
src/gabble-media-session.c | 2 +-
src/gabble-media-session.h | 168 --------------------------------------------
src/gabble-media-stream.c | 2 +-
src/media-channel.h | 2 +-
src/media-session.h | 168 ++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 174 insertions(+), 174 deletions(-)
delete mode 100644 src/gabble-media-session.h
create mode 100644 src/media-session.h
diff --git a/src/Makefile.am b/src/Makefile.am
index a97360f..647cfa0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -59,7 +59,7 @@ libgabble_convenience_la_our_sources = \
gabble-muc-channel.c \
media-channel.h \
gabble-media-channel.c \
- gabble-media-session.h \
+ media-session.h \
gabble-media-session.c \
gabble-media-stream.h \
gabble-media-stream.c \
diff --git a/src/gabble-media-channel.c b/src/gabble-media-channel.c
index febbd10..07630ba 100644
--- a/src/gabble-media-channel.c
+++ b/src/gabble-media-channel.c
@@ -29,7 +29,7 @@
#include "debug.h"
#include "connection.h"
-#include "gabble-media-session.h"
+#include "media-session.h"
#include "presence.h"
#include "presence-cache.h"
@@ -40,7 +40,7 @@
#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/svc-properties-interface.h>
-#include "gabble-media-session.h"
+#include "media-session.h"
#include "gabble-media-stream.h"
#include "media-factory.h"
diff --git a/src/gabble-media-session.c b/src/gabble-media-session.c
index 5e32dc7..7eaa366 100644
--- a/src/gabble-media-session.c
+++ b/src/gabble-media-session.c
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "gabble-media-session.h"
+#include "media-session.h"
#include <dbus/dbus-glib.h>
#include <stdio.h>
diff --git a/src/gabble-media-session.h b/src/gabble-media-session.h
deleted file mode 100644
index d9070a5..0000000
--- a/src/gabble-media-session.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * gabble-media-session.h - Header for GabbleMediaSession
- * Copyright (C) 2006 Collabora Ltd.
- * Copyright (C) 2006 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 __GABBLE_MEDIA_SESSION_H__
-#define __GABBLE_MEDIA_SESSION_H__
-
-#include <glib-object.h>
-#include <loudmouth/loudmouth.h>
-
-#include "gabble-types.h"
-#include "gabble-media-stream.h"
-#include <telepathy-glib/enums.h>
-
-G_BEGIN_DECLS
-
-typedef enum
-{
- MODE_GOOGLE,
- MODE_JINGLE
-} GabbleMediaSessionMode;
-
-typedef enum {
- JS_STATE_INVALID = -1,
- JS_STATE_PENDING_CREATED = 0,
- JS_STATE_PENDING_INITIATE_SENT,
- JS_STATE_PENDING_INITIATED,
- JS_STATE_PENDING_ACCEPT_SENT,
- JS_STATE_ACTIVE,
- JS_STATE_ENDED
-} JingleSessionState;
-
-typedef enum {
- DEBUG_MSG_INFO = 0,
- DEBUG_MSG_DUMP,
- DEBUG_MSG_WARNING,
- DEBUG_MSG_ERROR,
- DEBUG_MSG_EVENT
-} DebugMessageType;
-
-typedef struct _GabbleMediaSession GabbleMediaSession;
-typedef struct _GabbleMediaSessionClass GabbleMediaSessionClass;
-
-struct _GabbleMediaSessionClass {
- GObjectClass parent_class;
-};
-
-struct _GabbleMediaSession {
- GObject parent;
-
- JingleInitiator initiator;
-
- gpointer priv;
-};
-
-GType gabble_media_session_get_type (void);
-
-/* TYPE MACROS */
-#define GABBLE_TYPE_MEDIA_SESSION \
- (gabble_media_session_get_type ())
-#define GABBLE_MEDIA_SESSION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), GABBLE_TYPE_MEDIA_SESSION, \
- GabbleMediaSession))
-#define GABBLE_MEDIA_SESSION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), GABBLE_TYPE_MEDIA_SESSION, \
- GabbleMediaSessionClass))
-#define GABBLE_IS_MEDIA_SESSION(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj), GABBLE_TYPE_MEDIA_SESSION))
-#define GABBLE_IS_MEDIA_SESSION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass), GABBLE_TYPE_MEDIA_SESSION))
-#define GABBLE_MEDIA_SESSION_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), GABBLE_TYPE_MEDIA_SESSION, \
- GabbleMediaSessionClass))
-
-/* CONVENIENCE MACROS */
-#define MSG_REPLY_CB_END_SESSION_IF_NOT_SUCCESSFUL(s, m) \
- G_STMT_START { \
- if (lm_message_get_sub_type (reply_msg) != LM_MESSAGE_SUB_TYPE_RESULT) \
- { \
- GMS_DEBUG_ERROR (s, m); \
- NODE_DEBUG (sent_msg->node, "message sent"); \
- NODE_DEBUG (reply_msg->node, "message reply"); \
- _gabble_media_session_terminate (s, INITIATOR_LOCAL, \
- TP_CHANNEL_GROUP_CHANGE_REASON_ERROR); \
- return LM_HANDLER_RESULT_REMOVE_MESSAGE; \
- } \
- } G_STMT_END
-
-gboolean
-_gabble_media_session_handle_action (GabbleMediaSession *session,
- LmMessage *message,
- LmMessageNode *session_node,
- const gchar *action,
- GError **error);
-
-LmMessage *_gabble_media_session_message_new (GabbleMediaSession *session,
- const gchar *action,
- LmMessageNode **session_node);
-
-void _gabble_media_session_accept (GabbleMediaSession *session);
-void _gabble_media_session_remove_streams (GabbleMediaSession *session,
- GabbleMediaStream **streams, guint len);
-void _gabble_media_session_terminate (GabbleMediaSession *session,
- JingleInitiator who, TpChannelGroupChangeReason why);
-
-gboolean _gabble_media_session_request_streams (GabbleMediaSession *session,
- const GArray *types,
- GPtrArray **ret,
- GError **error);
-
-gboolean _gabble_media_session_request_stream_direction (GabbleMediaSession *,
- GabbleMediaStream *, TpMediaStreamDirection, GError **);
-
-#ifndef _GMS_DEBUG_LEVEL
-#define _GMS_DEBUG_LEVEL 2
-#endif
-
-#if defined (ENABLE_DEBUG) && _GMS_DEBUG_LEVEL
-
-#define GMS_DEBUG_INFO(s, ...) \
- _gabble_media_session_debug (s, DEBUG_MSG_INFO, __VA_ARGS__)
-#if _GMS_DEBUG_LEVEL > 1
-#define GMS_DEBUG_DUMP(s, ...) \
- _gabble_media_session_debug (s, DEBUG_MSG_DUMP, __VA_ARGS__)
-#else
-#define GMS_DEBUG_DUMP(s, ...)
-#endif
-#define GMS_DEBUG_WARNING(s, ...) \
- _gabble_media_session_debug (s, DEBUG_MSG_WARNING, __VA_ARGS__)
-#define GMS_DEBUG_ERROR(s, ...) \
- _gabble_media_session_debug (s, DEBUG_MSG_ERROR, __VA_ARGS__)
-#define GMS_DEBUG_EVENT(s, ...) \
- _gabble_media_session_debug (s, DEBUG_MSG_EVENT, __VA_ARGS__)
-
-void _gabble_media_session_debug (GabbleMediaSession *session,
- DebugMessageType type,
- const gchar *format, ...)
- G_GNUC_PRINTF (3, 4);
-
-#else
-
-#define GMS_DEBUG_INFO(s, ...)
-#define GMS_DEBUG_DUMP(s, ...)
-#define GMS_DEBUG_WARNING(s, ...)
-#define GMS_DEBUG_ERROR(s, ...)
-#define GMS_DEBUG_EVENT(s, ...)
-
-#endif /* defined (ENABLE_DEBUG) && _GMS_DEBUG_LEVEL */
-
-G_END_DECLS
-
-#endif /* #ifndef __GABBLE_MEDIA_SESSION_H__*/
diff --git a/src/gabble-media-stream.c b/src/gabble-media-stream.c
index f1d39b8..650338c 100644
--- a/src/gabble-media-stream.c
+++ b/src/gabble-media-stream.c
@@ -34,7 +34,7 @@
#include "connection.h"
#include "media-channel.h"
-#include "gabble-media-session.h"
+#include "media-session.h"
#include "gabble-media-session-enumtypes.h"
#include <telepathy-glib/dbus.h>
diff --git a/src/media-channel.h b/src/media-channel.h
index 569876f..a0dc459 100644
--- a/src/media-channel.h
+++ b/src/media-channel.h
@@ -27,7 +27,7 @@
#include <telepathy-glib/group-mixin.h>
#include <telepathy-glib/properties-mixin.h>
-#include "gabble-media-session.h"
+#include "media-session.h"
#include "presence.h"
G_BEGIN_DECLS
diff --git a/src/media-session.h b/src/media-session.h
new file mode 100644
index 0000000..d9070a5
--- /dev/null
+++ b/src/media-session.h
@@ -0,0 +1,168 @@
+/*
+ * gabble-media-session.h - Header for GabbleMediaSession
+ * Copyright (C) 2006 Collabora Ltd.
+ * Copyright (C) 2006 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 __GABBLE_MEDIA_SESSION_H__
+#define __GABBLE_MEDIA_SESSION_H__
+
+#include <glib-object.h>
+#include <loudmouth/loudmouth.h>
+
+#include "gabble-types.h"
+#include "gabble-media-stream.h"
+#include <telepathy-glib/enums.h>
+
+G_BEGIN_DECLS
+
+typedef enum
+{
+ MODE_GOOGLE,
+ MODE_JINGLE
+} GabbleMediaSessionMode;
+
+typedef enum {
+ JS_STATE_INVALID = -1,
+ JS_STATE_PENDING_CREATED = 0,
+ JS_STATE_PENDING_INITIATE_SENT,
+ JS_STATE_PENDING_INITIATED,
+ JS_STATE_PENDING_ACCEPT_SENT,
+ JS_STATE_ACTIVE,
+ JS_STATE_ENDED
+} JingleSessionState;
+
+typedef enum {
+ DEBUG_MSG_INFO = 0,
+ DEBUG_MSG_DUMP,
+ DEBUG_MSG_WARNING,
+ DEBUG_MSG_ERROR,
+ DEBUG_MSG_EVENT
+} DebugMessageType;
+
+typedef struct _GabbleMediaSession GabbleMediaSession;
+typedef struct _GabbleMediaSessionClass GabbleMediaSessionClass;
+
+struct _GabbleMediaSessionClass {
+ GObjectClass parent_class;
+};
+
+struct _GabbleMediaSession {
+ GObject parent;
+
+ JingleInitiator initiator;
+
+ gpointer priv;
+};
+
+GType gabble_media_session_get_type (void);
+
+/* TYPE MACROS */
+#define GABBLE_TYPE_MEDIA_SESSION \
+ (gabble_media_session_get_type ())
+#define GABBLE_MEDIA_SESSION(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), GABBLE_TYPE_MEDIA_SESSION, \
+ GabbleMediaSession))
+#define GABBLE_MEDIA_SESSION_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), GABBLE_TYPE_MEDIA_SESSION, \
+ GabbleMediaSessionClass))
+#define GABBLE_IS_MEDIA_SESSION(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), GABBLE_TYPE_MEDIA_SESSION))
+#define GABBLE_IS_MEDIA_SESSION_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass), GABBLE_TYPE_MEDIA_SESSION))
+#define GABBLE_MEDIA_SESSION_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GABBLE_TYPE_MEDIA_SESSION, \
+ GabbleMediaSessionClass))
+
+/* CONVENIENCE MACROS */
+#define MSG_REPLY_CB_END_SESSION_IF_NOT_SUCCESSFUL(s, m) \
+ G_STMT_START { \
+ if (lm_message_get_sub_type (reply_msg) != LM_MESSAGE_SUB_TYPE_RESULT) \
+ { \
+ GMS_DEBUG_ERROR (s, m); \
+ NODE_DEBUG (sent_msg->node, "message sent"); \
+ NODE_DEBUG (reply_msg->node, "message reply"); \
+ _gabble_media_session_terminate (s, INITIATOR_LOCAL, \
+ TP_CHANNEL_GROUP_CHANGE_REASON_ERROR); \
+ return LM_HANDLER_RESULT_REMOVE_MESSAGE; \
+ } \
+ } G_STMT_END
+
+gboolean
+_gabble_media_session_handle_action (GabbleMediaSession *session,
+ LmMessage *message,
+ LmMessageNode *session_node,
+ const gchar *action,
+ GError **error);
+
+LmMessage *_gabble_media_session_message_new (GabbleMediaSession *session,
+ const gchar *action,
+ LmMessageNode **session_node);
+
+void _gabble_media_session_accept (GabbleMediaSession *session);
+void _gabble_media_session_remove_streams (GabbleMediaSession *session,
+ GabbleMediaStream **streams, guint len);
+void _gabble_media_session_terminate (GabbleMediaSession *session,
+ JingleInitiator who, TpChannelGroupChangeReason why);
+
+gboolean _gabble_media_session_request_streams (GabbleMediaSession *session,
+ const GArray *types,
+ GPtrArray **ret,
+ GError **error);
+
+gboolean _gabble_media_session_request_stream_direction (GabbleMediaSession *,
+ GabbleMediaStream *, TpMediaStreamDirection, GError **);
+
+#ifndef _GMS_DEBUG_LEVEL
+#define _GMS_DEBUG_LEVEL 2
+#endif
+
+#if defined (ENABLE_DEBUG) && _GMS_DEBUG_LEVEL
+
+#define GMS_DEBUG_INFO(s, ...) \
+ _gabble_media_session_debug (s, DEBUG_MSG_INFO, __VA_ARGS__)
+#if _GMS_DEBUG_LEVEL > 1
+#define GMS_DEBUG_DUMP(s, ...) \
+ _gabble_media_session_debug (s, DEBUG_MSG_DUMP, __VA_ARGS__)
+#else
+#define GMS_DEBUG_DUMP(s, ...)
+#endif
+#define GMS_DEBUG_WARNING(s, ...) \
+ _gabble_media_session_debug (s, DEBUG_MSG_WARNING, __VA_ARGS__)
+#define GMS_DEBUG_ERROR(s, ...) \
+ _gabble_media_session_debug (s, DEBUG_MSG_ERROR, __VA_ARGS__)
+#define GMS_DEBUG_EVENT(s, ...) \
+ _gabble_media_session_debug (s, DEBUG_MSG_EVENT, __VA_ARGS__)
+
+void _gabble_media_session_debug (GabbleMediaSession *session,
+ DebugMessageType type,
+ const gchar *format, ...)
+ G_GNUC_PRINTF (3, 4);
+
+#else
+
+#define GMS_DEBUG_INFO(s, ...)
+#define GMS_DEBUG_DUMP(s, ...)
+#define GMS_DEBUG_WARNING(s, ...)
+#define GMS_DEBUG_ERROR(s, ...)
+#define GMS_DEBUG_EVENT(s, ...)
+
+#endif /* defined (ENABLE_DEBUG) && _GMS_DEBUG_LEVEL */
+
+G_END_DECLS
+
+#endif /* #ifndef __GABBLE_MEDIA_SESSION_H__*/
--
1.5.6.3
More information about the Telepathy-commits
mailing list