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