summaryrefslogtreecommitdiff
path: root/src/libstrongswan/credentials/credential_factory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/credentials/credential_factory.h')
-rw-r--r--src/libstrongswan/credentials/credential_factory.h39
1 files changed, 13 insertions, 26 deletions
diff --git a/src/libstrongswan/credentials/credential_factory.h b/src/libstrongswan/credentials/credential_factory.h
index 5057a7aae..e8ffb6b9d 100644
--- a/src/libstrongswan/credentials/credential_factory.h
+++ b/src/libstrongswan/credentials/credential_factory.h
@@ -47,13 +47,13 @@ extern enum_name_t *credential_type_names;
* Manages credential construction functions and creates instances.
*/
struct credential_factory_t {
-
+
/**
* Create a credential using a list of builder_part_t's.
*
* The variable argument list takes builder_part_t types followed
* by the type specific value. The list must be terminated using BUILD_END.
- * All passed parts get cloned/refcounted by the builder implementations,
+ * All passed parts get cloned/refcounted by the builder functions,
* so free up allocated ressources after successful and unsuccessful
* invocations.
*
@@ -64,41 +64,28 @@ struct credential_factory_t {
*/
void* (*create)(credential_factory_t *this, credential_type_t type,
int subtype, ...);
-
- /**
- * Create an enumerator for a builder type.
- *
- * The build() method has to be called on each enumerated builder to
- * cleanup associated ressources.
- *
- * @param type type of credentials the builder creates
- * @param subtype type specific subtype, such as certificate_type_t
- * @return enumerator over builder_t
- */
- enumerator_t* (*create_builder_enumerator)(credential_factory_t *this,
- credential_type_t type, int subtype);
-
+
/**
- * Register a builder_t constructor function.
+ * Register a credential builder function.
*
* @param type type of credential the builder creates
* @param constructor builder constructor function to register
*/
void (*add_builder)(credential_factory_t *this,
- credential_type_t type, int subtype,
- builder_constructor_t constructor);
+ credential_type_t type, int subtype,
+ builder_function_t constructor);
/**
- * Unregister a builder_t constructor function.
+ * Unregister a credential builder function.
*
* @param constructor constructor function to unregister.
*/
- void (*remove_builder)(credential_factory_t *this,
- builder_constructor_t constructor);
-
+ void (*remove_builder)(credential_factory_t *this,
+ builder_function_t constructor);
+
/**
- * Destroy a credential_factory instance.
- */
- void (*destroy)(credential_factory_t *this);
+ * Destroy a credential_factory instance.
+ */
+ void (*destroy)(credential_factory_t *this);
};
/**