Mailinglist Archive: zypp-commit (223 mails)

< Previous Next >
[zypp-commit] r10651 - in /trunk/libzypp-bindings/swig: ./ perl5/ python/ ruby/
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Wed, 23 Jul 2008 12:27:53 -0000
  • Message-id: <20080723122754.1361534AE9@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Wed Jul 23 14:27:53 2008
New Revision: 10651

URL: http://svn.opensuse.org/viewcvs/zypp?rev=10651&view=rev
Log:
Changes bindings to at least compile. Still several header copies to be
replaced by %include. For shure also still a lot namespace issues, as
c++ namespace support was introduced in SWIG-1.3.12.

Added:
trunk/libzypp-bindings/swig/IdStringType.i
Modified:
trunk/libzypp-bindings/swig/Arch.i
trunk/libzypp-bindings/swig/CMakeLists.txt
trunk/libzypp-bindings/swig/CapMatch.i
trunk/libzypp-bindings/swig/Date.i
trunk/libzypp-bindings/swig/Edition.i
trunk/libzypp-bindings/swig/KeyRing.i
trunk/libzypp-bindings/swig/Kind.i
trunk/libzypp-bindings/swig/Package.i
trunk/libzypp-bindings/swig/PoolItem.i
trunk/libzypp-bindings/swig/RepoInfo.i
trunk/libzypp-bindings/swig/Repository.i
trunk/libzypp-bindings/swig/ResObject.i
trunk/libzypp-bindings/swig/ResPool.i
trunk/libzypp-bindings/swig/ResStatus.i
trunk/libzypp-bindings/swig/Resolvable.i
trunk/libzypp-bindings/swig/Resolver.i
trunk/libzypp-bindings/swig/Target.i
trunk/libzypp-bindings/swig/ZYppFactory.i
trunk/libzypp-bindings/swig/perl5/perl.i
trunk/libzypp-bindings/swig/python/python.i
trunk/libzypp-bindings/swig/ruby/ruby.i
trunk/libzypp-bindings/swig/zypp.i

Modified: trunk/libzypp-bindings/swig/Arch.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/Arch.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/Arch.i (original)
+++ trunk/libzypp-bindings/swig/Arch.i Wed Jul 23 14:27:53 2008
@@ -1,7 +1,7 @@
// Ignore static versions shadowed by member functions
%ignore zypp::Arch::compare(const Arch &, const Arch &);

-typedef std::set<Arch,CompareByGT<Arch> > CompatSet;
+template<class A, class B> class std::unary_function {};
+%template(ArchCompatFun) std::unary_function<zypp::Arch, bool>;

%include <zypp/Arch.h>
-

Modified: trunk/libzypp-bindings/swig/CMakeLists.txt
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/CMakeLists.txt?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/CMakeLists.txt (original)
+++ trunk/libzypp-bindings/swig/CMakeLists.txt Wed Jul 23 14:27:53 2008
@@ -1,7 +1,7 @@

ADD_SUBDIRECTORY(ruby)

-#ADD_SUBDIRECTORY(python)
+ADD_SUBDIRECTORY(python)

-#ADD_SUBDIRECTORY(perl5)
+ADD_SUBDIRECTORY(perl5)


Modified: trunk/libzypp-bindings/swig/CapMatch.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/CapMatch.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/CapMatch.i (original)
+++ trunk/libzypp-bindings/swig/CapMatch.i Wed Jul 23 14:27:53 2008
@@ -1,23 +1 @@
-
-class CapMatch
-{
- enum Result { NOMATCH, MATCH, IRRELEVANT };
-
- public:
-
- CapMatch( bool val_r )
- : _result( val_r ? MATCH : NOMATCH )
- {}
-
- static const CapMatch yes;
- static const CapMatch no;
- static const CapMatch irrelevant;
-
- private:
- CapMatch()
- : _result( IRRELEVANT )
- {}
-
- Result _result;
-};
-
+%include <zypp/CapMatch.h>

Modified: trunk/libzypp-bindings/swig/Date.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/Date.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/Date.i (original)
+++ trunk/libzypp-bindings/swig/Date.i Wed Jul 23 14:27:53 2008
@@ -1,4 +1,3 @@

// TODO: tell make about dependencies
%include <zypp/Date.h>
-

Modified: trunk/libzypp-bindings/swig/Edition.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/Edition.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/Edition.i (original)
+++ trunk/libzypp-bindings/swig/Edition.i Wed Jul 23 14:27:53 2008
@@ -11,5 +11,7 @@
// %rename Edition::match(const Edition& lhs, const Edition& rhs) match2;
//}

+%ignore zypp::Edition::compare(const Edition &, const Edition &);
+
+%template(IdStringEdition) zypp::IdStringType<zypp::Edition>;
%include <zypp/Edition.h>
-%ignore zypp::Edition::match(Edition const &);
\ No newline at end of file

Added: trunk/libzypp-bindings/swig/IdStringType.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/IdStringType.i?rev=10651&view=auto
==============================================================================
--- trunk/libzypp-bindings/swig/IdStringType.i (added)
+++ trunk/libzypp-bindings/swig/IdStringType.i Wed Jul 23 14:27:53 2008
@@ -0,0 +1,2 @@
+
+%include <zypp/IdStringType.h>

Modified: trunk/libzypp-bindings/swig/KeyRing.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/KeyRing.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/KeyRing.i (original)
+++ trunk/libzypp-bindings/swig/KeyRing.i Wed Jul 23 14:27:53 2008
@@ -1,13 +1,11 @@

-typedef intrusive_ptr<KeyRing> KeyRing_Ptr;
-
-%ignore KeyRingReport;
-%ignore KeyRingSignals;
-
+%ignore zypp::KeyRingReport;
+%ignore zypp::KeyRingSignals;

%include <zypp/KeyRing.h>
-
+nakespcae zypp
+{
+typedef intrusive_ptr<KeyRing> KeyRing_Ptr;
%template(KeyRing_Ptr) intrusive_ptr<KeyRing>;
-
-%template(List_PublicKey) std::list<PublicKey>;
-
+}
+%template(List_PublicKey) std::list<zypp::PublicKey>;

Modified: trunk/libzypp-bindings/swig/Kind.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/Kind.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/Kind.i (original)
+++ trunk/libzypp-bindings/swig/Kind.i Wed Jul 23 14:27:53 2008
@@ -1,37 +1,5 @@

-template<class _Tp>
-class KindOf
-{
- public:
- /** DefaultCtor: empty string */
- KindOf()
- {}
- /** Ctor from string.
- * Lowercase version of \a value_r is used as identification.
- */
- explicit
- KindOf( const std::string & value_r )
- : _value( str::toLower(value_r) )
- {}
- /** Dtor */
- ~KindOf()
- {}
- public:
- /** Identification string. */
- const std::string & asString() const
- { return _value; }
+%ignore zypp::ResKind::satIdent( const std::string & name_r ) const;

- /** Order on KindOf (arbitrary).
- * Not necessarily lexicographical.
- * \todo Enable class _Tp to define the order,
- * Fix logical operators below to use compare,
- */
- int compare( const KindOf & rhs ) const
- { return _value.compare( rhs._value ); }
-
- private:
- /** */
- std::string _value;
-};
-
-%template(KindOfResolvable) KindOf<Resolvable>;
+%template(IdStringResKind) zypp::IdStringType<zypp::ResKind>;
+%include <zypp/ResKind.h>

Modified: trunk/libzypp-bindings/swig/Package.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/Package.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/Package.i (original)
+++ trunk/libzypp-bindings/swig/Package.i Wed Jul 23 14:27:53 2008
@@ -1,3 +1,3 @@
-%ignore Package::checksum();
+//%ignore zypp::Package::checksum();
%include <zypp/Package.h>


Modified: trunk/libzypp-bindings/swig/PoolItem.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/PoolItem.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/PoolItem.i (original)
+++ trunk/libzypp-bindings/swig/PoolItem.i Wed Jul 23 14:27:53 2008
@@ -1,6 +1,9 @@
%include <zypp/PoolItem.h>

-//typedef PoolItem PoolItem;
+#ifdef SWIGPERL5
+#else
+%template(PoolItemSet) std::set<zypp::PoolItem>;
+#endif

%extend zypp::PoolItem
{
@@ -10,4 +13,4 @@
str << *self;
return str.str();
}
-}
\ No newline at end of file
+}

Modified: trunk/libzypp-bindings/swig/RepoInfo.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/RepoInfo.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/RepoInfo.i (original)
+++ trunk/libzypp-bindings/swig/RepoInfo.i Wed Jul 23 14:27:53 2008
@@ -4,7 +4,5 @@
#endif

%include <zypp/RepoInfo.h>
-
-typedef std::list<RepoInfo> RepoInfoList;
-%template(RepoInfoList) std::list<RepoInfo>;
-
+typedef std::list<zypp::RepoInfo> RepoInfoList;
+%template(RepoInfoList) std::list<zypp::RepoInfo>;

Modified: trunk/libzypp-bindings/swig/Repository.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/Repository.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/Repository.i (original)
+++ trunk/libzypp-bindings/swig/Repository.i Wed Jul 23 14:27:53 2008
@@ -1,92 +1,2 @@
-#if 1
- ///////////////////////////////////////////////////////////////////
- //
- // CLASS NAME : Repository
- //
- /** */
- class Repository : protected sat::detail::PoolMember,
- private base::SafeBool<Repository>
- {
- public:
- typedef filter_iterator<detail::ByRepository,
sat::detail::SolvableIterator> SolvableIterator;
- typedef sat::detail::size_type size_type;

- public:
- /** Default ctor creates \ref noRepository.*/
- Repository();
-
- /** \ref PoolImpl ctor. */
- explicit Repository( sat::detail::RepoIdType id_r );
-
- public:
- /** Represents no \ref Repository. */
- static const Repository noRepository;
-
- /** Return whether this is the system repository. */
- bool isSystemRepo() const;
-
- public:
- /** The repos name (alias). */
- std::string name() const;
-
- /** Whether \ref Repository contains solvables. */
- bool solvablesEmpty() const;
-
- /** Number of solvables in \ref Repository. */
- size_type solvablesSize() const;
-
- /** Iterator to the first \ref Solvable. */
- SolvableIterator solvablesBegin() const;
-
- /** Iterator behind the last \ref Solvable. */
- SolvableIterator solvablesEnd() const;
-
- public:
- /** Return any associated \ref RepoInfo. */
- RepoInfo info() const;
-
- /** Set \ref RepoInfo for this repository.
- * \throws Exception if this is \ref noRepository
- * \throws Exception if the \ref RepoInfo::alias
- * does not match the \ref Repository::name.
- */
- void setInfo( const RepoInfo & info_r );
-
- /** Remove any \ref RepoInfo set for this repository. */
- void clearInfo();
-
- public:
- /** Remove this \ref Repository from it's \ref Pool. */
- void eraseFromPool();
-
- /** Functor calling \ref eraseFromPool. */
- struct EraseFromPool;
-
- public:
- /** \name Repository content manipulating methods.
- * \todo maybe a separate Repository/Solvable content manip interface
- * provided by the pool.
- */
- //@{
- /** Load \ref Solvables from a solv-file.
- * In case of an exception the repository remains in the \ref Pool.
- * \throws Exception if this is \ref noRepository
- * \throws Exception if loading the solv-file fails.
- * \see \ref Pool::addRepoSolv and \ref Repository::EraseFromPool
- */
- void addSolv( const Pathname & file_r );
-
- /** Add \c count_r new empty \ref Solvable to this \ref Repository. */
- sat::detail::SolvableIdType addSolvables( unsigned count_r );
- /** \overload Add only one new \ref Solvable. */
- sat::detail::SolvableIdType addSolvable();
- //@}
-
- public:
- /** Expert backdoor. */
- ::_Repo * get() const;
- /** Expert backdoor. */
- sat::detail::RepoIdType id() const { return _id; }
- };
- ///////////////////////////////////////////////////////////////////
-#endif
\ No newline at end of file
+%include <zypp/Repository.h>

