[niepce] engine+rust: remove librarytypes.hpp



commit 222d3108af3679efee44615fdd269640886cf66f
Author: Hubert Figuière <hub figuiere net>
Date:   Thu Sep 28 23:57:49 2017 -0400

    engine+rust: remove librarytypes.hpp

 src/engine/Makefile.am                       |    1 -
 src/engine/db/keyword.hpp                    |    2 -
 src/engine/db/label.hpp                      |    2 -
 src/engine/db/libfile.hpp                    |    6 +---
 src/engine/db/libfolder.hpp                  |    2 -
 src/engine/db/libmetadata.hpp                |    1 -
 src/engine/db/librarytypes.hpp               |   33 --------------------------
 src/engine/library/clienttypes.hpp           |   13 ++--------
 src/engine/library/notification.hpp          |    2 -
 src/engine/library/op.cpp                    |    2 -
 src/engine/library/op.hpp                    |   11 +++-----
 src/engine/library/thumbnailnotification.hpp |    8 ++----
 src/libraryclient/libraryclient.hpp          |    1 -
 src/niepce/ui/metadatapanecontroller.hpp     |    1 -
 src/niepce/ui/selectioncontroller.hpp        |    1 -
 src/niepce/ui/workspacecontroller.cpp        |    1 -
 src/rust_bindings.hpp                        |    1 +
 17 files changed, 13 insertions(+), 75 deletions(-)
---
diff --git a/src/engine/Makefile.am b/src/engine/Makefile.am
index ce2905e..2b56a7b 100644
--- a/src/engine/Makefile.am
+++ b/src/engine/Makefile.am
@@ -32,7 +32,6 @@ noinst_LIBRARIES = libniepceengine.a libniepceengineglue.a
 
 libniepceengine_a_SOURCES = \
        db/library.hpp db/library.cpp \
-       db/librarytypes.hpp \
        db/libfile.hpp db/libfile.cpp \
        db/libfolder.hpp db/libfolder.cpp \
        db/label.hpp db/label.cpp \
diff --git a/src/engine/db/keyword.hpp b/src/engine/db/keyword.hpp
index 2a57f81..b49e2bc 100644
--- a/src/engine/db/keyword.hpp
+++ b/src/engine/db/keyword.hpp
@@ -23,8 +23,6 @@
 #include <vector>
 #include <memory>
 
-#include "engine/db/librarytypes.hpp"
-
 #include "rust_bindings.hpp"
 
 // just a rust interface.
diff --git a/src/engine/db/label.hpp b/src/engine/db/label.hpp
index fe91595..f699a0a 100644
--- a/src/engine/db/label.hpp
+++ b/src/engine/db/label.hpp
@@ -23,8 +23,6 @@
 #include <string>
 #include <vector>
 
