soc.2008.vv: 6b52db8e: Changed PurpleMediaStreamType to PurpleM...
maiku at soc.pidgin.im
maiku at soc.pidgin.im
Fri Aug 8 23:56:03 EDT 2008
-----------------------------------------------------------------
Revision: 6b52db8e945d389c0bbba362698db94561030c30
Ancestor: 68dc0b9aa0fa25f77e2db49061a4612ee10def6f
Author: maiku at soc.pidgin.im
Date: 2008-08-09T03:51:42
Branch: im.pidgin.soc.2008.vv
URL: http://d.pidgin.im/viewmtn/revision/info/6b52db8e945d389c0bbba362698db94561030c30
Modified 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
ChangeLog:
Changed PurpleMediaStreamType to PurpleMediaSessionType.
-------------- next part --------------
============================================================
--- libpurple/media.c b1365d0cb3f622e103e5455d826da0d428d15001
+++ libpurple/media.c 6eaee0a0d94190d2bb428ce2eac5b7f9fa0478f5
@@ -47,7 +47,7 @@ struct _PurpleMediaSession
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
}
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
}
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 @@ purple_media_to_fs_stream_direction(Purp
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 @@ purple_media_from_fs(FsMediaType type, F
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 @@ purple_media_add_stream(PurpleMedia *med
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 @@ purple_media_remove_stream(PurpleMedia *
}
-PurpleMediaStreamType
+PurpleMediaSessionType
purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id)
{
PurpleMediaSession *session = purple_media_get_session(media, sess_id);
============================================================
--- libpurple/media.h 7989b32dd5e9576a97a63fddb0ebe4d7d468bcf2
+++ libpurple/media.h e7985003cbf0cb7927bd6230b214483ab1069994
@@ -67,7 +67,7 @@ typedef enum {
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 @@ GType purple_media_get_type(void);
/*@{*/
/**
- * 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 @@ gboolean purple_media_add_stream(PurpleM
* @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 @@ void purple_media_remove_stream(PurpleMe
*
* @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.
============================================================
--- libpurple/protocols/jabber/jabber.c 7dc541af19e0233e6b03ef0f69d322501c81e8e9
+++ libpurple/protocols/jabber/jabber.c fb7f62e3882317bcf77893bca6a1bedcc1ce47cd
@@ -2401,13 +2401,13 @@ jabber_initiate_media(PurpleConnection *
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;
============================================================
--- libpurple/protocols/jabber/jabber.h e5f633bdd8277e0e72e2f33dd7418b11055ecf44
+++ libpurple/protocols/jabber/jabber.h a47deddcddb731625b6174696ed8f3ea0ab016cb
@@ -311,8 +311,8 @@ void jabber_init_plugin(PurplePlugin *pl
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_ */
============================================================
--- libpurple/protocols/jabber/jingle.c 3ddfae32b233f073ca1ac78e1720b29804fa2e26
+++ libpurple/protocols/jabber/jingle.c fa78ec592ad290ad45bbca3ba0f3a41aa6abd4e0
@@ -841,7 +841,7 @@ jabber_jingle_session_content_create_med
static void
jabber_jingle_session_content_create_media(JingleSession *session,
- PurpleMediaStreamType type)
+ PurpleMediaSessionType type)
{
gchar sender[10] = "";
@@ -1037,7 +1037,7 @@ jabber_jingle_session_initiate_media(Jab
PurpleMedia *
jabber_jingle_session_initiate_media(JabberStream *js, const char *who,
- PurpleMediaStreamType type)
+ PurpleMediaSessionType type)
{
/* create content negotiation */
JabberIq *request;
============================================================
--- libpurple/protocols/jabber/jingle.h 9f02311521a3dc9b4babe5811a326bb9646fc696
+++ libpurple/protocols/jabber/jingle.h e068bce654e60495dee1841107f40cd9a48ba6b6
@@ -37,7 +37,7 @@ PurpleMedia *jabber_jingle_session_initi
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);
============================================================
--- libpurple/prpl.c 8755a6076f9220e3d4b99f2ea2a388a77e469d8b
+++ libpurple/prpl.c 01566938bb9acf6cb0009ff66c22c3c183d5f473
@@ -497,7 +497,7 @@ purple_prpl_initiate_media(PurpleAccount
PurpleMedia *
purple_prpl_initiate_media(PurpleAccount *account,
const char *who,
- PurpleMediaStreamType type)
+ PurpleMediaSessionType type)
{
#ifdef USE_VV
PurpleConnection *gc = NULL;
@@ -525,7 +525,7 @@ purple_prpl_can_do_media(PurpleAccount *
gboolean
purple_prpl_can_do_media(PurpleAccount *account,
const char *who,
- PurpleMediaStreamType type)
+ PurpleMediaSessionType type)
{
#ifdef USE_VV
PurpleConnection *gc = NULL;
============================================================
--- libpurple/prpl.h 3b39a53b03840c27d6353619b063f4aa042f7f1b
+++ libpurple/prpl.h 2bc59f791c66d32515facb3e7faed3a38aceca25
@@ -450,7 +450,7 @@ struct _PurplePluginProtocolInfo
* @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 @@ struct _PurplePluginProtocolInfo
* @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(Purple
*/
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(
*/
PurpleMedia *purple_prpl_initiate_media(PurpleAccount *account,
const char *who,
- PurpleMediaStreamType type);
+ PurpleMediaSessionType type);
/*@}*/
============================================================
--- pidgin/gtkmedia.c 521eb0b7cb20626d09d36125fa391ff2ae1da39b
+++ pidgin/gtkmedia.c b912cd4fc26c8e4d942cd3478092856c298315bd
@@ -453,7 +453,7 @@ pidgin_media_got_request_cb(PurpleMedia
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) {
More information about the Commits
mailing list