Author: lslezak Date: Mon Sep 8 15:43:34 2008 New Revision: 50804 URL: http://svn.opensuse.org/viewcvs/yast?rev=50804&view=rev Log: - added Pkg::ServiceURL() (get a full URL of a service) - return "service" property of a repository (if it is a part of a service) - 2.17.10 Modified: trunk/pkg-bindings/VERSION trunk/pkg-bindings/package/yast2-pkg-bindings.changes trunk/pkg-bindings/src/PkgFunctions.h trunk/pkg-bindings/src/Service.cc trunk/pkg-bindings/src/Source_Get.cc Modified: trunk/pkg-bindings/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/VERSION?rev=50804&r1=50803&r2=50804&view=diff ============================================================================== --- trunk/pkg-bindings/VERSION (original) +++ trunk/pkg-bindings/VERSION Mon Sep 8 15:43:34 2008 @@ -1 +1 @@ -2.17.9 +2.17.10 Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/package/yast2-pkg-bindings.changes?rev=50804&r1=50803&r2=50804&view=diff ============================================================================== --- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Mon Sep 8 15:43:34 2008 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Mon Sep 8 15:35:09 CEST 2008 - lslezak@suse.cz + +- added Pkg::ServiceURL() (get a full URL of a service) +- return "service" property of a repository (if it is a part of a + service) +- 2.17.10 + +------------------------------------------------------------------- Thu Sep 4 12:53:53 CEST 2008 - lslezak@suse.cz - added support for services, new functions: Pkg::ServiceAliases(), Modified: trunk/pkg-bindings/src/PkgFunctions.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/PkgFunctions.h?rev=50804&r1=50803&r2=50804&view=diff ============================================================================== --- trunk/pkg-bindings/src/PkgFunctions.h (original) +++ trunk/pkg-bindings/src/PkgFunctions.h Mon Sep 8 15:43:34 2008 @@ -777,6 +777,8 @@ YCPValue ServiceRefresh(const YCPString&); /* TYPEINFO: void()*/ YCPValue ServicesReset(); + /* TYPEINFO: string(string)*/ + YCPValue ServiceURL(const YCPString &alias); YCPValue ResolvablePropertiesEx(const YCPString& name, const YCPSymbol& kind_r, const YCPString& version, bool dependencies); Modified: trunk/pkg-bindings/src/Service.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Service.cc?rev=50804&r1=50803&r2=50804&view=diff ============================================================================== --- trunk/pkg-bindings/src/Service.cc (original) +++ trunk/pkg-bindings/src/Service.cc Mon Sep 8 15:43:34 2008 @@ -134,6 +134,27 @@ return ret; } +/****************************************************************************** + * @builtin SourceURL + * + * @short Get full service URL (including password!) + * @param alias alias of the service + * @return string URL or empty string on failure + **/ +YCPValue +PkgFunctions::ServiceURL(const YCPString &alias) +{ + if (alias.isNull()) + { + y2error("Error: nil service name"); + return YCPString(""); + } + + zypp::ServiceInfo s(service_manager.GetService(alias->value())); + + return YCPString(s.url().asCompleteString()); +} + /** @builtin ServiceSet @short Set properties of a service Modified: trunk/pkg-bindings/src/Source_Get.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source_Get.cc?rev=50804&r1=50803&r2=50804&view=diff ============================================================================== --- trunk/pkg-bindings/src/Source_Get.cc (original) +++ trunk/pkg-bindings/src/Source_Get.cc Mon Sep 8 15:43:34 2008 @@ -108,6 +108,7 @@ * "url" : YCPString (without password, but see SourceURL), * "alias" : YCPString, * "name" : YCPString, + * "service" : YCPString, (service to which the repo belongs, empty if there is no service assigned) * ]; * * </code> @@ -151,6 +152,8 @@ data->add( YCPString("priority"), YCPInteger(repo->repoInfo().priority())); + data->add( YCPString("service"), YCPString(repo->repoInfo().service())); + return data; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org