forked from enlightenment/efl
emile: implement emile_cipher_module_get in a useful way.
This commit is contained in:
parent
f4c5b3fd70
commit
df20c9ff8e
|
@ -9,6 +9,20 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Emile_Cipher_Backend
|
||||
*
|
||||
* Flags describing the implemented backend.
|
||||
*
|
||||
* @since 1.14.0
|
||||
*/
|
||||
typedef enum _Emile_Cipher_Backend
|
||||
{
|
||||
EMILE_NONE,
|
||||
EMILE_OPENSSL,
|
||||
EMILE_GNUTLS
|
||||
} Emile_Cipher_Backend;
|
||||
|
||||
/**
|
||||
* @typedef Emile_Cipher_Algorithm
|
||||
*
|
||||
|
@ -39,7 +53,7 @@ EAPI Eina_Bool emile_cipher_init(void);
|
|||
* @return the name of the current cipher backend.
|
||||
* @since 1.14.0
|
||||
*/
|
||||
EAPI const char *emile_cipher_module_get(void);
|
||||
EAPI Emile_Cipher_Backend emile_cipher_module_get(void);
|
||||
|
||||
/**
|
||||
* Cipher a buffer with a defined algorithm and key.
|
||||
|
|
|
@ -35,6 +35,20 @@ emile_cipher_init(void)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Emile_Cipher_Backend
|
||||
emile_cipher_module_get(void)
|
||||
{
|
||||
#ifdef HAVE_GNUTLS
|
||||
return EMILE_GNUTLS;
|
||||
#else
|
||||
#ifdef HAVE_OPENSSL
|
||||
return EMILE_OPENSSL;
|
||||
#else
|
||||
return EMILE_NONE;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI int
|
||||
emile_init(void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue