Added commented out accessId swap function
authorMarius Tomaschewski <mt@suse.de>
Thu, 9 Feb 2006 15:58:22 +0000 (15:58 +0000)
committerMarius Tomaschewski <mt@suse.de>
Thu, 9 Feb 2006 15:58:22 +0000 (15:58 +0000)
zypp/media/MediaManager.cc
zypp/media/MediaManager.h

index cbdd0ac..da44a2c 100644 (file)
@@ -175,6 +175,28 @@ namespace zypp
     }
 
     // ---------------------------------------------------------------
+    /*
+    bool
+    MediaManager::swap(MediaAccessId idOne, MediaAccessId idTwo)
+    {
+      MutexLock glock(g_Mutex);
+
+      if( m_impl->hasMediaAcc(idOne) &&  m_impl->hasMediaAcc(idTwo))
+      {
+        MediaAccessRef tmp( m_impl->mediaAccMap[idOne]);
+
+        m_impl->mediaAccMap[idOne] = m_impl->mediaAccMap[idTwo];
+        m_impl->mediaAccMap[idTwo] = tmp;
+
+        DBG << "Swapped media access ids "
+            << idOne << " and " << idTwo << std::endl;
+        return true;
+      }
+      return false;
+    }
+    */
+
+    // ---------------------------------------------------------------
     void
     MediaManager::close(MediaAccessId accessId)
     {
index 63b1b8f..2672745 100644 (file)
@@ -136,6 +136,14 @@ namespace zypp
              const Pathname & preferred_attach_point = "");
 
       /**
+       * Swap access handlers of idOne and idTwo.
+       *
+       * \returns True, if idOne and and idTwo was both valid.
+      bool
+      swap(MediaAccessId idOne, MediaAccessId idTwo);
+       */
+
+      /**
        * close the media
        */
       void