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#ifndef __com_sun_star_ucb_XContentIdentifierMapping_idl__
24#define __com_sun_star_ucb_XContentIdentifierMapping_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30//=============================================================================
31
32module com { module sun { module star { module ucb {
33
34 published interface XContent;
35 published interface XContentIdentifier;
36
37//=============================================================================
38/** A mapping from a (source) set of <type>XContentIdentifier</type>s to
39    another (target) set of XContentIdentifiers.
40
41	<p>For convenience and performance, mapping between the string
42	representations	of source/target XContentIdentifiers, as well as mapping
43	between <type>XContent</type>s identified by source/target
44	XContentIdentifiers is also supported.
45
46	<p>This interface can be useful in cases where the identifieres (and
47	associated contents) returned by the various methods of an
48	<type>XContentAccess</type>	need to be mapped to some other space of
49	identifiers (and associated	contents).
50
51    @see XContent
52    @see XContentAccess
53    @see XContentIdentifier
54*/
55
56published interface XContentIdentifierMapping: com::sun::star::uno::XInterface
57{
58	//-------------------------------------------------------------------------
59	/** Map the string representation of an <type>XContentIdentifier</type>.
60
61		@param Source  The string representation of an XContentIdentifier
62		from the source set.
63
64		@returns  The string representation of the target set's
65		XContentIdentifier corresponding to the source identifier.  The
66		returned string may be empty if either Source was empty already, or if
67		there's no applicable target to map to.
68	*/
69	string mapContentIdentifierString([in] string Source);
70
71	//-------------------------------------------------------------------------
72	/** Map an <type>XContentIdentifier</type>.
73
74		@param Source  An XContentIdentifier from the source set.
75
76		@returns  The target set's XContentIdentifier corresponding to the
77		source identifier.  The returned XContentIdentifier may be null if
78		either Source was null already, or if there's no applicable target to
79		map to.
80	*/
81	XContentIdentifier mapContentIdentifier([in] XContentIdentifier Source);
82
83	//-------------------------------------------------------------------------
84	/** Map the <type>XContent</type> identified by an
85	    <type>XContentIdentifier</type>.
86
87		@param Source  The XContent identified by an XContentIdentifier from
88		the source set.
89
90		@returns  The XContent identified by the target set's
91		XContentIdentifier corresponding to the source identifier.  The
92		returned XContent may be null if either Source was null already, or if
93		there's no applicable target to map to.
94	*/
95	XContent mapContent([in] XContent Source);
96
97	//-------------------------------------------------------------------------
98	/** Map the content identifiers (or related data) contained in the columns
99		of a <type scope="com::sun::star::sdbc">XRow</type>.
100
101		@param Value  On input, a sequence of anys corresponding to the columns
102		of the XRow (the first column goes into the	zeroth position of the
103		sequence, and so on).  On output, the same sequence, but with the
104		entries mapped as necessary.  This is an inout parameter rather than a
105		comination of in parameter and return value for	performance reasons
106		(assuming that in most cases most elements in the input sequence will
107		be returned unmodified).
108
109		@returns  <TRUE/> if any of the columns contain data that (potentially)
110		needs mapping (though maybe no mapping occured for the concrete input
111		data of this call).  This information can be useful to decide whether,
112		for another row, a call to this function is at all necessary.
113	*/
114	boolean mapRow([inout] sequence< any > Value);
115};
116
117//=============================================================================
118
119}; }; }; };
120
121#endif
122