/*
* Provide files from set without verifiers.
*/
-void msa_provide_files_set(const string &url)
+void msa_provide_files_set(const string &urlstr)
{
- MediaSetAccess setaccess(Url(url), "/");
+ Url url(urlstr);
+ MediaSetAccess setaccess(url);
Pathname file1 = setaccess.provideFile("/test.txt", 1);
BOOST_CHECK(check_file_exists(file1) == true);
/*
* Provide files from set with verifiers.
*/
-void msa_provide_files_set_verified(const string &url)
+void msa_provide_files_set_verified(const string &urlstr)
{
- MediaSetAccess setaccess(Url(url), "/");
+ Url url(urlstr);
+ MediaSetAccess setaccess(url);
setaccess.setVerifier(1, media::MediaVerifierRef(new SimpleVerifier("media1")));
setaccess.setVerifier(2, media::MediaVerifierRef(new SimpleVerifier("media2")));
/*
* Provide file from single media with verifier.
*/
-void msa_provide_files_single(const string &url)
+void msa_provide_files_single(const string &urlstr)
{
- MediaSetAccess setaccess(Url(url), "/");
+ Url url(urlstr);
+ MediaSetAccess setaccess(url);
setaccess.setVerifier(1, media::MediaVerifierRef(new SimpleVerifier("media")));
// provide file from media
* \code
* Url url("dir:/path/to/cdset/sources/openSUSE-10.3/Alpha2plus/CD1");
*
- * MediaSetAccess access(url, "/");
+ * MediaSetAccess access(url);
*
* access.setVerifier(1, media1VerifierRef);
* access.setVerifier(2, media2VerifierRef);
public:
/**
- * Creates a callback enabled media access for \a url and \a path.
+ * Creates a callback enabled media access for specified \a url.
+ *
+ * \param url
+ * \param path Prefered attach (mount) point.
*/
- MediaSetAccess( const Url &url, const Pathname &path );
+ MediaSetAccess(const Url &url, const Pathname &path = "");
~MediaSetAccess();
/**
private:
/** Media or media set URL */
Url _url;
- /** Path on the media relative to _url */
+ /**
+ * Prefered mount point.
+ *
+ * \see MediaManager::open(Url,Pathname) MediaHandler::_attachPoint
+ */
Pathname _path;
typedef std::map<media::MediaNr, media::MediaAccessId> MediaMap;