]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cdrom.h
fix crash in order writing in pkgDPkgPM::WriteApportReport()
[apt.git] / apt-pkg / cdrom.h
index 4fc3d39285b727b58518d6a539a12e086d1ebe40..bd09021760e07b2f5020a2d535a5becaa6289af0 100644 (file)
@@ -1,9 +1,13 @@
 #ifndef PKGLIB_CDROM_H
 #define PKGLIB_CDROM_H
 
+#include <apt-pkg/macros.h>
+
 #include<string>
 #include<vector>
 
+#include <stddef.h>
+
 #ifndef APT_8_CLEANER_HEADERS
 #include <apt-pkg/init.h>
 using namespace std;
@@ -18,7 +22,7 @@ class pkgCdromStatus                                                  /*{{{*/
    int totalSteps;
 
  public:
-   pkgCdromStatus() {};
+   pkgCdromStatus() : totalSteps(0) {};
    virtual ~pkgCdromStatus() {};
 
    // total steps
@@ -69,6 +73,11 @@ class pkgCdrom                                                               /*{{{*/
  public:
    bool Ident(std::string &ident, pkgCdromStatus *log);
    bool Add(pkgCdromStatus *log);
+
+ private:
+   APT_HIDDEN bool MountAndIdentCDROM(Configuration &Database, std::string &CDROM,
+        std::string &ident, pkgCdromStatus * const log, bool const interactive);
+   APT_HIDDEN bool UnmountCDROM(std::string const &CDROM, pkgCdromStatus * const log);
 };
                                                                        /*}}}*/
 
@@ -84,7 +93,7 @@ struct CdromDevice                                                    /*{{{*/
 class pkgUdevCdromDevices                                              /*{{{*/
 {
  protected:
-   // libudev dlopen stucture
+   // libudev dlopen structure
    void *libudev_handle;
    struct udev* (*udev_new)(void);
    int (*udev_enumerate_add_match_property)(struct udev_enumerate *udev_enumerate, const char *property, const char *value);