// -----------------------------------------
// SoundScribe (TM) and related software.
//
// Copyright (C) 2007-2011 Vannatech
// http://www.vannatech.com
// All rights reserved.
//
// This source code is subject to the MIT License.
// http://www.opensource.org/licenses/mit-license.php
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// -----------------------------------------
using System;
using System.Runtime.InteropServices;
namespace Vannatech.CoreAudio.Interfaces
{
///
/// Provides access to the topology of an audio device.
///
///
/// MSDN Reference: http://msdn.microsoft.com/en-us/library/dd371376.aspx
///
public partial interface IDeviceTopology
{
///
/// Gets the number of connectors in the device-topology object.
///
/// Receives the connector count.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetConnectorCount(
[Out] [MarshalAs(UnmanagedType.U4)] out UInt32 count);
///
/// Gets the connector that is specified by a connector number.
///
/// The zero-based index of the connector.
/// Receives the interface of the connector object.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetConnector(
[In] [MarshalAs(UnmanagedType.U4)] UInt32 index,
[Out] [MarshalAs(UnmanagedType.Interface)] out IConnector connector);
///
/// Gets the number of subunits in the device topology.
///
/// Receives the subunit count.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetSubunitCount(
[Out] [MarshalAs(UnmanagedType.U4)] out UInt32 subunitCount);
///
/// Gets the subunit that is specified by a subunit number.
///
/// The zero-based index of the subunit.
/// Receives the interface of the object.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetSubunit(
[In] [MarshalAs(UnmanagedType.U4)] UInt32 subunitIndex,
[Out] [MarshalAs(UnmanagedType.Interface)] out ISubunit subunit);
///
/// Gets a part that is identified by its local ID.
///
/// The ID of the part to get.
/// Receives the interface of the part object.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetPartById(
[In] [MarshalAs(UnmanagedType.U4)] UInt32 partId,
[Out] [MarshalAs(UnmanagedType.Interface)] out IPart part);
///
/// Gets the device identifier of the device that is represented by the device-topology object.
///
/// Receives a string containing the device ID.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetDeviceId(
[Out] [MarshalAs(UnmanagedType.LPWStr)] out string deviceId);
///
/// Gets a list of parts in the signal path that links two parts, if the path exists.
///
/// The part at the beginning of the signal path.
/// The part at the end of the signal path.
/// Specifies whether to reject paths that contain mixed data.
/// Receives an interface instance.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetSignalPath(
[In] [MarshalAs(UnmanagedType.Interface)] IPart partFrom,
[In] [MarshalAs(UnmanagedType.Interface)] IPart partTo,
[In] [MarshalAs(UnmanagedType.Bool)] bool rejectMixedPaths,
[Out] [MarshalAs(UnmanagedType.Interface)] out IPartsList partList);
}
}