/********************************************************
*                                                       *
*   Copyright (C) Microsoft. All rights reserved.       *
*                                                       *
********************************************************/

//-----------------------------------------------------------------------------
// File:			msdatsrc.idl
//
// Contents: 		Data Source Interfaces for ActiveX Data Binding.
//
// Comments: 		
//
//-----------------------------------------------------------------------------


cpp_quote("//-----------------------------------------------------------------------------")
cpp_quote("// File:				.C or .H file generated by msdatsrc.idl ")
cpp_quote("//")
cpp_quote("// Copyright:		Copyright (c) 1998-1999 Microsoft Corporation")
cpp_quote("//")
cpp_quote("// Contents: 		.C or .H file generated by msdatsrc.idl")
cpp_quote("//")
cpp_quote("// Comments: 		")
cpp_quote("//")
cpp_quote("//-----------------------------------------------------------------------------")


cpp_quote("#include <winapifamily.h>")

#pragma region Desktop Family
cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")

#pragma midl_echo("// For non-VC5 compilers")
#pragma midl_echo("#if (_MSC_VER >= 1100) && defined (__cplusplus)")
#pragma midl_echo("#define DECLSPEC_UUID(x)	__declspec(uuid(x))")
#pragma midl_echo("#else")
#pragma midl_echo("#define DECLSPEC_UUID(x)")
#pragma midl_echo("#endif")
#pragma midl_echo("")
#pragma midl_echo("// C/C++ interface names")
#pragma midl_echo("#define IDataSource		DataSource")
#pragma midl_echo("#define IDataSourceListener	DataSourceListener")

[
  uuid(7c0ffab0-cd84-11d0-949a-00a0c91110ed),
  version(1.0),
  helpstring("Microsoft Data Source Interfaces for ActiveX Data Binding Type Library")
]				
library MSDATASRC
{
  //=--------------------------------------------------------------------------=
  // Standard imports
  //=--------------------------------------------------------------------------=
  importlib("stdole2.tlb");

  //=--------------------------------------------------------------------------=
  // DataMember typedef
  //=--------------------------------------------------------------------------=
  typedef [uuid(7c0ffab1-cd84-11d0-949a-00a0c91110ed)] BSTR DataMember;

  //=--------------------------------------------------------------------------=
  // IDataSourceListener
  //=--------------------------------------------------------------------------=
  [
    uuid(7c0ffab2-cd84-11d0-949a-00a0c91110ed),
    odl,
    oleautomation,
    hidden
  ]
  interface DataSourceListener : IUnknown
  {
    [hidden] HRESULT dataMemberChanged([in] DataMember bstrDM);
    [hidden] HRESULT dataMemberAdded([in] DataMember bstrDM);
    [hidden] HRESULT dataMemberRemoved([in] DataMember bstrDM);
  };

  //=--------------------------------------------------------------------------=
  // IDataSource
  //=--------------------------------------------------------------------------=
  [
    uuid(7c0ffab3-cd84-11d0-949a-00a0c91110ed),
    oleautomation,
    odl
  ]
  interface DataSource : IUnknown
  {
    [hidden, restricted] HRESULT getDataMember([in] DataMember bstrDM, [in] REFIID riid, [out, retval] IUnknown** ppunk);
    [hidden] HRESULT getDataMemberName([in] long lIndex, [out, retval] DataMember* pbstrDM);
    [hidden] HRESULT getDataMemberCount([out, retval] long* plCount);
    [hidden] HRESULT addDataSourceListener([in] DataSourceListener* pDSL);
    [hidden] HRESULT removeDataSourceListener([in] DataSourceListener* pDSL);
  };

};


cpp_quote("#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */")
#pragma endregion

