GVolume

GVolume

Synopsis




                    GVolume;
                    GVolumeIface;
GFile*              g_volume_get_root                   (GVolume *volume);
char*               g_volume_get_name                   (GVolume *volume);
GIcon*              g_volume_get_icon                   (GVolume *volume);
GDrive*             g_volume_get_drive                  (GVolume *volume);
gboolean            g_volume_can_unmount                (GVolume *volume);
gboolean            g_volume_can_eject                  (GVolume *volume);
void                g_volume_unmount                    (GVolume *volume,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            g_volume_unmount_finish             (GVolume *volume,
                                                         GAsyncResult *result,
                                                         GError **error);
void                g_volume_eject                      (GVolume *volume,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            g_volume_eject_finish               (GVolume *volume,
                                                         GAsyncResult *result,
                                                         GError **error);


Object Hierarchy


  GInterface
   +----GVolume

Prerequisites

GVolume requires GObject.

Signals


  "changed"                                        : Run Last

Description

Details

GVolume

typedef struct _GVolume GVolume;


GVolumeIface

typedef struct {
  GTypeInterface g_iface;

  /* signals */

  void (*changed) (GVolume *volume);
  
  /* Virtual Table */

  GFile *  (*get_root)       (GVolume         *volume);
  char *   (*get_name)       (GVolume         *volume);
  GIcon *  (*get_icon)       (GVolume         *volume);
  GDrive * (*get_drive)      (GVolume         *volume);
  gboolean (*can_unmount)    (GVolume         *volume);
  gboolean (*can_eject)      (GVolume         *volume);
  void     (*unmount)        (GVolume         *volume,
			      GCancellable    *cancellable,
			      GAsyncReadyCallback callback,
			      gpointer         user_data);
  gboolean (*unmount_finish) (GVolume         *volume,
			      GAsyncResult    *result,
			      GError         **error);
  void     (*eject)          (GVolume         *volume,
			      GCancellable    *cancellable,
			      GAsyncReadyCallback callback,
			      gpointer         user_data);
  gboolean (*eject_finish)   (GVolume         *volume,
			      GAsyncResult    *result,
			      GError         **error);
} GVolumeIface;


g_volume_get_root ()

GFile*              g_volume_get_root                   (GVolume *volume);

volume :

a GVolume.

Returns :

a GFile.

g_volume_get_name ()

char*               g_volume_get_name                   (GVolume *volume);

volume :

a GVolume.

Returns :

the name for the given volume. The returned string should be freed when no longer needed.

g_volume_get_icon ()

GIcon*              g_volume_get_icon                   (GVolume *volume);

volume :

Returns :

the GIcon for the given volume.

g_volume_get_drive ()

GDrive*             g_volume_get_drive                  (GVolume *volume);

volume :

Returns :

the GDrive for the given volume.

g_volume_can_unmount ()

gboolean            g_volume_can_unmount                (GVolume *volume);

volume :

Returns :

TRUE if the volume can be unmounted.

g_volume_can_eject ()

gboolean            g_volume_can_eject                  (GVolume *volume);

volume :

Returns :

TRUE if the volume can be ejected.

g_volume_unmount ()

void                g_volume_unmount                    (GVolume *volume,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

volume :

cancellable :

callback :

user_data :


g_volume_unmount_finish ()

gboolean            g_volume_unmount_finish             (GVolume *volume,
                                                         GAsyncResult *result,
                                                         GError **error);

volume :

result :

error :

a GError location to store the error occuring, or NULL to ignore. Return:

Returns :


g_volume_eject ()

void                g_volume_eject                      (GVolume *volume,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

volume :

cancellable :

callback :

user_data :


g_volume_eject_finish ()

gboolean            g_volume_eject_finish               (GVolume *volume,
                                                         GAsyncResult *result,
                                                         GError **error);

volume :

result :

error :

a GError location to store the error occuring, or NULL to ignore. Returns:

Returns :

Signal Details

The "changed" signal

void                user_function                      (GVolume *gvolume,
                                                        gpointer user_data)      : Run Last

gvolume :

the object which received the signal.

user_data :

user data set when the signal handler was connected.