Eeze.h   Eeze.h 
skipping to change at line 216 skipping to change at line 216
EEZE_UDEV_TYPE_DRIVE_CDROM, EEZE_UDEV_TYPE_DRIVE_CDROM,
/** - AC adapter */ /** - AC adapter */
EEZE_UDEV_TYPE_POWER_AC, EEZE_UDEV_TYPE_POWER_AC,
/** - Battery */ /** - Battery */
EEZE_UDEV_TYPE_POWER_BAT, EEZE_UDEV_TYPE_POWER_BAT,
/** - Temperature sensor */ /** - Temperature sensor */
EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR, EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR,
/** - Network devices */ /** - Network devices */
EEZE_UDEV_TYPE_NET, EEZE_UDEV_TYPE_NET,
/** - WebCam */ /** - WebCam */
EEZE_UDEV_TYPE_V4L EEZE_UDEV_TYPE_V4L,
/** - Bluetooth */
EEZE_UDEV_TYPE_BLUETOOTH
} Eeze_Udev_Type; } Eeze_Udev_Type;
/**@}*/ /**@}*/
struct Eeze_Udev_Watch; struct Eeze_Udev_Watch;
typedef struct Eeze_Udev_Watch Eeze_Udev_Watch; typedef struct Eeze_Udev_Watch Eeze_Udev_Watch;
#define EEZE_VERSION_MAJOR 1 #define EEZE_VERSION_MAJOR 1
#define EEZE_VERSION_MINOR 1 #define EEZE_VERSION_MINOR 2
typedef struct _Eeze_Version typedef struct _Eeze_Version
{ {
int major; int major;
int minor; int minor;
int micro; int micro;
int revision; int revision;
} Eeze_Version; } Eeze_Version;
EAPI extern Eeze_Version *eeze_version; EAPI extern Eeze_Version *eeze_version;
skipping to change at line 313 skipping to change at line 315
* *
* @return A stringshared list of the devices found with the attribute * @return A stringshared list of the devices found with the attribute
* *
* @ingroup find * @ingroup find
*/ */
EAPI Eina_List *eeze_udev_find_by_sysattr(const char *sysattr, const char *value); EAPI Eina_List *eeze_udev_find_by_sysattr(const char *sysattr, const char *value);
/** /**
* Find devices using an #Eeze_Udev_Type and/or a name. * Find devices using an #Eeze_Udev_Type and/or a name.
* *
* @param etype An #Eeze_Udev_Type or 0 * @param type An #Eeze_Udev_Type or 0
* @param name A filter for the device name or #NULL * @param name A filter for the device name or @c NULL
* @return A stringshared Eina_List of matched devices or #NULL on failure * @return A stringshared Eina_List of matched devices or @c NULL on failur
e
* *
* Return a list of syspaths (/sys/$syspath) for matching udev devices. * Return a list of syspaths (/sys/$syspath) for matching udev devices.
*/ */
EAPI Eina_List *eeze_udev_find_by_type(Eeze_Udev_Type type, const cha r *name); EAPI Eina_List *eeze_udev_find_by_type(Eeze_Udev_Type type, const cha r *name);
/** /**
* A more advanced find, allows finds using udev properties. * A more advanced find, allows finds using udev properties.
* *
* @param subsystem The udev subsystem to filter by, or NULL * @param subsystem The udev subsystem to filter by, or @c NULL
* @param type "ID_INPUT_KEY", "ID_INPUT_MOUSE", "ID_INPUT_TOUCHPAD", NULL, * @param type "ID_INPUT_KEY", "ID_INPUT_MOUSE", "ID_INPUT_TOUCHPAD", @c NU
etc LL, etc
* @param name A filter for the device name, or NULL * @param name A filter for the device name, or @c NULL
* @return A stringshared Eina_List* of matched devices or NULL on failure * @return A stringshared Eina_List* of matched devices or @c NULL on failu
re
* *
* Return a list of syspaths (/sys/$syspath) for matching udev devices. * Return a list of syspaths (/sys/$syspath) for matching udev devices.
* Requires at least one filter. * Requires at least one filter.
*/ */
EAPI Eina_List *eeze_udev_find_by_filter(const char *subsystem, const char *type, const char *name); EAPI Eina_List *eeze_udev_find_by_filter(const char *subsystem, const char *type, const char *name);
/** /**
* @} * @}
*/ */
/** /**
skipping to change at line 352 skipping to change at line 354
* *
* @ingroup udev * @ingroup udev
* *
* @{ * @{
*/ */
/** /**
* Get the syspath of a device from the /dev/ path. * Get the syspath of a device from the /dev/ path.
* *
* @param devpath The /dev/ path of the device * @param devpath The /dev/ path of the device
* @return A stringshared char* which corresponds to the /sys/ path of the device or NULL on failure * @return A stringshared char* which corresponds to the /sys/ path of the device or @c NULL on failure
* *
* Takes "/dev/path" and returns the corresponding /sys/ path (without the "/sys/") * Takes "/dev/path" and returns the corresponding /sys/ path (without the "/sys/")
*/ */
EAPI const char *eeze_udev_devpath_get_syspath(const char *devpath); EAPI const char *eeze_udev_devpath_get_syspath(const char *devpath);
/** /**
* Find the root device of a device from its syspath. * Find the root device of a device from its syspath.
* *
* @param syspath The syspath of a device, with or without "/sys/" * @param syspath The syspath of a device, with or without "/sys/"
* @return The syspath of the parent device * @return The syspath of the parent device
skipping to change at line 380 skipping to change at line 382
* *
* @param syspath The device to find parents of * @param syspath The device to find parents of
* @return A stringshared list of the parent devices of @p syspath * @return A stringshared list of the parent devices of @p syspath
*/ */
EAPI Eina_List *eeze_udev_syspath_get_parents(const char *syspath); EAPI Eina_List *eeze_udev_syspath_get_parents(const char *syspath);
/** /**
* Get the /dev/ path from the /sys/ path. * Get the /dev/ path from the /sys/ path.
* *
* @param syspath The /sys/ path with or without the /sys/ * @param syspath The /sys/ path with or without the /sys/
* @return A stringshared char* with the /dev/ path or NULL on failure * @return A stringshared char* with the /dev/ path or @c NULL on failure
* *
* Takes /sys/$PATH and turns it into the corresponding "/dev/x/y". * Takes /sys/$PATH and turns it into the corresponding "/dev/x/y".
*/ */
EAPI const char *eeze_udev_syspath_get_devpath(const char *syspath); EAPI const char *eeze_udev_syspath_get_devpath(const char *syspath);
/** /**
* Get the /dev/ name from the /sys/ path. * Get the /dev/ name from the /sys/ path.
* *
* @param syspath The /sys/ path with or without the /sys/ * @param syspath The /sys/ path with or without the /sys/
* @return A stringshared char* of the device name without the /dev/ path, or NULL on failure * @return A stringshared char* of the device name without the /dev/ path, or @c NULL on failure
* *
* Takes /sys/$PATH and turns it into the corresponding /dev/x/"y". * Takes /sys/$PATH and turns it into the corresponding /dev/x/"y".
*/ */
EAPI const char *eeze_udev_syspath_get_devname(const char *syspath); EAPI const char *eeze_udev_syspath_get_devname(const char *syspath);
/** /**
* Get the subsystem of a device from the /sys/ path. * Get the subsystem of a device from the /sys/ path.
* *
* @param syspath The /sys/ path with or without the /sys/ * @param syspath The /sys/ path with or without the /sys/
* @return A stringshared char* with the subsystem of the device or NULL on failure * @return A stringshared char* with the subsystem of the device or @c NULL on failure
* *
* Takes /sys/$PATH and returns the corresponding device subsystem, * Takes /sys/$PATH and returns the corresponding device subsystem,
* such as "input" for keyboards/mice. * such as "input" for keyboards/mice.
*/ */
EAPI const char *eeze_udev_syspath_get_subsystem(const char *syspath); EAPI const char *eeze_udev_syspath_get_subsystem(const char *syspath);
/** /**
* Get the property value of a device from the /sys/ path. * Get the property value of a device from the /sys/ path.
* *
* @param syspath The /sys/ path with or without the /sys/ * @param syspath The /sys/ path with or without the /sys/
* @param property The property to get; full list of these is a FIXME * @param property The property to get; full list of these is a FIXME
* @return A stringshared char* with the property or NULL on failure * @return A stringshared char* with the property or @c NULL on failure
*/ */
EAPI const char *eeze_udev_syspath_get_property(const char *syspath, c onst char *property); EAPI const char *eeze_udev_syspath_get_property(const char *syspath, c onst char *property);
/** /**
* Get the sysattr value of a device from the /sys/ path. * Get the sysattr value of a device from the /sys/ path.
* *
* @param syspath The /sys/ path with or without the /sys/ * @param syspath The /sys/ path with or without the /sys/
* @param sysattr The sysattr to get; full list of these is a FIXME * @param sysattr The sysattr to get; full list of these is a FIXME
* @return A stringshared char* with the sysattr or NULL on failure * @return A stringshared char* with the sysattr or @c NULL on failure
*/ */
EAPI const char *eeze_udev_syspath_get_sysattr(const char *syspath, co nst char *sysattr); EAPI const char *eeze_udev_syspath_get_sysattr(const char *syspath, co nst char *sysattr);
/** /**
* Checks whether the device is a mouse. * Checks whether the device is a mouse.
* *
* @param syspath The /sys/ path with or without the /sys/ * @param syspath The /sys/ path with or without the /sys/
* @return If true, the device is a mouse * @return If true, the device is a mouse
*/ */
EAPI Eina_Bool eeze_udev_syspath_is_mouse(const char *syspath); EAPI Eina_Bool eeze_udev_syspath_is_mouse(const char *syspath);
skipping to change at line 468 skipping to change at line 470
* *
* @{ * @{
*/ */
/** /**
* Walks up the device chain starting at @p syspath, * Walks up the device chain starting at @p syspath,
* checking each device for @p sysattr with (optional) @p value. * checking each device for @p sysattr with (optional) @p value.
* *
* @param syspath The /sys/ path of the device to start at, with or without the /sys/ * @param syspath The /sys/ path of the device to start at, with or without the /sys/
* @param sysattr The attribute to find * @param sysattr The attribute to find
* @param value OPTIONAL: The value that @p sysattr should have, or NULL * @param value OPTIONAL: The value that @p sysattr should have, or @c NULL
* *
* @return If the sysattr (with value) is found, returns TRUE. Else, false . * @return If the sysattr (with value) is found, returns TRUE. Else, false .
*/ */
EAPI Eina_Bool eeze_udev_walk_check_sysattr(const char *syspath, con st char *sysattr, const char *value); EAPI Eina_Bool eeze_udev_walk_check_sysattr(const char *syspath, con st char *sysattr, const char *value);
/** /**
* Walks up the device chain starting at @p syspath, * Walks up the device chain starting at @p syspath,
* checking each device for @p sysattr, and returns the value if found. * checking each device for @p sysattr, and returns the value if found.
* *
* @param syspath The /sys/ path of the device to start at, with or without the /sys/ * @param syspath The /sys/ path of the device to start at, with or without the /sys/
* @param sysattr The attribute to find * @param sysattr The attribute to find
* *
* @return The stringshared value of @p sysattr if found, or NULL * @return The stringshared value of @p sysattr if found, or @c NULL
*/ */
EAPI const char *eeze_udev_walk_get_sysattr(const char *syspath, const char *sysattr); EAPI const char *eeze_udev_walk_get_sysattr(const char *syspath, const char *sysattr);
/** /**
* @} * @}
*/ */
/** /**
* @addtogroup watch Watch * @addtogroup watch Watch
* *
* @brief These are functions which monitor udev for events. * @brief These are functions which monitor udev for events.
skipping to change at line 511 skipping to change at line 513
*/ */
/** /**
* Add a watch for a device type * Add a watch for a device type
* *
* @param type The #Eeze_Udev_Type to watch * @param type The #Eeze_Udev_Type to watch
* @param event The events to watch; an OR list of #Eeze_Udev_Event (ie (#E EZE_UDEV_EVENT_ADD | #EEZE_UDEV_EVENT_REMOVE)), or 0 for all events * @param event The events to watch; an OR list of #Eeze_Udev_Event (ie (#E EZE_UDEV_EVENT_ADD | #EEZE_UDEV_EVENT_REMOVE)), or 0 for all events
* @param cb The function to call when the watch receives data of type #Eez e_Udev_Watch_Cb * @param cb The function to call when the watch receives data of type #Eez e_Udev_Watch_Cb
* @param user_data Data to pass to the callback function * @param user_data Data to pass to the callback function
* *
* @return A watch struct for the watch type specified, or NULL on failure * @return A watch struct for the watch type specified, or @c NULL on failu re
* *
* Eeze watches will monitor udev for changes of type(s) @p event to device s of type @p type. When these changes occur, the stringshared * Eeze watches will monitor udev for changes of type(s) @p event to device s of type @p type. When these changes occur, the stringshared
* syspath of the device will be sent to function @p func, along with the b itmask of the event type which can be detected through * syspath of the device will be sent to function @p func, along with the b itmask of the event type which can be detected through
* binary &. * binary &.
*/ */
EAPI Eeze_Udev_Watch *eeze_udev_watch_add(Eeze_Udev_Type type, int event, E eze_Udev_Watch_Cb cb, void *user_data); EAPI Eeze_Udev_Watch *eeze_udev_watch_add(Eeze_Udev_Type type, int event, E eze_Udev_Watch_Cb cb, void *user_data);
/** /**
* Deletes a watch. * Deletes a watch.
* *
* @param watch An Eeze_Udev_Watch object * @param watch An Eeze_Udev_Watch object
* @return The data originally associated with the watch, or NULL * @return The data originally associated with the watch, or @c NULL
* *
* Deletes a watch, closing file descriptors and freeing related udev memor y. * Deletes a watch, closing file descriptors and freeing related udev memor y.
*/ */
EAPI void *eeze_udev_watch_del(Eeze_Udev_Watch *watch); EAPI void *eeze_udev_watch_del(Eeze_Udev_Watch *watch);
/** /**
* @} * @}
*/ */
#ifdef __cplusplus #ifdef __cplusplus
} }
 End of changes. 14 change blocks. 
20 lines changed or deleted 24 lines changed or added


 Eeze_Disk.h   Eeze_Disk.h 
skipping to change at line 118 skipping to change at line 118
* @brief Return whether eject support is available in eeze * @brief Return whether eject support is available in eeze
* *
* Use this function to determine whether your Eeze library was compiled wi th an eject * Use this function to determine whether your Eeze library was compiled wi th an eject
* binary available. * binary available.
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_disk_can_eject(void); EAPI Eina_Bool eeze_disk_can_eject(void);
/** /**
* @brief Create a new disk object from a /sys/ path or /dev/ path * @brief Create a new disk object from a /sys/ path or /dev/ path
* @param path The /sys/ or /dev path of the disk; CANNOT be #NULL * @param path The /sys/ or /dev path of the disk; CANNOT be @c NULL.
* @return The new disk object * @return The new disk object
* *
* This function creates a new #Eeze_Disk from @p path. Note that this fun ction * This function creates a new #Eeze_Disk from @p path. Note that this fun ction
* does the minimal amount of work in order to save memory, and udev info a bout the disk * does the minimal amount of work in order to save memory, and udev info a bout the disk
* is not retrieved in this call. * is not retrieved in this call.
* @since 1.1 * @since 1.1
*/ */
EAPI Eeze_Disk *eeze_disk_new(const char *path); EAPI Eeze_Disk *eeze_disk_new(const char *path);
/** /**
* @brief Create a new disk object from a mount point * @brief Create a new disk object from a mount point
* @param mount_point The mount point of the disk; CANNOT be #NULL * @param mount_point The mount point of the disk; CANNOT be @c NULL
* @return The new disk object * @return The new disk object
* *
* This function creates a new #Eeze_Disk from @p mount_point. Note that t his function * This function creates a new #Eeze_Disk from @p mount_point. Note that t his function
* does the minimal amount of work in order to save memory, and udev info a bout the disk * does the minimal amount of work in order to save memory, and udev info a bout the disk
* is not retrieved in this call. If the disk is not currently mounted, it must have an entry * is not retrieved in this call. If the disk is not currently mounted, it must have an entry
* in /etc/fstab. * in /etc/fstab.
* @since 1.1 * @since 1.1
*/ */
EAPI Eeze_Disk *eeze_disk_new_from_mount(const char *mount_point); EAPI Eeze_Disk *eeze_disk_new_from_mount(const char *mount_point);
skipping to change at line 209 skipping to change at line 209
* This retrieves the /dev/ path that udev has created a device node at for @p disk. * This retrieves the /dev/ path that udev has created a device node at for @p disk.
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_devpath_get(Eeze_Disk *disk); EAPI const char *eeze_disk_devpath_get(Eeze_Disk *disk);
/** /**
* @brief Return the filesystem of the disk (if known) * @brief Return the filesystem of the disk (if known)
* @param disk The disk * @param disk The disk
* @return The filesystem type * @return The filesystem type
* *
* This retrieves the filesystem that the disk is using, or #NULL if unknow n. * This retrieves the filesystem that the disk is using, or @c NULL if unkn own.
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_fstype_get(Eeze_Disk *disk); EAPI const char *eeze_disk_fstype_get(Eeze_Disk *disk);
/** /**
* @brief Return the manufacturing vendor of the disk * @brief Return the manufacturing vendor of the disk
* @param disk The disk * @param disk The disk
* @return The vendor * @return The vendor
* *
* This retrieves the vendor which manufactured the disk, or #NULL if unkno wn. * This retrieves the vendor which manufactured the disk, or @c NULL if unk nown.
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_vendor_get(Eeze_Disk *disk); EAPI const char *eeze_disk_vendor_get(Eeze_Disk *disk);
/** /**
* @brief Return the model of the disk * @brief Return the model of the disk
* @param disk The disk * @param disk The disk
* @return The model * @return The model
* *
* This retrieves the model of the disk, or #NULL if unknown. * This retrieves the model of the disk, or @c NULL if unknown.
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_model_get(Eeze_Disk *disk); EAPI const char *eeze_disk_model_get(Eeze_Disk *disk);
/** /**
* @brief Return the serial number of the disk * @brief Return the serial number of the disk
* @param disk The disk * @param disk The disk
* @return The serial number * @return The serial number
* *
* This retrieves the serial number the disk, or #NULL if unknown. * This retrieves the serial number the disk, or @c NULL if unknown.
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_serial_get(Eeze_Disk *disk); EAPI const char *eeze_disk_serial_get(Eeze_Disk *disk);
/** /**
* @brief Return the UUID of the disk * @brief Return the UUID of the disk
* @param disk The disk * @param disk The disk
* @return The UUID * @return The UUID
* *
* This retrieves the UUID of the disk, or #NULL if unknown. * This retrieves the UUID of the disk, or @c NULL if unknown.
* A UUID is a 36 character (hopefully) unique identifier which can * A UUID is a 36 character (hopefully) unique identifier which can
* be used to store persistent information about a disk. * be used to store persistent information about a disk.
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_uuid_get(Eeze_Disk *disk); EAPI const char *eeze_disk_uuid_get(Eeze_Disk *disk);
/** /**
* @brief Return the label of the disk * @brief Return the label of the disk
* @param disk The disk * @param disk The disk
* @return The label * @return The label
* *
* This retrieves the label (name) of the disk, or #NULL if unknown. * This retrieves the label (name) of the disk, or @c NULL if unknown.
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_label_get(Eeze_Disk *disk); EAPI const char *eeze_disk_label_get(Eeze_Disk *disk);
/** /**
* @brief Return the #Eeze_Disk_Type of the disk * @brief Return the #Eeze_Disk_Type of the disk
* @param disk The disk * @param disk The disk
* @return The type * @return The type
* *
* This retrieves the #Eeze_Disk_Type of the disk. This call is useful for determining * This retrieves the #Eeze_Disk_Type of the disk. This call is useful for determining
* the bus that the disk is connected through. * the bus that the disk is connected through.
* @since 1.1 * @since 1.1
*/ */
EAPI Eeze_Disk_Type eeze_disk_type_get(Eeze_Disk *disk); EAPI Eeze_Disk_Type eeze_disk_type_get(Eeze_Disk *disk);
/** /**
* @brief Return whether the disk is removable * @brief Return whether the disk is removable
* @param disk The disk * @param disk The disk
* @return EINA_TRUE if removable, else EINA_FALSE * @return @c EINA_TRUE if removable, @c EINA_FALSE otherwise.
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_disk_removable_get(Eeze_Disk *disk); EAPI Eina_Bool eeze_disk_removable_get(Eeze_Disk *disk);
/** /**
* @brief Return the mount state of a disk * @brief Return the mount state of a disk
* @param disk The disk * @param disk The disk
* @return The mount state * @return The mount state
* *
* This returns the mounted state of the disk. #EINA_TRUE if mounted, else * This returns the mounted state of the disk. @c EINA_TRUE if mounted,
#EINA_FALSE. * @c EINA_FALSE otherwise.
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_disk_mounted_get(Eeze_Disk *disk); EAPI Eina_Bool eeze_disk_mounted_get(Eeze_Disk *disk);
/** /**
* @brief Get the previously set mount wrapper for a disk * @brief Get the previously set mount wrapper for a disk
* @param disk The disk * @param disk The disk
* @return The wrapper, or NULL on failure * @return The wrapper, or @c NULL on failure.
* *
* This returns the wrapper previously set with eeze_disk_mount_wrapper_set * This returns the wrapper previously set with eeze_disk_mount_wrapper_set
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_mount_wrapper_get(Eeze_Disk *disk); EAPI const char *eeze_disk_mount_wrapper_get(Eeze_Disk *disk);
/** /**
* @brief Set a wrapper to run mount commands with * @brief Set a wrapper to run mount commands with
* @param disk The disk to wrap mount commands for * @param disk The disk to wrap mount commands for
* @param wrapper The wrapper executable * @param wrapper The wrapper executable
* @return EINA_TRUE on success, else EINA_FALSE * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
* *
* Use this function to set up a wrapper for running mount/umount commands. The wrapper must * Use this function to set up a wrapper for running mount/umount commands. The wrapper must
* NOT use any of the standard mount/umount error code return values, and i t must return 0 on success. * NOT use any of the standard mount/umount error code return values, and i t must return 0 on success.
* Note that this function will call stat() on @p wrapper if not NULL to te st for existence. * Note that this function will call stat() on @p wrapper if not @c NULL to test for existence.
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_disk_mount_wrapper_set(Eeze_Disk *disk, const char *wrapper); EAPI Eina_Bool eeze_disk_mount_wrapper_set(Eeze_Disk *disk, const char *wrapper);
/** /**
* @brief Begin a mount operation on the disk * @brief Begin a mount operation on the disk
* @param disk The disk * @param disk The disk
* @return #EINA_TRUE if the operation was started, else #EINA_FALSE * @return @c EINA_TRUE if the operation was started, @c EINA_FALSE otherwi se.
* *
* This call is used to begin a mount operation on @p disk. The operation will * This call is used to begin a mount operation on @p disk. The operation will
* run asynchronously in a pipe, emitting an EEZE_EVENT_DISK_MOUNT event wi th the disk object * run asynchronously in a pipe, emitting an EEZE_EVENT_DISK_MOUNT event wi th the disk object
* as its event on completion. If any errors are encountered, they will au tomatically logged * as its event on completion. If any errors are encountered, they will au tomatically logged
* to the eeze_disk domain and an EEZE_EVENT_DISK_ERROR event will be gener ated with an #Eeze_Event_Disk_Error * to the eeze_disk domain and an EEZE_EVENT_DISK_ERROR event will be gener ated with an #Eeze_Event_Disk_Error
* struct as its event. * struct as its event.
* *
* NOTE: The return value of this function does not in any way reflect the mount state of a disk. * NOTE: The return value of this function does not in any way reflect the mount state of a disk.
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_disk_mount(Eeze_Disk *disk); EAPI Eina_Bool eeze_disk_mount(Eeze_Disk *disk);
/** /**
* @brief Begin an unmount operation on the disk * @brief Begin an unmount operation on the disk
* @param disk The disk * @param disk The disk
* @return #EINA_TRUE if the operation was started, else #EINA_FALSE * @return @c EINA_TRUE if the operation was started, @c EINA_FALSE otherwi se.
* *
* This call is used to begin an unmount operation on @p disk. The operati on will * This call is used to begin an unmount operation on @p disk. The operati on will
* run asynchronously in a pipe, emitting an EEZE_EVENT_DISK_UNMOUNT event with the disk object * run asynchronously in a pipe, emitting an EEZE_EVENT_DISK_UNMOUNT event with the disk object
* as its event on completion. If any errors are encountered, they will au tomatically logged * as its event on completion. If any errors are encountered, they will au tomatically logged
* to the eeze_disk domain and an EEZE_EVENT_DISK_ERROR event will be gener ated with * to the eeze_disk domain and an EEZE_EVENT_DISK_ERROR event will be gener ated with
* an #Eeze_Event_Disk_Error struct as its event. * an #Eeze_Event_Disk_Error struct as its event.
* *
* NOTE: The return value of this function does not in any way reflect the mount state of a disk. * NOTE: The return value of this function does not in any way reflect the mount state of a disk.
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_disk_unmount(Eeze_Disk *disk); EAPI Eina_Bool eeze_disk_unmount(Eeze_Disk *disk);
/** /**
* @brief Begin an eject operation on the disk * @brief Begin an eject operation on the disk
* @param disk The disk * @param disk The disk
* @return #EINA_TRUE if the operation was started, else #EINA_FALSE * @return @c EINA_TRUE if the operation was started, @c EINA_FALSE otherwi se.
* *
* This call is used to begin an eject operation on @p disk. The operation will * This call is used to begin an eject operation on @p disk. The operation will
* run asynchronously in a pipe, emitting an EEZE_EVENT_DISK_EJECT event wi th the disk object * run asynchronously in a pipe, emitting an EEZE_EVENT_DISK_EJECT event wi th the disk object
* as its event on completion. If any errors are encountered, they will au tomatically logged * as its event on completion. If any errors are encountered, they will au tomatically logged
* to the eeze_disk domain and an EEZE_EVENT_DISK_ERROR event will be gener ated with * to the eeze_disk domain and an EEZE_EVENT_DISK_ERROR event will be gener ated with
* an #Eeze_Event_Disk_Error struct as its event. * an #Eeze_Event_Disk_Error struct as its event.
* *
* NOTE: The return value of this function does not in any way reflect the mount state of a disk. * NOTE: The return value of this function does not in any way reflect the mount state of a disk.
* @since 1.1 * @since 1.1
*/ */
skipping to change at line 390 skipping to change at line 391
* This function returns the mount point associated with @p disk. * This function returns the mount point associated with @p disk.
* Note that to determine whether the disk is actually mounted, eeze_disk_m ounted_get should be used. * Note that to determine whether the disk is actually mounted, eeze_disk_m ounted_get should be used.
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_mount_point_get(Eeze_Disk *disk); EAPI const char *eeze_disk_mount_point_get(Eeze_Disk *disk);
/** /**
* @brief Set the mount point of a disk * @brief Set the mount point of a disk
* @param disk The disk * @param disk The disk
* @param mount_point The mount point * @param mount_point The mount point
* @return EINA_TRUE on success, else EINA_FALSE * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
* *
* This function sets the mount point associated with @p disk. * This function sets the mount point associated with @p disk.
* Note that to determine whether the disk is actually mounted, eeze_disk_m ounted_get should be used. * Note that to determine whether the disk is actually mounted, eeze_disk_m ounted_get should be used.
* Also note that this function cannot be used while the disk is mounted to avoid losing the current mount point. * Also note that this function cannot be used while the disk is mounted to avoid losing the current mount point.
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_disk_mount_point_set(Eeze_Disk *disk, const char * mount_point); EAPI Eina_Bool eeze_disk_mount_point_set(Eeze_Disk *disk, const char * mount_point);
/** /**
* @brief Set the mount options using flags * @brief Set the mount options using flags
* @param disk The disk * @param disk The disk
* @param opts An ORed set of #Eeze_Mount_Opts * @param opts An ORed set of #Eeze_Mount_Opts
* @return EINA_TRUE on success, else EINA_FALSE * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
* *
* This function replaces the current mount opts of a disk with the ones in @p opts. * This function replaces the current mount opts of a disk with the ones in @p opts.
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_disk_mountopts_set(Eeze_Disk *disk, unsigned long opts); EAPI Eina_Bool eeze_disk_mountopts_set(Eeze_Disk *disk, unsigned long opts);
/** /**
* @brief Get the flags of a disk's current mount options * @brief Get the flags of a disk's current mount options
* @param disk The disk * @param disk The disk
* @return An ORed set of #Eeze_Mount_Opts, 0 on failure * @return An ORed set of #Eeze_Mount_Opts, 0 on failure
* *
* This function returns the current mount opts of a disk. * This function returns the current mount opts of a disk.
* @since 1.1 * @since 1.1
*/ */
EAPI unsigned long eeze_disk_mountopts_get(Eeze_Disk *disk); EAPI unsigned long eeze_disk_mountopts_get(Eeze_Disk *disk);
/** /**
* @brief Begin watching mtab and fstab * @brief Begin watching mtab and fstab
* @return #EINA_TRUE if watching was started, else #EINA_FALSE * @return @c EINA_TRUE if watching was started, @c EINA_FALSE otherwise.
* *
* This function creates inotify watches on /etc/mtab and /etc/fstab and wa tches * This function creates inotify watches on /etc/mtab and /etc/fstab and wa tches
* them for changes. This function should be used when expecting a lot of disk * them for changes. This function should be used when expecting a lot of disk
* mounting/unmounting while you need disk data since it will automatically update * mounting/unmounting while you need disk data since it will automatically update
* certain necessary data instead of waiting. * certain necessary data instead of waiting.
* @see eeze_mount_mtab_scan, eeze_mount_fstab_scan * @see eeze_mount_mtab_scan, eeze_mount_fstab_scan
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_mount_tabs_watch(void); EAPI Eina_Bool eeze_mount_tabs_watch(void);
/** /**
* @brief Stop watching /etc/fstab and /etc/mtab * @brief Stop watching /etc/fstab and /etc/mtab
* *
* This function stops watching fstab and mtab. Data obtained previously w ill be saved. * This function stops watching fstab and mtab. Data obtained previously w ill be saved.
* @since 1.1 * @since 1.1
*/ */
EAPI void eeze_mount_tabs_unwatch(void); EAPI void eeze_mount_tabs_unwatch(void);
/** /**
* @brief Scan /etc/mtab a single time * @brief Scan /etc/mtab a single time
* @return #EINA_TRUE if mtab could be scanned, else #EINA_FALSE * @return @c EINA_TRUE if mtab could be scanned, @c EINA_FALSE otherwise.
* *
* This function is used to perform a single scan on /etc/mtab. It is used to gather * This function is used to perform a single scan on /etc/mtab. It is used to gather
* information about mounted filesystems which can then be used with your # Eeze_Disk objects * information about mounted filesystems which can then be used with your # Eeze_Disk objects
* where appropriate. These files will automatically be scanned any time a mount point or mount state * where appropriate. These files will automatically be scanned any time a mount point or mount state
* is requested unless eeze_mount_tabs_watch has been called previously, in which case data is stored for * is requested unless eeze_mount_tabs_watch has been called previously, in which case data is stored for
* use. * use.
* If this function is called after eeze_mount_tabs_watch, #EINA_TRUE will be returned. * If this function is called after eeze_mount_tabs_watch, @c EINA_TRUE wil l be returned.
* @see eeze_mount_tabs_watch, eeze_mount_fstab_scan * @see eeze_mount_tabs_watch, eeze_mount_fstab_scan
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_mount_mtab_scan(void); EAPI Eina_Bool eeze_mount_mtab_scan(void);
/** /**
* @brief Scan /etc/fstab a single time * @brief Scan /etc/fstab a single time
* @return #EINA_TRUE if mtab could be scanned, else #EINA_FALSE * @return @c EINA_TRUE if mtab could be scanned, @c EINA_FALSE otherwise.
* *
* This function is used to perform a single scan on /etc/fstab. It is use d to gather * This function is used to perform a single scan on /etc/fstab. It is use d to gather
* information about mounted filesystems which can then be used with your # Eeze_Disk objects * information about mounted filesystems which can then be used with your # Eeze_Disk objects
* where appropriate. These files will automatically be scanned any time a mount point or mount state * where appropriate. These files will automatically be scanned any time a mount point or mount state
* is requested unless eeze_mount_tabs_watch has been called previously, in which case data is stored for * is requested unless eeze_mount_tabs_watch has been called previously, in which case data is stored for
* use. * use.
* If this function is called after eeze_mount_tabs_watch, #EINA_TRUE will be returned. * If this function is called after eeze_mount_tabs_watch, @c EINA_TRUE wil l be returned.
* @see eeze_mount_tabs_watch, eeze_mount_mtab_scan * @see eeze_mount_tabs_watch, eeze_mount_mtab_scan
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_mount_fstab_scan(void); EAPI Eina_Bool eeze_mount_fstab_scan(void);
/** /**
* @brief Get the property value of a disk * @brief Get the property value of a disk
* *
* @param disk The disk * @param disk The disk
* @param property The property to get; full list of these is a FIXME * @param property The property to get; full list of these is a FIXME
* @return A stringshared char* with the property or NULL on failure * @return A stringshared char* with the property or @c NULL on failure.
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_udev_get_property(Eeze_Disk *disk, const char *property); EAPI const char *eeze_disk_udev_get_property(Eeze_Disk *disk, const char *property);
/** /**
* @brief Get the sysattr value of a disk. * @brief Get the sysattr value of a disk.
* *
* @param disk The disk * @param disk The disk
* @param sysattr The sysattr to get; full list of these is a FIXME * @param sysattr The sysattr to get; full list of these is a FIXME
* @return A stringshared char* with the sysattr or NULL on failure * @return A stringshared char* with the sysattr or @c NULL on failure.
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_udev_get_sysattr(Eeze_Disk *disk, const char *sysattr); EAPI const char *eeze_disk_udev_get_sysattr(Eeze_Disk *disk, const char *sysattr);
/** /**
* Find the root device of a disk. * Find the root device of a disk.
* *
* @param disk The disk * @param disk The disk
* @return The syspath of the parent device * @return The syspath of the parent device
skipping to change at line 510 skipping to change at line 511
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_udev_get_parent(Eeze_Disk *disk); EAPI const char *eeze_disk_udev_get_parent(Eeze_Disk *disk);
/** /**
* Walks up the device chain using the device from @p disk, * Walks up the device chain using the device from @p disk,
* checking each device for @p sysattr with (optional) @p value. * checking each device for @p sysattr with (optional) @p value.
* *
* @param disk The disk to walk * @param disk The disk to walk
* @param sysattr The attribute to find * @param sysattr The attribute to find
* @param value OPTIONAL: The value that @p sysattr should have, or NULL * @param value OPTIONAL: The value that @p sysattr should have, or @c NULL .
* *
* @return If the sysattr (with value) is found, returns TRUE. Else, false * @return If the sysattr (with value) is found, returns @c EINA_TRUE,
. * @EINA_FALSE otherwise.
* @since 1.1 * @since 1.1
*/ */
EAPI Eina_Bool eeze_disk_udev_walk_check_sysattr(Eeze_Disk *disk, cons t char *sysattr, const char *value); EAPI Eina_Bool eeze_disk_udev_walk_check_sysattr(Eeze_Disk *disk, cons t char *sysattr, const char *value);
/** /**
* @brief Walks up the device chain of @p disk * @brief Walks up the device chain of @p disk
* checking each device for @p sysattr and returns the value if found. * checking each device for @p sysattr and returns the value if found.
* *
* @param disk The disk * @param disk The disk
* @param sysattr The attribute to find * @param sysattr The attribute to find
* *
* @return The stringshared value of @p sysattr if found, or NULL * @return The stringshared value of @p sysattr if found, or @c NULL.
* @since 1.1 * @since 1.1
*/ */
EAPI const char *eeze_disk_udev_walk_get_sysattr(Eeze_Disk *disk, const char *sysattr); EAPI const char *eeze_disk_udev_walk_get_sysattr(Eeze_Disk *disk, const char *sysattr);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/** /**
* @} * @}
 End of changes. 28 change blocks. 
30 lines changed or deleted 30 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/