update docs

SVN revision: 65062
This commit is contained in:
Mike Blumenkrantz 2011-11-11 15:17:41 +00:00
parent cd44e4c162
commit 836d3074f2
2 changed files with 44 additions and 40 deletions

View File

@ -21,6 +21,7 @@
/**
* @file Eeze_Disk.h
* @brief Disk manipulation
* @since 1.1
*
* Eeze disk functions allow you to quickly and efficiently manipulate disks
* through simple function calls.
@ -82,6 +83,7 @@ struct _Eeze_Event_Disk_Error
*
* Since applications will die if they run/compile against a function that doesn't exist,
* if your application successfully runs/compiles with this function then you have eeze_disk.
* @since 1.1
*/
EAPI void eeze_disk_function(void);
@ -93,6 +95,7 @@ EAPI void eeze_disk_function(void);
* This function creates a new #Eeze_Disk from @p path. Note that this function
* does the minimal amount of work in order to save memory, and udev info about the disk
* is not retrieved in this call.
* @since 1.1
*/
EAPI Eeze_Disk *eeze_disk_new(const char *path);
@ -105,6 +108,7 @@ EAPI Eeze_Disk *eeze_disk_new(const char *path);
* does the minimal amount of work in order to save memory, and udev info about the disk
* is not retrieved in this call. If the disk is not currently mounted, it must have an entry
* in /etc/fstab.
* @since 1.1
*/
EAPI Eeze_Disk *eeze_disk_new_from_mount(const char *mount_point);
@ -113,6 +117,7 @@ EAPI Eeze_Disk *eeze_disk_new_from_mount(const char *mount_point);
* @param disk The disk object to free
*
* This call frees an #Eeze_Disk. Once freed, the disk can no longer be used.
* @since 1.1
*/
EAPI void eeze_disk_free(Eeze_Disk *disk);
@ -123,6 +128,7 @@ EAPI void eeze_disk_free(Eeze_Disk *disk);
* Use this function to retrieve all of a disk's information at once, then use
* a "get" function to retrieve the value. Data retrieved in this call is cached,
* meaning that subsequent calls will return immediately without performing any work.
* @since 1.1
*/
EAPI void eeze_disk_scan(Eeze_Disk *disk);
@ -133,6 +139,7 @@ EAPI void eeze_disk_scan(Eeze_Disk *disk);
*
* Data can be associated with @p disk with this function.
* @see eeze_disk_data_get
* @since 1.1
*/
EAPI void eeze_disk_data_set(Eeze_Disk *disk, void *data);
@ -144,6 +151,7 @@ EAPI void eeze_disk_data_set(Eeze_Disk *disk, void *data);
* Data that has been previously associated with @p disk
* is returned with this function.
* @see eeze_disk_data_set
* @since 1.1
*/
EAPI void *eeze_disk_data_get(Eeze_Disk *disk);
@ -153,6 +161,7 @@ EAPI void *eeze_disk_data_get(Eeze_Disk *disk);
* @return The /sys/ path
*
* This retrieves the /sys/ path that udev associates with @p disk.
* @since 1.1
*/
EAPI const char *eeze_disk_syspath_get(Eeze_Disk *disk);
@ -162,6 +171,7 @@ EAPI const char *eeze_disk_syspath_get(Eeze_Disk *disk);
* @return The /dev/ path
*
* This retrieves the /dev/ path that udev has created a device node at for @p disk.
* @since 1.1
*/
EAPI const char *eeze_disk_devpath_get(Eeze_Disk *disk);
@ -171,6 +181,7 @@ EAPI const char *eeze_disk_devpath_get(Eeze_Disk *disk);
* @return The filesystem type
*
* This retrieves the filesystem that the disk is using, or #NULL if unknown.
* @since 1.1
*/
EAPI const char *eeze_disk_fstype_get(Eeze_Disk *disk);
@ -180,6 +191,7 @@ EAPI const char *eeze_disk_fstype_get(Eeze_Disk *disk);
* @return The vendor
*
* This retrieves the vendor which manufactured the disk, or #NULL if unknown.
* @since 1.1
*/
EAPI const char *eeze_disk_vendor_get(Eeze_Disk *disk);
@ -189,6 +201,7 @@ EAPI const char *eeze_disk_vendor_get(Eeze_Disk *disk);
* @return The model
*
* This retrieves the model of the disk, or #NULL if unknown.
* @since 1.1
*/
EAPI const char *eeze_disk_model_get(Eeze_Disk *disk);
@ -198,6 +211,7 @@ EAPI const char *eeze_disk_model_get(Eeze_Disk *disk);
* @return The serial number
*
* This retrieves the serial number the disk, or #NULL if unknown.
* @since 1.1
*/
EAPI const char *eeze_disk_serial_get(Eeze_Disk *disk);
@ -209,6 +223,7 @@ EAPI const char *eeze_disk_serial_get(Eeze_Disk *disk);
* This retrieves the UUID of the disk, or #NULL if unknown.
* A UUID is a 36 character (hopefully) unique identifier which can
* be used to store persistent information about a disk.
* @since 1.1
*/
EAPI const char *eeze_disk_uuid_get(Eeze_Disk *disk);
@ -218,6 +233,7 @@ EAPI const char *eeze_disk_uuid_get(Eeze_Disk *disk);
* @return The label
*
* This retrieves the label (name) of the disk, or #NULL if unknown.
* @since 1.1
*/
EAPI const char *eeze_disk_label_get(Eeze_Disk *disk);
@ -228,8 +244,16 @@ EAPI const char *eeze_disk_label_get(Eeze_Disk *disk);
*
* This retrieves the #Eeze_Disk_Type of the disk. This call is useful for determining
* the bus that the disk is connected through.
* @since 1.1
*/
EAPI Eeze_Disk_Type eeze_disk_type_get(Eeze_Disk *disk);
/**
* @brief Return whether the disk is removable
* @param disk The disk
* @return EINA_TRUE if removable, else EINA_FALSE
* @since 1.1
*/
EAPI Eina_Bool eeze_disk_removable_get(Eeze_Disk *disk);
@ -239,6 +263,7 @@ EAPI Eina_Bool eeze_disk_removable_get(Eeze_Disk *disk);
* @return The mount state
*
* This returns the mounted state of the disk. #EINA_TRUE if mounted, else #EINA_FALSE.
* @since 1.1
*/
EAPI Eina_Bool eeze_disk_mounted_get(Eeze_Disk *disk);
@ -248,6 +273,7 @@ EAPI Eina_Bool eeze_disk_mounted_get(Eeze_Disk *disk);
* @return The wrapper, or NULL on failure
*
* This returns the wrapper previously set with eeze_disk_mount_wrapper_set
* @since 1.1
*/
EAPI const char *eeze_disk_mount_wrapper_get(Eeze_Disk *disk);
@ -260,6 +286,7 @@ EAPI const char *eeze_disk_mount_wrapper_get(Eeze_Disk *disk);
* 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 it must return 0 on success.
* Note that this function will call stat() on @p wrapper if not NULL to test for existence.
* @since 1.1
*/
EAPI Eina_Bool eeze_disk_mount_wrapper_set(Eeze_Disk *disk, const char *wrapper);
@ -275,6 +302,7 @@ EAPI Eina_Bool eeze_disk_mount_wrapper_set(Eeze_Disk *disk, const char *wra
* struct as its event.
*
* NOTE: The return value of this function does not in any way reflect the mount state of a disk.
* @since 1.1
*/
EAPI Eina_Bool eeze_disk_mount(Eeze_Disk *disk);
@ -290,6 +318,7 @@ EAPI Eina_Bool eeze_disk_mount(Eeze_Disk *disk);
* 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.
* @since 1.1
*/
EAPI Eina_Bool eeze_disk_unmount(Eeze_Disk *disk);
@ -305,6 +334,7 @@ EAPI Eina_Bool eeze_disk_unmount(Eeze_Disk *disk);
* 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.
* @since 1.1
*/
EAPI Eina_Bool eeze_disk_eject(Eeze_Disk *disk);
/**
@ -313,6 +343,7 @@ EAPI Eina_Bool eeze_disk_eject(Eeze_Disk *disk);
*
* This function cancels the current pending operation on @p disk which was previously
* started with eeze_disk_mount or eeze_disk_unmount.
* @since 1.1
*/
EAPI void eeze_disk_cancel(Eeze_Disk *disk);
@ -323,6 +354,7 @@ EAPI void eeze_disk_cancel(Eeze_Disk *disk);
*
* This function returns the mount point associated with @p disk.
* Note that to determine whether the disk is actually mounted, eeze_disk_mounted_get should be used.
* @since 1.1
*/
EAPI const char *eeze_disk_mount_point_get(Eeze_Disk *disk);
@ -335,6 +367,7 @@ EAPI const char *eeze_disk_mount_point_get(Eeze_Disk *disk);
* This function sets the mount point associated with @p disk.
* Note that to determine whether the disk is actually mounted, eeze_disk_mounted_get should be used.
* Also note that this function cannot be used while the disk is mounted to avoid losing the current mount point.
* @since 1.1
*/
EAPI Eina_Bool eeze_disk_mount_point_set(Eeze_Disk *disk, const char *mount_point);
@ -345,6 +378,7 @@ EAPI Eina_Bool eeze_disk_mount_point_set(Eeze_Disk *disk, const char *mount
* @return EINA_TRUE on success, else EINA_FALSE
*
* This function replaces the current mount opts of a disk with the ones in @p opts.
* @since 1.1
*/
EAPI Eina_Bool eeze_disk_mountopts_set(Eeze_Disk *disk, unsigned long opts);
@ -354,6 +388,7 @@ EAPI Eina_Bool eeze_disk_mountopts_set(Eeze_Disk *disk, unsigned long opts)
* @return An ORed set of #Eeze_Mount_Opts, 0 on failure
*
* This function returns the current mount opts of a disk.
* @since 1.1
*/
EAPI unsigned long eeze_disk_mountopts_get(Eeze_Disk *disk);
@ -367,6 +402,7 @@ EAPI unsigned long eeze_disk_mountopts_get(Eeze_Disk *disk);
* mounting/unmounting while you need disk data since it will automatically update
* certain necessary data instead of waiting.
* @see eeze_mount_mtab_scan, eeze_mount_fstab_scan
* @since 1.1
*/
EAPI Eina_Bool eeze_mount_tabs_watch(void);
@ -374,6 +410,7 @@ EAPI Eina_Bool eeze_mount_tabs_watch(void);
* @brief Stop watching /etc/fstab and /etc/mtab
*
* This function stops watching fstab and mtab. Data obtained previously will be saved.
* @since 1.1
*/
EAPI void eeze_mount_tabs_unwatch(void);
@ -388,6 +425,7 @@ EAPI void eeze_mount_tabs_unwatch(void);
* use.
* If this function is called after eeze_mount_tabs_watch, #EINA_TRUE will be returned.
* @see eeze_mount_tabs_watch, eeze_mount_fstab_scan
* @since 1.1
*/
EAPI Eina_Bool eeze_mount_mtab_scan(void);
@ -402,6 +440,7 @@ EAPI Eina_Bool eeze_mount_mtab_scan(void);
* use.
* If this function is called after eeze_mount_tabs_watch, #EINA_TRUE will be returned.
* @see eeze_mount_tabs_watch, eeze_mount_mtab_scan
* @since 1.1
*/
EAPI Eina_Bool eeze_mount_fstab_scan(void);
@ -411,6 +450,7 @@ EAPI Eina_Bool eeze_mount_fstab_scan(void);
* @param disk The disk
* @param property The property to get; full list of these is a FIXME
* @return A stringshared char* with the property or NULL on failure
* @since 1.1
*/
EAPI const char *eeze_disk_udev_get_property(Eeze_Disk *disk, const char *property);
@ -421,6 +461,7 @@ EAPI const char *eeze_disk_udev_get_property(Eeze_Disk *disk, const char *pro
* @param disk The disk
* @param sysattr The sysattr to get; full list of these is a FIXME
* @return A stringshared char* with the sysattr or NULL on failure
* @since 1.1
*/
EAPI const char *eeze_disk_udev_get_sysattr(Eeze_Disk *disk, const char *sysattr);
@ -432,6 +473,7 @@ EAPI const char *eeze_disk_udev_get_sysattr(Eeze_Disk *disk, const char *sysa
* @return The syspath of the parent device
*
* Return a stringshared syspath (/sys/$syspath) for the parent device.
* @since 1.1
*/
EAPI const char *eeze_disk_udev_get_parent(Eeze_Disk *disk);
@ -444,6 +486,7 @@ EAPI const char *eeze_disk_udev_get_parent(Eeze_Disk *disk);
* @param value OPTIONAL: The value that @p sysattr should have, or NULL
*
* @return If the sysattr (with value) is found, returns TRUE. Else, false.
* @since 1.1
*/
EAPI Eina_Bool eeze_disk_udev_walk_check_sysattr(Eeze_Disk *disk, const char *sysattr, const char *value);
@ -455,6 +498,7 @@ EAPI Eina_Bool eeze_disk_udev_walk_check_sysattr(Eeze_Disk *disk, const cha
* @param sysattr The attribute to find
*
* @return The stringshared value of @p sysattr if found, or NULL
* @since 1.1
*/
EAPI const char *eeze_disk_udev_walk_get_sysattr(Eeze_Disk *disk, const char *sysattr);

View File

@ -306,17 +306,6 @@ eeze_disk_libmount_mp_lookup_by_devpath(const char *devpath)
* API
*
*/
/**
* @brief Begin watching mtab and fstab
* @return #EINA_TRUE if watching was started, else #EINA_FALSE
*
* This function creates inotify watches on /etc/mtab and /etc/fstab and watches
* 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
* certain necessary data instead of waiting.
* @see eeze_mount_mtab_scan, eeze_mount_fstab_scan
*/
EAPI Eina_Bool
eeze_mount_tabs_watch(void)
{
@ -358,11 +347,6 @@ error:
return EINA_FALSE;
}
/**
* @brief Stop watching /etc/fstab and /etc/mtab
*
* This function stops watching fstab and mtab. Data obtained previously will be saved.
*/
EAPI void
eeze_mount_tabs_unwatch(void)
{
@ -373,18 +357,6 @@ eeze_mount_tabs_unwatch(void)
ecore_file_monitor_del(_fstab_mon);
}
/**
* @brief Scan /etc/mtab a single time
* @return #EINA_TRUE if mtab could be scanned, else #EINA_FALSE
*
* 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
* 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
* use.
* If this function is called after eeze_mount_tabs_watch, #EINA_TRUE will be returned.
* @see eeze_mount_tabs_watch, eeze_mount_fstab_scan
*/
EAPI Eina_Bool
eeze_mount_mtab_scan(void)
{
@ -408,18 +380,6 @@ error:
return EINA_FALSE;
}
/**
* @brief Scan /etc/fstab a single time
* @return #EINA_TRUE if mtab could be scanned, else #EINA_FALSE
*
* This function is used to perform a single scan on /etc/fstab. It is used to gather
* 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
* is requested unless eeze_mount_tabs_watch has been called previously, in which case data is stored for
* use.
* If this function is called after eeze_mount_tabs_watch, #EINA_TRUE will be returned.
* @see eeze_mount_tabs_watch, eeze_mount_mtab_scan
*/
EAPI Eina_Bool
eeze_mount_fstab_scan(void)
{