[maemo-commits] [maemo-commits] r16333 - in projects/haf/trunk/ke-recv: debian src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Oct 3 14:27:47 EEST 2008
Author: kihamala
Date: 2008-10-03 14:27:46 +0300 (Fri, 03 Oct 2008)
New Revision: 16333

Removed:
   projects/haf/trunk/ke-recv/src/ke-recv.service
Modified:
   projects/haf/trunk/ke-recv/debian/changelog
   projects/haf/trunk/ke-recv/debian/control
   projects/haf/trunk/ke-recv/debian/ke-recv.install
   projects/haf/trunk/ke-recv/src/Makefile.am
   projects/haf/trunk/ke-recv/src/ke-recv.c
Log:
fixing


Modified: projects/haf/trunk/ke-recv/debian/changelog
===================================================================
--- projects/haf/trunk/ke-recv/debian/changelog	2008-10-03 11:11:00 UTC (rev 16332)
+++ projects/haf/trunk/ke-recv/debian/changelog	2008-10-03 11:27:46 UTC (rev 16333)
@@ -2,7 +2,10 @@
 
   * Add noatime and nodiratime mount options.
   * Now that HAL is fixed, re-enable slot_name and cover detection code.
-  * Use g_nokia instead of g_ether in the startup script.
+  * Use g_nokia instead of g_ether in the startup script. Fixes: NB#87638
+  * Do not unmount anything on exit. Fixes: NB#87593
+  * Removed unused D-Bus service file. Fixes: NB#87149
+  * Removed dependency to libosso-filemanager-interface. Fixes: NB#87254
 
  -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Fri, 03 Oct 2008 12:35:43 +0300
 

Modified: projects/haf/trunk/ke-recv/debian/control
===================================================================
--- projects/haf/trunk/ke-recv/debian/control	2008-10-03 11:11:00 UTC (rev 16332)
+++ projects/haf/trunk/ke-recv/debian/control	2008-10-03 11:27:46 UTC (rev 16333)
@@ -2,7 +2,7 @@
 Section: base
 Priority: optional
 Maintainer: Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>
-Build-Depends: debhelper (>= 4.0.0), libosso-dev, libglib2.0-dev, pkg-config, osso-af-settings, libhildon1-dev, libxml-parser-perl, libgconf2-dev, libosso-gnomevfs2-dev, libhal-dev, libhildonmime-dev, libosso-filemanager-interface-dev
+Build-Depends: debhelper (>= 4.0.0), libosso-dev, libglib2.0-dev, pkg-config, osso-af-settings, libhildon1-dev, libxml-parser-perl, libgconf2-dev, libosso-gnomevfs2-dev, libhal-dev, libhildonmime-dev
 Standards-Version: 3.6.0
 
 Package: ke-recv

