#define PKGDIR_PATH "/org/tizen/pkgdir_tool"
#define PKGDIR_INTERFACE "org.tizen.pkgdir_tool"
+#define MMC_POPUP_NOTI "SDcardNoti"
+#define MMC_INSERTED "inserted"
+#define MMC_REMOVED "removed"
+
#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
#define FILE_NAME_LEN_MAX 255
pdata.bdev->data->primary) {
create_external_apps_directory();
mmc_make_default_path(pdata.bdev->data->mount_point);
+
+ _D("prprprpr inserted");
+ ret = dbus_method_sync_var(POPUP_BUS_NAME,
+ POPUP_PATH_NOTI,
+ POPUP_INTERFACE_NOTI,
+ MMC_POPUP_NOTI,
+ g_variant_new("(s)", MMC_INSERTED));
+ if (ret != 0)
+ _E("Popup failed: %d", ret);
}
if (pdata.op == BLOCK_DEV_UNMOUNT) {
/* Remove file for block device /run/xxxxxx/id */
remove_file(pdata.bdev->data->id, pdata.bdev->data->block_type == BLOCK_EXTENDEDSD_DEV);
+
+ if (pdata.bdev->data->block_type == BLOCK_MMC_DEV &&
+ pdata.bdev->data->primary &&
+ BLOCK_IS_FLAG_SET(pdata.bdev->data, UNMOUNT_UNSAFE) ) {
+ _D("prprprpr unexpectedly removed");
+
+ ret = dbus_method_sync_var(POPUP_BUS_NAME,
+ POPUP_PATH_NOTI,
+ POPUP_INTERFACE_NOTI,
+ MMC_POPUP_NOTI,
+ g_variant_new("(s)", MMC_REMOVED));
+ if (ret != 0)
+ _E("Popup failed: %d", ret);
+ }
}
/* Broadcast to mmc and usb storage module */
#define POPUP_PATH_SYSTEM POPUP_OBJECT_PATH"/System"
#define POPUP_INTERFACE_SYSTEM POPUP_INTERFACE_NAME".System"
+#define POPUP_PATH_NOTI POPUP_OBJECT_PATH"/Noti"
+#define POPUP_INTERFACE_NOTI POPUP_INTERFACE_NAME".Noti"
+
/* ODE */
#define POPUP_METHOD_LAUNCH "PopupLaunch"
#define POPUP_KEY_CONTENT "_SYSPOPUP_CONTENT_"