libzypp 17.38.5

ShutdownLock_p.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12
13#ifndef ZYPP_SHUTDOWNLOCK_P_H_INCLUDED
14#define ZYPP_SHUTDOWNLOCK_P_H_INCLUDED
15
16#include <string>
17
18#include <zypp-core/Globals.h>
19#include <zypp-core/base/PtrTypes.h>
20
21 namespace zypp
22{
23
24 class ExternalProgramWithSeperatePgid;
25
35 class ShutdownLock
36{
37 protected:
38 ShutdownLock( const std::string &who, const std::string &reason );
39 ~ShutdownLock();
40
41 private:
42 shared_ptr<ExternalProgramWithSeperatePgid> _prog;
43};
44
45 class ShutdownLockCommit : private ShutdownLock
46{
47 public:
48 ShutdownLockCommit( const std::string &who )
49 : ShutdownLock( who, "Zypp commit running." )
50 {}
51};
52
53} // namespace
54#endif
Globals.h
Provides API related macros.
PtrTypes.h
shared_ptr
zypp::ExternalProgramWithSeperatePgid
ExternalProgram extended to change the progress group ID after forking.
Definition ExternalProgram.h:312
zypp::ShutdownLockCommit::ShutdownLockCommit
ShutdownLockCommit(const std::string &who)
Definition ShutdownLock_p.h:48
zypp::ShutdownLock::~ShutdownLock
~ShutdownLock()
Definition ShutdownLock.cc:30
zypp::ShutdownLock::_prog
shared_ptr< ExternalProgramWithSeperatePgid > _prog
Definition ShutdownLock_p.h:42
zypp::ShutdownLock::ShutdownLock
ShutdownLock(const std::string &who, const std::string &reason)
Definition ShutdownLock.cc:8
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2