libgnomevfs2-mythtv/modules/mythtv-method.c
author rosfran
Tue Feb 06 00:34:37 2007 +0000 (2007-02-06)
branchtrunk
changeset 327 41995e0df2ba
parent 323 6523ab923c00
child 328 73461d8db7ec
permissions -rwxr-xr-x
[svn r329] Cleaning some non-mandatory code snippets from the GnomeVFS handler to the do_get_file_info.
melunko@38
     1
/*
melunko@38
     2
 * @author Hallyson Melo <hallyson.melo@indt.org.br>
melunko@38
     3
 *
melunko@38
     4
 * This program is free software; you can redistribute it and/or modify
melunko@38
     5
 * it under the terms of the GNU Lesser General Public License as published by
melunko@38
     6
 * the Free Software Foundation; either version 2 of the License, or
melunko@38
     7
 * (at your option) any later version.
melunko@38
     8
 *
melunko@38
     9
 * This program is distributed in the hope that it will be useful,
melunko@38
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
melunko@38
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
melunko@38
    12
 * GNU General Public License for more details.
melunko@38
    13
 *
melunko@38
    14
 * You should have received a copy of the GNU Lesser General Public License
melunko@38
    15
 * along with this program; if not, write to the Free Software
melunko@38
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
melunko@38
    17
 */
melunko@38
    18
melunko@38
    19
#ifdef HAVE_CONFIG_H
melunko@38
    20
#include <config.h>
melunko@38
    21
#endif
melunko@38
    22
melunko@38
    23
#include <string.h>
melunko@38
    24
#include <glib.h>
melunko@38
    25
#include <math.h>
melunko@38
    26
melunko@38
    27
#include <libgnomevfs/gnome-vfs-module.h>
melunko@38
    28
#include <libgnomevfs/gnome-vfs-utils.h>
melunko@38
    29
rosfran@277
    30
#include <gmyth/gmyth_file_transfer.h>
rosfran@277
    31
#include <gmyth/gmyth_livetv.h>
rosfran@277
    32
#include <gmyth/gmyth_uri.h>
rosfran@277
    33
#include <gmyth/gmyth_recorder.h>
rosfran@277
    34
#include <gmyth/gmyth_backendinfo.h>
rosfran@277
    35
#include <gmyth/gmyth_util.h>
melunko@38
    36
melunko@38
    37
#define GST_MYTHTV_ID_NUM               1
melunko@38
    38
#define MYTHTV_VERSION_DEFAULT          30
rosfran@277
    39
#define MYTHTV_TRANSFER_MAX_WAITS       100
melunko@38
    40
rosfran@327
    41
#define MYTHTV_BUFFER_SIZE							1024*64
melunko@111
    42
melunko@38
    43
static GnomeVFSResult do_read (GnomeVFSMethod *method,
melunko@38
    44
                               GnomeVFSMethodHandle *method_handle,
melunko@38
    45
                               gpointer buffer,
melunko@38
    46
                               GnomeVFSFileSize num_bytes,
melunko@38
    47
                               GnomeVFSFileSize *bytes_read,
melunko@38
    48
                               GnomeVFSContext *context);
melunko@38
    49
melunko@38
    50
typedef struct {
melunko@48
    51
    GMythFileTransfer *file_transfer;
rosfran@277
    52
    GMythLiveTV 			*livetv;
rosfran@327
    53
    gchar 						*channel_name;
melunko@38
    54
    
melunko@38
    55
    gint mythtv_version;
rosfran@297
    56
    gint64 content_size;
melunko@38
    57
    guint64 bytes_read;
melunko@111
    58
rosfran@116
    59
    GByteArray *buffer;
melunko@111
    60
    gsize buffer_remain;
melunko@38
    61
} MythtvHandle;
melunko@38
    62
melunko@38
    63
static GnomeVFSResult
melunko@38
    64
