~ubuntu-branches/ubuntu/trusty/virtualbox-ose/trusty

« back to all changes in this revision

Viewing changes to include/VBox/VBoxHDD.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
335
335
}
336
336
 
337
337
/**
338
 
 * Interface to deliver error messages to upper layers.
 
338
 * Interface to deliver error messages (and also informational messages)
 
339
 * to upper layers.
339
340
 *
340
341
 * Per disk interface. Optional, but think twice if you want to miss the
341
342
 * opportunity of reporting better human-readable error messages.
353
354
    VDINTERFACETYPE enmInterface;
354
355
 
355
356
    /**
356
 
     * Error message callback.
 
357
     * Error message callback. Must be able to accept special IPRT format
 
358
     * strings.
357
359
     *
358
360
     * @param   pvUser          The opaque data passed on container creation.
359
361
     * @param   rc              The VBox error code.
363
365
     */
364
366
    DECLR3CALLBACKMEMBER(void, pfnError, (void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va));
365
367
 
 
368
    /**
 
369
     * Informational message callback. May be NULL. Used e.g. in
 
370
     * VDDumpImages(). Must be able to accept special IPRT format strings.
 
371
     *
 
372
     * @return  VBox status code.
 
373
     * @param   pvUser          The opaque data passed on container creation.
 
374
     * @param   pszFormat       Error message format string.
 
375
     * @param   ...             Error message arguments.
 
376
     */
 
377
    DECLR3CALLBACKMEMBER(int, pfnMessage, (void *pvUser, const char *pszFormat, ...));
 
378
 
366
379
} VDINTERFACEERROR, *PVDINTERFACEERROR;
367
380
 
368
381
/**
401
414
/** Pointer to FNVDCOMPLETED() */
402
415
typedef FNVDCOMPLETED *PFNVDCOMPLETED;
403
416
 
 
417
/** Open the storage readonly. */
 
418
#define VD_INTERFACEASYNCIO_OPEN_FLAGS_READONLY RT_BIT(0)
 
419
/** Create the storage backend if it doesn't exist. */
 
420
#define VD_INTERFACEASYNCIO_OPEN_FLAGS_CREATE RT_BIT(1)
404
421
 
405
422
/**
406
423
 * Support interface for asynchronous I/O
425
442
     * @return  VBox status code.
426
443
     * @param   pvUser          The opaque data passed on container creation.
427
444
     * @param   pszLocation     Name of the location to open.
428
 
     * @param   fReadonly       Whether to open the storage medium read only.
 
445
     * @param   uOpenFlags      Flags for opening the backend.
 
446
     *                          See VD_INTERFACEASYNCIO_OPEN_FLAGS_* #defines
429
447
     * @param   pfnCompleted    The callabck which is called whenever a task
430
448
     *                          completed. The backend has to pass the user data
431
449
     *                          of the request initiator (ie the one who calls
433
451
     *                          if this is NULL.
434
452
     * @param   ppStorage       Where to store the opaque storage handle.
435
453
     */
436
 
    DECLR3CALLBACKMEMBER(int, pfnOpen, (void *pvUser, const char *pszLocation, bool fReadonly,
 
454
    DECLR3CALLBACKMEMBER(int, pfnOpen, (void *pvUser, const char *pszLocation, unsigned uOpenFlags,
437
455
                                        PFNVDCOMPLETED pfnCompleted, void **ppStorage));
438
456
 
439
457
    /**
456
474
    DECLR3CALLBACKMEMBER(int, pfnGetSize, (void *pvUser, void *pStorage, uint64_t *pcbSize));
457
475
 
458
476
    /**
 
477
     * Sets the size of the opened storage backend if possible.
 
478
     *
 
479
     * @return  VBox status code.
 
480
     * @retval  VERR_NOT_SUPPORTED if the backend does not support this operation.
 
481
     * @param   pvUser          The opaque data passed on container creation.
 
482
     * @param   pStorage        The opaque storage handle to close.
 
483
     * @param   cbSize          The new size of the image.
 
484
     */
 
485
    DECLR3CALLBACKMEMBER(int, pfnSetSize, (void *pvUser, void *pStorage, uint64_t cbSize));
 
486
 
 
487
    /**
459
488
     * Synchronous write callback.
460
489
     *
461
490
     * @return  VBox status code.
1213
1242
 * Try to get the backend name which can use this image.
1214
1243
 *
1215
1244
 * @return  VBox status code.
 
1245
 * @param   pVDIfsDisk      Pointer to the per-disk VD interface list.
1216
1246
 * @param   pszFilename     Name of the image file for which the backend is queried.
1217
1247
 * @param   ppszFormat      Receives pointer of the UTF-8 string which contains the format name.
1218
1248
 *                          The returned pointer must be freed using RTStrFree().
1219
1249
 */
1220
 
VBOXDDU_DECL(int) VDGetFormat(const char *pszFilename, char **ppszFormat);
 
1250
VBOXDDU_DECL(int) VDGetFormat(PVDINTERFACE pVDIfsDisk, const char *pszFilename, char **ppszFormat);
1221
1251
 
1222
1252
/**
1223
1253
 * Opens an image file.