[
uuid(a8c889c2-0b99-46c3-bf89-302d81ff5341),
version(1.0),
pointer_default(unique)
]
interface bridgeclient
{
	#pragma warning( disable : 4312 4311 )  // Disable annoying warning messages

	// The BridgeClient Service: listens for RPC calls from the BridgeServer
	// This is the service that runs on each BridgeClient
	// since the BridgeServer is a client to these services (of which there are many)
	// we need to use explicit handles to control which BridgeClient
	// the BridgeServer makes an RPC to.

	typedef struct _BRIDGE_CLIENT_INFO {
		wchar_t * UUID;
		wchar_t * Protocol;
		wchar_t * Address;
		wchar_t * Endpoint;
		wchar_t * Options;
	} BRIDGECLIENT_SERVICE_INFO; // identifies the connection to the BridgeClient service

	typedef [handle] BRIDGECLIENT_SERVICE_INFO * HBC; // i.e. a handle to a BridgeClient Service

	// the BridgeServer calls this to notify the BridgeClient of a chat message
	void InstantMessageNotify([in] HBC, 
		[in] int senderId,
		[in,string] wchar_t * sender, 
		[in] int recipientId,
		[in,string] wchar_t * recipient, 
		[in,string] wchar_t * msg);

	void GroupMessageNotify([in] HBC, 
		[in] int senderId,
		[in,string] wchar_t * sender, 
		[in] int recipientId,
		[in,string] wchar_t * recipient, 
		[in,string] wchar_t * msg);

	// the BridgeServer calls these to notify the BridgeClient of changes
	void ClientNotify([in] HBC, [in] int type, [in] int theId, [in] int reason, [in] int param);

}
