IMediaLibrary.h 721 Bytes
Newer Older
1 2 3 4 5
#ifndef IMEDIALIBRARY_H
#define IMEDIALIBRARY_H

#include <vector>
#include <string>
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
6
#include <memory>
7

Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
8
class IFile;
9
class ILabel;
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
10 11

typedef std::shared_ptr<IFile> FilePtr;
12
typedef std::shared_ptr<ILabel> LabelPtr;
13 14 15 16

class IMediaLibrary
{
    public:
17 18
        virtual ~IMediaLibrary() {}
        virtual bool initialize( const std::string& dbPath ) = 0;
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
19 20
        virtual FilePtr addFile( const std::string& path ) = 0;
        virtual FilePtr file( const std::string& path ) = 0;
21
        virtual LabelPtr createLabel( const std::string& label ) = 0;
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
22
        virtual bool files( std::vector<FilePtr>& res ) = 0;
23 24
};

25 26 27 28 29 30
class MediaLibraryFactory
{
    public:
        static IMediaLibrary* create();
};

31
#endif // IMEDIALIBRARY_H