// -----------------------------------------
// 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;
using Vannatech.CoreAudio.Enumerations;
namespace Vannatech.CoreAudio.Interfaces
{
///
/// Represents a point of connection between components.
///
///
/// MSDN Reference: http://msdn.microsoft.com/en-us/library/dd371048.aspx
///
public partial interface IConnector
{
///
/// Gets the type of this connector.
///
/// Receives the connector type.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetType(
[Out] [MarshalAs(UnmanagedType.I4)] out ConnectorType connectorType);
///
/// Gets the direction of data flow through this connector.
///
/// Receives the data-flow direction.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetDataFlow(
[Out] [MarshalAs(UnmanagedType.I4)] out DataFlow dataFlow);
///
/// Connects this connector to a connector in another device topology object.
///
/// The connector in the other device topology.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int ConnectTo(
[In] [MarshalAs(UnmanagedType.Interface)] IConnector connector);
///
/// Disconnects this connector from another connector.
///
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int Disconnect();
///
/// Indicates whether this connector is connected to another connector.
///
/// Receives the connection state.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int IsConnected(
[Out] [MarshalAs(UnmanagedType.Bool)] out bool isConnected);
///
/// Gets the connector to which this connector is connected.
///
/// Receives the connector that the current object is connected to.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetConnectedTo(
[Out] [MarshalAs(UnmanagedType.Interface)] out IConnector connector);
///
/// Gets the global ID of the connector, if any, that this connector is connected to.
///
/// Receives the other connectors ID.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetConnectorIdConnectedTo(
[Out] [MarshalAs(UnmanagedType.LPWStr)] out string connectorId);
///
/// Gets the device identifier of the audio device, if any, that this connector is connected to.
///
/// Receives a string that contains the device identifier of the connected device.
/// An HRESULT code indicating whether the operation succeeded of failed.
[PreserveSig]
int GetDeviceIdConnectedTo(
[Out] [MarshalAs(UnmanagedType.LPWStr)] out string deviceId);
}
}