Commit 7567bb62 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Split public API includes in their own directory

parent ff7d830a
/*****************************************************************************
* Media Library
*****************************************************************************
* Copyright (C) 2015 Hugo Beauzée-Luyssen, Videolabs
* Copyright (C) 2016 Hugo Beauzée-Luyssen, Videolabs
*
* Authors: Hugo Beauzée-Luyssen<hugo@beauzee.fr>
*
......@@ -22,59 +22,7 @@
#pragma once
#include <memory>
namespace medialibrary
{
class IAlbum;
class IAlbumTrack;
class IAudioTrack;
class IFile;
class IGenre;
class IHistoryEntry;
class IMedia;
class ILabel;
class IMetadataService;
class IMovie;
class IShow;
class IShowEpisode;
class IVideoTrack;
class ILogger;
class IArtist;
class IPlaylist;
class IMediaLibraryCb;
using AlbumPtr = std::shared_ptr<IAlbum>;
using AlbumTrackPtr = std::shared_ptr<IAlbumTrack>;
using ArtistPtr = std::shared_ptr<IArtist>;
using AudioTrackPtr = std::shared_ptr<IAudioTrack>;
using FilePtr = std::shared_ptr<IFile>;
using GenrePtr = std::shared_ptr<IGenre>;
using HistoryPtr = std::shared_ptr<IHistoryEntry>;
using LabelPtr = std::shared_ptr<ILabel>;
using MediaPtr = std::shared_ptr<IMedia>;
using MoviePtr = std::shared_ptr<IMovie>;
using PlaylistPtr = std::shared_ptr<IPlaylist>;
using ShowEpisodePtr = std::shared_ptr<IShowEpisode>;
using ShowPtr = std::shared_ptr<IShow>;
using VideoTrackPtr = std::shared_ptr<IVideoTrack>;
enum class LogLevel
{
/// Verbose: Extra logs (currently used by to enable third parties logs
/// such as VLC)
Verbose,
Debug,
Info,
Warning,
Error,
};
}
class SqliteConnection;
class MediaLibrary;
typedef SqliteConnection* DBConnection;
using MediaLibraryPtr = const MediaLibrary*;
......@@ -27,7 +27,7 @@
#include "Types.h"
#include "filesystem/IDirectory.h"
#include "filesystem/IFile.h"
#include "IMediaLibrary.h"
#include "medialibrary/IMediaLibrary.h"
class IDiscoverer
{
......
......@@ -27,6 +27,17 @@
namespace medialibrary
{
enum class LogLevel
{
/// Verbose: Extra logs (currently used by to enable third parties logs
/// such as VLC)
Verbose,
Debug,
Info,
Warning,
Error,
};
class ILogger
{
public:
......
......@@ -26,6 +26,7 @@
#include <vector>
#include <string>
#include "medialibrary/ILogger.h"
#include "Types.h"
namespace medialibrary
......
/*****************************************************************************
* Media Library
*****************************************************************************
* Copyright (C) 2015 Hugo Beauzée-Luyssen, Videolabs
*
* Authors: Hugo Beauzée-Luyssen<hugo@beauzee.fr>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#pragma once
#include <memory>
namespace medialibrary
{
class IAlbum;
class IAlbumTrack;
class IAudioTrack;
class IFile;
class IGenre;
class IHistoryEntry;
class IMedia;
class ILabel;
class IMetadataService;
class IMovie;
class IShow;
class IShowEpisode;
class IVideoTrack;
class ILogger;
class IArtist;
class IPlaylist;
class IMediaLibraryCb;
using AlbumPtr = std::shared_ptr<IAlbum>;
using AlbumTrackPtr = std::shared_ptr<IAlbumTrack>;
using ArtistPtr = std::shared_ptr<IArtist>;
using AudioTrackPtr = std::shared_ptr<IAudioTrack>;
using FilePtr = std::shared_ptr<IFile>;
using GenrePtr = std::shared_ptr<IGenre>;
using HistoryPtr = std::shared_ptr<IHistoryEntry>;
using LabelPtr = std::shared_ptr<ILabel>;
using MediaPtr = std::shared_ptr<IMedia>;
using MoviePtr = std::shared_ptr<IMovie>;
using PlaylistPtr = std::shared_ptr<IPlaylist>;
using ShowEpisodePtr = std::shared_ptr<IShowEpisode>;
using ShowPtr = std::shared_ptr<IShow>;
using VideoTrackPtr = std::shared_ptr<IVideoTrack>;
}
......@@ -25,7 +25,7 @@
#include "Album.h"
#include "AlbumTrack.h"
#include "Artist.h"
#include "IGenre.h"
#include "medialibrary/IGenre.h"
#include "Media.h"
#include "database/SqliteTools.h"
......
......@@ -27,10 +27,10 @@
#include <sqlite3.h>
#include <mutex>
#include "IMediaLibrary.h"
#include "medialibrary/IMediaLibrary.h"
#include "database/DatabaseHelpers.h"
#include "IAlbum.h"
#include "medialibrary/IAlbum.h"
#include "utils/Cache.h"
class Album;
......
......@@ -27,8 +27,8 @@
#include <string>
#include <vector>
#include "IAlbumTrack.h"
#include "IMediaLibrary.h"
#include "medialibrary/IAlbumTrack.h"
#include "medialibrary/IMediaLibrary.h"
#include "database/DatabaseHelpers.h"
#include "utils/Cache.h"
......
......@@ -23,8 +23,8 @@
#pragma once
#include "database/DatabaseHelpers.h"
#include "IArtist.h"
#include "IMediaLibrary.h"
#include "medialibrary/IArtist.h"
#include "medialibrary/IMediaLibrary.h"
class Artist;
class Album;
......
......@@ -23,8 +23,8 @@
#ifndef AUDIOTRACK_H
#define AUDIOTRACK_H
#include "IAudioTrack.h"
#include "IMediaLibrary.h"
#include "medialibrary/IAudioTrack.h"
#include "medialibrary/IMediaLibrary.h"
#include "database/DatabaseHelpers.h"
class AudioTrack;
......
......@@ -18,23 +18,23 @@ elseif(WIN32)
endif()
list(APPEND HEADERS_LIST
${CMAKE_SOURCE_DIR}/include/IShow.h
${CMAKE_SOURCE_DIR}/include/IShowEpisode.h
${CMAKE_SOURCE_DIR}/include/IAlbum.h
${CMAKE_SOURCE_DIR}/include/IAlbumTrack.h
${CMAKE_SOURCE_DIR}/include/IMedia.h
${CMAKE_SOURCE_DIR}/include/IMediaLibrary.h
${CMAKE_SOURCE_DIR}/include/ILabel.h
${CMAKE_SOURCE_DIR}/include/IAudioTrack.h
${CMAKE_SOURCE_DIR}/include/IVideoTrack.h
${CMAKE_SOURCE_DIR}/include/IMovie.h
${CMAKE_SOURCE_DIR}/include/IDiscoverer.h
${CMAKE_SOURCE_DIR}/include/medialibrary/IShow.h
${CMAKE_SOURCE_DIR}/include/medialibrary/IShowEpisode.h
${CMAKE_SOURCE_DIR}/include/medialibrary/IAlbum.h
${CMAKE_SOURCE_DIR}/include/medialibrary/IAlbumTrack.h
${CMAKE_SOURCE_DIR}/include/medialibrary/IMedia.h
${CMAKE_SOURCE_DIR}/include/medialibrary/IMediaLibrary.h
${CMAKE_SOURCE_DIR}/include/medialibrary/ILabel.h
${CMAKE_SOURCE_DIR}/include/medialibrary/IAudioTrack.h
${CMAKE_SOURCE_DIR}/include/medialibrary/IVideoTrack.h
${CMAKE_SOURCE_DIR}/include/medialibrary/IMovie.h
${CMAKE_SOURCE_DIR}/include/medialibrary/ILogger.h
${CMAKE_SOURCE_DIR}/include/medialibrary/IArtist.h
${CMAKE_SOURCE_DIR}/include/medialibrary/IPlaylist.h
${CMAKE_SOURCE_DIR}/include/discoverer/IDiscoverer.h
${CMAKE_SOURCE_DIR}/include/filesystem/IDirectory.h
${CMAKE_SOURCE_DIR}/include/filesystem/IFile.h
${CMAKE_SOURCE_DIR}/include/factory/IFileSystem.h
${CMAKE_SOURCE_DIR}/include/ILogger.h
${CMAKE_SOURCE_DIR}/include/IArtist.h
${CMAKE_SOURCE_DIR}/include/IPlaylist.h
database/SqliteTools.h
......
......@@ -22,7 +22,7 @@
#pragma once
#include "IFile.h"
#include "medialibrary/IFile.h"
#include "database/DatabaseHelpers.h"
#include "database/SqliteConnection.h"
#include "filesystem/IFile.h"
......
......@@ -22,7 +22,7 @@
#pragma once
#include "IGenre.h"
#include "medialibrary/IGenre.h"
#include "database/DatabaseHelpers.h"
......
......@@ -24,7 +24,7 @@
#include "Types.h"
#include "database/DatabaseHelpers.h"
#include "IHistoryEntry.h"
#include "medialibrary/IHistoryEntry.h"
#include <vector>
#include <string>
......
......@@ -29,7 +29,7 @@
class Media;
class Label;
#include "ILabel.h"
#include "medialibrary/ILabel.h"
#include "database/DatabaseHelpers.h"
namespace policy
......
......@@ -26,7 +26,7 @@
#include <sqlite3.h>
#include "IMedia.h"
#include "medialibrary/IMedia.h"
#include "factory/IFileSystem.h"
#include "File.h"
#include "database/DatabaseHelpers.h"
......
......@@ -58,9 +58,6 @@
#include "metadata_services/vlc/VLCThumbnailer.h"
#include "metadata_services/MetadataParser.h"
#include "filesystem/IDirectory.h"
#include "filesystem/IFile.h"
#include "filesystem/IDevice.h"
#include "factory/FileSystem.h"
const std::vector<std::string> MediaLibrary::supportedVideoExtensions {
......
......@@ -29,8 +29,7 @@ class Parser;
class ParserService;
class SqliteConnection;
#include "IMediaLibrary.h"
#include "IDiscoverer.h"
#include "medialibrary/IMediaLibrary.h"
#include "logging/Logger.h"
#include "Settings.h"
......@@ -47,6 +46,11 @@ namespace factory
{
class IFileSystem;
}
namespace fs
{
class IFile;
class IDirectory;
}
using namespace medialibrary;
......
......@@ -23,7 +23,7 @@
#ifndef MOVIE_H
#define MOVIE_H
#include "IMovie.h"
#include "medialibrary/IMovie.h"
#include <sqlite3.h>
#include "database/DatabaseHelpers.h"
......
......@@ -22,7 +22,7 @@
#pragma once
#include "IPlaylist.h"
#include "medialibrary/IPlaylist.h"
#include "database/SqliteTools.h"
#include "database/DatabaseHelpers.h"
......
......@@ -24,12 +24,13 @@
#define SETTINGS_H
#include "Types.h"
#include <cstdint>
class Settings
{
public:
Settings();
bool load(DBConnection dbConn);
bool load( DBConnection dbConn );
uint32_t dbModelVersion() const;
bool save();
void setDbModelVersion( uint32_t dbModelVersion );
......
......@@ -26,8 +26,8 @@
#include <sqlite3.h>
#include "database/DatabaseHelpers.h"
#include "IMediaLibrary.h"
#include "IShow.h"
#include "medialibrary/IMediaLibrary.h"
#include "medialibrary/IShow.h"
class Media;
class Show;
......
......@@ -29,8 +29,8 @@ class ShowEpisode;
#include <string>
#include <sqlite3.h>
#include "IMediaLibrary.h"
#include "IShowEpisode.h"
#include "medialibrary/IMediaLibrary.h"
#include "medialibrary/IShowEpisode.h"
#include "database/DatabaseHelpers.h"
namespace policy
......
......@@ -24,7 +24,7 @@
#define VIDEOTRACK_H
#include "database/DatabaseHelpers.h"
#include "IVideoTrack.h"
#include "medialibrary/IVideoTrack.h"
#include <sqlite3.h>
......
......@@ -27,7 +27,6 @@
#include <unordered_map>
#include <vector>
#include "Types.h"
#include "SqliteTools.h"
template <typename IMPL, typename TABLEPOLICY>
......
......@@ -32,7 +32,6 @@
#include <unordered_map>
#include <vector>
#include "Types.h"
#include "database/SqliteConnection.h"
#include "database/SqliteErrors.h"
#include "database/SqliteTraits.h"
......
......@@ -22,8 +22,8 @@
#pragma once
#include "Types.h"
#include "SqliteConnection.h"
#include "Types.h"
namespace sqlite
{
......
......@@ -31,7 +31,7 @@
#include <thread>
#include <vector>
#include "IDiscoverer.h"
#include "discoverer/IDiscoverer.h"
class DiscovererWorker : public IDiscoverer
{
......
......@@ -25,7 +25,7 @@
#include <memory>
#include "IDiscoverer.h"
#include "discoverer/IDiscoverer.h"
#include "factory/IFileSystem.h"
class MediaLibrary;
......
......@@ -22,7 +22,7 @@
#pragma once
#include "ILogger.h"
#include "medialibrary/ILogger.h"
#include <iostream>
class IostreamLogger : public medialibrary::ILogger
......
......@@ -26,8 +26,8 @@
#include <memory>
#include <sstream>
#include "ILogger.h"
#include "Types.h"
#include "medialibrary/ILogger.h"
#include "medialibrary/Types.h"
class Log
{
......
......@@ -24,7 +24,7 @@
#include <algorithm>
#include "IMediaLibrary.h"
#include "medialibrary/IMediaLibrary.h"
#include "Media.h"
#include "File.h"
#include "utils/ModificationsNotifier.h"
......
......@@ -29,10 +29,11 @@
#include <queue>
#include "Task.h"
#include "Types.h"
#include "medialibrary/Types.h"
class IParserCb;
class ModificationNotifier;
class MediaLibrary;
class ParserService
{
......
......@@ -30,6 +30,7 @@
#include <vector>
#include <chrono>
#include "medialibrary/Types.h"
#include "Types.h"
using namespace medialibrary;
......
......@@ -24,6 +24,7 @@
#include "MediaLibrary.h"
#include "Folder.h"
#include "filesystem/IDirectory.h"
class Playlist;
class AlbumTrack;
......
......@@ -25,7 +25,7 @@
#include <atomic>
#include <condition_variable>
#include "IMediaLibrary.h"
#include "medialibrary/IMediaLibrary.h"
#include "mocks/NoopCallback.h"
namespace mock
......
......@@ -22,7 +22,7 @@
#pragma once
#include "IMediaLibrary.h"
#include "medialibrary/IMediaLibrary.h"
using namespace medialibrary;
......
......@@ -29,13 +29,13 @@
#include <rapidjson/document.h>
#include "common/MediaLibraryTester.h"
#include "IAlbum.h"
#include "IArtist.h"
#include "IMedia.h"
#include "IAlbumTrack.h"
#include "IAudioTrack.h"
#include "IVideoTrack.h"
#include "IGenre.h"
#include "medialibrary/IAlbum.h"
#include "medialibrary/IArtist.h"
#include "medialibrary/IMedia.h"
#include "medialibrary/IAlbumTrack.h"
#include "medialibrary/IAudioTrack.h"
#include "medialibrary/IVideoTrack.h"
#include "medialibrary/IGenre.h"
#include "mocks/NoopCallback.h"
class MockCallback : public mock::NoopCallback
......
......@@ -27,7 +27,7 @@
#include "Artist.h"
#include "Genre.h"
#include "Media.h"
#include "IMediaLibrary.h"
#include "medialibrary/IMediaLibrary.h"
class Albums : public Tests
{
......
......@@ -25,7 +25,7 @@
#include "Media.h"
#include "File.h"
#include "Folder.h"
#include "IMediaLibrary.h"
#include "medialibrary/IMediaLibrary.h"
#include "utils/Filename.h"
#include "mocks/FileSystem.h"
#include "mocks/DiscovererCbMock.h"
......
......@@ -22,7 +22,7 @@
#include "Tests.h"
#include "IHistoryEntry.h"
#include "medialibrary/IHistoryEntry.h"
#include "History.h"
#include "Media.h"
......
......@@ -22,9 +22,9 @@
#include "Tests.h"
#include "IMediaLibrary.h"
#include "medialibrary/IMediaLibrary.h"
#include "Media.h"
#include "ILabel.h"
#include "medialibrary/ILabel.h"
class Labels : public Tests
{
......
......@@ -22,7 +22,7 @@
#include "Tests.h"
#include "IMediaLibrary.h"
#include "medialibrary/IMediaLibrary.h"
#include "File.h"
#include "Media.h"
#include "Artist.h"
......
......@@ -25,6 +25,7 @@
#include "factory/IFileSystem.h"
#include "mocks/NoopCallback.h"
#include "common/MediaLibraryTester.h"
#include "filesystem/IDirectory.h"
class Tests : public testing::Test
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment