Imported Upstream version 15.19.0
[platform/upstream/libzypp.git] / zypp / media / MediaHandler.h
index 349c150..52fd9a8 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "zypp/media/MediaSource.h"
 #include "zypp/media/MediaException.h"
-#include "zypp/base/Deprecated.h"
+#include "zypp/APIConfig.h"
 
 namespace zypp {
   namespace media {
@@ -82,7 +82,7 @@ class MediaHandler {
         *
         *      dir, false => user specified attach point (not removed)
         */
-       AttachPoint     _AttachPointHint;
+       AttachPoint     _attachPointHint;
 
        /**
         * The relative root directory of the data on the media.
@@ -100,6 +100,9 @@ class MediaHandler {
         /** timestamp of the the last attach verification */
         mutable time_t  _attach_mtime;
 
+       /** file usable for delta downloads */
+       mutable Pathname _deltafile;
+
     protected:
         /**
         * Url to handle
@@ -278,12 +281,9 @@ class MediaHandler {
         *        mount table (nfs, smb and cifs) or from mediaSource
         *        while compare of a mount entry with mediaSource.
         */
-       void             forceRelaseAllMedia(bool matchMountFs,
-                                            bool autoMountedOny=true);
+       void             forceRelaseAllMedia(bool matchMountFs);
        void             forceRelaseAllMedia(const MediaSourceRef &ref,
-                                            bool matchMountFs,
-                                            bool autoMountedOnly=true);
-       virtual bool     isAutoMountedMedia(const AttachedMedia &media);
+                                            bool matchMountFs);
 
     protected:
 
@@ -520,7 +520,7 @@ class MediaHandler {
        /**
         * True if media is attached.
         **/
-       virtual bool isAttached() const { return _mediaSource; }
+       virtual bool isAttached() const { return _mediaSource != nullptr; }
 
        /**
         * Return the local directory that corresponds to medias url,
@@ -639,6 +639,16 @@ class MediaHandler {
         **/
        void releasePath( Pathname pathname ) const;
 
+        /*
+         * set a deltafile to be used in the next download
+         */
+       void setDeltafile( const Pathname &filename = Pathname()) const;
+
+       /*
+        * return the deltafile set with setDeltafile()
+        */
+       Pathname deltafile () const;
+
     public:
 
        /**