//+-------------------------------------------------------------------------
//
//  Microsoft Windows
//
//  Copyright (C) Microsoft Corporation, 1999 - 1999
//
//  File:       rrasui.idl
//
//--------------------------------------------------------------------------

// rrasui.idl : IDL source for MPRSNAP UI
//

#ifndef _RRASUI_IDL_
#define _RRASUI_IDL_

import "basetsd.h";
import "wtypes.idl";

/*---------------------------------------------------------------------------
	IRtrAdviseSink
 ---------------------------------------------------------------------------*/

[
   object,
   uuid(66A2DB14-D706-11d0-A37B-00C04FC9DA04),
   local,
   pointer_default(unique),
]

interface IRtrAdviseSink : IUnknown
{
	import "unknwn.idl";

	HRESULT OnChange([in] LONG_PTR ulConnection,
					 [in] DWORD dwChangeType,
					 [in] DWORD dwObjectType,
					 [in] LPARAM lUserParam,
					 [in] LPARAM lParam);
};

cpp_quote("// Valid values for dwChangeType of OnChange")
cpp_quote("#define ROUTER_REFRESH		1")
cpp_quote("#define ROUTER_DO_DISCONNECT 2")

cpp_quote("#define DeclareIRtrAdviseSinkMembers(IPURE) \\")
cpp_quote("	STDMETHOD(OnChange)(THIS_ LONG_PTR ulConnection, \\")
cpp_quote("						DWORD dwChangeType, \\")
cpp_quote("						DWORD dwObjectType, \\")
cpp_quote("						LPARAM lUserParam, \\")
cpp_quote("						LPARAM lParam) IPURE; \\")
cpp_quote(" ")



/*---------------------------------------------------------------------------
	IRouterRefresh
 ---------------------------------------------------------------------------*/
[
   object,
   uuid(66a2db15-d706-11d0-a37b-00c04fc9da04),
   local,
   pointer_default(unique),
]

interface IRouterRefresh : IUnknown
{
	import "unknwn.idl";

	//
	// Function: Start
	// This will start the automatic refresh
	//
	HRESULT Start(DWORD dwSeconds);

	//
	// Function: GetRefreshInterval
	// Gets the interval between refresh actions (time is in seconds).
	//
	HRESULT	GetRefreshInterval([out] DWORD *pdwSeconds);

	//
	// Function: SetRefreshInterval
	// Sets the interval between refresh actions (time is in seconds).
	//
	HRESULT	SetRefreshInterval([in] DWORD dwSeconds);

	//
	// Function: Stop
	// This will turn off the automatic refresh mechanism (note that
	// this will not change the automatic refresh variable).
	//
	HRESULT Stop();

	//
	// Function: IsRefreshStarted
	// Returns S_OK if the refresh has been started, S_FALSE if not
	//
	HRESULT IsRefreshStarted();

	//
	// Function: IsInRefresh
	// Returns S_OK if we are in a refresh, returns S_FALSE if not
	//
	HRESULT	IsInRefresh();

	//
	// Function: Refresh
	// Kicks off a full refresh cycle manually.
	//
	HRESULT Refresh();


	HRESULT	AdviseRefresh([in] IRtrAdviseSink *pRtrAdviseSink,
						  [out] LONG_PTR *pulConnection,
						  [in] LPARAM ulUserParam);
	HRESULT UnadviseRefresh([in] LONG_PTR ulConnection);
	HRESULT NotifyRefresh();

};

cpp_quote("#define DeclareIRouterRefreshMembers(IPURE)\\")
cpp_quote("	STDMETHOD(IsInRefresh)(THIS) IPURE;\\")
cpp_quote("	STDMETHOD(Refresh)(THIS) IPURE;\\")
cpp_quote("	STDMETHOD(Start)(THIS_ DWORD dwSeconds) IPURE;\\")
cpp_quote("	STDMETHOD(GetRefreshInterval)(THIS_ DWORD *pdwSeconds) IPURE;\\")
cpp_quote("	STDMETHOD(SetRefreshInterval)(THIS_ DWORD dwSeconds) IPURE;\\")
cpp_quote("	STDMETHOD(Stop)(THIS) IPURE;\\")
cpp_quote("	STDMETHOD(IsRefreshStarted)(THIS) IPURE;\\")
cpp_quote("	STDMETHOD(AdviseRefresh)(THIS_ IRtrAdviseSink *pRtrAdviseSink,\\")
cpp_quote("							 LONG_PTR *pulConnection, \\")
cpp_quote("							LPARAM lUserParam) IPURE;\\")
cpp_quote("	STDMETHOD(UnadviseRefresh)(THIS_ LONG_PTR ulConnection) IPURE;\\")
cpp_quote("	STDMETHOD(NotifyRefresh)(THIS) IPURE;\\")



/*---------------------------------------------------------------------------
	IRouterRefreshAccess
 ---------------------------------------------------------------------------*/
[
   object,
   uuid(66a2db1c-d706-11d0-a37b-00c04fc9da04),
   local,
   pointer_default(unique),
]

interface IRouterRefreshAccess : IUnknown
{
	import "unknwn.idl";

    HRESULT GetRefreshObject([out] IRouterRefresh **ppRouterRefresh);
};

cpp_quote("#define DeclareIRouterRefreshAccessMembers(IPURE)\\")
cpp_quote("	STDMETHOD(GetRefreshObject)(THIS_ IRouterRefresh **ppRtrRef) IPURE;\\")

#endif  // _RRASUI_IDL_
