Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When the Engine receives this request it looks for a registered ComponentCommunicationsInterface interface for the specified UUID (MY_COMPONENT_ENGINE_UUID). If found, it calls the ComponentCommunicationsInterface.Accept function for that component. The Accept function is where your Engine component can decide whether to accept the connection or not.

Talk
idtalk-2

Code Block
languagecpp
bool Accept(void* connection, const GUID &sourceUuid)
{
	if(!IsEqualGUID(sourceUuid, MY_COMPONENT_UI_UUID))
 	{
		return false; // deny the connection
	}
/* Save the connection handle for later. You should serialise (protect with locks) access to the connections container because multiple WMCs might be attempting to connect at the same time, and each is in a different thread. */
	connections[sourceUuid] = connection;
	return true;
}

...