Author: mvidner
Date: Thu Dec 11 14:38:30 2008
New Revision: 54049
URL: http://svn.opensuse.org/viewcvs/yast?rev=54049&view=rev
Log:
Added API comments (bnc#449615).
Modified:
trunk/ntp-client/src/ntp-client_proposal.ycp
Modified: trunk/ntp-client/src/ntp-client_proposal.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/src/ntp-client_proposal.ycp?rev=54049&r1=54048&r2=54049&view=diff
==============================================================================
--- trunk/ntp-client/src/ntp-client_proposal.ycp (original)
+++ trunk/ntp-client/src/ntp-client_proposal.ycp Thu Dec 11 14:38:30 2008
@@ -3,6 +3,8 @@
* Summary: Installation client for ntp configuration
* Author: Bubli
*
+ * This is used as the general interface between yast2-country
+ * (time,timezone) and yast2-ntp-client.
*/
{
@@ -24,6 +26,18 @@
y2milestone("Ntp client proposal started");
y2milestone("Arguments: %1", WFM::Args());
+/*
+ API:
+
+Usual *_proposal functions: MakeProposal, AskUser, Write.
+(but not Description; see, it just *looks* like *_proposal)
+Additionally:
+ CreateUI (thick and fragile interface, grr)
+ GetNTPEnabled (queries Service::Enabled)
+ GetUseNTP (queries NtpClient::ntp_selected, just a storage for the caller)
+ SetUseNTP [ntp_used]
+*/
+
any ret = nil;
string func = "";
map param = $[];
@@ -53,6 +67,7 @@
if( NtpClient::config_has_been_read || NtpClient::ntp_selected)
{
+ // grr, GUNS means all of them are used and here we just pick one
ntp_items = maplist(string server, NtpClient::GetUsedNtpServers(),{
return `item(`id(server), server);
});
@@ -170,6 +185,13 @@
ret = true;
}
+/*
+params:
+ server (taken from UI if empty)
+ servers (intended to use all of opensuse.pool.ntp.org,
+ but I did not have time to make it work)
+ ntpdate_only (TODO rename to onetime)
+*/
else if (func == "Write")
{
string ntp_server = param["server"]:"";
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org