-#include "engine/db/librarytypes.hpp"
-
 #include "rust_bindings.hpp"
 
 namespace eng {
diff --git a/src/engine/db/libfile.hpp b/src/engine/db/libfile.hpp
index 33900f3..1df88d0 100644
--- a/src/engine/db/libfile.hpp
+++ b/src/engine/db/libfile.hpp
@@ -21,15 +21,12 @@
 
 #include <list>
 #include <memory>
-#include <string>
 
 #if !RUST_BINDGEN
 #include "fwk/toolkit/mimetype.hpp"
 #endif
 
-#include "engine/db/keyword.hpp"
-#include "engine/db/librarytypes.hpp"
-#include "fwk/base/propertybag.hpp"
+#include "rust_bindings.hpp"
 
 namespace eng {
 
@@ -39,6 +36,7 @@ ffi::FileType mimetype_to_filetype(fwk::MimeType mime);
 
 #if RUST_BINDGEN
 class LibFile;
+typedef int64_t library_id_t;
 #endif
 typedef std::shared_ptr<LibFile> LibFilePtr;
 typedef std::weak_ptr<LibFile> LibFileWeakPtr;
diff --git a/src/engine/db/libfolder.hpp b/src/engine/db/libfolder.hpp
index 5d24a66..9d48b49 100644
--- a/src/engine/db/libfolder.hpp
+++ b/src/engine/db/libfolder.hpp
@@ -23,8 +23,6 @@
 #include <memory>
 #include <string>
 
-#include "engine/db/librarytypes.hpp"
-
 #include "rust_bindings.hpp"
 
 namespace eng {
diff --git a/src/engine/db/libmetadata.hpp b/src/engine/db/libmetadata.hpp
index e800c56..d32160c 100644
--- a/src/engine/db/libmetadata.hpp
+++ b/src/engine/db/libmetadata.hpp
@@ -23,7 +23,6 @@
 #include <string>
 #include <vector>
 
-#include "engine/db/librarytypes.hpp"
 #include "engine/db/metadata.hpp"
 #include "fwk/base/propertybag.hpp"
 
diff --git a/src/engine/library/clienttypes.hpp b/src/engine/library/clienttypes.hpp
index 5f45375..7a0e0e2 100644
--- a/src/engine/library/clienttypes.hpp
+++ b/src/engine/library/clienttypes.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - library/clienttypes.h
  *
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2017 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,17 +17,10 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _LIBRARY_CLIENTTYPES_H_
-#define _LIBRARY_CLIENTTYPES_H_
-
-#include "fwk/base/propertybag.hpp"
-#include "engine/db/librarytypes.hpp"
+#pragma once
 
 namespace eng {
 
-  typedef int tid_t; /**< transaction ID */
+typedef int32_t tid_t; /**< transaction ID */
 
 }
-
-
-#endif
diff --git a/src/engine/library/notification.hpp b/src/engine/library/notification.hpp
index ef1adec..698e938 100644
--- a/src/engine/library/notification.hpp
+++ b/src/engine/library/notification.hpp
@@ -23,8 +23,6 @@
 #include <memory>
 
 #include "engine/db/libfile.hpp"
-#include "engine/db/librarytypes.hpp"
-#include "engine/library/clienttypes.hpp"
 
 #include "rust_bindings.hpp"
 
diff --git a/src/engine/library/op.cpp b/src/engine/library/op.cpp
index 578afe6..2a6326f 100644
--- a/src/engine/library/op.cpp
+++ b/src/engine/library/op.cpp
@@ -17,10 +17,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-
 #include "op.hpp"
 
-
 namespace eng {
 
 Op::Op(tid_t _id, const Function & func)
diff --git a/src/engine/library/op.hpp b/src/engine/library/op.hpp
index 5ff4d21..8176db3 100644
--- a/src/engine/library/op.hpp
+++ b/src/engine/library/op.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - engine/library/op.h
  *
- * Copyright (C) 2007-2013 Hubert Figuiere
+ * Copyright (C) 2007-2017 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,15 +17,15 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-
-#ifndef __NIEPCE_LIBRARY_OP_H__
-#define __NIEPCE_LIBRARY_OP_H__
+#pragma once
 
 #include <memory>
 #include <functional>
 
 #include "engine/library/clienttypes.hpp"
 
+#include "rust_bindings.hpp"
+
 namespace eng {
 
 /** a library operation */
@@ -50,9 +50,6 @@ private:
 };
 
 }
-
-
-#endif
 /*
   Local Variables:
   mode:c++
diff --git a/src/engine/library/thumbnailnotification.hpp b/src/engine/library/thumbnailnotification.hpp
index 8de0391..0877a9a 100644
--- a/src/engine/library/thumbnailnotification.hpp
+++ b/src/engine/library/thumbnailnotification.hpp
@@ -18,11 +18,11 @@
  */
 
 
-#ifndef _LIBRARY_THUMBNAILNOTIFICATION_H__
-#define _LIBRARY_THUMBNAILNOTIFICATION_H__
+#pragma once
 
 #include "fwk/toolkit/thumbnail.hpp"
-#include "engine/db/librarytypes.hpp"
+
+#include "rust_bindings.hpp"
 
 namespace eng {
 
@@ -35,5 +35,3 @@ struct ThumbnailNotification
 };
 
 }
-
-#endif
diff --git a/src/libraryclient/libraryclient.hpp b/src/libraryclient/libraryclient.hpp
index 86a9035..93d072e 100644
--- a/src/libraryclient/libraryclient.hpp
+++ b/src/libraryclient/libraryclient.hpp
@@ -27,7 +27,6 @@
 #include "fwk/base/util.hpp"
 #include "engine/library/clienttypes.hpp"
 #include "engine/library/thumbnailcache.hpp"
-#include "engine/db/librarytypes.hpp"
 
 namespace fwk {
 class Moniker;
diff --git a/src/niepce/ui/metadatapanecontroller.hpp b/src/niepce/ui/metadatapanecontroller.hpp
index 03d0e44..613b470 100644
--- a/src/niepce/ui/metadatapanecontroller.hpp
+++ b/src/niepce/ui/metadatapanecontroller.hpp
@@ -22,7 +22,6 @@
 
 #include <gtkmm/box.h>
 
-#include "engine/db/librarytypes.hpp"
 #include "engine/db/libmetadata.hpp"
 #include "fwk/base/propertybag.hpp"
 #include "fwk/utils/exempi.hpp"
diff --git a/src/niepce/ui/selectioncontroller.hpp b/src/niepce/ui/selectioncontroller.hpp
index c7db910..a2960f0 100644
--- a/src/niepce/ui/selectioncontroller.hpp
+++ b/src/niepce/ui/selectioncontroller.hpp
@@ -29,7 +29,6 @@
 
 #include "fwk/base/propertybag.hpp"
 #include "fwk/toolkit/controller.hpp"
-#include "engine/db/librarytypes.hpp"
 #include "ui/imageliststore.hpp"
 
 namespace Gtk {
diff --git a/src/niepce/ui/workspacecontroller.cpp b/src/niepce/ui/workspacecontroller.cpp
index 241c7b7..f0e9dad 100644
--- a/src/niepce/ui/workspacecontroller.cpp
+++ b/src/niepce/ui/workspacecontroller.cpp
@@ -26,7 +26,6 @@
 
 #include "fwk/base/debug.hpp"
 #include "niepce/notifications.hpp"
-#include "engine/db/librarytypes.hpp"
 #include "engine/library/notification.hpp"
 #include "libraryclient/libraryclient.hpp"
 #include "fwk/toolkit/application.hpp"
diff --git a/src/rust_bindings.hpp b/src/rust_bindings.hpp
index 929ed0a..e47d422 100644
--- a/src/rust_bindings.hpp
+++ b/src/rust_bindings.hpp
@@ -51,6 +51,7 @@ typedef ffi::RgbColour RgbColour;
 }
 
 namespace eng {
+typedef ffi::LibraryId library_id_t; // XXX change this to LibraryId
 typedef ffi::FileType FileType;
 typedef ffi::Library Library;
 typedef ffi::FileBundle FileBundle;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]