diff options
author | Nat Friedman <nat@src.gnome.org> | 2000-01-25 13:28:18 +0800 |
---|---|---|
committer | Nat Friedman <nat@src.gnome.org> | 2000-01-25 13:28:18 +0800 |
commit | fd4379ff20fe9c9e3b4f4028095b9659687002ff (patch) | |
tree | 78af76526262d746417a1e2007fd712f8d4ce584 /addressbook/backend/pas/pas.c | |
parent | a315f0321395423c3c52adb4bb3063c433948dd5 (diff) | |
download | gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar.gz gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar.bz2 gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar.lz gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar.xz gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar.zst gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.zip |
More work.
svn path=/trunk/; revision=1626
Diffstat (limited to 'addressbook/backend/pas/pas.c')
-rw-r--r-- | addressbook/backend/pas/pas.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/addressbook/backend/pas/pas.c b/addressbook/backend/pas/pas.c new file mode 100644 index 0000000000..07d6d5c757 --- /dev/null +++ b/addressbook/backend/pas/pas.c @@ -0,0 +1,54 @@ +/* + * Author: + * Nat Friedman (nat@helixcode.com) + * + * Copyright 2000, Helix Code, Inc. + */ +#include <config.h> +#include <bonobo/gnome-bonobo.h> + +#include <pas-book-factory.h> +#include <pas-backend-file.h> + +CORBA_Environment ev; +CORBA_ORB orb; + +static void +init_bonobo (int argc, char **argv) +{ + + gnome_CORBA_init_with_popt_table ( + "Personal Addressbook Server", "0.0", + &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); + + orb = gnome_CORBA_ORB (); + + if (bonobo_init (orb, NULL, NULL) == FALSE) + g_error (_("Could not initialize Bonobo")); +} + +int +main (int argc, char **argv) +{ + PASBookFactory *factory; + + CORBA_exception_init (&ev); + + + init_bonobo (argc, argv); + + /* + * Create the factory and register the local-file backend with + * it. + */ + factory = pas_book_factory_new (); + + pas_book_factory_register_backend ( + factory, "file", pas_backend_file_new); + + pas_book_factory_activate (factory); + + bonobo_main (); + + return 0; +} |