/ gwdiskinfo.h / Functions / Description

Functions



disk_info_new

Creates a new disk information.
struct disk_info * disk_info_new ( void);
This function creates a new disk information. It's an allocation function.

Result: a pointer to the disk information structure.
Returns NULL when an error occured.
.


disk_info_set_name

Sets the disk name.
gint disk_info_set_name ( struct disk_info *p, gchar *name);
This function sets the disk name used in the catalog.


Parameters
p the disk information to set the name
name the name

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_set_fsname

Sets the disk file system name.
gint disk_info_set_fsname ( struct disk_info *p, gchar *fsname);
This function sets the disk file system name.


Parameters
p the disk information to set the file system name
fsname the file system name

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_set_dir

Sets the disk directory.
gint disk_info_set_dir ( struct disk_info *p, gchar *dir);
This function sets the disk directory. This information is the mount point where was the disk when it was added to the catalog.


Parameters
p the disk information to set the directory
dir the directory

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_set_num

Sets the disk number archive.
gint disk_info_set_num ( struct disk_info *p, gint num);
This function sets the disk number archive used in the catalog. The number archive is a single index.


Parameters
p the disk information to set the number archive
num the number archive

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_set_type

Sets the disk type.
gint disk_info_set_type ( struct disk_info *p, gchar *type);
This function sets the disk type. It's the types used in the system as ext2, iso9660, vfat,...


Parameters
p the disk information to set the type
type the type

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_set_volume

Sets the disk volume name.
gint disk_info_set_volume ( struct disk_info *p, gchar *volume);
This function sets the disk volume name. The disk volume is the label of the disk.


Parameters
p the disk information to set the volume name
volume the volume name

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_set_full

Sets the disk full space.
gint disk_info_set_full ( struct disk_info *p, guint64 full);
This function sets the disk full space.


Parameters
p the disk information to set the full space
full the full space

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_set_free

Sets the disk free space.
gint disk_info_set_free ( struct disk_info *p, guint64 free);
This function sets the disk free space.


Parameters
p the disk information to set the free space
free the full capacity

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_set_date

Sets the disk update date.
gint disk_info_set_date ( struct disk_info *p, gulong date);
This function sets the disk update date.


Parameters
p the disk information to set the update date
date the update date

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_set_serial

Sets the disk serial number.
gint disk_info_set_serial ( struct disk_info *p, gchar *serial);
This function sets the disk serial number.


Parameters
p the disk information to set the serial number
serial the serial number

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_set_category

Sets the disk category.
gint disk_info_set_category ( struct disk_info *p, struct category *category);
This function sets the disk category.


Parameters
p the disk information to set the category
category the category

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_set_description

Sets the disk description.
gint disk_info_set_description ( struct disk_info *p, gchar *description);
This function sets the disk description.


Parameters
p the disk information to set the description
description the description

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


disk_info_get_name

Gets the disk's name.
gchar *	disk_info_get_name ( struct disk_info *p);
This function gets the disk's name.


Parameters
p the disk information to get the name

Result: the name.
Returns NULL when an error occured.
.


disk_info_get_fsname

Gets the disk's file system name.
gchar *	disk_info_get_fsname ( struct disk_info *p);
This function gets the disk's file system name.


Parameters
p the disk information to get the file system name

Result: the file system name.
Returns NULL when an error occured.
.


disk_info_get_dir

Gets the disk's directory.
gchar *	disk_info_get_dir ( struct disk_info *p);
This function gets the disk's directory.


Parameters
p the disk information to get the directory

Result: the directory.
Returns NULL when an error occured.
.


disk_info_get_num

Gets the disk's number archive.
gint	disk_info_get_num ( struct disk_info *p);
This function gets the disk's number archive.


Parameters
p the disk information to get the number archive

Result: the number archive.
Returns -1 when an error occured.
.


disk_info_get_type

Gets the disk's type.
gchar *	disk_info_get_type ( struct disk_info *p);
This function gets the disk's type.


Parameters
p the disk information to get the type

Result: the type.
Returns NULL when an error occured.
.


disk_info_get_volume

Gets the disk's volume name.
gchar *	disk_info_get_volume ( struct disk_info *p);
This function gets the disk's volume name.


Parameters
p the disk information to get the volume name

Result: the volume name.
Returns NULL when an error occured.
.


disk_info_get_capacity

Gets the disk's capacity.
guint64	disk_info_get_capacity ( struct disk_info *p);
This function gets the disk's capacity.


Parameters
p the disk information to get the capacity

Result: the capacity.
Returns 0 when an error occured.
.


disk_info_get_full

Gets the disk's full space.
guint64 disk_info_get_full ( struct disk_info *p);
This function gets the disk's full space.


Parameters
p the disk information to get the full space

Result: the full space.
Returns 0 when an error occured.
.


disk_info_get_free

Gets the disk's free space.
guint64 disk_info_get_free ( struct disk_info *p);
This function gets the disk's free space.


Parameters
p the disk information to get the free space

Result: the free.
Returns 0 when an error occured.
.


disk_info_get_date

Gets the disk's date.
gulong	disk_info_get_date ( struct disk_info *p);
This function gets the disk's date in seconds since 1970.


Parameters
p the disk information to get the date

Result: the date.
Returns 0 when an error occured.
.


disk_info_get_date_to_gchar

Gets the disk's date.
gchar * disk_info_get_date_to_gchar ( struct disk_info *p);
This function gets the disk's date in char format.


Parameters
p the disk information to get the date

Result: the date. Must be freed with g_free().
Returns NULL when an error occured.
.


disk_info_get_serial

Gets the disk's serial number.
gchar *	disk_info_get_serial ( struct disk_info *p);
This function gets the disk's serial number.


Parameters
p the disk information to get the serial number

Result: the serial number.
Returns NULL when an error occured.
.


disk_info_get_category

Gets the disk's category.
struct category * disk_info_get_category ( struct disk_info *p);
This function gets the disk's category.


Parameters
p the disk information to get the category

Result: the category.
Returns NULL when an error occured.
.


disk_info_get_category_name

Gets the disk's category name.
gchar * disk_info_get_category_name ( struct disk_info *p);
This function gets the disk's category name.


Parameters
p the disk information to get the category name

Result: the category name.
Returns NULL when an error occured.
.


disk_info_get_category_index

Gets the disk's category index.
gint disk_info_get_category_index ( struct disk_info *p);
This function gets the disk's category index.


Parameters
p the disk information to get the category index

Result: the category index.
Returns -1 when an error occured.
.


disk_info_get_description

Gets the disk's description.
gchar *	disk_info_get_description ( struct disk_info *p);
This function gets the disk's description.


Parameters
p the disk information to get the description

Result: the description.
Returns NULL when an error occured.
.


disk_info_get_pixmap

Gets the disk's pixmap.
GdkPixmap * disk_info_get_pixmap ( struct disk_info *p);
This function gets the disk's pixmap for graphical represention.


Parameters
p the disk information to get the pixmap

Result: the pixmap.
Returns NULL when an error occured.
.


disk_info_get_bitmap

Gets the disk's bitmap.
GdkBitmap * disk_info_get_bitmap ( struct disk_info *p);
This function gets the disk's bitmap for graphical representation.


Parameters
p the disk information to get the bitmap

Result: the bitmap.
Returns NULL when an error occured.
.


disk_info_free

Frees datas structure.
gint disk_info_free ( struct disk_info *p);
This function frees the disk information's datas. This function doesn't desallocate the category datas structure (because it's a global information stored in catalog file information datas structure).

Parameters
p the disk information to free

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.