Enlightenment CVS committal
Author : chaos
Project : e17
Module : apps/evfs
Dir : e17/apps/evfs/src/plugins/file
Modified Files:
evfs_fs_bzip2.c evfs_fs_ftp.c evfs_fs_gzip.c evfs_fs_posix.c
evfs_fs_samba.c evfs_fs_sftp.c evfs_fs_tar.c evfs_fs_trash.c
evfs_fs_vfolder.c
Log Message:
Phase 1 of EvfsIO rewrite/cleanup:
* evfs_filereference -> EvfsFilereference
* evfs_event -> EvfsEvent/hierarchy
* Simplified IO model for EET comms client<->server
* More sane accessor functions for command files
* More logical concatenation of structs to serve multiple purposes
* Speed improvements
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/file/evfs_fs_bzip2.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evfs_fs_bzip2.c 25 Jun 2007 07:15:23 -0000 1.6
+++ evfs_fs_bzip2.c 16 Aug 2007 11:31:17 -0000 1.7
@@ -45,15 +45,15 @@
int evfs_client_disconnect(evfs_client * client);
int evfs_monitor_start(evfs_client * client, evfs_command * command);
int evfs_monitor_stop(evfs_client * client, evfs_command * command);
-int evfs_file_open(evfs_client *, evfs_filereference * file);
-int evfs_file_close(evfs_filereference * file);
+int evfs_file_open(evfs_client *, EvfsFilereference * file);
+int evfs_file_close(EvfsFilereference * file);
int evfs_file_stat(evfs_command * command, struct stat *file_stat);
-int evfs_file_seek(evfs_filereference * file, long offset, int whence);
-int evfs_file_read(evfs_client * client, evfs_filereference * file,
+int evfs_file_seek(EvfsFilereference * file, long offset, int whence);
+int evfs_file_read(evfs_client * client, EvfsFilereference * file,
char *bytes, long size);
-int evfs_file_write(evfs_filereference * file, char *bytes, long size);
-int evfs_file_create(evfs_filereference * file);
-void evfs_dir_list(evfs_client * client, evfs_filereference* file);
+int evfs_file_write(EvfsFilereference * file, char *bytes, long size);
+int evfs_file_create(EvfsFilereference * file);
+void evfs_dir_list(evfs_client * client, EvfsFilereference* file);
#define BZIP2_BUFFER 5000
#define EVFS_BZ2_GOT_DATA -1
@@ -62,7 +62,7 @@
Ecore_Hash *bzip_hash;
typedef struct bzip2_file
{
- evfs_filereference *ref;
+ EvfsFilereference *ref;
bz_stream stream;
char *buffer;
@@ -95,8 +95,8 @@
* functions->evfs_file_create = &evfs_file_create; */
/*FIXME - This is bad - by using a direct compare, we preclude clients using
- * an 'identical' evfs_filereference with a different pointer*/
- /*TODO - Fix this by creating evfs_filereference_compare for Ecore_Hash */
+ * an 'identical' EvfsFilereference with a different pointer*/
+ /*TODO - Fix this by creating EvfsFilereference_compare for Ecore_Hash */
bzip_hash = ecore_hash_new(ecore_direct_hash, ecore_direct_compare);
return functions;
@@ -118,9 +118,9 @@
}
int
-evfs_file_open(evfs_client * client, evfs_filereference * file)
+evfs_file_open(evfs_client * client, EvfsFilereference * file)
{
- evfs_filereference *f_par = file->parent;
+ EvfsFilereference *f_par = file->parent;
bzip2_file *bfile;
/*Handle decomp init */
@@ -145,7 +145,7 @@
/*FUTURE DOC NOTE - Takes the child file, not the parent */
int
-evfs_bzip2_populate_buffer(evfs_client * client, evfs_filereference * ref)
+evfs_bzip2_populate_buffer(evfs_client * client, EvfsFilereference * ref)
{
int res;
bzip2_file *bfile = ecore_hash_get(bzip_hash, ref);
@@ -178,7 +178,7 @@
}
int
-evfs_file_read(evfs_client * client, evfs_filereference * file, char *bytes,
+evfs_file_read(evfs_client * client, EvfsFilereference * file, char *bytes,
long size)
{
bzip2_file *bfile = ecore_hash_get(bzip_hash, file);
@@ -224,7 +224,7 @@
}
int
-evfs_file_close(evfs_filereference * file)
+evfs_file_close(EvfsFilereference * file)
{
bzip2_file *bfile = ecore_hash_get(bzip_hash, file);
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/file/evfs_fs_ftp.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evfs_fs_ftp.c 25 Jul 2007 17:00:54 -0000 1.3
+++ evfs_fs_ftp.c 16 Aug 2007 11:31:17 -0000 1.4
@@ -40,19 +40,19 @@
#include <Ecore_File.h>
#include <curl/curl.h>
-struct ftp_conn *connection_handle_get(evfs_filereference * ref,
+struct ftp_conn *connection_handle_get(EvfsFilereference * ref,
evfs_command * com);
void evfs_ftp_dir_list(evfs_client * client, evfs_command * command,
Ecore_List ** directory_list);
int evfs_ftp_file_stat(evfs_command * command, struct stat *file_stat);
-int evfs_file_open(evfs_client * client, evfs_filereference * file);
-int evfs_file_close(evfs_filereference * file);
-int evfs_file_seek(evfs_filereference * file, long offset, int whence);
-int evfs_file_read(evfs_client * client, evfs_filereference * file,
+int evfs_file_open(evfs_client * client, EvfsFilereference * file);
+int evfs_file_close(EvfsFilereference * file);
+int evfs_file_seek(EvfsFilereference * file, long offset, int whence);
+int evfs_file_read(evfs_client * client, EvfsFilereference * file,
char *bytes, long size);
-int evfs_file_write(evfs_filereference * file, char *bytes, long size);
-int evfs_file_create(evfs_filereference * file);
+int evfs_file_write(EvfsFilereference * file, char *bytes, long size);
+int evfs_file_create(EvfsFilereference * file);
int evfs_client_disconnect(evfs_client * client);
typedef enum evfs_ftp_data
@@ -77,7 +77,7 @@
/******************Begin Internal Functions*******************************/
ftp_conn *
-connection_handle_get(evfs_filereference * ref, evfs_command * com)
+connection_handle_get(EvfsFilereference * ref, evfs_command * com)
{
ftp_conn *conn = NULL;
@@ -119,17 +119,17 @@
}
void
-connection_handle_save(ftp_conn * conn, evfs_filereference * ref)
+connection_handle_save(ftp_conn * conn, EvfsFilereference * ref)
{
ecore_hash_set(connections, ref->path, conn);
}
-evfs_filereference *
+EvfsFilereference *
parse_ls_line(ftp_conn * conn, char *line, int is_stat)
{
char *fieldline = strdup(line);
- evfs_filereference *ref = NEW(evfs_filereference);
+ EvfsFilereference *ref = NEW(EvfsFilereference);
char *curfield;
Ecore_List *fields = ecore_list_new();
@@ -205,7 +205,7 @@
ecore_hash_get((Ecore_Hash *) cbdata, (int *)EVFS_FTP_COMMAND);
ftp_conn *conn =
ecore_hash_get((Ecore_Hash *) cbdata, (int *)EVFS_FTP_HANDLE);
- evfs_filereference *ref;
+ EvfsFilereference *ref;
char *curline;
while (dirs)
@@ -270,7 +270,7 @@
Ecore_Hash *data = ecore_hash_new(ecore_direct_hash, ecore_direct_compare);
ftp_conn *conn =
- connection_handle_get(command->file_command.files[0], command);
+ connection_handle_get(evfs_command_first_file_get(command), command);
Ecore_List *files = ecore_list_new();
char *error = malloc(CURL_ERROR_SIZE);
@@ -299,7 +299,7 @@
/*Set out return pointer.. */
*directory_list = files;
}
- connection_handle_save(conn, command->file_command.files[0]);
+ connection_handle_save(conn, evfs_command_first_file_get(command));
}
int
@@ -310,28 +310,28 @@
}
int
-evfs_file_open(evfs_client * client, evfs_filereference * file)
+evfs_file_open(evfs_client * client, EvfsFilereference * file)
{
return 0;
}
int
-evfs_file_close(evfs_filereference * file)
+evfs_file_close(EvfsFilereference * file)
{
return 0;
}
int
-evfs_file_seek(evfs_filereference * file, long pos, int whence)
+evfs_file_seek(EvfsFilereference * file, long pos, int whence)
{
return 0;
}
int
-evfs_file_read(evfs_client * client, evfs_filereference * file, char *bytes,
+evfs_file_read(evfs_client * client, EvfsFilereference * file, char *bytes,
long size)
{
@@ -339,14 +339,14 @@
}
int
-evfs_file_write(evfs_filereference * file, char *bytes, long size)
+evfs_file_write(EvfsFilereference * file, char *bytes, long size)
{
return 0;
}
int
-evfs_file_create(evfs_filereference * file)
+evfs_file_create(EvfsFilereference * file)
{
return 0;
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/file/evfs_fs_gzip.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evfs_fs_gzip.c 25 Jun 2007 07:15:23 -0000 1.6
+++ evfs_fs_gzip.c 16 Aug 2007 11:31:17 -0000 1.7
@@ -45,15 +45,15 @@
int evfs_client_disconnect(evfs_client * client);
int evfs_monitor_start(evfs_client * client, evfs_command * command);
int evfs_monitor_stop(evfs_client * client, evfs_command * command);
-int evfs_file_open(evfs_client *, evfs_filereference * file);
-int evfs_file_close(evfs_filereference * file);
+int evfs_file_open(evfs_client *, EvfsFilereference * file);
+int evfs_file_close(EvfsFilereference * file);
int evfs_file_stat(evfs_command * command, struct stat *file_stat);
-int evfs_file_seek(evfs_filereference * file, long offset, int whence);
-int evfs_file_read(evfs_client * client, evfs_filereference * file,
+int evfs_file_seek(EvfsFilereference * file, long offset, int whence);
+int evfs_file_read(evfs_client * client, EvfsFilereference * file,
char *bytes, long size);
-int evfs_file_write(evfs_filereference * file, char *bytes, long size);
-int evfs_file_create(evfs_filereference * file);
-void evfs_dir_list(evfs_client * client, evfs_filereference * file);
+int evfs_file_write(EvfsFilereference * file, char *bytes, long size);
+int evfs_file_create(EvfsFilereference * file);
+void evfs_dir_list(evfs_client * client, EvfsFilereference * file);
#define GZIP_BUFFER 16384
#define GZIP_MAX_ERRORS 5
@@ -71,7 +71,7 @@
Ecore_Hash *gzip_hash;
typedef struct gzip_file
{
- evfs_filereference *ref;
+ EvfsFilereference *ref;
z_stream stream;
unsigned char *buffer;
@@ -104,8 +104,8 @@
* functions->evfs_file_create = &evfs_file_create; */
/*FIXME - This is bad - by using a direct compare, we preclude clients using
- * an 'identical' evfs_filereference with a different pointer*/
- /*TODO - Fix this by creating evfs_filereference_compare for Ecore_Hash */
+ * an 'identical' EvfsFilereference with a different pointer*/
+ /*TODO - Fix this by creating EvfsFilereference_compare for Ecore_Hash */
gzip_hash = ecore_hash_new(ecore_direct_hash, ecore_direct_compare);
return functions;
@@ -128,7 +128,7 @@
/*Jump a specified amount*/
char
-gzip_jump_fixed(evfs_client * client, evfs_filereference * ref, int bytes)
+gzip_jump_fixed(evfs_client * client, EvfsFilereference * ref, int bytes)
{
char *tmp = malloc(bytes);
@@ -143,7 +143,7 @@
/*Jump a string*/
char
-gzip_jump_string(evfs_client * client, evfs_filereference * ref)
+gzip_jump_string(evfs_client * client, EvfsFilereference * ref)
{
char tmp;
int c = 0;
@@ -164,7 +164,7 @@
}
int
-evfs_gzip_parse_header(evfs_client * client, evfs_filereference * ref,
+evfs_gzip_parse_header(evfs_client * client, EvfsFilereference * ref,
unsigned char header[10])
{
unsigned int mode;
@@ -227,9 +227,9 @@
}
int
-evfs_file_open(evfs_client * client, evfs_filereference * file)
+evfs_file_open(evfs_client * client, EvfsFilereference * file)
{
- evfs_filereference *f_par = file->parent;
+ EvfsFilereference *f_par = file->parent;
gzip_file *gfile;
int open_ret = 0;
char bytes[10];
@@ -268,7 +268,7 @@
/*FUTURE DOC NOTE - Takes the child file, not the parent */
int
-evfs_gzip_populate_buffer(evfs_client * client, evfs_filereference * ref)
+evfs_gzip_populate_buffer(evfs_client * client, EvfsFilereference * ref)
{
int res;
gzip_file *gfile = ecore_hash_get(gzip_hash, ref);
@@ -304,7 +304,7 @@
}
int
-evfs_file_read(evfs_client * client, evfs_filereference * file, char *bytes,
+evfs_file_read(evfs_client * client, EvfsFilereference * file, char *bytes,
long size)
{
gzip_file *gfile = ecore_hash_get(gzip_hash, file);
@@ -356,7 +356,7 @@
}
int
-evfs_file_close(evfs_filereference * file)
+evfs_file_close(EvfsFilereference * file)
{
gzip_file *gfile = ecore_hash_get(gzip_hash, file);
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/file/evfs_fs_posix.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evfs_fs_posix.c 13 Aug 2007 03:05:21 -0000 1.10
+++ evfs_fs_posix.c 16 Aug 2007 11:31:17 -0000 1.11
@@ -47,16 +47,16 @@
int evfs_client_disconnect(evfs_client * client);
int evfs_monitor_start(evfs_client * client, evfs_command * command);
int evfs_monitor_stop(evfs_client * client, evfs_command * command);
-int evfs_file_open(evfs_client * client, evfs_filereference * file);
-int evfs_file_close(evfs_filereference * file);
+int evfs_file_open(evfs_client * client, EvfsFilereference * file);
+int evfs_file_close(EvfsFilereference * file);
int evfs_file_stat(evfs_command * command, struct stat *file_stat, int);
int evfs_file_lstat(evfs_command * command, struct stat *file_stat, int);
-int evfs_file_seek(evfs_filereference * file, long offset, int whence);
-int evfs_file_read(evfs_client * client, evfs_filereference * file,
+int evfs_file_seek(EvfsFilereference * file, long offset, int whence);
+int evfs_file_read(evfs_client * client, EvfsFilereference * file,
char *bytes, long size);
-int evfs_file_write(evfs_filereference * file, char *bytes, long size);
-int evfs_file_create(evfs_filereference * file);
-int evfs_file_mkdir(evfs_filereference * file);
+int evfs_file_write(EvfsFilereference * file, char *bytes, long size);
+int evfs_file_create(EvfsFilereference * file);
+int evfs_file_mkdir(EvfsFilereference * file);
void evfs_dir_list(evfs_client * client, evfs_command* command,
Ecore_List ** directory_list);
@@ -208,7 +208,7 @@
path);
evfs_file_monitor_event_create(mon->client, type, path, filetype,
"file"); /*Find a better way to do the plugin */
- /*We should really use an evfs_filereference here */
+ /*We should really use an EvfsFilereference here */
}
}
@@ -238,13 +238,13 @@
posix_monitor_add(evfs_client * client, evfs_command * command)
{
Ecore_List *mon_list =
- ecore_hash_get(posix_monitor_hash, command->file_command.files[0]->path);
+ ecore_hash_get(posix_monitor_hash,
evfs_command_first_file_get(command)->path);
evfs_file_monitor *mon;
evfs_file_monitor *old;
mon = calloc(1, sizeof(evfs_file_monitor));
mon->client = client;
- mon->monitor_path = strdup(command->file_command.files[0]->path);
+ mon->monitor_path = strdup(evfs_command_first_file_get(command)->path);
/*Check if we are already monitoring, if not, make a new list of monitors..
*/
if (!mon_list)
@@ -295,14 +295,14 @@
evfs_monitor_start(evfs_client * client, evfs_command * command)
{
- /*printf("Received monitor request at plugin for
%s..\n",command->file_command.files[0]->path ); */
+ /*printf("Received monitor request at plugin for
%s..\n",command->file_command->files[0]->path ); */
return posix_monitor_add(client, command);
}
int
evfs_monitor_stop(evfs_client * client, evfs_command * command)
{
- evfs_posix_monitor_remove(client, command->file_command.files[0]->path);
+ evfs_posix_monitor_remove(client,
evfs_command_first_file_get(command)->path);
return 0;
}
@@ -381,8 +381,8 @@
int
evfs_file_rename(evfs_client * client, evfs_command * command)
{
- evfs_filereference *from = command->file_command.files[0];
- evfs_filereference *to = command->file_command.files[1];
+ EvfsFilereference *from = evfs_command_first_file_get(command);
+ EvfsFilereference *to = evfs_command_second_file_get(command);
printf("Renaming %s to %s\n", from->path, to->path);
return evfs_misc_rename(from->path, to->path);
@@ -394,9 +394,9 @@
int res;
#ifdef __USE_LARGEFILE64
- res = stat64(command->file_command.files[file_number]->path, file_stat);
+ res = stat64(evfs_command_nth_file_get(command,file_number)->path,
file_stat);
#else
- res = stat(command->file_command.files[file_number]->path, file_stat);
+ res = stat(evfs_command_nth_file_get(command,file_number)->path, file_stat);
#endif
if (!res)
@@ -409,7 +409,7 @@
evfs_file_lstat(evfs_command * command, struct stat *file_stat, int
file_number)
{
//printf("Getting file stat...\n");
- int res = lstat(command->file_command.files[file_number]->path, file_stat);
+ int res = lstat(evfs_command_nth_file_get(command,file_number)->path,
file_stat);
//printf("File size: %d\n", file_stat->st_size);
//
@@ -421,7 +421,7 @@
}
int
-evfs_file_open(evfs_client * client, evfs_filereference * file)
+evfs_file_open(evfs_client * client, EvfsFilereference * file)
{
int fd;
@@ -438,7 +438,7 @@
}
int
-evfs_file_close(evfs_filereference * file)
+evfs_file_close(EvfsFilereference * file)
{
int res;
@@ -451,7 +451,7 @@
}
int
-evfs_file_seek(evfs_filereference * file, long offset, int whence)
+evfs_file_seek(EvfsFilereference * file, long offset, int whence)
{
/*printf ("Seek in file '%s' forward by '%d'\n", file->path, offset); */
@@ -461,7 +461,7 @@
}
int
-evfs_file_read(evfs_client * client, evfs_filereference * file, char *bytes,
+evfs_file_read(evfs_client * client, EvfsFilereference * file, char *bytes,
long size)
{
int bytes_read;
@@ -484,7 +484,7 @@
}
int
-evfs_file_write(evfs_filereference * file, char *bytes, long size)
+evfs_file_write(EvfsFilereference * file, char *bytes, long size)
{
ssize_t i;
@@ -497,7 +497,7 @@
}
int
-evfs_file_create(evfs_filereference * file)
+evfs_file_create(EvfsFilereference * file)
{
printf ("Creating file '%s'\n", file->path);
@@ -516,7 +516,7 @@
Ecore_List *files = ecore_list_new();
char full_name[PATH_MAX];
- evfs_filereference* file = command->file_command.files[0];
+ EvfsFilereference* file = evfs_command_first_file_get(command);
dir = opendir(file->path);
while ((de = readdir(dir)))
@@ -524,7 +524,7 @@
if (strcmp(de->d_name, ".") && strcmp(de->d_name, "..")
&& strcmp(de->d_name, "."))
{
- evfs_filereference *ref = NEW(evfs_filereference);
+ EvfsFilereference *ref = NEW(EvfsFilereference);
snprintf(full_name, 1024, "%s/%s",
file->path, de->d_name);
@@ -550,7 +550,7 @@
}
int
-evfs_file_mkdir(evfs_filereference * file)
+evfs_file_mkdir(EvfsFilereference * file)
{
return mkdir(file->path, S_IRWXU);
}
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/file/evfs_fs_samba.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- evfs_fs_samba.c 14 Aug 2007 10:25:35 -0000 1.17
+++ evfs_fs_samba.c 16 Aug 2007 11:31:17 -0000 1.18
@@ -58,15 +58,15 @@
static void smb_evfs_dir_list(evfs_client * client, evfs_command* command,
Ecore_List ** directory_list);
int smb_evfs_file_stat(evfs_command * command, struct stat *file_stat, int);
-int evfs_file_open(evfs_client * client, evfs_filereference * file);
-int evfs_file_close(evfs_filereference * file);
-int evfs_file_seek(evfs_filereference * file, long offset, int whence);
-int evfs_file_read(evfs_client * client, evfs_filereference * file,
+int evfs_file_open(evfs_client * client, EvfsFilereference * file);
+int evfs_file_close(EvfsFilereference * file);
+int evfs_file_seek(EvfsFilereference * file, long offset, int whence);
+int evfs_file_read(evfs_client * client, EvfsFilereference * file,
char *bytes, long size);
-int evfs_file_write(evfs_filereference * file, char *bytes, long size);
-int evfs_file_create(evfs_filereference * file);
+int evfs_file_write(EvfsFilereference * file, char *bytes, long size);
+int evfs_file_create(EvfsFilereference * file);
int smb_evfs_file_rename(evfs_client* client, evfs_command* command);
-int smb_evfs_file_mkdir(evfs_filereference * file);
+int smb_evfs_file_mkdir(EvfsFilereference * file);
int evfs_file_remove(char *file);
void
evfs_auth_push(evfs_command* command);
@@ -201,7 +201,7 @@
}
void
-evfs_smb_populate_fd(evfs_filereference * file)
+evfs_smb_populate_fd(EvfsFilereference * file)
{
if (file->fd_p == NULL)
{
@@ -316,9 +316,9 @@
void
evfs_auth_push(evfs_command* command)
{
- evfs_auth_structure_add(command->file_command.files[0]->username,
- command->file_command.files[0]->password,
- command->file_command.files[0]->path);
+ evfs_auth_structure_add(evfs_command_first_file_get(command)->username,
+ evfs_command_first_file_get(command)->password,
+ evfs_command_first_file_get(command)->path);
}
int
@@ -330,9 +330,9 @@
/*TODO: Check that these files are on same filesystem.
* This should really be a per-plugin function called from the top
level*/
- err = smb_context->rename(smb_context,
command->file_command.files[0]->path,
+ err = smb_context->rename(smb_context,
evfs_command_first_file_get(command)->path,
smb_context,
- command->file_command.files[1]->path);
+ evfs_command_second_file_get(command)->path);
evfs_smb_auth_pop(command);
return err;
@@ -350,15 +350,15 @@
//struct stat* file_stat = calloc(1,sizeof(struct stat));
//
/*Does this command have an attached authentication object? */
- if (command->file_command.files[number]->username)
+ if (evfs_command_nth_file_get(command,number)->username)
{
printf("We have a username, adding to hash..\n");
- evfs_auth_structure_add( command->file_command.files[number]->username,
- command->file_command.files[number]->password,
- command->file_command.files[number]->path);
+ evfs_auth_structure_add(
evfs_command_nth_file_get(command,number)->username,
+
evfs_command_nth_file_get(command,number)->password,
+
evfs_command_nth_file_get(command,number)->path);
}
- sprintf(dir, "smb:/%s", command->file_command.files[number]->path);
+ sprintf(dir, "smb:/%s", evfs_command_nth_file_get(command,number)->path);
//printf("Getting stat on file '%s'\n", dir);
err = smb_context->stat(smb_context, (const char *)dir, &smb_stat);
@@ -401,7 +401,7 @@
int size;
SMBCFILE *dir = NULL;
struct smbc_dirent *entry = NULL;
- evfs_filereference* file = command->file_command.files[0];
+ EvfsFilereference* file = evfs_command_first_file_get(command);
Ecore_List *files = ecore_list_new();
@@ -430,7 +430,7 @@
/*Make sure we don't use . or .. */
if (strcmp(entry->name, ".") && strcmp(entry->name, ".."))
{
- evfs_filereference *reference = NEW(evfs_filereference);
+ EvfsFilereference *reference = NEW(EvfsFilereference);
if (entry->smbc_type == SMBC_FILE)
reference->file_type = EVFS_FILE_NORMAL;
@@ -493,7 +493,7 @@
}
int
-evfs_file_open(evfs_client * client, evfs_filereference * file)
+evfs_file_open(evfs_client * client, EvfsFilereference * file)
{
char dir_path[1024];
@@ -551,7 +551,7 @@
}
int
-evfs_file_close(evfs_filereference * file)
+evfs_file_close(EvfsFilereference * file)
{
printf("SMB close: closing\n");
@@ -565,7 +565,7 @@
}
int
-evfs_file_write(evfs_filereference * file, char *bytes, long size)
+evfs_file_write(EvfsFilereference * file, char *bytes, long size)
{
ssize_t i;
@@ -578,7 +578,7 @@
}
int
-evfs_file_seek(evfs_filereference * file, long pos, int whence)
+evfs_file_seek(EvfsFilereference * file, long pos, int whence)
{
//printf ("Seeking file to %ld\n", pos);
@@ -588,7 +588,7 @@
}
int
-evfs_file_read(evfs_client * client, evfs_filereference * file, char *bytes,
+evfs_file_read(evfs_client * client, EvfsFilereference * file, char *bytes,
long size)
{
int bytes_read = 0;
@@ -602,7 +602,7 @@
}
int
-evfs_file_create(evfs_filereference * file)
+evfs_file_create(EvfsFilereference * file)
{
char dir_path[1024];
@@ -621,7 +621,7 @@
}
int
-smb_evfs_file_mkdir(evfs_filereference * file)
+smb_evfs_file_mkdir(EvfsFilereference * file)
{
char dir_path[1024];
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/file/evfs_fs_sftp.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evfs_fs_sftp.c 13 Aug 2007 03:05:22 -0000 1.10
+++ evfs_fs_sftp.c 16 Aug 2007 11:31:17 -0000 1.11
@@ -795,13 +795,13 @@
void
evfs_dir_list(evfs_client * client, evfs_command* command, Ecore_List **
directory_list);
-int evfs_file_open(evfs_client * client, evfs_filereference * file);
-int evfs_file_close(evfs_filereference * file);
-int evfs_file_seek(evfs_filereference * file, long offset, int whence);
-int evfs_file_read(evfs_client * client, evfs_filereference * file,
+int evfs_file_open(evfs_client * client, EvfsFilereference * file);
+int evfs_file_close(EvfsFilereference * file);
+int evfs_file_seek(EvfsFilereference * file, long offset, int whence);
+int evfs_file_read(evfs_client * client, EvfsFilereference * file,
char *bytes, long size);
-int evfs_file_write(evfs_filereference * file, char *bytes, long size);
-int evfs_file_create(evfs_filereference * file);
+int evfs_file_write(EvfsFilereference * file, char *bytes, long size);
+int evfs_file_create(EvfsFilereference * file);
int evfs_file_remove(char *file);
int evfs_file_stat(evfs_command* command, struct stat *dst_stat, int);
@@ -869,7 +869,7 @@
}
int
-evfs_file_create(evfs_filereference* file)
+evfs_file_create(EvfsFilereference* file)
{
return evfs_file_open(NULL, file);
}
@@ -881,7 +881,7 @@
char* host, *path;
SftpGenericHandle* handle;
- sftp_split_host_path(command->file_command.files[i]->path, &host,
&path);
+ sftp_split_host_path(evfs_command_nth_file_get(command,i)->path, &host,
&path);
if ( !(conn = sftp_get_connection_for_host(host))) {
conn = sftp_connect(host);
@@ -916,7 +916,7 @@
}
-int evfs_file_read(evfs_client * client, evfs_filereference * file,
+int evfs_file_read(evfs_client * client, EvfsFilereference * file,
char *bytes, long size)
{
SftpConnection* conn;
@@ -973,7 +973,7 @@
}
int
-evfs_file_open(evfs_client * client, evfs_filereference * file)
+evfs_file_open(evfs_client * client, EvfsFilereference * file)
{
SftpConnection* conn;
char* host, *path;
@@ -1023,7 +1023,7 @@
return file->fd;
}
-int evfs_file_close(evfs_filereference * file) {
+int evfs_file_close(EvfsFilereference * file) {
SftpConnection* conn;
char* host, *path;
SftpGenericHandle* handle;
@@ -1065,7 +1065,7 @@
}
-int evfs_file_write(evfs_filereference * file, char *bytes, long size) {
+int evfs_file_write(EvfsFilereference * file, char *bytes, long size) {
SftpOpenHandle* handle;
@@ -1102,7 +1102,7 @@
char* host, *schar;
SftpConnection* conn = NULL;
- evfs_filereference* iref = command->file_command.files[0];
+ EvfsFilereference* iref = evfs_command_first_file_get(command);
sftp_split_host_path(iref->path, &host,&schar);
@@ -1142,7 +1142,7 @@
*directory_list = ecore_list_new();
while ( (file = ecore_list_first_remove(rhandle->file_list))) {
- evfs_filereference* ref = NEW(evfs_filereference);
+ EvfsFilereference* ref = NEW(EvfsFilereference);
ref->path = malloc(strlen(host) + 1 + strlen(schar) +
strlen(file->filename) + 2);
snprintf(ref->path, strlen(host) + 1 + strlen(schar) +
strlen(file->filename) + 2, "/%s%s/%s", host, schar, file->filename);
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/file/evfs_fs_tar.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- evfs_fs_tar.c 13 Aug 2007 03:05:22 -0000 1.11
+++ evfs_fs_tar.c 16 Aug 2007 11:31:17 -0000 1.12
@@ -63,10 +63,10 @@
return ret;
}
-evfs_filereference *
-evfs_file_top_level_find(evfs_filereference * file)
+EvfsFilereference *
+evfs_file_top_level_find(EvfsFilereference * file)
{
- evfs_filereference *top = file;
+ EvfsFilereference *top = file;
while (top->parent)
{
@@ -83,13 +83,13 @@
int evfs_client_disconnect(evfs_client * client);
int evfs_monitor_start(evfs_client * client, evfs_command * command);
int evfs_monitor_stop(evfs_client * client, evfs_command * command);
-int evfs_file_open(evfs_client * client, evfs_filereference * file);
-int evfs_file_close(evfs_filereference * file);
+int evfs_file_open(evfs_client * client, EvfsFilereference * file);
+int evfs_file_close(EvfsFilereference * file);
int evfs_file_stat(evfs_command * command, struct stat *file_stat, int);
-int evfs_file_seek(evfs_filereference * file, long offset, int whence);
-int evfs_file_read(evfs_filereference * file, char *bytes, long size);
-int evfs_file_write(evfs_filereference * file, char *bytes, long size);
-int evfs_file_create(evfs_filereference * file);
+int evfs_file_seek(EvfsFilereference * file, long offset, int whence);
+int evfs_file_read(EvfsFilereference * file, char *bytes, long size);
+int evfs_file_write(EvfsFilereference * file, char *bytes, long size);
+int evfs_file_create(EvfsFilereference * file);
void evfs_dir_list(evfs_client * client, evfs_command * command,
Ecore_List ** directory_list);
@@ -338,9 +338,9 @@
}
struct tar_file *
-evfs_tar_load_tar(evfs_client * client, evfs_filereference * ref)
+evfs_tar_load_tar(evfs_client * client, EvfsFilereference * ref)
{
- evfs_filereference *p_ref;
+ EvfsFilereference *p_ref;
union TARPET_block block;
struct tar_file *tar = tar_file_new();
@@ -431,7 +431,7 @@
Ecore_List *files = ecore_list_new();
char *key;
- evfs_filereference* ref = command->file_command.files[0];
+ EvfsFilereference* ref = evfs_command_first_file_get(command);
printf("Listing tar file dir: '%s'\n", ref->path);
@@ -450,7 +450,7 @@
keys = ecore_hash_keys(file->hierarchy);
while ((key = ecore_list_next(keys)))
{
- evfs_filereference *reference = NEW(evfs_filereference);
+ EvfsFilereference *reference = NEW(EvfsFilereference);
int size = 0;
ele = ecore_hash_get(file->hierarchy, key);
@@ -476,7 +476,7 @@
ecore_list_first_goto(keys);
while ((key = ecore_list_next(keys)))
{
- evfs_filereference *reference = NEW(evfs_filereference);
+ EvfsFilereference *reference = NEW(EvfsFilereference);
int size = 0;
ele_new = ecore_hash_get(ele->children, key);
@@ -506,12 +506,11 @@
struct tar_element *ele;
printf("Looking for file '%s'\n",
- evfs_file_top_level_find(command->file_command.files[number])->path);
+ evfs_file_top_level_find(evfs_command_nth_file_get(command,number)));
if (!
(file =
ecore_hash_get(tar_cache,
- evfs_file_top_level_find(command->file_command.
- files[number])->path)))
+
evfs_file_top_level_find(evfs_command_nth_file_get(command,number)))))
{
printf("Could not find file in lookup ref\n");
@@ -521,7 +520,7 @@
/*printf("located tar file in cache");*/
ele =
ecore_hash_get(file->link_in,
- command->file_command.files[number]->path);
+ evfs_command_nth_file_get(command,number)->path);
if (ele)
{
@@ -531,7 +530,7 @@
else
{
printf("Couldn't locate file '%s' in tar file\n",
- command->file_command.files[number]->path);
+ evfs_command_nth_file_get(command,number)->path);
}
}
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/file/evfs_fs_trash.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- evfs_fs_trash.c 25 Jul 2007 17:00:54 -0000 1.15
+++ evfs_fs_trash.c 16 Aug 2007 11:31:17 -0000 1.16
@@ -58,26 +58,26 @@
int evfs_file_rename(evfs_client * client, evfs_command * command);
int evfs_client_disconnect(evfs_client * client);
-int evfs_file_open(evfs_client * client, evfs_filereference * file);
-int evfs_file_close(evfs_filereference * file);
+int evfs_file_open(evfs_client * client, EvfsFilereference * file);
+int evfs_file_close(EvfsFilereference * file);
int evfs_file_stat(evfs_command * command, struct stat *file_stat, int);
int evfs_file_lstat(evfs_command * command, struct stat *file_stat, int);
-int evfs_file_seek(evfs_filereference * file, long offset, int whence);
-int evfs_file_read(evfs_client * client, evfs_filereference * file,
+int evfs_file_seek(EvfsFilereference * file, long offset, int whence);
+int evfs_file_read(evfs_client * client, EvfsFilereference * file,
char *bytes, long size);
-int evfs_file_write(evfs_filereference * file, char *bytes, long size);
+int evfs_file_write(EvfsFilereference * file, char *bytes, long size);
-void evfs_file_notify_create(evfs_filereference* file);
-int evfs_file_create(evfs_filereference * file);
-int evfs_file_mkdir(evfs_filereference * file);
+void evfs_file_notify_create(EvfsFilereference* file);
+int evfs_file_create(EvfsFilereference * file);
+int evfs_file_mkdir(EvfsFilereference * file);
void evfs_dir_list(evfs_client * client, evfs_command * command,
Ecore_List ** directory_list);
-evfs_filereference* evfs_fs_trash_proxy_create(evfs_filereference* ref, char*
newpath)
+EvfsFilereference* evfs_fs_trash_proxy_create(EvfsFilereference* ref, char*
newpath)
{
int size;
- evfs_filereference* newfile = evfs_filereference_clone(ref);
+ EvfsFilereference* newfile = EvfsFilereference_clone(ref);
/*Make a proxy file, and send this to the posix plugin create*/
free(newfile->path);
@@ -93,10 +93,10 @@
return newfile;
}
-evfs_filereference* evfs_fs_trash_proxy_create_absolute(evfs_filereference*
ref, char* newdir, char* newsuffix)
+EvfsFilereference* evfs_fs_trash_proxy_create_absolute(EvfsFilereference* ref,
char* newdir, char* newsuffix)
{
int size;
- evfs_filereference* newfile = evfs_filereference_clone(ref);
+ EvfsFilereference* newfile = EvfsFilereference_clone(ref);
/*Make a proxy file, and send this to the posix plugin create*/
free(newfile->path);
@@ -113,7 +113,7 @@
}
/*Internal functions*/
-char* evfs_fs_trash_filename_get(evfs_filereference* ref)
+char* evfs_fs_trash_filename_get(EvfsFilereference* ref)
{
time_t res;
int fulllen;
@@ -133,7 +133,7 @@
return newname;
}
-void evfs_fs_trash_infofile_create(evfs_filereference* ref, char* newname,
char* path)
+void evfs_fs_trash_infofile_create(EvfsFilereference* ref, char* newname,
char* path)
{
int origlen;
FILE* file;
@@ -216,7 +216,7 @@
int
evfs_file_stat(evfs_command * command, struct stat *file_stat, int file_number)
{
- evfs_filereference* ref = command->file_command.files[file_number];
+ EvfsFilereference* ref = evfs_command_nth_file_get(command,file_number);
printf("Performing stat on: '%s'\n", ref->path);
@@ -227,7 +227,7 @@
return EVFS_SUCCESS;
} else {
if (ref->attach) {
- evfs_filereference* proxy;
+ EvfsFilereference* proxy;
char* pos;
char* slashpos;
@@ -264,14 +264,14 @@
}
int
-evfs_file_open(evfs_client * client, evfs_filereference * file)
+evfs_file_open(evfs_client * client, EvfsFilereference * file)
{
printf("evfs_fs_trash.c open - STUB\n");
return 0;
}
int
-evfs_file_close(evfs_filereference * file)
+evfs_file_close(EvfsFilereference * file)
{
if (file->plugin)
return
(*EVFS_PLUGIN_FILE(posix_plugin)->functions->evfs_file_close) (file);
@@ -282,14 +282,14 @@
}
int
-evfs_file_seek(evfs_filereference * file, long offset, int whence)
+evfs_file_seek(EvfsFilereference * file, long offset, int whence)
{
printf("evfs_fs_trash.c seek - STUB\n");
return -1;
}
int
-evfs_file_read(evfs_client * client, evfs_filereference * file, char *bytes,
+evfs_file_read(evfs_client * client, EvfsFilereference * file, char *bytes,
long size)
{
printf("evfs_fs_trash.c read - STUB\n");
@@ -297,7 +297,7 @@
}
int
-evfs_file_write(evfs_filereference * file, char *bytes, long size)
+evfs_file_write(EvfsFilereference * file, char *bytes, long size)
{
if (file->plugin) {
return
(*EVFS_PLUGIN_FILE(posix_plugin)->functions->evfs_file_write) (file, bytes,
size);
@@ -307,7 +307,7 @@
}
}
-void evfs_file_notify_create(evfs_filereference* ref)
+void evfs_file_notify_create(EvfsFilereference* ref)
{
if (next_trash_file) {
free(next_trash_file);
@@ -319,14 +319,14 @@
}
next_trash_file = evfs_fs_trash_filename_get(ref);
- next_trash_path = evfs_filereference_to_string(ref);
+ next_trash_path = EvfsFilereference_to_string(ref);
printf("Next trash path is : %s\n", next_trash_path);
}
int
-evfs_file_create(evfs_filereference * file)
+evfs_file_create(EvfsFilereference * file)
{
- evfs_filereference* file_trash;
+ EvfsFilereference* file_trash;
char* pos;
char* rewrite_parent;
char* parent_dir;
@@ -374,12 +374,12 @@
}
int
-evfs_file_mkdir(evfs_filereference * file)
+evfs_file_mkdir(EvfsFilereference * file)
{
char* pos;
char* rewrite_parent;
char* parent_dir;
- evfs_filereference* par;
+ EvfsFilereference* par;
/*Check if this file lives in a directory other than '/'*/
if ( (pos = strchr(file->path+1, '/'))) {
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/file/evfs_fs_vfolder.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- evfs_fs_vfolder.c 13 Aug 2007 03:05:22 -0000 1.19
+++ evfs_fs_vfolder.c 16 Aug 2007 11:31:17 -0000 1.20
@@ -75,10 +75,10 @@
Ecore_List ** directory_list)
{
Ecore_List *files = ecore_list_new();
- evfs_filereference* ref;
+ EvfsFilereference* ref;
char* path;
- evfs_filereference* file = command->file_command.files[0];
+ EvfsFilereference* file = evfs_command_first_file_get(command);
path = file->path;
/*We should make this generic - perhaps a plugin system*/
@@ -94,7 +94,7 @@
while ((key = ecore_list_next(keys))) {
snprintf(path,sizeof(path),"/%s",key);
- ref = NEW(evfs_filereference);
+ ref = NEW(EvfsFilereference);
ref->plugin_uri = strdup(EVFS_PLUGIN_VFOLDER_URI);
ref->path = strdup(path);
ref->file_type = EVFS_FILE_DIRECTORY;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs