diff libpurple/prpl.h @ 23859:eb8c8a926589

Convert serv_* media functions to purple_prpl_* functions.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Sat, 19 Jul 2008 03:10:00 +0000
parents 3da0957e7821
children 4bc74deeb503
line wrap: on
line diff
--- a/libpurple/prpl.h	Thu Jul 17 23:09:58 2008 +0000
+++ b/libpurple/prpl.h	Sat Jul 19 03:10:00 2008 +0000
@@ -442,23 +442,10 @@
 	 */
 	GHashTable *(*get_account_text_table)(PurpleAccount *account);
 
-#ifdef USE_VV
 	/** Initiate media with the given buddy */
 	PurpleMedia  *(*initiate_media)(PurpleConnection *conn, const char *who, PurpleMediaStreamType type);
 
 	gboolean (*can_do_media)(PurpleConnection *conn, const char *who, PurpleMediaStreamType type);
-    
-    /*
-	gboolean (*can_receive_video)(PurpleConnection *conn, const char *who);
-	gboolean (*can_send_video)(PurpleConnection *conn, const char *who);
-	gboolean (*can_receive_audio)(PurpleConnection *conn, const char *who);
-	gboolean (*can_send_audio)(PurpleConnection *conn, const char *who);
-	*/
-    
-#else
-	void (*initiate_media)(void);
-	void (*can_do_media)(void);
-#endif
 };
 
 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \
@@ -712,6 +699,32 @@
  */
 GList *purple_prpl_get_statuses(PurpleAccount *account, PurplePresence *presence);
 
+/**
+ * Determines if the contact supports the given media session type.
+ *
+ * @param account The account the user is on.
+ * @param who The name of the contact to check capabilities for.
+ * @param type The type of media session to check for.
+ *
+ * @return @c TRUE if the contact supports the session type, else @c FALSE.
+ */
+gboolean purple_prpl_can_do_media(PurpleAccount *account,
+				  const char *who, 
+				  PurpleMediaStreamType type);
+
+/**
+ * Initiates a media session with the given contact.
+ *
+ * @param account The account the user is on.
+ * @param who The name of the contact to start a session with.
+ * @param type The type of media session to start.
+ *
+ * @return The newly created session object.
+ */
+PurpleMedia *purple_prpl_initiate_media(PurpleAccount *account,
+					const char *who,
+					PurpleMediaStreamType type);
+
 /*@}*/
 
 /**************************************************************************/