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