[farsight2/master] Add fs_session_list_transmitters()

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:25:59 PST 2008


---
 docs/libs/farsight2-libs-sections.txt  |    1 +
 gst-libs/gst/farsight/fs-plugin.c      |    2 +-
 gst-libs/gst/farsight/fs-session.c     |   23 +++++++++++++++++++++++
 gst-libs/gst/farsight/fs-session.h     |    5 +++++
 gst-libs/gst/farsight/fs-transmitter.c |    3 ++-
 5 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/docs/libs/farsight2-libs-sections.txt b/docs/libs/farsight2-libs-sections.txt
index 87739f8..6fd3366 100644
--- a/docs/libs/farsight2-libs-sections.txt
+++ b/docs/libs/farsight2-libs-sections.txt
@@ -53,6 +53,7 @@ fs_session_start_telephony_event
 fs_session_stop_telephony_event
 fs_session_set_send_codec
 fs_session_set_codec_preferences
+fs_session_list_transmitters
 fs_session_emit_error
 <SUBSECTION Standard>
 FS_SESSION
diff --git a/gst-libs/gst/farsight/fs-plugin.c b/gst-libs/gst/farsight/fs-plugin.c
index b24ea62..0fe2e75 100644
--- a/gst-libs/gst/farsight/fs-plugin.c
+++ b/gst-libs/gst/farsight/fs-plugin.c
@@ -330,7 +330,7 @@ fs_plugin_create (const gchar *name, const gchar *type_suffix,
  * Gets the list of all available plugins of a certain type
  *
  * Returns: a newly allocated NULL terminated array of strings or %NULL if no
- * strings were found
+ * strings were found. It should be freed with g_strfreev().
  */
 
 gchar **
diff --git a/gst-libs/gst/farsight/fs-session.c b/gst-libs/gst/farsight/fs-session.c
index e55147d..872c938 100644
--- a/gst-libs/gst/farsight/fs-session.c
+++ b/gst-libs/gst/farsight/fs-session.c
@@ -574,3 +574,26 @@ fs_session_emit_error (FsSession *session, gint error_no,
   g_signal_emit (session, signals[ERROR_SIGNAL], 0, session, error_no,
       error_msg, debug_msg);
 }
+
+/**
+ * fs_session_list_transmitters:
+ * @session: A #FsSession
+ *
+ * Get the list of all available transmitters for this session.
+ *
+ * Returns: a newly-allocagted %NULL terminated array of named of transmitters
+ * or %NULL if no transmitter is needed for this type of session. It should
+ * be freed with g_strfreev().
+ */
+
+gchar **
+fs_session_list_transmitters (FsSession *session)
+{
+  FsSessionClass *klass = FS_SESSION_GET_CLASS (session);
+
+  if (klass->list_transmitters) {
+    return klass->list_transmitters (session);
+  } else {
+    return NULL;
+  }
+}
diff --git a/gst-libs/gst/farsight/fs-session.h b/gst-libs/gst/farsight/fs-session.h
index 670c592..ab5a29e 100644
--- a/gst-libs/gst/farsight/fs-session.h
+++ b/gst-libs/gst/farsight/fs-session.h
@@ -135,6 +135,9 @@ struct _FsSessionClass
       GList *codec_preferences,
       GError **error);
 
+  gchar** (* list_transmitters) (FsSession *session);
+
+
   /*< private >*/
   gpointer _padding[8];
 };
@@ -178,6 +181,8 @@ gboolean fs_session_set_codec_preferences (FsSession *session,
     GList *codec_preferences,
     GError **error);
 
+gchar **fs_session_list_transmitters (FsSession *session);
+
 void fs_session_emit_error (FsSession *session, gint error_no,
                             gchar *error_msg, gchar *debug_msg);
 
diff --git a/gst-libs/gst/farsight/fs-transmitter.c b/gst-libs/gst/farsight/fs-transmitter.c
index 1d54692..5eb45f4 100644
--- a/gst-libs/gst/farsight/fs-transmitter.c
+++ b/gst-libs/gst/farsight/fs-transmitter.c
@@ -353,7 +353,8 @@ fs_transmitter_emit_error (FsTransmitter *transmitter,
  * Get the list of all available transmitters
  *
  * Returns: a newly allocated array of strings containing the list of all
- *  available transmitters or %NULL if there are none
+ *  available transmitters or %NULL if there are none. It should
+ *  be freed with g_strfreev().
  */
 
 char **
-- 
1.5.6.5




More information about the farsight-commits mailing list