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