xref: /trunk/main/cppu/inc/uno/Enterable.h (revision 24f6443d)
1*24f6443dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*24f6443dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*24f6443dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*24f6443dSAndrew Rist  * distributed with this work for additional information
6*24f6443dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*24f6443dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*24f6443dSAndrew Rist  * "License"); you may not use this file except in compliance
9*24f6443dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*24f6443dSAndrew Rist  *
11*24f6443dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*24f6443dSAndrew Rist  *
13*24f6443dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*24f6443dSAndrew Rist  * software distributed under the License is distributed on an
15*24f6443dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*24f6443dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*24f6443dSAndrew Rist  * specific language governing permissions and limitations
18*24f6443dSAndrew Rist  * under the License.
19*24f6443dSAndrew Rist  *
20*24f6443dSAndrew Rist  *************************************************************/
21*24f6443dSAndrew Rist 
22*24f6443dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef INCLUDED_uno_Enterable_h
25cdf0e10cSrcweir #define INCLUDED_uno_Enterable_h
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "uno/environment.h"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #ifdef __cplusplus
31cdf0e10cSrcweir extern "C"
32cdf0e10cSrcweir {
33cdf0e10cSrcweir #endif
34cdf0e10cSrcweir 
35cdf0e10cSrcweir 
36cdf0e10cSrcweir /** Generic function type declaration for entering an Environment.
37cdf0e10cSrcweir     (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
38cdf0e10cSrcweir 
39cdf0e10cSrcweir 	@param context
40cdf0e10cSrcweir     @since UDK 3.2.7
41cdf0e10cSrcweir */
42cdf0e10cSrcweir typedef void uno_Enterable_enter     (void * context);
43cdf0e10cSrcweir 
44cdf0e10cSrcweir 
45cdf0e10cSrcweir /** Generic function type declaration for levaing an Environment.
46cdf0e10cSrcweir     (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
47cdf0e10cSrcweir 
48cdf0e10cSrcweir 	@param context
49cdf0e10cSrcweir     @since UDK 3.2.7
50cdf0e10cSrcweir */
51cdf0e10cSrcweir typedef void uno_Enterable_leave     (void * context);
52cdf0e10cSrcweir 
53cdf0e10cSrcweir 
54cdf0e10cSrcweir /** Generic function type declaration for calling into an Environment.
55cdf0e10cSrcweir     (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
56cdf0e10cSrcweir 
57cdf0e10cSrcweir 	@param context
58cdf0e10cSrcweir     @param pCallee  the function to be called
59cdf0e10cSrcweir     @param pParam   the parameter pointer to be passed to the function
60cdf0e10cSrcweir     @since UDK 3.2.7
61cdf0e10cSrcweir */
62cdf0e10cSrcweir typedef void uno_Enterable_callInto_v(void * context, uno_EnvCallee * pCallee, va_list * pParam);
63cdf0e10cSrcweir 
64cdf0e10cSrcweir 
65cdf0e10cSrcweir /** Generic function type declaration for calling out of an Environment.
66cdf0e10cSrcweir     (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
67cdf0e10cSrcweir 
68cdf0e10cSrcweir 	@param context
69cdf0e10cSrcweir     @param pCallee  the function to be called
70cdf0e10cSrcweir     @param pParam   the parameter pointer to be passed to the function
71cdf0e10cSrcweir     @since UDK 3.2.7
72cdf0e10cSrcweir */
73cdf0e10cSrcweir typedef void uno_Enterable_callOut_v (void * context, uno_EnvCallee * pCallee, va_list * pParam);
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 
76cdf0e10cSrcweir /** Generic function type declaration for checking if calling on managed object is
77cdf0e10cSrcweir     valid.
78cdf0e10cSrcweir     (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
79cdf0e10cSrcweir 
80cdf0e10cSrcweir 	@param  context
81cdf0e10cSrcweir     @param  ppReason  the reason, in case calling is not valid
82cdf0e10cSrcweir     @return           0 == calling is not valid, 1 == calling is valid
83cdf0e10cSrcweir     @since UDK 3.2.7
84cdf0e10cSrcweir */
85cdf0e10cSrcweir typedef int  uno_Enterable_isValid_v (void * context, rtl_uString ** ppReason);
86cdf0e10cSrcweir 
87cdf0e10cSrcweir 
88cdf0e10cSrcweir /** A struct pReserved needs to point to, if implementing a purpose environment.
89cdf0e10cSrcweir     (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
90cdf0e10cSrcweir 
91cdf0e10cSrcweir     @since UDK 3.2.7
92cdf0e10cSrcweir */
93cdf0e10cSrcweir typedef struct
94cdf0e10cSrcweir {
95cdf0e10cSrcweir 	uno_Enterable_enter      * m_enter;
96cdf0e10cSrcweir 	uno_Enterable_leave      * m_leave;
97cdf0e10cSrcweir 	uno_Enterable_callInto_v * m_callInto_v;
98cdf0e10cSrcweir 	uno_Enterable_callOut_v  * m_callOut_v;
99cdf0e10cSrcweir 	uno_Enterable_isValid_v  * m_isValid;
100cdf0e10cSrcweir }
101cdf0e10cSrcweir uno_Enterable;
102cdf0e10cSrcweir 
103cdf0e10cSrcweir 
104cdf0e10cSrcweir #ifdef __cplusplus
105cdf0e10cSrcweir }
106cdf0e10cSrcweir #endif
107cdf0e10cSrcweir 
108cdf0e10cSrcweir #endif
109