- p_input->pf_read = Read;
- p_input->pf_set_program = NULL;
- p_input->pf_set_area = NULL;
- p_input->pf_seek = NULL;
+ p_access->p_sys = (access_sys_t *)handle;
+
+ p_access->pf_read = Read;
+ p_access->pf_block = NULL;
+ p_access->pf_seek = NULL;
+ p_access->pf_control= Control;
+
+ /* Force a demux */
+ p_access->psz_demux = strdup( "directory" );
+
+ return VLC_SUCCESS;
+}
+
+/*****************************************************************************
+ * Close: close the target
+ *****************************************************************************/
+static void Close( vlc_object_t * p_this )
+{
+ access_t *p_access = (access_t*)p_this;
+ DIR *handle = (DIR *)p_access->p_sys;
+ closedir (handle);
+}
+
+/*****************************************************************************
+ * ReadNull: read the directory
+ *****************************************************************************/
+static int ReadNull( access_t *p_access, uint8_t *p_buffer, int i_len)
+{
+ /* Return fake data */
+ memset( p_buffer, 0, i_len );
+ return i_len;
+}
+
+/*****************************************************************************
+ * Read: read the directory
+ *****************************************************************************/
+static int Read( access_t *p_access, uint8_t *p_buffer, int i_len)
+{
+ char *psz;
+ int i_mode, i_activity;
+ char *psz_name = strdup (p_access->psz_path);