VirtualBox

Changeset 95423 in vbox for trunk/src/VBox/Main/idl


Ignore:
Timestamp:
Jun 29, 2022 11:13:40 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
152025
Message:

Audio/Main: Bigger revamp of the audio interface(s) to later also support host audio device enumeration and selection for individual VMs. The audio settings now live in a dedicated (per-VM) IAudioSettings interface (audio adapter + audio host device stuff), to further tidy up the IMachine interface. Also added stubs for IAudioDevice + IHostAudioDevice, plus enmuerations, left for further implementation. Added a new IHostAudioDeviceChangedEvent that can also be used later by API clients. bugref:10050

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r95386 r95423  
    65906590  <interface
    65916591    name="IMachine" extends="$unknown"
    6592     uuid="42643361-11f7-40b4-8d66-79029838b1f1"
     6592    uuid="9fbd57c7-e1b2-4baa-bbfb-ae831c06f32b"
    65936593    wsmap="managed"
    65946594    rest="managed"
     
    69606960    </attribute>
    69616961
    6962     <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
    6963       <desc>Associated audio adapter, always present.</desc>
     6962    <attribute name="audioSettings" type="IAudioSettings" readonly="yes">
     6963      <desc>
     6964        The machine's audio settings.
     6965      </desc>
    69646966    </attribute>
    69656967
     
    1173911741  <interface
    1174011742    name="IHost" extends="$unknown"
    11741     uuid="fc0759a6-a5e2-41e1-93ca-64776335eb2d"
     11743    uuid="e54f6256-97a7-4947-8a78-10c013ddf4b8"
    1174211744    wsmap="managed"
    1174311745    rest="managed"
     
    1176211764    <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
    1176311765      <desc>List of floppy drives available on the host.</desc>
     11766    </attribute>
     11767
     11768    <attribute name="audioDevices" type="IHostAudioDevice" readonly="yes" safearray="yes">
     11769      <desc>List of audio devices currently available on the host.
     11770        <result name="E_NOTIMPL">
     11771          This attribute is not implemented yet.
     11772        </result>
     11773      </desc>
    1176411774    </attribute>
    1176511775
     
    2335323363
    2335423364  <enum
     23365    name="AudioDirection"
     23366    uuid="f27d209b-040c-4ae9-beae-85f9693ca07a"
     23367    >
     23368    <desc>
     23369      Audio direction enumeration.
     23370    </desc>
     23371
     23372    <const name="Unknown"       value="0">
     23373      <desc>Direction cannot be determined.</desc>
     23374    </const>
     23375    <const name="In"            value="1">
     23376      <desc>Input (Recording).</desc>
     23377    </const>
     23378    <const name="Out"           value="2">
     23379      <desc>Output (Playback).</desc>
     23380    </const>
     23381    <const name="Duplex"        value="3">
     23382      <desc>Duplex (Recording + Playback).</desc>
     23383    </const>
     23384  </enum>
     23385
     23386  <enum
     23387    name="AudioDeviceType"
     23388    uuid="95457071-ef88-45a9-8416-fc05b08731d2"
     23389    >
     23390    <desc>
     23391      Audio device type enumeration.
     23392    </desc>
     23393
     23394    <const name="Unknown"       value="0">
     23395      <desc>Device type is unknown / cannot be determined</desc>
     23396    </const>
     23397    <const name="BuiltLin"      value="1">
     23398      <desc>Built-in device (cannot be removed).</desc>
     23399    </const>
     23400    <const name="ExternalUSB"   value="2">
     23401      <desc>External device, connected via USB.</desc>
     23402    </const>
     23403    <const name="ExternalOther" value="3">
     23404      <desc>External device, connected via some other method.</desc>
     23405    </const>
     23406  </enum>
     23407
     23408  <enum
     23409    name="AudioDeviceState"
     23410    uuid="45c1b969-556a-4277-8570-b438d2ef5ebe"
     23411    >
     23412    <desc>
     23413      Audio device state enumeration.
     23414    </desc>
     23415
     23416    <const name="Unknown"    value="0">
     23417      <desc>Device state is unknown / cannot be determined</desc>
     23418    </const>
     23419    <const name="Active"     value="1">
     23420      <desc>Device is active and can be used.</desc>
     23421    </const>
     23422    <const name="Disabled"   value="2">
     23423      <desc>Device is in a disabled state.</desc>
     23424    </const>
     23425    <const name="NotPresent" value="3">
     23426      <desc>Device is marked as not being present.</desc>
     23427    </const>
     23428    <const name="Unplugged" value="4">
     23429      <desc>Device has been unplugged.</desc>
     23430    </const>
     23431  </enum>
     23432
     23433  <interface
     23434    name="IAudioDevice" extends="$unknown"
     23435    uuid="e50cd98b-ec3f-4146-9943-863dd1233691"
     23436    wsmap="managed"
     23437    rest="managed"
     23438    reservedMethods="4" reservedAttributes="8"
     23439    >
     23440    <desc>
     23441      The IAudioDevice interface represents an abstract base interface for
     23442      an audio device.
     23443    </desc>
     23444
     23445    <attribute name="id" type="uuid" mod="string" readonly="yes">
     23446      <desc>
     23447        Unique device ID.
     23448      </desc>
     23449    </attribute>
     23450
     23451    <attribute name="name" type="wstring">
     23452      <desc>
     23453        Friendly name of the device.
     23454      </desc>
     23455    </attribute>
     23456    <attribute name="type" type="AudioDeviceType">
     23457      <desc>
     23458        Device type.
     23459      </desc>
     23460    </attribute>
     23461    <attribute name="usage" type="AudioDirection">
     23462      <desc>
     23463        Usage type of the device.
     23464      </desc>
     23465    </attribute>
     23466    <attribute name="defaultIn" type="boolean">
     23467      <desc>
     23468        Whether this device is being marked as the default input
     23469        device by the host OS.
     23470      </desc>
     23471    </attribute>
     23472    <attribute name="defaultOut" type="boolean">
     23473      <desc>
     23474        Whether this device is being marked as the default output
     23475        device by the host OS.
     23476      </desc>
     23477    </attribute>
     23478    <attribute name="isHotPlug" type="boolean">
     23479      <desc>
     23480        Whether this device is being marked as a hotplug device, i.e. can
     23481        be removed from the system.
     23482      </desc>
     23483    </attribute>
     23484    <attribute name="state" type="AudioDeviceState">
     23485      <desc>
     23486        Current device state.
     23487      </desc>
     23488    </attribute>
     23489    <method name="getProperty" const="yes">
     23490      <desc>
     23491        Returns an audio specific property string.
     23492
     23493        If the requested data @a key does not exist, this function will
     23494        succeed and return an empty string in the @a value argument.
     23495
     23496      </desc>
     23497      <param name="key" type="wstring" dir="in">
     23498        <desc>Name of the key to get.</desc>
     23499      </param>
     23500      <param name="value" type="wstring" dir="return">
     23501        <desc>Value of the requested key.</desc>
     23502      </param>
     23503    </method>
     23504
     23505  </interface>
     23506
     23507  <interface
     23508    name="IHostAudioDevice" extends="IAudioDevice"
     23509    uuid="dc6dda3e-6b04-4203-b4c6-43906dc1695c"
     23510    wsmap="managed">
     23511    <desc>
     23512      Audio device provided by the host OS.
     23513    </desc>
     23514    <attribute name="midlDoesNotLikeEmptyInterfaces" readonly="yes" type="boolean"/>
     23515  </interface>
     23516
     23517  <interface
     23518    name="IAudioSettings" extends="$unknown"
     23519    uuid="52f40b16-520e-473f-9428-3e69b0d915c3"
     23520    wsmap="managed"
     23521    rest="managed"
     23522    reservedMethods="4" reservedAttributes="8"
     23523    >
     23524    <desc>
     23525      The IAudioSettings interface represents the audio settings for a virtual machine.
     23526    </desc>
     23527
     23528    <method name="getHostAudioDevice">
     23529      <desc>
     23530        Returns the machine's current host audio device for the specified usage.
     23531        <result name="E_NOTIMPL">
     23532          This method is not implemented yet.
     23533        </result>
     23534      </desc>
     23535      <param name="usage" type="AudioDirection" dir="in">
     23536        <desc>Usage to retrieve audio device for.</desc>
     23537      </param>
     23538      <param name="device" type="IHostAudioDevice" dir="return">
     23539        <desc>Host audio device for the specified direction.</desc>
     23540      </param>
     23541    </method>
     23542
     23543    <method name="setHostAudioDevice">
     23544      <desc>
     23545        Sets the machine's current host audio device for the specified usage.
     23546        <result name="E_NOTIMPL">
     23547          This method is not implemented yet.
     23548        </result>
     23549      </desc>
     23550      <param name="device" type="IHostAudioDevice" dir="in">
     23551        <desc>Sets the host audio device for the specified usage.</desc>
     23552      </param>
     23553      <param name="usage" type="AudioDirection" dir="in">
     23554        <desc>Usage to set audio device for.</desc>
     23555      </param>
     23556    </method>
     23557
     23558    <attribute name="adapter" type="IAudioAdapter" readonly="yes">
     23559      <desc>Associated audio adapter, always present.</desc>
     23560    </attribute>
     23561
     23562  </interface>
     23563
     23564  <enum
    2335523565    name="AuthType"
    2335623566    uuid="7eef6ef6-98c2-4dc2-ab35-10d2b292028d"
     
    2361723827  <interface
    2361823828    name="IInternalSessionControl" extends="$unknown"
    23619     uuid="f4638054-f1f8-4590-941a-cdb66075c5bf"
     23829    uuid="a797fb40-7e04-4aa5-88c5-299aa0454577"
    2362023830    internal="yes"
    2362123831    wsmap="suppress"
     
    2376323973      </desc>
    2376423974      <param name="audioAdapter" type="IAudioAdapter" dir="in"/>
     23975    </method>
     23976
     23977    <method name="onHostAudioDeviceChange">
     23978      <desc>
     23979        Triggerd when the state of a host audio device
     23980        has changed.
     23981      </desc>
     23982      <param name="device" type="IHostAudioDevice" dir="in" readonly="yes">
     23983        <desc>Device the state has been changed for.</desc>
     23984      </param>
     23985      <param name="isNew" type="boolean" dir="in" readonly="yes">
     23986        <desc>Whether this is a newly detected device or not.</desc>
     23987      </param>
     23988      <param name="state" type="AudioDeviceState" dir="in" readonly="yes">
     23989        <desc>The new device state.</desc>
     23990      </param>
     23991      <param name="errorInfo" type="IVirtualBoxErrorInfo" dir="in" readonly="yes">
     23992        <desc>Error information.</desc>
     23993      </param>
    2376523994    </method>
    2376623995
     
    2581326042  <enum
    2581426043    name="VBoxEventType"
    25815     uuid="08cc6ebb-1e55-4b78-8fb1-1e06f5b4dbe9"
     26044    uuid="d9a89164-5143-49ce-b9ab-4e76edf5b93b"
    2581626045    >
    2581726046
     
    2629726526      </desc>
    2629826527    </const>
     26528    <const name="OnHostAudioDeviceChanged" value="116">
     26529      <desc>
     26530        See <link to="IHostAudioDeviceChangedEvent">IHostAudioDeviceChangedEvent</link>.
     26531      </desc>
     26532    </const>
    2629926533    <!-- End event marker -->
    2630026534    <!-- @todo rename to 'End' as it is exclusive (we use 'last' to be inclusive). -->
    26301     <const name="Last" value="116">
     26535    <const name="Last" value="117">
    2630226536      <desc>
    2630326537        Must be last event, used for iterations and structures relying on numerical event values.
     
    2811128345      </desc>
    2811228346    </attribute>
     28347  </interface>
     28348
     28349  <interface
     28350    name="IHostAudioDeviceChangedEvent" extends="IEvent"
     28351    waitable="yes"
     28352    uuid="8dcc633f-7b03-4f0a-9f40-7a784dd0835a"
     28353    wsmap="managed" autogen="VBoxEvent" id="OnHostAudioDeviceChangedEvent"
     28354    >
     28355    <desc>
     28356      Notification when a host audio device state has changed.
     28357    </desc>
     28358
     28359    <attribute name="device" type="IHostAudioDevice" readonly="yes">
     28360      <desc>
     28361        Host audio device that has changed.
     28362      </desc>
     28363    </attribute>
     28364
     28365    <attribute name="new" type="boolean" readonly="yes">
     28366      <desc>
     28367        @c true if the host device is a newly detected device, @c false if not.
     28368      </desc>
     28369    </attribute>
     28370
     28371    <attribute name="state" type="AudioDeviceState" readonly="yes">
     28372      <desc>
     28373        New audio device state.
     28374      </desc>
     28375    </attribute>
     28376
     28377    <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
     28378      <desc>
     28379        @c null on success or an error message object on failure.
     28380      </desc>
     28381    </attribute>
     28382
    2811328383  </interface>
    2811428384
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