From: Marius Tomaschewski Date: Thu, 9 Feb 2006 15:58:22 +0000 (+0000) Subject: Added commented out accessId swap function X-Git-Tag: BASE-SuSE-SLE-10-SP2-Branch~2388 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98a65de13712d9bd4afbef6b9df4dfb9a2ea062e;p=platform%2Fupstream%2Flibzypp.git Added commented out accessId swap function --- diff --git a/zypp/media/MediaManager.cc b/zypp/media/MediaManager.cc index cbdd0ac..da44a2c 100644 --- a/zypp/media/MediaManager.cc +++ b/zypp/media/MediaManager.cc @@ -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) { diff --git a/zypp/media/MediaManager.h b/zypp/media/MediaManager.h index 63b1b8f..2672745 100644 --- a/zypp/media/MediaManager.h +++ b/zypp/media/MediaManager.h @@ -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