X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Frtsp-server%2Frtsp-client.h;h=5e0f3f3033f4242d52ab8d252f780551aa2df5f5;hb=825d6f0b5190a465ad31dd17c83cc691bc2f421a;hp=f4211167a685eebc8e52c7135b10dd459b9f1f47;hpb=84e72262d012959354ca337529c2db4bb31d3d51;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/rtsp-server/rtsp-client.h b/gst/rtsp-server/rtsp-client.h index f421116..5e0f3f3 100644 --- a/gst/rtsp-server/rtsp-client.h +++ b/gst/rtsp-server/rtsp-client.h @@ -28,8 +28,8 @@ G_BEGIN_DECLS typedef struct _GstRTSPClient GstRTSPClient; typedef struct _GstRTSPClientClass GstRTSPClientClass; typedef struct _GstRTSPClientState GstRTSPClientState; +typedef struct _GstRTSPClientPrivate GstRTSPClientPrivate; -#include "rtsp-server.h" #include "rtsp-media.h" #include "rtsp-mount-points.h" #include "rtsp-session-pool.h" @@ -73,42 +73,31 @@ struct _GstRTSPClientState { }; /** - * GstRTSPClient: + * GstRTSPClientSendFunc: + * @client: a #GstRTSPClient + * @message: a #GstRTSPMessage + * @close: close the connection + * @user_data: user data when registering the callback + * + * This callback is called when @client wants to send @message. When @close is + * %TRUE, the connection should be closed when the message has been sent. * - * @connection: the connection object handling the client request. - * @watch: watch for the connection - * @ip: ip address used by the client to connect to us - * @use_client_settings: whether to allow client transport settings for multicast - * @session_pool: handle to the session pool used by the client. - * @mount_points: handle to the mount points used by the client. - * @uri: cached uri - * @media: cached media - * @transports: a list of #GstRTSPStreamTransport using @connection. - * @sessions: a list of sessions managed by @connection. + * Returns: %TRUE on success. + */ +typedef gboolean (*GstRTSPClientSendFunc) (GstRTSPClient *client, + GstRTSPMessage *message, + gboolean close, + gpointer user_data); + +/** + * GstRTSPClient: * * The client structure. */ struct _GstRTSPClient { GObject parent; - GstRTSPConnection *connection; - GstRTSPWatch *watch; - gchar *server_ip; - gboolean is_ipv6; - gboolean use_client_settings; - - GstRTSPServer *server; - GstRTSPSessionPool *session_pool; - GstRTSPMountPoints *mount_points; - GstRTSPAuth *auth; - - GstRTSPUrl *uri; - GstRTSPMedia *media; - - GList *transports; - GList *sessions; - - guint close_response_seq; + GstRTSPClientPrivate *priv; }; struct _GstRTSPClientClass { @@ -133,9 +122,6 @@ GType gst_rtsp_client_get_type (void); GstRTSPClient * gst_rtsp_client_new (void); -void gst_rtsp_client_set_server (GstRTSPClient * client, GstRTSPServer * server); -GstRTSPServer * gst_rtsp_client_get_server (GstRTSPClient * client); - void gst_rtsp_client_set_session_pool (GstRTSPClient *client, GstRTSPSessionPool *pool); GstRTSPSessionPool * gst_rtsp_client_get_session_pool (GstRTSPClient *client); @@ -151,6 +137,15 @@ 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); +GstRTSPConnection * gst_rtsp_client_get_connection (GstRTSPClient *client); + +void gst_rtsp_client_set_send_func (GstRTSPClient *client, + GstRTSPClientSendFunc func, + gpointer user_data, + GDestroyNotify notify); +GstRTSPResult gst_rtsp_client_handle_message (GstRTSPClient *client, + GstRTSPMessage *message); gboolean gst_rtsp_client_accept (GstRTSPClient *client, GSocket *socket,