VirtualBox

Changeset 11484 in vbox for trunk/include


Ignore:
Timestamp:
Aug 19, 2008 12:41:38 PM (16 years ago)
Author:
vboxsync
Message:

Storage/VBoxHDD-new: Add information about configuration settings supported by a backend.
Storage/iSCSI: Move initiator name default to backend.
Main: Move iSCSI initiator name default to backend.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxHDD-new.h

    r11444 r11484  
    213213 * location appropriately. */
    214214#define VD_CAP_FILE                 RT_BIT(6)
     215/** The backend uses the config interface. The caller needs to know how to
     216 * provide the mandatory configuration parts this way. */
     217#define VD_CAP_CONFIG               RT_BIT(7)
    215218/** @}*/
    216 
    217 /**
    218  * Data structure for returning a list of backend capabilities.
    219  */
    220 typedef struct VDBACKENDINFO
    221 {
    222     /** Name of the backend. */
    223     char *pszBackend;
    224     /** Capabilities of the backend (a combination of the VD_CAP_* flags). */
    225     uint64_t uBackendCaps;
    226     /** Pointer to a NULL-terminated array of strings, containing the supported
    227      * file extensions. Note that some backends do not work on files, so this
    228      * pointer may just contain NULL. */
    229     const char * const *papszFileExtensions;
    230 } VDBACKENDINFO, *PVDBACKENDINFO;
    231219
    232220/**
     
    624612/** Pointer to configuration value type for configuration information interface. */
    625613typedef VDCFGVALUETYPE *PVDCFGVALUETYPE;
     614
     615/**
     616 * Configuration value. This is not identical to CFGMVALUE.
     617 */
     618typedef union VDCFGVALUE
     619{
     620    /** Integer value. */
     621    struct VDCFGVALUE_INTEGER
     622    {
     623        /** The integer represented as 64-bit unsigned. */
     624        uint64_t    u64;
     625    } Integer;
     626
     627    /** String value. (UTF-8 of course) */
     628    struct VDCFGVALUE_STRING
     629    {
     630        /** Pointer to the string. */
     631        char        *psz;
     632    } String;
     633
     634    /** Byte string value. */
     635    struct VDCFGVALUE_BYTES
     636    {
     637        /** Length of byte string. (in bytes) */
     638        RTUINT      cb;
     639        /** Pointer to the byte string. */
     640        void        *pv;
     641    } Bytes;
     642} VDCFGVALUE, *PVDCFGVALUE;
    626643
    627644/**
     
    881898
    882899
     900/** @name Configuration interface key handling flags.
     901 * @{
     902 */
     903/** Mandatory config key. Not providing a value for this key will cause
     904 * the backend to fail. */
     905#define VD_CFGKEY_MANDATORY         RT_BIT(0)
     906/** Expert config key. Not showing it by default in the GUI is is probably
     907 * a good idea, as the average user won't understand it easily. */
     908#define VD_CFGKEY_EXPERT            RT_BIT(1)
     909/** @}*/
     910
     911/**
     912 * Structure describing configuration keys required/supported by a backend
     913 * through the config interface.
     914 */
     915typedef struct VDCONFIGINFO
     916{
     917    /** Key name of the configuration. */
     918    const char *pszKey;
     919    /** Pointer to default value (descriptor). NULL if no useful default value
     920     * can be specified. */
     921    const PVDCFGVALUE pDefaultValue;
     922    /** Value type for this key. */
     923    VDCFGVALUETYPE enmValueType;
     924    /** Key handling flags (a combination of VD_CFGKEY_* flags). */
     925    uint64_t uKeyFlags;
     926} VDCONFIGINFO;
     927
     928/** Pointer to structure describing configuration keys. */
     929typedef VDCONFIGINFO *PVDCONFIGINFO;
     930
     931/** Pointer to const structure describing configuration keys. */
     932typedef const VDCONFIGINFO *PCVDCONFIGINFO;
     933
     934/**
     935 * Data structure for returning a list of backend capabilities.
     936 */
     937typedef struct VDBACKENDINFO
     938{
     939    /** Name of the backend. */
     940    char *pszBackend;
     941    /** Capabilities of the backend (a combination of the VD_CAP_* flags). */
     942    uint64_t uBackendCaps;
     943    /** Pointer to a NULL-terminated array of strings, containing the supported
     944     * file extensions. Note that some backends do not work on files, so this
     945     * pointer may just contain NULL. */
     946    const char * const *papszFileExtensions;
     947    /** Pointer to an array of structs describing each supported config key.
     948     * Terminated by a NULL config key. Note that some backends do not support
     949     * the configuration interface, so this pointer may just contain NULL.
     950     * Mandatory if the backend sets VD_CAP_CONFIG. */
     951    PCVDCONFIGINFO paConfigInfo;
     952} VDBACKENDINFO, *PVDBACKENDINFO;
     953
     954
    883955/**
    884956 * VBox HDD Container main structure.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette