class CapFactory
- {
- friend std::ostream & operator<<( std::ostream & str, const CapFactory & obj );
+{
public:
/** Default ctor */
struct Impl;
/** Pointer to implementation */
RW_pointer<Impl> _pimpl;
- };
\ No newline at end of file
+};
class CapMatch
- {
+{
enum Result { NOMATCH, MATCH, IRRELEVANT };
public:
static const CapMatch no;
static const CapMatch irrelevant;
- friend bool operator==( const CapMatch & lhs, const CapMatch & rhs )
- { return lhs._result == rhs._result; }
-
- friend bool operator!=( const CapMatch & lhs, const CapMatch & rhs )
- { return lhs._result != rhs._result; }
-
- friend CapMatch operator!( const CapMatch & lhs )
- {
- if ( lhs._result == CapMatch::IRRELEVANT )
- return lhs;
- return !(lhs._result == CapMatch::MATCH);
- }
-
- friend CapMatch operator&&( const CapMatch & lhs, const CapMatch & rhs )
- {
- if ( lhs._result == CapMatch::IRRELEVANT )
- return rhs;
- if ( rhs._result == CapMatch::IRRELEVANT )
- return lhs;
- return (lhs._result == CapMatch::MATCH)
- && (rhs._result == CapMatch::MATCH);
- }
-
- friend CapMatch operator||( const CapMatch & lhs, const CapMatch & rhs )
- {
- if ( lhs._result == CapMatch::IRRELEVANT )
- return rhs;
- if ( rhs._result == CapMatch::IRRELEVANT )
- return lhs;
- return (lhs._result == CapMatch::MATCH)
- || (rhs._result == CapMatch::MATCH);
- }
-
- friend std::ostream & operator<<( std::ostream & str, const CapMatch & obj );
-
private:
CapMatch()
: _result( IRRELEVANT )
{}
Result _result;
- };
\ No newline at end of file
+};
+
class MediaSetAccess
{
- friend std::ostream & operator<<( std::ostream & str, const MediaSetAccess & obj );
-
- public:
- /**
- * creates a callback enabled media access for \param url and \param path.
- * with only 1 media no verified
- */
- MediaSetAccess( const Url &url, const Pathname &path );
- ~MediaSetAccess();
-
- /**
- * Sets a verifier for given media number
- */
- void setVerifier( unsigned media_nr, media::MediaVerifierRef verifier );
- Pathname provideFile(const Pathname & file, unsigned media_nr );
- };
\ No newline at end of file
+
+public:
+
+ MediaSetAccess( const Url &url, const Pathname &path );
+
+ ~MediaSetAccess();
+
+ void setVerifier( unsigned media_nr, media::MediaVerifierRef verifier );
+
+ Pathname provideFile(const Pathname & file, unsigned media_nr );
+
+};
+
class PoolItem_Ref
- {
- friend std::ostream & operator<<( std::ostream & str, const PoolItem_Ref & obj );
+{
public:
/** Implementation */
ResObject::constPtr resolvable() const;
public:
- /** Implicit conversion into ResObject::constPtr to
- * support query filters operating on ResObject.
- */
- operator ResObject::constPtr() const
- { return resolvable(); }
/** Forward \c -> access to ResObject. */
ResObject::constPtr operator->() const
{ return resolvable(); }
- /** Conversion to bool to allow pointer style tests
- * for nonNULL \ref resolvable. */
- operator ResObject::constPtr::unspecified_bool_type() const
- { return resolvable(); }
-
private:
/** Pointer to implementation */
RW_pointer<Impl> _pimpl;
void restoreState() const;
bool sameState() const;
//@}
- };
- ///////////////////////////////////////////////////////////////////
+};
+
+typedef PoolItem_Ref PoolItem;
- typedef PoolItem_Ref PoolItem;
%template(UrlSet) std::set<Url>;
-
+
class RepoInfo
- {
- friend std::ostream & operator<<( std::ostream & str, const RepoInfo & obj );
-
- public:
+{
+public:
RepoInfo();
~RepoInfo();
-
+
/**
* unique identifier for this source. If not specified
* It should be generated from the base url.
* ( [somerepo] )
*/
std::string alias() const;
-
+
/**
* A Url under which the metadata are located, or a set of mirrors.
*
* If empty, the base url will be used.
*/
Url mirrorListUrl() const;
-
+
typedef std::set<Url>::const_iterator urls_const_iterator;
-
+
/**
* iterator that points at begin of repository urls
*/
urls_const_iterator baseUrlsBegin() const;
-
+
/**
* iterator that points at end of repository urls
*/
urls_const_iterator baseUrlsEnd() const;
-
+
/**
* If enabled is false, then this repository must be ignored as if does
* not exists, except when checking for duplicate alias.
*/
boost::tribool enabled() const;
-
+
/**
* If true, the repostory must be refreshed before creating resolvables
* from it
*/
boost::tribool autorefresh() const;
-
+
/**
* Type of repository,
- *
+ *
*/
repo::RepoType type() const;
-
+
/**
* \short Repository short label
*
* infos created in memory.
*/
Pathname filepath() const;
-
+
/**
* Add a base url. \see baseUrls
* \param url The base url for the repository.
* To edit or remove urls, create a new RepoInfo instead.
*/
RepoInfo & addBaseUrl( const Url &url );
-
+
/**
* Set mirror list url. \see mirrorListUrl
* \param url The base url for the list
*/
RepoInfo & setMirrorListUrl( const Url &url );
-
+
/**
* enable or disable the repository \see enabled
* \param enabled
*/
RepoInfo & setEnabled( boost::tribool enabled );
-
+
/**
* enable or disable autorefresh \see autorefresh
* \param enabled
*/
RepoInfo & setAutorefresh( boost::tribool autorefresh );
-
+
/**
* set the repository alias \see alias
* \param alias
*/
RepoInfo & setAlias( const std::string &alias );
-
+
/**
* set the repository type \see type
* \param t
*/
RepoInfo & setType( const repo::RepoType &t );
-
+
/**
* set the repository name \see name
* \param name
* \param path File path
*/
RepoInfo & setFilepath( const Pathname &filename );
-
+
std::ostream & dumpOn( std::ostream & str ) const;
-
+
std::ostream & dumpRepoOn( std::ostream & str ) const;
class Impl;
private:
/** Pointer to implementation */
RWCOW_pointer<Impl> _pimpl;
- };
- typedef std::list<RepoInfo> RepoInfoList;
- %template(RepoInfoList) std::list<RepoInfo>;
+};
+
+typedef std::list<RepoInfo> RepoInfoList;
+%template(RepoInfoList) std::list<RepoInfo>;
+
class RepoStatus
- {
- friend std::ostream & operator<<( std::ostream & str, const RepoStatus & obj );
+{
public:
-
+
/**
* Checksum of the repository.
* Usually the checksum of the index, but any
* in any way is sufficient.
*/
std::string checksum() const;
-
+
/**
* timestamp of the repository. If the repository
* changes, it has to be updated as well with the
* new timestamp.
*/
Date timestamp() const;
-
+
/**
* set the repository checksum \see checksum
* \param checksum
*/
RepoStatus & setChecksum( const std::string &checksum );
-
+
/**
* set the repository timestamp \see timestamp
* \param timestamp
public:
/** Default ctor */
RepoStatus();
-
+
/**
* \short Status from a single file
* As most repository state is represented
* construct the status from a file.
*/
RepoStatus( const Pathname &file );
-
+
/** Dtor */
~RepoStatus();
private:
/** Pointer to implementation */
RWCOW_pointer<Impl> _pimpl;
- };
\ No newline at end of file
+};
class ResPool
- {
- friend std::ostream & operator<<( std::ostream & str, const ResPool & obj );
+{
public:
/** \ref zypp::pool::PoolItem */
/** \name Iterate through all ResObjects (all kinds). */
//@{
- /**
+ /**
const_iterator begin() const;
const_iterator end() const;
*/
*/
/**
- * Handling additional requirement. E.G. need package "foo" and package
+ * Handling additional requirement. E.G. need package "foo" and package
* "foo1" which has a greater version than 1.0:
*
* \code
* CapSet capset;
- * capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));
+ * capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));
* capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo1 > 1.0"));
*
* // The user is setting this capablility
* Handling additional conflicts. E.G. do not install anything which provides "foo":
*
* \code
- * CapSet capset;
+ * CapSet capset;
* capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));
*
* // The user is setting this capablility
* ResPool::AdditionalCapSet aCapSet;
* aCapSet[ResStatus::USER] = capset;
*
- * setAdditionalConflict( aCapSet );
+ * setAdditionalConflict( aCapSet );
* \endcode
- */
+ */
void setAdditionalConflict( const AdditionalCapSet & capset ) const;
AdditionalCapSet & additionaConflict() const;
-
+
/**
* Handling additional provides. This is used for ignoring a requirement.
* e.G. Do ignore the requirement "foo":
*
* \code
- * CapSet capset;
+ * CapSet capset;
* capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));
*
* // The user is setting this capablility
* ResPool::AdditionalCapSet aCapSet;
* aCapSet[ResStatus::USER] = capset;
*
- * setAdditionalProvide( aCapSet );
+ * setAdditionalProvide( aCapSet );
* \endcode
- */
+ */
void setAdditionalProvide( const AdditionalCapSet & capset ) const;
- AdditionalCapSet & additionaProvide() const;
+ AdditionalCapSet & additionaProvide() const;
private:
/** */
private:
/** Const access to implementation. */
pool::PoolTraits::Impl_constPtr _pimpl;
- };
\ No newline at end of file
+
+};
class ResStatus
- {
- friend std::ostream & operator<<( std::ostream & str, const ResStatus & obj );
- friend bool operator==( const ResStatus & lhs, const ResStatus & rhs );
+{
public:
/** \name BitField range definitions.
{ return fieldValueIs<TransactField>( LOCKED ); }
bool isKept() const
- { return fieldValueIs<TransactField>( KEEP_STATE ); }
+ { return fieldValueIs<TransactField>( KEEP_STATE ); }
bool transacts() const
{ return fieldValueIs<TransactField>( TRANSACT ); }
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 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 );
private:
BitFieldType _bitfield;
- };
\ No newline at end of file
+};
typedef ResObject ResT;
typedef std::set<ResT::Ptr> StorageT;
typedef StorageT::size_type size_type;
-
- friend std::ostream & operator<<( std::ostream & str, const ResStore & obj );
+
public:
ResStore();
~ResStore();
- class TranslatedText
- {
- friend std::ostream & operator<<( std::ostream & str, const TranslatedText & obj );
+class TranslatedText
+{
public:
/** Implementation */
class Impl;
/** true if the text have no translations for any language */
bool empty() const ;
-
+
/** static default empty translated text */
static const TranslatedText notext;
private:
/** Pointer to implementation */
RWCOW_pointer<Impl> _pimpl;
- };
\ No newline at end of file
+
+};