Use ASYNC RTSP io
[platform/upstream/gstreamer.git] / gst / rtsp-server / rtsp-client.h
index da09684..4746d1c 100644 (file)
@@ -38,6 +38,7 @@
 #define __GST_RTSP_CLIENT_H__
 
 #include "rtsp-media.h"
+#include "rtsp-media-mapping.h"
 #include "rtsp-session-pool.h"
 
 G_BEGIN_DECLS
@@ -54,33 +55,53 @@ G_BEGIN_DECLS
 typedef struct _GstRTSPClient GstRTSPClient;
 typedef struct _GstRTSPClientClass GstRTSPClientClass;
 
+/**
+ * GstRTSPClient:
+ *
+ * @connection: the connection object handling the client request.
+ * @address: the address of the connection
+ * @media: handle to the media handled by the client.
+ * @pool: handle to the session pool used by the client.
+ * @thread: thread to handle the client connection
+ *
+ * The client structure.
+ */
 struct _GstRTSPClient {
   GObject       parent;
 
   GstRTSPConnection *connection;
-  struct sockaddr_in address;
-
-  GstRTSPMedia *media;
+  GstRTSPChannel *channel;
+  GThread *thread;
 
-  GstRTSPSessionPool *pool;
+  guint                 timeout;
+  GstRTSPSessionPool   *session_pool;
+  GstRTSPMediaMapping  *media_mapping;
 
-  GThread *thread;
+  GstRTSPUrl     *uri;
+  GstRTSPMedia   *media;
 };
 
 struct _GstRTSPClientClass {
   GObjectClass  parent_class;
 };
 
-GType                gst_rtsp_client_get_type          (void);
+GType                 gst_rtsp_client_get_type          (void);
+
+GstRTSPClient *       gst_rtsp_client_new               (void);
+
+void                  gst_rtsp_client_set_session_pool  (GstRTSPClient *client, 
+                                                         GstRTSPSessionPool *pool);
+GstRTSPSessionPool *  gst_rtsp_client_get_session_pool  (GstRTSPClient *client);
 
-GstRTSPClient *      gst_rtsp_client_new               (void);
+void                  gst_rtsp_client_set_media_mapping (GstRTSPClient *client, 
+                                                         GstRTSPMediaMapping *mapping);
+GstRTSPMediaMapping * gst_rtsp_client_get_media_mapping (GstRTSPClient *client);
 
-void                 gst_rtsp_client_set_session_pool  (GstRTSPClient *client, 
-                                                        GstRTSPSessionPool *pool);
-GstRTSPSessionPool * gst_rtsp_client_get_session_pool  (GstRTSPClient *client);
+void                  gst_rtsp_client_set_timeout       (GstRTSPClient *client, guint timeout);
+guint                 gst_rtsp_client_get_timeout       (GstRTSPClient *client);
 
-gboolean             gst_rtsp_client_accept            (GstRTSPClient *client, 
-                                                        GIOChannel *source);
+gboolean              gst_rtsp_client_accept            (GstRTSPClient *client, 
+                                                         GIOChannel *channel);
 
 G_END_DECLS