Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / resource / csdk / connectivity / lib / libcoap-4.1.1 / encode.h
index b9b304e..b1b2e57 100644 (file)
@@ -17,6 +17,8 @@
 #endif
 #endif
 
+#include "option.h"
+
 #define Nn 8  /* duplicate definition of N if built on sky motes */
 #define E 4
 #define HIBIT (1 << (Nn - 1))
@@ -51,4 +53,10 @@ unsigned int coap_decode_var_bytes(unsigned char *buf, unsigned int len);
  */
 unsigned int coap_encode_var_bytes(unsigned char *buf, unsigned int val);
 
+/**
+ * Tests whether the option definition has a type that allows variable byte encoding.
+ * Returns true when supported, false when not supported.
+ */
+bool coap_is_var_bytes(coap_option_def_t* def);
+
 #endif /* _COAP_ENCODE_H_ */