// -----------------------------------------
// 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.Externals
{
///
/// Exposes methods for enumerating, getting, and setting property values.
///
///
/// MSDN Reference: http://msdn.microsoft.com/en-us/library/bb761474.aspx
/// Note: This item is external to CoreAudio API, and is defined in the Windows Property System API.
///
[Guid("886d8eeb-8cf2-4446-8d02-cdba1dbdcf99")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IPropertyStore
{
///
/// Gets the number of properties attached to the file.
///
/// Receives the property count.
/// An HRESULT code indicating whether the operation passed of failed.
[PreserveSig]
int GetCount(
[Out] [MarshalAs(UnmanagedType.U4)] out UInt32 propertyCount);
///
/// Gets a property key from an item's array of properties.
///
/// The index of the property key in the array of structures.
/// The unique identifier for a property.
/// An HRESULT code indicating whether the operation passed of failed.
[PreserveSig]
int GetAt(
[In] [MarshalAs(UnmanagedType.U4)] UInt32 propertyIndex,
[Out] out PROPERTYKEY propertyKey);
///
/// Gets data for a specific property.
///
/// A structure containing a unique identifier for the property in question.
/// Receives a structure that contains the property data.
/// An HRESULT code indicating whether the operation passed of failed.
[PreserveSig]
int GetValue(
[In] ref PROPERTYKEY propertyKey,
[Out] out PROPVARIANT value);
///
/// Sets a new property value, or replaces or removes an existing value.
///
/// A structure containing a unique identifier for the property in question.
/// A structure that contains the new property data.
/// An HRESULT code indicating whether the operation passed of failed.
[PreserveSig]
int SetValue(
[In] ref PROPERTYKEY propertyKey,
[In] ref PROPVARIANT value);
///
/// Saves a property change.
///
/// An HRESULT code indicating whether the operation passed of failed.
[PreserveSig]
int Commit();
}
}