do_open (GnomeVFSMethod *method,
melunko@38
    65
         GnomeVFSMethodHandle **method_handle,
melunko@38
    66
         GnomeVFSURI *uri,
melunko@38
    67
         GnomeVFSOpenMode mode,
melunko@38
    68
         GnomeVFSContext *context)
melunko@38
    69
{
melunko@111
    70
    MythtvHandle *myth_handle;
melunko@160
    71
    GMythBackendInfo *backend_info;
rosfran@277
    72
    GMythURI *gmyth_uri = NULL;
rosfran@277
    73
    gboolean ret = TRUE;
rosfran@277
    74
    gboolean is_livetv = FALSE;
melunko@38
    75
melunko@38
    76
    _GNOME_VFS_METHOD_PARAM_CHECK (method_handle != NULL);
melunko@38
    77
    _GNOME_VFS_METHOD_PARAM_CHECK (uri != NULL);
melunko@38
    78
melunko@111
    79
    myth_handle = g_new0 (MythtvHandle, 1);
melunko@111
    80
melunko@38
    81
    if (mode & GNOME_VFS_OPEN_WRITE) {
melunko@38
    82
        return GNOME_VFS_ERROR_NOT_PERMITTED;
melunko@38
    83
    }
melunko@38
    84
renatofilho@149
    85
    if (gnome_vfs_uri_get_host_name (uri) == NULL) {
renatofilho@149
    86
    	return GNOME_VFS_ERROR_INVALID_HOST_NAME;
melunko@38
    87
    }
melunko@38
    88
melunko@38
    89
    /* Initialize mythtv handler*/
melunko@38
    90
    myth_handle->file_transfer = NULL;
rosfran@277
    91
    myth_handle->livetv = NULL;
melunko@38
    92
    myth_handle->mythtv_version = MYTHTV_VERSION_DEFAULT;
melunko@38
    93
    myth_handle->bytes_read = 0;
rosfran@327
    94
    myth_handle->content_size = -1;
melunko@38
    95
rosfran@277
    96
    /* Creates and fills out the backend info structure */    
rosfran@281
    97
	  backend_info = gmyth_backend_info_new_with_uri ( 
rosfran@281
    98
	  			gnome_vfs_unescape_string( gnome_vfs_uri_to_string( uri, GNOME_VFS_URI_HIDE_NONE ), "" ) );
rosfran@277
    99
	  
rosfran@277
   100
	  /* creates an instance of  */  
rosfran@281
   101
	  gmyth_uri = gmyth_uri_new_with_value( 
rosfran@281
   102
	  		gnome_vfs_unescape_string( gnome_vfs_uri_to_string( uri, GNOME_VFS_URI_HIDE_NONE ), "" ) );
rosfran@297
   103
rosfran@297
   104
	  is_livetv = gmyth_uri_is_livetv( gmyth_uri );
rosfran@297
   105
rosfran@277
   106
	  /* Connect to the backend */	  
rosfran@297
   107
	  if ( gmyth_uri != NULL && is_livetv == TRUE ) {
rosfran@277
   108
	    myth_handle->livetv = gmyth_livetv_new ();
rosfran@180
   109
	    
rosfran@327
   110
	    myth_handle->channel_name = gmyth_uri_get_channel_name( gmyth_uri );
rosfran@327
   111
	    
rosfran@327
   112
	    g_print( "[%s] Channel name = %s", __FUNCTION__, myth_handle->channel_name );
rosfran@277
   113
	
rosfran@327
   114
	    if ( myth_handle->channel_name != NULL ) {
rosfran@327
   115
	      if (gmyth_livetv_channel_name_setup (myth_handle->livetv, myth_handle->channel_name,
rosfran@277
   116
	              backend_info) == FALSE) {
rosfran@277
   117
	        g_object_unref( gmyth_uri );
rosfran@277
   118
	        ret = FALSE;
rosfran@277
   119
	      }
rosfran@277
   120
	    } else {
rosfran@277
   121
	      if ( gmyth_livetv_setup (myth_handle->livetv, backend_info) == FALSE ) {
rosfran@277
   122
	      	g_object_unref( gmyth_uri );
rosfran@277
   123
	        ret = FALSE;
rosfran@277
   124
	      }
rosfran@277
   125
	    }
rosfran@277
   126
	
rosfran@277
   127
	    myth_handle->file_transfer = gmyth_livetv_create_file_transfer (myth_handle->livetv);
rosfran@277
   128
	
rosfran@277
   129
	    if (NULL == myth_handle->file_transfer) {
rosfran@277
   130
	      ret = FALSE;
rosfran@277
   131
	    }
rosfran@277
   132
	    
rosfran@323
   133
  		if ( !gmyth_file_transfer_open( myth_handle->file_transfer, myth_handle->livetv->uri != NULL ? 
rosfran@323
   134
								gmyth_uri_get_path(myth_handle->livetv->uri) : 
rosfran@323
   135
								myth_handle->livetv->proginfo->pathname->str ) )
rosfran@323
   136
			{
rosfran@323
   137
				g_object_unref( myth_handle->file_transfer );
rosfran@323
   138
				myth_handle->file_transfer = NULL;
rosfran@323
   139
				ret = FALSE;
rosfran@323
   140
			}
rosfran@323
   141
	    
rosfran@277
   142
	  } else {
rosfran@277
   143
	
rosfran@277
   144
	    myth_handle->file_transfer = gmyth_file_transfer_new (backend_info);
rosfran@277
   145
	    
rosfran@277
   146
	    /* Verifies if the file exists */
rosfran@297
   147
	    if (!gmyth_util_file_exists (backend_info, gmyth_uri_get_path (gmyth_uri))) {
rosfran@277
   148
	        g_object_unref (backend_info);
rosfran@323
   149
					ret = FALSE;
rosfran@277
   150
	    }
rosfran@277
   151
	    
rosfran@277
   152
	    /* sets the Playback monitor connection */
rosfran@327
   153
	    ret = gmyth_file_transfer_open ( myth_handle->file_transfer, 
rosfran@327
   154
	    		gmyth_uri_get_path (gmyth_uri) );
rosfran@277
   155
		
rosfran@277
   156
	  } /* if - LiveTV or not? */
rosfran@277
   157
	  
rosfran@277
   158
    if (ret == FALSE) {
rosfran@323
   159
	    g_warning ("MythTV FileTransfer open error.\n");
rosfran@277
   160
	    return GNOME_VFS_ERROR_NOT_OPEN;
rosfran@323
   161
	  }
melunko@251
   162
renatofilho@188
   163
    g_object_unref (backend_info);
rosfran@297
   164
    
rosfran@297
   165
	  //if ( gmyth_uri != NULL )
rosfran@297
   166
	  //	g_object_unref( gmyth_uri );
rosfran@297
   167
	  
rosfran@297
   168
	  g_return_val_if_fail (myth_handle->file_transfer != NULL, GNOME_VFS_ERROR_NOT_OPEN);
rosfran@323
   169
	  
rosfran@327
   170
	  if ( myth_handle->file_transfer->filesize < 0 && is_livetv ) {
rosfran@327
   171
	  	myth_handle->content_size = (GnomeVFSFileSize) - 1;
rosfran@323
   172
			myth_handle->content_size = gmyth_recorder_get_file_position( myth_handle->livetv->recorder );
rosfran@327
   173
	  } else		
rosfran@323
   174
    	myth_handle->content_size = myth_handle->file_transfer->filesize;
melunko@111
   175
    
rosfran@116
   176
    myth_handle->buffer = g_byte_array_sized_new (MYTHTV_BUFFER_SIZE);
melunko@111
   177
    myth_handle->buffer_remain = 0;
melunko@38
   178
melunko@38
   179
    *method_handle = (GnomeVFSMethodHandle *) myth_handle;
melunko@38
   180
melunko@38
   181
    return GNOME_VFS_OK;
melunko@38
   182
}
melunko@38
   183
melunko@38
   184
static GnomeVFSResult
melunko@38
   185
do_read (GnomeVFSMethod *method,
melunko@38
   186
         GnomeVFSMethodHandle *method_handle,
melunko@38
   187
         gpointer buffer,
melunko@38
   188
         GnomeVFSFileSize num_bytes,
melunko@38
   189
         GnomeVFSFileSize *bytes_read,
melunko@38
   190
         GnomeVFSContext *context)
melunko@38
   191
{
rosfran@327
   192
  MythtvHandle *myth_handle = (MythtvHandle *) method_handle;
rosfran@327
   193
  GnomeVFSFileSize bytes_to_read;
melunko@38
   194
rosfran@327
   195
  *bytes_read = 0;
melunko@38
   196
rosfran@327
   197
  if (myth_handle->bytes_read >= myth_handle->content_size)
rosfran@327
   198
      return GNOME_VFS_ERROR_EOF;
melunko@38
   199
rosfran@327
   200
  // fixme: change this to min math function
rosfran@327
   201
  if (myth_handle->content_size > 0 && num_bytes > ( myth_handle->content_size - myth_handle->bytes_read ))
rosfran@327
   202
    bytes_to_read = myth_handle->content_size - myth_handle->bytes_read;
rosfran@327
   203
  else
rosfran@327
   204
    bytes_to_read = num_bytes;
melunko@38
   205
rosfran@327
   206
  /* Loop sending the Myth File Transfer request:
rosfran@327
   207
  * Retry whilst authentication fails and we supply it. */
rosfran@327
   208
  //if (myth_handle->buffer_remain  < MYTHTV_BUFFER_SIZE) {
rosfran@327
   209
  if ( ( myth_handle->buffer_remain = myth_handle->buffer->len ) < MYTHTV_BUFFER_SIZE ) {
rosfran@327
   210
  	GByteArray *tmp_buffer = g_byte_array_new();
melunko@38
   211
rosfran@327
   212
		printf ("XXXXXXXXXXXXXX Pedindo %d %d\n", MYTHTV_BUFFER_SIZE, myth_handle->buffer_remain);
melunko@317
   213
rosfran@327
   214
    gint len = gmyth_file_transfer_read (myth_handle->file_transfer,
rosfran@327
   215
          tmp_buffer, MYTHTV_BUFFER_SIZE - myth_handle->buffer_remain, TRUE);
melunko@38
   216
rosfran@327
   217
		if (len < 0) {
rosfran@327
   218
	    g_byte_array_free (tmp_buffer, TRUE);
rosfran@327
   219
	    g_warning ("Fail to read bytes");
melunko@251
   220
	    return GNOME_VFS_ERROR_IO;
rosfran@327
   221
	  } /*else if (len == 0) {
rosfran@327
   222
		    g_byte_array_free (tmp_buffer, TRUE);
rosfran@327
   223
		    g_warning ("End of file probably achieved");
rosfran@327
   224
		    return GNOME_VFS_ERROR_EOF;
rosfran@327
   225
		}*/
rosfran@327
   226
	
rosfran@327
   227
	    myth_handle->buffer = g_byte_array_append (myth_handle->buffer,
rosfran@327
   228
	    		tmp_buffer->data, len);
rosfran@327
   229
	
rosfran@327
   230
			myth_handle->buffer_remain += len;
melunko@111
   231
rosfran@327
   232
      g_byte_array_free (tmp_buffer, TRUE);
rosfran@327
   233
    	tmp_buffer = NULL;
rosfran@116
   234
    }
melunko@38
   235
    
melunko@111
   236
    bytes_to_read = (bytes_to_read > myth_handle->buffer_remain) ? myth_handle->buffer_remain : bytes_to_read;
renatofilho@164
   237
    /* gets the first buffer_size bytes from the byte array buffer variable */ 
rosfran@116
   238
renatofilho@149
   239
    g_memmove (buffer, myth_handle->buffer->data, bytes_to_read);
rosfran@116
   240
melunko@111
   241
    myth_handle->bytes_read += bytes_to_read;
rosfran@116
   242
    myth_handle->buffer_remain -= bytes_to_read;    
rosfran@116
   243
rosfran@116
   244
  	/* flushs the newly buffer got from byte array */
renatofilho@149
   245
  	myth_handle->buffer = g_byte_array_remove_range (myth_handle->buffer, 0, bytes_to_read);
melunko@111
   246
    *bytes_read = bytes_to_read;
melunko@38
   247
  
melunko@38
   248
    return GNOME_VFS_OK;
melunko@38
   249
}
melunko@38
   250
