Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef _UNO_DISPATCHER_H_
20 : #define _UNO_DISPATCHER_H_
21 :
22 : #include <sal/types.h>
23 : #include <rtl/ustring.h>
24 : #include <uno/any2.h>
25 :
26 : #ifdef __cplusplus
27 : extern "C"
28 : {
29 : #endif
30 :
31 : struct _typelib_TypeDescription;
32 : struct _uno_Interface;
33 :
34 : /** Function pointer declaration for the binary C uno dispatch function. Any pure out or return
35 : value will be constructed by the callee, iff no exception is signalled.
36 : If an exception is signalled, the any *ppException is properly constructed by the callee,
37 : otherwise the pointer *ppException is set to 0.
38 : An attribute get call is indicated by a non-null return pointer.
39 :
40 : @param pUnoI uno interface the call is performed on
41 : @param pMemberType member type description of a method or attribute
42 : @param pReturn pointer to return value memory;
43 : pointer may be undefined if void method, null if attribute set call.
44 : @param pArgs an array of pointers to arguments values.
45 : (remark: the value of an interface reference stores a
46 : uno_interface *, so you get it by *(uno_Interface **)pArgs[n])
47 : @param ppException pointer to pointer to unconstructed any to signal an exception.
48 : */
49 : typedef void (SAL_CALL * uno_DispatchMethod)(
50 : struct _uno_Interface * pUnoI,
51 : const struct _typelib_TypeDescription * pMemberType,
52 : void * pReturn,
53 : void * pArgs[],
54 : uno_Any ** ppException );
55 :
56 : #if defined( SAL_W32)
57 : #pragma pack(push, 8)
58 : #endif
59 :
60 : /** The binary C uno interface description.
61 : */
62 77998 : typedef struct _uno_Interface
63 : {
64 : /** Acquires uno interface.
65 :
66 : @param pInterface uno interface
67 : */
68 : void (SAL_CALL * acquire)( struct _uno_Interface * pInterface );
69 : /** Releases uno interface.
70 :
71 : @param pInterface uno interface
72 : */
73 : void (SAL_CALL * release)( struct _uno_Interface * pInterface );
74 : /** dispatch function
75 : */
76 : uno_DispatchMethod pDispatcher;
77 : } uno_Interface;
78 :
79 : #if defined( SAL_W32)
80 : #pragma pack(pop)
81 : #endif
82 :
83 : #ifdef __cplusplus
84 : }
85 : #endif
86 :
87 : #endif
88 :
89 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|