rtspconnection: GstRTSPWatch func for tunnel GET response
[platform/upstream/gstreamer.git] / gst-libs / gst / rtsp / gstrtspconnection.h
index 57acdbe..71686e0 100644 (file)
@@ -13,8 +13,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 /*
  * Unless otherwise indicated, Source Code is licensed under MIT license.
@@ -72,6 +72,12 @@ GstRTSPResult      gst_rtsp_connection_connect        (GstRTSPConnection *conn,
 GstRTSPResult      gst_rtsp_connection_close          (GstRTSPConnection *conn);
 GstRTSPResult      gst_rtsp_connection_free           (GstRTSPConnection *conn);
 
+/* TLS connections */
+GTlsConnection *     gst_rtsp_connection_get_tls                  (GstRTSPConnection * conn, GError ** error);
+gboolean             gst_rtsp_connection_set_tls_validation_flags (GstRTSPConnection * conn, GTlsCertificateFlags flags);
+GTlsCertificateFlags gst_rtsp_connection_get_tls_validation_flags (GstRTSPConnection * conn);
+void                 gst_rtsp_connection_set_tls_database (GstRTSPConnection * conn, GTlsDatabase * database);
+GTlsDatabase *       gst_rtsp_connection_get_tls_database (GstRTSPConnection * conn);
 
 /* sending/receiving raw bytes */
 GstRTSPResult      gst_rtsp_connection_read           (GstRTSPConnection * conn, guint8 * data,
@@ -131,6 +137,9 @@ gboolean           gst_rtsp_connection_is_tunneled    (const GstRTSPConnection *
 const gchar *      gst_rtsp_connection_get_tunnelid   (const GstRTSPConnection *conn);
 GstRTSPResult      gst_rtsp_connection_do_tunnel      (GstRTSPConnection *conn, GstRTSPConnection *conn2);
 
+void               gst_rtsp_connection_set_remember_session_id (GstRTSPConnection *conn, gboolean remember);
+gboolean           gst_rtsp_connection_get_remember_session_id (GstRTSPConnection *conn);
+
 /* async IO */
 
 /**
@@ -153,13 +162,13 @@ typedef struct _GstRTSPWatch GstRTSPWatch;
  *   you usually pair the tunnelid of this connection with the saved one using
  *   gst_rtsp_connection_do_tunnel().
  * @error_full: callback when an error occured with more information than
- *   the @error callback. Since 0.10.25
+ *   the @error callback.
  * @tunnel_lost: callback when the post connection of a tunnel is closed.
- *   Since 0.10.29
+ * @tunnel_http_response: callback when an HTTP response to the GET request
+ *   is about to be sent for a tunneled connection. The response can be
+ *   modified in the callback. Since 1.4.
  *
  * Callback functions from a #GstRTSPWatch.
- *
- * Since: 0.10.23
  */
 typedef struct {
   GstRTSPResult     (*message_received) (GstRTSPWatch *watch, GstRTSPMessage *message,
@@ -175,9 +184,13 @@ typedef struct {
                                          GstRTSPMessage *message, guint id,
                                          gpointer user_data);
   GstRTSPResult     (*tunnel_lost)      (GstRTSPWatch *watch, gpointer user_data);
+  GstRTSPResult     (*tunnel_http_response) (GstRTSPWatch *watch,
+                                             GstRTSPMessage *request,
+                                             GstRTSPMessage *response,
+                                             gpointer user_data);
 
   /*< private >*/
-  gpointer _gst_reserved[GST_PADDING];
+  gpointer _gst_reserved[GST_PADDING-1];
 } GstRTSPWatchFuncs;
 
 GstRTSPWatch *     gst_rtsp_watch_new                (GstRTSPConnection *conn,
@@ -190,6 +203,11 @@ void               gst_rtsp_watch_unref              (GstRTSPWatch *watch);
 guint              gst_rtsp_watch_attach             (GstRTSPWatch *watch,
                                                       GMainContext *context);
 
+void               gst_rtsp_watch_set_send_backlog  (GstRTSPWatch *watch,
+                                                     gsize bytes, guint messages);
+void               gst_rtsp_watch_get_send_backlog  (GstRTSPWatch *watch,
+                                                     gsize *bytes, guint *messages);
+
 GstRTSPResult      gst_rtsp_watch_write_data         (GstRTSPWatch *watch,
                                                       const guint8 *data,
                                                       guint size, guint *id);