Jamoma API  0.6.0.a19
TTProtocol.h File Reference

A Protocol interface. More...

#include "TTFoundationAPI.h"
+ Include dependency graph for TTProtocol.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TTProtocol
 TTProtocol is the base class for all protocol protocol. More...
 

Macros

#define TT_PROTOCOL_CONSTRUCTOR
 Declares instantiation and registration methods to add the protocol class as any TTObject class.
 
#define TT_PROTOCOL_INITIALIZE
 Declares all members needed by any protocol class.
 
#define TT_PROTOCOL_PARAMETER(name)
 Declares specific accessors methods to manage the parameter value in order to have one value per registered applications.
 
#define addAttributeAsProtocolParameter(name, type)   TTString _attrname_##name(#name); _attrname_##name.at(0)=tolower(_attrname_##name.at(0)); registerAttribute(_attrname_##name, type, NULL, (TTGetterMethod)& thisTTClass ::get##name, (TTSetterMethod)& thisTTClass ::set##name ); mParameterNames.append(TTSymbol(_attrname_##name)) \
 Add a protocol parameter as an attribute of the class.
 
#define accessProtocolLocalApplicationName   ProtocolGetLocalApplicationName(TTObjectBasePtr(this))
 Macro to update and get the local application name (to use only inside the protocol class)
 

Functions

TTErr TT_EXTENSION_EXPORT TTProtocolDirectoryCallback (const TTValue &baton, const TTValue &data)
 Called when an application directory send a notification to registered application observers. More...
 
TTErr TT_EXTENSION_EXPORT TTProtocolAttributeCallback (const TTValue &baton, const TTValue &data)
 Called when an application object attribute send a notification to registered application observers. More...
 
TTErr TT_EXTENSION_EXPORT TTProtocolGetAttributeCallback (const TTValue &baton, const TTValue &data)
 
TTErr TT_EXTENSION_EXPORT TTProtocolSetAttributeCallback (const TTValue &baton, const TTValue &data)
 
TTErr TT_EXTENSION_EXPORT TTProtocolSendMessageCallback (const TTValue &baton, const TTValue &data)
 
TTErr TT_EXTENSION_EXPORT TTProtocolListenAttributeCallback (const TTValue &baton, const TTValue &data)
 

Detailed Description

A Protocol interface.

Author
Laurent Garnier, Théo de la Hogue

Definition in file TTProtocol.h.

Function Documentation

TTErr TT_EXTENSION_EXPORT TTProtocolAttributeCallback ( const TTValue baton,
const TTValue data 
)

Called when an application object attribute send a notification to registered application observers.

Parameters
baton..
data..
Returns
an error code

Definition at line 471 of file TTProtocol.cpp.

References TTObject::instance(), and kTTErrGeneric.

+ Here is the call graph for this function:

TTErr TT_EXTENSION_EXPORT TTProtocolDirectoryCallback ( const TTValue baton,
const TTValue data 
)

Called when an application directory send a notification to registered application observers.

Parameters
baton..
data..
Returns
an error code

Definition at line 433 of file TTProtocol.cpp.

References TTValue::append(), TTAddress::appendAttribute(), TTNode::getObject(), TTObject::instance(), kAddressCreated, kAddressDestroyed, kTTErrGeneric, TTObject::name(), and TTObject::valid().

+ Here is the call graph for this function:

TTErr TT_EXTENSION_EXPORT TTProtocolGetAttributeCallback ( const TTValue baton,
const TTValue data 
)
Parameters
baton..
data..
Returns
an error code

Definition at line 488 of file TTProtocol.cpp.

References TTAddress::appendAttribute(), TTObject::instance(), and kTTErrGeneric.

+ Here is the call graph for this function:

TTErr TT_EXTENSION_EXPORT TTProtocolListenAttributeCallback ( const TTValue baton,
const TTValue data 
)
Parameters
baton..
data..
Returns
an error code

Definition at line 560 of file TTProtocol.cpp.

References TTAddress::appendAttribute(), TTObject::instance(), and kTTErrGeneric.

+ Here is the call graph for this function:

TTErr TT_EXTENSION_EXPORT TTProtocolSendMessageCallback ( const TTValue baton,
const TTValue data 
)
Parameters
baton..
data..
Returns
an error code

Definition at line 536 of file TTProtocol.cpp.

References TTAddress::appendAttribute(), TTObject::instance(), and kTTErrGeneric.

+ Here is the call graph for this function:

TTErr TT_EXTENSION_EXPORT TTProtocolSetAttributeCallback ( const TTValue baton,
const TTValue data 
)
Parameters
baton..
data..
Returns
an error code

Definition at line 512 of file TTProtocol.cpp.

References TTAddress::appendAttribute(), TTObject::instance(), and kTTErrGeneric.

Referenced by TTApplicationProxyDataValueCallback().

+ Here is the call graph for this function: