~ubuntu-branches/debian/jessie/glib2.0/jessie

« back to all changes in this revision

Viewing changes to gio/gvolume.h

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-02-15 13:00:43 UTC
  • mfrom: (1.3.1 upstream) (69.1.10 intrepid)
  • Revision ID: james.westby@ubuntu.com-20090215130043-q47fbt3owmt42m2f
Tags: 2.18.4-2
* Release to unstable
* debian/rules:
- bump SHVER, since we are already forcing a 2.18.0 dependecy on the
  symbols introduced in the development versions
* debian/control.in:
- added Homepage and Vcs-* control fields

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* GIO - GLib Input, Output and Streaming Library
2
 
 * 
 
2
 *
3
3
 * Copyright (C) 2006-2007 Red Hat, Inc.
4
4
 *
5
5
 * This library is free software; you can redistribute it and/or
28
28
#ifndef __G_VOLUME_H__
29
29
#define __G_VOLUME_H__
30
30
 
31
 
#include <glib-object.h>
32
 
#include <gio/gfile.h>
33
 
#include <gio/gdrive.h>
 
31
#include <gio/giotypes.h>
34
32
 
35
33
G_BEGIN_DECLS
36
34
 
91
89
 * @mount_finish: Finishes a mount operation.
92
90
 * @eject: Ejects a given #GVolume.
93
91
 * @eject_finish: Finishes an eject operation.
94
 
 * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if 
 
92
 * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if
95
93
 *    the #GVolume doesn't have one.
96
94
 * @enumerate_identifiers: Returns an array strings listing the kinds
97
95
 *    of <link linkend="volume-identifier">identifiers</link> which the #GVolume has.
98
96
 * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
99
 
 * 
 
97
 * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if
 
98
 *   it is not known.
 
99
 *
100
100
 * Interface for implementing operations for mountable volumes.
101
101
 **/
102
102
typedef struct _GVolumeIface    GVolumeIface;
107
107
 
108
108
  /* signals */
109
109
 
110
 
  void (*changed) (GVolume *volume);
111
 
  void (*removed) (GVolume *volume);
112
 
  
 
110
  void        (* changed)               (GVolume             *volume);
 
111
  void        (* removed)               (GVolume             *volume);
 
112
 
113
113
  /* Virtual Table */
114
114
 
115
 
  char *    (*get_name)       (GVolume             *volume);
116
 
  GIcon *   (*get_icon)       (GVolume             *volume);
117
 
  char *    (*get_uuid)       (GVolume             *volume);
118
 
  GDrive *  (*get_drive)      (GVolume             *volume);
119
 
  GMount *  (*get_mount)      (GVolume             *volume);
120
 
  gboolean  (*can_mount)      (GVolume             *volume);
121
 
  gboolean  (*can_eject)      (GVolume             *volume);
122
 
  void      (*mount_fn)       (GVolume             *volume,
123
 
                               GMountMountFlags     flags,
124
 
                               GMountOperation     *mount_operation,
125
 
                               GCancellable        *cancellable,
126
 
                               GAsyncReadyCallback  callback,
127
 
                               gpointer             user_data);
128
 
  gboolean  (*mount_finish)   (GVolume             *volume,
129
 
                               GAsyncResult        *result,
130
 
                               GError             **error);
131
 
  void      (*eject)          (GVolume             *volume,
132
 
                               GMountUnmountFlags   flags,
133
 
                               GCancellable        *cancellable,
134
 
                               GAsyncReadyCallback  callback,
135
 
                               gpointer             user_data);
136
 
  gboolean  (*eject_finish)   (GVolume             *volume,
137
 
                               GAsyncResult        *result,
138
 
                               GError             **error);
139
 
  
140
 
  char *   (*get_identifier)           (GVolume             *volume,
141
 
                                        const char          *kind);
142
 
  char **  (*enumerate_identifiers)    (GVolume             *volume);
143
 
 
144
 
  gboolean (*should_automount)         (GVolume             *volume);
145
 
  
 
115
  char      * (* get_name)              (GVolume             *volume);
 
116
  GIcon     * (* get_icon)              (GVolume             *volume);
 
117
  char      * (* get_uuid)              (GVolume             *volume);
 
118
  GDrive    * (* get_drive)             (GVolume             *volume);
 
119
  GMount    * (* get_mount)             (GVolume             *volume);
 
120
  gboolean    (* can_mount)             (GVolume             *volume);
 
121
  gboolean    (* can_eject)             (GVolume             *volume);
 
122
  void        (* mount_fn)              (GVolume             *volume,
 
123
                                         GMountMountFlags     flags,
 
124
                                         GMountOperation     *mount_operation,
 
125
                                         GCancellable        *cancellable,
 
126
                                         GAsyncReadyCallback  callback,
 
127
                                         gpointer             user_data);
 
128
  gboolean    (* mount_finish)          (GVolume             *volume,
 
129
                                         GAsyncResult        *result,
 
130
                                         GError             **error);
 
131
  void        (* eject)                 (GVolume             *volume,
 
132
                                         GMountUnmountFlags   flags,
 
133
                                         GCancellable        *cancellable,
 
134
                                         GAsyncReadyCallback  callback,
 
135
                                         gpointer             user_data);
 
136
  gboolean    (* eject_finish)          (GVolume             *volume,
 
137
                                         GAsyncResult        *result,
 
138
                                         GError             **error);
 
139
 
 
140
  char      * (* get_identifier)        (GVolume             *volume,
 
141
                                         const char          *kind);
 
142
  char     ** (* enumerate_identifiers) (GVolume             *volume);
 
143
 
 
144
  gboolean    (* should_automount)      (GVolume             *volume);
 
145
 
 
146
  GFile     * (* get_activation_root)   (GVolume             *volume);
 
147
 
146
148
};
147
149
 
148
 
GType     g_volume_get_type       (void) G_GNUC_CONST;
 
150
GType    g_volume_get_type              (void) G_GNUC_CONST;
149
151
 
150
152
char *   g_volume_get_name              (GVolume              *volume);
151
153
GIcon *  g_volume_get_icon              (GVolume              *volume);
176
178
                                         const char           *kind);
177
179
char **  g_volume_enumerate_identifiers (GVolume              *volume);
178
180
 
 
181
GFile *  g_volume_get_activation_root   (GVolume              *volume);
179
182
 
180
183
G_END_DECLS
181
184