Modified: trunk/libzypp-bindings/swig/ResObject.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ResObject.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/ResObject.i (original)
+++ trunk/libzypp-bindings/swig/ResObject.i Wed Jul 23 14:27:53 2008
@@ -1,3 +1,4 @@
+%ignore zypp::make_res_object;

%include <zypp/ResObject.h>


Modified: trunk/libzypp-bindings/swig/ResPool.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ResPool.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/ResPool.i (original)
+++ trunk/libzypp-bindings/swig/ResPool.i Wed Jul 23 14:27:53 2008
@@ -1,230 +1,17 @@
-namespace zypp {
-%apply unsigned { ResPool::size_type };
+%nodefault zypp::ResPool;

-%nodefault ResPool;
-%ignore ResPool::byKindBegin;
-%ignore ResPool::byKindEnd;
-%ignore ResPool::byNameBegin;
-%ignore ResPool::byNameEnd;
+// missing resfilter:: to call these
+%ignore zypp::ResPool::byKindBegin;
+%ignore zypp::ResPool::byKindEnd;
+%ignore zypp::ResPool::byNameBegin;
+%ignore zypp::ResPool::byNameEnd;

+%apply unsigned { zypp::ResPool::size_type };

+%include <zypp/ResPool.h>

-class ResPool
- {
- friend std::ostream & operator<<( std::ostream & str, const ResPool & obj
);
-
- public:
- /** \ref PoolItem */
- typedef PoolItem value_type;
- typedef pool::PoolTraits::size_type size_type;
- typedef pool::PoolTraits::const_iterator const_iterator;
-
- typedef pool::PoolTraits::byCapabilityIndex_iterator
byCapabilityIndex_iterator;
- typedef pool::PoolTraits::repository_iterator repository_iterator;
-
- public:
- /** Singleton ctor. */
- static ResPool instance();
-
- /** preliminary */
- ResPoolProxy proxy() const;
-
- public:
- /** The pools serial number. Changing whenever the
- * whenever the content changes. (Resolvables or
- * Dependencies).
- */
- const SerialNumber & serial() const;
-
- public:
- /** */
- bool empty() const;
- /** */
- size_type size() const;
-
- /** */
- const_iterator begin() const;
- const_iterator end() const;
-
- public:
- /** Return the corresponding \ref PoolItem.
- * Pool and sat pool should be in sync. Returns an empty
- * \ref PoolItem if there is no corresponding \ref PoolItem.
- * \see \ref PoolItem::satSolvable.
- */
- PoolItem find( const sat::Solvable & slv_r ) const;
-
- public:
- /** \name Iterate through all PoolItems matching a \c _Filter. */
- //@{
- template<class _Filter>
- filter_iterator<_Filter,const_iterator> filterBegin( const _Filter &
filter_r ) const
- { return make_filter_begin( filter_r, *this ); }
-
- template<class _Filter>
- filter_iterator<_Filter,const_iterator> filterEnd( const _Filter &
filter_r ) const
- { return make_filter_end( filter_r, *this ); }
- //@}
-
- public:
- /** \name Iterate through all PoolItems of a certain name and kind. */
- //@{
- typedef pool::ByIdent ByIdent;
- typedef pool::PoolTraits::byIdent_iterator byIdent_iterator;
-
- byIdent_iterator byIdentBegin( const ByIdent & ident_r ) const
- {
- return make_transform_iterator( id2item().equal_range( ident_r.get()
).first,
-
pool::PoolTraits::Id2ItemValueSelector() );
- }
-
- byIdent_iterator byIdentBegin( ResKind kind_r, IdString name_r ) const
- { return byIdentBegin( ByIdent(kind_r,name_r) ); }
-
- byIdent_iterator byIdentBegin( ResKind kind_r, const C_Str & name_r )
const
- { return byIdentBegin( ByIdent(kind_r,name_r) ); }
-
- template<class _Res>
- byIdent_iterator byIdentBegin( IdString name_r ) const
- { return byIdentBegin( ByIdent(ResTraits<_Res>::kind,name_r) ); }
-
- template<class _Res>
- byIdent_iterator byIdentBegin( const C_Str & name_r ) const
- { return byIdentBegin( ByIdent(ResTraits<_Res>::kind,name_r) ); }
-
- /** Derive name and kind from \ref PoolItem. */
- byIdent_iterator byIdentBegin( const PoolItem & pi_r ) const
- { return byIdentBegin( ByIdent(pi_r.satSolvable()) ); }
- /** Derive name and kind from \ref sat::Solvable. */
- byIdent_iterator byIdentBegin( sat::Solvable slv_r ) const
- { return byIdentBegin( ByIdent(slv_r) ); }
- /** Takes a \ref sat::Solvable::ident string. */
- byIdent_iterator byIdentBegin( IdString ident_r ) const
- { return byIdentBegin( ByIdent(ident_r) ); }
-
-
- byIdent_iterator byIdentEnd( const ByIdent & ident_r ) const
- {
- return make_transform_iterator( id2item().equal_range( ident_r.get()
).second,
-
pool::PoolTraits::Id2ItemValueSelector() );
- }
-
- byIdent_iterator byIdentEnd( ResKind kind_r, IdString name_r ) const
- { return byIdentEnd( ByIdent(kind_r,name_r) ); }
-
- byIdent_iterator byIdentEnd( ResKind kind_r, const C_Str & name_r ) const
- { return byIdentEnd( ByIdent(kind_r,name_r) ); }
-
- template<class _Res>
- byIdent_iterator byIdentEnd( IdString name_r ) const
- { return byIdentEnd( ByIdent(ResTraits<_Res>::kind,name_r) ); }
-
- template<class _Res>
- byIdent_iterator byIdentEnd( const C_Str & name_r ) const
- { return byIdentEnd( ByIdent(ResTraits<_Res>::kind,name_r) ); }
-
- /** Derive name and kind from \ref PoolItem. */
- byIdent_iterator byIdentEnd( const PoolItem & pi_r ) const
- { return byIdentEnd( ByIdent(pi_r.satSolvable()) ); }
- /** Derive name and kind from \ref sat::Solvable. */
- byIdent_iterator byIdentEnd( sat::Solvable slv_r ) const
- { return byIdentEnd( ByIdent(slv_r) ); }
- /** Takes a \ref sat::Solvable::ident string. */
- byIdent_iterator byIdentEnd( IdString ident_r ) const
- { return byIdentEnd( ByIdent(ident_r) ); }
- //@}
-
- public:
- /** \name Iterate through all ResObjects of a certain kind. */
- //@{
- typedef zypp::resfilter::ByKind ByKind;
- typedef filter_iterator<ByKind,const_iterator> byKind_iterator;
-
- byKind_iterator byKindBegin( const ResKind & kind_r ) const
- { return make_filter_begin( ByKind(kind_r), *this ); }
-
- template<class _Res>
- byKind_iterator byKindBegin() const
- { return make_filter_begin( resfilter::byKind<_Res>(), *this ); }
-
- byKind_iterator byKindEnd( const ResKind & kind_r ) const
- { return make_filter_end( ByKind(kind_r), *this ); }
-
- template<class _Res>
- byKind_iterator byKindEnd() const
- { return make_filter_end( resfilter::byKind<_Res>(), *this ); }
- //@}
-
- public:
- /** \name Iterate through all ResObjects with a certain name (all kinds).
- * \deprecated Instead of iterating byName and filter byKind use ByIdent
iterator.
- */
- //@{
- typedef zypp::resfilter::ByName ByName;
- typedef filter_iterator<ByName,const_iterator> byName_iterator;
-
-
-
- public:
- /** \name Iterate through all Repositories that contribute ResObjects.
- */
- //@{
- size_type knownRepositoriesSize() const;
-
- repository_iterator knownRepositoriesBegin() const;
-
- repository_iterator knownRepositoriesEnd() const;
- //@}
-
- public:
- /** \name Iterate through requested/available Locales.
- */
- //@{
- /** Set the requested locales.
- * Languages to be supported by the system, e.g. language specific
- * packages to be installed.
- */
- void setRequestedLocales( const LocaleSet & locales_r );
-
- /** Add one \ref Locale to the set of requested locales.
- * Return \c true if \c locale_r was newly added to the set.
- */
- bool addRequestedLocale( const Locale & locale_r );
-
- /** Erase one \ref Locale from the set of requested locales.
- * Return \c false if \c locale_r was not found in the set.
- */
- bool eraseRequestedLocale( const Locale & locale_r );
-
- /** Return the requested locales.
- * \see \ref setRequestedLocales
- */
- const LocaleSet & getRequestedLocales() const;
-
- /** Wheter this \ref Locale is in the set of requested locales. */
- bool isRequestedLocale( const Locale & locale_r ) const;
-
- /** Get the set of available locales.
- * This is computed from the package data so it actually
- * represents all locales packages claim to support.
- */
- const LocaleSet & getAvailableLocales() const;
-
- /** Wheter this \ref Locale is in the set of available locales. */
- bool isAvailableLocale( const Locale & locale_r ) const;
- //@}
-
- private:
- const pool::PoolTraits::ItemContainerT & store() const;
- const pool::PoolTraits::Id2ItemT & id2item() const;
-
- private:
- /** Ctor */
- ResPool( pool::PoolTraits::Impl_constPtr impl_r );
- /** Const access to implementation. */
- pool::PoolTraits::Impl_constPtr _pimpl;
- };
-
+namespace zypp
+{

#ifdef SWIGPERL5

@@ -272,7 +59,6 @@
#endif

#ifdef SWIGPYTHON
-%template(PoolItemSet) std::set<PoolItem>;
%newobject ResPool::const_iterator(PyObject **PYTHON_SELF);
%extend ResPool {
swig::PySwigIterator* iterator(PyObject **PYTHON_SELF)

Modified: trunk/libzypp-bindings/swig/ResStatus.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ResStatus.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/ResStatus.i (original)
+++ trunk/libzypp-bindings/swig/ResStatus.i Wed Jul 23 14:27:53 2008
@@ -17,7 +17,7 @@
};
#endif

-%extend ResStatus
+%extend zypp::ResStatus
{
std::string asString() const
{

Modified: trunk/libzypp-bindings/swig/Resolvable.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/Resolvable.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/Resolvable.i (original)
+++ trunk/libzypp-bindings/swig/Resolvable.i Wed Jul 23 14:27:53 2008
@@ -1,4 +1,4 @@
-
+%ignore zypp::make;
%import <zypp/sat/Solvable.h>
%include <zypp/Resolvable.h>


Modified: trunk/libzypp-bindings/swig/Resolver.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/Resolver.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/Resolver.i (original)
+++ trunk/libzypp-bindings/swig/Resolver.i Wed Jul 23 14:27:53 2008
@@ -3,6 +3,8 @@
#endif

%include <zypp/Resolver.h>
-
+namespace zypp
+{
typedef intrusive_ptr<Resolver> Resolver_Ptr;
%template(Resolver_Ptr) intrusive_ptr<Resolver>;
+}
\ No newline at end of file

Modified: trunk/libzypp-bindings/swig/Target.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/Target.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/Target.i (original)
+++ trunk/libzypp-bindings/swig/Target.i Wed Jul 23 14:27:53 2008
@@ -1,6 +1,7 @@

-typedef intrusive_ptr<Target> Target_Ptr;
-
%include <zypp/Target.h>
-
+namespace zypp
+{
+typedef intrusive_ptr<Target> Target_Ptr;
%template(Target_Ptr) intrusive_ptr<Target>;
+}

Modified: trunk/libzypp-bindings/swig/ZYppFactory.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ZYppFactory.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/ZYppFactory.i (original)
+++ trunk/libzypp-bindings/swig/ZYppFactory.i Wed Jul 23 14:27:53 2008
@@ -1,7 +1,9 @@

+%include <zypp/ZYppFactory.h>
+
namespace zypp
{
+typedef intrusive_ptr<ZYpp> ZYpp_Ptr;
%template(ZYpp_Ptr) intrusive_ptr<ZYpp>;
}

-%include <zypp/ZYppFactory.h>

Modified: trunk/libzypp-bindings/swig/perl5/perl.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/perl5/perl.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/perl5/perl.i (original)
+++ trunk/libzypp-bindings/swig/perl5/perl.i Wed Jul 23 14:27:53 2008
@@ -1,4 +1,6 @@

+%ignore zypp::Arch_empty;
+
namespace zypp
{
// These operators must be ignored otherwise the wrapper does
@@ -6,6 +8,14 @@
%ignore operator<<;
%ignore operator==;
%ignore operator!=;
+
+ namespace filesystem
+ {
+ // Same as above.
+ %ignore operator==;
+ %ignore operator!=;
+ %ignore operator<<;
+ }
}

%define iter(cls, storetype)

Modified: trunk/libzypp-bindings/swig/python/python.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/python/python.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/python/python.i (original)
+++ trunk/libzypp-bindings/swig/python/python.i Wed Jul 23 14:27:53 2008
@@ -2,6 +2,7 @@

%rename *::asString "__str__";

+%ignore zypp::Arch_empty;

namespace zypp
{
@@ -18,7 +19,7 @@
// not compile (using swig 1.3.29).
%ignore operator==;
%ignore operator!=;
-
+
// Just to avoid warnings.
%ignore operator<<;
}

Modified: trunk/libzypp-bindings/swig/ruby/ruby.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ruby/ruby.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/ruby/ruby.i (original)
+++ trunk/libzypp-bindings/swig/ruby/ruby.i Wed Jul 23 14:27:53 2008
@@ -1,8 +1,6 @@

-
%rename *::asString "__str__";

-
namespace zypp
{
// Not ignoring gives a very strange error in the "pokus" testsuite: SWIG

Modified: trunk/libzypp-bindings/swig/zypp.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/zypp.i?rev=10651&r1=10650&r2=10651&view=diff
==============================================================================
--- trunk/libzypp-bindings/swig/zypp.i (original)
+++ trunk/libzypp-bindings/swig/zypp.i Wed Jul 23 14:27:53 2008
@@ -69,7 +69,7 @@
template < typename T >
class intrusive_ptr {
public:
- T *operator->();
+ T *operator->();
};

namespace zypp {
@@ -100,6 +100,7 @@
%include "perl5/perl.i"
#endif

+%include "IdStringType.i"
%include "Pathname.i"
%include "Url.i"
%include "ResStatus.i"
@@ -142,59 +143,5 @@
%include "python/callbacks.i"
#endif

-class ZYpp
-{
- public:
- typedef intrusive_ptr<ZYpp> Ptr;
- typedef intrusive_ptr<const ZYpp> constPtr;
- public:
-
- //ResPool pool() const;
- //ResPoolProxy poolProxy() const;
-
- /*
- DiskUsageCounter::MountPointSet diskUsage();
- void setPartitions(const DiskUsageCounter::MountPointSet &mp);
- */
- Target_Ptr target() const;
- void initializeTarget(const zypp::Pathname & root);
- void finishTarget();
-
- typedef ZYppCommitResult CommitResult;
- ZYppCommitResult commit( const ZYppCommitPolicy & policy_r );
-
- Resolver_Ptr resolver() const;
- KeyRing_Ptr keyRing() const;
-
- /*
- void setTextLocale( const Locale & textLocale_r );
- Locale getTextLocale() const;
- typedef std::set<Locale> LocaleSet;
- void setRequestedLocales( const LocaleSet & locales_r );
- LocaleSet getRequestedLocales() const;
- LocaleSet getAvailableLocales() const;
- void availableLocale( const Locale & locale_r );
- */
- zypp::Pathname homePath() const;
- zypp::Pathname tmpPath() const;
- void setHomePath( const zypp::Pathname & path );
-
- Arch architecture() const;
- void setArchitecture( const Arch & arch );
-
- /**
- * \short Apply persistant locks to current pool.
- * Call this before solving
- *
- * \returns Number of items locked
- */
- int applyLocks();
-
- protected:
- virtual ~ZYpp();
- private:
- friend class ZYppFactory;
- explicit ZYpp( const Impl_Ptr & impl_r );
-};
-
+%include <zypp/ZYpp.h>
%include "ZYppFactory.i"

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages