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 :
20 : #ifndef INCLUDED_UNO_ENTERABLE_H
21 : #define INCLUDED_UNO_ENTERABLE_H
22 :
23 : #include <uno/environment.h>
24 :
25 :
26 : #ifdef __cplusplus
27 : extern "C"
28 : {
29 : #endif
30 :
31 :
32 : /** Generic function type declaration for entering an Environment.
33 : (http://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
34 :
35 : @param context
36 : @since UDK 3.2.7
37 : */
38 : typedef void uno_Enterable_enter (void * context);
39 :
40 :
41 : /** Generic function type declaration for levaing an Environment.
42 : (http://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
43 :
44 : @param context
45 : @since UDK 3.2.7
46 : */
47 : typedef void uno_Enterable_leave (void * context);
48 :
49 :
50 : /** Generic function type declaration for calling into an Environment.
51 : (http://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
52 :
53 : @param context
54 : @param pCallee the function to be called
55 : @param pParam the parameter pointer to be passed to the function
56 : @since UDK 3.2.7
57 : */
58 : typedef void uno_Enterable_callInto_v(void * context, uno_EnvCallee * pCallee, va_list * pParam);
59 :
60 :
61 : /** Generic function type declaration for calling out of an Environment.
62 : (http://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
63 :
64 : @param context
65 : @param pCallee the function to be called
66 : @param pParam the parameter pointer to be passed to the function
67 : @since UDK 3.2.7
68 : */
69 : typedef void uno_Enterable_callOut_v (void * context, uno_EnvCallee * pCallee, va_list * pParam);
70 :
71 :
72 : /** Generic function type declaration for checking if calling on managed object is
73 : valid.
74 : (http://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
75 :
76 : @param context
77 : @param ppReason the reason, in case calling is not valid
78 : @return 0 == calling is not valid, 1 == calling is valid
79 : @since UDK 3.2.7
80 : */
81 : typedef int uno_Enterable_isValid_v (void * context, rtl_uString ** ppReason);
82 :
83 :
84 : /** A struct pReserved needs to point to, if implementing a purpose environment.
85 : (http://wiki.openoffice.org/wiki/Uno/Binary/Spec/Environment_Stack)
86 :
87 : @since UDK 3.2.7
88 : */
89 : typedef struct
90 : {
91 : uno_Enterable_enter * m_enter;
92 : uno_Enterable_leave * m_leave;
93 : uno_Enterable_callInto_v * m_callInto_v;
94 : uno_Enterable_callOut_v * m_callOut_v;
95 : uno_Enterable_isValid_v * m_isValid;
96 : }
97 10 : uno_Enterable;
98 :
99 :
100 : #ifdef __cplusplus
101 : }
102 : #endif
103 :
104 : #endif
105 :
106 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|