[niepce] rust: make fwk a crate
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] rust: make fwk a crate
- Date: Wed, 11 Dec 2019 01:18:22 +0000 (UTC)
commit f203e47a7aeab440deca6289ec4022d3f18bf0f9
Author: Hubert Figuière <hub figuiere net>
Date: Sun Oct 20 13:45:55 2019 -0400
rust: make fwk a crate
.gitignore | 1 +
Cargo.lock | 20 ++++++++++++++-
Cargo.toml | 3 ++-
build.rs | 1 +
crates/npc-fwk/Cargo.toml | 25 ++++++++++++++++++
crates/npc-fwk/build.rs | 30 ++++++++++++++++++++++
{src/fwk => crates/npc-fwk/src}/base/date.rs | 0
{src/fwk => crates/npc-fwk/src}/base/debug.rs | 0
{src/fwk => crates/npc-fwk/src}/base/fractions.rs | 0
{src/fwk => crates/npc-fwk/src}/base/mod.rs | 0
.../fwk => crates/npc-fwk/src}/base/propertybag.rs | 4 +--
.../npc-fwk/src}/base/propertyvalue.rs | 0
{src/fwk => crates/npc-fwk/src}/base/rgbcolour.rs | 0
src/fwk/mod.rs => crates/npc-fwk/src/lib.rs | 18 +++++++++++--
.../fwk => crates/npc-fwk/src}/toolkit/mimetype.rs | 0
{src/fwk => crates/npc-fwk/src}/toolkit/mod.rs | 0
{src/fwk => crates/npc-fwk/src}/utils/exempi.rs | 0
{src/fwk => crates/npc-fwk/src}/utils/exiv2.rs | 0
{src/fwk => crates/npc-fwk/src}/utils/files.rs | 2 +-
{src/fwk => crates/npc-fwk/src}/utils/mod.rs | 0
doc/code-organization.txt | 2 ++
src/Makefile.am | 30 ++++++++++++----------
src/engine/db/filebundle.rs | 6 ++---
src/engine/db/label.rs | 4 +--
src/engine/db/libfile.rs | 6 ++---
src/engine/db/libmetadata.rs | 4 +--
src/engine/db/library.rs | 16 ++++++------
src/engine/library/commands.rs | 2 +-
src/engine/library/notification.rs | 4 +--
src/lib.rs | 6 ++---
src/libraryclient/clientimpl.rs | 2 +-
src/libraryclient/clientinterface.rs | 4 +--
src/libraryclient/mod.rs | 2 +-
src/rust_bindings.hpp | 1 +
34 files changed, 144 insertions(+), 49 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8c21dcc..9b2ca39 100644
--- a/.gitignore
+++ b/.gitignore
@@ -110,3 +110,4 @@ po/quot.sed
po/remove-potcdate.s*
target/
**/*.rs.bk
+crates/npc-fwk/Cargo.lock
\ No newline at end of file
diff --git a/Cargo.lock b/Cargo.lock
index e7b4e4a..32f52ce 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -504,9 +504,9 @@ dependencies = [
"glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gtk 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gtk-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
"multimap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "npc-fwk 0.1.0",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rexiv2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rusqlite 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -521,6 +521,24 @@ dependencies = [
"memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "npc-fwk"
+version = "0.1.0"
+dependencies = [
+ "cbindgen 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "exempi 2.5.0 (git+https://github.com/hfiguiere/exempi-rs.git?rev=53cfc05)",
+ "gio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gio-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
+ "multimap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rexiv2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "try_opt 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "num-integer"
version = "0.1.41"
diff --git a/Cargo.toml b/Cargo.toml
index 55ef831..7c5f55f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,6 @@ gio-sys = "*"
gio = "^0.7.0"
gtk-sys = { version = "*", features = ["v3_16"] }
gtk = "^0.7.0"
-lazy_static = "^1.2.0"
libc = "0.2.39"
multimap = "0.4.0"
rexiv2 = "^0.7.0"
@@ -22,6 +21,8 @@ rusqlite = { version = "0.14.0", features = ["functions"] }
try_opt = "0.1.1"
#gphoto = "0.1.1"
+npc-fwk = { path = "crates/npc-fwk" }
+
[build-dependencies]
bindgen = "0.37.0"
cbindgen = { version = "0.8.3" }
diff --git a/build.rs b/build.rs
index c7d578b..fc801bb 100644
--- a/build.rs
+++ b/build.rs
@@ -71,6 +71,7 @@ fn main() {
.exclude_item("GtkWindow")
.exclude_item("GtkToolbar")
.exclude_item("GFileInfo")
+ .exclude_item("RgbColour")
.with_crate(&crate_dir);
if let Ok(bindings) = cbuilder.generate() {
diff --git a/crates/npc-fwk/Cargo.toml b/crates/npc-fwk/Cargo.toml
new file mode 100644
index 0000000..cb7719d
--- /dev/null
+++ b/crates/npc-fwk/Cargo.toml
@@ -0,0 +1,25 @@
+[package]
+name = "npc-fwk"
+version = "0.1.0"
+authors = ["Hubert Figuière <hub figuiere net>"]
+edition = "2018"
+build = "build.rs"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+chrono = "0.4.0"
+exempi = { version = "2.5.0", git = "https://github.com/hfiguiere/exempi-rs.git", rev="53cfc05" }
+gio-sys = "*"
+gio = "^0.7.0"
+glib-sys = "*"
+glib = { version = "^0.8.0", features = ["subclassing"] }
+lazy_static = "^1.2.0"
+libc = "0.2.39"
+multimap = "0.4.0"
+rexiv2 = "^0.7.0"
+try_opt = "0.1.1"
+
+
+[build-dependencies]
+cbindgen = { version = "0.8.3" }
diff --git a/crates/npc-fwk/build.rs b/crates/npc-fwk/build.rs
new file mode 100644
index 0000000..7254026
--- /dev/null
+++ b/crates/npc-fwk/build.rs
@@ -0,0 +1,30 @@
+extern crate cbindgen;
+
+use std::env;
+use std::path::PathBuf;
+
+fn main() {
+ if env::var("SKIP_CBINDINGS").is_err() {
+ // Use cbindgen to generate C bindings.
+ let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
+ let target_dir = env::var("CARGO_TARGET_DIR").unwrap_or(String::from("./target"));
+ let mut target_file = PathBuf::from(target_dir);
+ target_file.push("fwk_bindings.h");
+ let cbuilder = cbindgen::Builder::new()
+ .with_include_guard("niepce_fwk_rust_bindings_h")
+ .with_namespace("ffi")
+ .with_language(cbindgen::Language::Cxx)
+ .with_parse_deps(true)
+ .with_parse_exclude(&["exempi", "chrono", "multimap"])
+ .exclude_item("GtkWindow")
+ .exclude_item("GtkToolbar")
+ .exclude_item("GFileInfo")
+ .with_crate(&crate_dir);
+
+ if let Ok(bindings) = cbuilder.generate() {
+ bindings.write_to_file(&*target_file.to_string_lossy());
+ } else {
+ println!("Couldn't generate bindings");
+ }
+ }
+}
diff --git a/src/fwk/base/date.rs b/crates/npc-fwk/src/base/date.rs
similarity index 100%
rename from src/fwk/base/date.rs
rename to crates/npc-fwk/src/base/date.rs
diff --git a/src/fwk/base/debug.rs b/crates/npc-fwk/src/base/debug.rs
similarity index 100%
rename from src/fwk/base/debug.rs
rename to crates/npc-fwk/src/base/debug.rs
diff --git a/src/fwk/base/fractions.rs b/crates/npc-fwk/src/base/fractions.rs
similarity index 100%
rename from src/fwk/base/fractions.rs
rename to crates/npc-fwk/src/base/fractions.rs
diff --git a/src/fwk/base/mod.rs b/crates/npc-fwk/src/base/mod.rs
similarity index 100%
rename from src/fwk/base/mod.rs
rename to crates/npc-fwk/src/base/mod.rs
diff --git a/src/fwk/base/propertybag.rs b/crates/npc-fwk/src/base/propertybag.rs
similarity index 97%
rename from src/fwk/base/propertybag.rs
rename to crates/npc-fwk/src/base/propertybag.rs
index 8c47cec..99ed0ca 100644
--- a/src/fwk/base/propertybag.rs
+++ b/crates/npc-fwk/src/base/propertybag.rs
@@ -20,8 +20,8 @@
use std::collections::BTreeMap;
use std::ptr;
-use fwk::base::PropertyIndex;
-use fwk::base::propertyvalue::PropertyValue;
+use crate::base::PropertyIndex;
+use crate::base::propertyvalue::PropertyValue;
#[derive(Default)]
pub struct PropertyBag {
diff --git a/src/fwk/base/propertyvalue.rs b/crates/npc-fwk/src/base/propertyvalue.rs
similarity index 100%
rename from src/fwk/base/propertyvalue.rs
rename to crates/npc-fwk/src/base/propertyvalue.rs
diff --git a/src/fwk/base/rgbcolour.rs b/crates/npc-fwk/src/base/rgbcolour.rs
similarity index 100%
rename from src/fwk/base/rgbcolour.rs
rename to crates/npc-fwk/src/base/rgbcolour.rs
diff --git a/src/fwk/mod.rs b/crates/npc-fwk/src/lib.rs
similarity index 84%
rename from src/fwk/mod.rs
rename to crates/npc-fwk/src/lib.rs
index 0c8d2d5..31e69d2 100644
--- a/src/fwk/mod.rs
+++ b/crates/npc-fwk/src/lib.rs
@@ -1,7 +1,7 @@
/*
- * niepce - fwk/mod.rs
+ * niepce - fwk/lib.rs
*
- * Copyright (C) 2017 Hubert Figuière
+ * Copyright (C) 2017-2019 Hubert Figuière
*
* 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,6 +17,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+extern crate chrono;
+extern crate exempi;
+extern crate gio_sys;
+extern crate gio;
+extern crate glib_sys;
+extern crate glib;
+#[macro_use]
+extern crate lazy_static;
+extern crate libc;
+extern crate multimap;
+#[macro_use]
+extern crate try_opt;
+
#[macro_use]
pub mod base;
pub mod utils;
diff --git a/src/fwk/toolkit/mimetype.rs b/crates/npc-fwk/src/toolkit/mimetype.rs
similarity index 100%
rename from src/fwk/toolkit/mimetype.rs
rename to crates/npc-fwk/src/toolkit/mimetype.rs
diff --git a/src/fwk/toolkit/mod.rs b/crates/npc-fwk/src/toolkit/mod.rs
similarity index 100%
rename from src/fwk/toolkit/mod.rs
rename to crates/npc-fwk/src/toolkit/mod.rs
diff --git a/src/fwk/utils/exempi.rs b/crates/npc-fwk/src/utils/exempi.rs
similarity index 100%
rename from src/fwk/utils/exempi.rs
rename to crates/npc-fwk/src/utils/exempi.rs
diff --git a/src/fwk/utils/exiv2.rs b/crates/npc-fwk/src/utils/exiv2.rs
similarity index 100%
rename from src/fwk/utils/exiv2.rs
rename to crates/npc-fwk/src/utils/exiv2.rs
diff --git a/src/fwk/utils/files.rs b/crates/npc-fwk/src/utils/files.rs
similarity index 97%
rename from src/fwk/utils/files.rs
rename to crates/npc-fwk/src/utils/files.rs
index 9d4d01c..6f9b879 100644
--- a/src/fwk/utils/files.rs
+++ b/crates/npc-fwk/src/utils/files.rs
@@ -21,7 +21,7 @@ use glib::translate::*;
use gio;
use gio_sys;
-use fwk::toolkit::mimetype::{
+use crate::toolkit::mimetype::{
guess_type,
MType
};
diff --git a/src/fwk/utils/mod.rs b/crates/npc-fwk/src/utils/mod.rs
similarity index 100%
rename from src/fwk/utils/mod.rs
rename to crates/npc-fwk/src/utils/mod.rs
diff --git a/doc/code-organization.txt b/doc/code-organization.txt
index af4b2f7..f7f8fa6 100644
--- a/doc/code-organization.txt
+++ b/doc/code-organization.txt
@@ -3,6 +3,8 @@ Code organization
Here are the different directories for the source code:
+* crates - internal Rust crates.
+ * npc-fwk - the framework in Rust. Replaces src/fwk.
* src
* ext - external code
* libgdl - "stolen" from Inkscape, a fork of libgdl
diff --git a/src/Makefile.am b/src/Makefile.am
index 8949ab0..324b74d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,20 +23,22 @@ RUST_SOURCES = \
@top_srcdir@/src/engine/library/notification.rs \
@top_srcdir@/src/engine/library/op.rs \
@top_srcdir@/src/engine/mod.rs \
- @top_srcdir@/src/fwk/base/date.rs \
- @top_srcdir@/src/fwk/base/debug.rs \
- @top_srcdir@/src/fwk/base/fractions.rs \
- @top_srcdir@/src/fwk/base/mod.rs \
- @top_srcdir@/src/fwk/base/propertybag.rs \
- @top_srcdir@/src/fwk/base/propertyvalue.rs \
- @top_srcdir@/src/fwk/base/rgbcolour.rs \
- @top_srcdir@/src/fwk/mod.rs \
- @top_srcdir@/src/fwk/toolkit/mimetype.rs \
- @top_srcdir@/src/fwk/toolkit/mod.rs \
- @top_srcdir@/src/fwk/utils/exempi.rs \
- @top_srcdir@/src/fwk/utils/exiv2.rs \
- @top_srcdir@/src/fwk/utils/files.rs \
- @top_srcdir@/src/fwk/utils/mod.rs \
+ @top_srcdir@/crates/npc-fwk/Cargo.toml \
+ @top_srcdir@/crates/npc-fwk/build.rs \
+ @top_srcdir@/crates/npc-fwk/src/base/date.rs \
+ @top_srcdir@/crates/npc-fwk/src/base/debug.rs \
+ @top_srcdir@/crates/npc-fwk/src/base/fractions.rs \
+ @top_srcdir@/crates/npc-fwk/src/base/mod.rs \
+ @top_srcdir@/crates/npc-fwk/src/base/propertybag.rs \
+ @top_srcdir@/crates/npc-fwk/src/base/propertyvalue.rs \
+ @top_srcdir@/crates/npc-fwk/src/base/rgbcolour.rs \
+ @top_srcdir@/crates/npc-fwk/src/lib.rs \
+ @top_srcdir@/crates/npc-fwk/src/toolkit/mimetype.rs \
+ @top_srcdir@/crates/npc-fwk/src/toolkit/mod.rs \
+ @top_srcdir@/crates/npc-fwk/src/utils/exempi.rs \
+ @top_srcdir@/crates/npc-fwk/src/utils/exiv2.rs \
+ @top_srcdir@/crates/npc-fwk/src/utils/files.rs \
+ @top_srcdir@/crates/npc-fwk/src/utils/mod.rs \
@top_srcdir@/src/lib.rs \
@top_srcdir@/src/libraryclient/clientimpl.rs \
@top_srcdir@/src/libraryclient/clientinterface.rs \
diff --git a/src/engine/db/filebundle.rs b/src/engine/db/filebundle.rs
index 83486cd..cf02d38 100644
--- a/src/engine/db/filebundle.rs
+++ b/src/engine/db/filebundle.rs
@@ -1,7 +1,7 @@
/*
* niepce - engine/db/filebundle.rs
*
- * Copyright (C) 2017-2018 Hubert Figuière
+ * Copyright (C) 2017-2019 Hubert Figuière
*
* 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
@@ -21,8 +21,8 @@ use std::ffi::OsString;
use std::path::{Path, PathBuf};
use engine::db::libfile::FileType;
-use fwk::MimeType;
-use fwk::toolkit::mimetype::{IsRaw, MType};
+use npc_fwk::MimeType;
+use npc_fwk::toolkit::mimetype::{IsRaw, MType};
/// Sidecar.
#[derive(Debug, PartialEq)]
diff --git a/src/engine/db/label.rs b/src/engine/db/label.rs
index 22bf63a..4e4982a 100644
--- a/src/engine/db/label.rs
+++ b/src/engine/db/label.rs
@@ -1,7 +1,7 @@
/*
* niepce - engine/db/label.rs
*
- * Copyright (C) 2017-2018 Hubert Figuière
+ * Copyright (C) 2017-2019 Hubert Figuière
*
* 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
@@ -24,7 +24,7 @@ use rusqlite;
use super::LibraryId;
use super::FromDb;
-use fwk::base::rgbcolour::RgbColour;
+use npc_fwk::base::rgbcolour::RgbColour;
#[derive(Clone)]
pub struct Label {
diff --git a/src/engine/db/libfile.rs b/src/engine/db/libfile.rs
index 23586d8..b44b8fc 100644
--- a/src/engine/db/libfile.rs
+++ b/src/engine/db/libfile.rs
@@ -27,9 +27,9 @@ use rusqlite;
use super::FromDb;
use super::LibraryId;
use super::fsfile::FsFile;
-use fwk::base::PropertyIndex;
+use npc_fwk::base::PropertyIndex;
use root::eng::NiepceProperties as Np;
-use fwk;
+use npc_fwk;
#[repr(i32)]
#[allow(non_camel_case_types)]
@@ -234,7 +234,7 @@ impl FromDb for LibFile {
* @return the filetype
* @todo: add the JPEG+RAW file types.
*/
-pub fn mimetype_to_filetype(mime: &fwk::MimeType) -> FileType {
+pub fn mimetype_to_filetype(mime: &npc_fwk::MimeType) -> FileType {
if mime.is_digicam_raw() {
return FileType::RAW;
} else if mime.is_image() {
diff --git a/src/engine/db/libmetadata.rs b/src/engine/db/libmetadata.rs
index b6a090d..12c8a23 100644
--- a/src/engine/db/libmetadata.rs
+++ b/src/engine/db/libmetadata.rs
@@ -23,8 +23,8 @@ use rusqlite;
use chrono::Utc;
use exempi;
-use fwk::{xmp_date_from, PropertyBag, PropertySet, PropertyValue, XmpMeta};
-use fwk::utils::exempi::{NS_DC, NS_XAP};
+use npc_fwk::{xmp_date_from, PropertyBag, PropertySet, PropertyValue, XmpMeta};
+use npc_fwk::utils::exempi::{NS_DC, NS_XAP};
use super::{FromDb, LibraryId};
use root::eng::NiepceProperties as Np;
use engine::db::libfile::FileType;
diff --git a/src/engine/db/library.rs b/src/engine/db/library.rs
index 9467b33..849c45a 100644
--- a/src/engine/db/library.rs
+++ b/src/engine/db/library.rs
@@ -36,8 +36,8 @@ use engine::db::libfolder;
use engine::db::libfolder::LibFolder;
use engine::db::libmetadata::LibMetadata;
use engine::library::notification::LibNotification;
-use fwk;
-use fwk::PropertyValue;
+use npc_fwk;
+use npc_fwk::PropertyValue;
use root::eng::NiepceProperties as Np;
#[repr(i32)]
@@ -621,26 +621,26 @@ impl Library {
pub fn add_file(&self, folder_id: LibraryId, file: &str, bundle: Option<&FileBundle>, manage: Managed)
-> Result<LibraryId> {
dbg_assert!(manage == Managed::NO, "manage not supported");
dbg_assert!(folder_id != -1, "invalid folder ID");
- let mime = fwk::MimeType::new(file);
+ let mime = npc_fwk::MimeType::new(file);
let file_type = libfile::mimetype_to_filetype(&mime);
let label_id: LibraryId = 0;
let orientation: i32;
let rating: i32;
//let label: String; // XXX fixme
let flag: i32;
- let creation_date: fwk::Time;
+ let creation_date: npc_fwk::Time;
let xmp: String;
// Until we get better metadata support for RAW files, we use the Exif reconcile
// from the sidecar JPEG to get the initial metadata.
let meta = if let Some(bundle) = bundle {
if bundle.bundle_type() == libfile::FileType::RAW_JPEG {
- fwk::XmpMeta::new_from_file(bundle.jpeg(), false)
+ npc_fwk::XmpMeta::new_from_file(bundle.jpeg(), false)
} else {
- fwk::XmpMeta::new_from_file(file, false)
+ npc_fwk::XmpMeta::new_from_file(file, false)
}
} else {
- fwk::XmpMeta::new_from_file(file, false)
+ npc_fwk::XmpMeta::new_from_file(file, false)
};
if let Some(ref meta) = meta {
@@ -1042,7 +1042,7 @@ impl Library {
if p.exists() {
dbg_out!("{:?} already exist", p);
}
- let mut xmppacket = fwk::XmpMeta::new();
+ let mut xmppacket = npc_fwk::XmpMeta::new();
xmppacket.unserialize(&xmp_buffer);
if let Ok(mut f) = File::create(p.clone()) {
let sidecar = xmppacket.serialize();
diff --git a/src/engine/library/commands.rs b/src/engine/library/commands.rs
index 98bd3dd..78c9ec1 100644
--- a/src/engine/library/commands.rs
+++ b/src/engine/library/commands.rs
@@ -19,7 +19,7 @@
use std::os::raw::c_void;
-use fwk::PropertyValue;
+use npc_fwk::PropertyValue;
use engine::db::LibraryId;
use engine::db::library;
use engine::db::library::{
diff --git a/src/engine/library/notification.rs b/src/engine/library/notification.rs
index 4d1ffe5..8df6c26 100644
--- a/src/engine/library/notification.rs
+++ b/src/engine/library/notification.rs
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-use fwk::base::PropertyIndex;
-use fwk::PropertyValue;
+use npc_fwk::base::PropertyIndex;
+use npc_fwk::PropertyValue;
use engine::db::{
LibraryId,
Label, LibFolder, LibMetadata, Keyword
diff --git a/src/lib.rs b/src/lib.rs
index 322da35..a36bba9 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -26,8 +26,6 @@ extern crate glib;
extern crate glib_sys;
extern crate gtk;
extern crate gtk_sys;
-#[macro_use]
-extern crate lazy_static;
extern crate libc;
extern crate multimap;
extern crate rexiv2;
@@ -35,8 +33,10 @@ extern crate rusqlite;
#[macro_use]
extern crate try_opt;
+// internal crates
#[macro_use]
-pub mod fwk;
+extern crate npc_fwk;
+
pub mod capi;
pub mod engine;
pub mod libraryclient;
diff --git a/src/libraryclient/clientimpl.rs b/src/libraryclient/clientimpl.rs
index cc65eaf..1c5abdc 100644
--- a/src/libraryclient/clientimpl.rs
+++ b/src/libraryclient/clientimpl.rs
@@ -24,7 +24,7 @@ use std::sync::mpsc;
use std::sync::atomic;
use std::thread;
-use fwk::base::PropertyValue;
+use npc_fwk::base::PropertyValue;
use engine::db::{Library, LibraryId};
use engine::db::library::Managed;
use engine::library::op::Op;
diff --git a/src/libraryclient/clientinterface.rs b/src/libraryclient/clientinterface.rs
index e92b2fb..0b35bcb 100644
--- a/src/libraryclient/clientinterface.rs
+++ b/src/libraryclient/clientinterface.rs
@@ -1,7 +1,7 @@
/*
* niepce - libraryclient/clientinterface.rs
*
- * Copyright (C) 2017 Hubert Figuière
+ * Copyright (C) 2017-2019 Hubert Figuière
*
* 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,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-use fwk::base::PropertyValue;
+use npc_fwk::base::PropertyValue;
use engine::db::LibraryId;
use engine::db::library::Managed;
use root::eng::NiepceProperties as Np;
diff --git a/src/libraryclient/mod.rs b/src/libraryclient/mod.rs
index 9410727..4596ed5 100644
--- a/src/libraryclient/mod.rs
+++ b/src/libraryclient/mod.rs
@@ -27,7 +27,7 @@ use std::ffi::CStr;
use std::path::PathBuf;
use std::sync::Arc;
-use fwk::base::PropertyValue;
+use npc_fwk::base::PropertyValue;
use self::clientimpl::ClientImpl;
use engine::db::LibraryId;
use engine::db::library::Managed;
diff --git a/src/rust_bindings.hpp b/src/rust_bindings.hpp
index 8aaea37..4c42a73 100644
--- a/src/rust_bindings.hpp
+++ b/src/rust_bindings.hpp
@@ -44,6 +44,7 @@ typedef eng::NiepceProperties Np;
typedef fwk::FileList FileList;
}
+#include "target/fwk_bindings.h"
#include "target/bindings.h"
namespace fwk {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]