mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-07-02 14:04:22 +00:00
Move mediatypes.hpp/cpp to machinery.
This was needed so that machinery wouldn't depend on common. Also moved compatibility.h to helpers include dir. Ideally mediatypes.hpp will be merged into mediatype.hpp, or there will be some kind of renaming because the two names are getting really confusing.
This commit is contained in:
parent
6ddf79fad9
commit
1956594c01
19 changed files with 48 additions and 53 deletions
|
@ -18,9 +18,9 @@
|
|||
#ifndef id17F1582F16C8478E8D9795BECBF275A3
|
||||
#define id17F1582F16C8478E8D9795BECBF275A3
|
||||
|
||||
#include "dindexer-common/mediatypes.hpp"
|
||||
#include "dindexer-machinery/mediatypes.hpp"
|
||||
#include "dindexer-machinery/recorddata.hpp"
|
||||
#include "dindexer-common/compatibility.h"
|
||||
#include "helpers/compatibility.h"
|
||||
#include <vector>
|
||||
|
||||
namespace mchlib {
|
||||
|
@ -36,8 +36,8 @@ namespace mchlib {
|
|||
|
||||
template <bool> class SetListingView;
|
||||
|
||||
ContentTypes guess_content_type ( dinlib::MediaTypes parMediaType, const SetListingView<true>& parContent, std::size_t parEntriesCount=0 );
|
||||
ContentTypes guess_content_type ( dinlib::MediaTypes parMediaType, const std::vector<FileRecordData>& parContent );
|
||||
ContentTypes guess_content_type ( MediaTypes parMediaType, const SetListingView<true>& parContent, std::size_t parEntriesCount=0 );
|
||||
ContentTypes guess_content_type ( MediaTypes parMediaType, const std::vector<FileRecordData>& parContent );
|
||||
|
||||
char content_type_to_char ( ContentTypes parCType ) a_pure;
|
||||
ContentTypes char_to_content_type ( char parCType ) a_pure;
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include "dindexer-common/mediatypes.hpp"
|
||||
#include "dindexer-machinery/mediatypes.hpp"
|
||||
|
||||
namespace mchlib {
|
||||
#if defined(WITH_MEDIA_AUTODETECT)
|
||||
dinlib::MediaTypes guess_media_type ( std::string&& parPath );
|
||||
MediaTypes guess_media_type ( std::string&& parPath );
|
||||
|
||||
class UnknownMediaTypeException : std::runtime_error {
|
||||
public:
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
#ifndef id700AFD0F33634ACC88079BB8853A9E13
|
||||
#define id700AFD0F33634ACC88079BB8853A9E13
|
||||
|
||||
#include "dindexer-common/compatibility.h"
|
||||
#include "helpers/compatibility.h"
|
||||
#include <string>
|
||||
|
||||
namespace dinlib {
|
||||
namespace mchlib {
|
||||
enum MediaTypes {
|
||||
MediaType_CDRom = 'C',
|
||||
MediaType_Directory = 'D',
|
||||
|
@ -35,6 +35,6 @@ namespace dinlib {
|
|||
|
||||
const std::string& media_type_to_str ( MediaTypes parType );
|
||||
MediaTypes char_to_media_type ( char parMType ) a_pure;
|
||||
} //namespace dinlib
|
||||
} //namespace mchlib
|
||||
|
||||
#endif
|
|
@ -19,21 +19,21 @@
|
|||
#define id25B0BCA6D9464754920E1BC7C5D9DB57
|
||||
|
||||
#include "dindexer-machinery/scantask/base.hpp"
|
||||
#include "dindexer-common/mediatypes.hpp"
|
||||
#include "dindexer-machinery/mediatypes.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace mchlib {
|
||||
namespace scantask {
|
||||
class MediaType : Base<dinlib::MediaTypes> {
|
||||
class MediaType : Base<MediaTypes> {
|
||||
public:
|
||||
MediaType ( char parDefault, bool parForce, std::string parSearchPath );
|
||||
virtual ~MediaType ( void ) noexcept = default;
|
||||
|
||||
private:
|
||||
virtual void on_data_destroy ( dinlib::MediaTypes& parData );
|
||||
virtual void on_data_create ( dinlib::MediaTypes& parData );
|
||||
virtual void on_data_destroy ( MediaTypes& parData );
|
||||
virtual void on_data_create ( MediaTypes& parData );
|
||||
|
||||
dinlib::MediaTypes m_default;
|
||||
MediaTypes m_default;
|
||||
#if defined(WITH_MEDIA_AUTODETECT)
|
||||
std::string m_search_path;
|
||||
bool m_force;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue