1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dispatcher.h,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _UNO_DISPATCHER_H_
31 #define _UNO_DISPATCHER_H_
33 #include <sal/types.h>
34 #include <rtl/ustring.h>
42 struct _typelib_TypeDescription
;
43 struct _uno_Interface
;
45 /** Function pointer declaration for the binary C uno dispatch function. Any pure out or return
46 value will be constructed by the callee, iff no exception is signalled.
47 If an exception is signalled, the any *ppException is properly constructed by the callee,
48 otherwise the pointer *ppException is set to 0.
49 An attribute get call is indicated by a non-null return pointer.
51 @param pUnoI uno interface the call is performed on
52 @param pMemberType member type description of a method or attribute
53 @param pReturn pointer to return value memory;
54 pointer may be undefined if void method, null if attribute set call.
55 @param pArgs an array of pointers to arguments values.
56 (remark: the value of an interface reference stores a
57 uno_interface *, so you get it by *(uno_Interface **)pArgs[n])
58 @param ppException pointer to pointer to unconstructed any to signal an exception.
60 typedef void (SAL_CALL
* uno_DispatchMethod
)(
61 struct _uno_Interface
* pUnoI
,
62 const struct _typelib_TypeDescription
* pMemberType
,
65 uno_Any
** ppException
);
69 #elif defined(SAL_OS2)
73 /** The binary C uno interface description.
75 typedef struct _uno_Interface
77 /** Acquires uno interface.
79 @param pInterface uno interface
81 void (SAL_CALL
* acquire
)( struct _uno_Interface
* pInterface
);
82 /** Releases uno interface.
84 @param pInterface uno interface
86 void (SAL_CALL
* release
)( struct _uno_Interface
* pInterface
);
89 uno_DispatchMethod pDispatcher
;
92 #if defined( SAL_W32) || defined(SAL_OS2)