Author: jsrain
Date: Mon Jan 26 09:38:05 2009
New Revision: 54979
URL: http://svn.opensuse.org/viewcvs/yast?rev=54979&view=rev
Log:
imported yast2-rdp to SVN
Added:
branches/SuSE-Code-11-Branch/rdp/
branches/SuSE-Code-11-Branch/rdp/.cvsignore
branches/SuSE-Code-11-Branch/rdp/MAINTAINER
branches/SuSE-Code-11-Branch/rdp/Makefile.cvs
branches/SuSE-Code-11-Branch/rdp/RPMNAME
branches/SuSE-Code-11-Branch/rdp/VERSION
branches/SuSE-Code-11-Branch/rdp/agents/
branches/SuSE-Code-11-Branch/rdp/agents/.cvsignore
branches/SuSE-Code-11-Branch/rdp/agents/Makefile.am
branches/SuSE-Code-11-Branch/rdp/configure.in.in
branches/SuSE-Code-11-Branch/rdp/doc/
branches/SuSE-Code-11-Branch/rdp/doc/.cvsignore
branches/SuSE-Code-11-Branch/rdp/doc/Makefile.am
branches/SuSE-Code-11-Branch/rdp/doc/autodocs/
branches/SuSE-Code-11-Branch/rdp/doc/autodocs/.cvsignore
branches/SuSE-Code-11-Branch/rdp/doc/autodocs/Makefile.am
branches/SuSE-Code-11-Branch/rdp/package/
branches/SuSE-Code-11-Branch/rdp/package/.cvsignore
branches/SuSE-Code-11-Branch/rdp/package/yast2-rdp.changes
branches/SuSE-Code-11-Branch/rdp/src/
branches/SuSE-Code-11-Branch/rdp/src/.cvsignore
branches/SuSE-Code-11-Branch/rdp/src/Makefile.am
branches/SuSE-Code-11-Branch/rdp/src/RDP.ycp
branches/SuSE-Code-11-Branch/rdp/src/dialogs.ycp
branches/SuSE-Code-11-Branch/rdp/src/rdp.desktop
branches/SuSE-Code-11-Branch/rdp/src/rdp.ycp
branches/SuSE-Code-11-Branch/rdp/src/rdp_proposal.ycp
branches/SuSE-Code-11-Branch/rdp/testsuite/
branches/SuSE-Code-11-Branch/rdp/testsuite/.cvsignore
branches/SuSE-Code-11-Branch/rdp/testsuite/Makefile.am
branches/SuSE-Code-11-Branch/rdp/testsuite/tests/
branches/SuSE-Code-11-Branch/rdp/testsuite/tests/.cvsignore
branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.err
branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.out
branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.ycp
branches/SuSE-Code-11-Branch/rdp/yast2-rdp.spec.in
Added: branches/SuSE-Code-11-Branch/rdp/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/.cvsignore?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/rdp/.cvsignore Mon Jan 26 09:38:05 2009
@@ -0,0 +1,20 @@
+Makefile
+Makefile.am
+Makefile.am.common
+Makefile.in
+aclocal.m4
+config.cache
+config.guess
+config.h.in
+config.log
+config.status
+config.sub
+configure
+configure.in
+depcomp
+install-sh
+missing
+mkinstalldirs
+stamp-h
+rdp.pot
+autom4te.cache
Added: branches/SuSE-Code-11-Branch/rdp/MAINTAINER
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/MAINTAINER?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/MAINTAINER (added)
+++ branches/SuSE-Code-11-Branch/rdp/MAINTAINER Mon Jan 26 09:38:05 2009
@@ -0,0 +1 @@
+David Reveman
Added: branches/SuSE-Code-11-Branch/rdp/Makefile.cvs
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/Makefile.cvs?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/Makefile.cvs (added)
+++ branches/SuSE-Code-11-Branch/rdp/Makefile.cvs Mon Jan 26 09:38:05 2009
@@ -0,0 +1,22 @@
+#
+# Makefile.cvs
+#
+PREFIX = /usr
+
+LIB = $(shell y2tool get-lib)
+
+configure: all
+ ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB)
+
+all:
+ y2tool y2autoconf
+ y2tool y2automake
+ autoreconf --force --install
+
+install: configure
+ make
+ make install
+
+reconf: all
+ ./config.status --recheck
+ ./config.status
Added: branches/SuSE-Code-11-Branch/rdp/RPMNAME
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/RPMNAME?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/RPMNAME (added)
+++ branches/SuSE-Code-11-Branch/rdp/RPMNAME Mon Jan 26 09:38:05 2009
@@ -0,0 +1 @@
+yast2-rdp
Added: branches/SuSE-Code-11-Branch/rdp/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/VERSION?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/VERSION (added)
+++ branches/SuSE-Code-11-Branch/rdp/VERSION Mon Jan 26 09:38:05 2009
@@ -0,0 +1 @@
+2.15.0
Added: branches/SuSE-Code-11-Branch/rdp/agents/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/agents/.cvsignore?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/agents/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/rdp/agents/.cvsignore Mon Jan 26 09:38:05 2009
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
Added: branches/SuSE-Code-11-Branch/rdp/agents/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/agents/Makefile.am?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/agents/Makefile.am (added)
+++ branches/SuSE-Code-11-Branch/rdp/agents/Makefile.am Mon Jan 26 09:38:05 2009
@@ -0,0 +1,7 @@
+# Makefile.am for rdp/agents
+
+agent_SCRIPTS =
+
+scrconf_DATA =
+
+EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA)
Added: branches/SuSE-Code-11-Branch/rdp/configure.in.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/configure.in.in?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/configure.in.in (added)
+++ branches/SuSE-Code-11-Branch/rdp/configure.in.in Mon Jan 26 09:38:05 2009
@@ -0,0 +1,12 @@
+## YCP module configure.in.in
+
+## Initialize
+@YAST2-INIT-COMMON@
+@YAST2-INIT-YCP@
+
+## some common checks
+@YAST2-CHECKS-COMMON@
+@YAST2-CHECKS-YCP@
+
+## and generate the output...
+@YAST2-OUTPUT@
Added: branches/SuSE-Code-11-Branch/rdp/doc/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/doc/.cvsignore?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/doc/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/rdp/doc/.cvsignore Mon Jan 26 09:38:05 2009
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
Added: branches/SuSE-Code-11-Branch/rdp/doc/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/doc/Makefile.am?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/doc/Makefile.am (added)
+++ branches/SuSE-Code-11-Branch/rdp/doc/Makefile.am Mon Jan 26 09:38:05 2009
@@ -0,0 +1,10 @@
+# Makefile.am for rdp/doc
+
+SUBDIRS = autodocs
+
+htmldir = $(docdir)
+
+doc_DATA =
+html_DATA =
+
+EXTRA_DIST = $(doc_DATA) $(html_DATA)
Added: branches/SuSE-Code-11-Branch/rdp/doc/autodocs/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/doc/autodocs/.cvsignore?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/doc/autodocs/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/rdp/doc/autodocs/.cvsignore Mon Jan 26 09:38:05 2009
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+*.html
Added: branches/SuSE-Code-11-Branch/rdp/doc/autodocs/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/doc/autodocs/Makefile.am?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/doc/autodocs/Makefile.am (added)
+++ branches/SuSE-Code-11-Branch/rdp/doc/autodocs/Makefile.am Mon Jan 26 09:38:05 2009
@@ -0,0 +1,3 @@
+# Makefile.am for rdp/doc/autodocs
+
+include $(top_srcdir)/autodocs-ycp.ami
Added: branches/SuSE-Code-11-Branch/rdp/package/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/package/.cvsignore?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/package/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/rdp/package/.cvsignore Mon Jan 26 09:38:05 2009
@@ -0,0 +1,2 @@
+*.spec
+*.bz2
Added: branches/SuSE-Code-11-Branch/rdp/package/yast2-rdp.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/package/yast2-rdp.changes?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/package/yast2-rdp.changes (added)
+++ branches/SuSE-Code-11-Branch/rdp/package/yast2-rdp.changes Mon Jan 26 09:38:05 2009
@@ -0,0 +1,4 @@
+-------------------------------------------------------------------
+Mon Jan 26 09:16:57 2009 - dreveman@novell.com
+
+- initial version
Added: branches/SuSE-Code-11-Branch/rdp/src/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/src/.cvsignore?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/src/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/rdp/src/.cvsignore Mon Jan 26 09:38:05 2009
@@ -0,0 +1,4 @@
+Makefile
+Makefile.in
+*.ybc
+.dep
Added: branches/SuSE-Code-11-Branch/rdp/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/src/Makefile.am?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/src/Makefile.am (added)
+++ branches/SuSE-Code-11-Branch/rdp/src/Makefile.am Mon Jan 26 09:38:05 2009
@@ -0,0 +1,25 @@
+# Makefile.am for rdp/src
+
+yncludedir = @yncludedir@/rdp
+
+client_DATA = \
+ rdp.ycp \
+ rdp_proposal.ycp
+
+ynclude_DATA = \
+ dialogs.ycp
+
+desktop_DATA = \
+ rdp.desktop
+
+module_DATA = \
+ RDP.ycp
+
+# create a symlink for local build, #145327
+rdp:
+ ln -sf . $@
+ycpchook = rdp
+
+EXTRA_DIST = $(client_DATA) $(ynclude_DATA) $(module_DATA) $(desktop_DATA)
+
+include $(top_srcdir)/Makefile.am.common
Added: branches/SuSE-Code-11-Branch/rdp/src/RDP.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/src/RDP.ycp?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/src/RDP.ycp (added)
+++ branches/SuSE-Code-11-Branch/rdp/src/RDP.ycp Mon Jan 26 09:38:05 2009
@@ -0,0 +1,173 @@
+/**
+ * File: src/modules/RDP.ycp
+ * Module: Network configuration
+ * Summary: Module for Remote Administration via RDP
+ * Authors: Arvin Schnell
+ * Martin Vidner
+ * David Reveman
+ *
+ */
+
+{
+
+module "RDP";
+textdomain "network";
+
+import "Label";
+import "Mode";
+import "Package";
+import "Service";
+import "SuSEFirewall";
+import "Progress";
+import "Linuxrc";
+
+include "network/routines.ycp";
+
+/**
+ * Allow remote administration
+ */
+global boolean allow_administration = false;
+
+/**
+ * Remote administration has been already proposed
+ * Only force-reset can change it
+ */
+boolean already_proposed = false;
+
+/**
+ * Reset all module data.
+ */
+global void Reset() {
+ already_proposed = true;
+
+ // Bugzilla #135605 - enabling Remote Administration when installing using VNC
+ if (Linuxrc::vnc()) {
+ allow_administration = true;
+ } else {
+ allow_administration = false;
+ }
+ y2milestone("Remote Administration was proposed as: %1", (allow_administration ? "enabled":"disabled"));
+}
+
+/**
+ * Function proposes a configuration
+ * But only if it hasn't been proposed already
+ */
+global void Propose() {
+ if (!already_proposed) Reset();
+}
+
+/**
+ * Read the current status
+ * @return true on success
+ */
+global boolean Read() {
+ list<string> packages = [ "xrdp" ];
+
+ if (!Package::InstallAll(packages)) {
+ y2error("Installing of required packages failed");
+ return false;
+ }
+
+ boolean xrdp = Service::Enabled ("xrdp");
+
+ y2milestone ("xrdp: %1", xrdp);
+ allow_administration = xrdp;
+
+ boolean current_progress = Progress::set(false);
+ SuSEFirewall::Read();
+ Progress::set(current_progress);
+
+ return true;
+}
+
+/**
+ * Update the SCR according to network settings
+ * @return true on success
+ */
+global boolean Write() {
+
+ list <string> steps = [
+ /* Progress stage 1 */
+ _("Write firewall settings"),
+ /* Progress stage 2 */
+ _("Configure xrdp"),
+ ];
+
+ if (Mode::normal()) {
+ /* Progress stage 3 */
+ if(allow_administration) {
+ steps = add( steps, _("Restart the services") );
+ }
+ else {
+ steps = add( steps, _("Stop the services") );
+ }
+ }
+
+ string caption = _("Saving Remote Administration Configuration");
+ integer sl = 0; //100; //for testing
+
+ Progress::New(caption, " ", size(steps), steps, [], "");
+
+ ProgressNextStage(_("Writing firewall settings..."));
+ boolean current_progress = Progress::set(false);
+ SuSEFirewall::Write();
+ Progress::set(current_progress);
+ sleep(sl);
+
+ ProgressNextStage(_("Configuring xrdp..."));
+
+ if(allow_administration) {
+ /* Enable xrdp */
+ if(!Service::Enable("xrdp")) {
+ y2error("Enabling of xrdp failed");
+ return false;
+ }
+ }
+ else
+ {
+ /* Disable xrdp */
+ if (!Service::Disable("xrdp")) {
+ y2error("Disabling of xrdp failed");
+ return false;
+ }
+ }
+ sleep(sl);
+
+ if(Mode::normal ()) {
+ if (allow_administration) {
+ ProgressNextStage(_("Restarting the service..."));
+ Service::Restart("xrdp");
+ }
+ else
+ {
+ ProgressNextStage(_("Stopping the service..."));
+ Service::Stop("xrdp");
+ }
+
+ sleep(sl);
+ Progress::NextStage();
+ }
+
+ return true;
+}
+
+/**
+ * Create summary
+ * @return summary text
+ */
+global define string Summary() {
+
+ if(allow_administration) {
+ /* Label in proposal text */
+ return _("Remote administration is enabled.");
+ }
+ else {
+ /* Label in proposal text */
+ return _("Remote administration is disabled.");
+ }
+
+}
+
+/* EOF */
+}
Added: branches/SuSE-Code-11-Branch/rdp/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/src/dialogs.ycp?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/src/dialogs.ycp (added)
+++ branches/SuSE-Code-11-Branch/rdp/src/dialogs.ycp Mon Jan 26 09:38:05 2009
@@ -0,0 +1,117 @@
+/**
+ * File: remote/dialogs.ycp
+ * Module: Network configuration
+ * Summary: Dialog for Remote RDP Administration
+ * Authors: Arvin Schnell
+ * David Reveman
+ */
+
+{
+
+textdomain "network";
+
+import "Label";
+import "RDP";
+import "Wizard";
+import "CWMFirewallInterfaces";
+
+include "network/routines.ycp";
+
+/**
+ * Remote administration dialog
+ * @return dialog result
+ */
+define symbol RemoteMainDialog() {
+
+ ScreenName("rdp");
+
+ /* Ramote Administration dialog caption */
+ string caption = _("Remote Administration");
+
+ term allow_buttons = `RadioButtonGroup(
+ `VBox (
+ /* RadioButton label */
+ `Left(`RadioButton(`id(`allow), _("&Allow Remote Administration"), false)),
+ /* RadioButton label */
+ `Left(`RadioButton(`id(`disallow), _("&Do Not Allow Remote Administration"), false))
+ )
+ );
+
+ map firewall_widget = CWMFirewallInterfaces::CreateOpenFirewallWidget ($[
+ "services" : [ "service:xrdp" ],
+ "display_details" : true,
+ ]);
+ term firewall_layout = firewall_widget["custom_widget"]:`VBox ();
+ string firewall_help = firewall_widget["help"]:"";
+
+ string help = sformat (
+_("<p><b><big>Remote Administration Settings</big></b></p>
+<p>If this feature is enabled, you can
+administer this machine remotely from another machine. Use a RDP
+client, such as rdesktop (connect to <tt><hostname>:%1</tt>).
+This form of remote administration is less secure than using SSH.</p>
+"), 3389) + firewall_help;
+
+ /* Remote Administration dialog contents */
+ term contents = `HBox(
+ `HStretch(),
+ `VBox (
+ `Frame (
+ /* Dialog frame title */
+ _("Remote Administration Settings"),
+ allow_buttons
+ ),
+ `VSpacing (1),
+ `Frame (
+ /* Dialog frame title */
+ _("Firewall Settings"),
+ firewall_layout
+ )
+ ),
+ `HStretch()
+ );
+
+ Wizard::SetContentsButtons(caption, contents, help,
+ Label::BackButton(), Label::FinishButton());
+
+ UI::ChangeWidget(`id(`allow), `Value, RDP::allow_administration);
+ UI::ChangeWidget(`id(`disallow), `Value, !RDP::allow_administration);
+
+ CWMFirewallInterfaces::OpenFirewallInit (firewall_widget, "");
+
+ any ret = nil;
+ map event = nil;
+
+ repeat {
+ event = UI::WaitForEvent ();
+ ret = event["ID"]:nil;
+
+ CWMFirewallInterfaces::OpenFirewallHandle (firewall_widget, "", event);
+
+ if(ret == `abort)
+ {
+ break;
+ }
+ else if(ret == `help)
+ {
+ Wizard::ShowHelp(help);
+ }
+ else if(ret == `cancel)
+ {
+ break;
+ }
+
+ } until( ret == `next || ret == `back );
+
+ if(ret == `next)
+ {
+ CWMFirewallInterfaces::OpenFirewallStore (firewall_widget, "", event);
+ RDP::allow_administration = (boolean) UI::QueryWidget(`id(`allow), `Value);
+ }
+
+ return (symbol) ret;
+}
+
+/* EOF */
+}
+
Added: branches/SuSE-Code-11-Branch/rdp/src/rdp.desktop
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/src/rdp.desktop?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/src/rdp.desktop (added)
+++ branches/SuSE-Code-11-Branch/rdp/src/rdp.desktop Mon Jan 26 09:38:05 2009
@@ -0,0 +1,25 @@
+[Desktop Entry]
+Type=Application
+Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Network;
+
+X-KDE-ModuleType=Library
+X-KDE-RootOnly=true
+X-KDE-HasReadOnlyMode=true
+X-KDE-Library=yast2
+X-SuSE-YaST-Call=rdp
+
+X-SuSE-YaST-Group=Net_advanced
+X-SuSE-YaST-Argument=
+X-SuSE-YaST-RootOnly=true
+X-SuSE-YaST-AutoInst=write
+X-SuSE-YaST-Geometry=
+X-SuSE-YaST-SortKey=
+X-SuSE-YaST-AutoInstResource=rdp
+
+Icon=yast-remote
+Exec=/sbin/yast2 rdp
+
+Name=Remote Administration (RDP)
+GenericName=Set up remote administration
+X-KDE-SubstituteUID=true
+StartupNotify=true
Added: branches/SuSE-Code-11-Branch/rdp/src/rdp.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/src/rdp.ycp?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/src/rdp.ycp (added)
+++ branches/SuSE-Code-11-Branch/rdp/src/rdp.ycp Mon Jan 26 09:38:05 2009
@@ -0,0 +1,128 @@
+/**
+ * File: clients/rdp.ycp
+ * Package: Network configuration
+ * Summary: Remote Administration
+ * Authors: Arvin Schnell
+ * Michal Svec
+ * David Reveman
+ */
+
+{
+
+textdomain "network";
+
+/* The main () */
+y2milestone("----------------------------------------");
+y2milestone("RDP module started");
+
+import "Label";
+import "RDP";
+import "Wizard";
+import "Report";
+
+import "CommandLine";
+import "RichText";
+
+include "network/rdp/dialogs.ycp";
+
+/**
+ * Main remote GUI
+ */
+any RemoteGUI() {
+ RDP::Read();
+
+ Wizard::CreateDialog();
+ Wizard::SetDesktopIcon("remote");
+ Wizard::SetNextButton(`next, Label::FinishButton() );
+
+ any ret = RemoteMainDialog();
+ if(ret == `next) RDP::Write();
+
+ UI::CloseDialog();
+ return ret;
+};
+
+/**
+ * Handler for action "list"
+ * @param options action options
+ */
+define boolean ListHandler(map options) {
+
+ string summary = "";
+ /* Command line output Headline */
+ summary = "\n" + _("Remote Access Configuration Summary:") + "\n\n" +
+ RichText::Rich2Plain(RDP::Summary()) + "\n";
+
+ y2debug("%1", summary);
+ CommandLine::Print(summary);
+ return true;
+}
+
+/**
+ * Handler for action "allow"
+ * @param options action options
+ */
+define boolean SetRAHandler (map options) {
+ string allow_ra = tolower(options["set"]:"");
+
+ if (allow_ra != "yes" && allow_ra != "no") {
+ /* Command line error message */
+ Report::Error(_("Please set 'yes' to allow the remote administration
+or 'no' to disallow it."));
+ return false;
+ }
+
+ y2milestone("Setting AllowRemoteAdministration to '%1'", allow_ra);
+ RDP::allow_administration = (allow_ra == "yes" ? true : false);
+
+ return true;
+}
+
+/**
+ * Command line definition
+ */
+map cmdline = $[
+ /* Commandline help title */
+ "help" : _("Remote Access Configuration"),
+ "id" : "rdp",
+ "guihandler": RemoteGUI,
+ "initialize": RDP::Read,
+ "finish" : RDP::Write,
+ "actions" : $[
+ "list" : $[
+ /* Commandline command help */
+ "help" : _("Display configuration summary"),
+ "handler" : ListHandler,
+ ],
+ "allow" : $[
+ /* Commandline command help */
+ "help" : _("Allow remote access"),
+ "handler" : SetRAHandler,
+ "example" : [
+ "allow set=yes",
+ "allow set=no",
+ ],
+ ],
+ ],
+ "options" : $[
+ "set" : $[
+ /* Commandline command help */
+ "help" : _("Set 'yes' to allow or 'no' to disallow the remote administration"),
+ "type" : "string",
+ ]
+ ],
+ "mappings" : $[
+ "allow" : [ "set" ],
+ ],
+];
+
+any ret = CommandLine::Run(cmdline);
+y2debug("ret=%1", ret);
+
+/* Finish */
+y2milestone("RDP module finished");
+y2milestone("----------------------------------------");
+return ret;
+
+/* EOF */
+}
Added: branches/SuSE-Code-11-Branch/rdp/src/rdp_proposal.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/src/rdp_proposal.ycp?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/src/rdp_proposal.ycp (added)
+++ branches/SuSE-Code-11-Branch/rdp/src/rdp_proposal.ycp Mon Jan 26 09:38:05 2009
@@ -0,0 +1,76 @@
+/**
+ * File: clients/rdp_proposal.ycp
+ * Package: Network configuration
+ * Summary: Proposal for Remote Administration
+ * Authors: Arvin Schnell
+ * Michal Svec
+ * David Reveman
+ */
+
+{
+
+textdomain "network";
+
+/* The main () */
+y2milestone("----------------------------------------");
+y2milestone("RDP proposal started");
+y2milestone("Arguments: %1", WFM::Args());
+
+import "RDP";
+import "Wizard";
+include "network/rdp/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) RDP::Reset();
+ else RDP::Propose();
+ ret = $[ "raw_proposal" : [ RDP::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" : _("RDP Remote Administration"),
+ /* Menu label */
+ "menu_title" : _("RDP &Remote Administration"),
+ "id" : "admin_stuff",
+ ];
+}
+/* write the proposal */
+else if(func == "Write") {
+ RDP::Write();
+}
+/* unknown function */
+else {
+ y2error("unknown function: %1", func);
+}
+
+/* Finish */
+y2debug("ret=%1",ret);
+y2milestone("RDP proposal finished");
+y2milestone("----------------------------------------");
+return ret;
+
+/* EOF */
+}
Added: branches/SuSE-Code-11-Branch/rdp/testsuite/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/testsuite/.cvsignore?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/testsuite/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/rdp/testsuite/.cvsignore Mon Jan 26 09:38:05 2009
@@ -0,0 +1,11 @@
+Makefile
+Makefile.in
+site.exp
+*.sum
+*.log
+tmp.out*
+tmp.err*
+tmp.log*
+config
+run
+*.test
Added: branches/SuSE-Code-11-Branch/rdp/testsuite/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/testsuite/Makefile.am?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/testsuite/Makefile.am (added)
+++ branches/SuSE-Code-11-Branch/rdp/testsuite/Makefile.am Mon Jan 26 09:38:05 2009
@@ -0,0 +1,21 @@
+#
+# Makefile.am for .../testsuite
+#
+# Do not edit this file (Makefile.am) as it will be overwritten!
+#
+
+AUTOMAKE_OPTIONS = dejagnu
+EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.ycp) $(wildcard tests/*.yh)
+
+testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite
+
+all-local: $(testsuite_prepare)
+ make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir)
+
+clean-local: $(testsuite_prepare)
+ make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean
+
+check-local: $(testsuite_prepare)
+ make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check
+
+# EOF
Added: branches/SuSE-Code-11-Branch/rdp/testsuite/tests/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/testsuite/tests/.cvsignore?rev=54979&view=auto
==============================================================================
(empty)
Added: branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.err
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.err?rev=54979&view=auto
==============================================================================
(empty)
Added: branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.out
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.out?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.out (added)
+++ branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.out Mon Jan 26 09:38:05 2009
@@ -0,0 +1 @@
+Dump RDP::Modified
Added: branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.ycp?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.ycp (added)
+++ branches/SuSE-Code-11-Branch/rdp/testsuite/tests/Rdp.ycp Mon Jan 26 09:38:05 2009
@@ -0,0 +1,13 @@
+{
+
+// testedfiles: RDP.ycp
+
+include "testsuite.ycp";
+TESTSUITE_INIT([], nil);
+
+import "RDP";
+
+DUMP("RDP::Modified");
+//TEST(``(RDP::Modified()), [], nil);
+
+}
Added: branches/SuSE-Code-11-Branch/rdp/yast2-rdp.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/rdp/yast2-rdp.spec.in?rev=54979&view=auto
==============================================================================
--- branches/SuSE-Code-11-Branch/rdp/yast2-rdp.spec.in (added)
+++ branches/SuSE-Code-11-Branch/rdp/yast2-rdp.spec.in Mon Jan 26 09:38:05 2009
@@ -0,0 +1,31 @@
+@HEADER-COMMENT@
+
+@HEADER@
+Requires: yast2
+BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
+
+BuildArchitectures: noarch
+
+Summary: Configuration of rdp
+
+%description
+-
+
+@PREP@
+
+@BUILD@
+
+@INSTALL@
+
+@CLEAN@
+
+%files
+%defattr(-,root,root)
+%dir @yncludedir@/rdp
+@yncludedir@/rdp/*
+@clientdir@/rdp.ycp
+@clientdir@/rdp_*.ycp
+@moduledir@/Rdp.*
+@moduledir@/Rdp2.*
+@desktopdir@/rdp.desktop
+%doc @docdir@
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org