diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2014-03-20 22:52:48 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2014-03-20 22:52:48 (GMT) |
commit | 18d6b808db6e31e867525d68f92d6f928a7ab5a7 (patch) | |
tree | d534c8e374004866696322a4c3f58ae2a7a545d9 /src/main.c | |
parent | 84790a5b420d0a9ce658013573b180ce059db325 (diff) |
Created the first steps for a distributed storage.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@368 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 38 |
1 files changed, 35 insertions, 3 deletions
@@ -32,6 +32,7 @@ #include "editor.h" #include "params.h" #include "project.h" +#include "analysis/db/server.h" #include "arch/processor.h" #include "format/format.h" #include "glibext/delayed.h" @@ -78,7 +79,7 @@ static void show_version(void) printf("\n"); } - +#include "analysis/db/cdb.h" /****************************************************************************** * * @@ -97,6 +98,7 @@ int main(int argc, char **argv) { configuration *config; /* Configuration principale */ GtkWidget *editor; /* FenĂȘtre graphique */ + GDbServer *server; /* Enregistrements locaux */ const char *filename; /* Chemin du dernier projet */ GStudyProject *project; /* Nouveau projet courant */ @@ -143,12 +145,40 @@ int main(int argc, char **argv) //test_itanium(); //exit(-1); + +#if 0 + do + { + core_db_info info; + + strcpy(info.hash, "47cd68c5c46f36a5d48ebf347d6558a8eee23e11f9420227935658c3e97b6e27"); + + + + + GCdbArchive *archive = g_cdb_archive_new(true, NULL, &info); + + printf("written ? %d\n", + g_cdb_archive_write(archive) + ); + + + exit(0); + + } + while (0); +#endif + + editor = create_editor(); gtk_widget_show(editor); init_work_queue(G_OBJECT(editor)); - init_all_plugins(G_OBJECT(editor)); + //init_all_plugins(G_OBJECT(editor)); + + server = g_db_server_new("localhost", 1337); + g_db_server_start(server); /* Charge le dernier projet */ @@ -164,7 +194,9 @@ int main(int argc, char **argv) gtk_main(); gdk_threads_leave(); - exit_all_plugins(); + g_db_server_stop(server); + + //exit_all_plugins(); exit_global_pango_context(); exit_binary_portion_colors(); |