changeset 25720:551a462b346a

Changed PurpleMediaStreamType to PurpleMediaSessionType.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Sat, 09 Aug 2008 03:51:42 +0000
parents 1aa383ee5fc8
children aaf11cffe2b2
files libpurple/media.c libpurple/media.h libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/jabber.h libpurple/protocols/jabber/jingle.c libpurple/protocols/jabber/jingle.h libpurple/prpl.c libpurple/prpl.h pidgin/gtkmedia.c
diffstat 9 files changed, 37 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Sat Aug 09 03:11:46 2008 +0000
+++ b/libpurple/media.c	Sat Aug 09 03:51:42 2008 +0000
@@ -47,7 +47,7 @@
 	GstElement *sink;
 	FsSession *session;
 	GHashTable *streams;		/* FsStream list map to participant's name */
-	PurpleMediaStreamType type;
+	PurpleMediaSessionType type;
 	GHashTable *local_candidates;	/* map to participant's name? */
 
 	/*
@@ -300,7 +300,7 @@
 }
 
 FsMediaType
-purple_media_to_fs_media_type(PurpleMediaStreamType type)
+purple_media_to_fs_media_type(PurpleMediaSessionType type)
 {
 	if (type & PURPLE_MEDIA_AUDIO)
 		return FS_MEDIA_TYPE_AUDIO;
@@ -311,7 +311,7 @@
 }
 
 FsStreamDirection
-purple_media_to_fs_stream_direction(PurpleMediaStreamType type)
+purple_media_to_fs_stream_direction(PurpleMediaSessionType type)
 {
 	if ((type & PURPLE_MEDIA_AUDIO) == PURPLE_MEDIA_AUDIO ||
 			(type & PURPLE_MEDIA_VIDEO) == PURPLE_MEDIA_VIDEO)
@@ -326,10 +326,10 @@
 		return FS_DIRECTION_NONE;
 }
 
-PurpleMediaStreamType
+PurpleMediaSessionType
 purple_media_from_fs(FsMediaType type, FsStreamDirection direction)
 {
-	PurpleMediaStreamType result = PURPLE_MEDIA_NONE;
+	PurpleMediaSessionType result = PURPLE_MEDIA_NONE;
 	if (type == FS_MEDIA_TYPE_AUDIO) {
 		if (direction & FS_DIRECTION_SEND)
 			result |= PURPLE_MEDIA_SEND_AUDIO;
@@ -344,11 +344,11 @@
 	return result;
 }
 
-PurpleMediaStreamType
+PurpleMediaSessionType
 purple_media_get_overall_type(PurpleMedia *media)
 {
 	GList *values = g_hash_table_get_values(media->priv->sessions);
-	PurpleMediaStreamType type = PURPLE_MEDIA_NONE;
+	PurpleMediaSessionType type = PURPLE_MEDIA_NONE;
 
 	for (; values; values = g_list_delete_link(values, values)) {
 		PurpleMediaSession *session = values->data;
@@ -1111,7 +1111,7 @@
 
 gboolean
 purple_media_add_stream(PurpleMedia *media, const gchar *sess_id, const gchar *who,
-			PurpleMediaStreamType type,
+			PurpleMediaSessionType type,
 			const gchar *transmitter)
 {
 	FsStreamDirection type_direction;
@@ -1143,7 +1143,7 @@
 	
 }
 
-PurpleMediaStreamType
+PurpleMediaSessionType
 purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id)
 {
 	PurpleMediaSession *session = purple_media_get_session(media, sess_id);
--- a/libpurple/media.h	Sat Aug 09 03:11:46 2008 +0000
+++ b/libpurple/media.h	Sat Aug 09 03:51:42 2008 +0000
@@ -67,7 +67,7 @@
 	PURPLE_MEDIA_SEND_VIDEO = 1 << 3,
 	PURPLE_MEDIA_AUDIO = PURPLE_MEDIA_RECV_AUDIO | PURPLE_MEDIA_SEND_AUDIO,
 	PURPLE_MEDIA_VIDEO = PURPLE_MEDIA_RECV_VIDEO | PURPLE_MEDIA_SEND_VIDEO
-} PurpleMediaStreamType;
+} PurpleMediaSessionType;
 
 #ifdef USE_VV
 
@@ -101,43 +101,43 @@
 /*@{*/
 
 /**
- * Converts a PurpleMediaStreamType to an FsMediaType.
+ * Converts a PurpleMediaSessionType to an FsMediaType.
  *
  * @param type The type to derive FsMediaType from
  *
  * @return The FsMediaType derived from type
  */
-FsMediaType purple_media_to_fs_media_type(PurpleMediaStreamType type);
+FsMediaType purple_media_to_fs_media_type(PurpleMediaSessionType type);
 
 /**
- * Converts a PurpleMediaStreamType to an FsStreamDirection.
+ * Converts a PurpleMediaSessionType to an FsStreamDirection.
  *
  * @param type The type to derive FsMediaType from
  *
  * @return The FsMediaDirection derived from type
  */
-FsStreamDirection purple_media_to_fs_stream_direction(PurpleMediaStreamType type);
+FsStreamDirection purple_media_to_fs_stream_direction(PurpleMediaSessionType type);
 
 /**
- * Converts an FsMediaType and FsStreamDirection into a PurpleMediaStreamType.
+ * Converts an FsMediaType and FsStreamDirection into a PurpleMediaSessionType.
  *
- * @param type The type used to construct PurpleMediaStreamType
- * @param direction The direction used to construct PurpleMediaStreamType
+ * @param type The type used to construct PurpleMediaSessionType
+ * @param direction The direction used to construct PurpleMediaSessionType
  *
- * @return The PurpleMediaStreamType constructed
+ * @return The PurpleMediaSessionType constructed
  */
-PurpleMediaStreamType purple_media_from_fs(FsMediaType type, FsStreamDirection direction);
+PurpleMediaSessionType purple_media_from_fs(FsMediaType type, FsStreamDirection direction);
 
 /*@}*/
 
 /**
- * Combines all the separate session types into a single PurpleMediaStreamType.
+ * Combines all the separate session types into a single PurpleMediaSessionType.
  *
  * @param media The media session to retrieve session types from.
  *
  * @return Combined type.
  */
-PurpleMediaStreamType purple_media_get_overall_type(PurpleMedia *media);
+PurpleMediaSessionType purple_media_get_overall_type(PurpleMedia *media);
 
 /**
  * Gets a list of session names.
@@ -382,7 +382,7 @@
  * @return @c TRUE The stream was added successfully, @c FALSE otherwise.
  */
 gboolean purple_media_add_stream(PurpleMedia *media, const gchar *sess_id, const gchar *who,
-			     PurpleMediaStreamType type, const gchar *transmitter);
+			     PurpleMediaSessionType type, const gchar *transmitter);
 
 /**
  * Removes a stream from a session.
@@ -401,7 +401,7 @@
  *
  * @return The retreived session type.
  */
-PurpleMediaStreamType purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id);
+PurpleMediaSessionType purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id);
 
 /**
  * Gets the negotiated codecs from a session.
--- a/libpurple/protocols/jabber/jabber.c	Sat Aug 09 03:11:46 2008 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Sat Aug 09 03:51:42 2008 +0000
@@ -2401,13 +2401,13 @@
 
 PurpleMedia *
 jabber_initiate_media(PurpleConnection *gc, const char *who, 
-		      PurpleMediaStreamType type)
+		      PurpleMediaSessionType type)
 {
 	return jabber_jingle_session_initiate_media(gc->proto_data, who, type);
 }
 
 gboolean jabber_can_do_media(PurpleConnection *gc, const char *who, 
-                             PurpleMediaStreamType type)
+                             PurpleMediaSessionType type)
 {
 	JabberStream *js = (JabberStream *) gc->proto_data;
 	JabberBuddy *jb;
--- a/libpurple/protocols/jabber/jabber.h	Sat Aug 09 03:11:46 2008 +0000
+++ b/libpurple/protocols/jabber/jabber.h	Sat Aug 09 03:51:42 2008 +0000
@@ -311,8 +311,8 @@
 void jabber_init_plugin(PurplePlugin *plugin);
 
 #ifdef USE_VV
-PurpleMedia *jabber_initiate_media(PurpleConnection *gc, const char *who, PurpleMediaStreamType type);
-gboolean jabber_can_do_media(PurpleConnection *gc, const char *who, PurpleMediaStreamType type);
+PurpleMedia *jabber_initiate_media(PurpleConnection *gc, const char *who, PurpleMediaSessionType type);
+gboolean jabber_can_do_media(PurpleConnection *gc, const char *who, PurpleMediaSessionType type);
 #endif
 
 #endif /* _PURPLE_JABBER_H_ */
