[niepce] engine: remove mimetype_to_filetype() from C++
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] engine: remove mimetype_to_filetype() from C++
- Date: Wed, 1 Jan 2020 18:00:43 +0000 (UTC)
commit fae388d5c50e46504c5408cf414d399428d4df86
Author: Hubert Figuière <hub figuiere net>
Date: Wed Jan 1 12:25:51 2020 -0500
engine: remove mimetype_to_filetype() from C++
src/engine/db/libfile.cpp | 18 ------------------
src/engine/db/libfile.hpp | 8 --------
2 files changed, 26 deletions(-)
---
diff --git a/src/engine/db/libfile.cpp b/src/engine/db/libfile.cpp
index 0fe9973..a4425d9 100644
--- a/src/engine/db/libfile.cpp
+++ b/src/engine/db/libfile.cpp
@@ -26,24 +26,6 @@ LibFilePtr libfile_wrap(eng::LibFile *lf)
return LibFilePtr(lf, &ffi::engine_db_libfile_delete);
}
-/**
- * Converts a mimetype, which is expensive to calculate, into a FileType.
- * @param mime The mimetype we want to know as a filetype
- * @return the filetype
- * @todo: add the JPEG+RAW file types.
- */
-FileType mimetype_to_filetype(fwk::MimeType mime)
-{
- if (mime.isDigicamRaw()) {
- return FileType::RAW;
- } else if (mime.isImage()) {
- return FileType::IMAGE;
- } else if (mime.isMovie()) {
- return FileType::VIDEO;
- } else {
- return FileType::UNKNOWN;
- }
-}
}
/*
Local Variables:
diff --git a/src/engine/db/libfile.hpp b/src/engine/db/libfile.hpp
index 30d8928..2ce291f 100644
--- a/src/engine/db/libfile.hpp
+++ b/src/engine/db/libfile.hpp
@@ -22,18 +22,10 @@
#include <list>
#include <memory>
-#if !RUST_BINDGEN
-#include "fwk/toolkit/mimetype.hpp"
-#endif
-
#include "rust_bindings.hpp"
namespace eng {
-#if !RUST_BINDGEN
-ffi::FileType mimetype_to_filetype(fwk::MimeType mime);
-#endif
-
#if RUST_BINDGEN
class LibFile;
typedef int64_t library_id_t;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]