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