CASA/CASA-auth-token/yast2-casa-ats/src/wizards.ycp
Juan Carlos Luciani 2aaa7b3f52 Changed the license notice in the source files to correctly
specify LGPL instead of GPL.
2007-02-12 18:07:49 +00:00

150 lines
3.2 KiB
Plaintext

/***********************************************************************
*
* Copyright (C) 2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
/**
* File: include/casa-ats/wizards.ycp
* Package: Configuration of casa-ats
* Summary: Wizards definitions
* Authors: Ryan Partridge <rpartridge@novell.com>
*
* $Id: wizards.ycp 27914 2006-02-13 14:32:08Z locilka $
*/
{
textdomain "casa-ats";
import "Sequencer";
import "Wizard";
include "casa-ats/complex.ycp";
include "casa-ats/dialogs.ycp";
/**
* Add a configuration of casa-ats
* @return sequence result
*/
any AddSequence() {
/* FIXME: adapt to your needs */
map aliases = $[
"atsinfo" : ``(ATSInfoDialog()),
];
/* FIXME: adapt to your needs */
map sequence = $[
"ws_start" : "config1",
"atsinfo" : $[
`abort : `abort,
`next : `next
]
];
return Sequencer::Run(aliases, sequence);
}
/**
* Main workflow of the casa-ats configuration
* @return sequence result
*/
any MainSequence() {
/* FIXME: adapt to your needs */
map aliases = $[
"atsinfo" : ``( ATSInfoDialog() )
];
/* FIXME: adapt to your needs */
map sequence = $[
"ws_start" : "atsinfo",
"atsinfo" : $[
`abort : `abort,
`next : `next
]
];
any ret = Sequencer::Run(aliases, sequence);
return ret;
}
/**
* Whole configuration of casa-ats
* @return sequence result
*/
any CasaAtsSequence() {
map aliases = $[
"read" : [ ``( ReadDialog() ), true ],
"main" : ``( MainSequence() ),
"write" : [ ``( WriteDialog() ), true ]
];
map sequence = $[
"ws_start" : "read",
"read" : $[
`abort : `abort,
`next : "main"
],
"main" : $[
`abort : `abort,
`next : "write"
],
"write" : $[
`abort : `abort,
`next : `next
]
];
Wizard::CreateDialog();
any ret = Sequencer::Run(aliases, sequence);
UI::CloseDialog();
return ret;
}
/**
* Whole configuration of casa-ats but without reading and writing.
* For use with autoinstallation.
* @return sequence result
*/
any CasaAtsAutoSequence() {
/* Initialization dialog caption */
string caption = _("CasaAts Configuration");
/* Initialization dialog contents */
term contents = `Label(_("Initializing..."));
Wizard::CreateDialog();
Wizard::SetContentsButtons(caption, contents, "",
Label::BackButton(), Label::NextButton());
any ret = MainSequence();
UI::CloseDialog();
return ret;
}
/* EOF */
}