Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
Eeze_Disk.h File Reference

Disk manipulation. More...

Data Structures

struct  _Eeze_Event_Disk
 
struct  _Eeze_Event_Disk_Error
 

Macros

#define EAPI
 
#define EEZE_DISK_MOUNTOPT_DEFAULTS   (EEZE_DISK_MOUNTOPT_UTF8 | EEZE_DISK_MOUNTOPT_NOEXEC | EEZE_DISK_MOUNTOPT_NOSUID)
 

Typedefs

typedef struct _Eeze_Event_Disk Eeze_Event_Disk_Mount
 
typedef struct _Eeze_Event_Disk Eeze_Event_Disk_Unmount
 
typedef struct _Eeze_Event_Disk Eeze_Event_Disk_Eject
 
typedef struct _Eeze_Disk Eeze_Disk
 
typedef struct _Eeze_Event_Disk_Error Eeze_Event_Disk_Error
 

Enumerations

enum  Eeze_Disk_Type {
  EEZE_DISK_TYPE_UNKNOWN = 0 ,
  EEZE_DISK_TYPE_INTERNAL = (1 << 0) ,
  EEZE_DISK_TYPE_CDROM = (1 << 1) ,
  EEZE_DISK_TYPE_USB = (1 << 2) ,
  EEZE_DISK_TYPE_FLASH = (1 << 3)
}
 
enum  Eeze_Mount_Opts {
  EEZE_DISK_MOUNTOPT_LOOP = (1 << 1) ,
  EEZE_DISK_MOUNTOPT_UTF8 = (1 << 2) ,
  EEZE_DISK_MOUNTOPT_NOEXEC = (1 << 3) ,
  EEZE_DISK_MOUNTOPT_NOSUID = (1 << 4) ,
  EEZE_DISK_MOUNTOPT_REMOUNT = (1 << 5) ,
  EEZE_DISK_MOUNTOPT_UID = (1 << 6) ,
  EEZE_DISK_MOUNTOPT_NODEV = (1 << 7)
}
 

Functions

EAPI void eeze_disk_function (void)
 Use this function to determine whether your eeze is disk-capable. More...
 
EAPI Eina_Bool eeze_disk_can_mount (void)
 Return whether mount support is available in eeze. More...
 
EAPI Eina_Bool eeze_disk_can_unmount (void)
 Return whether unmount support is available in eeze. More...
 
EAPI Eina_Bool eeze_disk_can_eject (void)
 Return whether eject support is available in eeze. More...
 
EAPI Eeze_Diskeeze_disk_new (const char *path)
 Create a new disk object from a /sys/ path or /dev/ path. More...
 
EAPI Eeze_Diskeeze_disk_new_from_mount (const char *mount_point)
 Create a new disk object from a mount point. More...
 
EAPI void eeze_disk_free (Eeze_Disk *disk)
 Frees a disk object. More...
 
EAPI void eeze_disk_scan (Eeze_Disk *disk)
 Retrieve all disk information. More...
 
EAPI void eeze_disk_data_set (Eeze_Disk *disk, void *data)
 Associate data with a disk. More...
 
EAPI void * eeze_disk_data_get (Eeze_Disk *disk)
 Retrieve data previously associated with a disk. More...
 
EAPI const char * eeze_disk_syspath_get (Eeze_Disk *disk)
 Return the /sys/ path of a disk. More...
 
EAPI const char * eeze_disk_devpath_get (Eeze_Disk *disk)
 Return the /dev/ path of a disk. More...
 
EAPI const char * eeze_disk_fstype_get (Eeze_Disk *disk)
 Return the filesystem of the disk (if known) More...
 
EAPI const char * eeze_disk_vendor_get (Eeze_Disk *disk)
 Return the manufacturing vendor of the disk. More...
 
EAPI const char * eeze_disk_model_get (Eeze_Disk *disk)
 Return the model of the disk. More...
 
EAPI const char * eeze_disk_serial_get (Eeze_Disk *disk)
 Return the serial number of the disk. More...
 
