[niepce] library: import_from_directory() -> import_files()



commit 93c1117e41eae0ce86a085c3560939686464bfc9
Author: Hubert Figuière <hub figuiere net>
Date:   Fri Oct 12 20:56:16 2018 -0400

    library: import_from_directory() -> import_files()

 src/libraryclient/clientimpl.rs      | 2 +-
 src/libraryclient/clientinterface.rs | 3 ++-
 src/libraryclient/libraryclient.rs   | 6 +++---
 3 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/libraryclient/clientimpl.rs b/src/libraryclient/clientimpl.rs
index 2fc7eb1..7e6a680 100644
--- a/src/libraryclient/clientimpl.rs
+++ b/src/libraryclient/clientimpl.rs
@@ -228,7 +228,7 @@ impl ClientInterface for ClientImpl {
     /// Import files from a directory
     /// @param dir the directory
     /// @param manage true if imports have to be managed
-    fn import_from_directory(&mut self, dir: String, files: Vec<String>, manage: Managed) {
+    fn import_files(&mut self, dir: String, files: Vec<String>, manage: Managed) {
         self.schedule_op(move |lib| {
             commands::cmd_import_files(&lib, &dir, &files, manage)
         });
diff --git a/src/libraryclient/clientinterface.rs b/src/libraryclient/clientinterface.rs
index 16b8f0e..7e3e8e4 100644
--- a/src/libraryclient/clientinterface.rs
+++ b/src/libraryclient/clientinterface.rs
@@ -60,8 +60,9 @@ pub trait ClientInterface {
     fn import_file(&mut self, path: String, manage: Managed);
     /// Import files from a directory
     /// @param dir the directory
+    /// @param files the files to import
     /// @param manage true if imports have to be managed
-    fn import_from_directory(&mut self, dir: String, files: Vec<String>, manage: Managed);
+    fn import_files(&mut self, dir: String, files: Vec<String>, manage: Managed);
 }
 
 /// Sync client interface
diff --git a/src/libraryclient/libraryclient.rs b/src/libraryclient/libraryclient.rs
index 369593c..36c98e4 100644
--- a/src/libraryclient/libraryclient.rs
+++ b/src/libraryclient/libraryclient.rs
@@ -149,8 +149,8 @@ impl ClientInterface for LibraryClient {
     /// Import files from a directory
     /// @param dir the directory
     /// @param manage true if imports have to be managed
-    fn import_from_directory(&mut self, dir: String, files: Vec<String>, manage: Managed) {
-        self.pimpl.import_from_directory(dir, files, manage);
+    fn import_files(&mut self, dir: String, files: Vec<String>, manage: Managed) {
+        self.pimpl.import_files(dir, files, manage);
     }
 
 }
@@ -334,5 +334,5 @@ pub extern "C" fn libraryclient_import_files(client: &mut LibraryClientWrapper,
             files.push(String::from(cstr));
         }
     }
-    client.unwrap_mut().import_from_directory(String::from(folder), files, manage);
+    client.unwrap_mut().import_files(String::from(folder), files, manage);
 }


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