Enlightenment CVS committal
Author : lordchaos
Project : e17
Module : proto
Dir : e17/proto/entropy/src
Modified Files:
entropy_core.c
Log Message:
* Sync with changed evfs api
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/entropy_core.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- entropy_core.c 18 Jan 2006 06:27:31 -0000 1.39
+++ entropy_core.c 1 Feb 2006 05:02:22 -0000 1.40
@@ -1162,9 +1162,9 @@
}
-char* md5_entropy_path_file(char* path, char* filename) {
+char* md5_entropy_path_file(char* plugin, char* folder, char* filename) {
char* md5;
- char full_name[1024];
+ char full_name[PATH_MAX];
md5_state_t state;
md5_byte_t digest[16];
static const char hex[]="0123456789abcdef";
@@ -1174,7 +1174,7 @@
/*printf("MD5'ing %s %s\n", path, filename);*/
- snprintf(full_name, 1024, "%s%s", path, filename);
+ snprintf(full_name, 1024, "%s%s%s", plugin, folder, filename);
md5_init(&state);
md5_append(&state, (const md5_byte_t*)full_name, strlen(full_name));
@@ -1340,7 +1340,6 @@
/*Do we have login information*/
- /*TODO - wrap this up in some kind of entropy_generic_file_to_evfs_uri
function*/
if (!source_file->username) {
snprintf(uri, 512, "%s://%s/%s", source_file->uri_base,
source_file->path, source_file->filename);
} else {
@@ -1379,6 +1378,27 @@
return uri;
}
+
+entropy_generic_file* evfs_filereference_to_entropy_generic_file(void* ref)
+{
+ evfs_filereference* file_ref = (evfs_filereference*)ref;
+ char *copy = strdup (file_ref->path);
+ char *pos = strrchr (copy, '/');
+ entropy_generic_file* file = entropy_generic_file_new();
+
+ *pos = '\0';
+ pos++;
+
+ strncpy(file->path, copy, 255);
+ strncpy(file->filename, pos, FILENAME_LENGTH);
+ strncpy(file->uri_base, file_ref->plugin_uri, 15);
+
+ free(copy);
+ return file;
+
+}
+
+
/* Associate an object with an entropy_generic_file - e.g. an ewl_widget with
a file -
* Mostly used for transparent DND between objects */
void entropy_core_object_file_associate(void* object, entropy_generic_file*
file) {
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs