124f6443dSAndrew Rist /************************************************************** 2*11774565Smseidel * 324f6443dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 424f6443dSAndrew Rist * or more contributor license agreements. See the NOTICE file 524f6443dSAndrew Rist * distributed with this work for additional information 624f6443dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 724f6443dSAndrew Rist * to you under the Apache License, Version 2.0 (the 824f6443dSAndrew Rist * "License"); you may not use this file except in compliance 924f6443dSAndrew Rist * with the License. You may obtain a copy of the License at 10*11774565Smseidel * 1124f6443dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*11774565Smseidel * 1324f6443dSAndrew Rist * Unless required by applicable law or agreed to in writing, 1424f6443dSAndrew Rist * software distributed under the License is distributed on an 1524f6443dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1624f6443dSAndrew Rist * KIND, either express or implied. See the License for the 1724f6443dSAndrew Rist * specific language governing permissions and limitations 1824f6443dSAndrew Rist * under the License. 19*11774565Smseidel * 2024f6443dSAndrew Rist *************************************************************/ 2124f6443dSAndrew Rist 2224f6443dSAndrew 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. 37*11774565Smseidel (https://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 38*11774565Smseidel 39cdf0e10cSrcweir @param context 40*11774565Smseidel @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. 46*11774565Smseidel (https://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 47*11774565Smseidel 48cdf0e10cSrcweir @param context 49*11774565Smseidel @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. 55*11774565Smseidel (https://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 56*11774565Smseidel 57cdf0e10cSrcweir @param context 58*11774565Smseidel @param pCallee the function to be called 59*11774565Smseidel @param pParam the parameter pointer to be passed to the function 60*11774565Smseidel @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. 66*11774565Smseidel (https://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 67*11774565Smseidel 68cdf0e10cSrcweir @param context 69*11774565Smseidel @param pCallee the function to be called 70*11774565Smseidel @param pParam the parameter pointer to be passed to the function 71*11774565Smseidel @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 77*11774565Smseidel valid. 78*11774565Smseidel (https://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 79*11774565Smseidel 80cdf0e10cSrcweir @param context 81*11774565Smseidel @param ppReason the reason, in case calling is not valid 82*11774565Smseidel @return 0 == calling is not valid, 1 == calling is valid 83*11774565Smseidel @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. 89*11774565Smseidel (https://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 90cdf0e10cSrcweir 91*11774565Smseidel @since UDK 3.2.7 92cdf0e10cSrcweir */ 93*11774565Smseidel 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; 100*11774565Smseidel } 101cdf0e10cSrcweir uno_Enterable; 102cdf0e10cSrcweir 103cdf0e10cSrcweir 104cdf0e10cSrcweir #ifdef __cplusplus 105cdf0e10cSrcweir } 106cdf0e10cSrcweir #endif 107cdf0e10cSrcweir 108cdf0e10cSrcweir #endif 109*11774565Smseidel 110