/**
 * File:	include/bluetooth/complex.ycp
 * Package:	Configuration of bluetooth
 * Summary:	Dialogs definitions
 * Authors:	Ladislav Slezak <lslezak@suse.cz>
 *
 * $Id: complex.ycp 19696 2004-09-29 15:12:50Z lslezak $
 */

{

textdomain "bluetooth";

import "Label";
import "Popup";
import "Wizard";
import "Wizard_hw";
import "Bluetooth";

include "bluetooth/helps.ycp";

/**
 * Return a modification status
 * @return true if data was modified
 */
boolean Modified() {
    return Bluetooth::Modified();
}

boolean ReallyAbort() {
    return !Bluetooth::Modified() || Popup::ReallyAbort(true);
}

boolean PollAbort() {
    return UI::PollInput() == `abort;
}

/**
 * Read settings dialog
 * @return `abort if aborted and `next otherwise
 */
symbol ReadDialog() {
    Wizard::RestoreHelp(HELPS["read"]:"");
    // Bluetooth::AbortFunction = PollAbort;
    if (Bluetooth::InstallPackages() == false)
    {
	return `abort;
    }

    boolean ret = Bluetooth::Read();
    return ret ? `next : `abort;
}

/**
 * Write settings dialog
 * @return `abort if aborted and `next otherwise
 */
symbol WriteDialog() {
    Wizard::RestoreHelp(HELPS["write"]:"");
    // Bluetooth::AbortFunction = PollAbort;
    boolean ret = Bluetooth::Write();
    return ret ? `next : `abort;
}

/* EOF */
}
