AC_SUBST(GLIBGTK_CFLAGS)
dnl Ckeck for hildon-libs
-PKG_CHECK_MODULES(HILDON, hildon-libs libosso, HAVE_HILDON=yes, HAVE_HILDON=no)
+PKG_CHECK_MODULES(HILDON, hildon-libs, HAVE_HILDON=yes, HAVE_HILDON=no)
if test "x$HAVE_HILDON" = "xyes"; then
AC_DEFINE(WITH_HILDON, 1, [build with Maemo/Hildon user interface])
AC_MSG_RESULT(no)
fi
-AM_CONDITIONAL(WITH_HILDON, test "x$HAVE_HILDON" = "xyes")
-
dnl make HILDON_CFLAGS and HILDON_LIBS available
if test "x$HAVE_HILDON" = "xyes"; then
AC_SUBST(HILDON_CFLAGS)
AC_SUBST(HILDON_LIBS)
- PKG_CHECK_MODULES(OSSO, libosso >= 1 libossohelp osso-ic)
- AC_SUBST(OSSO_LIBS)
- AC_SUBST(OSSO_CFLAGS)
+ PKG_CHECK_MODULES(OSSO, libosso >= 1 libossohelp osso-ic, HAVE_OSSO=yes, HAVE_OSSO=no)
+ if test "x$HAVE_OSSO" = "xyes"; then
+ AC_DEFINE(WITH_OSSO, 1, [build with Nokia osso])
+ AC_SUBST(OSSO_LIBS)
+ AC_SUBST(OSSO_CFLAGS)
+ else
+ AC_MSG_RESULT(no)
+ fi
PKG_CHECK_MODULES(HILDON, hildon-libs >= 0.9.50 hildon-fm)
AC_SUBST(HILDON_LIBS)
AC_SUBST(HILDON_CFLAGS)
fi
+AM_CONDITIONAL(WITH_HILDON, test "x$HAVE_HILDON" = "xyes")
+AM_CONDITIONAL(WITH_OSSO, test "x$HAVE_OSSO" = "xyes")
+
PKG_CHECK_MODULES(BLUEZ, bluez)
AC_SUBST(BLUEZ_LIBS)
AC_SUBST(BLUEZ_CFLAGS)
#include <curl/multi.h>
#include <gconf/gconf-client.h>
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
#include <libosso.h>
#include <osso-helplib.h>
#include <osso-ic-dbus.h>
#include <osso-ic.h>
#include <bt-dbus.h>
+#include "maemo-osso.h"
+#endif
+#ifdef WITH_HILDON
#include <hildon-widgets/hildon-program.h>
#include <hildon-widgets/hildon-controlbar.h>
#include <hildon-widgets/hildon-note.h>
#include <hildon-widgets/hildon-system-sound.h>
#include <hildon-widgets/hildon-input-mode-hint.h>
#include <device_symbols.h>
-#include "maemo-osso.h"
#endif
#include <libintl.h>
g_tree_destroy(_pui_tree);
/* Finish up all downloads. */
- while (CURLM_CALL_MULTI_PERFORM
- == curl_multi_perform(_curl_multi, &num_transfers)
- || num_transfers) {
+ while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(_curl_multi, &num_transfers) || num_transfers) {
+ /* XXX: should inform the user why it's taking so damn long... */
}
/* Close all finished files. */
while ((msg = curl_multi_info_read(_curl_multi, &num_msgs))) {
if (msg->msg == CURLMSG_DONE) {
/* This is a map download. */
- ProgressUpdateInfo *pui =
- g_hash_table_lookup(_pui_by_easy,
- msg->easy_handle);
- g_queue_push_head(_curl_easy_queue,
- msg->easy_handle);
- g_hash_table_remove(_pui_by_easy,
- msg->easy_handle);
+ ProgressUpdateInfo *pui = g_hash_table_lookup(_pui_by_easy, msg->easy_handle);
+ g_queue_push_head(_curl_easy_queue, msg->easy_handle);
+ g_hash_table_remove(_pui_by_easy, msg->easy_handle);
fclose(pui->file);
- curl_multi_remove_handle(_curl_multi,
- msg->easy_handle);
+ curl_multi_remove_handle(_curl_multi, msg->easy_handle);
}
}
gint mapper_osso_init(void)
{
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
/* Initialize _osso. */
_osso = osso_initialize("org.tal.mapper", VERSION, TRUE, NULL);
if (!_osso) {
gint mapper_osso_cb_init(void)
{
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
if (OSSO_OK != osso_rpc_set_default_cb_f(_osso, dbus_cb_default, NULL)) {
g_printerr("osso_rpc_set_default_cb_f failed.\n");
return 1;
g_thread_init(NULL);
g_type_init();
+#ifdef WITH_OSSO
if (mapper_osso_init()!=0)
return 1;
+#endif
set_var_defaults();
gst_init(&argc, &argv);
gtk_init(&argc, &argv);
timezone_init();
gpx_init();
mapper_init(argc, argv);
+#ifdef WITH_OSSO
if (mapper_osso_cb_init()!=0)
return 1;
+#endif
gtk_main();
mapper_destroy();
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
osso_deinitialize(_osso);
#endif
vprintf("%s(): return\n", __PRETTY_FUNCTION__);
#include <locale.h>
#include <sqlite3.h>
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
#include <libosso.h>
#include <osso-helplib.h>
#include <osso-ic-dbus.h>
#include <osso-ic.h>
#include <bt-dbus.h>
+#include "maemo-osso.h"
+#include "iap.h"
+#endif
+#ifdef WITH_HILDON
#include <hildon-widgets/hildon-program.h>
#include <hildon-widgets/hildon-controlbar.h>
#include <hildon-widgets/hildon-note.h>
#include <hildon-widgets/hildon-system-sound.h>
#include <hildon-widgets/hildon-input-mode-hint.h>
#include <device_symbols.h>
-#include "iap.h"
-#include "maemo-osso.h"
#endif
#include "utils.h"