~ubuntu-branches/ubuntu/karmic/glib2.0/karmic-updates

« back to all changes in this revision

Viewing changes to gio/gdrive.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-07 08:55:47 UTC
  • mfrom: (1.2.49 upstream)
  • Revision ID: james.westby@ubuntu.com-20090707085547-oma0yur1uaq4zmop
Tags: 2.21.3-0ubuntu1
* New upstream version:
  - GMappedFile is refcounted now
  - Mainloop: It is now possible to set per-thread default contexts,
    with g_main_context_push_thread_default.
  - glib-mkenums supports a @basename@ substitution, in addition
    to @filename@.
  - GIO:
    + Vfs implementations can support storing of per-file metadata.
    + GCancellable can now be subclassed.
    + Unmount and eject methods now optionally allow interaction, via
      variants that take a GMountOperation object.
  - Bugs fixed:
   556706 Inconsistent help arguments -h, -?
   579449 FileChoosers no longer work if an idle handler is active
   579933 mainloop FD_CLOEXEC has a race condition
   579984 alternate GMainContext support
   585937 gio/gsocket.c (glib 2.21.2) does not compile (Windows/mingw)
   586675 Runtime library location
   586797 Add GCancellables to GSocket ops
   586868 g_filename_complete_get_completions doesn't always return...
   587415 g_resolver_lookup_by_name_finish returns a freed list
   587434 regression tests fail, at least on x86_64
   586928 Avoid g++ warning in g_error()
  - Updated translations: Estonian, Hebrew
* Drop 00git_file_attr_stringv.patch, in upstream release now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
 * @stop: Stops a #GDrive. Since 2.22.
66
66
 * @stop_finish: Finishes a stop operation. Since 2.22.
67
67
 * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
 
68
 * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
68
69
 * @start: Starts a #GDrive. Since 2.22.
69
70
 * @start_finish: Finishes a start operation. Since 2.22.
70
71
 * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
 
72
 * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
 
73
 * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
71
74
 *
72
75
 * Interface for creating #GDrive implementations.
73
76
 */
115
118
  GDriveStartStopType (* get_start_stop_type) (GDrive        *drive);
116
119
 
117
120
  gboolean (* can_start)                (GDrive              *drive);
 
121
  gboolean (* can_start_degraded)       (GDrive              *drive);
118
122
  void     (* start)                    (GDrive              *drive,
119
123
                                         GDriveStartFlags     flags,
120
 
                                         GMountOperation     *start_operation,
 
124
                                         GMountOperation     *mount_operation,
121
125
                                         GCancellable        *cancellable,
122
126
                                         GAsyncReadyCallback  callback,
123
127
                                         gpointer             user_data);
128
132
  gboolean (* can_stop)                 (GDrive              *drive);
129
133
  void     (* stop)                     (GDrive              *drive,
130
134
                                         GMountUnmountFlags   flags,
 
135
                                         GMountOperation     *mount_operation,
131
136
                                         GCancellable        *cancellable,
132
137
                                         GAsyncReadyCallback  callback,
133
138
                                         gpointer             user_data);
137
142
  /* signal, not VFunc */
138
143
  void     (* stop_button)              (GDrive              *drive);
139
144
 
 
145
  void        (* eject_with_operation)      (GDrive              *drive,
 
146
                                             GMountUnmountFlags   flags,
 
147
                                             GMountOperation     *mount_operation,
 
148
                                             GCancellable        *cancellable,
 
149
                                             GAsyncReadyCallback  callback,
 
150
                                             gpointer             user_data);
 
151
  gboolean    (* eject_with_operation_finish) (GDrive            *drive,
 
152
                                             GAsyncResult        *result,
 
153
                                             GError             **error);
140
154
};
141
155
 
142
156
GType    g_drive_get_type                 (void) G_GNUC_CONST;
150
164
gboolean g_drive_is_media_check_automatic (GDrive               *drive);
151
165
gboolean g_drive_can_poll_for_media       (GDrive               *drive);
152
166
gboolean g_drive_can_eject                (GDrive               *drive);
 
167
#ifndef G_DISABLE_DEPRECATED
153
168
void     g_drive_eject                    (GDrive               *drive,
154
169
                                           GMountUnmountFlags    flags,
155
170
                                           GCancellable         *cancellable,
158
173
gboolean g_drive_eject_finish             (GDrive               *drive,
159
174
                                           GAsyncResult         *result,
160
175
                                           GError              **error);
 
176
#endif
161
177
void     g_drive_poll_for_media           (GDrive               *drive,
162
178
                                           GCancellable         *cancellable,
163
179
                                           GAsyncReadyCallback   callback,
172
188
GDriveStartStopType g_drive_get_start_stop_type (GDrive        *drive);
173
189
 
174
190
gboolean g_drive_can_start                (GDrive              *drive);
 
191
gboolean g_drive_can_start_degraded       (GDrive              *drive);
175
192
void     g_drive_start                    (GDrive              *drive,
176
193
                                           GDriveStartFlags     flags,
177
 
                                           GMountOperation     *start_operation,
 
194
                                           GMountOperation     *mount_operation,
178
195
                                           GCancellable        *cancellable,
179
196
                                           GAsyncReadyCallback  callback,
180
197
                                           gpointer             user_data);
185
202
gboolean g_drive_can_stop                 (GDrive               *drive);
186
203
void     g_drive_stop                     (GDrive               *drive,
187
204
                                           GMountUnmountFlags    flags,
 
205
                                           GMountOperation      *mount_operation,
188
206
                                           GCancellable         *cancellable,
189
207
                                           GAsyncReadyCallback   callback,
190
208
                                           gpointer              user_data);
192
210
                                           GAsyncResult         *result,
193
211
                                           GError              **error);
194
212
 
 
213
void        g_drive_eject_with_operation      (GDrive              *drive,
 
214
                                               GMountUnmountFlags   flags,
 
215
                                               GMountOperation     *mount_operation,
 
216
                                               GCancellable        *cancellable,
 
217
                                               GAsyncReadyCallback  callback,
 
218
                                               gpointer             user_data);
 
219
gboolean    g_drive_eject_with_operation_finish (GDrive            *drive,
 
220
                                               GAsyncResult        *result,
 
221
                                               GError             **error);
 
222
 
195
223
G_END_DECLS
196
224
 
197
225
#endif /* __G_DRIVE_H__ */