merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / util / XAtomServer.idl
blob70a8eeb9f5ccd89c194d6ee1d066a113243de7db
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XAtomServer.idl,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_util_XAtomServer_idl__
31 #define __com_sun_star_util_XAtomServer_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 #ifndef __com_sun_star_util_AtomDescription_idl__
38 #include <com/sun/star/util/AtomDescription.idl>
39 #endif
41 #ifndef __com_sun_star_util_AtomClassRequest_idl__
42 #include <com/sun/star/util/AtomClassRequest.idl>
43 #endif
46 module com
48 module sun
50 module star
52 module util
55 /** an interface to map between <i>string</i>s and <i>id</i>s
57 <p>a note on atoms:<br>
58 Atoms are abbreviations for strings.
59 When a string gets registered, it is assigned a numeric id
60 so that said string can always be referred to by this id.
61 This way strings have to be transported only once over remote connections.
62 Valid ids are (in this implementation) non zero, signed 32 bit values.
63 An atom of 0 means that the string in question is not registered</p>
65 <p>Additionally there is the abstraction of atom class:<br>
66 Atoms are grouped into classes, so that an id can be assigned
67 to multiple strings, depending on the class context. The main
68 advantage of this is that atoms in one class may be kept
69 to small numbers, so that bandwidth can be reduced by sending
70 the atoms only as 16 bit values. Note that it is up to the user in this
71 case to handle overflows.</p>
74 published interface XAtomServer : com::sun::star::uno::XInterface
76 /** returns a whole atom class
78 @param atomClass
79 which class to return
81 @returns
82 the descriptions for all atoms of class <code>atomClass</code>
84 sequence< AtomDescription > getClass( [in] long atomClass );
85 /** returns mutltiple atom classes
87 @param atomClasses
88 which classes to return
90 @returns
91 the descriptions for all atoms of the requested classes
93 sequence< sequence< AtomDescription > > getClasses( [in] sequence< long > atomClasses );
94 /** returns the strings for an arbitrary amount of atoms of multiple classes
96 @param atoms
97 describes which strings to return
99 @returns
100 the strings for the requested atoms
102 sequence< string > getAtomDescriptions( [in] sequence< AtomClassRequest > atoms );
104 //-----------------------------------------------------------------------
105 /** returns the atoms that have been registered to a class after an
106 already known atom
108 <p>Hint to implementor: using ascending atoms is the easiest way
109 to decide, which atoms are recent.</p>
111 @param atomClass
112 the class in question
114 @param atom
115 the last known atom
117 @returns
118 all atom description that have been added to class
119 <code>atomClass</code> after <code>atom</code>
121 sequence< AtomDescription > getRecentAtoms( [in] long atomClass, [in] long atom );
123 //-----------------------------------------------------------------------
124 /** registers or searches for a string
126 @param atomClass
127 the class of atoms in question
129 @param description
130 the string in question
132 @param create
133 if true a new atom will be created for an unknown string
134 else the invalid atom (0) will be returned for an unknown string
136 @returns
137 the atom for the string <code>description</code>
139 long getAtom( [in] long atomClass, [in] string description, [in] boolean create );
143 }; // module util
144 }; // module star
145 }; // module sun
146 }; // module com
149 #endif