Enlightenment CVS committal Author : chaos Project : e17 Module : proto/entropy
Dir : e17/proto/entropy/src/plugins Modified Files: Makefile.am filesystem.c layout_etk_simple.c Log Message: Handle authentication requests from evfs =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/plugins/Makefile.am,v retrieving revision 1.48 retrieving revision 1.49 diff -u -3 -r1.48 -r1.49 --- Makefile.am 6 Aug 2007 01:11:36 -0000 1.48 +++ Makefile.am 13 Aug 2007 03:08:09 -0000 1.49 @@ -115,7 +115,8 @@ $(top_srcdir)/src/dialogs/etk_mime_dialog_main.c \ $(top_srcdir)/src/dialogs/etk_properties_dialog.c \ $(top_srcdir)/src/dialogs/etk_options_dialog.c \ - $(top_srcdir)/src/dialogs/etk_file_cache_debug_dialog.c + $(top_srcdir)/src/dialogs/etk_file_cache_debug_dialog.c \ + $(top_srcdir)/src/dialogs/etk_auth_request_dialog.c layout_etk_simple_la_CFLAGS = @ETK_CFLAGS@ layout_etk_simple_la_LDFLAGS = -module -avoid-version =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/plugins/filesystem.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -3 -r1.83 -r1.84 --- filesystem.c 25 Jul 2007 17:01:03 -0000 1.83 +++ filesystem.c 13 Aug 2007 03:08:09 -0000 1.84 @@ -30,11 +30,7 @@ void entropy_filesystem_file_copy_multi (Ecore_List* files, char *path_to, entropy_gui_component_instance * instance); void entropy_filesystem_file_move_multi (Ecore_List* files, char *path_to, entropy_gui_component_instance * instance); void entropy_filesystem_file_trash_restore (Ecore_List* files, entropy_gui_component_instance * instance); - - void entropy_filesystem_file_move (entropy_generic_file * file, char *path_to, entropy_gui_component_instance * instance); - - void entropy_filesystem_file_rename (entropy_generic_file * file_from, entropy_generic_file * file_to); void entropy_filesystem_operation_respond(long id, int response); void entropy_filesystem_directory_create (entropy_generic_file * parent, const char* child_name); @@ -42,8 +38,8 @@ void entropy_filesystem_metadata_groups_get(entropy_gui_component_instance* instance); void entropy_filesystem_file_group_add(entropy_generic_file* file, char* group); void entropy_filesystem_file_group_remove(entropy_generic_file* file, char* group); - Ecore_List* entropy_filesystem_metadata_groups_retrieve(); +void entropy_filesystem_auth_response(char* location, char* user, char* password); static evfs_connection *con; @@ -487,23 +483,6 @@ Evas_List* l; - /*entropy_gui_event* gui_event; - entropy_gui_component_instance* instance; - - instance = ecore_hash_get (evfs_dir_requests, (long*)data->resp_command.client_identifier); - ecore_hash_remove (evfs_dir_requests, (long*)data->resp_command.client_identifier); - - - gui_event = entropy_malloc (sizeof (entropy_gui_event)); - gui_event->event_type = - entropy_core_gui_event_get (ENTROPY_GUI_EVENT_METADATA_GROUPS); - - gui_event->data = data->misc.string_list; - - - entropy_core_layout_notify_event (instance, gui_event, - ENTROPY_EVENT_LOCAL);*/ - if (metadata_groups) { char* obj; while ((obj = ecore_list_first_remove(metadata_groups))) { @@ -519,6 +498,23 @@ } break; + case EVFS_EV_AUTH_REQUIRED: { + entropy_file_request* calling_request = NULL; + + printf("Received 'auth required' event\n"); + calling_request = ecore_hash_get (evfs_dir_requests, (long*)data->resp_command.client_identifier); + if (calling_request) { + char loc[PATH_MAX]; + snprintf(loc,sizeof(loc),"%s://%s/%s", calling_request->file->uri_base, calling_request->file->path, calling_request->file->filename); + printf("Found original request..\n"); + + entropy_event_auth_request(calling_request->requester, loc); + } else { + printf("Could not find original request\n"); + } + } + break; + default: printf ("Received an EVFS message we don't recognise!\n"); break; @@ -629,6 +625,7 @@ plugin->misc_functions.groups_retrieve = &entropy_filesystem_metadata_groups_retrieve; plugin->file_functions.group_file_add = &entropy_filesystem_file_group_add; plugin->file_functions.group_file_remove = &entropy_filesystem_file_group_remove; + plugin->file_functions.auth_respond = entropy_filesystem_auth_response; return base; @@ -1106,8 +1103,16 @@ evfs_client_metadata_group_file_remove(con, uri_path_from->files[0], group); free(uri_from); - free(uri_path_from); - + evfs_cleanup_file_uri_path(uri_path_from); +} + +void entropy_filesystem_auth_response(char* location, char* user, char* password) +{ + printf("Parsing uri %s\n", location); + evfs_filereference* ref = evfs_parse_uri_single(location); + evfs_client_auth_send(con,ref,user,password); + + } void entropy_filesystem_operation_respond(long id, int response) =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/plugins/layout_etk_simple.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -3 -r1.77 -r1.78 --- layout_etk_simple.c 4 Aug 2007 13:46:26 -0000 1.77 +++ layout_etk_simple.c 13 Aug 2007 03:08:09 -0000 1.78 @@ -10,6 +10,7 @@ #include "etk_file_cache_dialog.h" #include "entropy_etk_context_menu.h" #include "entropy_etk_options_dialog.h" +#include "etk_auth_request_dialog.h" #include <dlfcn.h> #include <Ecore.h> #include <stdlib.h> @@ -674,6 +675,12 @@ } break; + case ENTROPY_NOTIFY_AUTH_REQUEST: { + printf("Requested auth for: %s\n",(char*)el); + etk_auth_request_dialog_create(strdup((char*)el)); + } + break; + } } @@ -763,6 +770,10 @@ entropy_core_component_event_register (layout, entropy_core_gui_event_get (ENTROPY_GUI_EVENT_PASTE_REQUEST)); + + entropy_core_component_event_register (layout, + entropy_core_gui_event_get + (ENTROPY_GUI_EVENT_AUTH_REQUEST)); /*Etk related init */ ------------------------------------------------------------------------- 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 enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs