IMediaLibrary.h 1.03 KB
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;
10
class IMetadataService;
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
11 12

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

class IMediaLibrary
{
    public:
18 19
        virtual ~IMediaLibrary() {}
        virtual bool initialize( const std::string& dbPath ) = 0;
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
20 21
        virtual FilePtr addFile( const std::string& path ) = 0;
        virtual FilePtr file( const std::string& path ) = 0;
22 23
        virtual bool deleteFile( const std::string& mrl ) = 0;
        virtual bool deleteFile( FilePtr file ) = 0;
24
        virtual LabelPtr createLabel( const std::string& label ) = 0;
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
25 26
        virtual bool deleteLabel( const std::string& label ) = 0;
        virtual bool deleteLabel( LabelPtr label ) = 0;
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
27
        virtual bool files( std::vector<FilePtr>& res ) = 0;
28
        virtual void addMetadataService( IMetadataService* service ) = 0;
29 30
};

31 32 33 34 35 36
class MediaLibraryFactory
{
    public:
        static IMediaLibrary* create();
};

37
#endif // IMEDIALIBRARY_H