diff options
Diffstat (limited to 'src/libstrongswan/credentials/credential_factory.h')
-rw-r--r-- | src/libstrongswan/credentials/credential_factory.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/libstrongswan/credentials/credential_factory.h b/src/libstrongswan/credentials/credential_factory.h index e8ffb6b9d..709dc916a 100644 --- a/src/libstrongswan/credentials/credential_factory.h +++ b/src/libstrongswan/credentials/credential_factory.h @@ -68,11 +68,17 @@ struct credential_factory_t { /** * Register a credential builder function. * + * The final flag indicates if the registered builder can build such + * a credential itself the most common encoding, without the need + * for an additional builder. + * * @param type type of credential the builder creates + * @param subtype subtype of the credential, type specific + * @param final TRUE if this build does not invoke other builders * @param constructor builder constructor function to register */ void (*add_builder)(credential_factory_t *this, - credential_type_t type, int subtype, + credential_type_t type, int subtype, bool final, builder_function_t constructor); /** * Unregister a credential builder function. @@ -83,6 +89,16 @@ struct credential_factory_t { builder_function_t constructor); /** + * Create an enumerator over registered builder types. + * + * The enumerator returns only builder types registered with the final + * flag set. + * + * @return enumerator (credential_type_t, int subtype) + */ + enumerator_t* (*create_builder_enumerator)(credential_factory_t *this); + + /** * Destroy a credential_factory instance. */ void (*destroy)(credential_factory_t *this); |