melunko@38
   251
static GnomeVFSResult
melunko@38
   252
do_close (GnomeVFSMethod *method,
melunko@38
   253
          GnomeVFSMethodHandle *method_handle,
melunko@38
   254
          GnomeVFSContext *context)
melunko@38
   255
{
melunko@111
   256
melunko@38
   257
    MythtvHandle *myth_handle = (MythtvHandle *) method_handle;
melunko@38
   258
melunko@111
   259
    if (myth_handle->file_transfer) {
renatofilho@164
   260
	    gmyth_file_transfer_close (myth_handle->file_transfer);
melunko@38
   261
        g_object_unref (myth_handle->file_transfer);
renatofilho@164
   262
    	myth_handle->file_transfer = NULL;
melunko@111
   263
    }
rosfran@127
   264
    
rosfran@277
   265
    if (myth_handle->livetv) {
rosfran@277
   266
      g_object_unref (myth_handle->livetv);
rosfran@277
   267
    	myth_handle->livetv = NULL;
rosfran@277
   268
    }
rosfran@277
   269
    
rosfran@127
   270
    if (myth_handle->buffer) {
renatofilho@164
   271
		g_byte_array_free (myth_handle->buffer, TRUE);
renatofilho@164
   272
		myth_handle->buffer = NULL;
rosfran@127
   273
    }
melunko@38
   274
melunko@38
   275
    g_free (myth_handle);
melunko@38
   276
melunko@38
   277
    return GNOME_VFS_OK;
melunko@38
   278
}
melunko@38
   279
