gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libfints] branch master updated: Functions to init/free ke


From: gnunet
Subject: [GNUnet-SVN] [libfints] branch master updated: Functions to init/free keys/genex-docs made static.
Date: Thu, 11 Oct 2018 15:02:40 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository libfints.

The following commit(s) were added to refs/heads/master by this push:
     new 828bc1c  Functions to init/free keys/genex-docs made static.
828bc1c is described below

commit 828bc1c8c40f76e1eddc47bf26833a343cc50916
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Oct 11 15:01:52 2018 +0200

    Functions to init/free keys/genex-docs made static.
---
 src/libebics.c | 44 ++++++++++++++++++++++++++++++++------------
 src/libebics.h | 36 ++++++++++++++----------------------
 2 files changed, 46 insertions(+), 34 deletions(-)

diff --git a/src/libebics.c b/src/libebics.c
index 210c88d..507257c 100644
--- a/src/libebics.c
+++ b/src/libebics.c
@@ -400,8 +400,18 @@ EBICS_init_keymaterial (struct EBICS_Key keyList[],
   }
 }
 
-int
-EBICS_free_keymaterial (struct EBICS_Key keyList[])
+
+/**
+ * "Free" imported keys.
+ *
+ * @param keyList list of imported keys.  Usually
+ *        a global object that lives along all the
+ *        library's life.
+ *
+ * @return EBICS_SUCCESS or EBICS_ERROR
+ */
+static int
+free_keymaterial (struct EBICS_Key keyList[])
 {
   LOG (EBICS_LOGLEVEL_DEBUG, "Freeing key material");
 
@@ -426,8 +436,8 @@ EBICS_free_keymaterial (struct EBICS_Key keyList[])
  *
  * @returns EBICS_SUCCESS on success, else EBICS_ERROR.
  */
-int
-EBICS_init_genex_documents
+static int
+init_genex_documents
   (struct EBICS_genex_document genexList[],
    const char *genex_schemas_dir,
    const char *genexFiles[])
@@ -472,8 +482,17 @@ EBICS_init_genex_documents
   }
 }
 
-int
-EBICS_free_genex_documents (struct EBICS_genex_document genexList[])
+
+/**
+ * Free the master base XML documents; usually maintained
+ * in a global object that gets NEVER destroyed throughout
+ * all the library's life.
+ *
+ * @param genexList list of documents to free.
+ * @return EBICS_SUCCESS or EBICS_ERROR.
+ */
+static int
+free_genex_documents (struct EBICS_genex_document genexList[])
 {
   LOG (EBICS_LOGLEVEL_DEBUG, "Freeing 'genex_documents'");
 
@@ -489,8 +508,6 @@ EBICS_free_genex_documents (struct EBICS_genex_document 
genexList[])
     xmlFreeDoc(genex->document);
   }
 }
-  
-
 
 /**
  * Initializes Libebics.  Init all the dependencies,
@@ -545,7 +562,7 @@ EBICS_init_library ()
       (GNUNET_OS_IPK_DATADIR)))
     return EBICS_ERROR;
 
-  if (EBICS_SUCCESS != EBICS_init_genex_documents
+  if (EBICS_SUCCESS != init_genex_documents
       (genexList,
        data_dir,
        genexFilenames))
@@ -567,8 +584,11 @@ EBICS_init_library ()
   return EBICS_SUCCESS;
 }
 
+
 /**
- * Deinit (all) the library(-ies)
+ * Deinit / deallocate libebics and all the dependencies.
+ *
+ * @return EBICS_SUCCESS or EBICS_ERROR
  */
 int
 EBICS_close_library ()
@@ -590,8 +610,8 @@ EBICS_close_library ()
   free_libgnutls ();
   xmlCleanupParser ();
 
-  EBICS_free_genex_documents (genexList);
-  EBICS_free_keymaterial (keyList);
+  free_genex_documents (genexList);
+  free_keymaterial (keyList);
 }
 
 /**
diff --git a/src/libebics.h b/src/libebics.h
index ee16b8f..4105ed1 100644
--- a/src/libebics.h
+++ b/src/libebics.h
@@ -37,32 +37,24 @@
 
 #define EBICS_INI_BASE_DOCUMENT 0
 
-
-
-int
-EBICS_init_keymaterial
-  (struct EBICS_Key keyList[],
-   char *keyDir,
-   const char *keyFiles[]);
-
-int
-EBICS_free_keymaterial (struct EBICS_Key keyList[]);
-
-int
-EBICS_init_genex_documents(struct EBICS_genex_document genexList[],
-                           const char *genex_schemas_dir,
-                           const char *genexFiles[]);
-
+/**
+ * Initializes Libebics.  Init all the dependencies,
+ * as well as it allocates the "genex" templates to
+ * be copied and instantiated during the library life.
+ *
+ * @return EBICS_SUCCESS or EBICS_ERROR.
+ */
 int
-EBICS_free_genex_documents (struct EBICS_genex_document genexList[]);
+EBICS_init_library ();
 
-int
-EBICS_init_library();
 
+/**
+ * Deinit / deallocate libebics and all the dependencies.
+ *
+ * @return EBICS_SUCCESS or EBICS_ERROR
+ */
 int
-EBICS_close_library();
-
-
+EBICS_close_library ();
 
 /**
  * Customize a bunch of standard values in the tree (including

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]