Enlightenment CVS committal Author : lordchaos Project : e17 Module : apps/evfs
Dir : e17/apps/evfs/src/bin Modified Files: evfs_main.c Log Message: * Work on serializing/deserializing commands to daemon * Event engine work =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/bin/evfs_main.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- evfs_main.c 15 Aug 2005 19:53:57 -0000 1.3 +++ evfs_main.c 16 Aug 2005 05:44:21 -0000 1.4 @@ -56,6 +56,12 @@ return ecore_hash_get(server->plugin_uri_hash, uri_base); } +unsigned long evfs_server_get_next_id(evfs_server* serve) { + serve->clientCounter++; + printf("Allocated %ld\n", serve->clientCounter-1); + return serve->clientCounter-1; +} + int ipc_client_add(void *data, int type, void *event) { @@ -69,10 +75,13 @@ client = NEW(evfs_client); client->client = e->client; client->prog_command = NULL; + client->id = evfs_server_get_next_id(server); ecore_hash_set(server->client_hash, client->client, client); server->num_clients++; + evfs_event_client_id_notify(client); + return (1); } @@ -164,6 +173,7 @@ evfs_plugin* plugin = NEW(evfs_plugin); char* (*evfs_plugin_uri_get)(); + void (*evfs_plugin_init)(); printf("Loading plugin: %s\n", filename); plugin->dl_ref = dlopen(filename, RTLD_LAZY); @@ -173,6 +183,12 @@ if (evfs_plugin_uri_get) { plugin->uri = (*evfs_plugin_uri_get)(); printf("The plugin at '%s' handles '%s'\n", filename, plugin->uri); + + /*Execute the init function, if it's there..*/ + evfs_plugin_init = dlsym(plugin->dl_ref, "evfs_plugin_init"); + if (evfs_plugin_init) { + (*evfs_plugin_init)(); + } } else { printf("Error - plugin file does not contain uri identify function - %s\n", filename); goto exit_error; @@ -231,6 +247,7 @@ server = NEW(evfs_server); server->client_hash = ecore_hash_new(ecore_direct_hash, ecore_direct_compare); server->plugin_uri_hash = ecore_hash_new(ecore_str_hash, ecore_str_compare); + server->clientCounter = 0; /*Load the plugins*/ evfs_load_plugins(); ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs