Jamoma API  0.6.0.a19
TTApplicationManager.h File Reference

Handles TTApplication and #Protocol instances. More...

+ Include dependency graph for TTApplicationManager.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TTApplicationManager
 Handles TTApplication and #Protocol instances. More...
 

Enumerations

enum  TTApplicationNotificationFlag {
  kApplicationReleased = 0,
  kApplicationInstantiated = 1,
  kApplicationProtocolStarted = 2,
  kApplicationProtocolStopped = 3
}
 

Functions

TTErr TTMODULAR_EXPORT TTApplicationManagerAddApplicationObserver (TTSymbol anApplicationName, const TTObject anObserver)
 Add a TTCallback as observer of application creation/destruction note : it uses the extern TTModularApplications variable. More...
 
TTErr TTMODULAR_EXPORT TTApplicationManagerRemoveApplicationObserver (TTSymbol anApplicationName, const TTObject anObserver)
 Remove a TTCallback as observer of application creation/destruction note : it uses the extern TTModularApplications variable. More...
 
TTErr TTMODULAR_EXPORT TTApplicationManagerProtocolActivityInCallback (const TTValue &baton, const TTValue &data)
 To get back raw incoming messages from any protocol. More...
 
TTErr TTMODULAR_EXPORT TTApplicationManagerProtocolActivityOutCallback (const TTValue &baton, const TTValue &data)
 To get back raw outputing messages from any protocol. More...
 

Detailed Description

Handles TTApplication and #Protocol instances.

the TTApplicationManager class is a kind of tower control between our application (called "local") and all others (called "distant"). This coordination between applications is based on protocol units which one applications have to register.
Then, once applications are registered to protocols, any distant applications can :

  • discover the local application namespace.
  • get the value an attribute of an object registered into the local application.
  • set the value an attribute of an object registered into the local application.
  • listen the value an attribute of an object registered into the local application.
    First of all, notice those features are not available for all protocols
    Then, notice the features above can also be done in the opposite way (the local application to the distant applications).
    The TTApplicationManager class provides method to instanciate and release TTApplication and #Protocol instances.
    See also
    TTApplication, TTProtocolLib
    Authors
    Théo de la Hogue

Definition in file TTApplicationManager.h.

Enumeration Type Documentation

Enumerator
kApplicationReleased 

an application have been released by the application manager

kApplicationInstantiated 

an application have been intantiated by the application manager

kApplicationProtocolStarted 

application's protocol have been started

kApplicationProtocolStopped 

application's protocol will be stopped

Definition at line 44 of file TTApplicationManager.h.

Function Documentation

TTErr TTMODULAR_EXPORT TTApplicationManagerAddApplicationObserver ( TTSymbol  anApplicationName,
const TTObject  anObserver 
)

Add a TTCallback as observer of application creation/destruction note : it uses the extern TTModularApplications variable.

Parameters
anApplicationNamean application to observe
observera TTCallbackPtr to add
Returns
an error code

Definition at line 1403 of file TTApplicationManager.cpp.

References TTHash::append(), kTTErrNone, kTTErrValueNotFound, TTHash::lookup(), and TTModularApplicationManager.

+ Here is the call graph for this function:

TTErr TTMODULAR_EXPORT TTApplicationManagerProtocolActivityInCallback ( const TTValue baton,
const TTValue data 
)

To get back raw incoming messages from any protocol.

Parameters
baton..
data..
Returns
an error code

Definition at line 1470 of file TTApplicationManager.cpp.

References kTTErrNone, TTValue::prepend(), TTObject::set(), and TTModularApplicationManager.

+ Here is the call graph for this function:

TTErr TTMODULAR_EXPORT TTApplicationManagerProtocolActivityOutCallback ( const TTValue baton,
const TTValue data 
)

To get back raw outputing messages from any protocol.

Parameters
baton..
data..
Returns
an error code

Definition at line 1486 of file TTApplicationManager.cpp.

References kTTErrNone, TTValue::prepend(), TTObject::set(), and TTModularApplicationManager.

+ Here is the call graph for this function:

TTErr TTMODULAR_EXPORT TTApplicationManagerRemoveApplicationObserver ( TTSymbol  anApplicationName,
const TTObject  anObserver 
)

Remove a TTCallback as observer of application creation/destruction note : it uses the extern TTModularApplications variable.

Parameters
anApplicationNamean application
observera TTCallbackPtr to remove
Returns
a kTTErrGeneric if there isn't observer

Definition at line 1435 of file TTApplicationManager.cpp.

References kTTErrValueNotFound, TTHash::lookup(), TTHash::remove(), and TTModularApplicationManager.

+ Here is the call graph for this function: