[niepce/lr-import: 14/20] rust: remove unused C bindings
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce/lr-import: 14/20] rust: remove unused C bindings
- Date: Mon, 20 Dec 2021 05:37:15 +0000 (UTC)
commit a964ac4ca7f7dadfbfbe46edb399383c58a6ec7a
Author: Hubert Figuière <hub figuiere net>
Date: Fri Dec 10 22:04:48 2021 -0500
rust: remove unused C bindings
- engine_db_keyword_delete()
- engine_library_notification_delete()
- metadatachange_*()
crates/npc-engine/src/db/keyword.rs | 7 -------
crates/npc-engine/src/library/notification.rs | 25 -------------------------
2 files changed, 32 deletions(-)
---
diff --git a/crates/npc-engine/src/db/keyword.rs b/crates/npc-engine/src/db/keyword.rs
index af84df0..f86156f 100644
--- a/crates/npc-engine/src/db/keyword.rs
+++ b/crates/npc-engine/src/db/keyword.rs
@@ -86,10 +86,3 @@ pub extern "C" fn engine_db_keyword_keyword(obj: &Keyword) -> *mut c_char {
let cstr = CString::new(obj.keyword()).unwrap();
cstr.into_raw()
}
-
-/// # Safety
-/// Dereference raw pointer.
-#[no_mangle]
-pub unsafe extern "C" fn engine_db_keyword_delete(kw: *mut Keyword) {
- Box::from_raw(kw);
-}
diff --git a/crates/npc-engine/src/library/notification.rs b/crates/npc-engine/src/library/notification.rs
index 2af98ae..c19dca7 100644
--- a/crates/npc-engine/src/library/notification.rs
+++ b/crates/npc-engine/src/library/notification.rs
@@ -20,7 +20,6 @@
use super::queriedcontent::QueriedContent;
use crate::db::libfile::FileStatus;
use crate::db::{Album, Keyword, Label, LibFolder, LibMetadata, LibraryId, NiepceProperties};
-use npc_fwk::base::PropertyIndex;
use npc_fwk::toolkit;
use npc_fwk::toolkit::thumbnail;
use npc_fwk::toolkit::PortableChannel;
@@ -104,21 +103,6 @@ pub struct Thumbnail {
pub pix: thumbnail::Thumbnail,
}
-#[no_mangle]
-pub extern "C" fn metadatachange_get_id(meta: &MetadataChange) -> LibraryId {
- meta.id
-}
-
-#[no_mangle]
-pub extern "C" fn metadatachange_get_meta(meta: &MetadataChange) -> PropertyIndex {
- meta.meta.into()
-}
-
-#[no_mangle]
-pub extern "C" fn metadatachange_get_value(meta: &MetadataChange) -> *const PropertyValue {
- &meta.value
-}
-
#[derive(Clone)]
pub enum LibNotification {
AddedFile,
@@ -166,15 +150,6 @@ pub extern "C" fn engine_library_notify_filestatus_changed(
true
}
-/// Delete the Notification object.
-///
-/// # Safety
-/// Use raw pointer.
-#[no_mangle]
-pub unsafe extern "C" fn engine_library_notification_delete(n: *mut LibNotification) {
- Box::from_raw(n);
-}
-
#[no_mangle]
pub unsafe extern "C" fn engine_library_notification_type(
n: *const LibNotification,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]