NDEF types: mention the function span_from_cstr in functions accepting strings.

pull/7822/head
Vincent Coubard 2018-08-24 17:22:48 +01:00 committed by Donatien Garnier
parent 3dda860fd4
commit 3770cfb963
3 changed files with 25 additions and 3 deletions

View File

@ -44,15 +44,17 @@ public:
/**
* Construct a mime object from its type and content
*
* @param mime_type The mime type of the object
* @param mime_type The mime type of the object.
* @param content The content of the object.
*
* @note To remove the NULL terminator of the C-string of the mime_type
* parameter, you can use the utility function span_from_cstr.
*/
Mime(
const Span<const uint8_t> &mime_type,
const Span<const uint8_t> &content
);
/**
* Copy construct a Mime object.
* @param other The Mime object copied.
@ -73,8 +75,12 @@ public:
/**
* Set all attributes of a mime object.
*
* @param mime_type Type of the mime object.
* @param content Content of the mime object.
*
* @note To remove the NULL terminator of the C-string of the mime_type
* parameter, you can use the utility function span_from_cstr.
*/
void set_mime(
const Span<const uint8_t> &mime_type,
@ -88,7 +94,7 @@ public:
Span<const uint8_t> get_mime_type() const;
/**
* Return the content of thr mime object.
* Return the content of the mime object.
* @return the content of the mime object.
*/
Span<const uint8_t> get_mime_content() const;

View File

@ -51,9 +51,13 @@ public:
/**
* Construct a text element from a data buffer and an encoding.
*
* @param text_encoding The encoding of the text.
* @param language_code The string of the language code.
* @param text The text buffer.
*
* @note To remove the NULL terminator of the C-string of the language_code
* and text parameters, you can use the utility function span_from_cstr.
*/
Text(
encoding_t text_encoding,
@ -81,8 +85,12 @@ public:
/**
* Copy a text from an external buffer.
*
* @param language_code The language code of the text.
* @param text The text to copy.
*
* @note To remove the NULL terminator of the C-string of the language_code
* and text parameters, you can use the utility function span_from_cstr.
*/
void set_text(
encoding_t text_encoding,

View File

@ -87,9 +87,13 @@ public:
/**
* Construct a URI from an id and a uri field.
*
* @param id The code of the URI prefix.
* @param uri_field The URI itself.
* @param uri_field_size The size of the URI.
*
* @note To remove the NULL terminator of the C-string of the uri_field
* parameter, you can use the utility function span_from_cstr.
*/
URI(uri_identifier_code_t id, const Span<const uint8_t> &uri_field);
@ -113,8 +117,12 @@ public:
/**
* Replace the value of the URI.
*
* @param id The ID of the URI
* @param uri_field A buffer containing the value of the URI field.
*
* @note To remove the NULL terminator of the C-string of the uri_field
* parameter, you can use the utility function span_from_cstr.
*/
void set_uri(
uri_identifier_code_t id,