From: Josef Reidinger Date: Mon, 13 Feb 2012 12:29:55 +0000 (+0100) Subject: first non-working code for package provision X-Git-Tag: BASE-SuSE-Code-12_2-Branch~6^2~7^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2f908f0180b0296910e484da10e33e90c97f0aa;p=platform%2Fupstream%2Flibzypp-bindings.git first non-working code for package provision --- diff --git a/swig/PackageProvider.i b/swig/PackageProvider.i new file mode 100644 index 0000000..4d290dd --- /dev/null +++ b/swig/PackageProvider.i @@ -0,0 +1 @@ +%include diff --git a/swig/ruby/tests/target.rb b/swig/ruby/tests/target.rb index 0ea0bc0..31b4396 100644 --- a/swig/ruby/tests/target.rb +++ b/swig/ruby/tests/target.rb @@ -55,6 +55,13 @@ class LoadTest < Test::Unit::TestCase assert pi.is_a? PoolItem r = pi.resolvable assert_equal "libzypp",r.name + #try to download it + pkg = asKindPackage(pi) + puts RepoMediaAccess.new().class + puts pkg.class + puts DeltaCandidates.new().class + puts pkg.distribution + path = PackageProvider.new(RepoMediaAccess.new(),asKindPackage(pi),DeltaCandidates.new()).providePackage end assert true diff --git a/swig/zypp.i b/swig/zypp.i index 08d573b..a84ca38 100644 --- a/swig/zypp.i +++ b/swig/zypp.i @@ -127,6 +127,7 @@ SWIGINTERNINLINE SV *SWIG_From_double SWIG_PERL_DECL_ARGS_1(double value); #include "zypp/ServiceInfo.h" #include "zypp/RepoManager.h" #include "zypp/repo/RepoType.h" +#include "zypp/repo/PackageProvider.h" #include "zypp/TmpPath.h" #include "zypp/Resolver.h" #include "zypp/pool/GetResolvablesToInsDel.h" @@ -230,6 +231,7 @@ namespace zypp { %include "ResStatus.i" %include "ResObject.i" %include "Package.i" +%include "PackageProvider.i" %include "Patch.i" %include "Pattern.i" %include "Product.i" @@ -249,6 +251,10 @@ namespace zypp { %include "Resolver.i" %include "ZConfig.i" +//just simple files, where we need default ctor +%include +%include + %ignore zypp::ZYpp::setTextLocale; %ignore zypp::ZYpp::getTextLocale; %ignore zypp::ZYpp::setRequestedLocales;