rtsp-client: Make configure_client_transport virtual
[platform/upstream/gstreamer.git] / gst / rtsp-server / rtsp-client.h
index 6ec1f86..18bb522 100644 (file)
@@ -28,6 +28,7 @@ G_BEGIN_DECLS
 typedef struct _GstRTSPClient GstRTSPClient;
 typedef struct _GstRTSPClientClass GstRTSPClientClass;
 typedef struct _GstRTSPClientState GstRTSPClientState;
+typedef struct _GstRTSPClientPrivate GstRTSPClientPrivate;
 
 #include "rtsp-media.h"
 #include "rtsp-mount-points.h"
@@ -90,57 +91,33 @@ typedef gboolean (*GstRTSPClientSendFunc)      (GstRTSPClient *client,
 
 /**
  * GstRTSPClient:
- * @lock: lock protecting the client object
- * @connection: the connection object handling the client request.
- * @watch: watch for the connection
- * @close_seq: sequence number of message with close header
- * @server_ip: ip address of the server
- * @is_ipv6: if we are IPv6
- * @use_client_settings: whether to allow client transport settings for multicast
- * @send_func: a #GstRTSPClientSendFunc called when an RTSP message needs to be
- *             sent to the client.
- * @send_data: user data passed to @send_func
- * @send_notify: notify called when @send_data is no longer used.
- * @session_pool: handle to the session pool used by the client.
- * @mount_points: handle to the mount points used by the client.
- * @auth: authorization object
- * @uri: cached uri
- * @media: cached media
- * @transports: a list of #GstRTSPStreamTransport using @connection.
- * @sessions: a list of sessions managed by @connection.
  *
  * The client structure.
  */
 struct _GstRTSPClient {
   GObject       parent;
 
-  GMutex             lock;
-  GstRTSPConnection *connection;
-  GstRTSPWatch      *watch;
-  guint              close_seq;
-  gchar             *server_ip;
-  gboolean           is_ipv6;
-  gboolean           use_client_settings;
-
-  GstRTSPClientSendFunc send_func;
-  gpointer              send_data;
-  GDestroyNotify        send_notify;
-
-  GstRTSPSessionPool   *session_pool;
-  GstRTSPMountPoints   *mount_points;
-  GstRTSPAuth          *auth;
-
-  GstRTSPUrl     *uri;
-  GstRTSPMedia   *media;
-
-  GList *transports;
-  GList *sessions;
+  GstRTSPClientPrivate *priv;
 };
 
+/**
+ * GstRTSPClientClass:
+ * @params_set: set parameters. This function should also initialize the
+ * RTSP response(state->response) via a call to gst_rtsp_message_init_response()
+ * @params_get: get parameters. This function should also initialize the
+ * RTSP response(state->response) via a call to gst_rtsp_message_init_response()
+ *
+ * The client class structure.
+ */
 struct _GstRTSPClientClass {
   GObjectClass  parent_class;
 
   GstSDPMessage * (*create_sdp) (GstRTSPClient *client, GstRTSPMedia *media);
+  gboolean        (*configure_client_transport) (GstRTSPClient * client,
+                                                 GstRTSPClientState * state,
+                                                 GstRTSPTransport * ct);
+  GstRTSPResult   (*params_set) (GstRTSPClient *client, GstRTSPClientState *state);
+  GstRTSPResult   (*params_get) (GstRTSPClient *client, GstRTSPClientState *state);
 
   /* signals */
   void     (*closed)                  (GstRTSPClient *client);
@@ -174,6 +151,11 @@ gboolean              gst_rtsp_client_get_use_client_settings (GstRTSPClient * c
 void                  gst_rtsp_client_set_auth          (GstRTSPClient *client, GstRTSPAuth *auth);
 GstRTSPAuth *         gst_rtsp_client_get_auth          (GstRTSPClient *client);
 
+GstRTSPUrl *          gst_rtsp_client_get_uri           (GstRTSPClient *client);
+
+gboolean              gst_rtsp_client_set_connection    (GstRTSPClient *client, GstRTSPConnection *conn);
+GstRTSPConnection *   gst_rtsp_client_get_connection    (GstRTSPClient *client);
+
 void                  gst_rtsp_client_set_send_func     (GstRTSPClient *client,
                                                          GstRTSPClientSendFunc func,
                                                          gpointer user_data,
@@ -181,18 +163,6 @@ void                  gst_rtsp_client_set_send_func     (GstRTSPClient *client,
 GstRTSPResult         gst_rtsp_client_handle_message    (GstRTSPClient *client,
                                                          GstRTSPMessage *message);
 
-gboolean              gst_rtsp_client_accept            (GstRTSPClient *client,
-                                                         GSocket *socket,
-                                                         GCancellable *cancellable,
-                                                         GError **error);
-
-gboolean              gst_rtsp_client_use_socket        (GstRTSPClient * client,
-                                                         GSocket *socket,
-                                                         const gchar * ip,
-                                                         gint port,
-                                                         const gchar *initial_buffer,
-                                                         GError **error);
-
 guint                 gst_rtsp_client_attach            (GstRTSPClient *client,
                                                          GMainContext *context);