1 // missing resfilter:: to call these
2 %ignore zypp::ResPool::byKindBegin;
3 %ignore zypp::ResPool::byKindEnd;
4 %ignore zypp::ResPool::byNameBegin;
5 %ignore zypp::ResPool::byNameEnd;
6 %ignore zypp::ResPool::byStatus;
7 %ignore zypp::ResPool::byStatusBegin;
8 %ignore zypp::ResPool::byStatusEnd;
9 %apply unsigned { zypp::ResPool::size_type };
10 %include <zypp/ResPool.h>
12 %ignore zypp::pool::operator<<;
13 %include "legacy/GetResolvablesToInsDel.h"
16 typedef ::std::list<zyppPoolItem> PoolItemList;
17 %template(PoolItemList) ::std::list<PoolItem>;
27 std::string loadSolvFile(std::string _solv, std::string _alias)
30 tmpRepo.setAlias(_alias);
33 addRepoSolv(_solv, tmpRepo);
34 } catch ( const Exception & e ) {
45 pool::GetResolvablesToInsDel getTransaction()
47 return pool::GetResolvablesToInsDel( *self );
54 iter2(ResPool, PoolItem);
60 iter3(ResPool, zypp::PoolItem*);
65 // ResPool::const_iterator i = self->begin();
66 // while ( i != self->end() ) {
67 // rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
74 void each_by_kind( const ResKind & kind_r )
76 ResPool::byKind_iterator i = self->byKindBegin( kind_r );
77 while ( i != self->byKindEnd( kind_r ) ) {
78 rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
85 void each_by_name( const std::string &name )
87 ResPool::byName_iterator i = self->byNameBegin( name );
88 while ( i != self->byNameEnd( name ) ) {
89 rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
98 %newobject ResPool::const_iterator(PyObject **PYTHON_SELF);
100 #if SWIG_VERSION > 0x010336
101 swig::SwigPyIterator* iterator(PyObject **PYTHON_SELF)
103 swig::PySwigIterator* iterator(PyObject **PYTHON_SELF)
106 return swig::make_output_iterator(self->begin(), self->begin(),
107 self->end(), *PYTHON_SELF);
109 #if SWIG_VERSION > 0x010336
110 swig::SwigPyIterator* kinditerator(PyObject **PYTHON_SELF, const ResObject::Kind & kind_r)
112 swig::PySwigIterator* kinditerator(PyObject **PYTHON_SELF, const ResObject::Kind & kind_r)
115 return swig::make_output_iterator(self->byKindBegin( kind_r ), self->byKindBegin( kind_r ),
116 self->byKindEnd( kind_r ), *PYTHON_SELF);
118 #if SWIG_VERSION > 0x010336
119 swig::SwigPyIterator* nameiterator(PyObject **PYTHON_SELF, const std::string &name)
121 swig::PySwigIterator* nameiterator(PyObject **PYTHON_SELF, const std::string &name)
124 return swig::make_output_iterator(self->byNameBegin( name ), self->byNameBegin( name ),
125 self->byNameEnd( name ), *PYTHON_SELF);
128 def __iter__(self): return self.iterator()
129 def byKindIterator(self, kind): return self.kinditerator(kind)
130 def byNameIterator(self, name): return self.nameiterator(name)