libgnomevfs2-mythtv/modules/mythtv-method.c
author rosfran
Wed Feb 14 22:24:39 2007 +0000 (2007-02-14)
branchtrunk
changeset 362 6d7b5baf170b
parent 357 194c44ef8da4
child 363 49e3e9bfc3ab
permissions -rwxr-xr-x
[svn r364] Fixed a mutual exclusion bug on the Monitor Handler GIOChannel read callback.
     1 /*
     2  * @author Hallyson Melo <hallyson.melo@indt.org.br>
     3  *
     4  * This program is free software; you can redistribute it and/or modify
     5  * it under the terms of the GNU Lesser General Public License as published by
     6  * the Free Software Foundation; either version 2 of the License, or
     7  * (at your option) any later version.
     8  *
     9  * This program is distributed in the hope that it will be useful,
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    12  * GNU General Public License for more details.
    13  *
    14  * You should have received a copy of the GNU Lesser General Public License
    15  * along with this program; if not, write to the Free Software
    16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    17  */
    18 
    19 #ifdef HAVE_CONFIG_H
    20 #include <config.h>
    21 #endif
    22 
    23 #include <string.h>
    24 #include <glib.h>
    25 #include <math.h>
    26 
    27 #include <libgnomevfs/gnome-vfs-module.h>
    28 #include <libgnomevfs/gnome-vfs-utils.h>
    29 
    30 #include <gmyth/gmyth_file_transfer.h>
    31 #include <gmyth/gmyth_livetv.h>
    32 #include <gmyth/gmyth_uri.h>
    33 #include <gmyth/gmyth_recorder.h>
    34 #include <gmyth/gmyth_backendinfo.h>
    35 #include <gmyth/gmyth_util.h>
    36 #include <gmyth/gmyth_remote_util.h>
    37 #include <gmyth/gmyth_tvchain.h>
    38 #include <gmyth/gmyth_programinfo.h>
    39 
    40 #define GST_MYTHTV_ID_NUM               1
    41 #define MYTHTV_VERSION_DEFAULT          30
    42 #define MYTHTV_TRANSFER_MAX_WAITS       100
    43 
    44 /* internal GnomeVFS plug-in buffer size ( 120 Kbytes ) */
    45 #define MYTHTV_BUFFER_SIZE							1024*120
    46 /* internally sized GnomeVFS plug-in buffer ( 4 Kbytes ) */
    47 #define MYTHTV_MAX_VFS_BUFFER_SIZE			4096
    48 /* maximum number of bytes to be requested to the MythTV backend ( 64 Kbytes ) */
    49 #define MYTHTV_MAX_REQUEST_SIZE					1024*64
    50 
    51 static GnomeVFSResult do_read (GnomeVFSMethod *method,
    52                                GnomeVFSMethodHandle *method_handle,
    53                                gpointer buffer,
    54                                GnomeVFSFileSize num_bytes,
    55                                GnomeVFSFileSize *bytes_read,
    56                                GnomeVFSContext *context);
    57 
    58 typedef struct {
    59     GMythFileTransfer *file_transfer;
    60     GMythLiveTV 			*livetv;
    61     gchar 						*channel_name;
    62     
    63     gint mythtv_version;
    64     gint64 content_size;
    65     guint64 bytes_read;
    66 
    67     GByteArray *buffer;
    68     gsize buffer_remain;
    69     gboolean	is_livetv;
    70     
    71     gboolean configured;
    72     
    73 } MythtvHandle;
    74 
    75 //static MythtvHandle *myth_handle = NULL;
    76 
    77 static GnomeVFSResult
    78 do_open (GnomeVFSMethod *method,
    79          GnomeVFSMethodHandle **method_handle,
    80          GnomeVFSURI *uri,
    81          GnomeVFSOpenMode mode,
    82          GnomeVFSContext *context)
    83 { 
    84 		MythtvHandle *myth_handle = NULL;   
    85     GMythBackendInfo *backend_info = NULL;
    86     GMythURI *gmyth_uri = NULL;
    87     gboolean ret = TRUE;
    88 
    89     _GNOME_VFS_METHOD_PARAM_CHECK (method_handle != NULL);
    90     _GNOME_VFS_METHOD_PARAM_CHECK (uri != NULL);
    91 
    92     if (mode & GNOME_VFS_OPEN_WRITE) {
    93         return GNOME_VFS_ERROR_NOT_PERMITTED;
    94     }
    95 
    96     if (gnome_vfs_uri_get_host_name (uri) == NULL) {
    97     	return GNOME_VFS_ERROR_INVALID_HOST_NAME;
    98     }
    99     
   100     /*
   101     if ( method_handle != NULL && *method_handle != NULL )
   102     {
   103     	myth_handle = (MythtvHandle*)*method_handle;
   104     	//if ( !myth_handle->configured )    	
   105     }
   106     */
   107     
   108     if ( ( NULL == myth_handle ) || !myth_handle->configured ) {
   109     	myth_handle = g_new0 (MythtvHandle, 1);
   110     	
   111     	myth_handle->configured = FALSE;
   112 	    
   113 	    myth_handle->is_livetv = FALSE;
   114 	    
   115 	    /* Initialize mythtv handler*/
   116 	    myth_handle->file_transfer = NULL;
   117 	    myth_handle->livetv = NULL;
   118 	    myth_handle->mythtv_version = MYTHTV_VERSION_DEFAULT;
   119 	    myth_handle->bytes_read = 0;
   120 	    myth_handle->content_size = (GnomeVFSFileSize) - 1;
   121 	
   122 	    /* Creates and fills out the backend info structure */    
   123 		  backend_info = gmyth_backend_info_new_with_uri ( 
   124 		  			gnome_vfs_unescape_string( gnome_vfs_uri_to_string( uri, GNOME_VFS_URI_HIDE_NONE ), "" ) );
   125 		  
   126 		  /* creates an instance of  */  
   127 		  gmyth_uri = gmyth_uri_new_with_value( 
   128 		  		gnome_vfs_unescape_string( gnome_vfs_uri_to_string( uri, GNOME_VFS_URI_HIDE_NONE ), "" ) );
   129 	
   130 		  myth_handle->is_livetv = gmyth_uri_is_livetv( gmyth_uri );
   131 	
   132 		  /* Connect to the backend */	  
   133 		  if ( gmyth_uri != NULL && myth_handle->is_livetv == TRUE ) {
   134 		  	
   135 		  	if ( NULL == myth_handle->livetv )
   136 		  	{
   137 		    	myth_handle->livetv = gmyth_livetv_new ();
   138 		    
   139 			    myth_handle->channel_name = gmyth_uri_get_channel_name( gmyth_uri );
   140 			    
   141 			    g_debug( "[%s] Channel name = %s\n", __FUNCTION__, myth_handle->channel_name );
   142 			
   143 			    if ( myth_handle->channel_name != NULL ) {
   144 			      if (gmyth_livetv_channel_name_setup (myth_handle->livetv, myth_handle->channel_name,
   145 			              backend_info) == FALSE) {
   146 			        g_object_unref( gmyth_uri );
   147 			        ret = FALSE;
   148 			      }
   149 			    } else {
   150 			      if ( gmyth_livetv_setup (myth_handle->livetv, backend_info) == FALSE ) {
   151 			      	g_object_unref( gmyth_uri );
   152 			        ret = FALSE;
   153 			      }
   154 			    }
   155 		  	}
   156 		  	
   157 		  	if ( NULL == myth_handle->file_transfer )	{
   158 		    	myth_handle->file_transfer = gmyth_livetv_create_file_transfer (myth_handle->livetv);
   159 		
   160 			    if (NULL == myth_handle->file_transfer) {
   161 			      ret = FALSE;
   162 				    g_debug ("MythTV FileTransfer is NULL!\n");
   163 				    return GNOME_VFS_ERROR_NOT_OPEN;
   164 			    }
   165 			    
   166 		  		if ( !gmyth_file_transfer_open( myth_handle->file_transfer, myth_handle->livetv->uri != NULL ? 
   167 										gmyth_uri_get_path(myth_handle->livetv->uri) : 
   168 										myth_handle->livetv->proginfo->pathname->str ) )
   169 					{
   170 						g_debug ("Couldn't open MythTV FileTransfer is NULL!\n");
   171 						g_object_unref( myth_handle->file_transfer );
   172 						myth_handle->file_transfer = NULL;
   173 						ret = FALSE;
   174 					}
   175 		  	} /* if - FileTransfer is NULL, or not */
   176 		    
   177 		  } else {
   178 		  	
   179 		  	if (NULL == myth_handle->file_transfer ) {
   180 		
   181 			    myth_handle->file_transfer = gmyth_file_transfer_new (backend_info);
   182 			    
   183 			    /* Verifies if the file exists */
   184 			    if (!gmyth_util_file_exists (backend_info, gmyth_uri_get_path (gmyth_uri))) {
   185 			        g_object_unref (backend_info);
   186 							ret = FALSE;
   187 			    }
   188 			    
   189 			    /* sets the Playback monitor connection */
   190 			    ret = gmyth_file_transfer_open ( myth_handle->file_transfer, 
   191 			    		gmyth_uri_get_path (gmyth_uri) );
   192 			    		
   193 		  	}
   194 			
   195 		  } /* if - LiveTV or not? */
   196 		  
   197 	    if (ret == FALSE) {
   198 		    g_debug ("MythTV FileTransfer open error.\n");
   199 		    return GNOME_VFS_ERROR_NOT_OPEN;
   200 		  }
   201 		  
   202 		  myth_handle->configured = TRUE;
   203 	
   204 	    g_object_unref (backend_info);
   205 	    
   206 		  if ( gmyth_uri != NULL )
   207 		  	g_object_unref( gmyth_uri );
   208 		  
   209 	    myth_handle->buffer = g_byte_array_sized_new (MYTHTV_BUFFER_SIZE);
   210 	    myth_handle->buffer_remain = 0;
   211 	    
   212 		  g_return_val_if_fail (myth_handle->file_transfer != NULL, GNOME_VFS_ERROR_NOT_OPEN);
   213 		  
   214 		  if ( /*myth_handle->file_transfer->filesize <= 0 && */myth_handle->is_livetv ) {
   215 		  	myth_handle->content_size = gmyth_recorder_get_file_position(myth_handle->livetv->recorder);
   216 		  } else {
   217 	    	myth_handle->content_size = myth_handle->file_transfer->filesize;
   218 		  }
   219 		  
   220     } /* if - configured or not? */
   221 	  
   222     *method_handle = (GnomeVFSMethodHandle *) myth_handle;
   223 
   224     return GNOME_VFS_OK;
   225 }
   226 
   227 static GnomeVFSResult
   228 do_read (GnomeVFSMethod *method,
   229          GnomeVFSMethodHandle *method_handle,
   230          gpointer buffer,
   231          GnomeVFSFileSize num_bytes,
   232          GnomeVFSFileSize *bytes_read,
   233          GnomeVFSContext *context)
   234 {
   235   MythtvHandle *myth_handle = (MythtvHandle *) method_handle;
   236   GnomeVFSFileSize bytes_to_read = num_bytes;
   237 
   238   if ( !myth_handle->is_livetv && ( myth_handle->bytes_read >= myth_handle->content_size ) )
   239       return GNOME_VFS_ERROR_EOF;
   240 
   241   /* fixme: change this to min math function */
   242   if (( myth_handle->content_size > 0 ) ) 
   243   {
   244   	if ( !myth_handle->is_livetv && 
   245   				( num_bytes > ( myth_handle->content_size - myth_handle->bytes_read ) ) )
   246   	{
   247     	bytes_to_read = myth_handle->content_size - myth_handle->bytes_read;
   248   	}
   249   }
   250 
   251   /* Loop sending the Myth File Transfer request:
   252    * Retry whilst authentication fails and we supply it. */
   253   if ( ( myth_handle->buffer_remain = myth_handle->buffer->len ) < bytes_to_read ) 
   254   {
   255   	gint buffer_size;
   256   	
   257   	while ( MYTHTV_BUFFER_SIZE != myth_handle->buffer_remain ) {
   258   		
   259 	  	/* resize buffer length request to no more than MYTHTV_MAX_REQUEST_SIZE */
   260 	  	if ( ( MYTHTV_BUFFER_SIZE - myth_handle->buffer_remain ) <= MYTHTV_MAX_REQUEST_SIZE )
   261 	  		buffer_size = MYTHTV_BUFFER_SIZE - myth_handle->buffer_remain;
   262 	  	else
   263 	  		buffer_size = MYTHTV_MAX_REQUEST_SIZE;
   264 	
   265 	  	GByteArray *tmp_buffer = g_byte_array_new();
   266 	
   267 			g_debug ("XXXXXXXXXX Asking %d bytes (there is %d bytes in the buffer)\n", 
   268 					buffer_size, myth_handle->buffer_remain);
   269 	
   270 	    gint len = gmyth_file_transfer_read (myth_handle->file_transfer,
   271 	          tmp_buffer, buffer_size, TRUE);
   272 	
   273 			if (!myth_handle->is_livetv && len < 0) {
   274 		    g_byte_array_free (tmp_buffer, TRUE);
   275 		    g_debug ("Fail to read bytes");
   276 		    return GNOME_VFS_ERROR_IO;
   277 		  } /*else if (len == 0) {
   278 			    g_byte_array_free (tmp_buffer, TRUE);
   279 			    g_warning ("End of file probably achieved");
   280 			    return GNOME_VFS_ERROR_EOF;
   281 			}*/
   282 	
   283 	    myth_handle->buffer = g_byte_array_append ( myth_handle->buffer,
   284 	    		tmp_buffer->data, len );
   285 	
   286 			myth_handle->buffer_remain += len;
   287 
   288 			if ( tmp_buffer != NULL )
   289 			{
   290 	      g_byte_array_free ( tmp_buffer, TRUE );
   291 	    	tmp_buffer = NULL;
   292 			}
   293   	} /* while - iterates until fills the internal buffer */
   294   	
   295   } /* if - got from the network, or not */
   296   
   297   bytes_to_read = ( bytes_to_read > myth_handle->buffer_remain ) ? myth_handle->buffer_remain : bytes_to_read;
   298   /* gets the first buffer_size bytes from the byte array buffer variable */ 
   299 
   300   g_memmove (buffer, myth_handle->buffer->data, bytes_to_read);
   301 
   302   myth_handle->bytes_read += bytes_to_read;
   303   myth_handle->buffer_remain -= bytes_to_read;
   304 
   305 	/* flushs the newly buffer got from byte array */
   306 	myth_handle->buffer = g_byte_array_remove_range (myth_handle->buffer, 0, bytes_to_read);
   307 	g_debug ("Got from %llu bytes from internal buffer. (there are %d bytes in the buffer, from a total of %llu dispatched.)\n", 
   308 				bytes_to_read, myth_handle->buffer_remain, myth_handle->bytes_read );
   309 	
   310  	*bytes_read = bytes_to_read;
   311 
   312   return GNOME_VFS_OK;
   313 }
   314 
   315 static GnomeVFSResult
   316 do_close (GnomeVFSMethod *method,
   317           GnomeVFSMethodHandle *method_handle,
   318           GnomeVFSContext *context)
   319 {
   320 
   321   MythtvHandle *myth_handle = (MythtvHandle *) method_handle;
   322   
   323   //if ( NULL == myth_handle || myth_handle->configured ) {
   324 	
   325 	  if (myth_handle->file_transfer != NULL) {
   326 	    g_object_unref (myth_handle->file_transfer);
   327 	  	myth_handle->file_transfer = NULL;
   328 	  }
   329 	  
   330 	  if (myth_handle->is_livetv && myth_handle->livetv != NULL) {
   331 	    g_object_unref (myth_handle->livetv);
   332 	  	myth_handle->livetv = NULL;
   333 	  }
   334 	  
   335 	  if (myth_handle->buffer) {
   336 			g_byte_array_free (myth_handle->buffer, TRUE);
   337 			myth_handle->buffer = NULL;
   338 	  }
   339 	
   340 	  myth_handle->configured = FALSE;
   341 	
   342 	  g_free (myth_handle);
   343 	  
   344 	  myth_handle = NULL;	    
   345 	  
   346  // }
   347     
   348   return GNOME_VFS_OK;
   349 }
   350 
   351 static GnomeVFSResult
   352 do_get_file_info (GnomeVFSMethod *method,
   353                   GnomeVFSURI *uri,
   354                   GnomeVFSFileInfo *file_info,
   355                   GnomeVFSFileInfoOptions options,
   356                   GnomeVFSContext *context)
   357 {
   358     GMythFileTransfer *file_transfer = NULL;
   359     GMythRecorder			*recorder 		 = NULL;
   360     GMythTVChain			*tvchain	 		 = NULL;
   361     GMythBackendInfo  *backend_info  = NULL;
   362     GMythURI					*gmyth_uri		 = NULL;
   363 		GMythSocket 			*socket 			 = NULL;		 
   364     gboolean 					is_livetv 		 = FALSE;
   365     gboolean					ret						 = TRUE;
   366     gboolean 					res 					 = TRUE;
   367     
   368     /* Creates and fills out the backend info structure */    
   369 	  backend_info = gmyth_backend_info_new_with_uri ( 
   370 	  			gnome_vfs_unescape_string( gnome_vfs_uri_to_string( uri, GNOME_VFS_URI_HIDE_NONE ), "" ) );
   371 	  
   372 	  /* creates an instance of */  
   373 	  gmyth_uri = gmyth_uri_new_with_value( 
   374 	  		gnome_vfs_unescape_string( gnome_vfs_uri_to_string( uri, GNOME_VFS_URI_HIDE_NONE ), "" ) );
   375 
   376 	  is_livetv = gmyth_uri_is_livetv( gmyth_uri );
   377 
   378     file_info->valid_fields = file_info->valid_fields
   379         | GNOME_VFS_FILE_INFO_FIELDS_TYPE
   380         | GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE
   381         | GNOME_VFS_FILE_INFO_FIELDS_PERMISSIONS;
   382     file_info->type = GNOME_VFS_FILE_TYPE_REGULAR;
   383     /* fixme: get from file extension? */
   384     file_info->mime_type = g_strdup ("video/x-nuv");
   385     file_info->permissions =
   386         GNOME_VFS_PERM_USER_READ |
   387         GNOME_VFS_PERM_OTHER_READ |
   388         GNOME_VFS_PERM_GROUP_READ;
   389         
   390     g_print( "gnome_vfs_uri == %s | gmyth_uri == %s.\n",
   391     				gnome_vfs_uri_get_path (uri),
   392     				gmyth_uri_get_path (gmyth_uri) );
   393 
   394 	  /* Connect to the backend */
   395 	  if ( gmyth_uri != NULL && is_livetv == TRUE ) {
   396 	  	
   397 	  	/* start to get file info from LiveTV remote encoder */	  	
   398 			socket = gmyth_socket_new ();
   399 			
   400 			/* FIME: Implement this at gmyth_socket */
   401 			res = gmyth_socket_connect_to_backend (socket, backend_info->hostname,
   402 					backend_info->port, TRUE);
   403 			if (!res) {
   404 				g_print ("[%s] LiveTV can not connect to backend", __FUNCTION__);	
   405 				res = FALSE;
   406 				goto error;
   407 			}
   408 
   409 			if ( gmyth_remote_util_get_free_recorder_count (socket) <= 0 ) {
   410 				g_print ("No free remote encoder available.");
   411 				res = FALSE;
   412 				goto error;
   413 			}
   414 		
   415 			/* Gets the recorder num */
   416 			recorder = remote_request_next_free_recorder (socket, -1);
   417 			
   418 			//if ( socket != NULL )
   419 			//	g_object_unref (socket);
   420 		
   421 			if ( recorder == NULL ) {
   422 				g_print ("[%s] None remote encoder available", __FUNCTION__);
   423 				res = FALSE;
   424 				goto error;
   425 			}
   426 			
   427 			/* Init remote encoder. Opens its control socket. */
   428 			res = gmyth_recorder_setup(recorder);
   429 			if ( !res ) {
   430 				g_print ("[%s] Fail while setting remote encoder\n", __FUNCTION__);
   431 				res = FALSE;
   432 				goto error;
   433 			}
   434 			
   435 			/* Creates livetv chain handler */
   436 			tvchain = gmyth_tvchain_new();
   437 			gmyth_tvchain_initialize ( tvchain, backend_info );
   438 		
   439 			if ( tvchain == NULL || tvchain->tvchain_id == NULL ) {
   440 				res = FALSE;
   441 				goto error;
   442 			}
   443 			
   444 			// Spawn live tv. Uses the socket to send mythprotocol data to start livetv in the backend (remotelly)
   445 			res = gmyth_recorder_spawntv ( recorder,
   446 					gmyth_tvchain_get_id(tvchain) );
   447 			if (!res) {
   448 				g_warning ("[%s] Fail while spawn tv\n", __FUNCTION__);
   449 				res = FALSE;
   450 				goto error;
   451 			}	
   452 			
   453 		  //gchar* channel_name = gmyth_uri_get_channel_name( gmyth_uri );		  
   454 	
   455 		  /* DEBUG message */
   456 			GMythProgramInfo* prog_info = gmyth_recorder_get_current_program_info( recorder );
   457 			
   458 			if ( prog_info != NULL )
   459 			{
   460 				//gmyth_program_info_print( prog_info );
   461 				g_debug( "Program Info: %s\n", gmyth_program_info_to_string( prog_info ) ); 
   462   
   463 		    g_print( "path = %s",  prog_info->pathname->str );
   464 		    
   465 		    file_info->name = g_strdup ( g_strrstr( prog_info->pathname->str, "/" ) );
   466 		    
   467 			} else {
   468 				file_info->name = g_strdup ( "LiveTV.nuv" );
   469 				file_info->size = gmyth_recorder_get_file_position( recorder );
   470 			}
   471 			
   472 	    if ( recorder != NULL )
   473 	    	g_object_unref (recorder);
   474 	    
   475 	    if ( prog_info != NULL )
   476 	    	g_object_unref( prog_info );
   477 
   478 	    if ( tvchain != NULL )
   479 	    	g_object_unref (tvchain);
   480 	    
   481 	    file_info->size = (GnomeVFSFileSize) - 1;
   482 
   483 	  } else {
   484 	  	
   485 	  	/* start to get file info from remote file encoder */	
   486 	    file_transfer = gmyth_file_transfer_new (backend_info);
   487 	    
   488 	    /* Verifies if the file exists */
   489 	    if (!gmyth_util_file_exists (backend_info, gmyth_uri_get_path (gmyth_uri))) {
   490 	        g_object_unref (backend_info);
   491 					return GNOME_VFS_ERROR_NOT_FOUND;
   492 	    }
   493 	    
   494 	    /* sets the Playback monitor connection */
   495 	    ret = gmyth_file_transfer_open ( file_transfer, gmyth_uri_get_path (gmyth_uri) );
   496 	    
   497 	    file_info->name = g_strdup ( gnome_vfs_uri_get_path (uri) );
   498 		
   499 	  } /* if - LiveTV or not? */	  
   500 	  
   501     if (ret == FALSE) {
   502 	    g_debug ("MythTV FileTransfer open error\n");
   503 	    return GNOME_VFS_ERROR_NOT_OPEN;
   504 	  }
   505 	  
   506 		if ( ret == TRUE  && file_transfer != NULL ) {
   507     	file_info->size = gmyth_file_transfer_get_filesize (file_transfer);
   508 	    if ( file_transfer )
   509 	    	g_object_unref (file_transfer);
   510    	}
   511 
   512     file_info->block_count = GNOME_VFS_FILE_INFO_FIELDS_BLOCK_COUNT;
   513 	  file_info->io_block_size = GNOME_VFS_FILE_INFO_FIELDS_IO_BLOCK_SIZE;
   514 	  
   515 error:
   516     if (backend_info)
   517    		g_object_unref (backend_info);
   518    		
   519    	if (!res)
   520    		return GNOME_VFS_ERROR_IO;
   521 
   522     return GNOME_VFS_OK;
   523 }
   524 
   525 static gboolean
   526 do_is_local (GnomeVFSMethod *method,
   527              const GnomeVFSURI *uri)
   528 {
   529 	return FALSE;
   530 }
   531 
   532 static GnomeVFSMethod method = {
   533 	sizeof (GnomeVFSMethod),
   534 	do_open,
   535 	NULL,
   536 	do_close,
   537 	do_read,
   538 	NULL,
   539 	NULL,
   540 	NULL,
   541 	NULL,
   542 	NULL,
   543 	NULL,
   544 	NULL,
   545 	do_get_file_info,
   546 	NULL,
   547 	do_is_local,
   548 	NULL,
   549 	NULL,
   550 	NULL,
   551 	NULL,
   552 	NULL,
   553 	NULL,
   554 	NULL,
   555 	NULL,
   556 	NULL,
   557 	NULL,
   558 	NULL,
   559 	NULL,
   560 };
   561 
   562 
   563 GnomeVFSMethod *
   564 vfs_module_init (const char *method_name, const char *args)
   565 {
   566 	return &method;
   567 }
   568 
   569 void
   570 vfs_module_shutdown (GnomeVFSMethod *method)
   571 {
   572 }