~kklimonda/ubuntu/natty/glibmm2.4/update

« back to all changes in this revision

Viewing changes to gio/giomm/drive.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Moog
  • Date: 2009-07-15 13:45:53 UTC
  • mfrom: (1.2.36 upstream)
  • Revision ID: james.westby@ubuntu.com-20090715134553-beb700qg38132w31
Tags: 2.21.2-0ubuntu1
* New Upstream release: (LP: #399018):
  - 2.21.2:
    - Add OptionGroup::add_entry(.., double&)
    - Remove stray semicolons
    - Fix build with glib from master
    - wrap a couple added GDrive methods
    - Wrap g_drive_eject_with_operation() and related functions
    - implement GDrive::stop-button signal
    - implement Gio::InetAddress::get_native_size()
    - Implement Gio::Mount::mount/eject_with_operation()
    - implement Gio::Volume::eject_with_operation()
    - fix accidental bug in Gio::Drive::eject() that the compiler warned me about
    - implement Gio::VolumeMonitor::drive-stop-button
  - 2.21.1 (unstable):
    Glib:
     - Date: Constructor: Check for invalid dates.
     - Added Glib::ValueArray, for use in gstreamermm.
     - Added Glib::file_set_contents().
     - gmmproc:
       - Avoid problems with spaces in _DEFS() calls.
       - Improve guessing of the *_get_type() function names from enum names.
    Gio:
     - Cancellable: Added connect() and disconnect().
     - Added FileIOStream.
     - Added InetAddress.
     - Added Initable.
     - Added IOStream.
     - Added NetworkAddress.
     - Added NetworkService.
     - Added Resolver
     - Added Socket.
     - Added SocketAddress.
     - Added SocketConnectable.
     - Added SrvTarget.
     - File::load_contents() Added overload without the etag_out parameter.
* debian/control{.in}:
  - bump build-dep on libglib2.0-dev to >= 2.21.1
* debian/rules
  - bump SHVER-value to 2.21.2
* debian/watch
  - also look for unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
namespace Gio
46
46
{
47
47
 
 
48
/** @addtogroup giommEnums Enums and Flags */
 
49
 
 
50
/**
 
51
 * @ingroup giommEnums
 
52
 */
 
53
enum DriveStartFlags
 
54
{
 
55
  DRIVE_START_NONE
 
56
};
 
57
 
 
58
} // namespace Gio
 
59
 
 
60
 
 
61
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
62
namespace Glib
 
63
{
 
64
 
 
65
template <>
 
66
class Value<Gio::DriveStartFlags> : public Glib::Value_Enum<Gio::DriveStartFlags>
 
67
{
 
68
public:
 
69
  static GType value_type() G_GNUC_CONST;
 
70
};
 
71
 
 
72
} // namespace Glib
 
73
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
74
 
 
75
 
 
76
namespace Gio
 
77
{
 
78
 
 
79
 
48
80
/** Virtual File System drive management.
49
81
 *
50
82
 * This represent a piece of hardware connected to the machine. It's generally only created for removable hardware or hardware with removable media.
194
226
   * @param flags Flags affecting the unmount if required for eject.
195
227
   */
196
228
  void eject(const SlotAsyncReady& slot, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
197
 
  
 
229
  void eject(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
 
230
  void eject(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
198
231
 
199
232
  /** Ejects the drive.
200
233
   * @param slot A callback which will be called when the eject is completed.
201
234
   * @param flags Flags affecting the unmount if required for eject.
202
235
   */
203
236
  void eject(MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
 
237
  void eject(const Glib::RefPtr<MountOperation>& mount_operation, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
 
238
  
204
239
 
 
240
  // eject_finish() is deprecated in favor of eject_with_operation_finish(), and
 
241
  // since all of our eject() overloads are implemented by
 
242
  // eject_with_operation(), we implement the _finish() with
 
243
  // eject_with_operation_finish and ignore the deprecated one
205
244
  
206
 
  /** Finishes ejecting a drive.
207
 
   * @param result A AsyncResult.
208
 
   * @return <tt>true</tt> if the drive has been ejected successfully,
209
 
   * <tt>false</tt> otherwise.
210
 
   */
211
245
#ifdef GLIBMM_EXCEPTIONS_ENABLED
212
246
  bool eject_finish(const Glib::RefPtr<AsyncResult>& result);
213
247
#else
214
248
  bool eject_finish(const Glib::RefPtr<AsyncResult>& result, std::auto_ptr<Glib::Error>& error);
215
249
#endif //GLIBMM_EXCEPTIONS_ENABLED
216
250
 
217
 
 
 
251
  
218
252
  /** Polls drive to see if media has been inserted or removed.
219
253
   * @param slot A callback which will be called when the poll is completed.
220
254
   * @param cancellable A cancellable object which can be used to cancel the operation.
259
293
   */
260
294
  Glib::StringArrayHandle enumerate_identifiers() const;
261
295
 
 
296
  /** @newin2p22 */
 
297
  void start(const Glib::RefPtr<MountOperation>& mount_operation, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, DriveStartFlags flags = DRIVE_START_NONE);
 
298
  /** @newin2p22 */
 
299
  void start(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, DriveStartFlags flags = DRIVE_START_NONE);
 
300
  
 
301
  
 
302
#ifdef GLIBMM_EXCEPTIONS_ENABLED
 
303
  bool start_finish(const Glib::RefPtr<AsyncResult>& result);
 
304
#else
 
305
  bool start_finish(const Glib::RefPtr<AsyncResult>& result, std::auto_ptr<Glib::Error>& error);
 
306
#endif //GLIBMM_EXCEPTIONS_ENABLED
 
307
 
 
308
  /** @newin2p22 */
 
309
  
 
310
  bool can_start() const;
 
311
  /** @newin2p22 */
 
312
  
 
313
  bool can_start_degraded() const;
 
314
 
 
315
  /** @newin2p22 */
 
316
  void stop(const Glib::RefPtr<MountOperation>& mount_operation, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
 
317
  /** @newin2p22 */
 
318
  void stop(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
 
319
  
 
320
  
 
321
#ifdef GLIBMM_EXCEPTIONS_ENABLED
 
322
  bool stop_finish(const Glib::RefPtr<AsyncResult>& result);
 
323
#else
 
324
  bool stop_finish(const Glib::RefPtr<AsyncResult>& result, std::auto_ptr<Glib::Error>& error);
 
325
#endif //GLIBMM_EXCEPTIONS_ENABLED
 
326
 
 
327
  /** @newin2p22 */
 
328
  
 
329
  bool can_stop() const;
262
330
 
263
331
  /** @newin2p20
264
332
   *
287
355
  Glib::SignalProxy0< void > signal_eject_button();
288
356
 
289
357
 
 
358
  /** @newin2p22 *
 
359
   * @par Prototype:
 
360
   * <tt>void on_my_%stop_button()</tt>
 
361
   */
 
362
 
 
363
  Glib::SignalProxy0< void > signal_stop_button();
 
364
 
 
365
 
290
366
  //_WRAP_VFUNC(Glib::ustring get_name() const, get_name)
291
367
  //Careful of ref-counting: //_WRAP_VFUNC(Glib::RefPtr<Icon> get_icon() const, get_icon)
292
368
  //_WRAP_VFUNC(bool has_volumes() const, has_volumes)