2011-05-15 Mike Blumenkrantz (discomfitor/zmike)
++eeze_disk_cancel
+Cancel the current pending mount/umount operation on a disk
+-------------------------------------
+EEZE_DISK_MOUNTOPT_UID
Add a uid=%i mount option using getuid, NOT geteuid
--------------------------------------
EAPI Eina_Bool eeze_disk_unmount(Eeze_Disk *disk);
/**
+ * @brief Cancel a pending operation on the disk
+ * @param disk The disk
+ *
+ * This function cancels the current pending operation on @p disk which was previously
+ * started with eeze_disk_mount or eeze_disk_unmount.
+ */
+EAPI void eeze_disk_cancel(Eeze_Disk *disk);
+
+/**
* @brief Return the mount point of a disk
* @param disk The disk
* @return The mount point
eeze_events = eina_list_remove_list(eeze_events, l);
if (disk->mount_status == EEZE_DISK_MOUNTING)
{
+ disk->mount_status = EEZE_DISK_NULL;
+ disk->mounter = NULL;
if (!ev->exit_code)
{
e = malloc(sizeof(Eeze_Event_Disk_Mount));
e = malloc(sizeof(Eeze_Event_Disk_Unmount));
EINA_SAFETY_ON_NULL_RETURN_VAL(e, ECORE_CALLBACK_RENEW);
e->disk = disk;
+ disk->mount_status = EEZE_DISK_NULL;
+ disk->mounter = NULL;
ecore_event_add(EEZE_EVENT_DISK_UNMOUNT, e, NULL, NULL);
break;
return EINA_TRUE;
}
+EAPI void
+eeze_disk_cancel(Eeze_Disk *disk)
+{
+ EINA_SAFETY_ON_NULL_RETURN(disk);
+ if ((!disk->mount_status) || (!disk->mounter)) return;
+ disk->mount_status = EEZE_DISK_NULL;
+ ecore_exe_quit(disk->mounter);
+}
+
EAPI const char *
eeze_disk_mount_point_get(Eeze_Disk *disk)
{