From 62263e0e619625f2c5dd0b4364b43bd4fefc8ccd Mon Sep 17 00:00:00 2001 From: Vika Date: Thu, 30 Jan 2025 08:49:22 +0300 Subject: libsecret: 0.6.0 (private fork) -> 0.7.0 (upstream) libsecret is now maintained again! No need for a private fork. --- libsecret/src/schema.rs | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 libsecret/src/schema.rs (limited to 'libsecret/src/schema.rs') diff --git a/libsecret/src/schema.rs b/libsecret/src/schema.rs deleted file mode 100644 index b3252e2..0000000 --- a/libsecret/src/schema.rs +++ /dev/null @@ -1,37 +0,0 @@ -use crate::{Schema, SchemaAttributeType, SchemaFlags}; -use glib::translate::*; -use std::collections::HashMap; - -impl Schema { - #[doc(alias = "secret_schema_new")] - #[doc(alias = "secret_schema_newv")] - pub fn new( - name: &str, - flags: SchemaFlags, - attribute_names_and_types: HashMap<&str, SchemaAttributeType>, - ) -> Self { - unsafe { - let hash_table = glib::ffi::g_hash_table_new_full( - Some(glib::ffi::g_str_hash), - Some(glib::ffi::g_str_equal), - Some(glib::ffi::g_free), - None, - ); - - for (name, type_) in attribute_names_and_types { - let key_ptr: *mut libc::c_char = name.to_glib_full(); - glib::ffi::g_hash_table_insert( - hash_table, - key_ptr as *mut _, - type_.into_glib() as *mut _, - ); - } - - from_glib_full(ffi::secret_schema_newv( - name.to_glib_none().0, - flags.into_glib(), - hash_table, - )) - } - } -} -- cgit 1.4.1