%defattr(-,root,root,-)
%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/zypp.so
-#%package -n python-zypp
-#Summary: Python bindings for libzypp
-#Group: Development/Languages/Python
-#%description -n python-zypp
-#-
-#
-#%files -n python-zypp
-#%defattr(-,root,root,-)
-#%{_libdir}/python2.5/site-packages/_zypp.so
-#%{_libdir}/python2.5/site-packages/zypp.py
-
-#%package -n perl-zypp
-#Summary: Perl bindings for libzypp
-#Group: Development/Languages/Perl
-#
-#%description -n perl-zypp
-#-
-#
-#%files -n perl-zypp
-#%defattr(-,root,root,-)
-#/usr/lib/perl5/*/*/zypp.pm
-#/usr/lib/perl5/*/*/zypp.so
+%package -n python-zypp
+Summary: Python bindings for libzypp
+Group: Development/Languages/Python
+%description -n python-zypp
+-
+
+%files -n python-zypp
+%defattr(-,root,root,-)
+%{_libdir}/python2.5/site-packages/_zypp.so
+%{_libdir}/python2.5/site-packages/zypp.py
+
+%package -n perl-zypp
+Summary: Perl bindings for libzypp
+Group: Development/Languages/Perl
+
+%description -n perl-zypp
+-
+
+%files -n perl-zypp
+%defattr(-,root,root,-)
+/usr/lib/perl5/*/*/zypp.pm
+/usr/lib/perl5/*/*/zypp.so
%changelog
+// Ignore static versions shadowed by member functions
+%ignore zypp::Arch::compare(const Arch &, const Arch &);
typedef std::set<Arch,CompareByGT<Arch> > CompatSet;
-%ignore Arch::compare(const Arch &, const Arch &);
-
%include <zypp/Arch.h>
-
-// I don't think this is correct: ctor and dtor are not taken into account
+#if 1
+%include <zypp/Capabilities.h>
+#else
+// I dont think this is correct: ctor and dtor are not taken into account
class Capabilities
{
#ifdef SWIGPERL5
iter2(Capabilities, Capability);
#endif
+#endif
\ No newline at end of file
+// Ignore member functions shadowed by static versions
+%ignore zypp::Capability::matches(Capability const &) const;
+%ignore zypp::Capability::matches(IdString const &) const;
+%ignore zypp::Capability::matches(std::string const &) const;
+%ignore zypp::Capability::matches(char const *) const;
- class Capability: protected sat::detail::PoolMember,
- private base::SafeBool<Capability>
- {
- public:
- enum CtorFlag { PARSED, UNPARSED };
+%include <zypp/Capability.h>
- public:
- /** Default ctor, \ref Empty capability. */
- Capability() : _id( sat::detail::emptyId ) {}
-
- /** Ctor from id. */
- explicit Capability( sat::detail::IdType id_r ) : _id( id_r ) {}
-
- /** Ctor from string.
- * \a str_r is parsed to check whether it contains an <tt>[op edition]</tt> part,
- * unless the \ref PARSED flag is passed to the ctor.
- */
- explicit Capability( const char * str_r, const ResKind & prefix_r = ResKind(), CtorFlag flag_r = UNPARSED );
- /** \overload */
- explicit Capability( const std::string & str_r, const ResKind & prefix_r = ResKind(), CtorFlag flag_r = UNPARSED );
- /** \overload Convenience for parsed (name only) packages. */
- Capability( const char * str_r, CtorFlag flag_r, const ResKind & prefix_r = ResKind() );
- /** \overload */
- Capability( const std::string & str_r, CtorFlag flag_r, const ResKind & prefix_r = ResKind() );
-
- /** Ctor from <tt>name op edition</tt>. */
- Capability( const std::string & name_r, const std::string & op_r, const std::string & ed_r, const ResKind & prefix_r = ResKind() );
- /** \overload */
- Capability( const std::string & name_r, Rel op_r, const std::string & ed_r, const ResKind & prefix_r = ResKind() );
- /** \overload */
- Capability( const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & prefix_r = ResKind() );
-
- public:
- /** No or Null \ref Capability ( Id \c 0 ). */
- static const Capability Null;
-
- /** Empty Capability. */
- static const Capability Empty;
-
- public:
- /** Evaluate in a boolean context <tt>( ! empty() )</tt>. */
- //using base::SafeBool<Capability>::operator bool_type;
-
- /** Whether the \ref Capability is empty.
- * This is true for \ref Null and \ref Empty.
- */
- bool empty() const
- { return( _id == sat::detail::emptyId || _id == sat::detail::noId ); }
-
- public:
- /** Conversion to <tt>const char *</tt> */
- const char * c_str() const;
-
- /** \overload */
- std::string asString() const
- { return c_str(); }
-
- public:
- /** Helper providing more detailed information about a \ref Capability. */
- CapDetail detail() const;
-
- public:
- /** \name Match two simple capabilities.
- *
- * Two simple capabilities match if they have the same \c name
- * and their \c edition ranges overlap. Where no edition matches
- * ANY edition. \see \ref Edition::match.
- *
- * If a capability expression is involved, \ref matches returns
- * \ref CapMatch::irrelevant.
- *
- * \todo check whether we must promote string to Capability in order to match.
- */
- //@{
- static CapMatch matches( const Capability & lhs, const Capability & rhs ) { return _doMatch( lhs.id(), rhs.id() ); }
- static CapMatch matches( const Capability & lhs, const IdString & rhs ) { return _doMatch( lhs.id(), rhs.id() ); }
- static CapMatch matches( const Capability & lhs, const std::string & rhs ) { return _doMatch( lhs.id(), Capability(rhs).id() ); }
- static CapMatch matches( const Capability & lhs, const char * rhs ) { return _doMatch( lhs.id(), Capability(rhs).id() );}
-
- static CapMatch matches( const IdString & lhs, const Capability & rhs ) { return _doMatch( lhs.id(), rhs.id() ); }
- static CapMatch matches( const IdString & lhs, const IdString & rhs ) { return _doMatch( lhs.id(), rhs.id() ); }
- static CapMatch matches( const IdString & lhs, const std::string & rhs ) { return _doMatch( lhs.id(), Capability(rhs).id() ); }
- static CapMatch matches( const IdString & lhs, const char * rhs ) { return _doMatch( lhs.id(), Capability(rhs).id() ); }
-
- static CapMatch matches( const std::string & lhs, const Capability & rhs ) { return _doMatch( Capability(lhs).id(), rhs.id() );}
- static CapMatch matches( const std::string & lhs, const IdString & rhs ) { return _doMatch( Capability(lhs).id(), rhs.id() ); }
- static CapMatch matches( const std::string & lhs, const std::string & rhs ) { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
- static CapMatch matches( const std::string & lhs, const char * rhs ) { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
-
- static CapMatch matches( const char * lhs, const Capability & rhs ) { return _doMatch( Capability(lhs).id(), rhs.id() );}
- static CapMatch matches( const char * lhs, const IdString & rhs ) { return _doMatch( Capability(lhs).id(), rhs.id() ); }
- static CapMatch matches( const char * lhs, const std::string & rhs ) { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
- static CapMatch matches( const char * lhs, const char * rhs ) { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
-
- CapMatch matches( const Capability & rhs ) const { return _doMatch( id(), rhs.id() ); }
- CapMatch matches( const IdString & rhs ) const { return _doMatch( id(), rhs.id() ); }
- CapMatch matches( const std::string & rhs ) const { return _doMatch( id(), Capability(rhs).id() ); }
- CapMatch matches( const char * rhs ) const { return _doMatch( id(), Capability(rhs).id() ); }
- //@}
-
- /** \ref matches functor.
- */
- struct Matches: public std::binary_function<Capability,Capability,CapMatch>
- {
- CapMatch operator()( const Capability & lhs, const Capability & rhs ) const
- { return Capability::matches( lhs, rhs ); }
- };
-
- public:
- /** Test for a filename that is likely being REQUIRED.
- * Files below \c /bin , \c /sbin , \c /lib etc. Scanning a
- * packages filelist, an \e interesting filename might be worth
- * being remembered in PROVIDES.
- */
- static bool isInterestingFileSpec( const IdString & name_r ) { return isInterestingFileSpec( name_r.c_str() ); }
- static bool isInterestingFileSpec( const std::string & name_r ) { return isInterestingFileSpec( name_r.c_str() ); }
- static bool isInterestingFileSpec( const char * name_r );
-
- public:
- /** Expert backdoor. */
- sat::detail::IdType id() const
- { return _id; }
- private:
- /** Match two Capabilities */
- static CapMatch _doMatch( sat::detail::IdType lhs, sat::detail::IdType rhs );
- private:
- };
-
-
-
-%extend Capability
+%extend zypp::Capability
{
int __cmp__(const Capability& other)
{
}
}
+
%nodefault Dep;
-%include "zypp/Dep.h"
\ No newline at end of file
+%include "zypp/Dep.h"
+// Ignore member functions shadowed by static versions
+%ignore zypp::Edition::match(Edition const &) const;
+%ignore zypp::Edition::match(IdString const &) const;
+%ignore zypp::Edition::match(std::string const &) const;
+%ignore zypp::Edition::match(char const *) const;
+
+// ma@: Why do we need this?
+//namespace zypp
+//{
+// %rename Edition::compare(const Edition& lhs, const Edition& rhs) compare2;
+// %rename Edition::match(const Edition& lhs, const Edition& rhs) match2;
+//}
-// example for including the original header file
-
-#if 1
-
-namespace zypp
-{
- %rename Edition::compare(const Edition& lhs, const Edition& rhs) compare2;
- %rename Edition::match(const Edition& lhs, const Edition& rhs) match2;
-}
-
-// TODO: tell make about dependencies
%include <zypp/Edition.h>
-
-#else
-
-namespace zypp
-{
- class Edition
- {
- public:
- typedef unsigned epoch_t;
- static const epoch_t noepoch = 0;
- static const Edition noedition;
- public:
- Edition();
- Edition( const std::string & edition_r );
- Edition( const std::string & version_r,
- const std::string & release_r,
- epoch_t epoch_r = noepoch );
- Edition( const std::string & version_r,
- const std::string & release_r,
- const std::string & epoch_r );
- ~Edition();
- public:
- epoch_t epoch() const;
- const std::string & version() const;
- const std::string & release() const;
- std::string asString() const;
- public:
- static int compare( const Edition & lhs, const Edition & rhs );
- int compare( const Edition & rhs ) const;
- typedef Compare<Edition> Compare;
- typedef Range<Edition> CompareRange;
- public:
- static int match( const Edition & lhs, const Edition & rhs );
- int match( const Edition & rhs ) const;
- };
-
-}
-
-#endif
+%ignore zypp::Edition::match(Edition const &);
\ No newline at end of file
-%include <zypp/Pathname.h>
\ No newline at end of file
+// Ignore static versions shadowed by member functions
+%ignore zypp::filesystem::Pathname::dirname(Pathname const &);
+%ignore zypp::filesystem::Pathname::basename(Pathname const &);
+%ignore zypp::filesystem::Pathname::extension(Pathname const &);
+%ignore zypp::filesystem::Pathname::absolutename(Pathname const &);
+%ignore zypp::filesystem::Pathname::relativename(Pathname const &);
+%ignore zypp::filesystem::Pathname::cat(Pathname const &,Pathname const &);
+%ignore zypp::filesystem::Pathname::extend(Pathname const &,std::string const &);
+
+%include <zypp/Pathname.h>
%include <zypp/PoolItem.h>
-typedef PoolItem PoolItem;
+//typedef PoolItem PoolItem;
-%extend PoolItem
+%extend zypp::PoolItem
{
std::string asString() const
{
%include <zypp/ResObject.h>
-
%extend intrusive_ptr<const ResObject>
{
int __cmp__(intrusive_ptr<const ResObject>& other)
-class ResStatus
-{
- public:
-
- /** Default ctor. */
- ResStatus();
-
- /** Ctor setting the initial . */
- ResStatus( bool isInstalled_r );
-
- /** Dtor. */
- ~ResStatus();
-
- public:
- /** \name BitField range definitions.
- *
- * \note Enlarge FieldType if more bit's needed. It's not yet
- * checked by the compiler.
- */
- //@{
- typedef uint16_t FieldType;
- typedef bit::BitField<FieldType> BitFieldType;
- // Bit Ranges within FieldType defined by 1st bit and size:
- typedef bit::Range<FieldType,0, 1> StateField;
- typedef bit::Range<FieldType,StateField::end, 2> ValidateField;
- typedef bit::Range<FieldType,ValidateField::end, 2> TransactField;
- typedef bit::Range<FieldType,TransactField::end, 2> TransactByField;
- typedef bit::Range<FieldType,TransactByField::end, 2> TransactDetailField;
- typedef bit::Range<FieldType,TransactDetailField::end, 1> SolverStateField;
- typedef bit::Range<FieldType,SolverStateField::end, 1> LicenceConfirmedField;
- typedef bit::Range<FieldType,LicenceConfirmedField::end, 2> WeakField;
-
- // enlarge FieldType if more bit's needed. It's not yet
- // checked by the compiler.
- //@}
- public:
-
- /** \name Status values.
- *
- * Each enum corresponds to a BitField range.
- * \note Take care that enumerator values actually fit into
- * the corresponding field. It's not yet checked by the compiler.
- */
- //@{
- enum StateValue
- {
- UNINSTALLED = bit::RangeValue<StateField,0>::value,
- INSTALLED = bit::RangeValue<StateField,1>::value
- };
- enum ValidateValue
- {
- UNDETERMINED = bit::RangeValue<ValidateField,0>::value,
- BROKEN = bit::RangeValue<ValidateField,1>::value,
- SATISFIED = bit::RangeValue<ValidateField,2>::value,
- NONRELEVANT = bit::RangeValue<ValidateField,3>::value
- };
- enum TransactValue
- {
- KEEP_STATE = bit::RangeValue<TransactField,0>::value,
- LOCKED = bit::RangeValue<TransactField,1>::value, // locked, must not transact
- TRANSACT = bit::RangeValue<TransactField,2>::value // transact according to state
- };
- enum TransactByValue
- {
- SOLVER = bit::RangeValue<TransactByField,0>::value,
- APPL_LOW = bit::RangeValue<TransactByField,1>::value,
- APPL_HIGH = bit::RangeValue<TransactByField,2>::value,
- USER = bit::RangeValue<TransactByField,3>::value
- };
-
- enum DetailValue
- {
- /** Detail for no transact, i.e. reset any Install/RemoveDetailValue. */
- NO_DETAIL = bit::RangeValue<TransactDetailField,0>::value,
- };
-
- enum InstallDetailValue
- {
- EXPLICIT_INSTALL = bit::RangeValue<TransactDetailField,0>::value,
- SOFT_INSTALL = bit::RangeValue<TransactDetailField,1>::value
- };
- enum RemoveDetailValue
- {
- EXPLICIT_REMOVE = bit::RangeValue<TransactDetailField,0>::value,
- SOFT_REMOVE = bit::RangeValue<TransactDetailField,1>::value,
- DUE_TO_OBSOLETE = bit::RangeValue<TransactDetailField,2>::value,
- DUE_TO_UPGRADE = bit::RangeValue<TransactDetailField,3>::value
- };
- enum SolverStateValue
- {
- NORMAL = bit::RangeValue<SolverStateField,0>::value, // default, notthing special
- SEEN = bit::RangeValue<SolverStateField,1>::value // already seen during ResolverUpgrade
- };
-
- enum LicenceConfirmedValue
- {
- LICENCE_UNCONFIRMED = bit::RangeValue<LicenceConfirmedField,0>::value,
- LICENCE_CONFIRMED = bit::RangeValue<LicenceConfirmedField,1>::value
- };
-
- enum WeakValue
- {
- NO_WEAK = bit::RangeValue<WeakField,0>::value,
- SUGGESTED = bit::RangeValue<WeakField,1>::value,
- RECOMMENDED = bit::RangeValue<WeakField,2>::value,
- SUGGESTED_AND_RECOMMENDED = bit::RangeValue<WeakField,3>::value
- };
-
- //@}
-
- public:
-
- /** Debug helper returning the bitfield.
- * It's save to expose the bitfield, as it can't be used to
- * recreate a ResStatus. So it is not possible to bypass
- * transition rules.
- */
- BitFieldType bitfield() const
- { return _bitfield; }
-
- public:
-
- bool isLicenceConfirmed() const
- { return fieldValueIs<LicenceConfirmedField>( LICENCE_CONFIRMED ); }
-
- void setLicenceConfirmed( bool toVal_r = true )
- { fieldValueAssign<LicenceConfirmedField>( toVal_r ? LICENCE_CONFIRMED : LICENCE_UNCONFIRMED ); }
-
- public:
- // These two are IMMUTABLE!
-
- bool isInstalled() const
- { return fieldValueIs<StateField>( INSTALLED ); }
-
- bool isUninstalled() const
- { return fieldValueIs<StateField>( UNINSTALLED ); }
-
- public:
-
- bool staysInstalled() const
- { return isInstalled() && !transacts(); }
-
- bool wasInstalled() const { return staysInstalled(); } //for old status
-
- bool isToBeInstalled() const
- { return isUninstalled() && transacts(); }
-
- bool staysUninstalled() const
- { return isUninstalled() && !transacts(); }
-
- bool wasUninstalled() const { return staysUninstalled(); } // for old status
-
- bool isToBeUninstalled() const
- { return isInstalled() && transacts(); }
-
- bool isLocked() const
- { return fieldValueIs<TransactField>( LOCKED ); }
-
- bool isKept() const
- { return fieldValueIs<TransactField>( KEEP_STATE ); }
-
- bool isUndetermined() const
- { return fieldValueIs<ValidateField>( UNDETERMINED ); }
-
- ValidateValue validate() const
- { return (ValidateValue)_bitfield.value<ValidateField>(); }
-
- bool isSatisfied() const
- { return fieldValueIs<ValidateField>( SATISFIED ); }
-
- bool isBroken() const
- { return fieldValueIs<ValidateField>( BROKEN ); }
-
- bool isNonRelevant() const
- { return fieldValueIs<ValidateField>( NONRELEVANT ); }
-
- bool transacts() const
- { return fieldValueIs<TransactField>( TRANSACT ); }
-
- TransactValue getTransactValue() const
- { return (TransactValue)_bitfield.value<TransactField>(); }
-
- bool isBySolver() const
- { return fieldValueIs<TransactByField>( SOLVER ); }
-
- bool isByApplLow() const
- { return fieldValueIs<TransactByField>( APPL_LOW ); }
-
- bool isByApplHigh() const
- { return fieldValueIs<TransactByField>( APPL_HIGH ); }
-
- bool isByUser() const
- { return fieldValueIs<TransactByField>( USER ); }
-
- TransactByValue getTransactByValue() const
- { return (TransactByValue)_bitfield.value<TransactByField>(); }
-
- bool isToBeUninstalledDueToObsolete () const
- { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( DUE_TO_OBSOLETE ); }
-
- bool isToBeUninstalledDueToUpgrade() const
- { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( DUE_TO_UPGRADE ); }
-
- bool isToBeInstalledSoft () const
- { return isToBeInstalled() && fieldValueIs<TransactDetailField>( SOFT_INSTALL ); }
-
- bool isToBeInstalledNotSoft () const
- { return isToBeInstalled() && !fieldValueIs<TransactDetailField>( SOFT_INSTALL ); }
-
-
- bool isToBeUninstalledSoft () const
- { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( SOFT_REMOVE ); }
-
- public:
-
- bool setTransactValue( TransactValue newVal_r, TransactByValue causer_r );
- bool setLock( bool toLock_r, TransactByValue causer_r );
- bool maySetLock( bool to_r, TransactByValue causer_r );
- bool setTransact( bool toTansact_r, TransactByValue causer_r );
- bool maySetTransact( bool val_r, TransactByValue causer );
- bool setSoftLock( TransactByValue causer_r );
- bool resetTransact( TransactByValue causer_r );
- bool setSoftTransact( bool toTansact_r, TransactByValue causer_r,
- TransactByValue causerLimit_r );
- bool setSoftTransact( bool toTansact_r, TransactByValue causer_r );
- bool maySetSoftTransact( bool val_r, TransactByValue causer,
- TransactByValue causerLimit_r );
- bool maySetSoftTransact( bool val_r, TransactByValue causer );
- bool setToBeInstalled (TransactByValue causer);
- bool maySetToBeInstalled (TransactByValue causer);
- bool setToBeUninstalled (TransactByValue causer);
- bool maySetToBeUninstalled (TransactByValue causer);
- bool setToBeUninstalledDueToObsolete ( );
- bool setToBeUninstalledDueToUpgrade ( TransactByValue causer );
- bool setToBeInstalledSoft ( );
- bool setToBeUninstalledSoft ( );
- bool maySetToBeUninstalledSoft ();
- bool isSoftInstall () {
- return fieldValueIs<TransactDetailField> (SOFT_INSTALL);
- }
-
- bool isSoftUninstall () {
- return fieldValueIs<TransactDetailField> (SOFT_REMOVE);
- }
-
- bool setSoftInstall (bool flag) {
- fieldValueAssign<TransactDetailField>(flag?SOFT_INSTALL:0);
- return true;
- }
-
- bool setSoftUninstall (bool flag) {
- fieldValueAssign<TransactDetailField>(flag?SOFT_REMOVE:0);
- return true;
- }
-
- bool setUndetermined ()
- {
- fieldValueAssign<ValidateField>(UNDETERMINED);
- return true;
- }
-
- bool setSatisfied ()
- {
- fieldValueAssign<ValidateField>(SATISFIED);
- return true;
- }
-
- bool setBroken ()
- {
- fieldValueAssign<ValidateField>(BROKEN);
- return true;
- }
-
- bool setNonRelevant ()
- {
- fieldValueAssign<ValidateField>(NONRELEVANT);
- return true;
- }
-
- bool isSeen () const
- { return fieldValueIs<SolverStateField>( SEEN ); }
-
- bool setSeen (bool value)
- {
- fieldValueAssign<SolverStateField>( value ? SEEN : NORMAL );
- return true;
- }
-
- bool setStatus( ResStatus newStatus_r )
- {
- // State field is immutable!
- if ( _bitfield.value<StateField>() != newStatus_r._bitfield.value<StateField>() )
- return false;
- // Transaction state change allowed?
- if ( ! setTransactValue( newStatus_r.getTransactValue(), newStatus_r.getTransactByValue() ) )
- return false;
-
- // Ok, we take it all..
- _bitfield = newStatus_r._bitfield;
- return true;
- }
-
- /** \name Builtin ResStatus constants. */
- //@{
- static const ResStatus toBeInstalled;
- static const ResStatus toBeInstalledSoft;
- static const ResStatus toBeUninstalled;
- static const ResStatus toBeUninstalledSoft;
- static const ResStatus toBeUninstalledDueToUnlink;
- static const ResStatus toBeUninstalledDueToObsolete;
- static const ResStatus toBeUninstalledDueToUpgrade;
- static const ResStatus installed; // installed, status after successful target 'install' commit
- static const ResStatus uninstalled; // uninstalled, status after successful target 'uninstall' commit
- static const ResStatus satisfied; // uninstalled, satisfied
- static const ResStatus complete; // installed, satisfied
- static const ResStatus unneeded; // uninstalled, unneeded
- static const ResStatus needed; // uninstalled, incomplete
- static const ResStatus incomplete; // installed, incomplete
- //@}
-
- private:
- /** Ctor for intialization of builtin constants. */
- ResStatus( StateValue s,
- ValidateValue v = UNDETERMINED,
- TransactValue t = KEEP_STATE,
- InstallDetailValue i = EXPLICIT_INSTALL,
- RemoveDetailValue r = EXPLICIT_REMOVE,
- SolverStateValue ssv = NORMAL );
-
- /** Return whether the corresponding Field has value \a val_r.
- */
- template<class _Field>
- bool fieldValueIs( FieldType val_r ) const
- { return _bitfield.isEqual<_Field>( val_r ); }
-
- /** Set the corresponding Field to value \a val_r.
- */
- template<class _Field>
- void fieldValueAssign( FieldType val_r )
- { _bitfield.assign<_Field>( val_r ); }
-
- /** compare two values.
- */
- template<class _Field>
- bool isGreaterThan( FieldType val_r )
- { return _bitfield.value<_Field>() > val_r; }
-
- template<class _Field>
- bool isLessThan( FieldType val_r )
- { return _bitfield.value<_Field>() < val_r; }
-
- private:
- BitFieldType _bitfield;
-};
+%include <zypp/ResStatus.h>
#ifdef SWIGPERL5
-class Resolvable : protected sat::Solvable,
- public base::ReferenceCounted, private base::NonCopyable
- {
- friend std::ostream & operator<<( std::ostream & str, const Resolvable & obj );
- public:
- typedef Resolvable Self;
- typedef ResTraits<Self> TraitsType;
- typedef TraitsType::KindType Kind;
- typedef TraitsType::PtrType Ptr;
- typedef TraitsType::constPtrType constPtr;
+%import <zypp/sat/Solvable.h>
+%include <zypp/Resolvable.h>
- public:
- /** Whether this represents a valid- or no-solvable. */
-
- /** \name Dependencies. */
- //@{
- /** Select by Dep. */
- //Capabilities dep( Dep which_r ) const
- //{ return operator[]( which_r ); }
-
- //@}
-
- public:
- const sat::Solvable & satSolvable() const { return *this; }
-
- protected:
- /** Ctor */
- Resolvable( const sat::Solvable & solvable_r );
- /** Dtor */
- virtual ~Resolvable();
- /** Helper for stream output */
- virtual std::ostream & dumpOn( std::ostream & str ) const;
- };
\ No newline at end of file
-
-// example for including the original header file
-
-#if 1
-
-// TODO: tell make about dependencies
%include <zypp/Url.h>
-
-#else
-
-namespace zypp
-{
- class Url
- {
- public:
-
- Url();
- ~Url();
-
- Url(const Url &url);
- Url(const std::string &encodedUrl);
-
- bool isValid() const;
-
- std::string asString() const;
-
- };
-}
-
-#endif
%include <zypp/ZYppCommitResult.h>
-%extend ZYppCommitResult
+%extend zypp::ZYppCommitResult
{
std::string asString() const
{
)
ADD_LIBRARY( ${WRAP}_zypp SHARED "${CMAKE_CURRENT_BINARY_DIR}/zypp_wrap.cxx" )
-SET_TARGET_PROPERTIES( ${WRAP}_zypp PROPERTIES PREFIX "" )
+SET_TARGET_PROPERTIES( ${WRAP}_zypp
+ PROPERTIES
+ PREFIX ""
+ OUTPUT_NAME zypp
+)
ADD_DEPENDENCIES( ${WRAP}_zypp ${WRAP}_glue )
INCLUDE_DIRECTORIES( ${PERL_LIB_PATH} )
)
ADD_LIBRARY( ${WRAP}_zypp SHARED "${CMAKE_CURRENT_BINARY_DIR}/zypp_wrap.cxx" )
-SET_TARGET_PROPERTIES( ${WRAP}_zypp PROPERTIES PREFIX "" )
+SET_TARGET_PROPERTIES( ${WRAP}_zypp
+ PROPERTIES
+ PREFIX ""
+ OUTPUT_NAME _zypp
+)
ADD_DEPENDENCIES( ${WRAP}_zypp ${WRAP}_glue )
INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_PATH} )
)
ADD_LIBRARY( ${WRAP}_zypp SHARED "${CMAKE_CURRENT_BINARY_DIR}/zypp_wrap.cxx" )
-SET_TARGET_PROPERTIES( ${WRAP}_zypp PROPERTIES PREFIX "" )
+SET_TARGET_PROPERTIES(${WRAP}_zypp
+ PROPERTIES
+ PREFIX ""
+ OUTPUT_NAME zypp
+)
ADD_DEPENDENCIES( ${WRAP}_zypp ${WRAP}_glue )
INCLUDE_DIRECTORIES( ${RUBY_INCLUDE_PATH} )
%rename("!") "operator!";
%rename("==") "operator==";
-
template < typename T >
class intrusive_ptr {
public:
T *operator->();
};
+namespace zypp {
+ namespace base {
+ // silence 'Nothing known about class..' warning
+ class ReferenceCounted {};
+ }
+}
%include "std_string.i"
%include "stl.i"