Difference between revisions of "Uno/Binary/Spec/Environment Stack"
m (Fixed some links.) |
(Updated state.) |
||
Line 1: | Line 1: | ||
− | Type: specification State: | + | Type: specification State: Evolving Availability: URE 1.3 |
==Feature== | ==Feature== |
Latest revision as of 11:46, 22 May 2007
Type: specification State: Evolving Availability: URE 1.3
Feature
The abstract Environment Stack for Binary Uno.
environments can be:
- entered or
- left, respectively
- invoked
by a thread. The currently entered 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 *