/archivers/unarj/files/

nk rel='vcs-git' href='https://www.csie.ntu.edu.tw/~b01902062/git/gsoc2013-evolution' title='gsoc2013-evolution Git repository'/>
aboutsummaryrefslogtreecommitdiffstats
path: root/tools/evolution-addressbook-export.c
diff options
context:
space:
mode:
authornobody <nobody@localhost>2002-05-16 00:19:25 +0800
committernobody <nobody@localhost>2002-05-16 00:19:25 +0800
commit01f910945b0c28f4aa0b91a2e40f01a4578d0da6 (patch)
tree9a14849dd3a40bd1667b88d689e2aa7d58d08bce /tools/evolution-addressbook-export.c
parent74f4231f4eb650f0243ff39ab5a085b1df4f7697 (diff)
downloadgsoc2013-evolution-GNOME_UTILS_2_0_1.tar.gz
gsoc2013-evolution-GNOME_UTILS_2_0_1.tar.zst
gsoc2013-evolution-GNOME_UTILS_2_0_1.zip
This commit was manufactured by cvs2svn to create tagGNOME_UTILS_2_0_1
'GNOME_UTILS_2_0_1'. svn path=/tags/GNOME_UTILS_2_0_1/; revision=16869
Diffstat (limited to 'tools/evolution-addressbook-export.c')
-rw-r--r--tools/evolution-addressbook-export.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/tools/evolution-addressbook-export.c b/tools/evolution-addressbook-export.c
deleted file mode 100644
index cfc0237a02..0000000000
--- a/tools/evolution-addressbook-export.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include <config.h>
-
-#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-main.h>
-#include <backend/ebook/e-book-util.h>
-#include <gnome.h>
-#include <fcntl.h>
-#include <gal/util/e-util.h>
-
-static void
-save_cards (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpointer closure)
-{
- char *filename = closure;
- char *vcard;
- int result;
- /* This has to be an array so that it's not const. */
- char tmpname[] = "/tmp/evo-addressbook-tmp.XXXXXX";
-
- vcard = e_card_list_get_vcard (cards);
-
- if (filename)
- result = e_write_file (filename, vcard, O_CREAT | O_EXCL);
- else
- result = e_write_file_mkstemp (tmpname, vcard);
- printf (tmpname);
- sync();
- gtk_exit (result);
-}
-
-static void
-use_addressbook (EBook *book, gpointer closure)
-{
- if (book == NULL)
- g_error (_("Error loading default addressbook."));
- e_book_simple_query (book, "(contains \"x-evolution-any-field\" \"\")", save_cards, closure);
-}
-
-int
-main (int argc, char *argv[])
-{
- char *filename = NULL;
-
- struct poptOption options[] = {
- { "output-file", '\0', POPT_ARG_STRING, &filename, 0, N_("Output File"), NULL },
- { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &oaf_popt_options, 0, NULL, NULL },
- POPT_AUTOHELP
- { NULL, '\0', 0, NULL, 0, NULL, NULL }
- };
-
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- gnome_init_with_popt_table ("evolution-addressbook-clean", "0.0",
- argc, argv, options, 0, NULL);
- oaf_init (argc, argv);
-
- if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE)
- g_error (_("Could not initialize Bonobo"));
-
- e_book_use_local_address_book (use_addressbook, filename);
-
- bonobo_main ();
-
- return 0;
-}