From 5de50390257b07bed7c802816c413f691475316c Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Thu, 22 Apr 2010 20:25:39 +0200 Subject: [PATCH 1/1] Initial commit - version 0.0.1 --- Makefile.am | 106 +++ autogen.sh | 13 + autovapi.sh | 11 + configure.ac | 119 ++++ data/32x32/beifahrer_non_smoker.png | Bin 0 -> 591 bytes data/32x32/beifahrer_non_smoker.svg | 114 ++++ data/32x32/beifahrer_smoker.png | Bin 0 -> 380 bytes data/32x32/beifahrer_smoker.svg | 106 +++ data/48x48/beifahrer.svg | 268 ++++++++ data/64x64/beifahrer.png | Bin 0 -> 1905 bytes data/64x64/beifahrer.svg | 274 ++++++++ data/beifahrer.desktop.in | 11 + data/city_list | 508 +++++++++++++++ data/org.maemo.beifahrer.service.in | 3 + debian/beifahrer.install | 7 + debian/beifahrer.launcher | 1 + debian/changelog | 5 + debian/control | 60 ++ debian/optify | 1 + debian/rules | 87 +++ m4/vala.m4 | 29 + po/POTFILES.in | 4 + po/de.po | 175 +++++ src/adac-mitfahrclub.vala | 546 ++++++++++++++++ src/beifahrer-cli.vala | 87 +++ src/beifahrer.vala | 72 +++ src/lift-detail-window.vala | 208 ++++++ src/lift-list-window.vala | 154 +++++ src/orientation.vala | 81 +++ src/query-window.vala | 261 ++++++++ src/settings-dialog.vala | 57 ++ vapi/hildon-1.deps | 7 + vapi/hildon-1.vapi | 1205 +++++++++++++++++++++++++++++++++++ vapi/libcurl.deps | 1 + vapi/libcurl.vapi | 692 ++++++++++++++++++++ vapi/libebook-1.2.deps | 1 + vapi/libebook-1.2.vapi | 768 ++++++++++++++++++++++ vapi/libedataserver-1.2.deps | 2 + vapi/libedataserver-1.2.vapi | 605 ++++++++++++++++++ vapi/libhildonmime.deps | 2 + vapi/libhildonmime.vapi | 91 +++ vapi/liblocation.vapi | 154 +++++ vapi/libosso-abook-1.0.deps | 2 + vapi/libosso-abook-1.0.vapi | 31 + 44 files changed, 6929 insertions(+) create mode 100644 Makefile.am create mode 100755 autogen.sh create mode 100755 autovapi.sh create mode 100644 configure.ac create mode 100644 data/32x32/beifahrer_non_smoker.png create mode 100644 data/32x32/beifahrer_non_smoker.svg create mode 100644 data/32x32/beifahrer_smoker.png create mode 100644 data/32x32/beifahrer_smoker.svg create mode 100644 data/48x48/beifahrer.svg create mode 100644 data/64x64/beifahrer.png create mode 100644 data/64x64/beifahrer.svg create mode 100644 data/beifahrer.desktop.in create mode 100644 data/city_list create mode 100644 data/org.maemo.beifahrer.service.in create mode 100644 debian/beifahrer.install create mode 100644 debian/beifahrer.launcher create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/optify create mode 100755 debian/rules create mode 100644 m4/vala.m4 create mode 100644 po/POTFILES.in create mode 100644 po/de.po create mode 100644 src/adac-mitfahrclub.vala create mode 100644 src/beifahrer-cli.vala create mode 100644 src/beifahrer.vala create mode 100644 src/lift-detail-window.vala create mode 100644 src/lift-list-window.vala create mode 100644 src/orientation.vala create mode 100644 src/query-window.vala create mode 100644 src/settings-dialog.vala create mode 100644 vapi/hildon-1.deps create mode 100644 vapi/hildon-1.vapi create mode 100644 vapi/libcurl.deps create mode 100644 vapi/libcurl.vapi create mode 100644 vapi/libebook-1.2.deps create mode 100644 vapi/libebook-1.2.vapi create mode 100644 vapi/libedataserver-1.2.deps create mode 100644 vapi/libedataserver-1.2.vapi create mode 100644 vapi/libhildonmime.deps create mode 100644 vapi/libhildonmime.vapi create mode 100644 vapi/liblocation.vapi create mode 100644 vapi/libosso-abook-1.0.deps create mode 100644 vapi/libosso-abook-1.0.vapi diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..bc361b0 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,106 @@ +# List extras to package +EXTRA_DIST = \ + autogen.sh + +# Sub directories +SUBDIRS = po + +# Binary +bin_PROGRAMS = \ + beifahrer \ + beifahrer-cli + +dbusservice_DATA = \ + data/org.maemo.beifahrer.service + +desktopentry_DATA = \ + data/beifahrer.desktop + +share_DATA = \ + data/city_list + +icon32_DATA = \ + data/32x32/beifahrer_non_smoker.png \ + data/32x32/beifahrer_smoker.png + +icon64_DATA = \ + data/64x64/beifahrer.png + +# Sources +beifahrer_SOURCES = \ + src/beifahrer.c \ + src/adac-mitfahrclub.c \ + src/orientation.c \ + src/query-window.c \ + src/lift-list-window.c \ + src/lift-detail-window.c \ + src/settings-dialog.c + +beifahrer_VALASOURCES = \ + src/beifahrer.vala \ + src/adac-mitfahrclub.vala \ + src/orientation.vala \ + src/query-window.vala \ + src/lift-list-window.vala \ + src/lift-detail-window.vala \ + src/settings-dialog.vala + +src/beifahrer.c: ${beifahrer_VALASOURCES} + ${VALAC} -C ${beifahrer_VALASOURCES} ${beifahrer_VALAFLAGS} + +beifahrer_VALAFLAGS = --disable-dbus-transformation --vapidir ./vapi \ + --pkg config \ + --pkg libcurl \ + --pkg libxml-2.0 \ + --pkg hildon-1 \ + --pkg libosso \ + --pkg dbus-glib-1 \ + --pkg libosso-abook-1.0 \ + --pkg libhildonmime \ + --pkg liblocation +beifahrer_CFLAGS = -DGETTEXT_PACKAGE=\"@GETTEXT_PACKAGE@\" \ + ${CURL_CFLAGS} \ + ${DBUS_CFLAGS} \ + ${GCONF_CFLAGS} \ + ${HILDON_CFLAGS} \ + ${LOCATION_CFLAGS} \ + ${MAEMO_LAUNCHER_CFLAGS} \ + ${OSSO_CFLAGS} \ + ${ABOOK_CFLAGS} \ + ${XML_CFLAGS} +beifahrer_LDADD = \ + ${CURL_LIBS} \ + ${DBUS_LIBS} \ + ${GCONF_LIBS} \ + ${HILDON_LIBS} \ + ${LOCATION_LIBS} \ + ${MAEMO_LAUNCHER_LIBS} \ + ${OSSO_LIBS} \ + ${ABOOK_LIBS} \ + ${XML_LIBS} + +beifahrer_cli_VALASOURCES = src/beifahrer-cli.vala src/adac-mitfahrclub.vala + +beifahrer_cli_SOURCES = src/beifahrer-cli.c src/adac-mitfahrclub.c + +src/beifahrer-cli.c: ${beifahrer_cli_VALASOURCES} + ${VALAC} -C ${beifahrer_cli_VALASOURCES} ${beifahrer_cli_VALAFLAGS} + +beifahrer_cli_VALAFLAGS = --vapidir ./vapi \ + --pkg libcurl \ + --pkg libxml-2.0 +beifahrer_cli_CFLAGS = -DGETTEXT_PACKAGE=\"@GETTEXT_PACKAGE@\" \ + ${CURL_CFLAGS} \ + ${GLIB_CFLAGS} \ + ${GOBJECT_CFLAGS} \ + ${XML_CFLAGS} +beifahrer_cli_LDADD = \ + ${CURL_LIBS} \ + ${GLIB_LIBS} \ + ${GOBJECT_LIBS} \ + ${XML_LIBS} + +CLEANFILES = \ + ${beifahrer_SOURCES} \ + ${beifahrer_cli_SOURCES} + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..3676ffd --- /dev/null +++ b/autogen.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -x +glib-gettextize --copy --force +libtoolize --copy --automake +intltoolize --copy --force --automake + +aclocal-1.10 -Im4 +autoconf +autoheader +automake-1.10 --copy --add-missing --foreign +debian/rules config.status +./autovapi.sh diff --git a/autovapi.sh b/autovapi.sh new file mode 100755 index 0000000..05c8686 --- /dev/null +++ b/autovapi.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Generate config.vapi from config.h +# +( +echo '// config.vapi. Generated from config.h by autovapi.sh.' +echo '[CCode (cheader_filename = "config.h")]' +echo 'namespace Config {' +sed -ne 's/#define \(HAVE_[A-Z_]*\) \([0-9]*\)$/\t\[CCode (cname = \"\1\"\)]\n\tconst bool \1;/p' -e 's/#define \([A-Z_]*\) \([0-9]*\)$/\t\[CCode (cname = \"\1\"\)]\n\tconst int \1;/p' -e 's/#define \([A-Z_]*\) \(\".*\"\)$/\t\[CCode (cname = \"\1\"\)]\n\tconst string \1;/p' < config.h +echo '}' +) > vapi/config.vapi diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..fe45aa2 --- /dev/null +++ b/configure.ac @@ -0,0 +1,119 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_INIT(src/beifahrer.vala) +AC_CONFIG_HEADERS([config.h]) + +PACKAGE=beifahrer +VERSION=0.0.1 + +AM_INIT_AUTOMAKE($PACKAGE, $VERSION) + +AC_PROG_CC +AM_PROG_VALAC([0.8.0]) +AC_STDC_HEADERS +AC_PROG_INSTALL +AC_PROG_LIBTOOL + +CFLAGS="$CFLAGS -Wall -ansi -Wmissing-prototypes -Wmissing-declarations" + +PKG_CHECK_MODULES(CURL, libcurl) +AC_SUBST(CURL_LIBS) +AC_SUBST(CURL_CFLAGS) + +PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.16.0) +AC_SUBST(GCONF_LIBS) +AC_SUBST(GCONF_CFLAGS) + +PKG_CHECK_MODULES(ABOOK, libosso-abook-1.0 >= 4.20100302) +AC_SUBST(ABOOK_LIBS) +AC_SUBST(ABOOK_CFLAGS) + +PKG_CHECK_MODULES(GLIB, glib-2.0) +AC_SUBST(GLIB_LIBS) +AC_SUBST(GLIB_CFLAGS) + +PKG_CHECK_MODULES(GOBJECT, gobject-2.0) +AC_SUBST(GOBJECT_LIBS) +AC_SUBST(GOBJECT_CFLAGS) + +PKG_CHECK_MODULES(HILDON, hildon-1 >= 2.2.0) +AC_SUBST(HILDON_LIBS) +AC_SUBST(HILDON_CFLAGS) + +PKG_CHECK_MODULES(HILDONMIME, libhildonmime >= 2.1.3) +AC_SUBST(HILDONMIME_LIBS) +AC_SUBST(HILDONMIME_CFLAGS) + +PKG_CHECK_MODULES(JSON, json-glib-1.0) +AC_SUBST(JSON_LIBS) +AC_SUBST(JSON_CFLAGS) + +PKG_CHECK_MODULES(LOCATION, liblocation >= 0.102) +AC_SUBST(LOCATION_LIBS) +AC_SUBST(LOCATION_CFLAGS) + +AC_ARG_ENABLE([maemo-launcher], + [AS_HELP_STRING([--enable-maemo-launcher], + [build with maemo-launcher support])], + [case "${enableval}" in + yes) maemo_launcher=true ;; + no) maemo_launcher=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-maemo-launcher]) + esac], [maemo_launcher=false]) +if test x$maemo_launcher = xtrue +then + PKG_CHECK_MODULES(MAEMO_LAUNCHER, [maemo-launcher-app]) + AC_SUBST(MAEMO_LAUNCHER_CFLAGS) + AC_SUBST(MAEMO_LAUNCHER_LIBS) +fi + +PKG_CHECK_MODULES(OSSO, libosso >= 2.20) +AC_SUBST(OSSO_LIBS) +AC_SUBST(OSSO_CFLAGS) + +PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.20.3) +AC_SUBST(GIO_LIBS) +AC_SUBST(GIO_CFLAGS) + +PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.78) +AC_SUBST(DBUS_LIBS) +AC_SUBST(DBUS_CFLAGS) + +PKG_CHECK_MODULES(XML, libxml-2.0) +AC_SUBST(XML_LIBS) +AC_SUBST(XML_CFLAGS) + +PKG_CHECK_MODULES(OSSOSETTINGS, osso-af-settings >= 0.9.2) + +sharedir=`$PKG_CONFIG osso-af-settings --variable=prefix`/share/beifahrer +AC_SUBST(sharedir) +icon32dir=`$PKG_CONFIG osso-af-settings --variable=prefix`/share/icons/hicolor/32x32/hildon +AC_SUBST(icon32dir) +icon64dir=`$PKG_CONFIG osso-af-settings --variable=prefix`/share/icons/hicolor/64x64/hildon +AC_SUBST(icon64dir) + +localedir=`$PKG_CONFIG osso-af-settings --variable=localedir` +dbusservicedir=`$PKG_CONFIG osso-af-settings --variable=dbusservicedir` +desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir` + +# Localization-related +AC_PROG_INTLTOOL([0.40.5]) +GETTEXT_PACKAGE=beifahrer +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of gettext package]) +ALL_LINGUAS="de" +AM_GLIB_GNU_GETTEXT +AC_SUBST(ALL_LINGUAS) +AC_SUBST(localedir) +AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir", [localedir]) + +AC_SUBST(dbusservicedir) +AC_SUBST(desktopentrydir) + +AC_OUTPUT([ + Makefile + po/Makefile.in + po/Makefile + data/org.maemo.beifahrer.service + data/beifahrer.desktop +]) diff --git a/data/32x32/beifahrer_non_smoker.png b/data/32x32/beifahrer_non_smoker.png new file mode 100644 index 0000000000000000000000000000000000000000..b435747dd4e9c5d1e5a737bc6ac2e109fc5e9476 GIT binary patch literal 591 zcmV-V0Ltw1<5j0cp}6;LhZ04FU48cv>J+0-5pvac=R)fn$?DRu>@O z-8UnUsmezW5GTF>in6qi;M6?e5@HX?nfwvp5-2(X&~*K?@Ku`d0r3S)0XK#p0TzHI z!|wv7?G_4i9(agGBdyKhLnKM_B#Bt=yuWn<(gJJ(vxdJ4lzK02_uq3Y-~sq9K4n zh{~b;z_nrbI08@v@ze-FIC%{fL`O}r-hi}IP1ipI>B2oq6C=Ba~-w^d(6Z%b7 zN{UiH5X!1zuMkShaxW0d`vSKRfixy=AOh=*YC%{f(ALZfVVfJIl!2?RX_41x?~L7; d?@Z`dz5y}&fe6ZpFCzc|002ovPDHLkV1m(5=Y;?O literal 0 HcmV?d00001 diff --git a/data/32x32/beifahrer_non_smoker.svg b/data/32x32/beifahrer_non_smoker.svg new file mode 100644 index 0000000..2074e9d --- /dev/null +++ b/data/32x32/beifahrer_non_smoker.svg @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/data/32x32/beifahrer_smoker.png b/data/32x32/beifahrer_smoker.png new file mode 100644 index 0000000000000000000000000000000000000000..e44a30933d6ff0b82b9b6a7a138b7195b4cb8b96 GIT binary patch literal 380 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK@;M7UB8!3Q zuY)k7lg8`{prB-lYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&Kt(@2T^vIq zTHj7x@8#ks(!PJSQdDk|;hKw&gmv7y71-pDC}j!p>}$+VELwfTH_v$Ig0o5;o_42q zTEvJrzI*e)h@J0Gok9A!4kA zjlVB6XEOQJF=y!fk=84zxo_gTDLtIo_=|K{!+-98KT=}z9avW|h%R6fVgJEm_IT^T UgNrsD0tNzur>mdKI;Vst0IE8aT>t<8 literal 0 HcmV?d00001 diff --git a/data/32x32/beifahrer_smoker.svg b/data/32x32/beifahrer_smoker.svg new file mode 100644 index 0000000..42f5897 --- /dev/null +++ b/data/32x32/beifahrer_smoker.svg @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/data/48x48/beifahrer.svg b/data/48x48/beifahrer.svg new file mode 100644 index 0000000..36b7b68 --- /dev/null +++ b/data/48x48/beifahrer.svg @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/data/64x64/beifahrer.png b/data/64x64/beifahrer.png new file mode 100644 index 0000000000000000000000000000000000000000..6d0028a2d0d1f23e54186b468f65b548b52975bc GIT binary patch literal 1905 zcmV-%2afoOP)8Dz1dY7u&Ij6X5~<@-R?n=QsgQD6AICx z!d4FPA<+gM;#So9cI^;h zR|RjeB6;3>-`B&=tlrGdNN;R;N5T7pVfW2@@B8z6-}}BdJ1dwO&oi8~4M-bZ0@5}h zZFC7p+kmvuB_M4B(ngnnv<*lb*(8Ij)oL!2$vk*g#%u?))-M$bh5y)&PZR;!Y<3{I zNu5PDn;lFvKFMGr8WckK&BlQP2Y!`g{)yXTYW@i8+qGvYX&9HRNDsi`F#O5?E)@Rp%l9u{gtk#qsZ=ue@856AF`ib-xC$@22@aUz-^B519l zl!8(UQp$;Y_wKdHVdfe$gNXbsU=3>ms?}-^K&~~>acXUYonSJa)_vA+Q!U-uuO#31cWL85J3Pb_bxN{o6fhsGuLf(Nh$9F=#L?xO^#Bk=G(^1 z5JFg20&4;yvTH3oM!W8}0QY+iV`KFR3|_R=rM3Q+i28xR%EN27$#Gq`*3;AD_X7zM zVUi?hCYQ$k{rew=2auLun0vpO3m$`{3rKa&R*_Qbi?|#hrEHUP@ZiCRMAXn)`+4A* z5U}ML;QP-9zSh!RpqArJ=e6rz`~I(g_`9v5lP6Dpt(00Yo%gP5rBW$Uj+qFx*4CB4 zihydhnq%giQEF;YbR{zO*za&bW|x-H=^Lq+S*#I9HmsC z5-ct*T2%tu2pI5d@@518z}@qI{81|L3TY}b>34R~uV4M)@}K@|si%cgr%wGyM6VE0 zk(uA=?d^TFTrO`W$0Pt+YpZQwl?44g+3WY+$ah$I_oo8ofXLF9@oO|%#!POHdP6XummB1*6 zR+Yet0A?N}3h1kujp0B4^s)e77K}sKIPFdXfNu^1M_&`_yP=OWZ{Pg%#ib}c<#PFD z0GFBhkgrc`J!y_1qN98E?D?)-F26lFIk{xq4-nv;1-69M79gSlBeVj?;MYG|*-P%@ z>)Le>Y3~#mcPZB$6ts4I=;OwLu#Pil&g_*^UYAlHib#IpYfwsg{q*V6Eji3wGq$L8 zC9sMBrIh&$0Hsum04eon4E-A$IUaHVp9Ol~GH*&LKLe0Z4$cC23uvANGMP-vMg+@t zEW~E-25;ZK{eqNo2Ed1gU{guty{-B?IOp8T%F0x+Sajojj3r=UVPS73llhXF-$>Dc z?U?h8QtI6!M~*B<`58&T;^N{P%={&Qz1!_Tr-%skFB8$bV`F3Agnexz;Kq#`9}>|F zfERYyN)bhKd%y)ZX7cU1^+6F`)b zP7+afU3aKhEC%eWR4P|9naoXu7D)&ZARurQ)>`L7$4O|dr$f#I07geg8(Qn>&{HD9 z^OM|r!a36+=K%o4VzEI)(?o>OqQ*x65%q=H)>_BD)L`a$Q@FV@o!SOMh*noNgZM3=l*)%gjG0H`Bq^mvo-%y5><>p+7(^6n zUrb*-0Yuanv8PLOb9236DV0j4S1DC`n!Rs+_Z_v3JOialr4nf$nw2Vyz!nIc1g~7V z@(94Ls7%Yuv1P^_n`1p9@+S3U + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/data/beifahrer.desktop.in b/data/beifahrer.desktop.in new file mode 100644 index 0000000..f6c8a9c --- /dev/null +++ b/data/beifahrer.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Name=Beifahrer +Exec=@prefix@/bin/beifahrer +Icon=beifahrer +X-Window-Icon=beifahrer +X-Window-Icon-Dimmed=beifahrer +X-Osso-Service=org.maemo.beifahrer +X-Osso-Type=application/x-executable diff --git a/data/city_list b/data/city_list new file mode 100644 index 0000000..da65e97 --- /dev/null +++ b/data/city_list @@ -0,0 +1,508 @@ +1 Aachen 50.775466 6.081478 50.831879 50.718985 6.209537 5.953419 +2 Aalen 48.835973 10.089910 48.894694 48.777183 10.217969 9.961851 +8853 Achern 48.631756 8.074653 48.690716 48.572727 8.202712 7.946593 +3 Ahlen 51.762481 7.886040 51.817695 51.707200 8.014099 7.757981 +4 Albstadt 48.215958 9.023277 48.275402 48.156445 9.151336 8.895218 +7734 Alsfeld 50.752734 9.270655 50.809174 50.696225 9.398714 9.142595 +6 Altenburg 50.992183 12.444329 51.048334 50.935964 12.572389 12.316270 +8447 Altenkirchen/Westerw. 50.688228 7.650993 50.695297 50.681159 7.667000 7.634985 +7705 Altötting 48.227927 12.678867 48.257650 48.198186 12.742896 12.614837 +8785 Alzey 49.743050 8.114028 49.771884 49.714200 8.178058 8.049998 +7 Amberg 49.442375 11.856061 49.471386 49.413346 11.920090 11.792031 +382 Andernach 50.439195 7.406155 50.496012 50.382309 7.534214 7.278095 +8609 Anklam 53.855675 13.688765 53.908292 53.802992 13.816824 13.560705 +7855 Annaberg-Buchholz 50.580439 13.002116 50.608772 50.552090 13.066145 12.938086 +9 Ansbach 49.300734 10.571476 49.358907 49.242491 10.699535 10.443417 +10 Arnsberg 51.395267 8.068687 51.450929 51.339538 8.196746 7.940628 +8512 Arnstadt 50.837913 10.944112 50.866091 50.809719 11.008142 10.880082 +11 Aschaffenburg 49.973000 9.148977 50.030376 49.915556 9.277036 9.020918 +12 Aschersleben 51.753066 11.461552 51.808291 51.697773 11.589611 11.333492 +13 Aue (Sachsen) 50.589153 12.696865 50.617480 50.560809 12.760894 12.632835 +14 Augsburg 48.365457 10.894768 48.424728 48.306118 11.022828 10.766709 +15 Aurich 53.467071 7.480294 53.520175 53.413900 7.608353 7.352235 +8622 Backnang 48.945471 9.430142 48.974776 48.916149 9.494172 9.366112 +8610 Bad Füssing 48.351591 13.310697 48.410877 48.292235 13.438756 13.182638 +8605 Bad Gandersheim 51.870612 10.024678 51.925693 51.815463 10.152737 9.896618 +358 Bad Hersfeld 50.868941 9.707181 50.925241 50.812573 9.835240 9.579122 +17 Bad Homburg 50.227153 8.615926 50.284225 50.170013 8.743985 8.487867 +3080 Bad Kissingen 50.198627 10.075894 50.255733 50.141452 10.203953 9.947835 +18 Bad Kreuznach 49.845941 7.860189 49.874713 49.817152 7.924219 7.796159 +19 Bad Nauheim 50.360599 8.735758 50.389064 50.332118 8.799787 8.671728 +362 Bad Neustadt/Saale 50.322928 10.216175 50.351415 50.294424 10.280204 10.152145 +20 Bad Oeynhausen 52.207845 8.804029 52.262512 52.153110 8.932089 8.675970 +8608 Bad Pyrmont 51.983168 9.244700 52.038111 51.928157 9.372759 9.116641 +8757 Bad Reichenhall 47.727790 12.878293 47.757803 47.697759 12.942323 12.814263 +21 Bad Salzuflen 52.085340 8.742499 52.140158 52.030455 8.870558 8.614440 +8513 Bad Segeberg 53.936365 10.313407 53.962631 53.910083 10.377436 10.249377 +8758 Bad Tölz 47.761703 11.564566 47.791697 47.731692 11.628596 11.500536 +16 Baden-Baden 48.759800 8.239793 48.818610 48.700922 8.367852 8.111733 +7753 Balingen 48.275487 8.855107 48.334862 48.216043 8.983166 8.727048 +22 Bamberg 49.894218 10.885527 49.922961 49.865457 10.949557 10.821497 +23 Bautzen 51.180968 14.428116 51.236890 51.124978 14.556175 14.300057 +24 Bayreuth 49.941558 11.571031 49.998971 49.884076 11.699090 11.442971 +25 Beckum 51.758038 8.041493 51.813257 51.702751 8.169552 7.913433 +26 Bensheim 49.678275 8.602849 49.707147 49.649386 8.666878 8.538819 +7678 Berchtesgaden 47.631359 13.003598 47.661428 47.601273 13.067628 12.939568 +8752 Bergheim 50.955052 6.639992 51.011248 50.898788 6.768051 6.511933 +28 Bergisch Gladbach 50.991769 7.136484 51.047921 50.935550 7.264543 7.008424 +30 Berlin 52.523405 13.411400 52.740114 52.305622 13.923637 12.899162 +21382 Berlin connecticum 41.613889 -72.772500 41.647249 41.580512 -72.708470 -72.836530 +8754 Berlin Flughafen Schönefeld 52.366667 13.503333 52.373479 52.359853 13.519341 13.487326 +21298 Berlin Flughafen Tegel 52.554803 13.289030 52.568369 52.541233 13.321045 13.257015 +8753 Bernau (bei Berlin) 52.680870 13.583630 52.734953 52.626720 13.711689 13.455571 +8619 Bernau am Chiemsee 47.811825 12.373839 47.841790 47.781843 12.437869 12.309809 +31 Bernburg/ Saale 51.802417 11.739322 51.857582 51.747185 11.867382 11.611263 +359 Biberach/Riss 48.096196 9.789748 48.155780 48.036544 9.917807 9.661689 +32 Bielefeld 52.023062 8.533072 52.132783 51.913071 8.789191 8.276953 +33 Bietigheim-Bissingen 48.956943 9.140971 48.986241 48.927628 9.205000 9.076941 +7762 Bingen am Rhein 49.968990 7.895665 50.026370 49.911541 8.023725 7.767606 +7723 Bitburg 49.974033 6.522710 50.002729 49.945320 6.586740 6.458681 +344 Bitterfeld-Wolfen 51.626276 12.327679 51.681657 51.570828 12.455738 12.199619 +34 Böblingen 48.685666 9.015253 48.715123 48.656192 9.079283 8.951223 +35 Bocholt 51.838570 6.622471 51.893690 51.783382 6.750530 6.494412 +36 Bochum 51.482901 7.211810 51.538456 51.427278 7.339869 7.083751 +37 Bonn 50.732704 7.096311 50.789169 50.676172 7.224371 6.968252 +38 Borken (NRW) 51.844167 6.855058 51.899280 51.788985 6.983117 6.726998 +41 Bottrop 51.522229 6.924209 51.577736 51.466654 7.052268 6.796150 +42 Brandenburg/ Havel 52.408418 12.562492 52.517191 52.299376 12.818611 12.306373 +43 Braunschweig 52.264148 10.526380 52.318746 52.209483 10.654440 10.398321 +44 Bremen 53.074981 8.807081 53.182102 52.967593 9.063200 8.550962 +45 Bremerhaven 53.548243 8.582657 53.554872 53.541613 8.598664 8.566650 +7739 Brilon 51.395179 8.566228 51.506435 51.283652 8.822347 8.310109 +46 Bruchsal 49.125793 8.597701 49.184173 49.067344 8.725760 8.469642 +47 Brühl 50.826136 6.901549 50.854320 50.797935 6.965579 6.837519 +8457 Buchholz i.d. Nordheide 53.329725 9.876898 53.383001 53.276383 10.004957 9.748838 +48 Bühl (BW) 48.697474 8.137233 48.756357 48.638523 8.265292 8.009173 +8817 Burg (bei Magdeburg) 52.268750 11.848846 52.323343 52.214091 11.976905 11.720787 +50 Buxtehude 53.476763 9.703377 53.529855 53.423604 9.831436 9.575317 +360 Calw 48.714419 8.741241 48.773282 48.655487 8.869300 8.613181 +51 Castrop-Rauxel 51.551437 7.308422 51.579181 51.523676 7.372452 7.244392 +52 Celle 52.621920 10.078580 52.676076 52.567697 10.206640 9.950521 +373 Cham 49.219199 12.667589 49.277469 49.160860 12.795648 12.539530 +53 Chemnitz 50.832503 12.924694 50.888847 50.776091 13.052753 12.796635 +7717 Clausthal-Zellerfeld 51.801513 10.338573 51.829104 51.773905 10.402602 10.274543 +3105 Cloppenburg 52.842781 8.035228 52.896663 52.788832 8.163288 7.907169 +54 Coburg 50.257771 10.966031 50.286297 50.229228 11.030061 10.902002 +7747 Coesfeld 51.945242 7.170004 52.000232 51.890185 7.298063 7.041945 +55 Cottbus 51.760729 14.327488 51.815945 51.705446 14.455548 14.199429 +7675 Crailsheim 49.134362 10.071983 49.192732 49.075924 10.200042 9.943924 +56 Cuxhaven 53.861701 8.694068 53.914310 53.809026 8.822127 8.566009 +57 Dachau 48.259395 11.434309 48.289101 48.229672 11.498339 11.370279 +58 Darmstadt 49.872425 8.650857 49.929920 49.814860 8.778917 8.522798 +367 Daun 50.198431 6.829379 50.226993 50.169852 6.893408 6.765349 +374 Deggendorf 48.833671 12.960648 48.892394 48.774878 13.088707 12.832589 +60 Delmenhorst 53.051752 8.633252 53.105375 52.998063 8.761311 8.505193 +61 Dessau 51.838878 12.245159 51.949051 51.728435 12.501278 11.989040 +62 Detmold 51.935414 8.873843 51.990416 51.880345 9.001902 8.745784 +8789 Diepholz 52.602736 8.371456 52.656916 52.548489 8.499516 8.243397 +63 Dillenburg 50.739401 8.284353 50.795858 50.682877 8.412412 8.156294 +375 Dingolfing 48.628475 12.497817 48.657966 48.598968 12.561846 12.433787 +64 Dinslaken 51.565124 6.732924 51.620579 51.509602 6.860983 6.604865 +7760 Döbeln 51.121063 13.122949 51.149069 51.093040 13.186979 13.058919 +7903 Donaueschingen 47.954967 8.490934 48.014713 47.895151 8.618993 8.362874 +378 Donauwörth 48.719450 10.776874 48.778307 48.660524 10.904933 10.648815 +66 Dorsten 51.659089 6.966174 51.714429 51.603681 7.094233 6.838115 +67 Dortmund 51.512054 7.463573 51.623025 51.400812 7.719692 7.207454 +69 Dresden 51.050991 13.733633 51.163083 50.938628 13.989752 13.477515 +70 Duisburg 51.435146 6.762691 51.546304 51.323716 7.018810 6.506572 +71 Dülmen 51.828585 7.277837 51.883718 51.773385 7.405896 7.149777 +72 Düren 50.799846 6.486958 50.856230 50.743394 6.615017 6.358899 +73 Düsseldorf 51.224943 6.775652 51.336613 51.113001 7.031771 6.519534 +74 Eberswalde-Finow 52.833935 13.811756 52.887828 52.779975 13.939815 13.683697 +8448 Eckernförde 54.470842 9.834570 54.496770 54.444898 9.898599 9.770540 +371 Eichstätt 48.891041 11.185246 48.920378 48.861688 11.249276 11.121216 +75 Eisenach 50.974401 10.325228 51.030574 50.918160 10.453287 10.197169 +76 Eisenhüttenstadt 52.144796 14.669583 52.199541 52.089984 14.797642 14.541524 +77 Elmshorn 53.755299 9.656239 53.781679 53.728903 9.720269 9.592209 +78 Emden 53.364294 7.201276 53.417527 53.310995 7.329335 7.073217 +7716 Emmendingen 48.121907 7.847354 48.151693 48.092105 7.911384 7.783324 +8475 Erding 48.306268 11.907027 48.335946 48.276573 11.971057 11.842997 +80 Erftstadt 50.803063 6.767463 50.859443 50.746615 6.895522 6.639404 +81 Erfurt 50.973735 11.022399 51.086013 50.861184 11.278518 10.766280 +82 Erkelenz 51.079754 6.318280 51.135799 51.023641 6.446339 6.190220 +83 Erkrath 51.224416 6.911596 51.252359 51.196456 6.975626 6.847566 +84 Erlangen 49.599937 11.006300 49.657756 49.542049 11.134359 10.878241 +357 Eschwege 51.188188 10.052670 51.244101 51.132207 10.180729 9.924611 +85 Eschweiler 50.817428 6.271667 50.873790 50.760998 6.399726 6.143608 +86 Essen 51.457935 7.014828 51.513521 51.402282 7.142887 6.886769 +87 Esslingen/ Neckar 48.741097 9.308052 48.770522 48.711655 9.372082 9.244022 +88 Ettlingen 48.942984 8.409329 48.972290 48.913661 8.473359 8.345300 +89 Euskirchen 50.660202 6.791275 50.716754 50.603582 6.919335 6.663216 +7744 Eutin 54.137704 10.615944 54.163843 54.111549 10.679974 10.551914 +90 Fehmarn 54.437660 11.195260 54.489542 54.385712 11.323319 11.067201 +92 Filderstadt 48.658486 9.217947 48.687959 48.628996 9.281977 9.153917 +3108 Finsterwalde 51.635256 13.712485 51.690625 51.579819 13.840545 13.584426 +93 Flensburg 54.780395 9.435707 54.806127 54.754647 9.499737 9.371677 +381 Flughafen Hahn 49.946179 7.268126 49.960537 49.931816 7.300140 7.236111 +8886 Flughafen Karlsruhe/Baden 48.781041 8.086782 48.795744 48.766334 8.118796 8.054767 +8449 Flughafen Weeze 51.599401 6.150316 51.606331 51.592470 6.166323 6.134308 +94 Föhr 54.886578 8.311244 55.091432 54.680677 8.823482 7.799006 +7733 Forchheim 49.719873 11.058401 49.748720 49.691008 11.122431 10.994371 +95 Frankenthal/ Pfalz 49.540807 8.353902 49.569760 49.511837 8.417932 8.289872 +97 Frankfurt/Main 50.111512 8.680506 50.225864 49.996886 8.936625 8.424387 +8462 Frankfurt/Main Flughafen 50.050777 8.564129 50.079427 50.022110 8.628159 8.500099 +96 Frankfurt/Oder 52.347144 14.550468 52.401640 52.292582 14.678528 14.422409 +98 Frechen 50.910052 6.815261 50.938186 50.881901 6.879291 6.751231 +99 Freiberg/Sachsen 50.914043 13.337219 50.942174 50.885894 13.401249 13.273189 +100 Freiburg/ Breisgau 47.997186 7.853767 48.056884 47.937419 7.981826 7.725707 +101 Freising 48.403065 11.749148 48.462292 48.343769 11.877207 11.621089 +102 Freital 50.999767 13.650197 51.027846 50.971671 13.714227 13.586167 +7680 Freudenstadt 48.462783 8.412177 48.521940 48.403557 8.540236 8.284117 +103 Friedrichshafen 47.651968 9.478485 47.712065 47.591803 9.606545 9.350426 +104 Fulda 50.553861 9.674339 50.610541 50.497113 9.802398 9.546280 +7713 Fürstenfeldbruck 48.177757 11.255364 48.207510 48.147987 11.319394 11.191334 +105 Fürstenwalde/ Spree 52.361703 14.061790 52.416181 52.307158 14.189849 13.933731 +106 Fürth 49.477246 10.989707 49.535211 49.419213 11.117766 10.861647 +7677 Furtwangen 48.051639 8.205543 48.111273 47.991934 8.333603 8.077484 +7676 Füssen 47.569649 10.700407 47.629840 47.509389 10.828466 10.572348 +107 Garbsen 52.413849 9.588131 52.468262 52.359369 9.716190 9.460072 +108 Garmisch-Partenkirchen 47.492343 11.086231 47.552623 47.431994 11.214290 10.958172 +3077 Geldern 51.518850 6.326810 51.574362 51.463271 6.454870 6.198751 +7746 Gelnhausen 50.200902 9.192342 50.229462 50.172324 9.256372 9.128312 +109 Gelsenkirchen 51.511532 7.093030 51.567052 51.455944 7.221090 6.964971 +110 Gera 50.880385 12.081214 50.936671 50.824031 12.209273 11.953155 +111 Geretsried 47.858962 11.481243 47.888900 47.829007 11.545273 11.417213 +112 Germering 48.131907 11.370857 48.161687 48.102110 11.434887 11.306827 +7683 Germersheim 49.218859 8.369584 49.248002 49.189698 8.433614 8.305554 +113 Gießen 50.584007 8.678247 50.640651 50.527295 8.806306 8.550188 +114 Gifhorn 52.485394 10.547035 52.539719 52.431002 10.675094 10.418976 +115 Gladbeck 51.573127 6.988379 51.600858 51.545380 7.052408 6.924349 +116 Göppingen 48.703158 9.653999 48.762034 48.644213 9.782058 9.525940 +117 Görlitz 51.153139 14.975297 51.209095 51.097115 15.103356 14.847238 +118 Goslar 51.904490 10.427826 51.959530 51.849383 10.555885 10.299767 +119 Gotha 50.948354 10.697271 51.004559 50.892082 10.825330 10.569212 +120 Göttingen 51.532605 9.928442 51.588099 51.477043 10.056501 9.800383 +121 Greifswald 54.097203 13.388010 54.149515 54.044824 13.516070 13.259951 +122 Greiz 50.655165 12.198227 50.683453 50.626860 12.262257 12.134198 +123 Grevenbroich 51.089651 6.585602 51.145684 51.033550 6.713661 6.457543 +8509 Grimma 51.238649 12.726510 51.294501 51.182729 12.854569 12.598451 +124 Gronau/ Westfalen 52.209947 7.017925 52.264611 52.155215 7.145985 6.889866 +125 Guben 51.952240 14.714819 52.007222 51.897192 14.842878 14.586759 +126 Gummersbach 51.028345 7.565430 51.084452 50.972170 7.693489 7.437371 +127 Güstrow 53.796753 12.172988 53.849444 53.743996 12.301047 12.044928 +128 Gütersloh 51.904906 8.392750 51.959945 51.849799 8.520809 8.264690 +129 Hagen 51.362313 7.463172 51.418015 51.306543 7.591232 7.335113 +130 Halberstadt 51.891731 11.047544 51.946787 51.836608 11.175603 10.919484 +131 Halle/ Saale 51.482166 11.965814 51.537722 51.426542 12.093873 11.837755 +133 Haltern 51.742819 7.184407 51.798057 51.687514 7.312466 7.056347 +134 Hamburg 53.553815 9.991575 53.659740 53.447624 10.247694 9.735456 +8663 Hamburg Flughafen 53.632150 10.004160 53.658607 53.605677 10.068190 9.940131 +135 Hameln 52.104018 9.357208 52.158813 52.049156 9.485267 9.229149 +136 Hamm 51.680386 7.817429 51.735700 51.625004 7.945488 7.689370 +137 Hanau 50.135407 8.915129 50.192589 50.078157 9.043188 8.787070 +138 Hannover 52.372068 9.735686 52.426533 52.317536 9.863746 9.607627 +8664 Hannover Flughafen 52.458587 9.694593 52.472183 52.444987 9.726608 9.662578 +139 Hattingen (NW) 51.399058 7.187600 51.454715 51.343333 7.315659 7.059541 +7728 Heide 54.195730 9.091093 54.221832 54.169611 9.155123 9.027063 +140 Heidelberg 49.401900 8.680285 49.459954 49.343777 8.808344 8.552226 +141 Heidenheim/ Brenz 48.678383 10.151323 48.737288 48.619409 10.279382 10.023264 +142 Heilbronn 49.141598 9.222083 49.199959 49.083168 9.350142 9.094024 +143 Heinsberg 51.058366 6.094239 51.114437 51.002227 6.222298 5.966179 +7704 Helmstedt 52.224403 11.011020 52.279050 52.169689 11.139079 10.882961 +145 Hennef/ Sieg 50.770011 7.293033 50.826431 50.713524 7.421093 7.164974 +146 Herford 52.116393 8.669255 52.171173 52.061546 8.797314 8.541195 +147 Herne 51.538523 7.219259 51.566275 51.510754 7.283288 7.155229 +7718 Herrenberg 48.596142 8.870092 48.625652 48.566616 8.934122 8.806063 +148 Herten 51.593151 7.140439 51.620870 51.565415 7.204469 7.076409 +149 Herzogenrath 50.868804 6.096711 50.896963 50.840628 6.160741 6.032681 +150 Hilden 51.166721 6.931250 51.194699 51.138725 6.995280 6.867221 +151 Hildesheim 52.150900 9.951001 52.205637 52.096095 10.079060 9.822942 +152 Hof 50.316580 11.913471 50.373545 50.259547 12.041530 11.785412 +153 Hofheim/ Taunus 50.086915 8.448314 50.144155 50.029607 8.576373 8.320255 +154 Homburg 49.319451 7.334154 49.377603 49.261231 7.462214 7.206095 +3079 Horb a.N. 48.493900 8.719460 48.501294 48.486505 8.735467 8.703453 +7681 Höxter 51.773982 9.381289 51.829182 51.718715 9.509349 9.253230 +155 Hoyerswerda 51.435517 14.239534 51.491130 51.379836 14.367593 14.111475 +8514 Hurricane Festival 51.601362 0.545646 51.604674 51.598379 0.549510 0.543215 +157 Hürth 50.870961 6.868111 50.899118 50.842787 6.932141 6.804081 +3112 Husum 54.485377 9.053624 54.511296 54.459442 9.117654 8.989595 +158 Ibbenbüren 52.276254 7.718562 52.330837 52.221604 7.846621 7.590502 +159 Idar-Oberstein 49.709577 7.354822 49.738430 49.680706 7.418851 7.290792 +8784 Idstein 50.222654 8.268798 50.279731 50.165508 8.396857 8.140738 +2999 Ilmenau 50.684511 10.917600 50.741033 50.627920 11.045659 10.789540 +160 Ingolstadt 48.762145 11.425389 48.820952 48.703269 11.553448 11.297330 +161 Iserlohn 51.372933 7.699287 51.428622 51.317177 7.827346 7.571227 +162 Itzehoe 53.922858 9.518876 53.949132 53.896567 9.582905 9.454846 +163 Jena 50.926999 11.587011 50.983229 50.870701 11.715071 11.458952 +8510 Jülich 50.921007 6.361197 50.977244 50.864702 6.489256 6.233137 +165 Kaarst 51.226326 6.627945 51.254268 51.198367 6.691975 6.563915 +166 Kaiserslautern 49.444710 7.769031 49.502714 49.386638 7.897090 7.640971 +8791 Kaltenkirchen 53.839137 9.960241 53.865464 53.812793 10.024271 9.896211 +167 Kamen 51.591665 7.664343 51.619385 51.563929 7.728373 7.600314 +7763 Kamenz 51.268215 14.093910 51.324031 51.212331 14.221969 13.965850 +168 Kamp-Lintfort 51.502883 6.551708 51.558414 51.447285 6.679767 6.423649 +169 Karlsruhe 49.008085 8.403756 49.066603 48.949497 8.531816 8.275697 +170 Kassel 51.318928 9.496010 51.374683 51.263106 9.624069 9.367951 +171 Kaufbeuren 47.881156 10.624583 47.911080 47.851214 10.688613 10.560553 +3082 Kehl/Rhein 48.210845 7.738089 48.684512 47.732754 8.762564 6.713614 +376 Kelheim 48.918605 11.872225 48.977229 48.859913 12.000284 11.744166 +172 Kempen 51.363245 6.418237 51.418946 51.307476 6.546296 6.290178 +173 Kempten/Allg. 47.723937 10.311047 47.753952 47.693904 10.375077 10.247017 +174 Kerpen 50.872602 6.692641 50.928898 50.816238 6.820700 6.564582 +175 Kiel 54.322684 10.135860 54.374711 54.270591 10.263919 10.007801 +176 Kirchheim unter Teck 48.647692 9.453935 48.677171 48.618196 9.517965 9.389905 +3107 Kitzingen 49.738096 10.155364 49.766932 49.709243 10.219394 10.091334 +177 Kleve 51.784782 6.130722 51.839969 51.729528 6.258781 6.002662 +178 Koblenz 50.356696 7.599617 50.413613 50.299711 7.727676 7.471557 +179 Köln 50.940664 6.959911 51.053023 50.828033 7.216030 6.703793 +8522 Köln Bonn Flughafen 50.878400 7.122930 50.906552 50.850230 7.186960 7.058901 +8788 Königs Wusterhausen 52.298916 13.627807 52.353471 52.244294 13.755866 13.499748 +180 Königswinter 50.673421 7.194724 50.729957 50.616817 7.322783 7.066665 +181 Konstanz 47.661937 9.172426 47.722022 47.601783 9.300485 9.044366 +8467 Korbach 51.276659 8.873819 51.332465 51.220785 9.001879 8.745760 +8322 Köthen/ Anhalt 51.755736 11.975064 51.810958 51.700447 12.103124 11.847005 +183 Krefeld 51.331704 6.559354 51.387443 51.275897 6.687413 6.431294 +7742 Kronach 50.240065 11.323382 50.297122 50.182940 11.451441 11.195323 +3113 Kulmbach 50.107662 11.452978 50.164877 50.050378 11.581038 11.324919 +370 Künzelsau 49.279450 9.687883 49.337649 49.221182 9.815942 9.559824 +184 Laatzen 52.310245 9.797306 52.364786 52.255637 9.925365 9.669247 +185 Lage 51.992713 8.793279 52.047645 51.937714 8.921338 8.665220 +186 Lahr/ Schwarzwald 48.342794 7.877562 48.402091 48.283428 8.005621 7.749502 +187 Landau/ Pfalz 49.193507 8.112880 49.310038 49.076700 8.368999 7.856761 +7667 Landsberg am Lech 48.047918 10.882476 48.077746 48.018073 10.946506 10.818446 +188 Landshut 48.538823 12.151825 48.597891 48.479686 12.279884 12.023766 +190 Langenfeld/ Rheinland 51.102447 6.947116 51.130464 51.074413 7.011146 6.883086 +191 Langenhagen 52.447312 9.739651 52.501684 52.392873 9.867710 9.611592 +356 Lauchhammer 51.494602 13.762197 51.550143 51.438994 13.890257 13.634138 +8823 Lauf a. d. Pegnitz 49.583718 11.281054 49.699326 49.467834 11.537173 11.024935 +380 Leer 53.230816 7.462341 53.284215 53.177350 7.590400 7.334282 +192 Lehrte 52.372623 9.977123 52.427087 52.318092 10.105182 9.849063 +7759 Leinefelde-Worbis 51.388269 10.324205 51.443939 51.332530 10.452264 10.196145 +193 Leinfelden-Echterdingen 48.690890 9.167366 48.720344 48.661419 9.231396 9.103336 +194 Leipzig 51.339673 12.371364 51.451064 51.228011 12.627483 12.115245 +8798 Leipzig-Halle Flughafen 51.419742 12.220137 51.433656 51.405823 12.252152 12.188123 +195 Lemgo 52.033307 8.901746 52.088189 51.978358 9.029805 8.773687 +196 Leonberg (BW) 48.802246 9.016456 48.831635 48.772840 9.080486 8.952426 +197 Leverkusen 51.033749 6.987287 51.089849 50.977580 7.115347 6.859228 +198 Limburg/ Lahn 50.386627 8.059515 50.415076 50.358161 8.123545 7.995486 +377 Lindau (Bodensee) 47.554363 9.690238 47.584476 47.524233 9.754268 9.626208 +199 Lingen/ Ems 52.523060 7.323279 52.577338 52.468714 7.451338 7.195220 +200 Lippstadt 51.676381 8.346648 51.731701 51.620995 8.474708 8.218589 +7720 Löbau (Sachsen) 51.097091 14.665637 51.153115 51.040999 14.793697 14.537578 +201 Löhne 52.190165 8.688669 52.244853 52.135408 8.816728 8.560609 +8875 Lohr am Main 49.995017 9.571687 50.052366 49.937599 9.699746 9.443627 +202 Lörrach 47.619368 7.659238 47.649444 47.589275 7.723268 7.595208 +7748 Lübben 51.941553 13.898084 51.969059 51.914031 13.962114 13.834054 +203 Lübeck 53.869563 10.687579 53.974695 53.764166 10.943698 10.431460 +8635 Luckenwalde 52.089739 13.171002 52.144551 52.034859 13.299061 13.042943 +204 Lüdenscheid 51.215468 7.635070 51.271348 51.159520 7.763129 7.507011 +205 Ludwigsburg 48.901911 9.193265 48.931241 48.872564 9.257295 9.129235 +8539 Ludwigsfelde 52.301183 13.260158 52.355736 52.246564 13.388217 13.132099 +206 Ludwigshafen/ Rhein 49.480732 8.441283 49.538693 49.422702 8.569342 8.313223 +8496 Ludwigslust 53.320414 11.499291 53.373701 53.267060 11.627351 11.371232 +207 Lüneburg 53.245938 10.409343 53.299318 53.192490 10.537402 10.281284 +208 Lünen 51.618117 7.524524 51.645820 51.590397 7.588554 7.460494 +7764 Lutherstadt Eisleben 51.516667 11.550000 51.523610 51.509723 11.566007 11.533993 +343 Lutherstadt Wittenberg 51.866667 12.650000 51.880445 51.852885 12.682015 12.617985 +209 Magdeburg 52.130956 11.636701 52.185718 52.076127 11.764760 11.508642 +210 Maintal 50.150000 8.833333 50.178591 50.121392 8.897363 8.769304 +211 Mainz 49.995123 8.267426 50.052472 49.937705 8.395486 8.139367 +212 Mannheim 49.484677 8.476724 49.542633 49.426653 8.604783 8.348665 +213 Marburg 50.814788 8.769239 50.871153 50.758354 8.897298 8.641180 +8607 Marktredwitz 49.999983 12.085741 50.028664 49.971286 12.149771 12.021712 +214 Marl 51.653181 7.097807 51.708528 51.597766 7.225866 6.969748 +8790 Mayen 50.327100 7.224691 50.384052 50.270079 7.352750 7.096632 +215 Meerbusch 51.261268 6.677683 51.317093 51.205375 6.805742 6.549624 +8634 Meersburg 47.694018 9.268498 47.724050 47.663968 9.332528 9.204468 +7707 Meiningen 50.564232 10.415178 50.592574 50.535872 10.479207 10.351148 +216 Meißen 51.159259 13.471832 51.187242 51.131259 13.535862 13.407802 +217 Melle 52.203258 8.336057 52.257931 52.148518 8.464116 8.207998 +218 Memmingen 47.984452 10.177454 48.044165 47.924670 10.305513 10.049395 +219 Menden/ Sauerland 51.438925 7.793643 51.494533 51.383248 7.921702 7.665584 +3116 Meppen 52.687508 7.291162 52.741583 52.633366 7.419222 7.163103 +220 Merseburg/ Saale 51.357213 11.992299 51.385075 51.329333 12.056329 11.928269 +8623 Merzig 49.442050 6.635655 49.500057 49.383975 6.763714 6.507595 +7772 Meschede 51.345076 8.283140 51.400799 51.289285 8.411200 8.155081 +221 Mettmann 51.251537 6.978654 51.279464 51.223593 7.042684 6.914624 +7907 Michelstadt 49.677757 9.000103 49.735484 49.619961 9.128162 8.872044 +222 Minden 52.289987 8.922157 52.344553 52.235354 9.050216 8.794098 +7674 Mittweida 50.985779 12.981451 51.041938 50.929552 13.109511 12.853392 +223 Moers 51.453048 6.621745 51.508639 51.397388 6.749805 6.493686 +8606 Mölln 53.630197 10.691558 53.656655 53.603723 10.755588 10.627529 +224 Mönchengladbach 51.191261 6.442066 51.247171 51.135283 6.570125 6.314007 +225 Monheim (NW) 51.091671 6.893195 51.098678 51.084662 6.909202 6.877188 +3114 Montabaur 50.436193 7.833147 50.493014 50.379303 7.961206 7.705088 +7750 Mosbach (Baden) 49.352246 9.143436 49.355394 49.349099 9.146584 9.140288 +226 Mühlhausen (Thür.) 51.208800 10.474587 51.211948 51.205652 10.477735 10.471439 +227 Mülheim/ Ruhr 51.427073 6.886492 51.482696 51.371382 7.014551 6.758433 +228 München 48.139127 11.580186 48.258124 48.019852 11.836305 11.324067 +21381 München 2. ÖKT 48.139127 11.580186 48.258124 48.019852 11.836305 11.324067 +8470 München Flughafen 48.137778 11.690278 48.145224 48.130331 11.706285 11.674270 +229 Münster 51.964711 7.628496 52.074575 51.854577 7.884615 7.372377 +230 Naumburg/ Saale 51.149334 11.811026 51.205295 51.093305 11.939085 11.682966 +233 Neu-Isenburg 50.053204 8.686161 50.081853 50.024538 8.750191 8.622131 +240 Neu-Ulm 48.384109 10.009740 48.443357 48.324791 10.137799 9.881680 +232 Neubrandenburg 53.558054 13.261224 53.611044 53.504997 13.389283 13.133165 +3111 Neuburg/Donau 48.735954 11.184327 48.794792 48.677047 11.312386 11.056268 +234 Neumarkt/ Oberpfalz 49.282290 11.457132 49.340485 49.224026 11.585192 11.329073 +235 Neumünster 54.074100 9.984580 54.126441 54.021692 10.112639 9.856521 +236 Neunkirchen/Saar 49.343827 7.180059 49.401950 49.285636 7.308118 7.052000 +7703 Neuruppin 52.922015 12.793978 53.029516 52.814247 13.050097 12.537859 +237 Neuss 51.198429 6.695290 51.254331 51.142460 6.823349 6.567231 +7741 Neustadt a.d. Aisch 49.633490 10.703052 49.748981 49.517725 10.959171 10.446933 +238 Neustadt/ Rübenberge 52.504469 9.462111 52.613005 52.395665 9.718230 9.205992 +239 Neustadt/ Weinstraße 49.350270 8.137919 49.408385 49.292086 8.265978 8.009860 +7856 Neustrelitz 53.364163 13.060610 53.417396 53.310864 13.188669 12.932550 +241 Neuwied 50.426671 7.461901 50.483504 50.369770 7.589960 7.333842 +2899 Nienburg/Weser 52.636691 9.209572 52.690829 52.582486 9.337631 9.081512 +379 Norden 53.594988 7.202477 53.647932 53.541977 7.330536 7.074418 +243 Norderstedt 53.673502 9.985589 53.726347 53.620590 10.113649 9.857530 +244 Nordhausen 51.503527 10.793615 51.559057 51.447929 10.921674 10.665556 +245 Nordhorn 52.435882 7.074230 52.490268 52.381429 7.202290 6.946171 +363 Nördlingen 48.850831 10.489575 48.909534 48.792059 10.617634 10.361516 +7682 Nortorf 53.926474 9.290637 53.952746 53.900185 9.354666 9.226607 +246 Nürnberg 49.450520 11.080480 49.566444 49.334321 11.336599 10.824361 +247 Nürtingen 48.624572 9.342413 48.654064 48.595062 9.406443 9.278383 +248 Oberhausen 51.469580 6.865975 51.525151 51.413941 6.994034 6.737915 +3110 Oberstdorf 47.408561 10.275793 47.529244 47.287601 10.531912 10.019674 +249 Oberursel/ Taunus 50.201489 8.574911 50.230049 50.172912 8.638941 8.510881 +250 Offenbach/ Main 50.104920 8.758561 50.133537 50.076285 8.822591 8.694531 +251 Offenburg 48.467987 7.942387 48.527138 48.408767 8.070446 7.814328 +252 Oldenburg (Oldb) 53.136161 8.182940 53.139309 53.133013 8.186088 8.179792 +7669 Olpe 51.029490 7.843552 51.085596 50.973316 7.971612 7.715493 +7853 Oranienburg 52.755575 13.241038 52.809565 52.701517 13.369098 13.112979 +253 Osnabrück 52.267281 8.053188 52.321875 52.212620 8.181248 7.925129 +254 Paderborn 51.715254 8.752130 51.770525 51.659915 8.880189 8.624071 +8816 Papenburg 53.078197 7.393250 53.131786 53.024540 7.521309 7.265190 +8451 Parchim 53.424455 11.847682 53.477612 53.371231 11.975742 11.719623 +8455 Pasewalk 53.505160 13.990185 53.558217 53.452037 14.118244 13.862126 +255 Passau 48.573512 13.463918 48.632540 48.514415 13.591977 13.335859 +256 Peine 52.323323 10.228979 52.377848 52.268731 10.357038 10.100920 +8552 Perleberg 53.071062 11.854046 53.124661 53.017397 11.982105 11.725987 +3075 Pfaffenhofen/Ilm 48.529861 11.503235 48.588940 48.470713 11.631295 11.375176 +8787 Pfarrkirchen 48.431960 12.938158 48.461565 48.402338 13.002188 12.874128 +257 Pforzheim 48.893383 8.704920 48.952037 48.834661 8.832980 8.576861 +258 Pinneberg 53.662612 9.796291 53.689050 53.636158 9.860321 9.732261 +259 Pirmasens 49.203716 7.604745 49.232869 49.174546 7.668775 7.540716 +260 Pirna 50.957895 13.937399 51.014088 50.901635 14.065459 13.809340 +261 Plauen 50.495065 12.138331 50.551815 50.438246 12.266390 12.010271 +262 Porta Westfalica 52.239495 8.922587 52.294123 52.184800 9.050647 8.794528 +263 Potsdam 52.396963 13.058601 52.451397 52.342461 13.186660 12.930541 +7751 Prenzlau 53.316639 13.860344 53.369931 53.263280 13.988404 13.732285 +264 Pulheim 50.998837 6.798139 51.054980 50.942626 6.926198 6.670080 +7758 Quedlinburg 51.783564 11.142056 51.838752 51.728308 11.270115 11.013996 +265 Radebeul 51.105799 13.661876 51.133814 51.077767 13.725905 13.597846 +7719 Radolfzell 47.736336 8.969466 47.796335 47.676267 9.097525 8.841406 +266 Rastatt 48.857458 8.201681 48.916153 48.798694 8.329740 8.073622 +267 Ratingen 51.296859 6.847082 51.352640 51.241010 6.975141 6.719023 +268 Ravensburg 47.784300 9.609931 47.844244 47.724287 9.737990 9.481872 +269 Recklinghausen 51.611287 7.197382 51.666685 51.555821 7.325441 7.069323 +270 Regensburg 49.016491 12.100904 49.075000 48.957914 12.228963 11.972845 +271 Remscheid 51.179304 7.193936 51.235228 51.123312 7.321995 7.065877 +272 Rendsburg 54.303803 9.669874 54.329837 54.277753 9.733904 9.605844 +273 Reutlingen 48.490891 9.205842 48.550015 48.431698 9.333901 9.077783 +274 Rheda-Wiedenbrück 51.860690 8.279768 51.915783 51.805529 8.407827 8.151708 +275 Rheine 52.276606 7.438440 52.331189 52.221956 7.566500 7.310381 +8750 Ribnitz-Damgarten 54.245460 12.425999 54.297585 54.193269 12.554059 12.297940 +276 Riesa 51.300142 13.302104 51.355920 51.244297 13.430163 13.174044 +277 Rodgau 50.024544 8.885257 50.081858 49.967161 9.013316 8.757198 +278 Rosenheim 47.856077 12.124018 47.886016 47.826121 12.188048 12.059988 +279 Rostock 54.090235 12.132950 54.194811 53.985394 12.389069 11.876831 +7766 Rotenburg/Wümme 53.109654 9.397262 53.163204 53.056037 9.525322 9.269203 +364 Rothenburg/Tauber 49.366387 10.148303 49.424483 49.308222 10.276362 10.020244 +280 Rottenburg/ Neckar 48.476887 8.937750 48.536028 48.417678 9.065810 8.809691 +7711 Rottweil 48.166685 8.627930 48.226187 48.107115 8.755990 8.499871 +7700 Rügen 54.351997 13.363049 54.559564 54.143376 13.875287 12.850812 +281 Rüsselsheim 49.994874 8.410858 50.052224 49.937456 8.538917 8.282799 +369 Saalfeld/Saale 50.650512 11.354286 50.678802 50.622204 11.418316 11.290256 +282 Saarbrücken 49.234851 6.994402 49.293102 49.176530 7.122461 6.866342 +283 Saarlouis 49.315678 6.750348 49.344765 49.286575 6.814378 6.686318 +284 Salzgitter 52.152262 10.331013 52.261666 52.042589 10.587132 10.074895 +7854 Salzwedel 52.849563 11.151468 52.903437 52.795622 11.279527 11.023409 +8458 Sangerhausen 51.472026 11.301724 51.583095 51.360686 11.557843 11.045606 +285 Sankt Augustin 50.772491 7.190686 50.800708 50.744257 7.254716 7.126656 +286 Sankt Ingbert 49.280349 7.117956 49.309457 49.251225 7.181985 7.053926 +7710 Sankt Peter-Ording 54.312590 8.623751 54.338618 54.286545 8.687781 8.559721 +8821 Schleiden 50.529446 6.476853 50.586155 50.472668 6.604913 6.348794 +8495 Schleiz 50.577819 11.813736 50.634470 50.521100 11.941795 11.685677 +7749 Schleswig 54.518113 9.570354 54.544011 54.492199 9.634384 9.506324 +7740 Schmalkalden 50.720742 10.447082 50.777221 50.664195 10.575141 10.319022 +287 Schönebeck/ Elbe 52.019669 11.736987 52.047126 51.992194 11.801016 11.672957 +288 Schorndorf 48.803491 9.525982 48.832879 48.774086 9.590012 9.461952 +289 Schwabach 49.329472 11.018821 49.358550 49.300376 11.082851 10.954791 +290 Schwäbisch Gmünd 48.802294 9.802725 48.861054 48.743465 9.930784 9.674665 +3115 Schwäbisch Hall 49.110981 9.740786 49.169378 49.052514 9.868846 9.612727 +291 Schwedt/ Oder 53.054465 14.285218 53.161637 52.947026 14.541337 14.029099 +292 Schweinfurt 50.049106 10.231153 50.077757 50.020438 10.295182 10.167123 +293 Schwerin 53.625743 11.416893 53.678648 53.572771 11.544952 11.288834 +294 Schwerte 51.440590 7.570298 51.468402 51.412761 7.634328 7.506268 +7672 Senftenberg 51.519328 14.007591 51.574839 51.463750 14.135651 13.879532 +296 Siegburg 50.798766 7.208032 50.826967 50.770548 7.272062 7.144002 +297 Siegen 50.873797 8.023407 50.930091 50.817435 8.151466 7.895348 +368 Sigmaringen 48.085756 9.216618 48.145351 48.026091 9.344677 9.088558 +298 Sindelfingen 48.708461 9.003555 48.737905 48.679001 9.067585 8.939526 +299 Singen/ Hohentwiel 47.761868 8.834755 47.821838 47.701829 8.962814 8.706695 +8799 Sinsheim 49.252781 8.879440 49.311012 49.194482 9.007499 8.751380 +300 Soest 51.570053 8.108287 51.625502 51.514536 8.236346 7.980228 +301 Solingen 51.172145 7.083391 51.228078 51.116144 7.211450 6.955332 +7768 Soltau 52.986671 9.839944 53.094011 52.879063 10.096063 9.583825 +7769 Sömmerda 51.159444 11.118722 51.215392 51.103428 11.246781 10.990662 +302 Speyer 49.317284 8.431007 49.346370 49.288182 8.495036 8.366977 +304 Stade 53.599013 9.473677 53.651952 53.546008 9.601737 9.345618 +305 Starnberg 48.000536 11.342857 48.030392 47.970663 11.406887 11.278827 +8511 Steinfurt 52.150191 7.343829 52.204929 52.095385 7.471889 7.215770 +306 Stendal 52.604071 11.866368 52.658249 52.549826 11.994427 11.738309 +307 Stolberg/ Rheinland 50.776107 6.224172 50.832519 50.719627 6.352231 6.096113 +308 Stralsund 54.313988 13.085796 54.366026 54.261883 13.213856 12.957737 +309 Straubing 48.879921 12.570278 48.938590 48.821183 12.698337 12.442219 +310 Stuttgart 48.777106 9.180769 48.835895 48.718247 9.308828 9.052709 +8461 Stuttgart Flughafen 48.689545 9.192981 48.704275 48.674812 9.224996 9.160966 +311 Suhl 50.611441 10.692041 50.668052 50.554762 10.820100 10.563982 +312 Sylt 54.886578 8.311244 55.091432 54.680677 8.823482 7.799006 +366 Tauberbischofsheim 49.624010 9.662069 49.681801 49.566150 9.790129 9.534010 +7765 Torgau 51.555198 12.999206 51.610665 51.499663 13.127265 12.871146 +7684 Traunstein 47.869950 12.645452 47.899881 47.840001 12.709482 12.581422 +313 Trier 49.753742 6.646251 49.811379 49.696037 6.774311 6.518192 +314 Troisdorf 50.814080 7.154291 50.870447 50.757646 7.282350 7.026231 +315 Tübingen 48.522904 9.052098 48.581991 48.463748 9.180157 8.924039 +7679 Tuttlingen 47.983077 8.819269 48.042791 47.923293 8.947328 8.691209 +7729 Überlingen 47.768403 9.159331 47.828365 47.708371 9.287390 9.031272 +316 Uelzen 52.963017 10.558222 53.016750 52.909217 10.686281 10.430163 +317 Ulm 48.399623 9.996607 48.458854 48.340323 10.124666 9.868548 +318 Unna 51.534471 7.685883 51.589963 51.478911 7.813942 7.557824 +319 Usedom 53.873012 13.920410 53.899317 53.846689 13.984440 13.856381 +3076 Vechta 52.724647 8.285009 52.778676 52.670551 8.413069 8.156950 +320 Velbert 51.338868 7.042711 51.394598 51.283069 7.170771 6.914652 +8450 Verden (Aller) 52.923341 9.231170 52.977123 52.869492 9.359229 9.103111 +321 Viersen 51.255706 6.398319 51.311538 51.199807 6.526378 6.270260 +322 Villingen-Schwenningen 48.055390 8.460072 48.115021 47.995691 8.588131 8.332013 +324 Völklingen 49.250138 6.860317 49.308371 49.191836 6.988376 6.732258 +325 Waiblingen 48.832025 9.314109 48.890751 48.773231 9.442168 9.186050 +7712 Waldshut-Tiengen 47.623686 8.214255 47.683815 47.563488 8.342314 8.086196 +7721 Wangen (Allgäu) 47.685618 9.832417 47.745676 47.625491 9.960476 9.704358 +8783 Warburg 51.484967 9.147018 51.596004 51.373658 9.403137 8.890899 +7743 Waren (Müritz) 53.520153 12.680887 53.573191 53.467049 12.808946 12.552828 +327 Warendorf 51.951848 7.990300 52.006830 51.896799 8.118359 7.862240 +328 Wasserburg am Inn 48.060501 12.230482 48.090322 48.030663 12.294512 12.166452 +329 Weiden/ Oberpfalz 49.674984 12.160652 49.732715 49.617185 12.288711 12.032592 +8759 Weilheim in Oberbayern 47.840850 11.142177 47.900728 47.780902 11.270236 11.014117 +330 Weimar 50.979163 11.324280 51.035330 50.922928 11.452339 11.196221 +7715 Weingarten (Württ.) 47.806835 9.646555 47.821821 47.791844 9.678570 9.614540 +331 Weinheim 49.552138 8.665731 49.610014 49.494193 8.793791 8.537672 +361 Weißenburg/Bay. 49.029942 10.965442 49.033090 49.026794 10.968590 10.962294 +7736 Weißenfels 51.199830 11.966723 51.227789 51.171855 12.030753 11.902693 +7706 Weißwasser 51.506606 14.643307 51.562132 51.451012 14.771366 14.515247 +334 Wermelskirchen 51.140154 7.216282 51.196126 51.084114 7.344341 7.088222 +335 Wernigerode 51.838149 10.790373 51.893270 51.782961 10.918432 10.662313 +336 Wesel 51.660828 6.609155 51.716166 51.605422 6.737215 6.481096 +337 Wetzlar 50.550978 8.503477 50.607661 50.494226 8.631536 8.375418 +338 Wiesbaden 50.084080 8.238392 50.141323 50.026768 8.366451 8.110332 +339 Wilhelmshaven 53.517063 8.119749 53.570105 53.463955 8.247808 7.991690 +340 Willich 51.264960 6.551767 51.320780 51.209072 6.679826 6.423708 +8751 Winterberg 51.193421 8.533304 51.249328 51.137446 8.661363 8.405245 +341 Wismar 53.888215 11.462017 53.914511 53.861902 11.526046 11.397987 +342 Witten 51.437475 7.337293 51.493085 51.381797 7.465352 7.209234 +8760 Wittlich 49.984391 6.891255 50.013081 49.955684 6.955284 6.827225 +7906 Wittstock/Dosse 53.161684 12.483947 53.268588 53.054512 12.740066 12.227828 +345 Wolfenbüttel 52.162315 10.532240 52.217038 52.107525 10.660299 10.404180 +346 Wolfsburg 52.421820 10.784980 52.476224 52.367350 10.913039 10.656921 +347 Worms 49.630644 8.357911 49.688427 49.572792 8.485970 8.229852 +348 Wunstorf 52.427027 9.429596 52.481424 52.372563 9.557655 9.301537 +349 Wuppertal 51.255871 7.149985 51.311702 51.199972 7.278044 7.021926 +350 Würselen 50.817995 6.133109 50.846184 50.789788 6.197139 6.069079 +351 Würzburg 49.794256 9.927489 49.851845 49.736599 10.055548 9.799430 +352 Zeitz 51.045511 12.142199 51.073563 51.017442 12.206229 12.078169 +353 Zittau 50.898777 14.809351 50.955041 50.842445 14.937410 14.681291 +354 Zweibrücken 49.250476 7.361190 49.308709 49.192175 7.489249 7.233130 +355 Zwickau 50.714620 12.496889 50.771106 50.658065 12.624948 12.368829 +8618 Zwiesel 49.014175 13.232659 49.043439 48.984893 13.296689 13.168629 diff --git a/data/org.maemo.beifahrer.service.in b/data/org.maemo.beifahrer.service.in new file mode 100644 index 0000000..fa574ae --- /dev/null +++ b/data/org.maemo.beifahrer.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.maemo.beifahrer +Exec=@prefix@/bin/beifahrer diff --git a/debian/beifahrer.install b/debian/beifahrer.install new file mode 100644 index 0000000..f0d1eb4 --- /dev/null +++ b/debian/beifahrer.install @@ -0,0 +1,7 @@ +usr/bin/beifahrer +usr/share/applications/hildon/beifahrer.desktop +usr/share/beifahrer/city_list +usr/share/dbus-1/services/org.maemo.beifahrer.service +usr/share/icons/hicolor/32x32/hildon +usr/share/icons/hicolor/64x64/hildon/beifahrer.png +usr/share/locale diff --git a/debian/beifahrer.launcher b/debian/beifahrer.launcher new file mode 100644 index 0000000..eb9e959 --- /dev/null +++ b/debian/beifahrer.launcher @@ -0,0 +1 @@ +/usr/bin/beifahrer diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..ab388f8 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +beifahrer (0.0.1-1) unstable; urgency=low + + * Initial release + + -- Philipp Zabel Thu, 22 Oct 2009 16:22:53 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..fa3541f --- /dev/null +++ b/debian/control @@ -0,0 +1,60 @@ +Source: beifahrer +Section: user/navigation +Priority: extra +Maintainer: Philipp Zabel +Build-Depends: vala (>= 0.8.0), debhelper (>= 5), + maemo-launcher-dev (>= 0.23-1), maemo-optify (>= 0.2), + libcurl4-openssl-dev, libhildon1-dev (>= 2.2.0), libhildonmime-dev (>= 2.1.3), + libosso-dev (>= 2.20), osso-af-settings (>= 0.9.2), + libdbus-glib-1-dev (>= 0.78), libxml2-dev (>= 2.6.32), + liblocation-dev (>= 0.102), libosso-abook-dev (>= 4.20100302) +Standards-Version: 5 +XSBC-Bugtracker: https://bugs.maemo.org/enter_bug.cgi?product=Beifahrer + +Package: beifahrer +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +XB-Description: Find lifts in Germany + A frontend for the mitfahrgelegenheit.de/mitfahrclub.adac.de ride-sharing + web service. + The point of departure can be determined automatically from the current + location. It allows to quickly contact the driver of a given lift offer via + the call button in the detail view. +XB-Description-de_DE: Mitfahrgelegenheiten innerhalb Deutschlands finden + Ein Programm zum Durchsuchen der mitfahrgelegenheit.de/mitfahrclub.adac.de + Mitfahrzentrale. + Der Abfahrtsort wird optional anhand der aktuellen Position automatisch + bestimmt. In der Detailansicht für eine gegebene Mitfahrgelegenheit kann + der anbietende Fahrer einfach per Knopfdruck kontaktiert werden. +XB-Maemo-Display-Name: Beifahrer +XB-Maemo-Icon-26: + iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgI + fAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3 + Lmlua3NjYXBlLm9yZ5vuPBoAAATBSURBVGiB7ZhPSBxXHMe/b8wKmhbyx4SC + VDd4yBrooS05WWlFDyEEYyCGHBbS5BKyRfCQcw3tofQo0hVPbcFeongQKdoE + 66EJHproIWwLJUghlqBJDWl3d2be/H6/HjKzmdldZ4zudhH2C48Z3rzfn8/7 + /d46oxIR7GcZtU5gr6oD1Fp1gFqrDlBrHYhasL6+ftS27Wf/RzLFamxsbGlt + bX0etiYSwDTNhGEYAJA7ceLEwUolF6a1tbUsgGbTNBMA7oWtjQRQSp10bzf8 + 85cuoeFxZ74fwqlXC410x29Ns7dvg8L8TU1NNWxsbPSLSMr1nz5+/Pjs4OCg + 324TQLsbe28AADyATf/k487sZWGehDBEBBDp+6MjmwRafghz9vTp08sAJkUE + 7uhbX19PAijYicgGgHYRObmtI1eRh1gplXCvAQAy8zfINkG2CbJMkJWHY1k3 + ovxprW/Yto2iEbAjok0iAjMnovztuALMHGghx7ZaIYzXFWCISGuUM9u2W327 + 742AnYhsMjP2XIGlpaUDADqA0gqwbc6TnfftvgkyzR+jAmqt57XWKBoBO8dx + NtwKdLg57A6gvb29A6+rVASQmyfLhOO1kW3CsaIBLMuaL9NCxQCbRAQiOnDk + yJGOXQPAbR8RKWkhy3m+QJZ5/1UFTJBlLh5uxk9RALFYbMGyrPu+3V/c2toK + 2DGzBwAiCm2jUADHcRI+R4EKrH37iQn75Vm2rZvk6OEs2ed/nfhQRwGMjIyY + DQ0NZx3HuUlEw/l8/vzExETAzmshIoLWOvQgh/YXMxcqYBhGAeCDr/49ZjiN + 1w+9192nlFqAoAmCO6e/NBcbWMaXR5qelPM3NjZ2zDCM621tbX1KqQVmblJK + 3RkfH190HGd8aGjoiRtvk5k9s9AKqLBPykwm8wuALhcg3tnZ+ef7n788LYJZ + BbyzjdnfUKp/5Yu3A3+ARkdHTwOYRYidiPQPDw/fW15ejovImvsLda+rq+uj + XQE8evTomYgcFRForQ9emWszjBwygLy7rdEr/WXDSPz+dcs/AJBOp9/K5XIZ + AJF2zJzo7e2lfD6fdXN73t3d3fJGAA8ePGiOxWJpEbniPd/J9U3WvuH1+2w2 + mzp37lwuEmBlZeUUgCkRObXX4BUGySilBnt7ezPbAjx8+PBTZv4GQHMVd3Mv + tjkAn505c+a7EoDV1dVDtm1vVTPxSoFqrQ8PDAy8AHw/o7lcLq6UquRuVQ0I + QBzAagCAiIoBNIBJIkoDgFIqJSJJEYlVM1EAWkQmRSTtzqcABOIqpUoBAMSJ + yE872dPTc833/Nrdu3ehlLpazT5n5skLFy4E4s7MzEBErvrWxb2HBQCtdWFS + RMDMaRRJRNLMvCOAPQCVjesBAPAqEARg5rjfmddOfmmtoZSqVl97yZXELQNU + ACi8zBFRnJm9Fzc4jpMqNmTmlO/lbteDmeF+sJRLriRu8ZwfIHCIi3YnOTc3 + V2glpVSKmZNFa0Kvu1RyenoaSqnAIfYvKNtCRLQK4GNfEjEAV4sOT2j5K6RA + 3G206t34AW4B+LlKu1pp3fJuyr7MTU9Pl0xevHgx+nRVUDvNYd//b7QOUGuF + fpHtB+37CtQBaq06QK1VB6i16gC11n9TgiU3mORnOgAAAABJRU5ErkJggg== diff --git a/debian/optify b/debian/optify new file mode 100644 index 0000000..865faf1 --- /dev/null +++ b/debian/optify @@ -0,0 +1 @@ +auto diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..424735e --- /dev/null +++ b/debian/rules @@ -0,0 +1,87 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 +export DH_COMPAT=5 +export DH_OPTIONS + +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif +ifeq (,$(findstring nolauncher,$(DEB_BUILD_OPTIONS))) + conf_opt := --enable-maemo-launcher +endif + +config.status: configure + dh_testdir + # Add here commands to configure the package. + CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr $(conf_opt) + +build: build-stamp + +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-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/tmp + $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: install + dh_testdir + dh_testroot + dh_install --sourcedir=debian/tmp + dh_link + dh_strip + dh_compress + dh_fixperms + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_maemolauncher + dh_md5sums + maemo-optify + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-arch binary-indep binary install configure diff --git a/m4/vala.m4 b/m4/vala.m4 new file mode 100644 index 0000000..d95734a --- /dev/null +++ b/m4/vala.m4 @@ -0,0 +1,29 @@ +# Autoconf support for the Vala compiler + +# Copyright (C) 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# Check whether the Vala compiler exists in `PATH'. If it is found, the +# variable VALAC is set. Optionally a minimum release number of the +# compiler can be requested. +# +# AM_PROG_VALAC([MINIMUM-VERSION]) +# -------------------------------- +AC_DEFUN([AM_PROG_VALAC], +[AC_PATH_PROG([VALAC], [valac], []) + AS_IF([test -z "$VALAC"], + [AC_MSG_WARN([No Vala compiler found. You will not be able to compile .vala source files.])], + [AS_IF([test -n "$1"], + [AC_MSG_CHECKING([$VALAC is at least version $1]) + am__vala_version=`$VALAC --version | sed 's/Vala *//'` + AS_VERSION_COMPARE([$1], ["$am__vala_version"], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Vala $1 not found.])])])]) +]) diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..f252a2d --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,4 @@ +src/lift-detail-window.vala +src/lift-list-window.vala +src/query-window.vala +src/settings-dialog.vala diff --git a/po/de.po b/po/de.po new file mode 100644 index 0000000..316f6df --- /dev/null +++ b/po/de.po @@ -0,0 +1,175 @@ +# German translation for Beifahrer +# Copyright (C) 2010 Philipp Zabel +# This file is distributed under the same license as the Beifahrer package. +# Philipp Zabel , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: beifahrer 0.0.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-04-22 20:10+0200\n" +"PO-Revision-Date: 2010-04-22 20:11+0100\n" +"Last-Translator: Philipp Zabel \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: German\n" +"X-Poedit-Country: GERMANY\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: ../src/lift-detail-window.vala:51 +msgid "New contact" +msgstr "Neuer Kontakt" + +#: ../src/lift-detail-window.vala:54 +msgid "Show website" +msgstr "Webseite anzeigen" + +#: ../src/lift-detail-window.vala:75 +msgid "Departure time" +msgstr "Abfahrtszeit" + +#: ../src/lift-detail-window.vala:77 +msgid "Driver:" +msgstr "Fahrer:" + +#: ../src/lift-detail-window.vala:83 +#: ../src/lift-detail-window.vala:128 +msgid "Phone" +msgstr "Telefon" + +#: ../src/lift-detail-window.vala:111 +#, c-format +msgid "From %s to %s" +msgstr "Von %s nach %s" + +#: ../src/lift-detail-window.vala:113 +msgid "via " +msgstr "über " + +#: ../src/lift-detail-window.vala:123 +msgid "Driver: " +msgstr "Fahrer: " + +#: ../src/lift-detail-window.vala:125 +msgid "Cell" +msgstr "Handy" + +#: ../src/lift-detail-window.vala:132 +#, c-format +msgid "Free places: %d\n" +msgstr "Freie Plätze: %d\n" + +#: ../src/lift-detail-window.vala:133 +#, c-format +msgid "Price: %s\n" +msgstr "Preis: %s\n" + +#: ../src/lift-detail-window.vala:133 +msgid "(no price given)\n" +msgstr "(kein Preis angegeben)\n" + +#: ../src/lift-detail-window.vala:137 +msgid "smoker " +msgstr "Raucher" + +#: ../src/lift-detail-window.vala:142 +msgid "non-smoker " +msgstr "Nichtraucher " + +#: ../src/lift-detail-window.vala:146 +msgid "ADAC member " +msgstr "ADAC-Mitglied " + +#: ../src/lift-detail-window.vala:148 +msgid "only women " +msgstr "nur Frauen " + +#: ../src/lift-detail-window.vala:152 +msgid "" +"\n" +"Last changed: " +msgstr "" +"\n" +"Zuletzt geändert: " + +#: ../src/lift-detail-window.vala:169 +#, c-format +msgid "Couldn't call %s URI" +msgstr "Konnte %s URI nicht anrufen" + +#: ../src/lift-detail-window.vala:173 +#, c-format +msgid "Error: %s" +msgstr "Fehler: %s" + +#: ../src/lift-detail-window.vala:187 +msgid "Failed to open calendar." +msgstr "Konnte Browser nicht öffnen." + +#: ../src/lift-detail-window.vala:221 +msgid "Failed to open browser." +msgstr "Konnte Browser nicht oeffnen." + +#: ../src/lift-list-window.vala:86 +msgid "No lifts" +msgstr "Keine Mitfahrgelegenheiten" + +#: ../src/lift-list-window.vala:115 +#, c-format +msgid "%d pl." +msgstr "%d Pl." + +#: ../src/query-window.vala:44 +#: ../src/settings-dialog.vala:29 +msgid "Settings" +msgstr "Einstellungen" + +#: ../src/query-window.vala:68 +#, c-format +msgid "+/- %d days" +msgstr "+/- %d Tage" + +#: ../src/query-window.vala:75 +msgid "Departure" +msgstr "Abfahrtsort" + +#: ../src/query-window.vala:76 +#: ../src/query-window.vala:99 +msgid "Please select" +msgstr "Bitte auswählen" + +#: ../src/query-window.vala:90 +#: ../src/query-window.vala:113 +msgid "Vicinity" +msgstr "Umkreis" + +#: ../src/query-window.vala:98 +msgid "Arrival" +msgstr "Ankunftsort" + +#: ../src/query-window.vala:126 +msgid "Tolerance" +msgstr "Toleranz" + +#: ../src/query-window.vala:127 +msgid "+/- 0 days" +msgstr "+/- 0 Tage" + +#: ../src/query-window.vala:131 +msgid "Search" +msgstr "Suchen" + +#: ../src/query-window.vala:162 +msgid "No GPS available!" +msgstr "Kein GPS verfügbar!" + +#: ../src/settings-dialog.vala:34 +msgid "Determine point of departure automatically" +msgstr "Abfahrtsort automatisch bestimmen" + +#: ../src/settings-dialog.vala:38 +msgid "Save" +msgstr "Speichern" + diff --git a/src/adac-mitfahrclub.vala b/src/adac-mitfahrclub.vala new file mode 100644 index 0000000..c3d585f --- /dev/null +++ b/src/adac-mitfahrclub.vala @@ -0,0 +1,546 @@ +/* This file is part of Beifahrer. + * + * Copyright (C) 2010 Philipp Zabel + * + * Beifahrer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Beifahrer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Beifahrer. If not, see . + */ + +[Compact] +public class City { + public int number; + public string name; + public double latitude; + public double longitude; + public double north; + public double south; + public double east; + public double west; + + public City (int _number, string _name) { + number = _number; + name = _name; + latitude = 0.0; + longitude = 0.0; + } + + internal double bb_area () { + return (north - south) * (east - west); + } +} + +public enum LiftFlags { + SMOKER = 1, + NON_SMOKER = 2, + ADAC_MEMBER = 4, + WOMEN_ONLY = 8 +} + +public class Lift : Object { + public string city_from; + public string city_to; + public string date; + public string time; + public int places; + public string price; + public LiftFlags flags; + + public string href; + + public List city_via; + public string name; + public string cell; + public string phone; + public string phone2; + public string email; + public string description; + public string modified; +} + +public class AdacMitfahrclub { + const string BASE_URI = "http://mitfahrclub.adac.de"; + + string response; + int size; + List city_list = null; + + static size_t write_memory_cb (void* ptr, size_t size, size_t nmemb, void* data) { + unowned AdacMitfahrclub self = (AdacMitfahrclub) data; + + self.response += ((string) ptr).ndup (size * nmemb); + self.size += (int) (size * nmemb); + + return size * nmemb; + } + + private Html.Doc* get_html_document (string url) { + var handle = new Curl.EasyHandle (); + + handle.setopt (Curl.Option.URL, url); + handle.setopt (Curl.Option.WRITEFUNCTION, write_memory_cb); + handle.setopt (Curl.Option.WRITEDATA, (void*) this); + + this.response = ""; + this.size = 0; + + handle.perform (); + + return Html.Doc.read_memory ((char[]) this.response, this.size, + url, null, Html.ParserOption.NOERROR | Html.ParserOption.NOWARNING); + } + + private void save_city_list () { + FileStream list_file = FileStream.open ("/home/user/.cache/beifahrer/city_list", "w"); + if (list_file == null) + return; + + foreach (unowned City city in city_list) { + if (city.north != 0.0 || city.south != 0.0 || city.east != 0.0 || city.west != 0.0) + list_file.printf ("%d\t%s\t%f\t%f\t%f\t%f\t%f\t%f\n", city.number, city.name, city.latitude, city.longitude, city.north, city.south, city.east, city.west); + else if (city.latitude != 0.0 || city.longitude != 0.0) + list_file.printf ("%d\t%s\t%f\t%f\n", city.number, city.name, city.latitude, city.longitude); + else + list_file.printf ("%d\t%s\n", city.number, city.name); + } + } + + private bool load_city_list () { + FileStream list_file = FileStream.open ("/home/user/.cache/beifahrer/city_list", "r"); + if (list_file == null) + list_file = FileStream.open ("/usr/share/beifahrer/city_list", "r"); + if (list_file == null) + return false; + + city_list = new List (); + string line = list_file.read_line (); + while (line != null) { + var split_line = line.split ("\t"); + if (split_line.length < 2) + continue; + int number = split_line[0].to_int (); + weak string name = split_line[1]; + + var city = new City (number, name); + if (split_line.length >= 4) { + city.latitude = split_line[2].to_double (); + city.longitude = split_line[3].to_double (); + } + if (split_line.length >= 8) { + city.north = split_line[4].to_double (); + city.south = split_line[5].to_double (); + city.east = split_line[6].to_double (); + city.west = split_line[7].to_double (); + } + city_list.append ((owned) city); + + line = list_file.read_line (); + } + + return true; + } + + public unowned List? get_city_list () { + if (city_list != null) + return city_list; + + if (load_city_list ()) + return city_list; + + var doc = get_html_document (BASE_URI); + if (doc == null) { + print ("Error: parsing failed"); + print ("%s\n", this.response); + return null; + } + + var form = search_tag_by_id (doc->children, "form", "search_national_form"); + if (form == null) { + print ("Error: does not contain search_national_form"); + print ("%s\n", this.response); + return null; + } + + var select = search_tag_by_name (form->children, "select", "city_from"); + if (select == null) { + print ("Error: does not contain city_from"); + print ("%s\n", this.response); + return null; + } + + city_list = new List (); + for (var n = select->children; n != null; n = n->next) { + if (n->name == "option" && n->children != null && n->children->name == "text") { + int number = n->get_prop ("value").to_int (); + // Skip 0 "Alle St.dte" + if (number == 0) + continue; + var city = new City(number, + n->children->content); + city_list.append ((owned) city); + } + } + + // TODO: get coordinates + + save_city_list (); + + return city_list; + } + + private int get_city_number (string name) { + foreach (unowned City city in city_list) { + if (city.name == name) + return city.number; + } + return 0; + } + + public unowned City find_nearest_city (double latitude, double longitude) { + unowned City result = null; + double min_distance = 0.0; + bool in_result = false; + + foreach (unowned City city in city_list) { + double lat = latitude - city.latitude; + double lng = longitude - city.longitude; + double distance = lat * lat + lng * lng; + bool in_city = ((city.south <= latitude <= city.north) && + (city.west <= longitude <= city.east)); + + if ((result == null) || + (in_city && !in_result) || + (in_city && in_result && distance / city.bb_area () < min_distance / result.bb_area ()) || + (!in_city && !in_result && distance < min_distance)) { + result = city; + min_distance = distance; + in_result = in_city; + } + } + + return result; + } + + public List? get_lift_list (string city_from, string city_to, Date date) { + if (city_list == null) + get_city_list (); + + int num_from = get_city_number (city_from); + if (num_from == 0) { + stderr.printf ("Unknown city: %s\n", city_to); + return null; + } + + int num_to = get_city_number (city_to); + if (num_to == 0) { + stderr.printf ("Unknown city: %s\n", city_to); + return null; + } + + string url = BASE_URI + "/mitfahrclub/%s/%s/b.html".printf ( + city_from, + city_to + ); + + url += "?type=b&city_from=%d&radius_from=0&city_to=%d&radius_to=0".printf ( + num_from, + num_to + ); + + int tolerance = 0; + + url += "&date=date&day=%d&month=%d&year=%d&tolerance=%d&smoking=&avg_speed=&".printf ( + date.get_day (), + date.get_month (), + date.get_year (), + tolerance + ); + + var doc = get_html_document (url); + if (doc == null) { + print ("Error: parsing failed"); + print ("%s\n", this.response); + return null; + } + + var table = search_tag_by_class (doc->children, "table", "list p_15"); + if (table == null) { + print ("Error: does not contain list p_15 table"); + print ("%s\n", this.response); + return null; + } + + var list = new List (); + for (var n = table->children; n != null; n = n->next) { + if (n->name == "tr") { + var lift = parse_lift_row (n->children); + if (lift.city_from != null) // Skip the title row + list.append ((owned) lift); + } + } + + // Error message? + var div = table->next; + if (div != null && div->get_prop ("class") == "error-message") { + if (div->children == null || div->children->content == null || + !div->children->content.has_prefix ("Es sind leider noch keine Einträge vorhanden.")) { + stderr.printf ("Got an unknown error message!\n"); + if (div->children != null && div->children->content != null) + stderr.printf ("\"%s\"\n", div->children->content); + } + } + + return list; + } + + Lift parse_lift_row (Xml.Node* node) { + var lift = new Lift (); + int i = 0; + for (var n = node; n != null; n = n->next) { + if (n->name == "td") { + var n2 = n->children; + if (n2 != null) { + if (n2->name == "a") { + var href = n2->get_prop ("href"); + if (href != null && lift.href == null) + lift.href = href; + var n3 = n2->children; + while (n3 != null) { + if (n3->name == "text") + switch (i) { + case 0: + lift.city_from = n3->content; + break; + case 1: + lift.city_to = n3->content; + break; + case 2: + lift.date = n3->content; + break; + case 3: + lift.time = n3->content; + break; + case 4: + lift.places = n3->content.to_int (); + break; + case 5: + lift.price = n3->content; + break; + default: + print ("TEXT:%s\n", n3->content); + break; + } + if (n3->name == "span") { + string class = n3->get_prop ("class"); + if (class == "icon_smoker") + lift.flags |= LiftFlags.SMOKER; + else if (class == "icon_non_smoker") + lift.flags |= LiftFlags.NON_SMOKER; + else if (class == "icon_adac") + lift.flags |= LiftFlags.ADAC_MEMBER; + else if (class == "icon_women") + lift.flags |= LiftFlags.WOMEN_ONLY; + else if (class != null) + print ("SPAN %s\n", class); + } + n3 = n3->next; + } + } + } + i++; + } + } + + return lift; + } + + public Lift? get_lift_details (string lift_url) { + var lift = new Lift (); + lift.href = lift_url; + if (update_lift_details (lift)) + return lift; + else + return null; + } + + public bool update_lift_details (Lift lift) { + string url = BASE_URI + lift.href; + + var doc = get_html_document (url); + if (doc == null) { + print ("Error: parsing failed"); + print ("%s\n", this.response); + return false; + } + + var table = search_tag_by_class (doc->children, "table", "lift"); + if (table == null) { + print ("Error: does not contain lift table"); + print ("%s\n", this.response); + return false; + } + + for (var n = table->children; n != null; n = n->next) { + if (n->name == "tr") { + var n2 = n->children; + if (n2 == null || n2->name != "td" || + n2->children == null || n2->children->name != "text") + continue; + + string text = n2->children->content; + + if (text != "Strecke & Infos" && text != " " && !text.has_prefix ("\xc2\xa0") && + text != "Datum" && + text != "Freie Pl\xc3\xa4tze" && + text != "Name" && + text != "Handy" && + text != "Telefon" && + text != "Telefon 2" && + text != "E-Mail 1" && + text != "Details" && + text != "Beschreibung") + continue; + + n2 = n2->next; + if (n2 == null) + continue; + + // Skip text between td nodes + if (n2->name == "text") + n2 = n2->next; + + if (n2 == null || n2->name != "td" || n2->children == null) + continue; + + if (n2->children->name == "img") { + // FIXME: email image + // n2->children->get_prop ("src")) + continue; + } + + if (n2->children->name == "div" && text == "Beschreibung") { + var n3 = n2->children->children; + lift.description = ""; + while (n3 != null) { + if (n3->name == "text") + lift.description += n3->content.strip () + "\n"; + n3 = n3->next; + } + continue; + } else if (n2->children->name != "text") { + continue; + } + + var text1 = n2->children->content.strip (); + + if (text == "Datum") + lift.date = text1; + else if (text == "Freie Pl\xc3\xa4tze") + lift.places = text1.to_int (); + else if (text == "Name") + lift.name = text1; + else if (text == "Handy") + lift.cell = text1; + else if (text == "Telefon") + lift.phone = text1; + else if (text == "Telefon 2") + lift.phone2 = text1; + else if (text == "E-Mail 1") + lift.email = text1; + else if (text != "Strecke & Infos" && text != " " && + !text.has_prefix ("\xc2\xa0") && text != "Datum" && + text != "Details") + continue; + + n2 = n2->next; + if (n2 == null) + continue; + + // Skip text between td nodes + if (n2->name == "text") + n2 = n2->next; + + if (n2 == null || n2->name != "td" || + n2->children == null) + continue; + + if (n2->children->name == "span" && + n2->children->get_prop ("class") == "icon_non_smoker") { + lift.flags |= LiftFlags.NON_SMOKER; + continue; + } else if (n2->children->name == "span" && + n2->children->get_prop ("class") == "icon_smoker") { + lift.flags |= LiftFlags.SMOKER; + continue; + } else if (n2->children->name != "text") + continue; + + var text2 = n2->children->content.strip (); + + if (text1 == "von") + lift.city_from = text2; + else if (text1.has_prefix ("\xc3\xbc")) + lift.city_via.append (text2); + else if (text1 == "nach") + lift.city_to = text2; + else if (text1 == "Datum") + lift.date = text2; + else if (text1 == "Uhrzeit") + lift.time = text2; + else if (text1 == "Raucher") + print ("Raucher: %s\n", text2); + else if (text1 == "Fahrpreis") + lift.price = text2; + else if (text1 == "ADAC-Mitglied" && text2 != "nein") + lift.flags |= LiftFlags.ADAC_MEMBER; + } + } + + // The paragraph after the table contains the date of last modification + var p = table->next; + for (var n = p->children; n != null; n = n->next) { + if (n->name != "text") + continue; + + var s = n->content.strip (); + if (s.has_prefix ("Letztmalig aktualisiert am ")) + lift.modified = s.offset (27).dup (); // "Do 15.04.2010 20:32" + } + + return true; + } + + Xml.Node* search_tag_by_property (Xml.Node* node, string tag, string prop, string val) requires (node != null) { + for (var n = node; n != null; n = n->next) { + if (n->name == tag && n->get_prop (prop) == val) + return n; + if (n->children != null) { + var found = search_tag_by_property (n->children, tag, prop, val); + if (found != null) + return found; + } + } + return null; + } + + Xml.Node* search_tag_by_id (Xml.Node* node, string tag, string id) requires (node != null) { + return search_tag_by_property (node, tag, "id", id); + } + + Xml.Node* search_tag_by_name (Xml.Node* node, string tag, string name) requires (node != null) { + return search_tag_by_property (node, tag, "name", name); + } + + Xml.Node* search_tag_by_class (Xml.Node* node, string tag, string @class) requires (node != null) { + return search_tag_by_property (node, tag, "class", @class); + } +} diff --git a/src/beifahrer-cli.vala b/src/beifahrer-cli.vala new file mode 100644 index 0000000..b7e118c --- /dev/null +++ b/src/beifahrer-cli.vala @@ -0,0 +1,87 @@ +/* This file is part of Beifahrer. + * + * Copyright (C) 2010 Philipp Zabel + * + * Beifahrer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Beifahrer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Beifahrer. If not, see . + */ + +static int main (string[] args) { + var result = Curl.global_init (Curl.GLOBAL_DEFAULT); + if (result != Curl.Code.OK) + return 1; + + if (args.length < 3) { + print ("usage: beifahrer-cli [date]\n"); + print ("or: beifahrer-cli details \n"); + return 1; + } + + var adac = new AdacMitfahrclub (); + + if (args[1] == "details") { + var lift = adac.get_lift_details (args[2]); + + print ("%s\t%s\t%s\t%s\t%d\t%s\t", lift.city_from, lift.city_to, lift.date, lift.time, lift.places, lift.price); + if (LiftFlags.SMOKER in lift.flags) + print ("smoker "); + else if (LiftFlags.NON_SMOKER in lift.flags) + print ("non_smoker "); + if (LiftFlags.ADAC_MEMBER in lift.flags) + print ("adac "); + if (LiftFlags.WOMEN_ONLY in lift.flags) + print ("women "); + print ("\n"); + foreach (string via in lift.city_via) { + print ("\tvia %s\n", via); + } + + print ("Driver: %s (%s)\n", lift.name, lift.phone); + print ("Description:\n%s\n", lift.description); + + return 0; + } + + string city_from = args[1]; + string city_to = args[2]; + + var date = Date (); + if (args.length > 3) { + date.set_parse (args[3]); + } else { + var now = TimeVal (); + date.set_time_val (now); + } + + print ("Lifts from %s to %s on %d.%d.%d\n", city_from, city_to, + date.get_day (), date.get_month (), date.get_year ()); + + var lift_list = adac.get_lift_list (city_from, city_to, date); + foreach (Lift lift in lift_list) { + print ("%s\t%s\t%s\t%s\t%d\t%s\t", lift.city_from, lift.city_to, lift.date, lift.time, lift.places, lift.price); + if (LiftFlags.SMOKER in lift.flags) + print ("smoker "); + else if (LiftFlags.NON_SMOKER in lift.flags) + print ("non_smoker "); + if (LiftFlags.ADAC_MEMBER in lift.flags) + print ("adac "); + if (LiftFlags.WOMEN_ONLY in lift.flags) + print ("women "); + print ("\n"); + print ("%s\n", lift.href); + } + + Curl.global_cleanup (); + + return 0; +} diff --git a/src/beifahrer.vala b/src/beifahrer.vala new file mode 100644 index 0000000..80aaace --- /dev/null +++ b/src/beifahrer.vala @@ -0,0 +1,72 @@ +/* This file is part of Beifahrer. + * + * Copyright (C) 2010 Philipp Zabel + * + * Beifahrer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Beifahrer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Beifahrer. If not, see . + */ + +using Hildon; + +public class BeifahrerProgram : Hildon.Program { + public const string BEIFAHRER_SERVICE = "org.maemo.beifahrer"; + + QueryWindow window; + public static Orientation orientation; + + construct { + Environment.set_application_name ("Beifahrer"); + + window = new QueryWindow (); + window.destroy.connect (Gtk.main_quit); + + orientation = new Orientation (); + orientation.changed.connect (on_orientation_changed); + + add_window (window); + } + + private void on_orientation_changed () { + if (orientation.portrait) { + Hildon.gtk_window_set_portrait_flags (window, PortraitFlags.REQUEST); + } else { + Hildon.gtk_window_set_portrait_flags (window, PortraitFlags.SUPPORT); + } + } + + static int main (string[] args) { + Gtk.init (ref args); + + Intl.setlocale (LocaleCategory.ALL, ""); + Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR); + Intl.textdomain (Config.GETTEXT_PACKAGE); + + var result = Curl.global_init (Curl.GLOBAL_DEFAULT); + if (result != Curl.Code.OK) + return 1; + + var osso_context = new Osso.Context (BEIFAHRER_SERVICE, Config.VERSION, true, null); + if (osso_context == null) { + return Osso.Status.ERROR; + } + + var app = new BeifahrerProgram (); + + Gtk.main (); + + Curl.global_cleanup (); + + return 0; + } +} + diff --git a/src/lift-detail-window.vala b/src/lift-detail-window.vala new file mode 100644 index 0000000..3a0d6a1 --- /dev/null +++ b/src/lift-detail-window.vala @@ -0,0 +1,208 @@ +/* This file is part of Beifahrer. + * + * Copyright (C) 2010 Philipp Zabel + * + * Beifahrer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Beifahrer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Beifahrer. If not, see . + */ + +using Gtk; +using Hildon; + +public class LiftDetailWindow : StackableWindow { + private const string BROWSER_SERVICE = "com.nokia.osso_browser"; + private const string BROWSER_PATH = "/com/nokia/osso_browser"; + private const string BROWSER_IF = "com.nokia.osso_browser"; + + private const string CALENDAR_SERVICE = "com.nokia.calendar"; + private const string CALENDAR_PATH = "/com/nokia/calendar"; + private const string CALENDAR_IF = "com.nokia.calendar"; + + AdacMitfahrclub adac; + Lift lift; + OssoABook.Button button_route; + OssoABook.Button button_calendar; + Label label_driver; + OssoABook.Button button_phone; + Image image_smoke; + Label label; + + public LiftDetailWindow (AdacMitfahrclub _adac, Lift _lift) { + adac = _adac; + lift = _lift; + + update_lift_details (); + } + + construct { + set_title ("Beifahrer"); + + var menu = new AppMenu (); + var add_contact = new Gtk.Button.with_label (_("New contact")); + add_contact.show (); + menu.append (add_contact); + var goto_website = new Gtk.Button.with_label (_("Show website")); + goto_website.show (); + menu.append (goto_website); + set_main_menu (menu); + + var pannable = new PannableArea (); + pannable.hscrollbar_policy = PolicyType.NEVER; + + var vbox = new VBox (false, 0); + + button_route = new OssoABook.Button (SizeType.FINGER_HEIGHT); + button_route.style = OssoABook.ButtonStyle.LABEL; + + var table = new Table (2, 4, false); + + button_calendar = new OssoABook.Button (SizeType.FINGER_HEIGHT); + button_calendar.set_icon_name ("general_calendar"); + button_calendar.set_icon_visible (true); + button_calendar.style = OssoABook.ButtonStyle.LABEL; + button_calendar.title = _("Departure time"); + + label_driver = new Label (_("Driver:")); + label_driver.set_alignment (0.0f, 0.5f); + + button_phone = new OssoABook.Button (SizeType.FINGER_HEIGHT); + button_phone.set_icon_name ("general_call"); + button_phone.set_icon_visible (true); + button_phone.title = _("Phone"); + + image_smoke = new Image (); + + label = new Label (""); + label.set_alignment (0.0f, 0.5f); + label.set_line_wrap (true); + + table.attach (button_calendar, 1, 2, 0, 1, AttachOptions.FILL | AttachOptions.EXPAND, AttachOptions.FILL, 0, 0); + table.attach (label_driver, 0, 1, 1, 2, AttachOptions.FILL | AttachOptions.EXPAND, AttachOptions.FILL, MARGIN_DEFAULT, 0); + table.attach (button_phone, 1, 2, 1, 2, AttachOptions.FILL | AttachOptions.EXPAND, AttachOptions.FILL, 0, 0); + table.attach (image_smoke, 1, 2, 2, 3, AttachOptions.FILL | AttachOptions.EXPAND, AttachOptions.FILL, 0, 0); + table.attach (label, 0, 2, 3, 4, AttachOptions.FILL | AttachOptions.EXPAND, AttachOptions.FILL, MARGIN_DEFAULT, 0); + + vbox.pack_start (button_route, true, true, 0); + vbox.pack_start (table, true, true, 0); + + pannable.add_with_viewport (vbox); + + add (pannable); + + add_contact.clicked.connect (on_add_contact_clicked); + goto_website.clicked.connect (on_goto_website_clicked); + button_phone.clicked.connect (on_button_phone_clicked); + } + + public void update_lift_details () { + button_route.title = _("From %s to %s").printf (lift.city_from, lift.city_to); + if (lift.city_via.length () > 0) { + string route = _("via "); + foreach (string via in lift.city_via) + route += via + " "; + button_route.value = route; + } else { + button_route.value = ""; + } + + button_calendar.value = "%s, %s".printf (lift.date, lift.time); + + label_driver.set_text (_("Driver: ") + lift.name); + if (lift.cell != null) { + button_phone.title = _("Cell"); + button_phone.value = E.normalize_phone_number (lift.cell); + } else if (lift.phone != null) { + button_phone.title = _("Phone"); + button_phone.value = E.normalize_phone_number (lift.phone); + } + + string lift_text = _("Free places: %d\n").printf (lift.places); + lift_text += (lift.price != null) ? _("Price: %s\n").printf (lift.price) : _("(no price given)\n"); + if (LiftFlags.SMOKER in lift.flags) try { + var pixbuf = IconTheme.get_default ().load_icon ("beifahrer_smoker", 32, IconLookupFlags.NO_SVG); + image_smoke.pixbuf = pixbuf; + lift_text += _("smoker "); + } catch (Error e) { + } else if (LiftFlags.NON_SMOKER in lift.flags) try { + var pixbuf = IconTheme.get_default ().load_icon ("beifahrer_non_smoker", 32, IconLookupFlags.NO_SVG); + image_smoke.pixbuf = pixbuf; + lift_text += _("non-smoker "); + } catch (Error e) { + } + if (LiftFlags.ADAC_MEMBER in lift.flags) + lift_text += _("ADAC member "); + if (LiftFlags.WOMEN_ONLY in lift.flags) + lift_text += _("only women "); + lift_text += "\n\n" + lift.description; + + if (lift.modified != null) + lift_text += _("\nLast changed: ") + lift.modified; + + label.set_text (lift_text); + } + + void on_button_phone_clicked () { + var uri = "tel://"; + if (lift.cell != null) + uri += E.normalize_phone_number (lift.cell); + else if (lift.phone != null) + uri += E.normalize_phone_number (lift.phone); + try { + var action = URIAction.get_default_action_by_uri (uri); + if (action != null) { + action.open (uri); + } else { + + Banner.show_information (this, null, _("Couldn't call %s URI").printf (uri)); + } + } catch (Error e) { + if (e is URIError) { + Banner.show_information (this, null, _("Error: %s").printf (e.message)); + } + } + } + + void on_add_contact_clicked () { + var contact = new OssoABook.Contact (); + var attr_fn = new E.VCardAttribute (null, E.EVC_FN); + contact.add_attribute_with_value ((owned) attr_fn, lift.name); + if (lift.cell != null) { + var attr_cell = new E.VCardAttribute (null, E.EVC_TEL); + var param = new E.VCardAttributeParam (E.EVC_TYPE); + attr_cell.add_param_with_value ((owned) param, "CELL"); + contact.add_attribute_with_value ((owned) attr_cell, E.normalize_phone_number (lift.cell)); + } + if (lift.phone != null) { + var attr_phone = new E.VCardAttribute (null, E.EVC_TEL); + var param = new E.VCardAttributeParam (E.EVC_TYPE); + attr_phone.add_param_with_value ((owned) param, "VOICE"); + contact.add_attribute_with_value ((owned) attr_phone, E.normalize_phone_number (lift.phone)); + } + var dialog = new OssoABook.TemporaryContactDialog.with_contact (this, contact); + dialog.show (); + } + + void on_goto_website_clicked () { + var url = "http://mitfahrclub.adac.de" + lift.href; + + try { + var conn = DBus.Bus.get (DBus.BusType.SESSION); + + dynamic DBus.Object browser = conn.get_object (BROWSER_SERVICE, BROWSER_PATH, BROWSER_IF); + browser.open_new_window (url, false); + } catch (Error e) { + stderr.printf ("Error: %s\n", e.message); + Banner.show_information (this, null, _("Failed to open browser.")); + } + } +} diff --git a/src/lift-list-window.vala b/src/lift-list-window.vala new file mode 100644 index 0000000..ead447a --- /dev/null +++ b/src/lift-list-window.vala @@ -0,0 +1,154 @@ +/* This file is part of Beifahrer. + * + * Copyright (C) 2010 Philipp Zabel + * + * Beifahrer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Beifahrer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Beifahrer. If not, see . + */ + +using Gtk; +using Hildon; + +public class LiftListWindow : StackableWindow { + AdacMitfahrclub adac; + ListStore store; + TreeView tree; + TreeViewColumn route_column; + Label no_lifts; + + public LiftListWindow (AdacMitfahrclub _adac) { + adac = _adac; + } + + construct { + set_title ("Beifahrer"); + + store = new ListStore (6, typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (Lift)); + + tree = (TreeView) Hildon.gtk_tree_view_new_with_model (UIMode.NORMAL, store); + Hildon.gtk_widget_set_theme_size (tree, SizeType.FINGER_HEIGHT); + + tree.set_headers_visible (false); + tree.set_rules_hint (true); + + // Tree selection object + var selection = tree.get_selection (); + selection.set_mode (SelectionMode.SINGLE); + + // Source and destination column + route_column = new TreeViewColumn.with_attributes ("Route", new CellRendererText (), "text", 0); + route_column.set_reorderable (false); + route_column.set_sizing (TreeViewColumnSizing.AUTOSIZE); + route_column.set_expand (true); + tree.append_column (route_column); + + // Date and time column + var datetime_column = new TreeViewColumn.with_attributes ("DateTime", new CellRendererText (), "text", 1); + datetime_column.set_reorderable (false); + datetime_column.set_sizing (TreeViewColumnSizing.AUTOSIZE); + datetime_column.set_expand (true); + tree.append_column (datetime_column); + + // Free places column + var places_column = new TreeViewColumn.with_attributes ("Places", new CellRendererText (), "text", 2); + places_column.set_reorderable (false); + places_column.set_sizing (TreeViewColumnSizing.AUTOSIZE); + places_column.set_expand (true); + tree.append_column (places_column); + + // Price column + var price_column = new TreeViewColumn.with_attributes ("Price", new CellRendererText (), "text", 3); + price_column.set_reorderable (false); + price_column.set_sizing (TreeViewColumnSizing.AUTOSIZE); + price_column.set_expand (true); + tree.append_column (price_column); + + // Smoker/Non-smoker column + var smoke_column = new TreeViewColumn.with_attributes ("Smoker", new CellRendererPixbuf (), "icon-name", 4); + smoke_column.set_reorderable (false); + smoke_column.set_sizing (TreeViewColumnSizing.AUTOSIZE); + smoke_column.set_expand (false); + tree.append_column (smoke_column); + + var pannable = new PannableArea (); + pannable.add (tree); + + no_lifts = new Label (_("No lifts")); + Hildon.helper_set_logical_font (no_lifts, "LargeSystemFont"); + Hildon.helper_set_logical_color (no_lifts, RcFlags.FG, StateType.NORMAL, "SecondaryTextColor"); + no_lifts.set_size_request (-1, 6 * 70); + no_lifts.set_alignment ((float) 0.5, (float) 0.42); + + var vbox = new VBox (false, 0); + vbox.pack_start (pannable, true, true, 0); + vbox.pack_start (no_lifts, false, false, 0); + + add (vbox); + + tree.row_activated.connect (this.on_row_activated); + BeifahrerProgram.orientation.changed.connect (this.on_orientation_changed); + } + + public void find_lifts (string city_from, string city_to, Date date) { + set_title ("%s - %s".printf (city_from, city_to)); + + var lift_list = adac.get_lift_list (city_from, city_to, date); + foreach (Lift lift in lift_list) { + TreeIter iter; + string icon_name = null; + if (LiftFlags.SMOKER in lift.flags) + icon_name = "beifahrer_smoker"; + else if (LiftFlags.NON_SMOKER in lift.flags) + icon_name = "beifahrer_non_smoker"; + store.insert_with_values (out iter, -1, 0, lift.city_from + " - " + lift.city_to, + 1, (lift.time != null) ? (lift.date + ", " + lift.time) : lift.date, + 2, _("%d pl.").printf (lift.places), + 3, lift.price, + 4, icon_name, + 5, lift); + // (LiftFlags.WOMEN_ONLY,ADAC_MEMBER in lift.flags) + } + if (lift_list.length () > 0) + no_lifts.hide (); + } + + private void on_row_activated (TreeView tree, TreePath /*_*/path, TreeViewColumn column) { + TreeModel model = tree.model; + TreeIter iter; + Lift lift; + + if (model.get_iter (out iter, path)) { + model.get (iter, 5, out lift); + + if (lift.description == null) + Hildon.gtk_window_set_progress_indicator (this, 1); + var window = new LiftDetailWindow (adac, lift); + window.show_all (); + + // TODO - this should be async + if (lift.description == null) { + adac.update_lift_details (lift); + window.update_lift_details (); + Hildon.gtk_window_set_progress_indicator (this, 0); + } + } + } + + private void on_orientation_changed () { + if (BeifahrerProgram.orientation.portrait) { + route_column.set_visible (false); + } else { + route_column.set_visible (true); + } + } +} diff --git a/src/orientation.vala b/src/orientation.vala new file mode 100644 index 0000000..c708d71 --- /dev/null +++ b/src/orientation.vala @@ -0,0 +1,81 @@ +/* This file is part of Beifahrer. + * + * Copyright (C) 2010 Philipp Zabel + * + * Beifahrer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Beifahrer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Beifahrer. If not, see . + */ + +public class Orientation : Object { + private const string MCE_SERVICE = "com.nokia.mce"; + private const string MCE_REQUEST_PATH = "/com/nokia/mce/request"; + private const string MCE_SIGNAL_PATH = "/com/nokia/mce/signal"; + private const string MCE_REQUEST_IF = "com.nokia.mce.request"; + private const string MCE_SIGNAL_IF = "com.nokia.mce.signal"; + + private const string HAL_SERVICE = "org.freedesktop.Hal"; + private const string HAL_SLIDE_PATH = "/org/freedesktop/Hal/devices/platform_slide"; + private const string HAL_DEVICE_IF = "org.freedesktop.Hal.Device"; + + public bool portrait; + public bool keyboard; + private DBus.Connection conn; + private dynamic DBus.Object mce_request; + private dynamic DBus.Object mce_signal; + private dynamic DBus.Object hal_slide; + + public signal void changed (); + + construct { + portrait = false; + try { + conn = DBus.Bus.get (DBus.BusType.SYSTEM); + + mce_request = conn.get_object (MCE_SERVICE, MCE_REQUEST_PATH, MCE_REQUEST_IF); + mce_enable_accelerometer (); + + mce_signal = conn.get_object (MCE_SERVICE, MCE_SIGNAL_PATH, MCE_SIGNAL_IF); + mce_signal.sig_device_orientation_ind += on_mce_orientation_changed; + + hal_slide = conn.get_object (HAL_SERVICE, HAL_SLIDE_PATH, HAL_DEVICE_IF); + hal_slide.Condition += on_hal_slide_condition; + bool closed = hal_slide.GetPropertyBoolean ("button.state.value"); + keyboard = !closed; + } catch (Error e) { + stderr.printf ("Error: %s\n", e.message); + } + } + + private void mce_enable_accelerometer () { + string orientation, stand, face; + int x, y, z; + + mce_request.req_accelerometer_enable (out orientation, out stand, out face, out x, out y, out z); + on_mce_orientation_changed (mce_request, orientation, stand, face, x, y, z); + } + + private void on_mce_orientation_changed (dynamic DBus.Object mce, string orientation, + string stand, string face, int x, int y , int z) { + portrait = (orientation == "portrait" & !keyboard); + changed (); + } + + private void on_hal_slide_condition (dynamic DBus.Object slide, string cond_name, string cond_details) { + if (cond_name == "ButtonPressed" && cond_details == "cover") { + bool closed = hal_slide.GetPropertyBoolean ("button.state.value"); + keyboard = !closed; + portrait &= closed; + } + changed (); + } +} diff --git a/src/query-window.vala b/src/query-window.vala new file mode 100644 index 0000000..0c674a2 --- /dev/null +++ b/src/query-window.vala @@ -0,0 +1,261 @@ +/* This file is part of Beifahrer. + * + * Copyright (C) 2010 Philipp Zabel + * + * Beifahrer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Beifahrer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Beifahrer. If not, see . + */ + +using Gtk; +using Hildon; + +public class QueryWindow : StackableWindow { + public const string GCONF_KEY_ARRIVAL = "/apps/beifahrer/arrival"; + public const string GCONF_KEY_DEPARTURE = "/apps/beifahrer/departure"; + public const string GCONF_KEY_USE_LOCATION = "/apps/beifahrer/use_location"; + + AdacMitfahrclub adac; + TouchSelector city_from_selector; + TouchSelector city_to_selector; + TouchSelector umkreis_from_selector; + TouchSelector umkreis_to_selector; + DateButton date; + TouchSelector tolerance_selector; + Location.GPSDControl control; + Location.GPSDevice device; + GConf.Client gconf; + bool use_location = true; + bool want_location; + + construct { + set_title ("Beifahrer"); + + var menu = new AppMenu (); + var settings = new Gtk.Button.with_label (_("Settings")); + settings.show (); + menu.append (settings); + set_main_menu (menu); + + adac = new AdacMitfahrclub (); + gconf = GConf.Client.get_default (); + + city_from_selector = new TouchSelectorEntry.text (); + city_to_selector = new TouchSelectorEntry.text (); + foreach (unowned City city in adac.get_city_list ()) { + city_from_selector.append_text (city.name); + city_to_selector.append_text (city.name); + } + + umkreis_from_selector = new TouchSelector.text (); + umkreis_to_selector = new TouchSelector.text (); + for (int km = 0; km <= 50; km += 10) { + umkreis_from_selector.append_text ("%d km".printf (km)); + umkreis_to_selector.append_text ("%d km".printf (km)); + } + + tolerance_selector = new TouchSelector.text (); + for (int days = 0; days <= 4; days += 1) + tolerance_selector.append_text (_("+/- %d days").printf (days)); + + var table = new Table (4, 2, false); + + var button = new PickerButton (SizeType.FINGER_HEIGHT, + ButtonArrangement.VERTICAL); + button.set_selector (city_from_selector); + button.set_title (_("Departure")); + button.set_value (_("Please select")); + button.set_alignment (0.0f, 0.0f, 0.5f, 0.5f); + table.attach (button, 0, 1, 0, 1, AttachOptions.FILL | AttachOptions.EXPAND, AttachOptions.FILL, 0, 0); + + try { + button.set_active (gconf.get_int ("/apps/beifahrer/departure")); + } catch (Error e) { + } + + button = new PickerButton (SizeType.FINGER_HEIGHT, + ButtonArrangement.VERTICAL); + button.set_selector (umkreis_from_selector); + button.set_title (_("Vicinity")); + button.set_value ("0 km"); + button.set_alignment (0.0f, 0.0f, 0.5f, 0.5f); + table.attach (button, 1, 2, 0, 1, AttachOptions.FILL, AttachOptions.FILL, 0, 0); + + button = new PickerButton (SizeType.FINGER_HEIGHT, + ButtonArrangement.VERTICAL); + button.set_selector (city_to_selector); + button.set_title (_("Arrival")); + button.set_value (_("Please select")); + button.set_alignment (0.0f, 0.0f, 0.5f, 0.5f); + table.attach (button, 0, 1, 1, 2, AttachOptions.FILL | AttachOptions.EXPAND, AttachOptions.FILL, 0, 0); + + try { + button.set_active (gconf.get_int ("/apps/beifahrer/arrival")); + } catch (Error e) { + } + + button = new PickerButton (SizeType.FINGER_HEIGHT, + ButtonArrangement.VERTICAL); + button.set_selector (umkreis_to_selector); + button.set_title (_("Vicinity")); + button.set_value ("0 km"); + button.set_alignment (0.0f, 0.0f, 0.5f, 0.5f); + table.attach (button, 1, 2, 1, 2, AttachOptions.FILL, AttachOptions.FILL, 0, 0); + + date = new DateButton (SizeType.FINGER_HEIGHT, + ButtonArrangement.VERTICAL); + date.set_alignment (0.0f, 0.0f, 0.5f, 0.5f); + table.attach (date, 0, 1, 2, 3, AttachOptions.FILL | AttachOptions.EXPAND, AttachOptions.FILL, 0, 0); + + button = new PickerButton (SizeType.FINGER_HEIGHT, + ButtonArrangement.VERTICAL); + button.set_selector (tolerance_selector); + button.set_title (_("Tolerance")); + button.set_value (_("+/- 0 days")); + button.set_alignment (0.0f, 0.0f, 0.5f, 0.5f); + table.attach (button, 1, 2, 2, 3, AttachOptions.FILL, AttachOptions.FILL, 0, 0); + + var search_button = new Gtk.Button.with_label (_("Search")); + Hildon.gtk_widget_set_theme_size (search_button, SizeType.FINGER_HEIGHT); + table.attach (search_button, 0, 2, 3, 4, AttachOptions.FILL, AttachOptions.FILL, 0, 0); + + add (table); + + search_button.clicked.connect (on_search_button_clicked); + settings.clicked.connect (on_settings_clicked); + + show_all (); + + control = Location.GPSDControl.get_default (); + control.preferred_method = Location.METHOD_CWP | Location.METHOD_ACWP; + control.preferred_interval = Location.GPSDControlInterval.@1S; + control.error.connect (() => { print ("control error\n"); }); + control.error_verbose.connect ((e) => { + switch (e) { + case Location.GPSDControlError.USER_REJECTED_DIALOG: + print ("\tuser rejected dialog\n"); + break; + case Location.GPSDControlError.USER_REJECTED_SETTINGS: + print ("\tuser rejected settings\n"); + break; + case Location.GPSDControlError.BT_GPS_NOT_AVAILABLE: + print ("\tbt gps not available\n"); + break; + case Location.GPSDControlError.METHOD_NOT_ALLOWED_IN_OFFLINE_MODE: + print ("\tmethod not allowed in offline mode\n"); + break; + case Location.GPSDControlError.SYSTEM: + Banner.show_information (this, null, _("No GPS available!")); + break; + } + }); + control.gpsd_running.connect (() => { print ("control running\n"); }); + control.gpsd_stopped.connect (() => { print ("control stopped\n"); }); + + try { + use_location = gconf.get_bool (GCONF_KEY_USE_LOCATION); + } catch (Error e) { + } + want_location = use_location; + if (want_location) + control.start (); + + device = (Location.GPSDevice) GLib.Object.@new (typeof (Location.GPSDevice), null); + device.changed.connect (on_location_changed); + device.connected.connect (() => { print ("device connected\n"); }); + device.disconnected.connect (() => { print ("device disconnected\n"); }); + + // In case the device already has a fix: + on_location_changed (); + } + + void on_location_changed () requires (device.fix != null) { + if (!want_location) + return; + + if (Location.GPS_DEVICE_LATLONG_SET in (int) device.fix.fields) { + print ("fix: lat=%f, lon=%f\n", device.fix.latitude, device.fix.longitude); + + unowned City city = adac.find_nearest_city (device.fix.latitude, device.fix.longitude); + if (city != null) { + int n = adac.get_city_list ().index (city); + int n_from = city_from_selector.get_active (0); + int n_to = city_to_selector.get_active (0); + + print ("city(%d): %s (%d)\n", n, city.name, city.number); + + if (n != n_from) { + city_from_selector.set_active (0, n); + + // If we are at the previous point of arrival, prepare for return trip + if (n == n_to) + city_to_selector.set_active (0, n_from); + } + } + + control.stop (); + want_location = false; + } + } + + void on_search_button_clicked (Gtk.Button button) { + int n; + + n = city_from_selector.get_active (0); + if (n == -1) + return; + string city_from = adac.get_city_list ().nth_data (n).name; + try { + if (gconf.get_int (GCONF_KEY_DEPARTURE) != n) + gconf.set_int (GCONF_KEY_DEPARTURE, n); + } catch (Error e) { + } + + n = city_to_selector.get_active (0); + if (n == -1) + return; + string city_to = adac.get_city_list ().nth_data (n).name; + try { + if (gconf.get_int (GCONF_KEY_ARRIVAL) != n) + gconf.set_int (GCONF_KEY_ARRIVAL, n); + } catch (Error e) { + } + + uint year, month, day; + date.get_date (out year, out month, out day); + var date = Date (); + date.set_day ((DateDay) day); + date.set_month ((DateMonth) (month + DateMonth.JANUARY)); + date.set_year ((DateYear) year); + + Hildon.gtk_window_set_progress_indicator (this, 1); + var window = new LiftListWindow (adac); + window.show_all (); + window.find_lifts (city_from, city_to, date); + Hildon.gtk_window_set_progress_indicator (this, 0); + } + + void on_settings_clicked () { + var dialog = new SettingsDialog (this); + dialog.response.connect (on_settings_response); + dialog.show (); + } + + void on_settings_response (int response_id) { + bool old_use_location = use_location; + use_location = gconf.get_bool (GCONF_KEY_USE_LOCATION); + if (!old_use_location && use_location) { + want_location = true; + control.start (); + } + } +} diff --git a/src/settings-dialog.vala b/src/settings-dialog.vala new file mode 100644 index 0000000..c872455 --- /dev/null +++ b/src/settings-dialog.vala @@ -0,0 +1,57 @@ +/* This file is part of Beifahrer. + * + * Copyright (C) 2010 Philipp Zabel + * + * Beifahrer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Beifahrer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Beifahrer. If not, see . + */ + +using Gtk; +using Hildon; + +public class SettingsDialog : Gtk.Dialog { + public const string GCONF_KEY_USE_LOCATION = "/apps/beifahrer/use_location"; + + Hildon.CheckButton use_location; + GConf.Client gconf; + + public SettingsDialog (Gtk.Window window) { + set_title (_("Settings")); + set_transient_for (window); + + var vbox = (VBox) get_content_area (); + use_location = new Hildon.CheckButton (SizeType.FINGER_HEIGHT); + use_location.set_label (_("Determine point of departure automatically")); + vbox.pack_start (use_location, true, true, 0); + vbox.show_all (); + + add_button (_("Save"), ResponseType.APPLY); + + gconf = GConf.Client.get_default (); + try { + use_location.set_active (gconf.get_bool (GCONF_KEY_USE_LOCATION)); + } catch (Error e) { + use_location.set_active (true); + } + + response.connect (on_response); + } + + void on_response (int response_id) { + if (response_id == ResponseType.APPLY) try { + gconf.set_bool (GCONF_KEY_USE_LOCATION, use_location.get_active ()); + this.destroy (); + } catch (Error e) { + } + } +} diff --git a/vapi/hildon-1.deps b/vapi/hildon-1.deps new file mode 100644 index 0000000..2776206 --- /dev/null +++ b/vapi/hildon-1.deps @@ -0,0 +1,7 @@ +gtk+-2.0 +gio-2.0 +gdk-pixbuf-2.0 +gdk-2.0 +pango +atk +cairo diff --git a/vapi/hildon-1.vapi b/vapi/hildon-1.vapi new file mode 100644 index 0000000..26a4ac8 --- /dev/null +++ b/vapi/hildon-1.vapi @@ -0,0 +1,1205 @@ +/* hildon-1.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "Hildon", lower_case_cprefix = "hildon_")] +namespace Hildon { + [CCode (cheader_filename = "hildon/hildon.h")] + public class AnimationActor : Gtk.Window, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public AnimationActor (); + public void send_message (uint32 message_type, uint32 l0, uint32 l1, uint32 l2, uint32 l3, uint32 l4); + public void set_anchor (int x, int y); + public void set_anchor_from_gravity (uint gravity); + public void set_depth (int depth); + public void set_opacity (int opacity); + public void set_parent (Gtk.Window parent); + public void set_position (int x, int y); + public void set_position_full (int x, int y, int depth); + public void set_rotation (int axis, double degrees, int x, int y, int z); + public void set_rotationx (int axis, int32 degrees, int x, int y, int z); + public void set_scale (double x_scale, double y_scale); + public void set_scalex (int32 x_scale, int32 y_scale); + public void set_show (int show); + public void set_show_full (int show, int opacity); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class AppMenu : Gtk.Window, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public AppMenu (); + public void add_filter (Gtk.Button filter); + public void append (Gtk.Button item); + public unowned GLib.List get_filters (); + public unowned GLib.List get_items (); + public void insert (Gtk.Button item, int position); + public void popup (Gtk.Window parent_window); + public void prepend (Gtk.Button item); + public void reorder_child (Gtk.Button item, int position); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Banner : Gtk.Window, Atk.Implementor, Gtk.Buildable { + public void set_fraction (double fraction); + public void set_icon (string icon_name); + public void set_icon_from_file (string icon_file); + public void set_markup (string markup); + public void set_text (string text); + public void set_timeout (uint timeout); + public static unowned Gtk.Widget show_animation (Gtk.Widget? widget, string animation_name, string text); + public static unowned Gtk.Widget show_information (Gtk.Widget? widget, string? icon_name, string text); + public static unowned Gtk.Widget show_information_override_dnd (Gtk.Widget? widget, string text); + public static unowned Gtk.Widget show_information_with_markup (Gtk.Widget? widget, string? icon_name, string markup); + public static unowned Gtk.Widget show_informationf (Gtk.Widget? widget, string icon_name, string format); + public static unowned Gtk.Widget show_progress (Gtk.Widget? widget, Gtk.ProgressBar bar, string text); + [NoAccessorMethod] + public bool is_timed { get; construct; } + [NoAccessorMethod] + public Gtk.Window parent_window { owned get; construct; } + [NoAccessorMethod] + public uint timeout { get; construct; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class BreadCrumbTrail : Gtk.Container, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public BreadCrumbTrail (); + public void clear (); + public void pop (); + public void push (Hildon.BreadCrumb item, void* id, GLib.DestroyNotify destroy); + public void push_icon (string text, Gtk.Widget icon, void* id, GLib.DestroyNotify destroy); + public void push_text (string text, void* id, GLib.DestroyNotify destroy); + public virtual signal bool crumb_clicked (void* id); + public virtual signal void move_parent (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Button : Gtk.Button, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Button (Hildon.SizeType size, Hildon.ButtonArrangement arrangement); + public void add_image_size_group (Gtk.SizeGroup size_group); + public void add_size_groups (Gtk.SizeGroup title_size_group, Gtk.SizeGroup value_size_group, Gtk.SizeGroup image_size_group); + public void add_title_size_group (Gtk.SizeGroup size_group); + public void add_value_size_group (Gtk.SizeGroup size_group); + public unowned Gtk.Widget get_image (); + public Hildon.ButtonStyle get_style (); + public unowned string get_title (); + public unowned string get_value (); + public void set_alignment (float xalign, float yalign, float xscale, float yscale); + public void set_image (Gtk.Widget image); + public void set_image_alignment (float xalign, float yalign); + public void set_image_position (Gtk.PositionType position); + public void set_style (Hildon.ButtonStyle style); + public void set_text (string title, string value); + public void set_title (string title); + public void set_title_alignment (float xalign, float yalign); + public void set_value (string value); + public void set_value_alignment (float xalign, float yalign); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Button.with_text (Hildon.SizeType size, Hildon.ButtonArrangement arrangement, string title, string value); + public Hildon.ButtonArrangement arrangement { construct; } + public Hildon.SizeType size { construct; } + public Hildon.ButtonStyle style { get; set; } + public string title { get; set; } + public string value { get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Calendar : Gtk.Widget, Atk.Implementor, Gtk.Buildable { + [CCode (array_length = false)] + public weak int[] day_month; + public Hildon.CalendarDisplayOptions display_flags; + public int focus_col; + public int focus_row; + public weak Gdk.GC gc; + [CCode (array_length = false)] + public weak char[] grow_space; + public weak Gtk.Style header_style; + public int highlight_col; + public int highlight_row; + public weak Gtk.Style label_style; + [CCode (array_length = false)] + public weak int[] marked_date; + [CCode (array_length = false)] + public weak Gdk.Color[] marked_date_color; + public int num_marked_dates; + public int selected_day; + public weak Gdk.GC xor_gc; + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Calendar (); + public void clear_marks (); + public void freeze (); + public void get_date (uint year, uint month, uint day); + public Hildon.CalendarDisplayOptions get_display_options (); + public bool mark_day (uint day); + public void select_day (uint day); + public bool select_month (uint month, uint year); + public void set_display_options (Hildon.CalendarDisplayOptions flags); + public void thaw (); + public bool unmark_day (uint day); + [NoAccessorMethod] + public int day { get; set; } + [NoAccessorMethod] + public int max_year { get; set; } + [NoAccessorMethod] + public int min_year { get; set; } + [NoAccessorMethod] + public int month { get; set; } + [NoAccessorMethod] + public bool no_month_change { get; set; } + [NoAccessorMethod] + public bool show_day_names { get; set; } + [NoAccessorMethod] + public bool show_heading { get; set; } + [NoAccessorMethod] + public bool show_week_numbers { get; set; } + [NoAccessorMethod] + public int week_start { get; set; } + [NoAccessorMethod] + public int year { get; set; } + public virtual signal void day_selected (); + public virtual signal void day_selected_double_click (); + public virtual signal void erroneous_date (); + public virtual signal void month_changed (); + public virtual signal void next_month (); + public virtual signal void next_year (); + public virtual signal void prev_month (); + public virtual signal void prev_year (); + public virtual signal void selected_date (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class CalendarPopup : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public CalendarPopup (Gtk.Window parent, uint year, uint month, uint day); + public void get_date (uint year, uint month, uint day); + public void set_date (uint year, uint month, uint day); + [NoAccessorMethod] + public int day { get; set; } + [NoAccessorMethod] + public uint max_year { set; } + [NoAccessorMethod] + public uint min_year { set; } + [NoAccessorMethod] + public int month { get; set; } + [NoAccessorMethod] + public int year { get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Caption : Gtk.EventBox, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Caption (Gtk.SizeGroup group, string value, Gtk.Widget control, Gtk.Widget icon, Hildon.CaptionStatus flag); + public bool get_child_expand (); + public unowned Gtk.Widget get_icon_image (); + public Hildon.CaptionIconPosition get_icon_position (); + public unowned string get_label (); + public float get_label_alignment (); + public unowned string get_separator (); + public unowned Gtk.SizeGroup get_size_group (); + public Hildon.CaptionStatus get_status (); + public bool is_mandatory (); + public void set_child_expand (bool expand); + public void set_icon_image (Gtk.Widget icon); + public void set_icon_position (Hildon.CaptionIconPosition pos); + public void set_label (string label); + public void set_label_alignment (float alignment); + public void set_label_markup (string markup); + public void set_separator (string separator); + public void set_size_group (Gtk.SizeGroup new_group); + public void set_status (Hildon.CaptionStatus flag); + [NoAccessorMethod] + public Gtk.Widget icon { owned get; set; } + public Hildon.CaptionIconPosition icon_position { get; set; } + public string label { get; set; } + [NoAccessorMethod] + public string markup { set; } + public string separator { get; set; } + public Gtk.SizeGroup size_group { get; set; } + public Hildon.CaptionStatus status { get; set; } + public virtual signal void activate (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class CheckButton : Gtk.Button, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public CheckButton (Hildon.SizeType size); + public bool get_active (); + public void set_active (bool is_active); + [NoAccessorMethod] + public Hildon.SizeType size { set; } + public virtual signal void toggled (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class CodeDialog : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public CodeDialog (); + public void clear_code (); + public unowned string get_code (); + public void set_help_text (string text); + public void set_input_sensitive (bool sensitive); + public virtual signal void input (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class ColorButton : Gtk.Button, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public ColorButton (); + public void get_color (out Gdk.Color color); + public bool get_popup_shown (); + public void popdown (); + public void set_color (Gdk.Color color); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public ColorButton.with_color (Gdk.Color color); + public Gdk.Color color { get; set; } + public bool popup_shown { get; } + public virtual signal void setup_dialog (Hildon.ColorChooserDialog p0); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class ColorChooser : Gtk.Widget, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public ColorChooser (); + public void get_color (out Gdk.Color color); + public virtual void set_color (Gdk.Color color); + public Gdk.Color color { get; set; } + public virtual signal void color_changed (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class ColorChooserDialog : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public ColorChooserDialog (); + public void get_color (out Gdk.Color color); + public void set_color (Gdk.Color color); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Controlbar : Gtk.Scale, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Controlbar (); + public int get_max (); + public int get_min (); + public int get_value (); + public void set_max (int max); + public void set_min (int min); + public void set_range (int min, int max); + public void set_value (int value); + public int max { get; set; } + public int min { get; set; } + public int value { get; set; } + public virtual signal void end_reached (bool end); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class DateButton : Hildon.PickerButton, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public DateButton (Hildon.SizeType size, Hildon.ButtonArrangement arrangement); + public void get_date (out uint year, out uint month, out uint day); + public void set_date (uint year, uint month, uint day); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public DateButton.with_year_range (Hildon.SizeType size, Hildon.ButtonArrangement arrangement, int min_year, int max_year); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class DateEditor : Gtk.Container, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public DateEditor (); + public void get_date (uint year, uint month, uint day); + public uint get_day (); + public uint get_month (); + public uint get_year (); + public void set_date (uint year, uint month, uint day); + public bool set_day (uint day); + public bool set_month (uint month); + public bool set_year (uint year); + public uint day { get; set; } + [NoAccessorMethod] + public uint max_year { get; set; } + [NoAccessorMethod] + public uint min_year { get; set; } + public uint month { get; set; } + public uint year { get; set; } + public virtual signal bool date_error (Hildon.DateTimeError type); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class DateSelector : Hildon.TouchSelector, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public DateSelector (); + public void get_date (uint year, uint month, uint day); + public bool select_current_date (uint year, uint month, uint day); + public void select_day (uint day); + public bool select_month (uint month, uint year); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public DateSelector.with_year_range (int min_year, int max_year); + [NoAccessorMethod] + public int max_year { get; construct; } + [NoAccessorMethod] + public int min_year { get; construct; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Dialog : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Dialog (); + public unowned Gtk.Widget add_button (string button_text, int response_id); + public void add_buttons (...); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Dialog.with_buttons (string title, Gtk.Window parent, Gtk.DialogFlags flags, ...); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class EditToolbar : Gtk.HBox, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public EditToolbar (); + public void set_button_label (string label); + public void set_label (string label); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public EditToolbar.with_text (string label, string button); + public virtual signal void arrow_clicked (); + public virtual signal void button_clicked (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Entry : Gtk.Entry, Atk.Implementor, Gtk.Buildable, Gtk.Editable, Gtk.CellEditable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Entry (Hildon.SizeType size); + public unowned string get_text (); + public void set_placeholder (string text); + public void set_text (string text); + [NoAccessorMethod] + public Hildon.SizeType size { set construct; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class FindToolbar : Gtk.Toolbar, Atk.Implementor, Gtk.Buildable, Gtk.ToolShell { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public FindToolbar (string label); + public int get_active (); + public bool get_active_iter (out Gtk.TreeIter iter); + public int32 get_last_index (); + public void highlight_entry (bool get_focus); + public void set_active (int index); + public void set_active_iter (Gtk.TreeIter iter); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public FindToolbar.with_model (string label, Gtk.ListStore model, int column); + [NoAccessorMethod] + public int column { get; set; } + [NoAccessorMethod] + public int history_limit { get; set construct; } + [NoAccessorMethod] + public string label { owned get; set construct; } + [NoAccessorMethod] + public Gtk.ListStore list { owned get; set; } + [NoAccessorMethod] + public int max_characters { get; set construct; } + [NoAccessorMethod] + public string prefix { owned get; set; } + public virtual signal void close (); + public virtual signal bool history_append (); + public virtual signal void invalid_input (); + public virtual signal void search (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class FontSelectionDialog : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public FontSelectionDialog (Gtk.Window parent, string title); + public unowned string get_preview_text (); + public void set_preview_text (string text); + [NoAccessorMethod] + public bool bold { get; set; } + [NoAccessorMethod] + public bool bold_set { get; set construct; } + [NoAccessorMethod] + public Gdk.Color color { get; set; } + [NoAccessorMethod] + public bool color_set { get; set construct; } + [NoAccessorMethod] + public string family { owned get; set; } + [NoAccessorMethod] + public bool family_set { get; set construct; } + [NoAccessorMethod] + public double font_scaling { get; set; } + [NoAccessorMethod] + public bool italic { get; set; } + [NoAccessorMethod] + public bool italic_set { get; set construct; } + [NoAccessorMethod] + public int position { get; set; } + [NoAccessorMethod] + public bool position_set { get; set construct; } + public string preview_text { get; set; } + [NoAccessorMethod] + public int size { get; set; } + [NoAccessorMethod] + public bool size_set { get; set construct; } + [NoAccessorMethod] + public bool strikethrough { get; set; } + [NoAccessorMethod] + public bool strikethrough_set { get; set construct; } + [NoAccessorMethod] + public bool underline { get; set; } + [NoAccessorMethod] + public bool underline_set { get; set construct; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class GetPasswordDialog : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public GetPasswordDialog (Gtk.Window parent, bool get_old); + public unowned string get_password (); + public void set_caption (string new_caption); + public void set_max_characters (int max_characters); + public void set_message (string message); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public GetPasswordDialog.with_default (Gtk.Window parent, string password, bool get_old); + [NoAccessorMethod] + public string caption_label { owned get; set; } + [NoAccessorMethod] + public bool get_old { get; construct; } + [NoAccessorMethod] + public int max_characters { get; set; } + [NoAccessorMethod] + public string message { owned get; set; } + [NoAccessorMethod] + public bool numbers_only { get; set; } + [NoAccessorMethod] + public string password { owned get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class HVolumebar : Hildon.Volumebar, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public HVolumebar (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class LoginDialog : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public LoginDialog (Gtk.Window parent); + public unowned string get_password (); + public unowned string get_username (); + public void set_message (string msg); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public LoginDialog.with_default (Gtk.Window parent, string name, string password); + [NoAccessorMethod] + public string message { owned get; set; } + [NoAccessorMethod] + public string password { owned get; set; } + [NoAccessorMethod] + public string username { owned get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Note : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Note.cancel_with_progress_bar (Gtk.Window parent, string description, Gtk.ProgressBar progressbar); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Note.confirmation (Gtk.Window parent, string description); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Note.confirmation_add_buttons (Gtk.Window parent, string description); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Note.confirmation_with_icon_name (Gtk.Window parent, string description, string icon_name); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Note.information (Gtk.Window parent, string description); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Note.information_with_icon_name (Gtk.Window parent, string description, string icon_name); + public void set_button_text (string text); + public void set_button_texts (string text_ok, string text_cancel); + [NoAccessorMethod] + public string description { owned get; set; } + [NoAccessorMethod] + public string icon { owned get; set; } + [NoAccessorMethod] + public Hildon.NoteType note_type { get; set construct; } + [NoAccessorMethod] + public Gtk.ProgressBar progressbar { owned get; set; } + [NoAccessorMethod] + public string stock_icon { owned get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class NumberEditor : Gtk.Container, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public NumberEditor (int min, int max); + public int get_value (); + public void set_range (int min, int max); + public void set_value (int value); + public int value { get; set; } + public virtual signal bool range_error (Hildon.NumberEditorErrorType type); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class PannableArea : Gtk.Bin, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public PannableArea (); + public void add_with_viewport (Gtk.Widget child); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public PannableArea.full (int mode, bool enabled, double vel_min, double vel_max, double decel, uint sps); + public unowned Gtk.Adjustment get_hadjustment (); + public Hildon.SizeRequestPolicy get_size_request_policy (); + public unowned Gtk.Adjustment get_vadjustment (); + public void jump_to (int x, int y); + public void jump_to_child (Gtk.Widget child); + public void scroll_to (int x, int y); + public void scroll_to_child (Gtk.Widget child); + public void set_size_request_policy (Hildon.SizeRequestPolicy size_request_policy); + [NoAccessorMethod] + public uint bounce_steps { get; set construct; } + [NoAccessorMethod] + public double deceleration { get; set construct; } + [NoAccessorMethod] + public uint direction_error_margin { get; set construct; } + [NoAccessorMethod] + public double drag_inertia { get; set construct; } + [NoAccessorMethod] + public bool enabled { get; set construct; } + [NoAccessorMethod] + public uint force { get; set construct; } + public Gtk.Adjustment hadjustment { get; } + [NoAccessorMethod] + public int hovershoot_max { get; set construct; } + [NoAccessorMethod] + public Gtk.PolicyType hscrollbar_policy { get; set construct; } + [NoAccessorMethod] + public bool initial_hint { get; set construct; } + [NoAccessorMethod] + public bool low_friction_mode { get; set construct; } + [NoAccessorMethod] + public Hildon.PannableAreaMode mode { get; set construct; } + [NoAccessorMethod] + public Hildon.MovementMode mov_mode { get; set construct; } + [NoAccessorMethod] + public uint panning_threshold { get; set construct; } + [NoAccessorMethod] + public double scroll_time { get; set construct; } + [NoAccessorMethod] + public uint scrollbar_fade_delay { get; set construct; } + public Hildon.SizeRequestPolicy size_request_policy { get; set construct; } + [NoAccessorMethod] + public uint sps { get; set construct; } + public Gtk.Adjustment vadjustment { get; } + [NoAccessorMethod] + public double velocity_fast_factor { get; set construct; } + [NoAccessorMethod] + public double velocity_max { get; set construct; } + [NoAccessorMethod] + public double velocity_min { get; set construct; } + [NoAccessorMethod] + public double velocity_overshooting_max { get; set construct; } + [NoAccessorMethod] + public int vovershoot_max { get; set construct; } + [NoAccessorMethod] + public Gtk.PolicyType vscrollbar_policy { get; set construct; } + public virtual signal void horizontal_movement (int direction, double x, double y); + public virtual signal void panning_finished (); + public virtual signal bool panning_started (); + public virtual signal void vertical_movement (int direction, double x, double y); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class PickerButton : Hildon.Button, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public PickerButton (Hildon.SizeType size, Hildon.ButtonArrangement arrangement); + public int get_active (); + public unowned string get_done_button_text (); + public unowned Hildon.TouchSelector get_selector (); + public void set_active (int index); + public void set_done_button_text (string done_button_text); + public void set_selector (Hildon.TouchSelector selector); + public string done_button_text { get; set; } + [NoAccessorMethod] + public Hildon.TouchSelector touch_selector { owned get; set; } + public virtual signal void value_changed (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class PickerDialog : Hildon.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public PickerDialog (Gtk.Window parent); + public unowned string get_done_label (); + public unowned Hildon.TouchSelector get_selector (); + public void set_done_label (string label); + public virtual bool set_selector (Hildon.TouchSelector selector); + [NoAccessorMethod] + public bool center_on_show { get; set construct; } + [NoAccessorMethod] + public string done_button_text { owned get; set construct; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Program : GLib.Object { + public void add_window (Hildon.Window window); + public bool get_can_hibernate (); + public unowned Hildon.AppMenu get_common_app_menu (); + public unowned Gtk.Menu get_common_menu (); + public unowned Gtk.Toolbar get_common_toolbar (); + public static unowned Hildon.Program get_instance (); + public bool get_is_topmost (); + public void go_to_root_window (); + public unowned Hildon.StackableWindow peek_window_stack (); + public unowned Hildon.StackableWindow pop_window_stack (); + public void remove_window (Hildon.Window window); + public void set_can_hibernate (bool can_hibernate); + public void set_common_app_menu (Hildon.AppMenu menu); + public void set_common_menu (Gtk.Menu menu); + public void set_common_toolbar (Gtk.Toolbar toolbar); + public bool can_hibernate { get; set; } + public bool is_topmost { get; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class RangeEditor : Gtk.Container, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public RangeEditor (); + public int get_higher (); + public int get_lower (); + public int get_max (); + public int get_min (); + public void get_range (int start, int end); + public unowned string get_separator (); + public void set_higher (int value); + public void set_limits (int start, int end); + public void set_lower (int value); + public void set_max (int value); + public void set_min (int value); + public void set_range (int start, int end); + public void set_separator (string separator); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public RangeEditor.with_separator (string separator); + public int higher { get; set construct; } + public int lower { get; set construct; } + public int max { get; set construct; } + public int min { get; set construct; } + public string separator { get; set construct; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class RemoteTexture : Gtk.Window, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public RemoteTexture (); + public void send_message (uint32 message_type, uint32 l0, uint32 l1, uint32 l2, uint32 l3, uint32 l4); + public void set_image (uint32 key, uint width, uint height, uint bpp); + public void set_offset (double x, double y); + public void set_opacity (int opacity); + public void set_parent (Gtk.Window parent); + public void set_position (int x, int y, int width, int height); + public void set_scale (double x_scale, double y_scale); + public void set_show (int show); + public void set_show_full (int show, int opacity); + public void update_area (int x, int y, int width, int height); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Seekbar : Gtk.Scale, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Seekbar (); + public uint get_fraction (); + public int get_position (); + public int get_total_time (); + public void set_fraction (uint fraction); + public void set_position (int time); + public void set_total_time (int time); + public double fraction { get; set; } + public double position { get; set; } + public double total_time { get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class SetPasswordDialog : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public SetPasswordDialog (Gtk.Window parent, bool modify_protection); + public unowned string get_password (); + public bool get_protected (); + public void set_message (string message); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public SetPasswordDialog.with_default (Gtk.Window parent, string password, bool modify_protection); + [NoAccessorMethod] + public string message { owned get; set; } + [NoAccessorMethod] + public bool modify_protection { get; construct; } + [NoAccessorMethod] + public string password { owned get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class SortDialog : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public SortDialog (Gtk.Window parent); + public int add_sort_key (string sort_key); + public int add_sort_key_reversed (string sort_key); + public int get_sort_key (); + public Gtk.SortType get_sort_order (); + public void set_sort_key (int key); + public void set_sort_order (Gtk.SortType order); + public int sort_key { get; set; } + public Gtk.SortType sort_order { get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class StackableWindow : Hildon.Window, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public StackableWindow (); + public unowned Hildon.WindowStack get_stack (); + public void set_main_menu (Hildon.AppMenu menu); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class TextView : Gtk.TextView, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public TextView (); + public unowned Gtk.TextBuffer get_buffer (); + public void set_buffer (Gtk.TextBuffer buffer); + public void set_placeholder (string text); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class TimeButton : Hildon.PickerButton, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public TimeButton (Hildon.SizeType size, Hildon.ButtonArrangement arrangement); + public void get_time (uint hours, uint minutes); + public void set_time (uint hours, uint minutes); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public TimeButton.step (Hildon.SizeType size, Hildon.ButtonArrangement arrangement, uint minutes_step); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class TimeEditor : Gtk.Container, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public TimeEditor (); + public uint get_duration_max (); + public uint get_duration_min (); + public bool get_duration_mode (); + public void get_duration_range (uint min_seconds, uint max_seconds); + public bool get_show_hours (); + public bool get_show_seconds (); + public uint get_ticks (); + public void get_time (uint hours, uint minutes, uint seconds); + public static void get_time_separators (Gtk.Label hm_sep_label, Gtk.Label ms_sep_label); + public void set_duration_max (uint duration_max); + public void set_duration_min (uint duration_min); + public void set_duration_mode (bool duration_mode); + public void set_duration_range (uint min_seconds, uint max_seconds); + public void set_show_hours (bool show_hours); + public void set_show_seconds (bool show_seconds); + public void set_ticks (uint ticks); + public void set_time (uint hours, uint minutes, uint seconds); + public uint duration_max { get; set; } + public uint duration_min { get; set; } + public bool duration_mode { get; set; } + public bool show_hours { get; set; } + public bool show_seconds { get; set; } + public uint ticks { get; set; } + public virtual signal bool time_error (Hildon.DateTimeError type); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class TimePicker : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public TimePicker (Gtk.Window parent); + public void get_time (uint hours, uint minutes); + public void set_time (uint hours, uint minutes); + [NoAccessorMethod] + public uint minutes { get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class TimeSelector : Hildon.TouchSelector, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public TimeSelector (); + public void get_time (uint hours, uint minutes); + public bool set_time (uint hours, uint minutes); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public TimeSelector.step (uint minutes_step); + [NoAccessorMethod] + public uint minutes_step { get; construct; } + [NoAccessorMethod] + public Hildon.TimeSelectorFormatPolicy time_format_policy { get; set construct; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class TouchSelector : Gtk.VBox, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public TouchSelector (); + public unowned Hildon.TouchSelectorColumn append_column (Gtk.TreeModel model, Gtk.CellRenderer cell_renderer); + public void append_text (string text); + public unowned Hildon.TouchSelectorColumn append_text_column (Gtk.TreeModel model, bool center); + public void center_on_selected (); + public int get_active (int column); + public unowned Hildon.TouchSelectorColumn get_column (int column); + public Hildon.TouchSelectorSelectionMode get_column_selection_mode (); + public unowned string get_current_text (); + public Hildon.UIMode get_hildon_ui_mode (); + public unowned Gtk.TreePath get_last_activated_row (int column); + public unowned Gtk.TreeModel get_model (int column); + public int get_num_columns (); + public unowned Hildon.TouchSelectorPrintFunc get_print_func (); + public bool get_selected (int column, Gtk.TreeIter iter); + public unowned GLib.List get_selected_rows (int column); + public void insert_text (int position, string text); + public void optimal_size_request (Gtk.Requisition requisition); + public void prepend_text (string text); + public bool remove_column (int column); + public void select_iter (int column, Gtk.TreeIter iter, bool scroll_to); + public void set_active (int column, int index); + public void set_column_attributes (int num_column, Gtk.CellRenderer cell_renderer); + public void set_column_selection_mode (Hildon.TouchSelectorSelectionMode mode); + public bool set_hildon_ui_mode (Hildon.UIMode mode); + public virtual void set_model (int column, Gtk.TreeModel model); + public void set_print_func (Hildon.TouchSelectorPrintFunc func); + public void set_print_func_full (Hildon.TouchSelectorPrintFunc func, GLib.DestroyNotify destroy_func); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public TouchSelector.text (); + public void unselect_all (int column); + public void unselect_iter (int column, Gtk.TreeIter iter); + [NoAccessorMethod] + public bool has_multiple_selection { get; } + public Hildon.UIMode hildon_ui_mode { get; set; } + [NoAccessorMethod] + public bool initial_scroll { get; set construct; } + public virtual signal void changed (int column); + public virtual signal void columns_changed (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class TouchSelectorColumn : GLib.Object, Gtk.CellLayout { + public int get_text_column (); + public void set_text_column (int text_column); + public int text_column { get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class TouchSelectorEntry : Hildon.TouchSelector, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public TouchSelectorEntry (); + public unowned Hildon.Entry get_entry (); + public Hildon.GtkInputMode get_input_mode (); + public int get_text_column (); + public void set_input_mode (Hildon.GtkInputMode input_mode); + public void set_text_column (int text_column); + [CCode (type = "GtkWidget*", has_construct_function = false)] + public TouchSelectorEntry.text (); + public int text_column { get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class VVolumebar : Hildon.Volumebar, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public VVolumebar (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Volumebar : Gtk.Container, Atk.Implementor, Gtk.Buildable { + public unowned Gtk.Adjustment get_adjustment (); + public double get_level (); + public bool get_mute (); + public void set_level (double level); + public void set_mute (bool mute); + public void set_range_insensitive_message (string message); + public void set_range_insensitive_messagef (string format); + [NoAccessorMethod] + public bool has_mute { get; set construct; } + public double level { get; set; } + public bool mute { get; set; } + public virtual signal void level_changed (); + public virtual signal void mute_toggled (); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class VolumebarRange : Gtk.Scale, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public VolumebarRange (Gtk.Orientation orientation); + public double get_level (); + public void set_level (double level); + public double level { get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class WeekdayPicker : Gtk.Container, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public WeekdayPicker (); + public bool isset_day (GLib.DateWeekday day); + public void set_all (); + public void set_day (GLib.DateWeekday day); + public void toggle_day (GLib.DateWeekday day); + public void unset_all (); + public void unset_day (GLib.DateWeekday day); + public virtual signal void selection_changed (int p0); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class Window : Gtk.Window, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Window (); + public void add_toolbar (Gtk.Toolbar toolbar); + public void add_with_scrollbar (Gtk.Widget child); + public unowned Hildon.AppMenu get_app_menu (); + public bool get_is_topmost (); + public unowned Gtk.Menu get_main_menu (); + public unowned string get_markup (); + public unowned Gtk.Menu get_menu (); + public void remove_toolbar (Gtk.Toolbar toolbar); + public void set_app_menu (Hildon.AppMenu menu); + public void set_edit_toolbar (Hildon.EditToolbar toolbar); + public void set_main_menu (Gtk.Menu menu); + public void set_markup (string markup); + public void set_menu (Gtk.Menu menu); + [NoWrapper] + public virtual bool toggle_menu (uint button, uint32 time); + public bool is_topmost { get; } + public string markup { get; set; } + public virtual signal void clipboard_operation (int operation); + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class WindowStack : GLib.Object { + [CCode (has_construct_function = false)] + public WindowStack (); + public static unowned Hildon.WindowStack get_default (); + public unowned GLib.List get_windows (); + public unowned Gtk.Widget peek (); + public void pop (int nwindows, GLib.List popped_windows); + public unowned Gtk.Widget pop_1 (); + public void pop_and_push (int nwindows, GLib.List popped_windows, Hildon.StackableWindow win1); + public void pop_and_push_list (int nwindows, GLib.List popped_windows, GLib.List list); + public void push (Hildon.StackableWindow win1); + public void push_1 (Hildon.StackableWindow win); + public void push_list (GLib.List list); + public int size (); + [NoAccessorMethod] + public Gtk.WindowGroup window_group { owned get; construct; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public class WizardDialog : Gtk.Dialog, Atk.Implementor, Gtk.Buildable { + [CCode (type = "GtkWidget*", has_construct_function = false)] + public WizardDialog (Gtk.Window parent, string wizard_name, Gtk.Notebook notebook); + public void set_forward_page_func (Hildon.WizardDialogPageFunc page_func, void* data, GLib.DestroyNotify destroy); + [NoAccessorMethod] + public bool autotitle { get; set; } + [NoAccessorMethod] + public string wizard_name { owned get; set; } + [NoAccessorMethod] + public Gtk.Notebook wizard_notebook { owned get; set; } + } + [CCode (cheader_filename = "hildon/hildon.h")] + public interface BreadCrumb : Gtk.Widget { + public void activated (); + public abstract void get_natural_size (int width, int height); + public signal void crumb_activated (); + } + [CCode (cprefix = "HILDON_BUTTON_ARRANGEMENT_", cheader_filename = "hildon/hildon.h")] + public enum ButtonArrangement { + HORIZONTAL, + VERTICAL + } + [CCode (cprefix = "HILDON_BUTTON_STYLE_", cheader_filename = "hildon/hildon.h")] + public enum ButtonStyle { + NORMAL, + PICKER + } + [CCode (cprefix = "HILDON_CALENDAR_", cheader_filename = "hildon/hildon.h")] + [Flags] + public enum CalendarDisplayOptions { + SHOW_HEADING, + SHOW_DAY_NAMES, + NO_MONTH_CHANGE, + SHOW_WEEK_NUMBERS, + WEEK_START_MONDAY + } + [CCode (cprefix = "HILDON_CAPTION_POSITION_", cheader_filename = "hildon/hildon.h")] + public enum CaptionIconPosition { + LEFT, + RIGHT + } + [CCode (cprefix = "HILDON_CAPTION_", cheader_filename = "hildon/hildon.h")] + public enum CaptionStatus { + OPTIONAL, + MANDATORY + } + [CCode (cprefix = "HILDON_DATE_TIME_ERROR_", cheader_filename = "hildon/hildon.h")] + public enum DateTimeError { + NO_ERROR, + MAX_HOURS, + MAX_MINS, + MAX_SECS, + MAX_DAY, + MAX_MONTH, + MAX_YEAR, + MIN_HOURS, + MIN_MINS, + MIN_SECS, + MIN_DAY, + MIN_MONTH, + MIN_YEAR, + EMPTY_HOURS, + EMPTY_MINS, + EMPTY_SECS, + EMPTY_DAY, + EMPTY_MONTH, + EMPTY_YEAR, + MIN_DURATION, + MAX_DURATION, + INVALID_CHAR, + INVALID_DATE, + INVALID_TIME + } + [CCode (cprefix = "HILDON_GTK_INPUT_MODE_", has_type_id = "0", cheader_filename = "gtk/gtk.h")] + public enum GtkInputMode { + ALPHA, + NUMERIC, + SPECIAL, + HEXA, + TELE, + FULL, + MULTILINE, + INVISIBLE, + AUTOCAP, + DICTIONARY + } + [CCode (cprefix = "HILDON_", has_type_id = "0", cheader_filename = "gtk/gtk.h")] + public enum Mode { + DIABLO, + FREMANTLE + } + [CCode (cprefix = "HILDON_MOVEMENT_", cheader_filename = "hildon/hildon.h")] + public enum MovementDirection { + UP, + DOWN, + LEFT, + RIGHT + } + [CCode (cprefix = "HILDON_MOVEMENT_MODE_", cheader_filename = "hildon/hildon.h")] + [Flags] + public enum MovementMode { + HORIZ, + VERT, + BOTH + } + [CCode (cprefix = "HILDON_NOTE_TYPE_", cheader_filename = "hildon/hildon.h")] + public enum NoteType { + CONFIRMATION, + CONFIRMATION_BUTTON, + INFORMATION, + INFORMATION_THEME, + PROGRESSBAR + } + [CCode (cprefix = "HILDON_NUMBER_EDITOR_ERROR_", cheader_filename = "hildon/hildon.h")] + public enum NumberEditorErrorType { + MAXIMUM_VALUE_EXCEED, + MINIMUM_VALUE_EXCEED, + ERRONEOUS_VALUE + } + [CCode (cprefix = "HILDON_PANNABLE_AREA_MODE_", cheader_filename = "hildon/hildon.h")] + public enum PannableAreaMode { + PUSH, + ACCEL, + AUTO + } + [CCode (cprefix = "HILDON_PORTRAIT_MODE_", cheader_filename = "hildon/hildon.h")] + [Flags] + public enum PortraitFlags { + REQUEST, + SUPPORT + } + [CCode (cprefix = "HILDON_SIZE_REQUEST_", cheader_filename = "hildon/hildon.h")] + public enum SizeRequestPolicy { + MINIMUM, + CHILDREN + } + [CCode (cprefix = "HILDON_SIZE_", has_type_id = "0", cheader_filename = "gtk/gtk.h")] + public enum SizeType { + AUTO_WIDTH, + HALFSCREEN_WIDTH, + FULLSCREEN_WIDTH, + AUTO_HEIGHT, + FINGER_HEIGHT, + THUMB_HEIGHT, + AUTO + } + [CCode (cprefix = "HILDON_TIME_SELECTOR_FORMAT_POLICY_", cheader_filename = "hildon/hildon.h")] + public enum TimeSelectorFormatPolicy { + AMPM, + @24H, + AUTOMATIC + } + [CCode (cprefix = "HILDON_TOUCH_SELECTOR_SELECTION_MODE_", cheader_filename = "hildon/hildon.h")] + public enum TouchSelectorSelectionMode { + SINGLE, + MULTIPLE + } + [CCode (cprefix = "HILDON_UI_MODE_", has_type_id = "0", cheader_filename = "gtk/gtk.h")] + public enum UIMode { + NORMAL, + EDIT + } + [CCode (cprefix = "HILDON_WINDOW_CO_", cheader_filename = "hildon/hildon.h")] + public enum WindowClipboardOperation { + COPY, + CUT, + PASTE + } + [CCode (cprefix = "HILDON_WIZARD_DIALOG_", cheader_filename = "hildon/hildon.h")] + public enum WizardDialogResponse { + CANCEL, + PREVIOUS, + NEXT, + FINISH + } + [CCode (cheader_filename = "hildon/hildon.h")] + public delegate unowned string TouchSelectorPrintFunc (Hildon.TouchSelector selector); + [CCode (cheader_filename = "hildon/hildon.h")] + public delegate bool WizardDialogPageFunc (Gtk.Notebook notebook, int current_page); + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_CENTER_GRAVITY; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_E_GRAVITY; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_NE_GRAVITY; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_NW_GRAVITY; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_N_GRAVITY; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_SE_GRAVITY; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_SW_GRAVITY; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_S_GRAVITY; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_W_GRAVITY; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_X_AXIS; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_Y_AXIS; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int AA_Z_AXIS; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int MAJOR_VERSION; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int MARGIN_DEFAULT; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int MARGIN_DOUBLE; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int MARGIN_HALF; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int MARGIN_TRIPLE; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int MICRO_VERSION; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int MINOR_VERSION; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int WINDOW_LONG_PRESS_TIME; + [CCode (cheader_filename = "hildon/hildon.h")] + public const int WINDOW_TITLEBAR_HEIGHT; + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned string format_file_size_for_display (int64 size); + [CCode (cheader_filename = "hildon/hildon.h")] + public static int get_icon_pixel_size (Gtk.IconSize size); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget gtk_button_new (Hildon.SizeType size); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget gtk_hscale_new (); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget gtk_icon_view_new (Hildon.UIMode mode); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget gtk_icon_view_new_with_model (Hildon.UIMode mode, Gtk.TreeModel model); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void gtk_icon_view_set_ui_mode (Gtk.IconView iconview, Hildon.UIMode mode); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void gtk_init ([CCode (array_length_pos = 0.9)] ref unowned string[] argv); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget gtk_menu_new (); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget gtk_radio_button_new (Hildon.SizeType size, GLib.SList group); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget gtk_radio_button_new_from_widget (Hildon.SizeType size, Gtk.RadioButton radio_group_member); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget gtk_toggle_button_new (Hildon.SizeType size); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget gtk_tree_view_new (Hildon.UIMode mode); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget gtk_tree_view_new_with_model (Hildon.UIMode mode, Gtk.TreeModel model); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void gtk_tree_view_set_ui_mode (Gtk.TreeView treeview, Hildon.UIMode mode); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget gtk_vscale_new (); + [CCode (cheader_filename = "gtk/gtk.h")] + public static void gtk_widget_set_theme_size (Gtk.Widget widget, Hildon.SizeType size); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void gtk_window_set_do_not_disturb (Gtk.Window window, bool dndflag); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void gtk_window_set_portrait_flags (Gtk.Window window, Hildon.PortraitFlags portrait_flags); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void gtk_window_set_progress_indicator (Gtk.Window window, uint state); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void gtk_window_take_screenshot (Gtk.Window window, bool take); + [CCode (cheader_filename = "hildon/hildon.h")] + public static bool helper_event_button_is_finger (Gdk.EventButton event); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void helper_set_insensitive_message (Gtk.Widget widget, string message); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void helper_set_insensitive_messagef (Gtk.Widget widget, string format); + [CCode (cheader_filename = "hildon/hildon.h")] + public static ulong helper_set_logical_color (Gtk.Widget widget, Gtk.RcFlags rcflags, Gtk.StateType state, string logicalcolorname); + [CCode (cheader_filename = "hildon/hildon.h")] + public static ulong helper_set_logical_font (Gtk.Widget widget, string logicalfontname); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void helper_set_thumb_scrollbar (Gtk.ScrolledWindow win, bool thumb); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void init (); + [CCode (cheader_filename = "hildon/hildon.h")] + public static unowned Gtk.Widget pannable_get_child_widget_at (Hildon.PannableArea area, double x, double y); + [CCode (cheader_filename = "hildon/hildon.h")] + public static void play_system_sound (string sample); +} diff --git a/vapi/libcurl.deps b/vapi/libcurl.deps new file mode 100644 index 0000000..b3188f7 --- /dev/null +++ b/vapi/libcurl.deps @@ -0,0 +1 @@ +posix diff --git a/vapi/libcurl.vapi b/vapi/libcurl.vapi new file mode 100644 index 0000000..7599e88 --- /dev/null +++ b/vapi/libcurl.vapi @@ -0,0 +1,692 @@ +[CCode (cheader_filename = "curl/curl.h")] +namespace Curl { + [CCode (cname = "CURL_GLOBAL_SSL")] + public const long GLOBAL_SSL; + [CCode (cname = "CURL_GLOBAL_WIN32")] + public const long GLOBAL_WIN32; + [CCode (cname = "CURL_GLOBAL_ALL")] + public const long GLOBAL_ALL; + [CCode (cname = "CURL_GLOBAL_NOTHING")] + public const long GLOBAL_NOTHING; + [CCode (cname = "CURL_GLOBAL_DEFAULT")] + public const int GLOBAL_DEFAULT; + public Curl.Code global_init (long flags); + public Curl.Code global_init_mem (long flags, Curl.MallocCallback m, Curl.FreeCallback f, Curl.ReallocCallback r, Curl.StrdupCallback s, Curl.CallocCallback c); + public static void global_cleanup (); + [Compact] + [CCode (cname = "CURL", cprefix = "curl_easy_", free_function = "curl_easy_cleanup")] + public class EasyHandle { + [CCode (cname = "curl_easy_init")] + public EasyHandle (); + [PrintfFormat] + public Curl.Code setopt (Curl.Option option, ...); + public Curl.Code perform (); + [PrintfFormat] + public Curl.Code getinfo (Curl.Info info, ...); + public Curl.EasyHandle duphandle (); + public void reset (); + public Curl.Code recv (void *buffer, size_t buflen, out size_t n); + public Curl.Code send (void *buffer, size_t buflen, out size_t n); + public string escape (string @string, int length); + public string unescape (string @string, int length, out int outlength); + [CCode (has_target = false)] + public delegate int SocketCallback (Curl.Socket s, int what, void* userp, void *socketp); + } + [CCode (cname = "CURLcode", cprefix = "CURLE_")] + public enum Code { + OK, + UNSUPPORTED_PROTOCOL, + FAILED_INIT, + URL_MALFORMAT, + COULDNT_RESOLVE_PROXY, + COULDNT_RESOLVE_HOST, + COULDNT_CONNECT, + FTP_WEIRD_SERVER_REPLY, + REMOTE_ACCESS_DENIED, + FTP_WEIRD_PASS_REPLY, + FTP_WEIRD_PASV_REPLY, + FTP_WEIRD_227_FORMAT, + FTP_CANT_GET_HOST, + FTP_COULDNT_SET_TYPE, + PARTIAL_FILE, + FTP_COULDNT_RETR_FILE, + QUOTE_ERROR, + HTTP_RETURNED_ERROR, + WRITE_ERROR, + UPLOAD_FAILED, + READ_ERROR, + OUT_OF_MEMORY, + OPERATION_TIMEDOUT, + FTP_PORT_FAILED, + FTP_COULDNT_USE_REST, + RANGE_ERROR, + HTTP_POST_ERROR, + SSL_CONNECT_ERROR, + BAD_DOWNLOAD_RESUME, + FILE_COULDNT_READ_FILE, + LDAP_CANNOT_BIND, + LDAP_SEARCH_FAILED, + FUNCTION_NOT_FOUND, + ABORTED_BY_CALLBACK, + BAD_FUNCTION_ARGUMENT, + INTERFACE_FAILED, + TOO_MANY_REDIRECTS, + UNKNOWN_TELNET_OPTION, + TELNET_OPTION_SYNTAX, + PEER_FAILED_VERIFICATION, + GOT_NOTHING, + SSL_ENGINE_NOTFOUND, + SSL_ENGINE_SETFAILED, + SEND_ERROR, + RECV_ERROR, + SSL_CERTPROBLEM, + SSL_CIPHER, + SSL_CACERT, + BAD_CONTENT_ENCODING, + LDAP_INVALID_URL, + FILESIZE_EXCEEDED, + USE_SSL_FAILED, + SEND_FAIL_REWIND, + SSL_ENGINE_INITFAILED, + LOGIN_DENIED, + TFTP_NOTFOUND, + TFTP_PERM, + REMOTE_DISK_FULL, + TFTP_ILLEGAL, + TFTP_UNKNOWNID, + REMOTE_FILE_EXISTS, + TFTP_NOSUCHUSER, + CONV_FAILED, + CONV_REQD, + SSL_CACERT_BADFILE, + REMOTE_FILE_NOT_FOUND, + SSH, + SSL_SHUTDOWN_FAILED, + AGAIN, + SSL_CRL_BADFILE, + SSL_ISSUER_ERROR, + [CCode (cname = "CURL_LAST")] + LAST + } + [CCode (name = "CURLoption", cprefix = "CURLOPT_")] + public enum Option { + FILE, + URL, + PORT, + PROXY, + USERPWD, + PROXYUSERPWD, + RANGE, + INFILE, + WRITEDATA, + READDATA, + ERRORBUFFER, + WRITEFUNCTION, + READFUNCTION, + TIMEOUT, + INFILESIZE, + POSTFIELDS, + REFERER, + FTPPORT, + USERAGENT, + LOW_SPEED_LIMIT, + LOW_SPEED_TIME, + RESUME_FROM, + COOKIE, + HTTPHEADER, + HTTPPOST, // struct HTTPPost + SSLCERT, + KEYPASSWD, + CRLF, + QUOTE, + WRITEHEADER, + HEADERDATA, + COOKIEFILE, + SSLVERSION, + TIMECONDITION, + TIMEVALUE, + CUSTOMREQUEST, + STDERR, + POSTQUOTE, + WRITEINFO, + VERBOSE, + HEADER, + NOPROGRESS, + NOBODY, + FAILONERROR, + UPLOAD, + POST, + DIRLISTONLY, + APPEND, + NETRC, + FOLLOWLOCATION, + TRANSFERTEXT, + PUT, + PROGRESSFUNCTION, + PROGRESSDATA, + AUTOREFERER, + PROXYPORT, + POSTFIELDSIZE, + HTTPPROXYTUNNEL, + INTERFACE, + KRBLEVEL, + SSL_VERIFYPEER, + CAINFO, + MAXREDIRS, + FILETIME, + TELNETOPTIONS, + MAXCONNECTS, + CLOSEPOLICY, + FRESH_CONNECT, + FORBID_REUSE, + RANDOM_FILE, + EGDSOCKET, + CONNECTTIMEOUT, + HEADERFUNCTION, + HTTPGET, + SSL_VERIFYHOST, + COOKIEJAR, + SSL_CIPHER_LIST, + HTTP_VERSION, + FTP_USE_EPSV, + SSLCERTTYPE, + SSLKEY, + SSLKEYTYPE, + SSLENGINE, + SSLENGINE_DEFAULT, + DNS_USE_GLOBAL_CACHE, + DNS_CACHE_TIMEOUT, + PREQUOTE, + DEBUGFUNCTION, + DEBUGDATA, + COOKIESESSION, + CAPATH, + BUFFERSIZE, + NOSIGNAL, + SHARE, + PROXYTYPE , + ENCODING, + PRIVATE, + HTTP200ALIASES, + UNRESTRICTED_AUTH, + FTP_USE_EPRT, + HTTPAUTH, + SSL_CTX_FUNCTION, + SSL_CTX_DATA, + FTP_CREATE_MISSING_DIRS, + PROXYAUTH, + FTP_RESPONSE_TIMEOUT, + IPRESOLVE, + MAXFILESIZE, + INFILESIZE_LARGE, + RESUME_FROM_LARGE, + MAXFILESIZE_LARGE, + NETRC_FILE, + USE_SSL, + POSTFIELDSIZE_LARGE, + TCP_NODELAY, + FTPSSLAUTH, + IOCTLFUNCTION, + IOCTLDATA, + FTP_ACCOUNT, + COOKIELIST, + IGNORE_CONTENT_LENGTH, + FTP_SKIP_PASV_IP, + FTP_FILEMETHOD, + LOCALPORT, + LOCALPORTRANGE, + CONNECT_ONLY, + CONV_FROM_NETWORK_FUNCTION, + CONV_TO_NETWORK_FUNCTION, + CONV_FROM_UTF8_FUNCTION, + MAX_SEND_SPEED_LARGE, + MAX_RECV_SPEED_LARGE, + FTP_ALTERNATIVE_TO_USER, + SOCKOPTFUNCTION, + SOCKOPTDATA, + SSL_SESSIONID_CACHE, + SSH_AUTH_TYPES, + SSH_PUBLIC_KEYFILE, + SSH_PRIVATE_KEYFILE, + FTP_SSL_CCC, + TIMEOUT_MS, + CONNECTTIMEOUT_MS, + HTTP_TRANSFER_DECODING, + HTTP_CONTENT_DECODING, + NEW_FILE_PERMS, + NEW_DIRECTORY_PERMS, + POSTREDIR, + SSH_HOST_PUBLIC_KEY_MD5, + OPENSOCKETFUNCTION, + OPENSOCKETDATA, + COPYPOSTFIELDS, + PROXY_TRANSFER_MODE, + SEEKFUNCTION, + SEEKDATA, + CRLFILE, + ISSUERCERT, + ADDRESS_SCOPE, + CERTINFO, + USERNAME, + PASSWORD, + PROXYUSERNAME, + PROXYPASSWORD, + NOPROXY, + TFTP_BLKSIZE, + SOCKS5_GSSAPI_SERVICE, + SOCKS5_GSSAPI_NEC, + PROTOCOLS, + REDIR_PROTOCOLS, + SSH_KNOWNHOSTS, + SSH_KEYFUNCTION, + SSH_KEYDATA, + LASTENTRY + } + [CCode (name = "CURLINFO", cprefix = "CURLINFO_")] + public enum Info { + STRING, + LONG, + DOUBLE, + SLIST, + EFFECTIVE_URL, + RESPONSE_CODE, + TOTAL_TIME, + NAMELOOKUP_TIME, + CONNECT_TIME, + PRETRANSFER_TIME, + SIZE_UPLOAD, + SIZE_DOWNLOAD, + SPEED_DOWNLOAD, + SPEED_UPLOAD, + HEADER_SIZE, + REQUEST_SIZE, + SSL_VERIFYRESULT, + FILETIME, + CONTENT_LENGTH_DOWNLOAD, + CONTENT_LENGTH_UPLOAD, + STARTTRANSFER_TIME, + CONTENT_TYPE, + REDIRECT_TIME, + REDIRECT_COUNT, + PRIVATE, + HTTP_CONNECTCODE, + HTTPAUTH_AVAIL, + PROXYAUTH_AVAIL, + OS_ERRNO, + NUM_CONNECTS, + SSL_ENGINES, + COOKIELIST, + LASTSOCKET, + FTP_ENTRY_PATH, + REDIRECT_URL, + PRIMARY_IP, + APPCONNECT_TIME, + CERTINFO, + CONDITION_UNMET, + LASTONE + } + [CCode (cname = "curl_progress_callback")] + public delegate int ProgressCallback (void* clientp, double dltotal, double dlnow, double ultotal, double ulnow); + [CCode (cname = "CURL_WRITEFUNC_PAUSE")] + public const size_t WRITEFUNC_PAUSE; + [CCode (cname = "curl_write_callback")] + public delegate size_t WriteCallback (char* buffer, size_t size, size_t nitems, void *outstream); + [CCode (cname = "CURL_SEEKFUNC_OK")] + public const int SEEKFUNC_OK; + [CCode (cname = "CURL_SEEKFUNC_FAIL")] + public const int SEEKFUNC_FAIL; + [CCode (cname = "CURL_SEEKFUNC_CANTSEEK")] + public const int SEEKFUNC_CANTSEEK; + [Ccode (cname = "curl_seek_callback")] + public delegate int SeekCallback (void* instream, Curl.Offset offset, int origin); + [CCode (cname = "CURL_READFUNC_ABORT")] + public const size_t READFUNC_ABORT; + [CCode (cname = "CURL_READFUNC_PAUSE")] + public const size_t READFUNC_PAUSE; + [CCode (cname = "curl_read_callback")] + public delegate size_t ReadCallback (char* buffer, size_t size, size_t nitems, void *instream); + [CCode (cname = "curlsocktype", cprefix = "CURLSOCKTYPE_")] + public enum SocketType { + IPCXN, + LAST + } + [CCode (cname = "curl_sockopt_callback")] + public delegate size_t SockoptCallback (void* clientp, Curl.Socket curlfd, Curl.SocketType purpose); + [CCode (cname = "curlioerr", cprefix = "CURLIOE_")] + public enum IOError { + OK, + UNKNOWNCMD, + FAILRESTART, + LAST + } + [CCode (cname = "curliocmd", cprefix = "CURLIOCMD_")] + public enum IOCmd { + NOP, + RESTARTREAD, + LAST + } + [CCode (cname = "curl_ioctl_callback")] + public delegate Curl.IOError IoctlCallback (Curl.EasyHandle handle, int cmd, void* clientp); + [CCode (cname = "curl_malloc_callback")] + public delegate void* MallocCallback (size_t size); + [CCode (cname = "curl_free_callback")] + public delegate void FreeCallback (void* ptr); + [CCode (cname = "curl_realloc_callback")] + public delegate void* ReallocCallback (void* ptr, size_t size); + [CCode (cname = "curl_strdup_callback")] + public delegate string StrdupCallback (string str); + [CCode (cname = "curl_calloc_callback")] + public delegate void* CallocCallback (size_t nmemb, size_t size); + [CCode (cname = "curl_infotype", cprefix = "CURLINFO_")] + public enum InfoType { + TEXT, + HEADER_IN, + HEADER_OUT, + DATA_IN, + DATA_OUT, + SSL_DATA_IN, + SSL_DATA_OUT + } + [CCode (cname = "curl_debug_callback")] + public delegate int DebugCallback (Curl.EasyHandle handle, Curl.InfoType type, [CCode (array_length_type = "size_t")] char[] data, void* userptr); + [CCode (cname = "curl_conv_callback")] + public delegate Curl.Code ConvCallback ([CCode (array_length_type = "size_t")] char[] buffer); + [CCode (cname = "curl_ssl_ctx_callback")] + public delegate Curl.Code SSLCtxCallback (Curl.EasyHandle curl, void* ssl_ctx, void* userptr); + [CCode (cname = "curl_proxytype", cprefix = "CURLPROXY_")] + public enum ProxyType { + HTTP, + HTTP_1_0, + SOCKS4, + SOCKS5, + SOCKS4A, + SOCKS5_HOSTNAME + } + namespace AuthType { + [CCode (cname = "CURLAUTH_NONE")] + public const int NONE; + [CCode (cname = "CURLAUTH_BASIC")] + public const int BASIC; + [CCode (cname = "CURLAUTH_DIGEST")] + public const int DIGEST; + [CCode (cname = "CURLAUTH_GSSNEGOTIATE")] + public const int GSSNEGOTIATE; + [CCode (cname = "CURLAUTH_NTLM")] + public const int NTLM; + [CCode (cname = "CURLAUTH_DIGEST_IE")] + public const int DIGEST_IE; + [CCode (cname = "CURLAUTH_ANY")] + public const int ANY; + [CCode (cname = "CURLAUTH_ANYSAFE")] + public const int ANYSAFE; + } + namespace SSHAuthType { + [CCode (cname = "CURLSSH_AUTH_ANY")] + public const int ANY; + [CCode (cname = "CURLSSH_AUTH_NONE")] + public const int NONE; + [CCode (cname = "CURLSSH_AUTH_PUBLICKEY")] + public const int PUBLICKEY; + [CCode (cname = "CURLSSH_AUTH_PASSWORD")] + public const int PASSWORD; + [CCode (cname = "CURLSSH_AUTH_HOST")] + public const int HOST; + [CCode (cname = "CURLSSH_AUTH_KEYBOARD")] + public const int KEYBOARD; + [CCode (cname = "CURLSSH_AUTH_DEFAULT")] + public const int DEFAULT; + } + public const int ERROR_SIZE; + [CCode (cname = "curl_usessl", cprefix = "CURLUSESSL_")] + public enum UseSSL { + NONE, + TRY, + CONTROL, + ALL + } + [CCode (cname = "curl_ftpccc", cprefix = "CURLFTPSSL_")] + enum FTPSSL { + CCC_NONE, + CCC_PASSIVE, + CCC_ACTIVE + } + [CCode (cname = "curl_ftpauth", cprefix = "CURLFTPAUTH_")] + enum FTPAuthType { + DEFAULT, + SSL, + TLS + } + [CCode (cname = "curl_ftpcreatedir", cprefix = "CURLFTP_CREATE_DIR_")] + enum FTPCreateDir { + NONE, + [CCode (cname = "CURLFTP_CREATE_DIR")] + CREATE, + RETRY + } + [CCode (cname = "curl_ftpmethod", cprefix = "CURLFTPMETHOD_")] + enum FTPMethod { + DEFAULT, + MULTICWD, + NOCWD, + SINGLECWD + } + namespace Proto { + [CCode (cname = "CURLPROTO_HTTP")] + public const int HTTP; + [CCode (cname = "CURLPROTO_HTTPS")] + public const int HTTPS; + [CCode (cname = "CURLPROTO_FTP")] + public const int FTP; + [CCode (cname = "CURLPROTO_FTPS")] + public const int FTPS; + [CCode (cname = "CURLPROTO_SCP")] + public const int SCP; + [CCode (cname = "CURLPROTO_SFTP")] + public const int SFTP; + [CCode (cname = "CURLPROTO_TELNET")] + public const int TELNET; + [CCode (cname = "CURLPROTO_LDAP")] + public const int LDAP; + [CCode (cname = "CURLPROTO_LDAPS")] + public const int LDAPS; + [CCode (cname = "CURLPROTO_DICT")] + public const int DICT; + [CCode (cname = "CURLPROTO_FILE")] + public const int FILE; + [CCode (cname = "CURLPROTO_TFTP")] + public const int TFTP; + [CCode (cname = "CURLPROTO_ALL")] + public const int ALL; + } + public const int IPRESOLVE_WHATEVER; + public const int IPRESOLVE_V4; + public const int IPRESOLVE_V6; + public const int REDIR_GET_ALL; + public const int REDIR_POST_301; + public const int REDIR_POST_302; + public const int REDIR_POST_ALL; + [CCode (cname = "curl_TimeCond", cprefix = "CURL_TIMECOND_")] + public enum TimeCond { + NONE, + IFMODSINCE, + IFUNMODSINCE, + LASTMOD + } + [CCode (cname = "CURLformoption", cprefix = "CURLFORM_")] + public enum FormOption { + COPYNAME, + PTRNAME, + NAMELENGTH, + COPYCONTENTS, + PTRCONTENTS, + CONTENTSLENGTH, + FILECONTENT, + ARRAY, + OBSOLETE, + FILE, + BUFFER, + BUFFERPTR, + BUFFERLENGTH, + CONTENTTYPE, + CONTENTHEADER, + FILENAME, + END, + OBSOLETE2, + STREAM + } + [CCode (cname = "struct curl_forms")] + public struct Forms { + public Curl.FormOption option; + public string value; + } + [CCode (cname = "CURLFORMcode", cprefix = "CURL_FORMADD_")] + public enum FormCode { + OK, + MEMORY, + OPTION_TWICE, + NULL, + UNKNOWN_OPTION, + INCOMPLETE, + ILLEGAL_ARRAY, + DISABLED + } + public Curl.FormCode formadd (ref Curl.HTTPPost httppost, ref Curl.HTTPPost last_post, ...); + [CCode (cname = "curl_formget_callback")] + public delegate size_t FormgetCallback (void* arg, [CCode (array_size_type = "size_t")] char[] buf); + public int formget (Curl.HTTPPost form, void* arg, Curl.FormgetCallback append); + public unowned string version (); + public void free (void* p); + [Compact] + [CCode (cname = "struct curl_slist", cprefix = "curl_slist_", free_function = "curl_slist_free_all")] + public class SList { + public char* data; + public Curl.SList next; + public SList append (string data); + } + [CCode (cname = "CURLMcode", cprefix = "CURLM_")] + public enum MultiCode { + CALL_MULTI_PERFORM, + CALL_MULTI_SOCKET, + OK, + BAD_HANDLE, + BAD_EASY_HANDLE, + OUT_OF_MEMORY, + INTERNAL_ERROR, + BAD_SOCKET, + UNKNOWN_OPTION + } + [CCode (cname = "CURLMSG", cprefix = "CURLMSG_")] + public enum MessageType { + NONE, + DONE + } + [CCode (cname = "CURLMsg")] + public struct Message { + public Curl.MessageType msg; + public Curl.EasyHandle easy_handle; + [CCode (cname = "data.whatever")] + public void* whatever; + [CCode (cname = "data.result")] + public Curl.Code result; + } + [Compact] + [CCode (cname = "CURLM", cprefix = "curl_multi_", free_function = "curl_multi_cleanup")] + public class MultiHandle { + [CCode (cname = "curl_multi_init")] + public MultiHandle (); + public Curl.MultiCode add_handle (Curl.EasyHandle curl_handle); + public Curl.MultiCode remove_handle (Curl.EasyHandle curl_handle); + public Curl.MultiCode fdset (Posix.fd_set? read_fd_set, Posix.fd_set? write_fd_set, Posix.fd_set? exc_fd_set, out int max_fd); + public Curl.MultiCode perform (out int running_handles); + public unowned Curl.Message info_read (out int msgs_in_queue); + public unowned string strerror (Curl.MultiCode code); + public Curl.MultiCode socket_action (Curl.Socket s, int ev_bitmask, out int running_handles); + public Curl.MultiCode socket_all (out int running_handles); + public Curl.MultiCode timeout (out long milliseconds); + [Printf] + public Curl.MultiCode setopt (Curl.MultiOption option, ...); + public Curl.MultiCode assign (Curl.Socket sockfd, void* sockp); + } + [CCode (has_target = false)] + public delegate int TimerCallback (Curl.MultiHandle multi, long timeout_ms, void* userp); + [SimpleType] + [CCode (cname = "curl_socket_t")] + public struct Socket { + } + [SimpleType] + [CCode (cname = "curl_off_t")] + public struct Offset { + } + [CCode (cname = "CURL_SOCKET_BAD")] + public const Curl.Socket SOCKET_BAD; + [CCode (cname = "CURL_POLL_NONE")] + public const int POLL_NONE; + [CCode (cname = "CURL_POLL_IN")] + public const int POLL_IN; + [CCode (cname = "CURL_POLL_OUT")] + public const int POLL_OUT; + [CCode (cname = "CURL_POLL_INOUT")] + public const int POLL_INOUT; + [CCode (cname = "CURL_POLL_REMOVE")] + public const int POLL_REMOVE; + [CCode (cname = "CURL_SOCKET_TIMEOUT")] + public const int SOCKET_TIMEOUT; + [CCode (cname = "CURL_CSELECT_IN")] + public const int CSELECT_IN; + [CCode (cname = "CURL_CSELECT_OUT")] + public const int CSELECT_OUT; + [CCode (cname = "CURL_CSELECT_ERR")] + public const int CSELECT_ERR; + [CCode (cname = "CURLMoption")] + public enum MultiOption { + SOCKETFUNCTION, + SOCKETDATA, + PIPELINING, + TIMERFUNCTION, + TIMERDATA, + MAXCONNECTS + } + [Compact] + [CCode (cname = "curl_httppost", unref_function = "curl_formfree")] + public class HTTPPost { + public Curl.HTTPPost next; + [CCode (array_length_cname = "namelength", array_length_type = "long")] + public weak char[] name; + [CCode (array_length_cname = "contentslength", array_length_type = "long")] + public weak char[] contents; + [CCode (array_length_cname = "bufferlength", array_length_type = "long")] + public weak char[] buffer; + public string contenttype; + public Curl.SList contentheader; + public Curl.HTTPPost more; + public long flags; + public string showfilename; + public void* userp; + [CCode (cname = "HTTPPOST_FILENAME")] + public const long FILENAME; + [CCode (cname = "HTTPPOST_READFILE")] + public const long READFILE; + [CCode (cname = "HTTPPOST_PTRCONTENTS")] + public const long PTRCONTENTS; + [CCode (cname = "HTTPPOST_BUFFER")] + public const long BUFFER; + [CCode (cname = "HTTPPOST_PTRBUFFER")] + public const long PTRBUFFER; + [CCode (cname = "HTTPPOST_CALLBACK")] + public const long CALLBACK; + } + [CCode (cname = "LIBCURL_COPYRIGHT")] + public const string COPYRIGHT; + [CCode (cname = "LIBCURL_VERSION")] + public const string VERSION; + [CCode (cname = "LIBCURL_VERSION_MAJOR")] + public const int VERSION_MAJOR; + [CCode (cname = "LIBCURL_VERSION_MINOR")] + public const int VERSION_MINOR; + [CCode (cname = "LIBCURL_VERSION_PATCH")] + public const int VERSION_PATCH; + [CCode (cname = "LIBCURL_VERSION_NUM")] + public const int VERSION_NUM; + [CCode (cname = "LIBCURL_TIMESTAMP")] + public const string TIMESTAMP; +} diff --git a/vapi/libebook-1.2.deps b/vapi/libebook-1.2.deps new file mode 100644 index 0000000..f2942b2 --- /dev/null +++ b/vapi/libebook-1.2.deps @@ -0,0 +1 @@ +libedataserver-1.2 diff --git a/vapi/libebook-1.2.vapi b/vapi/libebook-1.2.vapi new file mode 100644 index 0000000..3c34214 --- /dev/null +++ b/vapi/libebook-1.2.vapi @@ -0,0 +1,768 @@ +/* libebook-1.2.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "E", lower_case_cprefix = "e_")] +namespace E { + [Compact] + [CCode (cheader_filename = "libebook/e-book.h")] + public class AddressWestern { + public weak string country; + public weak string extended; + public weak string locality; + public weak string po_box; + public weak string postal_code; + public weak string region; + public weak string street; + public static unowned E.AddressWestern parse (string in_address); + } + [CCode (cheader_filename = "libebook/e-book.h")] + public class Book : GLib.Object { + [CCode (has_construct_function = false)] + public Book (E.Source source) throws GLib.Error; + public bool add_contact (E.Contact contact) throws GLib.Error; + public bool add_contacts (GLib.List contacts) throws GLib.Error; + public uint async_add_contact (E.Contact contact, E.BookIdCallback cb, void* closure); + public uint async_add_contacts (GLib.List contacts, E.BookCallback cb, void* closure); + public uint async_authenticate_user (string user, string passwd, string auth_method, E.BookCallback cb, void* closure); + public uint async_commit_contact (E.Contact contact, E.BookCallback cb, void* closure); + public uint async_commit_contacts (GLib.List contacts, E.BookCallback cb, void* closure); + public uint async_get_book_view (E.BookQuery query, GLib.List requested_fields, int max_results, E.BookBookViewCallback cb, void* closure); + public uint async_get_changes (string changeid, E.BookListCallback cb, void* closure); + public uint async_get_contact (string id, E.BookContactCallback cb, void* closure); + public uint async_get_contacts (E.BookQuery query, E.BookListCallback cb, void* closure); + public uint async_get_required_fields (E.BookEListCallback cb, void* closure); + public uint async_get_supported_auth_methods (E.BookEListCallback cb, void* closure); + public uint async_get_supported_fields (E.BookEListCallback cb, void* closure); + public uint async_open (bool only_if_exists, E.BookCallback open_response, void* closure); + public uint async_remove (E.BookCallback cb, void* closure); + public uint async_remove_all_contacts (E.BookCallback cb, void* closure); + public uint async_remove_contact (E.Contact contact, E.BookCallback cb, void* closure); + public uint async_remove_contact_by_id (string id, E.BookCallback cb, void* closure); + public uint async_remove_contacts (GLib.List ids, E.BookCallback cb, void* closure); + public bool authenticate_user (string user, string passwd, string auth_method) throws GLib.Error; + public bool cancel () throws GLib.Error; + public bool check_static_capability (string cap); + public bool commit_contact (E.Contact contact) throws GLib.Error; + public bool commit_contacts (GLib.List contacts) throws GLib.Error; + [CCode (has_construct_function = false)] + public Book.default_addressbook () throws GLib.Error; + public static GLib.Quark error_quark (); + public static void free_change_list (GLib.List change_list); + [CCode (has_construct_function = false)] + public Book.from_uri (string uri) throws GLib.Error; + public static bool get_addressbooks (out unowned E.SourceList addressbook_sources) throws GLib.Error; + public bool get_book_view (E.BookQuery query, GLib.List requested_fields, int max_results, out unowned E.BookView book_view) throws GLib.Error; + public bool get_changes (string changeid, GLib.List changes) throws GLib.Error; + public bool get_contact (string id, out unowned E.Contact contact) throws GLib.Error; + public bool get_contacts (E.BookQuery query, GLib.List contacts) throws GLib.Error; + public bool get_required_fields (GLib.List fields) throws GLib.Error; + public static bool get_self (out unowned E.Contact contact, out unowned E.Book book) throws GLib.Error; + public unowned E.Source get_source (); + public unowned string get_static_capabilities () throws GLib.Error; + public bool get_supported_auth_methods (GLib.List auth_methods) throws GLib.Error; + public bool get_supported_fields (GLib.List fields) throws GLib.Error; + public unowned string get_uri (); + public bool is_online (); + public bool is_opened (); + public static bool is_self (E.Contact contact); + public bool is_writable (); + public bool open (bool only_if_exists) throws GLib.Error; + public bool remove () throws GLib.Error; + public bool remove_all_contacts () throws GLib.Error; + public bool remove_contact (string id) throws GLib.Error; + public bool remove_contacts (GLib.List ids) throws GLib.Error; + public bool set_default_addressbook () throws GLib.Error; + public static bool set_default_source (E.Source source) throws GLib.Error; + public bool set_self (E.Contact contact) throws GLib.Error; + [CCode (has_construct_function = false)] + public Book.system_addressbook () throws GLib.Error; + public static void util_remove_duplicates (GLib.List haystack, GLib.List needles, GLib.List duplicate_ids); + public bool util_remove_duplicates_using_book (GLib.List contacts, GLib.List duplicate_ids) throws GLib.Error; + public virtual signal void auth_required (); + public virtual signal void backend_died (); + public virtual signal void connection_status (bool connected); + public virtual signal void writable_status (bool writable); + } + [Compact] + [CCode (cheader_filename = "libebook/e-book.h")] + public class BookChange { + public E.BookChangeType change_type; + public weak E.Contact contact; + } + [Compact] + [CCode (ref_function = "e_book_query_ref", unref_function = "e_book_query_unref", type_id = "E_TYPE_BOOK_QUERY", cheader_filename = "libebook/e-book.h")] + public class BookQuery { + public static unowned E.BookQuery and (int nqs, out unowned E.BookQuery qs, bool unref); + public unowned E.BookQuery andv (); + public static unowned E.BookQuery any_field_contains (string value); + public unowned E.BookQuery copy (); + public static unowned E.BookQuery field_exists (E.ContactField field); + public static unowned E.BookQuery field_test (E.ContactField field, E.BookQueryTest test, string value); + public static unowned E.BookQuery from_string (string query_string); + public unowned E.BookQuery not (bool unref); + public static unowned E.BookQuery or (int nqs, out unowned E.BookQuery qs, bool unref); + public unowned E.BookQuery orv (); + public unowned string to_string (); + public static unowned E.BookQuery vcard_field_exists (string field); + public static unowned E.BookQuery vcard_field_test (string field, E.BookQueryTest test, string value); + } + [CCode (cheader_filename = "libebook/e-book.h")] + public class BookSExp : GLib.Object { + [CCode (has_construct_function = false)] + public BookSExp (string text); + public bool match_contact (E.Contact contact); + public bool match_vcard (string vcard); + public bool parse (string text); + } + [CCode (cheader_filename = "libebook/e-book.h")] + public class BookView : GLib.Object { + public void* get_book (); + public bool get_parse_vcards (); + public void* get_query (); + public bool is_freezable (); + public void set_freezable (bool freezable); + public void set_parse_vcards (bool parse_vcards); + public void set_sort_order (string query_term); + public void start (); + public void stop (); + public void thaw (); + public virtual signal void contacts_added (void* contacts); + public virtual signal void contacts_changed (void* contacts); + public virtual signal void contacts_removed (void* ids); + public virtual signal void sequence_complete (int status); + public virtual signal void status_message (string message); + } + [CCode (cheader_filename = "libebook/e-book.h")] + public class Contact : E.VCard { + [CCode (has_construct_function = false)] + public Contact (); + public unowned E.Contact duplicate (); + public static E.ContactField field_id (string field_name); + public static E.ContactField field_id_from_vcard (string vcard_field); + public static unowned string field_name (E.ContactField field_id); + [CCode (has_construct_function = false)] + public Contact.from_vcard (string vcard); + public void* @get (E.ContactField field_id); + public unowned GLib.List get_attributes (E.ContactField field_id); + public void* get_const (E.ContactField field_id); + public bool inline_data (); + public bool is_syncable (); + public bool persist_data (string dir); + public static unowned string pretty_name (E.ContactField field_id); + public void @set (E.ContactField field_id, void* value); + public void set_attributes (E.ContactField field_id, GLib.List attributes); + public static unowned string vcard_attribute (E.ContactField field_id); + [NoAccessorMethod] + public string Rev { owned get; set; } + [NoAccessorMethod] + public void* address { get; set; } + [NoAccessorMethod] + public E.ContactAddress address_home { owned get; set; } + [NoAccessorMethod] + public string address_label_home { owned get; set; } + [NoAccessorMethod] + public string address_label_other { owned get; set; } + [NoAccessorMethod] + public string address_label_work { owned get; set; } + [NoAccessorMethod] + public E.ContactAddress address_other { owned get; set; } + [NoAccessorMethod] + public E.ContactAddress address_work { owned get; set; } + [NoAccessorMethod] + public E.ContactDate anniversary { owned get; set; } + [NoAccessorMethod] + public string assistant { owned get; set; } + [NoAccessorMethod] + public string assistant_phone { owned get; set; } + [NoAccessorMethod] + public E.ContactDate birth_date { owned get; set; } + [NoAccessorMethod] + public string blog_url { owned get; set; } + [NoAccessorMethod] + public string book_uri { owned get; set; } + [NoAccessorMethod] + public string business_fax { owned get; set; } + [NoAccessorMethod] + public string business_phone { owned get; set; } + [NoAccessorMethod] + public string business_phone_2 { owned get; set; } + [NoAccessorMethod] + public string callback_phone { owned get; set; } + [NoAccessorMethod] + public string caluri { owned get; set; } + [NoAccessorMethod] + public string car_phone { owned get; set; } + [NoAccessorMethod] + public string categories { owned get; set; } + [NoAccessorMethod] + public void* category_list { get; set; } + [NoAccessorMethod] + public string company_phone { owned get; set; } + [NoAccessorMethod] + public void* email { get; set; } + [NoAccessorMethod] + public string email_1 { owned get; set; } + [NoAccessorMethod] + public string email_2 { owned get; set; } + [NoAccessorMethod] + public string email_3 { owned get; set; } + [NoAccessorMethod] + public string email_4 { owned get; set; } + [NoAccessorMethod] + public string family_name { owned get; set; } + [NoAccessorMethod] + public string fburl { owned get; set; } + [NoAccessorMethod] + public string file_as { owned get; set; } + [NoAccessorMethod] + public string full_name { owned get; set; } + [NoAccessorMethod] + public E.ContactGeo geo { owned get; set; } + [NoAccessorMethod] + public string given_name { owned get; set; } + [NoAccessorMethod] + public string home_fax { owned get; set; } + [NoAccessorMethod] + public string home_phone { owned get; set; } + [NoAccessorMethod] + public string home_phone_2 { owned get; set; } + [NoAccessorMethod] + public string homepage_url { owned get; set; } + [NoAccessorMethod] + public string icscalendar { owned get; set; } + [NoAccessorMethod] + public string id { owned get; set; } + [NoAccessorMethod] + public void* im_aim { get; set; } + [NoAccessorMethod] + public string im_aim_home_1 { owned get; set; } + [NoAccessorMethod] + public string im_aim_home_2 { owned get; set; } + [NoAccessorMethod] + public string im_aim_home_3 { owned get; set; } + [NoAccessorMethod] + public string im_aim_work_1 { owned get; set; } + [NoAccessorMethod] + public string im_aim_work_2 { owned get; set; } + [NoAccessorMethod] + public string im_aim_work_3 { owned get; set; } + [NoAccessorMethod] + public void* im_gadugadu { get; set; } + [NoAccessorMethod] + public string im_gadugadu_home_1 { owned get; set; } + [NoAccessorMethod] + public string im_gadugadu_home_2 { owned get; set; } + [NoAccessorMethod] + public string im_gadugadu_home_3 { owned get; set; } + [NoAccessorMethod] + public string im_gadugadu_work_1 { owned get; set; } + [NoAccessorMethod] + public string im_gadugadu_work_2 { owned get; set; } + [NoAccessorMethod] + public string im_gadugadu_work_3 { owned get; set; } + [NoAccessorMethod] + public void* im_groupwise { get; set; } + [NoAccessorMethod] + public string im_groupwise_home_1 { owned get; set; } + [NoAccessorMethod] + public string im_groupwise_home_2 { owned get; set; } + [NoAccessorMethod] + public string im_groupwise_home_3 { owned get; set; } + [NoAccessorMethod] + public string im_groupwise_work_1 { owned get; set; } + [NoAccessorMethod] + public string im_groupwise_work_2 { owned get; set; } + [NoAccessorMethod] + public string im_groupwise_work_3 { owned get; set; } + [NoAccessorMethod] + public void* im_icq { get; set; } + [NoAccessorMethod] + public string im_icq_home_1 { owned get; set; } + [NoAccessorMethod] + public string im_icq_home_2 { owned get; set; } + [NoAccessorMethod] + public string im_icq_home_3 { owned get; set; } + [NoAccessorMethod] + public string im_icq_work_1 { owned get; set; } + [NoAccessorMethod] + public string im_icq_work_2 { owned get; set; } + [NoAccessorMethod] + public string im_icq_work_3 { owned get; set; } + [NoAccessorMethod] + public void* im_jabber { get; set; } + [NoAccessorMethod] + public string im_jabber_home_1 { owned get; set; } + [NoAccessorMethod] + public string im_jabber_home_2 { owned get; set; } + [NoAccessorMethod] + public string im_jabber_home_3 { owned get; set; } + [NoAccessorMethod] + public string im_jabber_work_1 { owned get; set; } + [NoAccessorMethod] + public string im_jabber_work_2 { owned get; set; } + [NoAccessorMethod] + public string im_jabber_work_3 { owned get; set; } + [NoAccessorMethod] + public void* im_msn { get; set; } + [NoAccessorMethod] + public string im_msn_home_1 { owned get; set; } + [NoAccessorMethod] + public string im_msn_home_2 { owned get; set; } + [NoAccessorMethod] + public string im_msn_home_3 { owned get; set; } + [NoAccessorMethod] + public string im_msn_work_1 { owned get; set; } + [NoAccessorMethod] + public string im_msn_work_2 { owned get; set; } + [NoAccessorMethod] + public string im_msn_work_3 { owned get; set; } + [NoAccessorMethod] + public void* im_skype { get; set; } + [NoAccessorMethod] + public string im_skype_home_1 { owned get; set; } + [NoAccessorMethod] + public string im_skype_home_2 { owned get; set; } + [NoAccessorMethod] + public string im_skype_home_3 { owned get; set; } + [NoAccessorMethod] + public string im_skype_work_1 { owned get; set; } + [NoAccessorMethod] + public string im_skype_work_2 { owned get; set; } + [NoAccessorMethod] + public string im_skype_work_3 { owned get; set; } + [NoAccessorMethod] + public void* im_yahoo { get; set; } + [NoAccessorMethod] + public string im_yahoo_home_1 { owned get; set; } + [NoAccessorMethod] + public string im_yahoo_home_2 { owned get; set; } + [NoAccessorMethod] + public string im_yahoo_home_3 { owned get; set; } + [NoAccessorMethod] + public string im_yahoo_work_1 { owned get; set; } + [NoAccessorMethod] + public string im_yahoo_work_2 { owned get; set; } + [NoAccessorMethod] + public string im_yahoo_work_3 { owned get; set; } + [NoAccessorMethod] + public string isdn_phone { owned get; set; } + [NoAccessorMethod] + public bool list { get; set; } + [NoAccessorMethod] + public bool list_show_addresses { get; set; } + [NoAccessorMethod] + public E.ContactPhoto logo { owned get; set; } + [NoAccessorMethod] + public string mailer { owned get; set; } + [NoAccessorMethod] + public string manager { owned get; set; } + [NoAccessorMethod] + public string mobile_phone { owned get; set; } + [NoAccessorMethod] + public E.ContactName name { owned get; set; } + [NoAccessorMethod] + public string name_or_org { owned get; } + [NoAccessorMethod] + public string nickname { owned get; set; } + [NoAccessorMethod] + public string note { owned get; set; } + [NoAccessorMethod] + public string office { owned get; set; } + [NoAccessorMethod] + public string org { owned get; set; } + [NoAccessorMethod] + public string org_unit { owned get; set; } + [NoAccessorMethod] + public string other_fax { owned get; set; } + [NoAccessorMethod] + public string other_phone { owned get; set; } + [NoAccessorMethod] + public string pager { owned get; set; } + [NoAccessorMethod] + public void* phone { get; set; } + [NoAccessorMethod] + public E.ContactPhoto photo { owned get; set; } + [NoAccessorMethod] + public string primary_phone { owned get; set; } + [NoAccessorMethod] + public string radio { owned get; set; } + [NoAccessorMethod] + public string role { owned get; set; } + [NoAccessorMethod] + public void* sip { get; set; } + [NoAccessorMethod] + public string spouse { owned get; set; } + [NoAccessorMethod] + public string telex { owned get; set; } + [NoAccessorMethod] + public string title { owned get; set; } + [NoAccessorMethod] + public string tty { owned get; set; } + [NoAccessorMethod] + public string video_url { owned get; set; } + [NoAccessorMethod] + public bool wants_html { get; set; } + [NoAccessorMethod] + public E.ContactCert x509Cert { owned get; set; } + } + [Compact] + [CCode (type_id = "E_TYPE_CONTACT_ADDRESS", cheader_filename = "libebook/e-book.h")] + public class ContactAddress { + public weak string address_format; + public weak string code; + public weak string country; + public weak string ext; + public weak string locality; + public weak string po; + public weak string region; + public weak string street; + } + [Compact] + [CCode (type_id = "E_TYPE_CONTACT_CERT", cheader_filename = "libebook/e-book.h")] + public class ContactCert { + public weak string data; + public size_t length; + } + [Compact] + [CCode (type_id = "E_TYPE_CONTACT_DATE", cheader_filename = "libebook/e-book.h")] + public class ContactDate { + public uint day; + public uint month; + public uint year; + [CCode (has_construct_function = false)] + public ContactDate (); + public bool equal (E.ContactDate dt2); + public static unowned E.ContactDate from_string (string str); + public unowned string to_string (); + } + [Compact] + [CCode (type_id = "E_TYPE_CONTACT_GEO", cheader_filename = "libebook/e-book.h")] + public class ContactGeo { + public double latitude; + public double longitude; + } + [Compact] + [CCode (copy_function = "e_contact_name_copy", type_id = "E_TYPE_CONTACT_NAME", cheader_filename = "libebook/e-book.h")] + public class ContactName { + public weak string additional; + public weak string family; + public weak string given; + public weak string prefixes; + public weak string suffixes; + [CCode (has_construct_function = false)] + public ContactName (); + public unowned E.ContactName copy (); + public static unowned E.ContactName from_string (string name_str); + public unowned string to_string (); + } + [Compact] + [CCode (type_id = "E_TYPE_CONTACT_PHOTO", cheader_filename = "libebook/e-book.h")] + public class ContactPhoto { + public void* data; + public E.ContactPhotoType type; + } + [Compact] + [CCode (cheader_filename = "libebook/e-book.h")] + public class NameWestern { + public weak string first; + public weak string full; + public weak string last; + public weak string middle; + public weak string nick; + public weak string prefix; + public weak string suffix; + public static unowned E.NameWestern parse (string full_name); + } + [CCode (cheader_filename = "libebook/e-book.h")] + public class VCard : GLib.Object { + [CCode (has_construct_function = false)] + public VCard (); + public virtual void add_attribute (E.VCardAttribute attr); + public void add_attribute_with_value (owned E.VCardAttribute attr, string value); + public void add_attribute_with_values (owned E.VCardAttribute attr, ...); + public bool @construct (string str); + public bool construct_with_uid (string str, string uid); + public void dump_structure (); + public static unowned string escape_string (string s); + [CCode (has_construct_function = false)] + public VCard.from_string (string str); + public unowned E.VCardAttribute get_attribute (string name); + public unowned GLib.List get_attributes (); + public bool is_parsed (); + public bool is_parsing (); + public virtual void remove_attribute (E.VCardAttribute attr); + public void remove_attributes (string attr_group, string attr_name); + public unowned string to_string (E.VCardFormat format); + public static unowned string unescape_string (string s); + public static unowned GLib.List util_split_cards (string str, size_t len); + } + [Compact] + [CCode (copy_function = "e_vcard_attribute_copy", type_id = "E_TYPE_VCARD_ATTRIBUTE", cheader_filename = "libebook/e-book.h")] + public class VCardAttribute { + [CCode (has_construct_function = false)] + public VCardAttribute (string? attr_group, string attr_name); + public void add_param (E.VCardAttributeParam param); + public void add_param_with_value (owned E.VCardAttributeParam param, string value); + public void add_param_with_values (owned E.VCardAttributeParam param, ...); + public void add_value (string value); + public void add_value_decoded (string value, int len); + public void add_values (); + public unowned E.VCardAttribute copy (); + public bool equal (E.VCardAttribute attr_b); + public unowned string get_group (); + public unowned string get_name (); + public unowned GLib.List get_param (string name); + public unowned GLib.List get_params (); + public unowned string get_value (); + public unowned GLib.StringBuilder get_value_decoded (); + public unowned GLib.List get_values (); + public unowned GLib.List get_values_decoded (); + public bool has_type (string typestr); + public bool is_single_valued (); + public void remove_param (string param_name); + public void remove_param_value (string param_name, string s); + public void remove_params (); + public void remove_value (string s); + public void remove_values (); + } + [Compact] + [CCode (copy_function = "e_vcard_attribute_param_copy", cheader_filename = "libebook/e-book.h")] + public class VCardAttributeParam { + [CCode (has_construct_function = false)] + public VCardAttributeParam (string name); + public void add_value (string value); + public void add_values (); + public unowned E.VCardAttributeParam copy (); + public unowned string get_name (); + public unowned GLib.List get_values (); + public void remove_values (); + } + [CCode (cprefix = "E_BOOK_CHANGE_CARD_", has_type_id = false, cheader_filename = "libebook/e-book.h")] + public enum BookChangeType { + ADDED, + DELETED, + MODIFIED + } + [CCode (cprefix = "E_BOOK_QUERY_", has_type_id = false, cheader_filename = "libebook/e-book.h")] + public enum BookQueryTest { + IS, + CONTAINS, + BEGINS_WITH, + ENDS_WITH + } + [CCode (cprefix = "E_BOOK_ERROR_", has_type_id = false, cheader_filename = "libebook/e-book.h")] + public enum BookStatus { + OK, + INVALID_ARG, + BUSY, + REPOSITORY_OFFLINE, + NO_SUCH_BOOK, + NO_SELF_CONTACT, + SOURCE_NOT_LOADED, + SOURCE_ALREADY_LOADED, + PERMISSION_DENIED, + CONTACT_NOT_FOUND, + CONTACT_ID_ALREADY_EXISTS, + PROTOCOL_NOT_SUPPORTED, + CANCELLED, + COULD_NOT_CANCEL, + AUTHENTICATION_FAILED, + AUTHENTICATION_REQUIRED, + TLS_NOT_AVAILABLE, + CORBA_EXCEPTION, + NO_SUCH_SOURCE, + OFFLINE_UNAVAILABLE, + OTHER_ERROR, + INVALID_SERVER_VERSION, + NO_SPACE, + INVALID_FIELD + } + [CCode (cprefix = "E_BOOK_VIEW_", has_type_id = false, cheader_filename = "libebook/e-book.h")] + public enum BookViewStatus { + STATUS_OK, + STATUS_TIME_LIMIT_EXCEEDED, + STATUS_SIZE_LIMIT_EXCEEDED, + ERROR_INVALID_QUERY, + ERROR_QUERY_REFUSED, + ERROR_OTHER_ERROR + } + [CCode (cprefix = "E_CONTACT_", has_type_id = false, cheader_filename = "libebook/e-book.h")] + public enum ContactField { + UID, + FILE_AS, + BOOK_URI, + FULL_NAME, + GIVEN_NAME, + FAMILY_NAME, + NICKNAME, + EMAIL_1, + EMAIL_2, + EMAIL_3, + EMAIL_4, + MAILER, + ADDRESS_LABEL_HOME, + ADDRESS_LABEL_WORK, + ADDRESS_LABEL_OTHER, + PHONE_ASSISTANT, + PHONE_BUSINESS, + PHONE_BUSINESS_2, + PHONE_BUSINESS_FAX, + PHONE_CALLBACK, + PHONE_CAR, + PHONE_COMPANY, + PHONE_HOME, + PHONE_HOME_2, + PHONE_HOME_FAX, + PHONE_ISDN, + PHONE_MOBILE, + PHONE_OTHER, + PHONE_OTHER_FAX, + PHONE_PAGER, + PHONE_PRIMARY, + PHONE_RADIO, + PHONE_TELEX, + PHONE_TTYTDD, + ORG, + ORG_UNIT, + OFFICE, + TITLE, + ROLE, + MANAGER, + ASSISTANT, + HOMEPAGE_URL, + BLOG_URL, + CATEGORIES, + CALENDAR_URI, + FREEBUSY_URL, + ICS_CALENDAR, + VIDEO_URL, + SPOUSE, + NOTE, + IM_AIM_HOME_1, + IM_AIM_HOME_2, + IM_AIM_HOME_3, + IM_AIM_WORK_1, + IM_AIM_WORK_2, + IM_AIM_WORK_3, + IM_GROUPWISE_HOME_1, + IM_GROUPWISE_HOME_2, + IM_GROUPWISE_HOME_3, + IM_GROUPWISE_WORK_1, + IM_GROUPWISE_WORK_2, + IM_GROUPWISE_WORK_3, + IM_JABBER_HOME_1, + IM_JABBER_HOME_2, + IM_JABBER_HOME_3, + IM_JABBER_WORK_1, + IM_JABBER_WORK_2, + IM_JABBER_WORK_3, + IM_YAHOO_HOME_1, + IM_YAHOO_HOME_2, + IM_YAHOO_HOME_3, + IM_YAHOO_WORK_1, + IM_YAHOO_WORK_2, + IM_YAHOO_WORK_3, + IM_MSN_HOME_1, + IM_MSN_HOME_2, + IM_MSN_HOME_3, + IM_MSN_WORK_1, + IM_MSN_WORK_2, + IM_MSN_WORK_3, + IM_ICQ_HOME_1, + IM_ICQ_HOME_2, + IM_ICQ_HOME_3, + IM_ICQ_WORK_1, + IM_ICQ_WORK_2, + IM_ICQ_WORK_3, + REV, + NAME_OR_ORG, + ADDRESS, + ADDRESS_HOME, + ADDRESS_WORK, + ADDRESS_OTHER, + CATEGORY_LIST, + PHOTO, + LOGO, + NAME, + EMAIL, + IM_AIM, + IM_GROUPWISE, + IM_JABBER, + IM_YAHOO, + IM_MSN, + IM_ICQ, + WANTS_HTML, + IS_LIST, + LIST_SHOW_ADDRESSES, + BIRTH_DATE, + ANNIVERSARY, + X509_CERT, + IM_GADUGADU_HOME_1, + IM_GADUGADU_HOME_2, + IM_GADUGADU_HOME_3, + IM_GADUGADU_WORK_1, + IM_GADUGADU_WORK_2, + IM_GADUGADU_WORK_3, + IM_GADUGADU, + GEO, + TEL, + SIP, + IM_SKYPE_HOME_1, + IM_SKYPE_HOME_2, + IM_SKYPE_HOME_3, + IM_SKYPE_WORK_1, + IM_SKYPE_WORK_2, + IM_SKYPE_WORK_3, + IM_SKYPE, + FIELD_LAST, + FIELD_FIRST, + LAST_SIMPLE_STRING, + FIRST_PHONE_ID, + LAST_PHONE_ID, + FIRST_EMAIL_ID, + LAST_EMAIL_ID, + FIRST_ADDRESS_ID, + LAST_ADDRESS_ID, + FIRST_LABEL_ID, + LAST_LABEL_ID + } + [CCode (cprefix = "E_CONTACT_PHOTO_TYPE_", has_type_id = false, cheader_filename = "libebook/e-book.h")] + public enum ContactPhotoType { + INLINED, + URI + } + [CCode (cprefix = "EVC_FORMAT_VCARD_", has_type_id = false, cheader_filename = "libebook/e-book.h")] + public enum VCardFormat { + @21, + @30 + } + [CCode (cheader_filename = "libebook/e-book.h", has_target = false)] + public delegate void BookBookViewCallback (E.Book book, E.BookStatus status, E.BookView book_view, void* closure); + [CCode (cheader_filename = "libebook/e-book.h", has_target = false)] + public delegate void BookCallback (E.Book book, E.BookStatus status, void* closure); + [CCode (cheader_filename = "libebook/e-book.h", has_target = false)] + public delegate void BookContactCallback (E.Book book, E.BookStatus status, E.Contact contact, void* closure); + [CCode (cheader_filename = "libebook/e-book.h", has_target = false)] + public delegate void BookEListCallback (E.Book book, E.BookStatus status, E.List list, void* closure); + [CCode (cheader_filename = "libebook/e-book.h", has_target = false)] + public delegate void BookIdCallback (E.Book book, E.BookStatus status, string id, void* closure); + [CCode (cheader_filename = "libebook/e-book.h", has_target = false)] + public delegate void BookListCallback (E.Book book, E.BookStatus status, GLib.List list, void* closure); + [CCode (cheader_filename = "libebook/e-book.h", has_target = false)] + public delegate void BookOpenProgressCallback (E.Book book, string status_message, short percent, void* closure); + [CCode (cname = "EVC_EMAIL", cheader_filename = "libebook/e-book.h")] + public const string EVC_EMAIL; + [CCode (cname = "EVC_FN", cheader_filename = "libebook/e-book.h")] + public const string EVC_FN; + [CCode (cname = "EVC_N", cheader_filename = "libebook/e-book.h")] + public const string EVC_N; + [CCode (cname = "EVC_TEL", cheader_filename = "libebook/e-book.h")] + public const string EVC_TEL; + [CCode (cname = "EVC_TYPE", cheader_filename = "libebook/e-book.h")] + public const string EVC_TYPE; + [CCode (cheader_filename = "libebook/e-book.h")] + public const int PARAM_READABLE; + [CCode (cheader_filename = "libebook/e-book.h")] + public const int PARAM_READWRITE; + [CCode (cheader_filename = "libebook/e-book-util.h")] + public static unowned string normalize_phone_number (string phone_number); +} diff --git a/vapi/libedataserver-1.2.deps b/vapi/libedataserver-1.2.deps new file mode 100644 index 0000000..dacbf26 --- /dev/null +++ b/vapi/libedataserver-1.2.deps @@ -0,0 +1,2 @@ +gconf-2.0 +libxml-2.0 diff --git a/vapi/libedataserver-1.2.vapi b/vapi/libedataserver-1.2.vapi new file mode 100644 index 0000000..f68afd4 --- /dev/null +++ b/vapi/libedataserver-1.2.vapi @@ -0,0 +1,605 @@ +/* libedataserver-1.2.vapi generated by lt-vapigen, do not modify. */ + +[CCode (cprefix = "E", lower_case_cprefix = "e_")] +namespace E { + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class Account : GLib.Object { + public bool always_bcc; + public bool always_cc; + public weak string bcc_addrs; + public weak string cc_addrs; + public weak string drafts_folder_uri; + public bool enabled; + public weak E.AccountIdentity id; + public weak string name; + public weak string parent_uid; + public bool pgp_always_sign; + public bool pgp_always_trust; + public bool pgp_encrypt_to_self; + public weak string pgp_key; + public bool pgp_no_imip_sign; + public E.AccountReceiptPolicy receipt_policy; + public weak string sent_folder_uri; + public bool smime_encrypt_default; + public weak string smime_encrypt_key; + public bool smime_encrypt_to_self; + public bool smime_sign_default; + public weak string smime_sign_key; + public weak E.AccountService source; + public weak E.AccountService transport; + public weak string uid; + [CCode (has_construct_function = false)] + public Account (); + [CCode (has_construct_function = false)] + public Account.from_xml (string xml); + public bool get_bool (E.e_account_item_t type); + public int get_int (E.e_account_item_t type); + public unowned string get_string (E.e_account_item_t type); + public void import (E.Account src); + public void set_bool (E.e_account_item_t type, bool p3); + public bool set_from_xml (string xml); + public void set_int (E.e_account_item_t type, int p3); + public void set_string (E.e_account_item_t type, string p3); + public unowned string to_xml (); + public static unowned string uid_from_xml (string xml); + public bool writable (E.e_account_item_t type); + public bool writable_option (string protocol, string option); + public virtual signal void changed (int field); + } + [Compact] + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class AccountIdentity { + public weak string address; + public weak string name; + public weak string organization; + public weak string reply_to; + public weak string sig_uid; + } + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class AccountList : E.List { + [CCode (has_construct_function = false)] + public AccountList (GConf.Client gconf); + public int account_has_proxies (E.Account p2); + public void add (E.Account p2); + public void change (E.Account p2); + public void @construct (GConf.Client gconf); + public unowned E.Account find (E.e_account_find_t type, string key); + public unowned E.Account get_default (); + public void prune_proxies (); + public void remove (E.Account p2); + public void remove_account_proxies (E.Account p2); + public void save (); + public void set_default (E.Account p2); + public virtual signal void account_added (E.Account p0); + public virtual signal void account_changed (E.Account p0); + public virtual signal void account_removed (E.Account p0); + } + [Compact] + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class AccountService { + public bool auto_check; + public int auto_check_time; + public bool get_password_canceled; + public bool keep_on_server; + public bool save_passwd; + public weak string url; + } + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class FileCache : GLib.Object { + [CCode (has_construct_function = false)] + public FileCache (string filename); + public bool add_object (string key, string value); + public bool clean (); + public void freeze_changes (); + public unowned string get_filename (); + public unowned GLib.SList get_keys (); + public unowned string get_object (string key); + public unowned GLib.SList get_objects (); + public bool remove (); + public bool remove_object (string key); + public bool replace_object (string key, string new_value); + public void thaw_changes (); + public string filename { get; construct; } + } + [Compact] + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class Flag { + [CCode (has_construct_function = false)] + public Flag (); + public void clear (); + public bool is_set (); + public void @set (); + public bool timed_wait (GLib.TimeVal abs_time); + public void wait (); + } + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class Iterator : GLib.Object { + public void @delete (); + public virtual void* @get (); + public virtual void insert (void* object, bool before); + public virtual bool is_valid (); + public virtual void last (); + public virtual bool next (); + public virtual bool prev (); + [NoWrapper] + public virtual void remove (); + public virtual void reset (); + public virtual void @set (void* object); + public virtual signal void invalidate (); + } + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class List : GLib.Object { + public void* closure; + public weak E.ListCopyFunc copy; + public weak E.ListFreeFunc free; + public weak GLib.List iterators; + public weak GLib.List list; + [CCode (has_construct_function = false)] + public List (E.ListCopyFunc copy, E.ListFreeFunc free, void* closure); + public void append (void* data); + public void @construct (E.ListCopyFunc copy, E.ListFreeFunc free, void* closure); + public unowned E.List duplicate (); + public unowned E.Iterator get_iterator (); + public void invalidate_iterators (E.Iterator skip); + public int length (); + public void remove (void* data); + public void remove_iterator (E.Iterator iterator); + public void remove_link (GLib.List link); + } + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class ListIterator : E.Iterator { + public weak GLib.List iterator; + public weak E.List list; + [CCode (type = "EIterator*", has_construct_function = false)] + public ListIterator (E.List list); + } + [Compact] + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class MD5Context { + [CCode (array_length = false)] + public weak uint32[] bits; + [CCode (array_length = false)] + public weak uint32[] buf; + [CCode (array_length = false)] + public weak uchar[] @in; + } + [Compact] + [CCode (free_function = "e_memchunk_destroy", cheader_filename = "libedataserver-1.2.h")] + public class MemChunk { + [CCode (cname = "e_memchunk_new", has_construct_function = false)] + public MemChunk (int atomcount, int atomsize); + [CCode (cname = "e_memchunk_alloc")] + public void* alloc (); + [CCode (cname = "e_memchunk_alloc0")] + public void* alloc0 (); + [CCode (cname = "e_memchunk_clean")] + public void clean (); + [CCode (cname = "e_memchunk_empty")] + public void empty (); + [CCode (cname = "e_memchunk_free")] + public void free (void* mem); + } + [Compact] + [CCode (free_function = "e_mempool_destroy", cheader_filename = "libedataserver-1.2.h")] + public class MemPool { + [CCode (cname = "e_mempool_new", has_construct_function = false)] + public MemPool (int blocksize, int threshold, E.MemPoolFlags flags); + [CCode (cname = "e_mempool_alloc")] + public void* alloc (int size); + [CCode (cname = "e_mempool_flush")] + public void flush (int freeall); + [CCode (cname = "e_mempool_strdup")] + public unowned string strdup (string str); + } + [Compact] + [CCode (free_function = "e_poolv_destroy", cheader_filename = "libedataserver-1.2.h")] + public class Poolv { + [CCode (has_construct_function = false)] + public Poolv (uint size); + public unowned E.Poolv cpy (E.Poolv src); + public unowned string @get (int index); + public unowned E.Poolv @set (int index, string str, int freeit); + } + [Compact] + [CCode (ref_function = "e_sexp_ref", ref_function_void = true, unref_function = "e_sexp_unref", cheader_filename = "libedataserver-1.2.h")] + public class SExp { + public weak string error; + public int refcount; + public void* result_chunks; + public weak GLib.Scanner scanner; + public void* term_chunks; + public weak E.SExpTerm tree; + [CCode (has_construct_function = false)] + public SExp (); + public void add_function (int scope, string name, E.SExpFunc func, void* data); + public void add_ifunction (int scope, string name, E.SExpIFunc func, void* data); + public void add_variable (int scope, string name, E.SExpTerm value); + public static void encode_bool (GLib.StringBuilder s, bool state); + public static void encode_string (GLib.StringBuilder s, string str); + public unowned E.SExpResult eval (); + public static void fatal_error (void* f, string why); + public void input_file (int fd); + public void input_text (string text, int len); + public int parse (); + public void remove_symbol (int scope, string name); + public static void resultv_free (void* f, int argc, void* argv); + public int set_scope (int scope); + } + [Compact] + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class SExpClass { + public int dummy; + } + [Compact] + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class SExpFunc { + } + [Compact] + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class SExpIFunc { + } + [Compact] + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class SExpResult { + public void* value; + [CCode (has_construct_function = false)] + public SExpResult (void* f, int type); + } + [Compact] + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class SExpSymbol { + public void* data; + public void* f; + public weak string name; + public int type; + } + [Compact] + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class SExpTerm { + public void* value; + public static unowned E.SExpResult eval (void* f, void* t); + } + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class Source : GLib.Object { + [CCode (has_construct_function = false)] + public Source (string name, string relative_uri); + public unowned string build_absolute_uri (); + public unowned E.Source copy (); + public void dump_to_xml_node (Xml.Node parent_node); + public bool equal (E.Source source_2); + public void foreach_property (GLib.HFunc func, void* data); + [CCode (has_construct_function = false)] + public Source.from_standalone_xml (string xml); + [CCode (has_construct_function = false)] + public Source.from_xml_node (Xml.Node node); + public bool get_color (uint32 color_return); + public unowned string get_duped_property (string property); + public unowned string get_property (string property); + public bool get_readonly (); + public unowned string get_uri (); + public unowned string peek_absolute_uri (); + public unowned string peek_color_spec (); + public unowned E.SourceGroup peek_group (); + public unowned string peek_name (); + public unowned string peek_relative_uri (); + public unowned string peek_uid (); + public void set_absolute_uri (string absolute_uri); + public void set_color (uint32 color); + public void set_color_spec (string color_spec); + public void set_group (E.SourceGroup group); + public void set_name (string name); + public void set_property (string property, string value); + public void set_readonly (bool readonly); + public void set_relative_uri (string relative_uri); + public unowned string to_standalone_xml (); + public static unowned string uid_from_xml_node (Xml.Node node); + public void unset_color (); + public bool update_from_xml_node (Xml.Node node, bool changed_return); + [CCode (has_construct_function = false)] + public Source.with_absolute_uri (string name, string absolute_uri); + public virtual signal void changed (); + } + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class SourceGroup : GLib.Object { + [CCode (has_construct_function = false)] + public SourceGroup (string name, string base_uri); + public bool add_source (E.Source source, int position); + public void foreach_property (GLib.HFunc func, void* data); + [CCode (has_construct_function = false)] + public SourceGroup.from_xml (string xml); + [CCode (has_construct_function = false)] + public SourceGroup.from_xmldoc (Xml.Doc doc); + public unowned string get_property (string property); + public bool get_readonly (); + public unowned string peek_base_uri (); + public unowned string peek_name (); + public unowned E.Source peek_source_by_name (string source_name); + public unowned E.Source peek_source_by_uid (string source_uid); + public unowned GLib.SList peek_sources (); + public unowned string peek_uid (); + public bool remove_source (E.Source source); + public bool remove_source_by_uid (string uid); + public void set_base_uri (string base_uri); + public void set_name (string name); + public void set_property (string property, string value); + public void set_readonly (bool readonly); + public unowned string to_xml (); + public static unowned string uid_from_xmldoc (Xml.Doc doc); + public bool update_from_xml (string xml, bool changed_return); + public bool update_from_xmldoc (Xml.Doc doc, bool changed_return); + public virtual signal void changed (); + public virtual signal void source_added (GLib.Object source); + public virtual signal void source_removed (GLib.Object source); + } + [CCode (cheader_filename = "libedataserver-1.2.h")] + public class SourceList : GLib.Object { + [CCode (has_construct_function = false)] + public SourceList (); + public bool add_group (E.SourceGroup group, int position); + [CCode (has_construct_function = false)] + public SourceList.for_gconf (GConf.Client client, string path); + [CCode (has_construct_function = false)] + public SourceList.for_gconf_default (string path); + public bool is_gconf_updated (); + public unowned E.SourceGroup peek_group_by_name (string name); + public unowned E.SourceGroup peek_group_by_uid (string uid); + public unowned GLib.SList peek_groups (); + public unowned E.Source peek_source_any (); + public unowned E.Source peek_source_by_uid (string uid); + public bool remove_group (E.SourceGroup group); + public bool remove_group_by_uid (string uid); + public bool remove_source_by_uid (string uidj); + public bool sync () throws GLib.Error; + public virtual signal void changed (); + public virtual signal void group_added (void* group); + public virtual signal void group_removed (void* group); + } + [Compact] + [CCode (free_function = "e_strv_destroy", cheader_filename = "libedataserver-1.2.h")] + public class Strv { + [CCode (has_construct_function = false)] + public Strv (int size); + public unowned string @get (int index); + public unowned E.Strv pack (); + public unowned E.Strv @set (int index, string str); + public unowned E.Strv set_ref (int index, string str); + public unowned E.Strv set_ref_free (int index, string str); + } + [Compact] + [CCode (copy_function = "e_uri_copy", cheader_filename = "libedataserver-1.2.h")] + public class Uri { + public weak string authmech; + public weak string fragment; + public weak string host; + public weak string passwd; + public weak string path; + public int port; + public weak string protocol; + public weak string query; + public weak string user; + [CCode (has_construct_function = false)] + public Uri (string uri_string); + public unowned E.Uri copy (); + public unowned string get_param (string name); + public unowned string to_string (bool show_password); + } + [Compact] + [CCode (free_function = "e_xmlhash_destroy", cheader_filename = "libedataserver-1.2.h")] + public class XmlHash { + [CCode (cname = "e_xmlhash_new", has_construct_function = false)] + public XmlHash (string filename); + [CCode (cname = "e_xmlhash_add")] + public void add (string key, string data); + [CCode (cname = "e_xmlhash_compare")] + public E.XmlHashStatus compare (string key, string compare_data); + [CCode (cname = "e_xmlhash_foreach_key")] + public void foreach_key (E.XmlHashFunc func); + [CCode (cname = "e_xmlhash_foreach_key_remove")] + public void foreach_key_remove (E.XmlHashRemoveFunc func); + [CCode (cname = "e_xmlhash_remove")] + public void remove (string key); + [CCode (cname = "e_xmlhash_write")] + public void write (); + } + [CCode (cprefix = "E_ACCOUNT_RECEIPT_", has_type_id = "0", cheader_filename = "libedataserver-1.2.h")] + public enum AccountReceiptPolicy { + NEVER, + ASK, + ALWAYS + } + [CCode (cprefix = "E_MEMPOOL_ALIGN_", has_type_id = "0", cheader_filename = "libedataserver-1.2.h")] + public enum MemPoolFlags { + STRUCT, + WORD, + BYTE, + MASK + } + [CCode (cprefix = "E_TIME_PARSE_", has_type_id = "0", cheader_filename = "libedataserver-1.2.h")] + public enum TimeParseStatus { + OK, + NONE, + INVALID + } + [CCode (cprefix = "E_XMLHASH_STATUS_", has_type_id = "0", cheader_filename = "libedataserver-1.2.h")] + public enum XmlHashStatus { + SAME, + DIFFERENT, + NOT_FOUND + } + [CCode (cprefix = "E_XML_HASH_TYPE_", has_type_id = "0", cheader_filename = "libedataserver-1.2.h")] + public enum XmlHashType { + OBJECT_UID, + PROPERTY + } + [CCode (cprefix = "E_ACCOUNT_ACCESS_", has_type_id = "0", cheader_filename = "libedataserver-1.2.h")] + public enum e_account_access_t { + WRITE + } + [CCode (cprefix = "E_ACCOUNT_FIND_", has_type_id = "0", cheader_filename = "libedataserver-1.2.h")] + public enum e_account_find_t { + NAME, + UID, + ID_NAME, + ID_ADDRESS, + PARENT_UID + } + [CCode (cprefix = "E_ACCOUNT_", has_type_id = "0", cheader_filename = "libedataserver-1.2.h")] + public enum e_account_item_t { + NAME, + ID_NAME, + ID_ADDRESS, + ID_REPLY_TO, + ID_ORGANIZATION, + ID_SIGNATURE, + SOURCE_URL, + SOURCE_KEEP_ON_SERVER, + SOURCE_AUTO_CHECK, + SOURCE_AUTO_CHECK_TIME, + SOURCE_SAVE_PASSWD, + TRANSPORT_URL, + TRANSPORT_SAVE_PASSWD, + DRAFTS_FOLDER_URI, + SENT_FOLDER_URI, + CC_ALWAYS, + CC_ADDRS, + BCC_ALWAYS, + BCC_ADDRS, + RECEIPT_POLICY, + PGP_KEY, + PGP_ENCRYPT_TO_SELF, + PGP_ALWAYS_SIGN, + PGP_NO_IMIP_SIGN, + PGP_ALWAYS_TRUST, + SMIME_SIGN_KEY, + SMIME_ENCRYPT_KEY, + SMIME_SIGN_DEFAULT, + SMIME_ENCRYPT_TO_SELF, + SMIME_ENCRYPT_DEFAULT, + PROXY_PARENT_UID, + ITEM_LAST + } + [CCode (cheader_filename = "libedataserver-1.2.h", has_target = false)] + public delegate void* ListCopyFunc (void* data, void* closure); + [CCode (cheader_filename = "libedataserver-1.2.h", has_target = false)] + public delegate void ListFreeFunc (void* data, void* closure); + [CCode (cheader_filename = "libedataserver-1.2.h")] + public delegate void XmlHashFunc (string key, string value); + [CCode (cheader_filename = "libedataserver-1.2.h")] + public delegate bool XmlHashRemoveFunc (string key, string value); + [CCode (cheader_filename = "libedataserver-1.2.h")] + public const int LOG_INVALID_DOMAIN; + [CCode (cheader_filename = "libedataserver-1.2.h")] + public const int TYPE_SEXP; + [CCode (cname = "e_categories_add", cheader_filename = "libedataserver-1.2.h")] + public static void e_categories_add (string category, string unused, string icon_file, bool searchable); + [CCode (cname = "e_categories_exist", cheader_filename = "libedataserver-1.2.h")] + public static bool e_categories_exist (string category); + [CCode (cname = "e_categories_get_color_for", cheader_filename = "libedataserver-1.2.h")] + public static unowned string e_categories_get_color_for (string category); + [CCode (cname = "e_categories_get_icon_file_for", cheader_filename = "libedataserver-1.2.h")] + public static unowned string e_categories_get_icon_file_for (string category); + [CCode (cname = "e_categories_get_list", cheader_filename = "libedataserver-1.2.h")] + public static unowned GLib.List e_categories_get_list (); + [CCode (cname = "e_categories_is_searchable", cheader_filename = "libedataserver-1.2.h")] + public static bool e_categories_is_searchable (string category); + [CCode (cname = "e_categories_remove", cheader_filename = "libedataserver-1.2.h")] + public static void e_categories_remove (string category); + [CCode (cname = "e_categories_set_color_for", cheader_filename = "libedataserver-1.2.h")] + public static void e_categories_set_color_for (string category, string color); + [CCode (cname = "e_categories_set_icon_file_for", cheader_filename = "libedataserver-1.2.h")] + public static void e_categories_set_icon_file_for (string category, string icon_file); + [CCode (cname = "e_filename_make_safe", cheader_filename = "libedataserver-1.2.h")] + public static void e_filename_make_safe (string str); + [CCode (cname = "e_localtime_with_offset", cheader_filename = "libedataserver-1.2.h")] + public static void e_localtime_with_offset (ulong tt, void* tm, int offset); + [CCode (cname = "e_log_get_id", cheader_filename = "libedataserver-1.2.h")] + public static int e_log_get_id (string domain); + [CCode (cname = "e_log_real", cheader_filename = "libedataserver-1.2.h")] + public static void e_log_real (int domain_id, GLib.LogLevelFlags log_level, string format); + [CCode (cname = "e_log_set_domains", cheader_filename = "libedataserver-1.2.h")] + public static void e_log_set_domains (string domains); + [CCode (cname = "e_log_set_level", cheader_filename = "libedataserver-1.2.h")] + public static void e_log_set_level (GLib.LogLevelFlags log_level); + [CCode (cname = "e_log_set_level_from_string", cheader_filename = "libedataserver-1.2.h")] + public static void e_log_set_level_from_string (string str); + [CCode (cname = "e_log_will_print", cheader_filename = "libedataserver-1.2.h")] + public static bool e_log_will_print (int domain_id, GLib.LogLevelFlags log_level); + [CCode (cname = "e_mktime_utc", cheader_filename = "libedataserver-1.2.h")] + public static ulong e_mktime_utc (void* tm); + [CCode (cname = "e_strftime", cheader_filename = "libedataserver-1.2.h")] + public static size_t e_strftime (string s, size_t max, string fmt, void* tm); + [CCode (cname = "e_time_format_date_and_time", cheader_filename = "libedataserver-1.2.h")] + public static void e_time_format_date_and_time (void* date_tm, bool use_24_hour_format, bool show_midnight, bool show_zero_seconds, string buffer, int buffer_size); + [CCode (cname = "e_time_format_time", cheader_filename = "libedataserver-1.2.h")] + public static void e_time_format_time (void* date_tm, bool use_24_hour_format, bool show_zero_seconds, string buffer, int buffer_size); + [CCode (cname = "e_time_get_d_fmt_with_4digit_year", cheader_filename = "libedataserver-1.2.h")] + public static unowned string e_time_get_d_fmt_with_4digit_year (); + [CCode (cname = "e_time_parse_date", cheader_filename = "libedataserver-1.2.h")] + public static E.TimeParseStatus e_time_parse_date (string value, void* _result); + [CCode (cname = "e_time_parse_date_and_time", cheader_filename = "libedataserver-1.2.h")] + public static E.TimeParseStatus e_time_parse_date_and_time (string value, void* _result); + [CCode (cname = "e_time_parse_date_and_time_ex", cheader_filename = "libedataserver-1.2.h")] + public static E.TimeParseStatus e_time_parse_date_and_time_ex (string value, void* _result, bool two_digit_year); + [CCode (cname = "e_time_parse_date_ex", cheader_filename = "libedataserver-1.2.h")] + public static E.TimeParseStatus e_time_parse_date_ex (string value, void* _result, bool two_digit_year); + [CCode (cname = "e_time_parse_time", cheader_filename = "libedataserver-1.2.h")] + public static E.TimeParseStatus e_time_parse_time (string value, void* _result); + [CCode (cname = "e_uid_new", cheader_filename = "libedataserver-1.2.h")] + public static unowned string e_uid_new (); + [CCode (cname = "e_url_equal", cheader_filename = "libedataserver-1.2.h")] + public static bool e_url_equal (string url1, string url2); + [CCode (cname = "e_url_shroud", cheader_filename = "libedataserver-1.2.h")] + public static unowned string e_url_shroud (string url); + [CCode (cname = "e_utf8_strftime", cheader_filename = "libedataserver-1.2.h")] + public static size_t e_utf8_strftime (string s, size_t max, string fmt, void* tm); + [CCode (cname = "e_util_mkdir_hier", cheader_filename = "libedataserver-1.2.h")] + public static int e_util_mkdir_hier (string path, uint mode); + [CCode (cname = "e_util_strstrcase", cheader_filename = "libedataserver-1.2.h")] + public static unowned string e_util_strstrcase (string haystack, string needle); + [CCode (cname = "e_util_unicode_get_utf8", cheader_filename = "libedataserver-1.2.h")] + public static unowned string e_util_unicode_get_utf8 (string text, unichar @out); + [CCode (cname = "e_util_utf8_strcasecmp", cheader_filename = "libedataserver-1.2.h")] + public static int e_util_utf8_strcasecmp (string s1, string s2); + [CCode (cname = "e_util_utf8_strstrcase", cheader_filename = "libedataserver-1.2.h")] + public static unowned string e_util_utf8_strstrcase (string haystack, string needle); + [CCode (cname = "e_util_utf8_strstrcasedecomp", cheader_filename = "libedataserver-1.2.h")] + public static unowned string e_util_utf8_strstrcasedecomp (string haystack, string needle); + [CCode (cname = "e_xml_destroy_hash", cheader_filename = "libedataserver-1.2.h")] + public static void e_xml_destroy_hash (GLib.HashTable hash); + [CCode (cname = "e_xml_from_hash", cheader_filename = "libedataserver-1.2.h")] + public static unowned Xml.Doc e_xml_from_hash (GLib.HashTable hash, E.XmlHashType type, string root_node); + [CCode (cname = "e_xml_get_child_by_name", cheader_filename = "libedataserver-1.2.h")] + public static unowned Xml.Node e_xml_get_child_by_name (Xml.Node parent, string child_name); + [CCode (cname = "e_xml_parse_file", cheader_filename = "libedataserver-1.2.h")] + public static unowned Xml.Doc e_xml_parse_file (string filename); + [CCode (cname = "e_xml_save_file", cheader_filename = "libedataserver-1.2.h")] + public static int e_xml_save_file (string filename, Xml.Doc doc); + [CCode (cname = "e_xml_to_hash", cheader_filename = "libedataserver-1.2.h")] + public static unowned GLib.HashTable e_xml_to_hash (Xml.Doc doc, E.XmlHashType type); + [CCode (cname = "eds_module_initialize", cheader_filename = "libedataserver-1.2.h")] + public static void eds_module_initialize (GLib.TypeModule module); + [CCode (cname = "eds_module_list_types", cheader_filename = "libedataserver-1.2.h")] + public static void eds_module_list_types (GLib.Type[] types, int num_types); + [CCode (cname = "eds_module_shutdown", cheader_filename = "libedataserver-1.2.h")] + public static void eds_module_shutdown (); + [CCode (cname = "e_data_server_extension_list_free", cheader_filename = "libedataserver-1.2.h")] + public static void extension_list_free (GLib.List list); + [CCode (cname = "e_data_server_get_extensions_for_type", cheader_filename = "libedataserver-1.2.h")] + public static unowned GLib.List get_extensions_for_type (GLib.Type type); + [CCode (cname = "md5_final", cheader_filename = "libedataserver-1.2.h")] + public static void md5_final (E.MD5Context ctx, uchar[] digest); + [CCode (cname = "md5_get_digest", cheader_filename = "libedataserver-1.2.h")] + public static void md5_get_digest (string buffer, int buffer_size, uchar[] digest); + [CCode (cname = "md5_get_digest_from_file", cheader_filename = "libedataserver-1.2.h")] + public static void md5_get_digest_from_file (string filename, uchar[] digest); + [CCode (cname = "md5_init", cheader_filename = "libedataserver-1.2.h")] + public static void md5_init (E.MD5Context ctx); + [CCode (cname = "md5_update", cheader_filename = "libedataserver-1.2.h")] + public static void md5_update (E.MD5Context ctx, uchar[] buf, uint32 len); + [CCode (cname = "e_data_server_module_add_type", cheader_filename = "libedataserver-1.2.h")] + public static void module_add_type (GLib.Type type); + [CCode (cname = "e_data_server_module_init", cheader_filename = "libedataserver-1.2.h")] + public static void module_init (); + [CCode (cname = "e_data_server_module_remove_unused", cheader_filename = "libedataserver-1.2.h")] + public static void module_remove_unused (); +} diff --git a/vapi/libhildonmime.deps b/vapi/libhildonmime.deps new file mode 100644 index 0000000..6c0da8a --- /dev/null +++ b/vapi/libhildonmime.deps @@ -0,0 +1,2 @@ +dbus-glib-1 +gnome-vfs-2.0 diff --git a/vapi/libhildonmime.vapi b/vapi/libhildonmime.vapi new file mode 100644 index 0000000..2fa8034 --- /dev/null +++ b/vapi/libhildonmime.vapi @@ -0,0 +1,91 @@ +[CCode (cheader_filename = "hildon-uri.h")] +namespace Hildon { + + [CCode (cprefix = "HILDON_URI_ACTION_")] + public enum URIActionType { + NORMAL, + NEUTRAL, + FALLBACK + } + + public errordomain URIError { + INVALID_URI, + INVALID_ACTION, + INVALID_SCHEME, + NO_DEFAULT_ACTION, + OPEN_FAILED, + SAVE_FAILED, + DBUS_FAILED, + NO_ACTIONS + } + + [CCode (cprefix = "hildon_uri_", ref_function = "hildon_uri_action_ref", unref_function = "hildon_uri_action_unref", cheader_filename = "hildon-uri.h")] + public class URIAction { + public Hildon.URIActionType get_type (); + [CCode (cname = "hildon_uri_action_get_name")] + public unowned string get_name (); + [CCode (cname = "hildon_uri_action_get_service")] + public unowned string get_service (); + [CCode (cname = "hildon_uri_action_get_method")] + public unowned string get_method (); + [CCode (cname = "hildon_uri_action_get_translation_domain")] + public unowned string get_translation_domain (); + public static GLib.SList get_actions (string scheme) throws GLib.Error; + public static GLib.SList get_actions_by_uri (string uri_str, Hildon.URIActionType type) throws GLib.Error; + public static void free_actions (GLib.SList list); + public static string get_scheme_from_uri (string uri) throws GLib.Error; + public bool is_default_action () throws GLib.Error; + [CCode (instance_pos = -2)] + public bool is_default_action_by_uri (string uri) throws GLib.Error; + public static Hildon.URIAction get_default_action (string scheme) throws GLib.Error; + public static Hildon.URIAction get_default_action_by_uri (string uri) throws GLib.Error; + [CCode (instance_pos = -2)] + public bool set_default_action (string scheme) throws GLib.Error; + [CCode (instance_pos = -2)] + public bool set_default_action_by_uri (string uri_str) throws GLib.Error; + [CCode (instance_pos = -2)] + public bool open (string uri) throws GLib.Error; + } + +} + +[CCode (cheader_filename = "hildon-mime.h")] +namespace HildonMime { + + public errordomain PatternsError { + INTERNAL + } + + GLib.SList patterns_get_for_mime_type (string mime_type) throws GLib.Error; + + public enum Category { + BOOKMARKS, + CONTACTS, + DOCUMENTS, + EMAILS, + IMAGES, + AUDIO, + VIDEO, + OTHER, + ALL + } + + public HildonMime.Category get_category_for_mime_type (string mime_type); + public GLib.List get_mime_types_for_category (HildonMime.Category category); + [CCode (cname = "hildon_mime_types_list_free")] + public void mime_types_list_free (GLib.List list); + + public int open_file (DBus.RawConnection con, string file); + public int open_file_list (DBus.RawConnection con, GLib.SList files); + public int open_file_with_mime_type (DBus.RawConnection con, string file, string mime_type); + + public unowned string get_category_name (HildonMime.Category category); + public HildonMime.Category get_category_from_name (string name); + + public GLib.List application_get_mime_types (string application_id); + public void application_mime_types_list_free (GLib.List mime_types); + + [CCode (array_length = -1)] + string[] get_icon_names (string mime_type, GnomeVFS.FileInfo file_info); +} + diff --git a/vapi/liblocation.vapi b/vapi/liblocation.vapi new file mode 100644 index 0000000..0bf6456 --- /dev/null +++ b/vapi/liblocation.vapi @@ -0,0 +1,154 @@ +[CCode (cprefix = "Location", lower_case_cprefix = "location_")] +namespace Location { + [Compact] + [CCode (cheader_filename = "location/location-gps-device.h")] + public class CellInfo { + public int flags; + public weak Location._gsm_cell_info gsm_cell_info; + public weak Location._wcdma_cell_info wcdma_cell_info; + } + [CCode (cheader_filename = "location/location-gpsd-control.h")] + public class GPSDControl : GLib.Object { + public int get_allowed_methods (); + public static unowned Location.GPSDControl get_default (); + public void request_status (); + public void start (); + public void stop (); + [NoAccessorMethod] + public void* maincontext_pointer { set; } + [NoAccessorMethod] + public int preferred_interval { get; set; } + [NoAccessorMethod] + public int preferred_method { get; set; } + public virtual signal void error (); + public virtual signal void error_verbose (int error); + public virtual signal void gpsd_running (); + public virtual signal void gpsd_stopped (); + } + [Compact] + [CCode (cheader_filename = "location/location-gpsd-control.h")] + public class GPSDControlMethod { + } + [CCode (cheader_filename = "location/location-gps-device.h")] + public class GPSDevice : GLib.Object { + public weak Location.CellInfo cell_info; + public weak Location.GPSDeviceFix fix; + public bool online; + public weak GLib.PtrArray satellites; + public int satellites_in_use; + public int satellites_in_view; + public Location.GPSDeviceStatus status; + public void reset_last_known (); + public void start (); + public void stop (); + public virtual signal void changed (); + public virtual signal void connected (); + public virtual signal void disconnected (); + } + [Compact] + [CCode (cheader_filename = "location/location-gps-device.h")] + public class GPSDeviceFix { + public double altitude; + public double climb; + public double dip; + public double epc; + public double epd; + public double eph; + public double eps; + public double ept; + public double epv; + public uint32 fields; + public double latitude; + public double longitude; + public Location.GPSDeviceMode mode; + public double pitch; + public double roll; + public double speed; + public double time; + public double track; + } + [Compact] + [CCode (cheader_filename = "location/location-gps-device.h")] + public class GPSDeviceSatellite { + public int azimuth; + public int elevation; + public bool in_use; + public int prn; + public int signal_strength; + } + [CCode (cheader_filename = "location/location-gpsd-control.h")] + public struct _gsm_cell_info { + } + [CCode (cheader_filename = "location/location-gpsd-control.h")] + public struct _wcdma_cell_info { + } + [CCode (cprefix = "LOCATION_ERROR_", has_type_id = false, cheader_filename = "location/location-gpsd-control.h")] + public enum GPSDControlError { + USER_REJECTED_DIALOG, + USER_REJECTED_SETTINGS, + BT_GPS_NOT_AVAILABLE, + METHOD_NOT_ALLOWED_IN_OFFLINE_MODE, + SYSTEM + } + [CCode (cprefix = "LOCATION_INTERVAL_", has_type_id = false, cheader_filename = "location/location-gpsd-control.h")] + public enum GPSDControlInterval { + DEFAULT, + @1S, + @2S, + @5S, + @10S, + @20S, + @30S, + @60S, + @120S + } + [CCode (cprefix = "LOCATION_GPS_DEVICE_MODE_", has_type_id = false, cheader_filename = "location/location-gps-device.h")] + public enum GPSDeviceMode { + NOT_SEEN, + NO_FIX, + @2D, + @3D + } + [CCode (cprefix = "LOCATION_GPS_DEVICE_STATUS_", has_type_id = false, cheader_filename = "location/location-gps-device.h")] + public enum GPSDeviceStatus { + NO_FIX, + FIX, + DGPS_FIX + } + [CCode (cheader_filename = "location/location-gpsd-control.h")] + public const int CELL_INFO_GSM_CELL_INFO_SET; + [CCode (cheader_filename = "location/location-gpsd-control.h")] + public const int CELL_INFO_WCDMA_CELL_INFO_SET; + [CCode (cheader_filename = "location/location-gps-device.h")] + public const int GPS_DEVICE_ALTITUDE_SET; + [CCode (cheader_filename = "location/location-gps-device.h")] + public const int GPS_DEVICE_CLIMB_SET; + [CCode (cheader_filename = "location/location-gps-device.h")] + public const int GPS_DEVICE_LATLONG_SET; + [CCode (cheader_filename = "location/location-gps-device.h")] + public const int GPS_DEVICE_NONE_SET; + [CCode (cheader_filename = "location/location-gps-device.h")] + public const int GPS_DEVICE_SPEED_SET; + [CCode (cheader_filename = "location/location-gps-device.h")] + public const int GPS_DEVICE_TIME_SET; + [CCode (cheader_filename = "location/location-gps-device.h")] + public const int GPS_DEVICE_TRACK_SET; + [CCode (cheader_filename = "location/location-version.h")] + public const int MAJOR_VERSION; + [CCode (cheader_filename = "location/location-gpsd-control.h")] + public const int METHOD_ACWP; + [CCode (cheader_filename = "location/location-gpsd-control.h")] + public const int METHOD_AGNSS; + [CCode (cheader_filename = "location/location-gpsd-control.h")] + public const int METHOD_CWP; + [CCode (cheader_filename = "location/location-gpsd-control.h")] + public const int METHOD_GNSS; + [CCode (cheader_filename = "location/location-gpsd-control.h")] + public const int METHOD_USER_SELECTED; + [CCode (cheader_filename = "location/location-version.h")] + public const int MINOR_VERSION; + [CCode (cheader_filename = "location/location-distance-utils.h")] + public static double distance_between (double latitude_s, double longitude_s, double latitude_f, double longitude_f); + [CCode (cheader_filename = "location/location-misc.h")] + public static void make_resident (); +} diff --git a/vapi/libosso-abook-1.0.deps b/vapi/libosso-abook-1.0.deps new file mode 100644 index 0000000..3680c79 --- /dev/null +++ b/vapi/libosso-abook-1.0.deps @@ -0,0 +1,2 @@ +hildon-1 +libebook-1.2 diff --git a/vapi/libosso-abook-1.0.vapi b/vapi/libosso-abook-1.0.vapi new file mode 100644 index 0000000..d631093 --- /dev/null +++ b/vapi/libosso-abook-1.0.vapi @@ -0,0 +1,31 @@ +[CCode (cprefix = "OssoABook", +lower_case_cprefix = "osso_abook_")] +namespace OssoABook { + [CCode (cheader_filename = "libosso-abook/osso-abook-button.h")] + enum ButtonStyle { + NORMAL, + PICKER, + LABEL, + NOTE + } + [CCode (cheader_filename = "libosso-abook/osso-abook-button.h")] + class Button : Gtk.Button { + public Button (Hildon.SizeType size); + public Button.with_text (Hildon.SizeType size, string title, string value); + public void set_icon_name (string icon_name); + public void set_icon_visible (bool visible); + public string title { get; set; } + public string value { get; set; } + public OssoABook.ButtonStyle style { get; set; } + } + [CCode (cheader_filename = "libosso-abook/osso-abook-contact.h")] + class Contact : E.Contact { + public Contact (); + public Contact.new_from_vcard (string? uid, string vcard); + } + [CCode (cheader_filename = "libosso-abook/osso-abook-temporary-contact-dialog.h")] + class TemporaryContactDialog : Gtk.Dialog { + public TemporaryContactDialog (Gtk.Window? parent, E.Book? book, E.VCardAttribute? attribute, void *account); + public TemporaryContactDialog.with_contact (Gtk.Window? parent, OssoABook.Contact? contact); + } +} -- 1.7.9.5