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_XCachedDynamicResultSetStubFactory_idl__
24#define __com_sun_star_ucb_XCachedDynamicResultSetStubFactory_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_ucb_XDynamicResultSet_idl__
31#include <com/sun/star/ucb/XDynamicResultSet.idl>
32#endif
33
34#ifndef __com_sun_star_ucb_NumberedSortingInfo_idl__
35#include <com/sun/star/ucb/NumberedSortingInfo.idl>
36#endif
37
38#ifndef __com_sun_star_ucb_XAnyCompareFactory_idl__
39#include <com/sun/star/ucb/XAnyCompareFactory.idl>
40#endif
41
42//=============================================================================
43
44module com { module sun { module star { module ucb {
45
46//=============================================================================
47/** creates a <type>CachedDynamicResultSetStub</type> and connects a non-remote
48	optimized <type>DynamicResultSet</type> to a remote optimized
49	<type>CachedDynamicResultSet</type>.
50
51	<p>Pay attention to instanciate this helper on serverside where your source
52	<type>DynamicResultSet</type> was instanciated.
53
54	<p>Method
55    <member>XCachedDynamicResultSetStubFactory::createCachedDynamicResultSetStub</member>
56    can be used to create a stub on serverside.
57
58	<p>If you have instanciated a <type>CachedDynamicResultSet</type> on client
59	side already, use method <member>connectToCache</member> to connect your
60	given DynamicResultSet with this Cache.
61
62	<p>The needed cache on server side you can create using
63	<type>XCachedDynamicResultSetFactory</type>.
64*/
65
66published interface XCachedDynamicResultSetStubFactory: com::sun::star::uno::XInterface
67{
68	//-------------------------------------------------------------------------
69	/**	creates a remote optimizes <type>XDynamicResultSet</type>.
70
71		@param Source
72		must be an instance of service <type>DynamicResultSet</type>.
73
74		@returns
75		an instance of service <type>CachedDynamicResultSetStub</type>.
76	*/
77
78	com::sun::star::ucb::XDynamicResultSet	createCachedDynamicResultSetStub(
79				[in] com::sun::star::ucb::XDynamicResultSet Source );
80
81	//-------------------------------------------------------------------------
82	/** If you have instanciated a <type>CachedDynamicResultSet</type> on
83		client side already, use this to connect your given Source on server
84		side to the TargetCache.
85
86		@param Source
87		is an instance of service <type>DynamicResultSet</type>.
88
89		@param TargetCache
90		is an instance of service <type>CachedDynamicResultSet</type>.
91
92		@param SortingInfo
93		can be an empty sequence. Otherwise, Source will be sorted according
94		to the given sorting data.
95
96		@param CompareFactory
97		will be ignored unless SortingInfo is not empty. Then the supplied
98		factory will be used to instanciate objects used to compare the
99		properties that are involved in sorting.
100
101		@throws ListenerAlreadySetException
102		if <member>Source</member> is already in use.
103
104		@throws AlreadyInitializedException
105		if <member>TargetCache</member> already has been initialized.
106	*/
107	void connectToCache(
108				  [in] com::sun::star::ucb::XDynamicResultSet Source
109				, [in] com::sun::star::ucb::XDynamicResultSet TargetCache
110				, [in] sequence< com::sun::star::ucb::NumberedSortingInfo > SortingInfo
111				, [in] com::sun::star::ucb::XAnyCompareFactory CompareFactory
112				)
113				raises(
114				  com::sun::star::ucb::ListenerAlreadySetException
115				, com::sun::star::ucb::AlreadyInitializedException
116				 );
117};
118
119//=============================================================================
120
121}; }; }; };
122
123#endif
124