/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */
#ifndef __com_sun_star_ucb_ListActionType_idl__
#define __com_sun_star_ucb_ListActionType_idl__



module com { module sun { module star { module ucb {

/** These values are used to specify the type of change happened to a list.

    <p>A change happened is sent from an XDynamicResultSet
    as ListAction to a XDynamicResultSetListener.

    <p>The values are contained in ListAction::ListActionType.
*/

published constants ListActionType
{
    /** First notification to a single listener for purpose of initialization.

    <p>This type of notification is required to be sent first and only once
    to a new listener.

    <p>The member ListAction::ActionInfo is required to
    contain a struct WelcomeDynamicResultSetStruct.
    This struct contains two
    com::sun::star::sdbc::XResultSets (old and new).
    During and after the notification only the new set is valid for access.
    But the listener is required to remind both
    com::sun::star::sdbc::XResultSets as he will not get
    another chance to get them again.

    <p>The members ListAction::Count and
    ListAction::Position are not used.
    */
    const long WELCOME = 20;

    /** One or more rows were inserted into the list.

    <p>This action is related to ContentAction::INSERTED.

    <p>The members ListAction::Count and
    ListAction::Position contain the position and count of
    newly inserted rows. If the count is greater than one, the inserted rows
    have to be one after the other.

    <p> ListAction::ActionInfo could contain something but
    this is not required. For example, it could contain the properties of
    the new rows (i.e. for remote optimizing), but this is not required
    nor unrestrictedly recommended.

    <p>@todo ... further description of allowed contents for
    ListAction::ActionInfo is needed
    */
    const long INSERTED = 21;

    /** One or more rows were removed from the list.

    <p>This action is related to ContentAction::REMOVED.

    <p>The members ListAction::Count and
    ListAction::Position contain the position and count of the
    removed rows. If the count is greater than one, the removed rows have to be
    one after the other.

    <p>The member ListAction::ListActionType is not used.
    */
    const long REMOVED = 22;


    /** The whole list was destroyed and independently rebuild.

    <p>If "CLEARED" is sent you don't need to refer to the old ResultSet.

    <p>The members ListAction::ListActionType,
    ListAction::Count and ListAction::Position
    are ignored.
    */
    const long CLEARED = 23;

    /** One or more rows were moved to another position.

    <p>The members ListAction::Count and
    ListAction::Position contain the position and count of the
    moved rows. If the count is greater than one, the moved rows have to be
    one after the other.

    <p>ListAction::ListActionType is required to contain a "long",
    which gives the shift of position.
    (i.e. When two rows at position 3 and 4 are moved for a shift "+1",
    they will appear at the positions 4 and 5. In this action is included, that
    the row on old position 5 now appears on position 3.
    No other notification is needed, to explain or complete this action).
    */
    const long MOVED = 24;

    /** The properties of one or more rows have changed.

    <p>This action is related to a com::sun::star::beans::PropertyChangeEvent.

    <p>The members ListAction::Count and
    ListAction::Position contain the position and count of the
    rows, whose properties have changed. If the count is greater than one, the
    rows with modified properties have to be one after the other.

    <p> ListAction::ActionInfo could contain something but
    this is not required. For example, it could contain the new properties
    (i.e. for remote optimizing), but this is not required nor unrestrictedly
    recommended.

    <p>@todo ... further description of allowed contents for
    ListAction::ActionInfo is needed
    */
    const long PROPERTIES_CHANGED = 25;

    /*??????????????????????????? we probably will not need this

    The identity of a row has changed.

    <p>This action is related to ContentAction == EXCHANGED.

    <p>The members ListAction::Count and
    ListAction::Position contain the position and count of the
    rows, whose identity have changed. If the count is greater than one, the
    rows with changed identity have to be one after the other.

    <p>ListAction::ListActionType must contain the new identities

    <p>@todo ...

    const long EXCHANGED = 26;
    */

    /*??????????????????????????? we probably will need this
    After a completely notified Iteration send "COMPLETED".

    <p>This notification is required to be send, to indicate, that now the full
    result is reached.

    <p>E.g. while a new given list is sorted, some intermediate states are
    notified. After the last portion of sorting is done and notified you have
    to send "COMPLETED". So a listener has the possibility to wait for
    "COMPLETED" e.g. to print the full result. )

    <p>The members ListAction::ListActionType,
    ListAction::Count and ListAction::Position
    are useless.
    */
    const long COMPLETED = 27;
};


}; }; }; };

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
