sl@0: /* Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.*/ sl@0: #include sl@0: sl@0: #define DBUS_COMPILATION /* cheat and use dbus-sysdeps */ sl@0: #ifndef __SYMBIAN32__ sl@0: #include sl@0: #include sl@0: #else sl@0: #include "dbus-sysdeps.h" sl@0: #include "dbus-spawn.h" sl@0: #endif //__SYMBIAN32__ sl@0: #undef DBUS_COMPILATION sl@0: #include sl@0: sl@0: static void sl@0: setup_func (void *data) sl@0: { sl@0: printf ("entering setup func.\n"); sl@0: } sl@0: sl@0: int sl@0: main (int argc, char **argv) sl@0: { sl@0: char **argv_copy; sl@0: int i; sl@0: DBusError error; sl@0: sl@0: if (argc < 2) sl@0: { sl@0: fprintf (stderr, "You need to specify a program to launch.\n"); sl@0: sl@0: return -1; sl@0: } sl@0: sl@0: argv_copy = dbus_new (char *, argc); sl@0: for (i = 0; i < argc - 1; i++) sl@0: argv_copy [i] = argv[i + 1]; sl@0: argv_copy[argc - 1] = NULL; sl@0: sl@0: if (!_dbus_spawn_async_with_babysitter (NULL, argv_copy, setup_func, NULL, &error)) sl@0: { sl@0: fprintf (stderr, "Could not launch application: \"%s\"\n", sl@0: error.message); sl@0: } sl@0: sl@0: return 0; sl@0: }