tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / include / registry / types.hxx
blob820e342a73236d6649085179c10e63290aefe3a7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <sal/types.h>
23 #include <o3tl/typed_flags_set.hxx>
25 /** specifies the typeclass of a binary type blob.
27 The general structure of a binary type blob is always the same. It depends
28 on the typeclass which parts of the blob are filled with data or not.
30 enum RTTypeClass
32 /** specifies that the structure of the given blob is unknown and can't be
33 read.
35 RT_TYPE_INVALID,
37 /** specifies that the blob represents an interface type. An interface blob
38 can contain a base interface, attributes and methods.
40 RT_TYPE_INTERFACE,
42 /** specifies that the blob represents a module type. A module blob can
43 contain a base module and constant members (fields).
45 RT_TYPE_MODULE,
47 /** specifies that the blob represents a struct type. A struct blob can
48 contain a base struct and members (fields).
50 RT_TYPE_STRUCT,
52 /** specifies that the blob represents an enum type. An enum blob can
53 contain enum values which are accessible as fields.
55 RT_TYPE_ENUM,
57 /** specifies that the blob represents an exception type. An exception blob
58 can contain a base exception and members (fields).
60 RT_TYPE_EXCEPTION,
62 /** specifies that the blob represents a typedef type. A typedef blob can
63 contain a base type.
65 RT_TYPE_TYPEDEF,
67 /** specifies that the blob represents a service type. A service blob can
68 contain a base service, properties (fields), references to services or
69 interfaces.
71 RT_TYPE_SERVICE,
73 /** specifies that the blob represents a singleton type (a named object)
74 which refers exactly one existing service.
76 RT_TYPE_SINGLETON,
78 /// deprecated, not used.
79 RT_TYPE_OBJECT,
81 /** specifies that the blob represents a constants type. A constants blob
82 can contain constant types as fields.
84 RT_TYPE_CONSTANTS,
86 /** @deprecated
87 a union type was evaluated but currently not supported.
89 RT_TYPE_UNION,
91 /// @cond INTERNAL
92 /**
93 Flag for published entities.
95 Used in combination with RT_TYPE_INTERFACE, RT_TYPE_STRUCT, RT_TYPE_ENUM,
96 RT_TYPE_EXCEPTION, RT_TYPE_TYPEDEF, RT_TYPE_SERVICE, RT_TYPE_SINGLETON,
97 or RT_TYPE_CONSTANTS to mark an entity as published.
99 (The value of this enumerator is chosen so that it is unlikely that its
100 addition changes the underlying type of this enumeration for any C/C++
101 compiler.)
103 @since UDK 3.2.0
105 RT_TYPE_PUBLISHED = 0x4000
106 /// @endcond
109 /** specifies the type for the field access.
111 Fields in a type blob are used for different types. Among others they were
112 used for properties of services and these properties can have several flags.
114 @see RTFieldAccess::INVALID
115 @see RTFieldAccess::READONLY
116 @see RTFieldAccess::OPTIONAL
117 @see RTFieldAccess::MAYBEVOID
118 @see RTFieldAccess::BOUND
119 @see RTFieldAccess::CONSTRAINED
120 @see RTFieldAccess::TRANSIENT
121 @see RTFieldAccess::MAYBEAMBIGUOUS
122 @see RTFieldAccess::MAYBEDEFAULT
123 @see RTFieldAccess::REMOVABLE
124 @see RTFieldAccess::ATTRIBUTE
125 @see RTFieldAccess::PROPERTY
126 @see RTFieldAccess::CONST
127 @see RTFieldAccess::READWRITE
128 @see RTFieldAccess::DEFAULT
129 @see RTFieldAccess::PARAMETERIZED_TYPE
130 @see RTFieldAccess::PUBLISHED
132 enum class RTFieldAccess
134 NONE = 0x0000,
135 /// specifies an unknown flag
136 INVALID = 0x0000,
137 /// specifies a readonly property/attribute
138 READONLY = 0x0001,
139 /// specifies a property as optional that means that it must not be implemented.
140 OPTIONAL = 0x0002,
141 /// @see com::sun::star::beans::PropertyAttribute
142 MAYBEVOID = 0x0004,
143 /// @see com::sun::star::beans::PropertyAttribute
144 BOUND = 0x0008,
145 /// @see com::sun::star::beans::PropertyAttribute
146 CONSTRAINED = 0x0010,
147 /// @see com::sun::star::beans::PropertyAttribute
148 TRANSIENT = 0x0020,
149 /// @see com::sun::star::beans::PropertyAttribute
150 MAYBEAMBIGUOUS = 0x0040,
151 /// @see com::sun::star::beans::PropertyAttribute
152 MAYBEDEFAULT = 0x0080,
153 /// @see com::sun::star::beans::PropertyAttribute
154 REMOVABLE = 0x0100,
155 /// @see com::sun::star::beans::PropertyAttribute
156 ATTRIBUTE = 0x0200,
157 /// specifies that the field is a property
158 PROPERTY = 0x0400,
159 /// specifies that the field is a constant or enum value
160 CONST = 0x0800,
161 /// specifies that the property/attribute has read/write access
162 READWRITE = 0x1000,
163 /// only to describe a union default label
164 DEFAULT = 0x2000,
166 Indicates that a member of a polymorphic struct type template is of a
167 parameterized type.
169 Only valid for fields that represent members of polymorphic struct type
170 templates.
172 @since UDK 3.2.0
174 PARAMETERIZED_TYPE = 0x4000,
176 Flag for published individual constants.
178 Used in combination with RTFieldAccess::CONST for individual constants (which are
179 not members of constant groups).
181 @since UDK 3.2.0
183 PUBLISHED = 0x8000,
186 namespace o3tl
188 template <> struct typed_flags<RTFieldAccess> : is_typed_flags<RTFieldAccess, 0xffff>
193 /** specifies the type of a field value.
195 A field can have a value if it represents a constant or an enum value.
197 enum RTValueType
199 RT_TYPE_NONE,
200 RT_TYPE_BOOL,
201 RT_TYPE_BYTE,
202 RT_TYPE_INT16,
203 RT_TYPE_UINT16,
204 RT_TYPE_INT32,
205 RT_TYPE_UINT32,
206 RT_TYPE_INT64,
207 RT_TYPE_UINT64,
208 RT_TYPE_FLOAT,
209 RT_TYPE_DOUBLE,
210 RT_TYPE_STRING
213 /** specifies a variable container for field values.
215 union RTConstValueUnion {
216 bool aBool;
217 sal_Int8 aByte;
218 sal_Int16 aShort;
219 sal_uInt16 aUShort;
220 sal_Int32 aLong;
221 sal_uInt32 aULong;
222 sal_Int64 aHyper;
223 sal_uInt64 aUHyper;
224 float aFloat;
225 double aDouble;
226 sal_Unicode const* aString;
229 /** specifies the mode of a method.
231 A method can be synchron or asynchron (oneway). The const attribute for
232 methods was removed so that the const values are deprecated.
234 enum class RTMethodMode
236 /// indicates an invalid mode
237 INVALID,
239 /// indicates the asynchronous mode of a method
240 ONEWAY,
242 /// @deprecated
243 ONEWAY_CONST,
245 /// indicated the synchronous mode of a method
246 TWOWAY,
248 /// @deprecated
249 TWOWAY_CONST,
252 Indicates an extended attribute getter (that has a 'raises' clause) of an
253 interface type.
255 @since UDK 3.2.0
257 ATTRIBUTE_GET,
260 Indicates an extended attribute setter (that has a 'raises' clause) of an
261 interface type.
263 @since UDK 3.2.0
265 ATTRIBUTE_SET
268 /** specifies the mode of a parameter.
270 There are three parameter modes which have impact of the handling of the
271 parameter in the UNO bridges and the UNO code generation.
273 enum RTParamMode
275 /// indicates an invalid parameter mode
276 RT_PARAM_INVALID = 0,
278 /// indicates a pure in parameter which is used by value
279 RT_PARAM_IN = 1,
281 /// indicates a pure out parameter which is used by reference
282 RT_PARAM_OUT = 2,
284 /// indicates a in and out parameter which is used also by reference
285 RT_PARAM_INOUT = 3,
288 Indicates a rest parameter (currently only valid for service
289 constructors).
291 This value can be combined with any of RT_PARAM_IN, RT_PARAM_OUT, and
292 RT_PARAM_INOUT (however, service constructors currently only allow
293 RT_PARAM_IN, anyway).
295 @since UDK 3.2.0
297 RT_PARAM_REST = 4
300 /** specifies the type of a reference used in a service description.
302 enum class RTReferenceType
304 /// the reference type is unknown
305 INVALID,
307 /** the service support the interface that means an implementation of this
308 service must implement this interface.
310 SUPPORTS,
312 /** @deprecated
313 the service observes the interface.
315 OBSERVES,
317 /** the service exports the specified service that means this service
318 provides also the specified service.
320 EXPORTS,
322 /** @deprecated
323 the service needs the specified service that means in the context of
324 this service the specified service will be used or must be available.
326 NEEDS,
329 Indicates a type parameter of a polymorphic struct type template.
331 @since UDK 3.2.0
333 TYPE_PARAMETER
336 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */