1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef INCLUDED_uno_Enterable_h 29 #define INCLUDED_uno_Enterable_h 30 31 #include "uno/environment.h" 32 33 34 #ifdef __cplusplus 35 extern "C" 36 { 37 #endif 38 39 40 /** Generic function type declaration for entering an Environment. 41 (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 42 43 @param context 44 @since UDK 3.2.7 45 */ 46 typedef void uno_Enterable_enter (void * context); 47 48 49 /** Generic function type declaration for levaing an Environment. 50 (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 51 52 @param context 53 @since UDK 3.2.7 54 */ 55 typedef void uno_Enterable_leave (void * context); 56 57 58 /** Generic function type declaration for calling into an Environment. 59 (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 60 61 @param context 62 @param pCallee the function to be called 63 @param pParam the parameter pointer to be passed to the function 64 @since UDK 3.2.7 65 */ 66 typedef void uno_Enterable_callInto_v(void * context, uno_EnvCallee * pCallee, va_list * pParam); 67 68 69 /** Generic function type declaration for calling out of an Environment. 70 (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 71 72 @param context 73 @param pCallee the function to be called 74 @param pParam the parameter pointer to be passed to the function 75 @since UDK 3.2.7 76 */ 77 typedef void uno_Enterable_callOut_v (void * context, uno_EnvCallee * pCallee, va_list * pParam); 78 79 80 /** Generic function type declaration for checking if calling on managed object is 81 valid. 82 (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 83 84 @param context 85 @param ppReason the reason, in case calling is not valid 86 @return 0 == calling is not valid, 1 == calling is valid 87 @since UDK 3.2.7 88 */ 89 typedef int uno_Enterable_isValid_v (void * context, rtl_uString ** ppReason); 90 91 92 /** A struct pReserved needs to point to, if implementing a purpose environment. 93 (http://wiki.services.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack) 94 95 @since UDK 3.2.7 96 */ 97 typedef struct 98 { 99 uno_Enterable_enter * m_enter; 100 uno_Enterable_leave * m_leave; 101 uno_Enterable_callInto_v * m_callInto_v; 102 uno_Enterable_callOut_v * m_callOut_v; 103 uno_Enterable_isValid_v * m_isValid; 104 } 105 uno_Enterable; 106 107 108 #ifdef __cplusplus 109 } 110 #endif 111 112 #endif 113