libzypp: zypp::ZYpp Class Reference

libzypp 17.38.13

zypp::ZYpp Class Reference

`#include <zypp/ZYpp.h>`

Inheritance diagram for zypp::ZYpp:

## Public Types
using | Ptr = shared_ptr<ZYpp>
using | constPtr = shared_ptr<const ZYpp>
using | CommitResult = ZYppCommitResult

## Public Member Functions
ResPool | pool () const
| Access to the global resolvable pool.
ResPoolProxy | poolProxy () const
| Pool of ui::Selectable.
DiskUsageCounter::MountPointSet | diskUsage ()
void | setPartitions (const DiskUsageCounter::MountPointSet &mp)
DiskUsageCounter::MountPointSet | getPartitions () const
Target_Ptr | target () const
Target_Ptr | getTarget () const
| Same as target but returns NULL if target is not initialized, instead of throwing.
void | initializeTarget (const Pathname &root, bool doRebuild_r=false)
void | finishTarget ()
ZYppCommitResult | commit (const ZYppCommitPolicy &policy_r)
| Commit changes and transactions.
void | installSrcPackage (const SrcPackage_constPtr &srcPackage_r)
| Install a source package on the Target.
ManagedFile | provideSrcPackage (const SrcPackage_constPtr &srcPackage_r)
| Provides a source package on the Target.
Resolver_Ptr | resolver () const
KeyRing_Ptr | keyRing () const
Pathname | homePath () const
| Get the path where zypp related plugins store persistent data and caches.
Pathname | tmpPath () const
| Get the path where zypp related plugins store temp data.
void | setHomePath (const Pathname &path)
| set the home, if you need to change it

## Static Public Member Functions
static void | setShutdownSignal ()
| To be called from zyppers signal handlers.
static void | clearShutdownSignal ()
| To be called from zypper code.

## Private Types
using | Impl = zypp_detail::ZYppImpl
using | Impl_Ptr = shared_ptr<Impl>

## Private Member Functions
| ZYpp (const Impl_Ptr &impl_r)
| Factory ctor.
| ~ZYpp ()
| Dtor.

## Private Attributes
RW_pointer< Impl > | _pimpl
| Pointer to implementation.

## Friends
class | ZYppFactory
| Factory.
std::ostream & | operator<< (std::ostream &str, const ZYpp &obj)
friend | void ::boost::checked_delete (ZYpp *) BOOST_NOEXCEPT
| Deleted via shared_ptr.

## Detailed Description

Todo
  define Exceptions ZYpp API main interface

Definition at line 57 of file ZYpp.h.

## Member Typedef Documentation

## ◆ Ptr

using zypp::ZYpp::Ptr = shared_ptr<ZYpp>

Definition at line 62 of file ZYpp.h.

## ◆ constPtr

using zypp::ZYpp::constPtr = shared_ptr<const ZYpp>

Definition at line 63 of file ZYpp.h.

## ◆ CommitResult

using zypp::ZYpp::CommitResult = ZYppCommitResult

Definition at line 122 of file ZYpp.h.

## ◆ Impl

using zypp::ZYpp::Impl = zypp_detail::ZYppImpl
| private

Definition at line 159 of file ZYpp.h.

## ◆ Impl_Ptr

using zypp::ZYpp::Impl_Ptr = shared_ptr<Impl>
| private

Definition at line 160 of file ZYpp.h.

## Constructor & Destructor Documentation

## ◆ ZYpp()

zypp::ZYpp::ZYpp | ( | const Impl_Ptr & | impl_r | ) |
| explicitprivate

Factory ctor.

Definition at line 331 of file ZYppFactory.cc.

## ◆ ~ZYpp()

zypp::ZYpp::~ZYpp | ( |  | ) |
| private

Dtor.

Definition at line 338 of file ZYppFactory.cc.

## Member Function Documentation

## ◆ pool()

ResPool zypp::ZYpp::pool | ( |  | ) | const

Access to the global resolvable pool.

Same as zypp::ResPool::instance

Definition at line 38 of file ZYpp.cc.

## ◆ poolProxy()

ResPoolProxy zypp::ZYpp::poolProxy | ( |  | ) | const

Pool of ui::Selectable.

Based on the ResPool, ui::Selectable groups ResObjetcs of same kind and name.

Definition at line 50 of file ZYpp.cc.

## ◆ diskUsage()

DiskUsageCounter::MountPointSet zypp::ZYpp::diskUsage | ( |  | ) |

Definition at line 41 of file ZYpp.cc.

## ◆ setPartitions()

void zypp::ZYpp::setPartitions | ( | const DiskUsageCounter::MountPointSet & | mp | ) |

Definition at line 44 of file ZYpp.cc.

## ◆ getPartitions()

DiskUsageCounter::MountPointSet zypp::ZYpp::getPartitions | ( |  | ) | const

Definition at line 47 of file ZYpp.cc.

## ◆ target()

Target_Ptr zypp::ZYpp::target | ( |  | ) | const

Exceptions

  Exception |

Definition at line 65 of file ZYpp.cc.

## ◆ getTarget()

Target_Ptr zypp::ZYpp::getTarget | ( |  | ) | const

Same as target but returns NULL if target is not initialized, instead of throwing.

Definition at line 68 of file ZYpp.cc.

## ◆ initializeTarget()

void zypp::ZYpp::initializeTarget | ( | const Pathname & | root,
|  | bool | doRebuild_r = false )

Exceptions

  Exception | Just init the target, dont populate store or pool. If `doRebuild_r` is `true`, an already existing database is rebuilt (rpm –rebuilddb ).

Definition at line 71 of file ZYpp.cc.

## ◆ finishTarget()

void zypp::ZYpp::finishTarget | ( |  | ) |

Exceptions

  Exception |

Definition at line 74 of file ZYpp.cc.

## ◆ setShutdownSignal()

void zypp::ZYpp::setShutdownSignal | ( |  | ) |
| static

To be called from zyppers signal handlers.

Sets a shutdown signal in a signal and thread safe way.

Definition at line 77 of file ZYpp.cc.

## ◆ clearShutdownSignal()

void zypp::ZYpp::clearShutdownSignal | ( |  | ) |
| static

To be called from zypper code.

This resets the shutdown signal state to normal..

Definition at line 80 of file ZYpp.cc.

## ◆ commit()

ZYppCommitResult zypp::ZYpp::commit | ( | const ZYppCommitPolicy & | policy_r | ) |

Commit changes and transactions.

Parameters

ref CommitPolicy

Returns
  CommitResult

Exceptions

  Exception |

Definition at line 83 of file ZYpp.cc.

## ◆ installSrcPackage()

void zypp::ZYpp::installSrcPackage | ( | const SrcPackage_constPtr & | srcPackage_r | ) |

Install a source package on the Target.

Exceptions

  Exception |

Definition at line 86 of file ZYpp.cc.

## ◆ provideSrcPackage()

ManagedFile zypp::ZYpp::provideSrcPackage | ( | const SrcPackage_constPtr & | srcPackage_r | ) |

Provides a source package on the Target.

Exceptions

  Exception |

Definition at line 89 of file ZYpp.cc.

## ◆ resolver()

Resolver_Ptr zypp::ZYpp::resolver | ( |  | ) | const

Definition at line 53 of file ZYpp.cc.

## ◆ keyRing()

KeyRing_Ptr zypp::ZYpp::keyRing | ( |  | ) | const

Definition at line 56 of file ZYpp.cc.

## ◆ homePath()

Pathname zypp::ZYpp::homePath | ( |  | ) | const

Get the path where zypp related plugins store persistent data and caches.

Definition at line 93 of file ZYpp.cc.

## ◆ tmpPath()

Pathname zypp::ZYpp::tmpPath | ( |  | ) | const

Get the path where zypp related plugins store temp data.

Definition at line 96 of file ZYpp.cc.

## ◆ setHomePath()

void zypp::ZYpp::setHomePath | ( | const Pathname & | path | ) |

set the home, if you need to change it

Definition at line 99 of file ZYpp.cc.

## Friends And Related Symbol Documentation

## ◆ ZYppFactory

friend class ZYppFactory
| friend

Factory.

Definition at line 158 of file ZYpp.h.

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | str,
|  | const ZYpp & | obj )
| friend

Definition at line 29 of file ZYpp.cc.

## ◆ void ::boost::checked_delete

void ::boost::checked_delete | ( | ZYpp * |  | ) |
| friend

Deleted via shared_ptr.

## Member Data Documentation

## ◆ _pimpl

RW_pointer<Impl> zypp::ZYpp::_pimpl
| private

Pointer to implementation.

Definition at line 170 of file ZYpp.h.

The documentation for this class was generated from the following files:

- zypp/ZYpp.h
- zypp/ZYpp.cc
- zypp/ZYppFactory.cc