summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosef Reidinger <jreidinger@suse.cz>2012-02-13 13:29:55 +0100
committerJosef Reidinger <jreidinger@suse.cz>2012-02-13 13:29:55 +0100
commite2f908f0180b0296910e484da10e33e90c97f0aa (patch)
tree7252e5bd6af8b4f6804bf19e74f81c064e812bc2
parent40856264c85c37d82c4be405ba104726826ad8f5 (diff)
downloadlibzypp-bindings-e2f908f0180b0296910e484da10e33e90c97f0aa.tar.gz
libzypp-bindings-e2f908f0180b0296910e484da10e33e90c97f0aa.tar.bz2
libzypp-bindings-e2f908f0180b0296910e484da10e33e90c97f0aa.zip
first non-working code for package provision
-rw-r--r--swig/PackageProvider.i1
-rw-r--r--swig/ruby/tests/target.rb7
-rw-r--r--swig/zypp.i6
3 files changed, 14 insertions, 0 deletions
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 <zypp/repo/PackageProvider.h>
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 <zypp/repo/RepoProvideFile.h>
+%include <zypp/repo/DeltaCandidates.h>
+
%ignore zypp::ZYpp::setTextLocale;
%ignore zypp::ZYpp::getTextLocale;
%ignore zypp::ZYpp::setRequestedLocales;