--- a/libpurple/protocols/jabber/jingle.c	Sat Aug 09 03:11:46 2008 +0000
+++ b/libpurple/protocols/jabber/jingle.c	Sat Aug 09 03:51:42 2008 +0000
@@ -841,7 +841,7 @@
 
 static void
 jabber_jingle_session_content_create_media(JingleSession *session,
-					     PurpleMediaStreamType type)
+					     PurpleMediaSessionType type)
 {
 	gchar sender[10] = "";
 
@@ -1037,7 +1037,7 @@
 
 PurpleMedia *
 jabber_jingle_session_initiate_media(JabberStream *js, const char *who, 
-				     PurpleMediaStreamType type)
+				     PurpleMediaSessionType type)
 {
 	/* create content negotiation */
 	JabberIq *request;
--- a/libpurple/protocols/jabber/jingle.h	Sat Aug 09 03:11:46 2008 +0000
+++ b/libpurple/protocols/jabber/jingle.h	Sat Aug 09 03:51:42 2008 +0000
@@ -37,7 +37,7 @@
 
 PurpleMedia *jabber_jingle_session_initiate_media(JabberStream *js,
 						  const char *who,
-						  PurpleMediaStreamType type);
+						  PurpleMediaSessionType type);
 
 void jabber_jingle_session_terminate_session_media(JabberStream *js, const gchar *who);
 void jabber_jingle_session_terminate_sessions(JabberStream *js);
--- a/libpurple/prpl.c	Sat Aug 09 03:11:46 2008 +0000
+++ b/libpurple/prpl.c	Sat Aug 09 03:51:42 2008 +0000
@@ -497,7 +497,7 @@
 PurpleMedia *
 purple_prpl_initiate_media(PurpleAccount *account,
 			   const char *who,
-			   PurpleMediaStreamType type)
+			   PurpleMediaSessionType type)
 {
 #ifdef USE_VV
 	PurpleConnection *gc = NULL;
@@ -525,7 +525,7 @@
 gboolean
 purple_prpl_can_do_media(PurpleAccount *account,
 			 const char *who, 
-			 PurpleMediaStreamType type)
+			 PurpleMediaSessionType type)
 {
 #ifdef USE_VV
 	PurpleConnection *gc = NULL;
--- a/libpurple/prpl.h	Sat Aug 09 03:11:46 2008 +0000
+++ b/libpurple/prpl.h	Sat Aug 09 03:51:42 2008 +0000
@@ -450,7 +450,7 @@
 	 * @return The newly created media object.
 	 */
 	PurpleMedia  *(*initiate_media)(PurpleConnection *gc, const char *who,
-					PurpleMediaStreamType type);
+					PurpleMediaSessionType type);
 
 	/**
 	 * Checks to see if the given contact supports the given type of media session.
@@ -461,7 +461,7 @@
 	 * @return @c TRUE The contact supports the given media type, or @c FALSE otherwise.
 	 */
 	gboolean (*can_do_media)(PurpleConnection *gc, const char *who,
-				 PurpleMediaStreamType type);
+				 PurpleMediaSessionType type);
 };
 
 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \
@@ -761,7 +761,7 @@
  */
 gboolean purple_prpl_can_do_media(PurpleAccount *account,
 				  const char *who, 
-				  PurpleMediaStreamType type);
+				  PurpleMediaSessionType type);
 
 /**
  * Initiates a media session with the given contact.
@@ -774,7 +774,7 @@
  */
 PurpleMedia *purple_prpl_initiate_media(PurpleAccount *account,
 					const char *who,
-					PurpleMediaStreamType type);
+					PurpleMediaSessionType type);
 
 /*@}*/
 
--- a/pidgin/gtkmedia.c	Sat Aug 09 03:11:46 2008 +0000
+++ b/pidgin/gtkmedia.c	Sat Aug 09 03:51:42 2008 +0000
@@ -453,7 +453,7 @@
 static void
 pidgin_media_got_request_cb(PurpleMedia *media, PidginMedia *gtkmedia)
 {
-	PurpleMediaStreamType type = purple_media_get_overall_type(media);
+	PurpleMediaSessionType type = purple_media_get_overall_type(media);
 	gchar *message;
 
 	if (type & PURPLE_MEDIA_AUDIO && type & PURPLE_MEDIA_VIDEO) {