Enlightenment CVS committal

Author  : chaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src


Modified Files:
        entropy_mime_engine.c notification_engine.c plugin_helper.c 


Log Message:
* Even more API rationalization.

===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/entropy_mime_engine.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- entropy_mime_engine.c       16 Nov 2005 11:48:34 -0000      1.3
+++ entropy_mime_engine.c       1 Apr 2006 04:35:36 -0000       1.4
@@ -1,7 +1,7 @@
 #include "include/entropy.h"
 #include <dlfcn.h>
 
-char* entropy_mime_file_identify(Ecore_List* mime_plugins, 
entropy_generic_file* file) {       
+char* entropy_mime_file_identify(entropy_generic_file* file) { 
        entropy_plugin* plugin;
        char* (*entropy_mime_plugin_identify_file)(char* path, char* filename);
        char* type = NULL;
@@ -10,8 +10,8 @@
        if (strlen(file->mime_type) > 0) return file->mime_type;
        
        /*printf("Identifying a file..\n");     */
-       ecore_list_goto_first(mime_plugins);
-       while ((plugin = ecore_list_next(mime_plugins)) != NULL) {
+       ecore_list_goto_first(entropy_core_get_core()->mime_plugins);
+       while ((plugin = 
ecore_list_next(entropy_core_get_core()->mime_plugins)) != NULL) {
                /*printf ("Querying '%s' for MIME\n", plugin->filename);*/
                entropy_mime_plugin_identify_file = dlsym(plugin->dl_ref, 
"entropy_mime_plugin_identify_file");
                type = (*entropy_mime_plugin_identify_file)(file->path, 
file->filename);
===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/notification_engine.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- notification_engine.c       28 Mar 2006 10:31:14 -0000      1.9
+++ notification_engine.c       1 Apr 2006 04:35:36 -0000       1.10
@@ -148,7 +148,7 @@
        }
 }
 
-entropy_notify_event* 
entropy_notify_request_register(entropy_notification_engine* notify, void* 
requestor, int event_type, entropy_plugin* request_plugin, char* 
request_function, void* request_data, Ecore_List* cleanup) {
+entropy_notify_event* entropy_notify_request_register(void* requestor, int 
event_type, entropy_plugin* request_plugin, char* request_function, void* 
request_data, Ecore_List* cleanup) {
        entropy_notify_event* event = entropy_notify_event_new();
 
        event->requestor_data = requestor;      
===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/plugin_helper.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- plugin_helper.c     28 Mar 2006 10:31:14 -0000      1.11
+++ plugin_helper.c     1 Apr 2006 04:35:36 -0000       1.12
@@ -143,7 +143,40 @@
        (*stat_func)(request);
 }
 
-void entropy_plugin_filesystem_file_remove(entropy_generic_file* file, 
entropy_gui_component_instance* instance) {
+void entropy_plugin_thumbnail_request(entropy_gui_component_instance* 
requestor, entropy_generic_file* file, 
+               void (*cb)())
+{
+       if (file->mime_type) {
+               entropy_plugin* thumb = entropy_thumbnailer_retrieve 
(file->mime_type);
+       
+               if (thumb) {
+                       entropy_thumbnail_request *request = 
entropy_thumbnail_request_new ();
+                       request->file = file;
+                       request->instance = requestor;
+
+                       /*Add a reference to this file, so it doesn't get 
cleaned up*/
+                       entropy_core_file_cache_add_reference (file->md5);
+
+                       entropy_notify_event *ev =
+                         entropy_notify_request_register (requestor,
+                                  ENTROPY_NOTIFY_THUMBNAIL_REQUEST,
+                                  thumb,
+                                  "entropy_thumbnailer_thumbnail_get",
+                                  request, NULL);
+
+                       entropy_notify_event_callback_add (ev, cb, requestor);
+                       entropy_notify_event_cleanup_add (ev, request);
+       
+                       entropy_notify_event_commit (ev);
+               }
+
+       } else {
+               printf("Thumb request on mime-less file\n");
+       }
+}
+
+void entropy_plugin_filesystem_file_remove(entropy_generic_file* file, 
entropy_gui_component_instance* instance) 
+{
        entropy_plugin *plugin =
              entropy_plugins_type_get_first (
        ENTROPY_PLUGIN_BACKEND_FILE, ENTROPY_PLUGIN_SUB_TYPE_ALL);
@@ -154,7 +187,8 @@
        (*del_func)(file, instance);
 }
 
-void entropy_plugin_filesystem_directory_create(entropy_generic_file* file, 
char* dir) {
+void entropy_plugin_filesystem_directory_create(entropy_generic_file* file, 
char* dir) 
+{
         entropy_plugin *plugin =
               entropy_plugins_type_get_first (
         ENTROPY_PLUGIN_BACKEND_FILE, ENTROPY_PLUGIN_SUB_TYPE_ALL);
@@ -167,7 +201,8 @@
 
 
 
-int entropy_plugin_filesystem_file_copy(entropy_generic_file* source, char* 
dest, entropy_gui_component_instance* requester) {
+int entropy_plugin_filesystem_file_copy(entropy_generic_file* source, char* 
dest, entropy_gui_component_instance* requester) 
+{
   entropy_gui_component_instance *instance = requester;
   entropy_plugin *plugin =
     entropy_plugins_type_get_first (ENTROPY_PLUGIN_BACKEND_FILE,




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to