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 #ifndef _UNO_DISPATCHER_H_ 28 #define _UNO_DISPATCHER_H_ 29 30 #include <sal/types.h> 31 #include <rtl/ustring.h> 32 #include <uno/any2.h> 33 34 #ifdef __cplusplus 35 extern "C" 36 { 37 #endif 38 39 struct _typelib_TypeDescription; 40 struct _uno_Interface; 41 42 /** Function pointer declaration for the binary C uno dispatch function. Any pure out or return 43 value will be constructed by the callee, iff no exception is signalled. 44 If an exception is signalled, the any *ppException is properly constructed by the callee, 45 otherwise the pointer *ppException is set to 0. 46 An attribute get call is indicated by a non-null return pointer. 47 48 @param pUnoI uno interface the call is performed on 49 @param pMemberType member type description of a method or attribute 50 @param pReturn pointer to return value memory; 51 pointer may be undefined if void method, null if attribute set call. 52 @param pArgs an array of pointers to arguments values. 53 (remark: the value of an interface reference stores a 54 uno_interface *, so you get it by *(uno_Interface **)pArgs[n]) 55 @param ppException pointer to pointer to unconstructed any to signal an exception. 56 */ 57 typedef void (SAL_CALL * uno_DispatchMethod)( 58 struct _uno_Interface * pUnoI, 59 const struct _typelib_TypeDescription * pMemberType, 60 void * pReturn, 61 void * pArgs[], 62 uno_Any ** ppException ); 63 64 #if defined( SAL_W32) 65 #pragma pack(push, 8) 66 #elif defined(SAL_OS2) 67 #pragma pack(push, 8) 68 #endif 69 70 /** The binary C uno interface description. 71 */ 72 typedef struct _uno_Interface 73 { 74 /** Acquires uno interface. 75 76 @param pInterface uno interface 77 */ 78 void (SAL_CALL * acquire)( struct _uno_Interface * pInterface ); 79 /** Releases uno interface. 80 81 @param pInterface uno interface 82 */ 83 void (SAL_CALL * release)( struct _uno_Interface * pInterface ); 84 /** dispatch function 85 */ 86 uno_DispatchMethod pDispatcher; 87 } uno_Interface; 88 89 #if defined( SAL_W32) || defined(SAL_OS2) 90 #pragma pack(pop) 91 #endif 92 93 #ifdef __cplusplus 94 } 95 #endif 96 97 #endif 98