ACC SHELL

Path : /usr/share/YaST2/clients/
File Upload :
Current File : //usr/share/YaST2/clients/remote_proposal.ycp

/**
 * File:        clients/remote_proposal.ycp
 * Package:     Network configuration
 * Summary:     Proposal for Remote Administration
 * Authors:     Arvin Schnell <arvin@suse.de>
 *		Michal Svec <msvec@suse.cz>
 *
 * $Id: remote_proposal.ycp 26994 2006-01-12 14:58:32Z locilka $
 */

{

textdomain "network";

/* The main () */
y2milestone("----------------------------------------");
y2milestone("Remote proposal started");
y2milestone("Arguments: %1", WFM::Args());

import "Remote";
import "Wizard";
include "network/remote/dialogs.ycp";

string func = (string) WFM::Args(0);
map param = (map) WFM::Args(1);
map ret = $[];

/* create a textual proposal */
if(func == "MakeProposal") {
    string proposal = "";
    string warning = nil;
    symbol warning_level = nil;
    boolean force_reset = param["force_reset"]:false;

    if(force_reset) Remote::Reset();
    else	    Remote::Propose();
    ret = $[ "raw_proposal" : [ Remote::Summary() ] ];
}
/* run the module */
else if(func == "AskUser") {
    // single dialog, no need to Export/Import

    Wizard::CreateDialog();
    Wizard::SetDesktopIcon("remote");
    symbol result = (symbol) RemoteMainDialog ();
    UI::CloseDialog();

    y2debug("result=%1", result);
    ret = $[ "workflow_sequence" : result ];
}
/* create titles */
else if(func == "Description") {
    ret = $[
	/* RichText label */
	"rich_text_title" : _("VNC Remote Administration"),
	/* Menu label */
	"menu_title" : _("VNC &Remote Administration"),
	"id" : "admin_stuff",
    ];
}
/* write the proposal */
else if(func == "Write") {
    Remote::Write();
}
/* unknown function */
else {
    y2error("unknown function: %1", func);
}

/* Finish */
y2debug("ret=%1",ret);
y2milestone("Remote proposal finished");
y2milestone("----------------------------------------");
return ret;

/* EOF */
}

ACC SHELL 2018