Modified: projects/haf/trunk/ke-recv/debian/ke-recv.install
===================================================================
--- projects/haf/trunk/ke-recv/debian/ke-recv.install	2008-10-03 11:11:00 UTC (rev 16332)
+++ projects/haf/trunk/ke-recv/debian/ke-recv.install	2008-10-03 11:27:46 UTC (rev 16333)
@@ -1,4 +1,3 @@
-../../src/*.service /usr/share/dbus-1/services
 ../../src/*.conf /etc/dbus-1/system.d
 ../../src/*.sh /usr/sbin
 ../../src/*.schemas /etc/gconf/schemas

Modified: projects/haf/trunk/ke-recv/src/Makefile.am
===================================================================
--- projects/haf/trunk/ke-recv/src/Makefile.am	2008-10-03 11:11:00 UTC (rev 16332)
+++ projects/haf/trunk/ke-recv/src/Makefile.am	2008-10-03 11:27:46 UTC (rev 16333)
@@ -11,14 +11,12 @@
 	`pkg-config --cflags hildon-1` \
 	`pkg-config --cflags hal` \
 	`pkg-config --cflags libhildonmime` \
-	`pkg-config --cflags libossofilemanagerinterface` \
 	-DLOCALEDIR=\"`pkg-config --variable=localedir osso-af-settings`\"
 
 ke_recv_LDFLAGS = \
 	`pkg-config --libs libosso` \
 	`pkg-config --libs hal` \
 	`pkg-config --libs libhildonmime` \
-	`pkg-config --libs libossofilemanagerinterface` \
 	`pkg-config --libs gconf-2.0`
 
 mmc_format_LDFLAGS = \

Modified: projects/haf/trunk/ke-recv/src/ke-recv.c
===================================================================
--- projects/haf/trunk/ke-recv/src/ke-recv.c	2008-10-03 11:11:00 UTC (rev 16332)
+++ projects/haf/trunk/ke-recv/src/ke-recv.c	2008-10-03 11:27:46 UTC (rev 16333)
@@ -640,6 +640,7 @@
         return DBUS_HANDLER_RESULT_HANDLED;
 }
 
+#if 0
 static void prepare_for_shutdown()
 {
         if (usb_state == S_PERIPHERAL) {
@@ -658,6 +659,7 @@
         }
         unmount_usb_volumes();
 }
+#endif
 
 static DBusHandlerResult
 sig_handler(DBusConnection *c, DBusMessage *m, void *data)
@@ -2579,12 +2581,47 @@
         }
 }
 
+static int open_fm_folder(const char *folder)
+{
+        DBusMessage* m = NULL;
+        DBusError err;
+        dbus_bool_t r;
+
+        assert(ses_conn != NULL);
+        dbus_error_init(&err);
+
+        m = dbus_message_new_method_call("com.nokia.osso_filemanager",
+                "/com/nokia/osso_filemanager",
+                "/com/nokia/osso_filemanager", "open_folder");
+        if (m == NULL) {
+                ULOG_ERR_F("couldn't create message");
+                return 0;
+        }
+
+        if (!dbus_message_append_args(m, DBUS_TYPE_STRING, &folder,
+                                      DBUS_TYPE_INVALID)) {
+                ULOG_ERR_F("dbus_message_append_args failed");
+                dbus_message_unref(m);
+                return 0;
+        }
+
+        dbus_error_init(&err);
+        r = dbus_connection_send(ses_conn, m, &err);
+        dbus_message_unref(m);
+        if (!r) {
+                ULOG_ERR_F("sending failed: %s", err.message);
+                dbus_error_free(&err);
+                return 0;
+        }
+        return 1;
+}
+
 static int launch_fm(void)
 {
         storage_info_t *si;
         char *mount_point = NULL;
         char buf[100];
-        osso_return_t ret;
+        int ret;
 
         /* try to find a volume that is mounted and has smallest
          * volume number. FIXME: this algorithm is really stupid... */
@@ -2625,9 +2662,9 @@
         snprintf(buf, 100, "file://%s", mount_point);
 
         ULOG_DEBUG_F("opening '%s' in File Manager", buf);
-        ret = osso_filemanager_open_folder(osso, buf);
-        if (ret != OSSO_OK) {
-                ULOG_ERR_F("osso_filemanager_open_folder failed");
+        ret = open_fm_folder(buf);
+        if (!ret) {
+                ULOG_ERR_F("open_fm_folder failed");
                 return 1;
         }
         return 1;
@@ -3021,7 +3058,9 @@
 
         g_main_loop_run(mainloop); 
         ULOG_DEBUG_L("Returned from the main loop");
+        /*
         prepare_for_shutdown();
+        */
         service_launcher_deinit(&launcher);
     
         exit(0);

Deleted: projects/haf/trunk/ke-recv/src/ke-recv.service
===================================================================
--- projects/haf/trunk/ke-recv/src/ke-recv.service	2008-10-03 11:11:00 UTC (rev 16332)
+++ projects/haf/trunk/ke-recv/src/ke-recv.service	2008-10-03 11:27:46 UTC (rev 16333)
@@ -1,3 +0,0 @@
-[D-BUS Service]
-Name=com.nokia.ke_recv
-Exec=/usr/sbin/ke-recv


More information about the maemo-commits mailing list