1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10d1766043SAndrew Rist *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12d1766043SAndrew Rist *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19d1766043SAndrew Rist *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_ucb_XContentIdentifierMapping_idl__
24cdf0e10cSrcweir#define __com_sun_star_ucb_XContentIdentifierMapping_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir//=============================================================================
31cdf0e10cSrcweir
32cdf0e10cSrcweirmodule com { module sun { module star { module ucb {
33cdf0e10cSrcweir
34cdf0e10cSrcweir published interface XContent;
35cdf0e10cSrcweir published interface XContentIdentifier;
36cdf0e10cSrcweir
37cdf0e10cSrcweir//=============================================================================
38cdf0e10cSrcweir/** A mapping from a (source) set of <type>XContentIdentifier</type>s to
39cdf0e10cSrcweir    another (target) set of XContentIdentifiers.
40cdf0e10cSrcweir
41cdf0e10cSrcweir	<p>For convenience and performance, mapping between the string
42cdf0e10cSrcweir	representations	of source/target XContentIdentifiers, as well as mapping
43cdf0e10cSrcweir	between <type>XContent</type>s identified by source/target
44cdf0e10cSrcweir	XContentIdentifiers is also supported.
45cdf0e10cSrcweir
46cdf0e10cSrcweir	<p>This interface can be useful in cases where the identifieres (and
47cdf0e10cSrcweir	associated contents) returned by the various methods of an
48cdf0e10cSrcweir	<type>XContentAccess</type>	need to be mapped to some other space of
49cdf0e10cSrcweir	identifiers (and associated	contents).
50cdf0e10cSrcweir
51cdf0e10cSrcweir    @see XContent
52cdf0e10cSrcweir    @see XContentAccess
53cdf0e10cSrcweir    @see XContentIdentifier
54cdf0e10cSrcweir*/
55cdf0e10cSrcweir
56cdf0e10cSrcweirpublished interface XContentIdentifierMapping: com::sun::star::uno::XInterface
57cdf0e10cSrcweir{
58cdf0e10cSrcweir	//-------------------------------------------------------------------------
59cdf0e10cSrcweir	/** Map the string representation of an <type>XContentIdentifier</type>.
60cdf0e10cSrcweir
61cdf0e10cSrcweir		@param Source  The string representation of an XContentIdentifier
62cdf0e10cSrcweir		from the source set.
63cdf0e10cSrcweir
64cdf0e10cSrcweir		@returns  The string representation of the target set's
65cdf0e10cSrcweir		XContentIdentifier corresponding to the source identifier.  The
66cdf0e10cSrcweir		returned string may be empty if either Source was empty already, or if
67cdf0e10cSrcweir		there's no applicable target to map to.
68cdf0e10cSrcweir	*/
69cdf0e10cSrcweir	string mapContentIdentifierString([in] string Source);
70cdf0e10cSrcweir
71cdf0e10cSrcweir	//-------------------------------------------------------------------------
72cdf0e10cSrcweir	/** Map an <type>XContentIdentifier</type>.
73cdf0e10cSrcweir
74cdf0e10cSrcweir		@param Source  An XContentIdentifier from the source set.
75cdf0e10cSrcweir
76cdf0e10cSrcweir		@returns  The target set's XContentIdentifier corresponding to the
77cdf0e10cSrcweir		source identifier.  The returned XContentIdentifier may be null if
78cdf0e10cSrcweir		either Source was null already, or if there's no applicable target to
79cdf0e10cSrcweir		map to.
80cdf0e10cSrcweir	*/
81cdf0e10cSrcweir	XContentIdentifier mapContentIdentifier([in] XContentIdentifier Source);
82cdf0e10cSrcweir
83cdf0e10cSrcweir	//-------------------------------------------------------------------------
84cdf0e10cSrcweir	/** Map the <type>XContent</type> identified by an
85cdf0e10cSrcweir	    <type>XContentIdentifier</type>.
86cdf0e10cSrcweir
87cdf0e10cSrcweir		@param Source  The XContent identified by an XContentIdentifier from
88cdf0e10cSrcweir		the source set.
89cdf0e10cSrcweir
90cdf0e10cSrcweir		@returns  The XContent identified by the target set's
91cdf0e10cSrcweir		XContentIdentifier corresponding to the source identifier.  The
92cdf0e10cSrcweir		returned XContent may be null if either Source was null already, or if
93cdf0e10cSrcweir		there's no applicable target to map to.
94cdf0e10cSrcweir	*/
95cdf0e10cSrcweir	XContent mapContent([in] XContent Source);
96cdf0e10cSrcweir
97cdf0e10cSrcweir	//-------------------------------------------------------------------------
98cdf0e10cSrcweir	/** Map the content identifiers (or related data) contained in the columns
99cdf0e10cSrcweir		of a <type scope="com::sun::star::sdbc">XRow</type>.
100cdf0e10cSrcweir
101cdf0e10cSrcweir		@param Value  On input, a sequence of anys corresponding to the columns
102cdf0e10cSrcweir		of the XRow (the first column goes into the	zeroth position of the
103cdf0e10cSrcweir		sequence, and so on).  On output, the same sequence, but with the
104cdf0e10cSrcweir		entries mapped as necessary.  This is an inout parameter rather than a
105cdf0e10cSrcweir		comination of in parameter and return value for	performance reasons
106cdf0e10cSrcweir		(assuming that in most cases most elements in the input sequence will
107cdf0e10cSrcweir		be returned unmodified).
108cdf0e10cSrcweir
109cdf0e10cSrcweir		@returns  <TRUE/> if any of the columns contain data that (potentially)
110*a893be29SPedro Giffuni		needs mapping (though maybe no mapping occurred for the concrete input
111cdf0e10cSrcweir		data of this call).  This information can be useful to decide whether,
112cdf0e10cSrcweir		for another row, a call to this function is at all necessary.
113cdf0e10cSrcweir	*/
114cdf0e10cSrcweir	boolean mapRow([inout] sequence< any > Value);
115cdf0e10cSrcweir};
116cdf0e10cSrcweir
117cdf0e10cSrcweir//=============================================================================
118cdf0e10cSrcweir
119cdf0e10cSrcweir}; }; }; };
120cdf0e10cSrcweir
121cdf0e10cSrcweir#endif
122