1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef INCLUDED_registry_types_h 25 #define INCLUDED_registry_types_h 26 27 #include "sal/types.h" 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 /** specifies the typeclass of a binary type blob. 34 35 The general structure of a binary type blob is always the same. It depends 36 on the typeclass which parts of the blob are filled with data or not. 37 */ 38 enum RTTypeClass { 39 /** specifies that the structure of the given blob is unknown and can't be 40 read. 41 */ 42 RT_TYPE_INVALID, 43 44 /** specifies that the blob represents an interface type. An interface blob 45 can contain a base interface, attributes and methods. 46 */ 47 RT_TYPE_INTERFACE, 48 49 /** specifies that the blob represents a module type. A module blob can 50 contain a base module and constant members (fields). 51 */ 52 RT_TYPE_MODULE, 53 54 /** specifies that the blob represents a struct type. A struct blob can 55 contain a base struct and members (fields). 56 */ 57 RT_TYPE_STRUCT, 58 59 /** specifies that the blob represents an enum type. An enum blob can 60 contain enum values which are accessible as fields. 61 */ 62 RT_TYPE_ENUM, 63 64 /** specifies that the blob represents an exception type. An exception blob 65 can contain a base exception and members (fields). 66 */ 67 RT_TYPE_EXCEPTION, 68 69 /** specifies that the blob represents a typedef type. A typedef blob can 70 contain a base type. 71 */ 72 RT_TYPE_TYPEDEF, 73 74 /** specifies that the blob represents a service type. A service blob can 75 contain a base service, properties (fields), references to services or 76 interfaces. 77 */ 78 RT_TYPE_SERVICE, 79 80 /** specifies that the blob represents a singleton type (a named object) 81 which refers exactly one existing service. 82 */ 83 RT_TYPE_SINGLETON, 84 85 /// deprecated, not used. 86 RT_TYPE_OBJECT, 87 88 /** specifies that the blob represents a constants type. A constants blob 89 can contain constant types as fields. 90 */ 91 RT_TYPE_CONSTANTS, 92 93 /** @deprecated 94 a union type was evaluated but currently not supported. 95 */ 96 RT_TYPE_UNION, 97 98 /** 99 Flag for published entities. 100 101 Used in combination with RT_TYPE_INTERFACE, RT_TYPE_STRUCT, RT_TYPE_ENUM, 102 RT_TYPE_EXCEPTION, RT_TYPE_TYPEDEF, RT_TYPE_SERVICE, RT_TYPE_SINGLETON, 103 or RT_TYPE_CONSTANTS to mark an entity as published. 104 105 (The value of this enumerator is chosen so that it is unlikely that its 106 addition changes the underlying type of this enumeration for any C/C++ 107 compiler.) 108 109 @internal 110 111 @since UDK 3.2.0 112 */ 113 RT_TYPE_PUBLISHED = 0x4000 114 }; 115 116 /** specifies the type for the field access. 117 118 Fields in a type blob are used for different types. Among others they were 119 used for properties of services and these poperties can have several flags. 120 121 @see RT_ACCESS_INVALID 122 @see RT_ACCESS_READONLY 123 @see RT_ACCESS_OPTIONAL 124 @see RT_ACCESS_MAYBEVOID 125 @see RT_ACCESS_BOUND 126 @see RT_ACCESS_CONSTRAINED 127 @see RT_ACCESS_TRANSIENT 128 @see RT_ACCESS_MAYBEAMBIGUOUS 129 @see RT_ACCESS_MAYBEDEFAULT 130 @see RT_ACCESS_REMOVEABLE 131 @see RT_ACCESS_ATTRIBUTE 132 @see RT_ACCESS_PROPERTY 133 @see RT_ACCESS_CONST 134 @see RT_ACCESS_READWRITE 135 @see RT_ACCESS_DEFAULT 136 @see RT_ACCESS_PARAMETERIZED_TYPE 137 @see RT_ACCESS_PUBLISHED 138 */ 139 typedef sal_uInt16 RTFieldAccess; 140 141 /// specifies a unknown flag 142 #define RT_ACCESS_INVALID 0x0000 143 /// specifies a readonly property/attribute 144 #define RT_ACCESS_READONLY 0x0001 145 /// specifies a property as optional that means that it must not be implemented. 146 #define RT_ACCESS_OPTIONAL 0x0002 147 /// @see com::sun::star::beans::PropertyAttribute 148 #define RT_ACCESS_MAYBEVOID 0x0004 149 /// @see com::sun::star::beans::PropertyAttribute 150 #define RT_ACCESS_BOUND 0x0008 151 /// @see com::sun::star::beans::PropertyAttribute 152 #define RT_ACCESS_CONSTRAINED 0x0010 153 /// @see com::sun::star::beans::PropertyAttribute 154 #define RT_ACCESS_TRANSIENT 0x0020 155 /// @see com::sun::star::beans::PropertyAttribute 156 #define RT_ACCESS_MAYBEAMBIGUOUS 0x0040 157 /// @see com::sun::star::beans::PropertyAttribute 158 #define RT_ACCESS_MAYBEDEFAULT 0x0080 159 /// @see com::sun::star::beans::PropertyAttribute 160 #define RT_ACCESS_REMOVEABLE 0x0100 161 /// @see com::sun::star::beans::PropertyAttribute 162 #define RT_ACCESS_ATTRIBUTE 0x0200 163 /// specifies that the field is a property 164 #define RT_ACCESS_PROPERTY 0x0400 165 /// specifies that the field is a constant or enum value 166 #define RT_ACCESS_CONST 0x0800 167 /// specifies that the property/attribute has read/write access 168 #define RT_ACCESS_READWRITE 0x1000 169 /// only to describe a union default label 170 #define RT_ACCESS_DEFAULT 0x2000 171 172 /** 173 Indicates that a member of a polymorphic struct type template is of a 174 parameterized type. 175 176 Only valid for fields that represent members of polymorphic struct type 177 templates. 178 179 @since UDK 3.2.0 180 */ 181 #define RT_ACCESS_PARAMETERIZED_TYPE 0x4000 182 183 /** 184 Flag for published individual constants. 185 186 Used in combination with RT_ACCESS_CONST for individual constants (which are 187 not members of constant groups). 188 189 @since UDK 3.2.0 190 */ 191 #define RT_ACCESS_PUBLISHED 0x8000 192 193 /** specifies the type of a field value. 194 195 A field can have a value if it repsresents a constant or an enum value. 196 */ 197 enum RTValueType { 198 RT_TYPE_NONE, 199 RT_TYPE_BOOL, 200 RT_TYPE_BYTE, 201 RT_TYPE_INT16, 202 RT_TYPE_UINT16, 203 RT_TYPE_INT32, 204 RT_TYPE_UINT32, 205 RT_TYPE_INT64, 206 RT_TYPE_UINT64, 207 RT_TYPE_FLOAT, 208 RT_TYPE_DOUBLE, 209 RT_TYPE_STRING 210 }; 211 212 /** specifies a variable container for field values. 213 */ 214 union RTConstValueUnion { 215 sal_Bool aBool; 216 sal_uInt8 aByte; 217 sal_Int16 aShort; 218 sal_uInt16 aUShort; 219 sal_Int32 aLong; 220 sal_uInt32 aULong; 221 sal_Int64 aHyper; 222 sal_uInt64 aUHyper; 223 float aFloat; 224 double aDouble; 225 sal_Unicode const * aString; 226 }; 227 228 /** specifies the mode of a method. 229 230 A method can be synchron or asynchron (oneway). The const attribute for 231 methods was removed so that the const values are deprecated. 232 */ 233 enum RTMethodMode { 234 /// indicates an invalid mode 235 RT_MODE_INVALID, 236 237 /// indicates the asynchronous mode of a method 238 RT_MODE_ONEWAY, 239 240 /// @deprecated 241 RT_MODE_ONEWAY_CONST, 242 243 /// indicated the synchronous mode of a method 244 RT_MODE_TWOWAY, 245 246 /// @deprecated 247 RT_MODE_TWOWAY_CONST, 248 249 /** 250 Indicates an extended attribute getter (that has a 'raises' clause) of an 251 interface type. 252 253 @since UDK 3.2.0 254 */ 255 RT_MODE_ATTRIBUTE_GET, 256 257 /** 258 Indicates an extended attribute setter (that has a 'raises' clause) of an 259 interface type. 260 261 @since UDK 3.2.0 262 */ 263 RT_MODE_ATTRIBUTE_SET 264 }; 265 266 /** specifies the mode of a parameter. 267 268 There are three parameter modes which have impact of the handling of the 269 parameter in the UNO bridges and the UNO code generation. 270 */ 271 enum RTParamMode { 272 /// indicates an invalid parameter mode 273 RT_PARAM_INVALID = 0, 274 275 /// indicates a pure in parameter which is used by value 276 RT_PARAM_IN = 1, 277 278 /// indicates a pure out parameter which is used by reference 279 RT_PARAM_OUT = 2, 280 281 /// indicates a in and out parameter which is used also by reference 282 RT_PARAM_INOUT = 3, 283 284 /** 285 Indicates a rest parameter (currently only valid for service 286 constructors). 287 288 This value can be combined with any of RT_PARAM_IN, RT_PARAM_OUT, and 289 RT_PARAM_INOUT (however, service constructors currently only allow 290 RT_PARAM_IN, anyway). 291 292 @since UDK 3.2.0 293 */ 294 RT_PARAM_REST = 4 295 }; 296 297 /** specifies the type of a reference used in a service description. 298 */ 299 enum RTReferenceType { 300 /// the reference type is unknown 301 RT_REF_INVALID, 302 303 /** the service support the interface that means a implementation of this 304 service must implement this interface. 305 */ 306 RT_REF_SUPPORTS, 307 308 /** @deprecated 309 the service observes the interface. 310 */ 311 RT_REF_OBSERVES, 312 313 /** the service exports the specified service that means this service 314 provides also the specified service. 315 */ 316 RT_REF_EXPORTS, 317 318 /** @deprecated 319 the service needs the specified service that means in the context of 320 this service the specified service will be used or must be available. 321 */ 322 RT_REF_NEEDS, 323 324 /** 325 Indicates a type parameter of a polymorphic struct type template. 326 327 @since UDK 3.2.0 328 */ 329 RT_REF_TYPE_PARAMETER 330 }; 331 332 #ifdef __cplusplus 333 } 334 #endif 335 336 #endif 337