melunko@38
   280
static GnomeVFSResult
melunko@38
   281
do_get_file_info (GnomeVFSMethod *method,
melunko@38
   282
                  GnomeVFSURI *uri,
melunko@38
   283
                  GnomeVFSFileInfo *file_info,
melunko@38
   284
                  GnomeVFSFileInfoOptions options,
melunko@38
   285
                  GnomeVFSContext *context)
melunko@38
   286
{
renatofilho@188
   287
    GMythFileTransfer *file_transfer = NULL;
rosfran@327
   288
    //GMythLiveTV 			*livetv 			 = NULL;
rosfran@297
   289
    GMythBackendInfo  *backend_info  = NULL;
rosfran@297
   290
    GMythURI					*gmyth_uri		 = NULL;
rosfran@297
   291
    gboolean 					is_livetv 		 = FALSE;
rosfran@301
   292
    gboolean					ret						 = TRUE;
rosfran@297
   293
    
rosfran@327
   294
    file_info->size =     (GnomeVFSFileSize) - 1;
rosfran@297
   295
    /* Creates and fills out the backend info structure */    
rosfran@297
   296
	  backend_info = gmyth_backend_info_new_with_uri ( 
rosfran@297
   297
	  			gnome_vfs_unescape_string( gnome_vfs_uri_to_string( uri, GNOME_VFS_URI_HIDE_NONE ), "" ) );
rosfran@297
   298
	  
rosfran@297
   299
	  /* creates an instance of */  
rosfran@297
   300
	  gmyth_uri = gmyth_uri_new_with_value( 
rosfran@297
   301
	  		gnome_vfs_unescape_string( gnome_vfs_uri_to_string( uri, GNOME_VFS_URI_HIDE_NONE ), "" ) );
renatofilho@188
   302
rosfran@297
   303
	  is_livetv = gmyth_uri_is_livetv( gmyth_uri );
rosfran@297
   304
rosfran@301
   305
    file_info->name = g_strdup (gmyth_uri_get_path (gmyth_uri)+1);
melunko@38
   306
    file_info->valid_fields = file_info->valid_fields
melunko@38
   307
        | GNOME_VFS_FILE_INFO_FIELDS_TYPE
melunko@38
   308
        | GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE
melunko@38
   309
        | GNOME_VFS_FILE_INFO_FIELDS_PERMISSIONS;
melunko@38
   310
    file_info->type = GNOME_VFS_FILE_TYPE_REGULAR;
rosfran@297
   311
    /* fixme: get from file extension? */
melunko@111
   312
    file_info->mime_type = g_strdup ("video/x-nuv");
melunko@38
   313
    file_info->permissions =
melunko@38
   314
        GNOME_VFS_PERM_USER_READ |
melunko@38
   315
        GNOME_VFS_PERM_OTHER_READ |
melunko@38
   316
        GNOME_VFS_PERM_GROUP_READ;
melunko@38
   317
rosfran@301
   318
	  /* Connect to the backend */
rosfran@297
   319
	  if ( gmyth_uri != NULL && is_livetv == TRUE ) {
rosfran@327
   320
	    /*
rosfran@327
   321
	    livetv = gmyth_livetv_new ();	    
rosfran@327
   322
	        
rosfran@297
   323
	    gint channel_num = gmyth_uri_get_channel_num( gmyth_uri );
rosfran@297
   324
	
rosfran@297
   325
	    if ( channel_num != -1 ) {
rosfran@297
   326
	      if (gmyth_livetv_channel_setup (livetv, channel_num,
rosfran@297
   327
	              backend_info) == FALSE) {
rosfran@297
   328
	        g_object_unref( gmyth_uri );
rosfran@297
   329
	        ret = FALSE;
rosfran@297
   330
	      }
rosfran@297
   331
	    } else {
rosfran@297
   332
	      if ( gmyth_livetv_setup (livetv, backend_info) == FALSE ) {
rosfran@297
   333
	      	g_object_unref( gmyth_uri );
rosfran@297
   334
	        ret = FALSE;
rosfran@297
   335
	      }
rosfran@297
   336
	    }
rosfran@297
   337
	
rosfran@327
   338
	    file_transfer = gmyth_livetv_create_file_transfer (livetv);	    
rosfran@297
   339
	
rosfran@297
   340
	    if (NULL == file_transfer) {
rosfran@297
   341
	      ret = FALSE;
rosfran@297
   342
	    }
rosfran@327
   343
	    */
rosfran@297
   344
	    
rosfran@297
   345
	  } else {
rosfran@297
   346
	
rosfran@297
   347
	    file_transfer = gmyth_file_transfer_new (backend_info);
rosfran@297
   348
	    
rosfran@297
   349
	    /* Verifies if the file exists */
rosfran@297
   350
	    if (!gmyth_util_file_exists (backend_info, gmyth_uri_get_path (gmyth_uri))) {
rosfran@297
   351
	        g_object_unref (backend_info);
rosfran@297
   352
					return GNOME_VFS_ERROR_NOT_FOUND;
rosfran@297
   353
	    }
rosfran@297
   354
	    
rosfran@297
   355
	    /* sets the Playback monitor connection */
rosfran@297
   356
	    ret = gmyth_file_transfer_open ( file_transfer, gmyth_uri_get_path (gmyth_uri) );
rosfran@297
   357
		
rosfran@297
   358
	  } /* if - LiveTV or not? */
rosfran@297
   359
	  
rosfran@301
   360
	  /*	  
rosfran@297
   361
    if (ret == FALSE) {
rosfran@297
   362
	    g_warning ("MythTV FileTransfer open error\n");
rosfran@297
   363
	    return GNOME_VFS_ERROR_NOT_OPEN;
rosfran@297
   364
	  }
rosfran@301
   365
	  */
rosfran@327
   366
	  if ( is_livetv )
rosfran@327
   367
	  {
rosfran@327
   368
	  	/*
rosfran@327
   369
	  	GMythProgramInfo *prog_info = gmyth_recorder_get_current_program_info ( GMythRecorder *recorder )
rosfran@327
   370
	  	if ( file_transfer->filesize < 0 )
rosfran@327
   371
				file_info->size = gmyth_recorder_get_file_position( livetv->recorder );
rosfran@327
   372
			else
rosfran@327
   373
			*/
rosfran@327
   374
			file_info->size =(GnomeVFSFileSize) - 1;
rosfran@327
   375
	  } else {		
rosfran@323
   376
    	file_info->size = gmyth_file_transfer_get_filesize (file_transfer);
rosfran@327
   377
	  }
rosfran@323
   378
    
rosfran@297
   379
    file_info->block_count = GNOME_VFS_FILE_INFO_FIELDS_BLOCK_COUNT;
rosfran@297
   380
    file_info->io_block_size = GNOME_VFS_FILE_INFO_FIELDS_IO_BLOCK_SIZE;
rosfran@297
   381
    
renatofilho@188
   382
    g_object_unref (file_transfer);
rosfran@327
   383
    //g_object_unref (livetv);
renatofilho@188
   384
    g_object_unref (backend_info);
rosfran@301
   385
melunko@38
   386
    return GNOME_VFS_OK;
melunko@38
   387
}
melunko@38
   388
melunko@38
   389
static gboolean
melunko@38
   390
do_is_local (GnomeVFSMethod *method,
melunko@38
   391
             const GnomeVFSURI *uri)
melunko@38
   392
{
melunko@38
   393
	return FALSE;
melunko@38
   394
}
melunko@38
   395
melunko@38
   396
static GnomeVFSMethod method = {
melunko@38
   397
	sizeof (GnomeVFSMethod),
melunko@38
   398
	do_open,
melunko@38
   399
	NULL,
melunko@38
   400
	do_close,
melunko@38
   401
	do_read,
melunko@38
   402
	NULL,
melunko@38
   403
	NULL,
melunko@38
   404
	NULL,
melunko@38
   405
	NULL,
melunko@38
   406
	NULL,
melunko@38
   407
	NULL,
melunko@38
   408
	NULL,
melunko@38
   409
	do_get_file_info,
melunko@38
   410
	NULL,
melunko@38
   411
	do_is_local,
melunko@38
   412
	NULL,
melunko@38
   413
	NULL,
melunko@38
   414
	NULL,
melunko@38
   415
	NULL,
melunko@38
   416
	NULL,
melunko@38
   417
	NULL,
melunko@38
   418
	NULL,
melunko@38
   419
	NULL,
melunko@38
   420
	NULL,
melunko@38
   421
	NULL,
melunko@38
   422
	NULL,
melunko@38
   423
	NULL,
melunko@38
   424
};
melunko@38
   425
melunko@38
   426
melunko@38
   427
GnomeVFSMethod *
melunko@38
   428
vfs_module_init (const char *method_name, const char *args)
melunko@38
   429
{
melunko@38
   430
	return &method;
melunko@38
   431
}
melunko@38
   432
melunko@38
   433
void
melunko@38
   434
vfs_module_shutdown (GnomeVFSMethod *method)
melunko@38
   435
{
melunko@38
   436
}