[farsight2/master] Rename fs_session_error to fs_session_emit_error and document it

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


---
 gst-libs/gst/farsight/fs-session.c   |   16 +++++++++++++---
 gst-libs/gst/farsight/fs-session.h   |    4 ++--
 gst/fsrtpconference/fs-rtp-session.c |    6 ++++--
 3 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/gst-libs/gst/farsight/fs-session.c b/gst-libs/gst/farsight/fs-session.c
index 50f5c9c..62a4dd1 100644
--- a/gst-libs/gst/farsight/fs-session.c
+++ b/gst-libs/gst/farsight/fs-session.c
@@ -546,10 +546,20 @@ fs_session_set_send_codec (FsSession *session, FsCodec *send_codec,
   return FALSE;
 }
 
-
+/**
+ * fs_session_emit_error:
+ * @session: #FsSession on which to emit the error signal
+ * @object: The #Gobject that the error refers to
+ * @error_no: The number of the error
+ * @error_msg: Error message to be displayed to user
+ * @debug_msg: Debugging error message
+ *
+ * This function emit the "error" signal on a #FsSession, it should only be
+ * called by subclasses
+ */
 void
-fs_session_error (FsSession *session, gint error_no, gchar *error_msg,
-                  gchar *debug_msg)
+fs_session_emit_error (FsSession *session, GObject *object, gint error_no,
+                       gchar *error_msg, gchar *debug_msg)
 {
   g_signal_emit (session, signals[ERROR], 0, session, error_no, error_msg,
                  debug_msg, NULL);
diff --git a/gst-libs/gst/farsight/fs-session.h b/gst-libs/gst/farsight/fs-session.h
index f3d5962..44af804 100644
--- a/gst-libs/gst/farsight/fs-session.h
+++ b/gst-libs/gst/farsight/fs-session.h
@@ -168,8 +168,8 @@ gboolean fs_session_stop_telephony_event (FsSession *session,
 gboolean fs_session_set_send_codec (FsSession *session, FsCodec *send_codec,
                                     GError **error);
 
-void fs_session_error (FsSession *session, gint error_no, gchar *error_msg,
-                       gchar *debug_msg);
+void fs_session_emit_error (FsSession *session, GObject *object, gint error_no,
+                            gchar *error_msg, gchar *debug_msg);
 
 G_END_DECLS
 
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index df9cc16..ea1545e 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -596,7 +596,8 @@ fs_rtp_session_link_network_sink (FsRtpSession *session, GstPad *src_pad)
       GST_PAD_NAME (src_pad), GST_PAD_CAPS (src_pad),
       GST_PAD_NAME (transmitter_rtp_tee_sink_pad),
       GST_PAD_CAPS (transmitter_rtp_tee_sink_pad));
-    fs_session_error (FS_SESSION (session), FS_SESSION_ERROR_CONSTRUCTION,
+    fs_session_emit_error (FS_SESSION (session), G_OBJECT (session),
+      FS_SESSION_ERROR_CONSTRUCTION,
       "Could not link rtpbin network src to tee", tmp);
     g_free (tmp);
 
@@ -624,7 +625,8 @@ fs_rtp_session_link_network_sink (FsRtpSession *session, GstPad *src_pad)
       GST_PAD_CAPS (session->priv->rtpbin_send_rtcp_src),
       GST_PAD_NAME (transmitter_rtcp_tee_sink_pad),
       GST_PAD_CAPS (transmitter_rtcp_tee_sink_pad));
-    fs_session_error (FS_SESSION (session), FS_SESSION_ERROR_CONSTRUCTION,
+    fs_session_emit_error (FS_SESSION (session), G_OBJECT (session),
+      FS_SESSION_ERROR_CONSTRUCTION,
       "Could not link rtpbin network rtcp src to tee", tmp);
     g_free (tmp);
 
-- 
1.5.6.5




More information about the farsight-commits mailing list