Difference between revisions of "Uno/Binary/Spec/Environment Stack"
m (→API: Fixed link.) |
m (Added link. Fixed typedef.) |
||
Line 1: | Line 1: | ||
− | Type: | + | Type: specification State: draft |
− | State: | + | |
==Feature== | ==Feature== | ||
Line 23: | Line 22: | ||
The prototype for a callee: | The prototype for a callee: | ||
<code>[cpp] | <code>[cpp] | ||
− | typedef void uno_EnvCallee(va_list); | + | typedef void SAL_CALL uno_EnvCallee(va_list); |
</code> | </code> | ||
Line 45: | Line 44: | ||
</code> | </code> | ||
− | The client API, which is thread affine: | + | The client API, which is [[Uno/Term/Thread Affine|thread-affine]]: |
<code>[cpp] | <code>[cpp] | ||
void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, char const * pEnv_type) SAL_THROW_EXTERN_C(); | void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, char const * pEnv_type) SAL_THROW_EXTERN_C(); | ||
Line 58: | Line 57: | ||
[[Category:Spec]] | [[Category:Spec]] | ||
+ | [[Category:Draft]] | ||
[[Category:Uno]] | [[Category:Uno]] | ||
[[Category:Uno:Binary]] | [[Category:Uno:Binary]] |
Revision as of 16:38, 12 February 2007
Type: specification State: draft
Feature
The Uno/Spec/Environment Stack for Binary Uno.
Uno/Binary/Spec/Environments can be:
- entered or
- left, respectively
- invoked
by a thread. The currently entered Uno/Binary/Spec/environment can be retrieved.
Multiple purpose environments can be entered/invoked at the same time.
Purposes of environment can be specified in any particular order, e.g.:
[cpp]
"uno:A:B:C"
Where the order may be relevant, depending on the purpose environments.
Rationale
API
The prototype for a callee:
[cpp]
typedef void SAL_CALL uno_EnvCallee(va_list);
The Enterable interface, to be optionally implemented by purpose environments:
[cpp]
typedef void uno_Enterable_enter (void * context);
typedef void uno_Enterable_leave (void * context);
typedef void uno_Enterable_callInto_v(void * context, uno_EnvCallee * pCallee, va_list param);
typedef void uno_Enterable_callOut_v (void * context, uno_EnvCallee * pCallee, va_list param);
typedef int uno_Enterable_isValid_v (void * context, rtl_uString ** ppReason);
typedef struct {
uno_Enterable_enter * m_enter; uno_Enterable_leave * m_leave; uno_Enterable_callInto_v * m_callInto_v; uno_Enterable_callOut_v * m_callOut_v; uno_Enterable_isValid_v * m_isValid;
} uno_Enterable;
The client API, which is thread-affine:
[cpp]
void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, char const * pEnv_type) SAL_THROW_EXTERN_C();
void SAL_CALL uno_Environment_invoke_v (uno_Environment * pEnv, uno_EnvCallee * pCallee, va_list param) SAL_THROW_EXTERN_C();
void SAL_CALL uno_Environment_invoke (uno_Environment * pEnv, uno_EnvCallee * pCallee, ...) SAL_THROW_EXTERN_C();
void SAL_CALL uno_Environment_enter (uno_Environment * pEnv) SAL_THROW_EXTERN_C();
int SAL_CALL uno_Environment_isValid (uno_Environment * pEnv, rtl_uString ** pReason) SAL_THROW_EXTERN_C();
uno_Environment->pReserved == uno_Enterable *