diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-09-19 00:55:23 -0400 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-09-19 00:55:23 -0400 |
commit | 29ebf832309d5fcd1d6ec8eb08de6449b5c768a7 (patch) | |
tree | 0a62a30fab548fe95eb06d30bc632dbc166f7cce | |
download | vcardexport-29ebf832309d5fcd1d6ec8eb08de6449b5c768a7.tar.xz vcardexport-29ebf832309d5fcd1d6ec8eb08de6449b5c768a7.zip |
Initial import.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | main.cpp | 29 | ||||
-rw-r--r-- | qtc_packaging/debian_harmattan/README | 1 | ||||
-rw-r--r-- | qtc_packaging/debian_harmattan/changelog | 5 | ||||
-rw-r--r-- | qtc_packaging/debian_harmattan/compat | 1 | ||||
-rw-r--r-- | qtc_packaging/debian_harmattan/control | 13 | ||||
-rw-r--r-- | qtc_packaging/debian_harmattan/copyright | 11 | ||||
-rw-r--r-- | qtc_packaging/debian_harmattan/manifest.aegis | 0 | ||||
-rwxr-xr-x | qtc_packaging/debian_harmattan/rules | 91 | ||||
-rw-r--r-- | qtc_packaging/debian_harmattan/vcardexport.aegis | 8 | ||||
-rw-r--r-- | vcardexport.pro | 27 |
11 files changed, 187 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..75c107b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pro.user diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..50bb8f2 --- /dev/null +++ b/main.cpp @@ -0,0 +1,29 @@ +#include <QCoreApplication> +#include <QContactManager> +#include <QContact> +#include <QContactDetail> +#include <QVersitContactExporter> +#include <QVersitDocument> +#include <QVersitWriter> +#include <QFile> +#include <QDebug> + +QTM_USE_NAMESPACE + +int main(int argc, char *argv[]) +{ + QCoreApplication a(argc, argv); + foreach (const QString &managerName, QContactManager::availableManagers()) { + qDebug() << "Exporting" << managerName; + QContactManager manager(managerName); + QVersitContactExporter exporter; + if (!exporter.exportContacts(manager.contacts())) + qDebug() << exporter.errorMap().count() << "contacts failed"; + qDebug() << exporter.documents().count() << "contacts succeeded"; + QFile stdout; + stdout.open(1, QIODevice::WriteOnly); + QVersitWriter writer(&stdout); + writer.startWriting(exporter.documents()); + writer.waitForFinished(); + } +} diff --git a/qtc_packaging/debian_harmattan/README b/qtc_packaging/debian_harmattan/README new file mode 100644 index 0000000..0438bcc --- /dev/null +++ b/qtc_packaging/debian_harmattan/README @@ -0,0 +1 @@ +It dumps contacts to vcard. diff --git a/qtc_packaging/debian_harmattan/changelog b/qtc_packaging/debian_harmattan/changelog new file mode 100644 index 0000000..cc98e63 --- /dev/null +++ b/qtc_packaging/debian_harmattan/changelog @@ -0,0 +1,5 @@ +vcardexport (0.0.1) unstable; urgency=low + + * Initial Release. + + -- Jason A. Donenfeld <Jason@zx2c4.com> Sun, 18 Sep 2011 22:32:05 -0400 diff --git a/qtc_packaging/debian_harmattan/compat b/qtc_packaging/debian_harmattan/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/qtc_packaging/debian_harmattan/compat @@ -0,0 +1 @@ +7 diff --git a/qtc_packaging/debian_harmattan/control b/qtc_packaging/debian_harmattan/control new file mode 100644 index 0000000..c24eaa9 --- /dev/null +++ b/qtc_packaging/debian_harmattan/control @@ -0,0 +1,13 @@ +Source: vcardexport +Section: user/other +Priority: optional +Maintainer: Jason A. Donenfeld <Jason@zx2c4.com> +Build-Depends: debhelper (>= 5), libqt4-dev +Standards-Version: 3.7.3 + +Package: vcardexport +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Exports n950 contacts. + This is the opposite of the vcardconverter program. Very much needed. +XSBC-Maemo-Display-Name: vcardexport diff --git a/qtc_packaging/debian_harmattan/copyright b/qtc_packaging/debian_harmattan/copyright new file mode 100644 index 0000000..8621e91 --- /dev/null +++ b/qtc_packaging/debian_harmattan/copyright @@ -0,0 +1,11 @@ +This package was debianized by Jason A. Donenfeld <Jason@zx2c4.com> on +Sun, 18 Sep 2011 22:32:05 -0400. + + +Upstream Author(s): + + Jason A. Donenfeld <Jason@zx2c4.com> + +Copyright: + + <Copyright (C) 2011 Jason A. Donenfeld> diff --git a/qtc_packaging/debian_harmattan/manifest.aegis b/qtc_packaging/debian_harmattan/manifest.aegis new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/qtc_packaging/debian_harmattan/manifest.aegis diff --git a/qtc_packaging/debian_harmattan/rules b/qtc_packaging/debian_harmattan/rules new file mode 100755 index 0000000..36588e0 --- /dev/null +++ b/qtc_packaging/debian_harmattan/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + # qmake PREFIX=/usr# Uncomment this line for use without Qt Creator + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + # $(MAKE) # Uncomment this line for use without Qt Creator + #docbook-to-man debian/vcardexport.sgml > vcardexport.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/vcardexport. + $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/vcardexport install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + # dh_shlibdeps # Uncomment this line for use without Qt Creator + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/qtc_packaging/debian_harmattan/vcardexport.aegis b/qtc_packaging/debian_harmattan/vcardexport.aegis new file mode 100644 index 0000000..587598f --- /dev/null +++ b/qtc_packaging/debian_harmattan/vcardexport.aegis @@ -0,0 +1,8 @@ +<aegis> + <request> + <credential name="TrackerReadAccess" /> + <credential name="TrackerWriteAccess" /> + <credential name="GRP::metadata-users" /> + <for path="/opt/vcardexport/bin/vcardexport" /> + </request> +</aegis> diff --git a/vcardexport.pro b/vcardexport.pro new file mode 100644 index 0000000..83003b8 --- /dev/null +++ b/vcardexport.pro @@ -0,0 +1,27 @@ +QT += core + +TARGET = vcardexport +CONFIG += console +CONFIG += mobility +MOBILITY += contacts +MOBILITY += versit +CONFIG -= app_bundle + +TEMPLATE = app + + +SOURCES += main.cpp + +contains(MEEGO_EDITION,harmattan) { + target.path = /opt/vcardexport/bin + INSTALLS += target +} + +OTHER_FILES += \ + qtc_packaging/debian_harmattan/rules \ + qtc_packaging/debian_harmattan/README \ + qtc_packaging/debian_harmattan/copyright \ + qtc_packaging/debian_harmattan/control \ + qtc_packaging/debian_harmattan/compat \ + qtc_packaging/debian_harmattan/changelog \ + qtc_packaging/debian_harmattan/vcardexport.aegis |