1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_ucb_ListActionType_idl__
24cdf0e10cSrcweir#define __com_sun_star_ucb_ListActionType_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir
27cdf0e10cSrcweir//=============================================================================
28cdf0e10cSrcweir
29cdf0e10cSrcweirmodule com { module sun { module star { module ucb {
30cdf0e10cSrcweir
31cdf0e10cSrcweir//=============================================================================
32cdf0e10cSrcweir/** These values are used to specify the type of change happened to a list.
33cdf0e10cSrcweir
34cdf0e10cSrcweir	<p>A change happened is sended from an <type>XDynamicResultSet</type>
35cdf0e10cSrcweir	as <type>ListAction</type> to a <type>XDynamicResultSetListener</type>.
36cdf0e10cSrcweir
37cdf0e10cSrcweir	<p>The values are contained in <member>ListAction::ListActionType</member>.
38cdf0e10cSrcweir*/
39cdf0e10cSrcweir
40cdf0e10cSrcweirpublished constants ListActionType
41cdf0e10cSrcweir{
42cdf0e10cSrcweir	//-------------------------------------------------------------------------
43cdf0e10cSrcweir	/** First notification to a single listener for purpose of initialization.
44cdf0e10cSrcweir
45cdf0e10cSrcweir	<p>This type of notification is required to be sended first and only once
46cdf0e10cSrcweir	to a new listener.
47cdf0e10cSrcweir
48cdf0e10cSrcweir	<p>The member <member>ListAction::ActionInfo</member> is required to
49cdf0e10cSrcweir	contain a struct <type>WelcomeDynamicResultSetStruct</type>.
50cdf0e10cSrcweir	This struct contains two
51cdf0e10cSrcweir    <type scope="com::sun::star::sdbc">XResultSet</type>s (old and new).
52cdf0e10cSrcweir	During and after the notification only the new set is valid for access.
53cdf0e10cSrcweir	But the listener is required to remind both
54cdf0e10cSrcweir    <type scope="com::sun::star::sdbc">XResultSet</type>s as he	will not get
55cdf0e10cSrcweir    another chance to get them again.
56cdf0e10cSrcweir
57cdf0e10cSrcweir	<p>The members <member>ListAction::Count</member> and
58cdf0e10cSrcweir	<member>ListAction::Position</member> are not used.
59cdf0e10cSrcweir	*/
60cdf0e10cSrcweir	const long WELCOME = 20;
61cdf0e10cSrcweir
62cdf0e10cSrcweir	//-------------------------------------------------------------------------
63cdf0e10cSrcweir	/** One or more rows were inserted into the list.
64cdf0e10cSrcweir
65cdf0e10cSrcweir	<p>This action is related to <member>ContentAction::INSERTED</member>.
66cdf0e10cSrcweir
67cdf0e10cSrcweir	<p>The members <member>ListAction::Count</member> and
68cdf0e10cSrcweir	<member>ListAction::Position</member> contain the position and count of
69cdf0e10cSrcweir	newly inserted rows. If the count is greater than one, the inserted rows
70cdf0e10cSrcweir	have to	be one after the other.
71cdf0e10cSrcweir
72cdf0e10cSrcweir	<p> <member>ListAction::ActionInfo</member> could contain something but
73cdf0e10cSrcweir	this is not required. For example, it could contain the properties of
74cdf0e10cSrcweir	the new rows (i.e. for remote optimizing), but this is not required
75cdf0e10cSrcweir	nor unrestrictly recommended.
76cdf0e10cSrcweir
77cdf0e10cSrcweir	<p>@todo ... further description of allowed contents for
78cdf0e10cSrcweir	<member>ListAction::ActionInfo</member> is needed
79cdf0e10cSrcweir	*/
80cdf0e10cSrcweir	const long INSERTED = 21;
81cdf0e10cSrcweir
82cdf0e10cSrcweir	//-------------------------------------------------------------------------
83cdf0e10cSrcweir	/** One or more rows were removed from the list.
84cdf0e10cSrcweir
85cdf0e10cSrcweir	<p>This action is related to <member>ContentAction::REMOVED</member>.
86cdf0e10cSrcweir
87cdf0e10cSrcweir	<p>The members <member>ListAction::Count</member> and
88cdf0e10cSrcweir	<member>ListAction::Position</member> contain the position and count of the
89cdf0e10cSrcweir	removed rows. If the count is greater than one, the removed rows have to be
90cdf0e10cSrcweir	one after the other.
91cdf0e10cSrcweir
92cdf0e10cSrcweir	<p>The member <member>ListAction::ListActionType</member> is not used.
93cdf0e10cSrcweir	*/
94cdf0e10cSrcweir	const long REMOVED = 22;
95cdf0e10cSrcweir
96cdf0e10cSrcweir
97cdf0e10cSrcweir	//-------------------------------------------------------------------------
98cdf0e10cSrcweir	/** The whole list was destroyed and independently rebuild.
99cdf0e10cSrcweir
100cdf0e10cSrcweir	<p>If 'CLEARED' is sended you don't need to refer to the old ResultSet.
101cdf0e10cSrcweir
102cdf0e10cSrcweir	<p>The members <member>ListAction::ListActionType</member>,
103cdf0e10cSrcweir	<member>ListAction::Count</member> and <member>ListAction::Position</member>
104cdf0e10cSrcweir	are ignored.
105cdf0e10cSrcweir	*/
106cdf0e10cSrcweir	const long CLEARED = 23;
107cdf0e10cSrcweir
108cdf0e10cSrcweir	//-------------------------------------------------------------------------
109cdf0e10cSrcweir	/** One or more rows were moved to another position.
110cdf0e10cSrcweir
111cdf0e10cSrcweir	<p>The members <member>ListAction::Count</member> and
112cdf0e10cSrcweir	<member>ListAction::Position</member> contain the position and count of the
113cdf0e10cSrcweir	moved rows. If the count is greater than one, the moved rows have to be
114cdf0e10cSrcweir	one after the other.
115cdf0e10cSrcweir
116cdf0e10cSrcweir	<p><member>ListAction::ListActionType</member> is required to contain a 'long',
117cdf0e10cSrcweir	which gives the shift of position.
118cdf0e10cSrcweir	(i.e. When two rows at position 3 and 4 are moved for a shift '+1',
119cdf0e10cSrcweir	they will appear at the positions 4 and 5. In this action is included, that
120cdf0e10cSrcweir	the row on old position 5 now appears on position 3.
121cdf0e10cSrcweir	No other notification is needed, to explain or complete this action).
122cdf0e10cSrcweir	*/
123cdf0e10cSrcweir	const long MOVED = 24;
124cdf0e10cSrcweir
125cdf0e10cSrcweir	//-------------------------------------------------------------------------
126cdf0e10cSrcweir	/** The properties of one or more rows have changed.
127cdf0e10cSrcweir
128cdf0e10cSrcweir	<p>This action is related to a <type scope="com::sun::star::beans">PropertyChangeEvent</type>.
129cdf0e10cSrcweir
130cdf0e10cSrcweir	<p>The members <member>ListAction::Count</member> and
131cdf0e10cSrcweir	<member>ListAction::Position</member> contain the position and count of the
132cdf0e10cSrcweir	rows, whose properties have changed. If the count is greater than one, the
133cdf0e10cSrcweir	rows with modified properties have to be one after the other.
134cdf0e10cSrcweir
135cdf0e10cSrcweir	<p> <member>ListAction::ActionInfo</member> could contain something but
136cdf0e10cSrcweir	this is not required. For example, it could contain the new properties
137cdf0e10cSrcweir    (i.e. for remote optimizing), but this is not required nor unrestrictly
138cdf0e10cSrcweir    recommended.
139cdf0e10cSrcweir
140cdf0e10cSrcweir	<p>@todo ... further description of allowed contents for
141cdf0e10cSrcweir	<member>ListAction::ActionInfo</member> is needed
142cdf0e10cSrcweir	*/
143cdf0e10cSrcweir	const long PROPERTIES_CHANGED = 25;
144cdf0e10cSrcweir
145cdf0e10cSrcweir	//-------------------------------------------------------------------------
146cdf0e10cSrcweir	/*??????????????????????????? we probably will not need this
147cdf0e10cSrcweir
148cdf0e10cSrcweir	The identity of a row has changed.
149cdf0e10cSrcweir
150cdf0e10cSrcweir	<p>This action is related to <type>ContentAction</type> == EXCHANGED.
151cdf0e10cSrcweir
152cdf0e10cSrcweir	<p>The members <member>ListAction::Count</member> and
153cdf0e10cSrcweir	<member>ListAction::Position</member> contain the position and count of the
154cdf0e10cSrcweir	rows, whose identity have changed. If the count is greater than one, the
155cdf0e10cSrcweir	rows with changed identity have to be one after the other.
156cdf0e10cSrcweir
157cdf0e10cSrcweir	<p><member>ListAction::ListActionType</member> must contain the new identities
158cdf0e10cSrcweir
159cdf0e10cSrcweir	<p>@todo ...
160cdf0e10cSrcweir
161cdf0e10cSrcweir	const long EXCHANGED = 26;
162cdf0e10cSrcweir	*/
163cdf0e10cSrcweir
164cdf0e10cSrcweir	//-------------------------------------------------------------------------
165cdf0e10cSrcweir	/*??????????????????????????? we probably will need this
166cdf0e10cSrcweir	After a completely notified Iteration send 'COMPLETED'.
167cdf0e10cSrcweir
168cdf0e10cSrcweir	<p>This notification is required to be send, to indicate, that now the full
169cdf0e10cSrcweir	result is reached.
170cdf0e10cSrcweir
171cdf0e10cSrcweir	<p>E.g. while a new given list is sorted, some intermediate states are
172cdf0e10cSrcweir	notified. After the last portion of sorting is done and notified you have
173cdf0e10cSrcweir	to send 'COMPLETED'. So a listener has the possibility to wait for
174cdf0e10cSrcweir	'COMPLETED' e.g. to print the full result. )
175cdf0e10cSrcweir
176cdf0e10cSrcweir	<p>The members <member>ListAction::ListActionType</member>,
177cdf0e10cSrcweir	<member>ListAction::Count</member> and <member>ListAction::Position</member>
178cdf0e10cSrcweir	are useless.
179cdf0e10cSrcweir	*/
180cdf0e10cSrcweir	const long COMPLETED = 27;
181cdf0e10cSrcweir};
182cdf0e10cSrcweir
183cdf0e10cSrcweir//=============================================================================
184cdf0e10cSrcweir
185cdf0e10cSrcweir}; }; }; };
186cdf0e10cSrcweir
187cdf0e10cSrcweir#endif
188