apt  2.2.4
About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.
  Fossies Dox: apt-2.2.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

CDROMMethod Class Reference
Inheritance diagram for CDROMMethod:
Collaboration diagram for CDROMMethod:

Public Member Functions

 CDROMMethod ()
- Public Member Functions inherited from aptMethod
bool RunningInQemu (void)
bool LoadSeccomp ()
bool CalculateHashes (FetchItem const *const Itm, FetchResult &Res) const APT_NONNULL(2)
void Warning (std::string &&msg)
void setPostfixForMethodNames (char const *const postfix) APT_NONNULL(2)
bool DebugEnabled () const
std::string ConfigFind (char const *const postfix, std::string const &defValue) const APT_NONNULL(2)
std::string ConfigFind (std::string const &postfix, std::string const &defValue) const
bool ConfigFindB (char const *const postfix, bool const defValue) const APT_NONNULL(2)
int ConfigFindI (char const *const postfix, int const defValue) const APT_NONNULL(2)
bool TransferModificationTimes (char const *const From, char const *const To, time_t &LastModified) APT_NONNULL(2
 if (lstat(To, &Buf2) !=0||S_ISLNK(Buf2.st_mode)) return true
 if (stat(From, &Buf) !=0) return _error -> Errno("stat", _("Failed to stat"))
 if (utimes(To, times) !=0) return _error -> Errno("utimes", _("Failed to set modification time"))
void Dequeue ()
 aptMethod (std::string &&Binary, char const *const Ver, unsigned long const Flags) APT_NONNULL(3)
- Public Member Functions inherited from pkgAcqMethod
void Log (const char *Format,...)
void Status (const char *Format,...)
void Redirect (const std::string &NewURI)
int Run (bool Single=false)
void SetFailReason (std::string Msg)
void SetIP (std::string aIP)
 pkgAcqMethod (const char *Ver, unsigned long Flags=0)
virtual ~pkgAcqMethod ()
void DropPrivsOrDie ()

Private Member Functions

bool IsCorrectCD (URI want, string MountPath, string &NewID)
bool AutoDetectAndMount (const URI, string &NewID)
virtual bool Fetch (FetchItem *Itm) APT_OVERRIDE
std::string GetID (std::string const &Name)
virtual void Exit () APT_OVERRIDE
virtual bool Configuration (std::string Message) APT_OVERRIDE

Private Attributes

bool DatabaseLoaded
bool Debug
::Configuration Database
string CurrentID
string CDROM
bool MountedByApt
pkgUdevCdromDevices UdevCdroms

Additional Inherited Members

- Public Types inherited from pkgAcqMethod
enum  CnfFlags {
  SingleInstance = (1 << 0) , Pipeline = (1 << 1) , SendConfig = (1 << 2) , LocalOnly = (1 << 3) ,
  NeedsCleanup = (1 << 4) , Removable = (1 << 5) , AuxRequests = (1 << 6) , SendURIEncoded = (1 << 7)
- Static Public Member Functions inherited from aptMethod
static std::string URIEncode (std::string const &part)
static std::string DecodeSendURI (std::string const &part)
- Public Attributes inherited from aptMethod
std::vector< std::string > methodNames
bool struct stat Buf2
struct stat Buf
struct timeval times [2]
times[0] tv_sec = Buf.st_atime
 LastModified = times[1].tv_sec = Buf.st_mtime
times[0] tv_usec = times[1].tv_usec = 0
return true
- Protected Types inherited from aptMethod
enum  Seccomp { BASE = (1 << 1) , NETWORK = (1 << 2) , DIRECTORY = (1 << 3) }
- Protected Member Functions inherited from pkgAcqMethod
virtual bool URIAcquire (std::string const &, FetchItem *Itm)
void Fail (bool Transient=false)
void Fail (const char *Why, bool Transient=false)
virtual void Fail (std::string Why, bool Transient=false)
virtual void URIStart (FetchResult &Res)
virtual void URIDone (FetchResult &Res, FetchResult *Alt=0)
void SendMessage (std::string const &header, std::unordered_map< std::string, std::string > &&fields)
bool MediaFail (std::string Required, std::string Drive)
 APT_DEPRECATED_MSG ("Use SendMessage instead") void PrintStatus(char const *const header
- Protected Attributes inherited from aptMethod
std::string const Binary
unsigned long SeccompFlags
- Protected Attributes inherited from pkgAcqMethod
std::vector< std::string > Messages
std::string FailReason
std::string UsedMirror
std::string IP
const char * Format
const char va_list &args const

Detailed Description

Definition at line 32 of file cdrom.cc.

Constructor & Destructor Documentation

◆ CDROMMethod()

Definition at line 58 of file cdrom.cc.

Referenced by main().

Member Function Documentation

◆ AutoDetectAndMount()

bool AutoDetectAndMount ( const URI  Get,
string &  NewID 

◆ Configuration()

bool Configuration ( std::string  Message)

Reimplemented from aptMethod.

Definition at line 279 of file cdrom.cc.

References _config, and aptMethod::Configuration().

◆ Exit()

void Exit ( )

Reimplemented from pkgAcqMethod.

Definition at line 70 of file cdrom.cc.

References CDROM, MountedByApt, and UnmountCdrom().

◆ Fetch()

◆ GetID()

std::string GetID ( std::string const Name)

◆ IsCorrectCD()

bool IsCorrectCD ( URI  want,
string  MountPath,
string &  NewID 

Definition at line 152 of file cdrom.cc.

References Database, Debug, URI::Host, and IdentCdrom().

Referenced by AutoDetectAndMount(), and Fetch().

Member Data Documentation


string CDROM

Definition at line 39 of file cdrom.cc.

Referenced by AutoDetectAndMount(), Exit(), and Fetch().

◆ CurrentID

string CurrentID

Definition at line 38 of file cdrom.cc.

Referenced by Fetch().

◆ Database

::Configuration Database

Definition at line 37 of file cdrom.cc.

Referenced by Fetch(), GetID(), and IsCorrectCD().

◆ DatabaseLoaded

bool DatabaseLoaded

Definition at line 34 of file cdrom.cc.

Referenced by Fetch().

◆ Debug

bool Debug

Definition at line 35 of file cdrom.cc.

Referenced by AutoDetectAndMount(), Fetch(), and IsCorrectCD().

◆ MountedByApt

bool MountedByApt

Definition at line 40 of file cdrom.cc.

Referenced by AutoDetectAndMount(), Exit(), and Fetch().

◆ UdevCdroms

pkgUdevCdromDevices UdevCdroms

Definition at line 41 of file cdrom.cc.

Referenced by AutoDetectAndMount().

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