EAPI const char * eeze_disk_uuid_get (Eeze_Disk *disk)
 Return the UUID of the disk. More...
 
EAPI const char * eeze_disk_label_get (Eeze_Disk *disk)
 Return the label of the disk. More...
 
EAPI Eeze_Disk_Type eeze_disk_type_get (Eeze_Disk *disk)
 Return the Eeze_Disk_Type of the disk. More...
 
EAPI Eina_Bool eeze_disk_removable_get (Eeze_Disk *disk)
 Return whether the disk is removable. More...
 
EAPI Eina_Bool eeze_disk_mounted_get (Eeze_Disk *disk)
 Return the mount state of a disk. More...
 
EAPI const char * eeze_disk_mount_wrapper_get (Eeze_Disk *disk)
 Get the previously set mount wrapper for a disk. More...
 
EAPI Eina_Bool eeze_disk_mount_wrapper_set (Eeze_Disk *disk, const char *wrapper)
 Set a wrapper to run mount commands with. More...
 
EAPI Eina_Bool eeze_disk_mount (Eeze_Disk *disk)
 Begin a mount operation on the disk. More...
 
EAPI Eina_Bool eeze_disk_unmount (Eeze_Disk *disk)
 Begin an unmount operation on the disk. More...
 
EAPI Eina_Bool eeze_disk_eject (Eeze_Disk *disk)
 Begin an eject operation on the disk. More...
 
EAPI void eeze_disk_cancel (Eeze_Disk *disk)
 Cancel a pending operation on the disk. More...
 
EAPI const char * eeze_disk_mount_point_get (Eeze_Disk *disk)
 Return the mount point of a disk. More...
 
EAPI Eina_Bool eeze_disk_mount_point_set (Eeze_Disk *disk, const char *mount_point)
 Set the mount point of a disk. More...
 
EAPI Eina_Bool eeze_disk_mountopts_set (Eeze_Disk *disk, unsigned long opts)
 Set the mount options using flags. More...
 
EAPI unsigned long eeze_disk_mountopts_get (Eeze_Disk *disk)
 Get the flags of a disk's current mount options. More...
 
EAPI Eina_Bool eeze_mount_tabs_watch (void)
 Begin watching mtab and fstab. More...
 
EAPI void eeze_mount_tabs_unwatch (void)
 Stop watching /etc/fstab and /etc/mtab. More...
 
EAPI Eina_Bool eeze_mount_mtab_scan (void)
 Scan /etc/mtab a single time. More...
 
EAPI Eina_Bool eeze_mount_fstab_scan (void)
 Scan /etc/fstab a single time. More...
 
EAPI const char * eeze_disk_udev_get_property (Eeze_Disk *disk, const char *property)
 Get the property value of a disk. More...
 
EAPI const char * eeze_disk_udev_get_sysattr (Eeze_Disk *disk, const char *sysattr)
 Get the sysattr value of a disk. More...
 
EAPI const char * eeze_disk_udev_get_parent (Eeze_Disk *disk)
 Find the root device of a disk. More...
 
EAPI Eina_Bool eeze_disk_udev_walk_check_sysattr (Eeze_Disk *disk, const char *sysattr, const char *value)
 Walks up the device chain using the device from disk, checking each device for sysattr with (optional) value. More...
 
EAPI const char * eeze_disk_udev_walk_get_sysattr (Eeze_Disk *disk, const char *sysattr)
 Walks up the device chain of disk checking each device for sysattr and returns the value if found. More...
 

Variables

EAPI int EEZE_EVENT_DISK_MOUNT
 
EAPI int EEZE_EVENT_DISK_UNMOUNT
 
EAPI int EEZE_EVENT_DISK_EJECT
 
EAPI int EEZE_EVENT_DISK_ERROR
 

Detailed Description

Disk manipulation.

Since
1.1

Eeze disk functions allow you to quickly and efficiently manipulate disks through simple function calls.