NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::rtmp::IConnect_event_handler Class Referenceabstract

Superclass of all handlers of connect events. More...

Inheritance diagram for mi::rtmp::IConnect_event_handler:
Inheritance graph
[legend]

Public Member Functions

virtual bool  handle (bool is_create, IConnection *connection, const IData *command_arguments, const IData *user_arguments)=0
  Called on a connect event. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x57b2f74b, 0x3964, 0x45cf, 0x85, 0xcd, 0xb3, 0xd3, 0x37, 0xbf, 0x09, 0xc2 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
  Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
  Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x57b2f74b, 0x3964, 0x45cf, 0x85, 0xcd, 0xb3, 0xd3, 0x37, 0xbf, 0x09, 0xc2 >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

Superclass of all handlers of connect events.

A subclass gets registered via mi::rtmp::IServer::install() and will be called in the case of a connect event. There can be several connect event handlers and on new connections each will be called until one returns true or the list of handlers is exhausted.

Member Function Documentation

virtual bool mi::rtmp::IConnect_event_handler::handle ( bool  is_create,
IConnection connection,
const IData command_arguments,
const IData user_arguments 
)
pure virtual

Called on a connect event.

If the is_create parameter is true the supplied connection can be used to register handlers for stream and call events. If the connection should be allowed it should return true. This way several connect event handlers can be installed, each responsible for different applications. When a connection is closed, the same handler that initially allowed the connection is called again but with is_create set to false. The return value is only considered when is_create is true. Note that the arguments are no longer valid after the handler has returned so the connection pointer cannot be saved away.

Note
The connection parameter is only valid during the call of the handle() method and cannot be stored (even if proper reference counting is used).
Parameters
is_create Indicates whether this is a new or closed connection.
connection The corresponding connection which can be used to register call and stream event handlers.
command_arguments The command object from the client.
user_arguments The user object from the client.
Returns
If is_create is false, the return value is ignored. If is_create is true, the return value indicates whether this connect event handler declares itself responsible for the connection.