diff mbox series

[API-NEXT,2/3] api: crypto: use ODP_DEPRECATED{, _FIELD} declarations

Message ID 20170307115225.29225-3-dmitry.ereminsolenikov@linaro.org
State New
Headers show
Series deprecated hints proposal | expand

Commit Message

Dmitry Eremin-Solenikov March 7, 2017, 11:52 a.m. UTC
Add ODP_DEPRECATED and ODP_DEPRECATED_FIELD declarations to crypto API
header, actually urging applications to switch to newer API.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
 include/odp/api/spec/crypto.h | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

-- 
2.11.0
diff mbox series

Patch

diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index d30f050f..177f8444 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -19,6 +19,8 @@ 
 extern "C" {
 #endif
 
+#include <odp/api/hints.h>
+
 /** @defgroup odp_crypto ODP CRYPTO
  *  Macros, enums, types and operations to utilise crypto.
  *  @{
@@ -82,10 +84,10 @@  typedef enum {
 	ODP_CIPHER_ALG_AES_GCM,
 
 	/** @deprecated  Use ODP_CIPHER_ALG_AES_CBC instead */
-	ODP_CIPHER_ALG_AES128_CBC,
+	ODP_DEPRECATED_FIELD(ODP_CIPHER_ALG_AES128_CBC),
 
 	/** @deprecated  Use ODP_CIPHER_ALG_AES_GCM instead */
-	ODP_CIPHER_ALG_AES128_GCM
+	ODP_DEPRECATED_FIELD(ODP_CIPHER_ALG_AES128_GCM)
 
 } odp_cipher_alg_t;
 
@@ -127,13 +129,13 @@  typedef enum {
 	ODP_AUTH_ALG_AES_GCM,
 
 	/** @deprecated  Use ODP_AUTH_ALG_MD5_HMAC instead */
-	ODP_AUTH_ALG_MD5_96,
+	ODP_DEPRECATED_FIELD(ODP_AUTH_ALG_MD5_96),
 
 	/** @deprecated  Use ODP_AUTH_ALG_SHA256_HMAC instead */
-	ODP_AUTH_ALG_SHA256_128,
+	ODP_DEPRECATED_FIELD(ODP_AUTH_ALG_SHA256_128),
 
 	/** @deprecated  Use ODP_AUTH_ALG_AES_GCM instead */
-	ODP_AUTH_ALG_AES128_GCM
+	ODP_DEPRECATED_FIELD(ODP_AUTH_ALG_AES128_GCM)
 } odp_auth_alg_t;
 
 /**
@@ -158,10 +160,10 @@  typedef union odp_crypto_cipher_algos_t {
 		uint32_t aes_gcm     : 1;
 
 		/** @deprecated  Use aes_cbc instead */
-		uint32_t aes128_cbc  : 1;
+		uint32_t ODP_DEPRECATED_FIELD(aes128_cbc)  : 1;
 
 		/** @deprecated  Use aes_gcm instead */
-		uint32_t aes128_gcm  : 1;
+		uint32_t ODP_DEPRECATED_FIELD(aes128_gcm)  : 1;
 	} bit;
 
 	/** All bits of the bit field structure
@@ -196,13 +198,13 @@  typedef union odp_crypto_auth_algos_t {
 		uint32_t aes_gcm     : 1;
 
 		/** @deprecated  Use md5_hmac instead */
-		uint32_t md5_96      : 1;
+		uint32_t ODP_DEPRECATED_FIELD(md5_96)      : 1;
 
 		/** @deprecated  Use sha256_hmac instead */
-		uint32_t sha256_128  : 1;
+		uint32_t ODP_DEPRECATED_FIELD(sha256_128)  : 1;
 
 		/** @deprecated  Use aes_gcm instead */
-		uint32_t aes128_gcm  : 1;
+		uint32_t ODP_DEPRECATED_FIELD(aes128_gcm)  : 1;
 	} bit;
 
 	/** All bits of the bit field structure
@@ -317,7 +319,7 @@  typedef struct odp_crypto_session_param_t {
 } odp_crypto_session_param_t;
 
 /** @deprecated  Use odp_crypto_session_param_t instead */
-typedef odp_crypto_session_param_t odp_crypto_session_params_t;
+typedef odp_crypto_session_param_t odp_crypto_session_params_t ODP_DEPRECATED;
 
 /**
  * Crypto API per packet operation parameters
@@ -373,7 +375,7 @@  typedef struct odp_crypto_op_param_t {
 } odp_crypto_op_param_t;
 
 /** @deprecated  Use odp_crypto_op_param_t instead */
-typedef odp_crypto_op_param_t odp_crypto_op_params_t;
+typedef odp_crypto_op_param_t odp_crypto_op_params_t ODP_DEPRECATED;
 
 /**
  * Crypto API session creation return code