Skip to content

Fixing Doxygen descriptions #8933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions features/device_key/source/DeviceKey.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class DeviceKey : private mbed::NonCopyable<DeviceKey> {
*/
int generate_derived_key(const unsigned char *isalt, size_t isalt_size, unsigned char *output, uint16_t ikey_type);

/** Set a device key into the KVStore. If TRNG support is missing, call this method
/** Set a device key into the KVStore. If entropy support is missing, call this method
* before calling device_key_derived_key. This method should be called only once!
* @param value Input buffer contain the key.
* @param isize Size of the supplied key. Must be 16 bytes or 32 bytes.
Expand Down Expand Up @@ -131,7 +131,7 @@ class DeviceKey : private mbed::NonCopyable<DeviceKey> {
int get_derived_key(uint32_t *ikey_buff, size_t ikey_size, const unsigned char *isalt, size_t isalt_size,
unsigned char *output, uint32_t ikey_type);

/** Generate a random ROT key by using TRNG
/** Generate a random ROT key by using entropy
* @param output Output buffer for the generated key.
* @param size Input: The size of the buffer. If size is less
* than 16 bytes, the method generates an
Expand Down
3 changes: 2 additions & 1 deletion features/storage/kvstore/KVStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ class KVStore {
*/
virtual int iterator_close(iterator_t it) = 0;

/** Convenience function for checking key validity
/** Convenience function for checking key validity.
* Key must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'.
*
* @param[in] key Key buffer.
*
Expand Down
2 changes: 1 addition & 1 deletion features/storage/kvstore/conf/kv_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" {
#define _STORAGE_CONFIG(dev) _STORAGE_CONFIG_concat(dev)

/**
* @brief This function initializes one of the configuration that exists in Mbed OS. To overwite
* @brief This function initializes one of the configuration that exists in Mbed OS. To overwrite
* the default configuration, please overwrite this function.
*
* @returns 0 on success or negative value on failure.
Expand Down
29 changes: 18 additions & 11 deletions features/storage/kvstore/filesystemstore/FileSystemStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

namespace mbed {

/** FileSystemStore for Secure Store
/** FileSystemStore for Secure Store.
* This class implements the KVStore interface to
* create a key value store over FileSystem.
*
* @code
* ...
Expand All @@ -34,7 +36,7 @@ class FileSystemStore : public KVStore {
public:
/** Create FileSystemStore - A Key Value API on top of FS
*
* @param fs File system on top which FileSystemStore is adding KV API
* @param fs File system (FAT/LITTLE) on top of which FileSystemStore is adding KV API
*/
FileSystemStore(FileSystem *fs);

Expand All @@ -44,15 +46,16 @@ class FileSystemStore : public KVStore {
virtual ~FileSystemStore() {}

/**
* @brief Initialize FileSystemStore
* @brief Initialize FileSystemStore, checking validity of
* KVStore writing folder and if it doesn't exist, creating it.
*
* @returns MBED_SUCCESS Success.
* MBED_ERROR_FAILED_OPERATION Underlying file system failed operation.
*/
virtual int init();

/**
* @brief Deinitialize FileSystemStore
* @brief Deinitialize FileSystemStore, release and free resources.
*
* @returns MBED_SUCCESS Success.
*/
Expand Down Expand Up @@ -85,7 +88,7 @@ class FileSystemStore : public KVStore {
virtual int set(const char *key, const void *buffer, size_t size, uint32_t create_flags);

/**
* @brief Get one FileSystemStore item, given key.
* @brief Get one FileSystemStore item by given key.
*
* @param[in] key Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'.
* @param[in] buffer Value data buffer.
Expand All @@ -98,13 +101,13 @@ class FileSystemStore : public KVStore {
* MBED_ERROR_FAILED_OPERATION Underlying file system failed operation.
* MBED_ERROR_INVALID_ARGUMENT Invalid argument given in function arguments.
* MBED_ERROR_INVALID_SIZE Invalid size given in function arguments.
* MBED_ERROR_INVALID_DATA_DETECTED Data is corrupt.
* MBED_ERROR_INVALID_DATA_DETECTED Data is corrupted.
* MBED_ERROR_ITEM_NOT_FOUND No such key.
*/
virtual int get(const char *key, void *buffer, size_t buffer_size, size_t *actual_size = NULL, size_t offset = 0);

/**
* @brief Get information of a given key.
* @brief Get information of a given key. The returned info contains size and flags
*
* @param[in] key Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'.
* @param[out] info Returned information structure.
Expand All @@ -114,13 +117,13 @@ class FileSystemStore : public KVStore {
* MBED_ERROR_FAILED_OPERATION Underlying file system failed operation.
* MBED_ERROR_INVALID_ARGUMENT Invalid argument given in function arguments.
* MBED_ERROR_INVALID_SIZE Invalid size given in function arguments.
* MBED_ERROR_INVALID_DATA_DETECTED Data is corrupt.
* MBED_ERROR_INVALID_DATA_DETECTED Data is corrupted.
* MBED_ERROR_ITEM_NOT_FOUND No such key.
*/
virtual int get_info(const char *key, info_t *info);

/**
* @brief Remove a FileSystemStore item, given key.
* @brief Remove a FileSystemStore item by given key.
*
* @param[in] key Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'.
*
Expand All @@ -134,7 +137,8 @@ class FileSystemStore : public KVStore {
virtual int remove(const char *key);

/**
* @brief Start an incremental FileSystemStore set sequence.
* @brief Start an incremental FileSystemStore set sequence. This operation is blocking other operations.
* Any get/set/remove/iterator operation will be blocked until set_finalize is called.
*
* @param[out] handle Returned incremental set handle.
* @param[in] key Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'.
Expand All @@ -151,7 +155,8 @@ class FileSystemStore : public KVStore {
virtual int set_start(set_handle_t *handle, const char *key, size_t final_data_size, uint32_t create_flags);

/**
* @brief Add data to incremental FileSystemStore set sequence.
* @brief Add data to incremental FileSystemStore set sequence. This operation is blocking other operations.
* Any get/set/remove operation will be blocked until set_finalize is called.
*
* @param[in] handle Incremental set handle.
* @param[in] value_data Value data to add.
Expand Down Expand Up @@ -180,6 +185,7 @@ class FileSystemStore : public KVStore {

/**
* @brief Start an iteration over FileSystemStore keys.
* There are no issues with any other operations while iterator is open.
*
* @param[out] it Returned iterator handle.
* @param[in] prefix Key prefix (null for all keys).
Expand All @@ -192,6 +198,7 @@ class FileSystemStore : public KVStore {

/**
* @brief Get next key in iteration.
* There are no issues with any other operations while iterator is open.
*
* @param[in] it Iterator handle.
* @param[in] key Buffer for returned key.
Expand Down
14 changes: 8 additions & 6 deletions features/storage/kvstore/global_api/kvstore_global_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ typedef struct info {
int kv_set(const char *full_name_key, const void *buffer, size_t size, uint32_t create_flags);

/**
* @brief Get one KVStore item, given key.
* @brief Get one KVStore item by given key.
*
* @param[in] full_name_key /Partition_path/Key. Must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'.
* @param[in] buffer Value data buffer.
Expand All @@ -75,7 +75,7 @@ int kv_set(const char *full_name_key, const void *buffer, size_t size, uint32_t
int kv_get(const char *full_name_key, void *buffer, size_t buffer_size, size_t *actual_size);

/**
* @brief Get information of a given key.
* @brief Get information of a given key.The returned info contains size and flags
*
* @param[in] full_name_key /Partition_path/Key. Must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'.
* @param[out] info Returned information structure.
Expand All @@ -85,7 +85,7 @@ int kv_get(const char *full_name_key, void *buffer, size_t buffer_size, size_t *
int kv_get_info(const char *full_name_key, kv_info_t *info);

/**
* @brief Remove a KVStore item, given key.
* @brief Remove a KVStore item by given key.
*
* @param[in] full_name_key /Partition_path/Key. Must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'.
*
Expand All @@ -95,7 +95,8 @@ int kv_remove(const char *full_name_key);

/**
* @brief Start an iteration over KVStore keys to find all the entries
* that fit the full_prefix
* that fit the full_prefix. There are no issues with any other operations while
* iterator is open.
*
* @param[out] it Allocating iterator handle.
* Do not forget to call kv_iterator_close
Expand All @@ -109,7 +110,8 @@ int kv_remove(const char *full_name_key);
int kv_iterator_open(kv_iterator_t *it, const char *full_prefix);

/**
* @brief Get next key in iteration that matches the prefix.
* @brief Get next key in iteration that matches the prefix. There are no issues with any
* other operations while iterator is open.
*
* @param[in] it Iterator handle.
* @param[in] key Buffer for returned key.
Expand All @@ -129,7 +131,7 @@ int kv_iterator_next(kv_iterator_t it, char *key, size_t key_size);
int kv_iterator_close(kv_iterator_t it);

/**
* @brief Remove all keys and related data
* @brief Remove all keys and related data from a specified partition.
*
* @param[in] kvstore_path /Partition/
*
Expand Down
17 changes: 9 additions & 8 deletions features/storage/kvstore/kv_map/KVMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,11 @@ class KVMap : private mbed::NonCopyable<KVMap> {
/**
* @brief Full name lookup, and then break it into KVStore instance and key
*
* @param full_name String parameter contains the /partition name/key.
* @param kv_instance The main KVStore instance associated with the required partition name.
* @param key_index An index to the first character of the key.
* @param flags_mask Return the flag masking for the current configuration
* @param[in] full_name String parameter contains the partition name to look for.
* The String should be formated as follow "/partition name/key". The key is optional.
* @param[out] kv_instance Returns the main KVStore instance associated with the required partition name.
* @param[out] key_index Returns an index to the first character of the key.
* @param[out] flags_mask Return the flag masking for the current configuration
* @return 0 on success, negative error code on failure
*/
int lookup(const char *full_name, mbed::KVStore **kv_instance, size_t *key_index, uint32_t *flags_mask = NULL);
Expand Down Expand Up @@ -211,7 +212,7 @@ class KVMap : private mbed::NonCopyable<KVMap> {
private:

/**
* @brief Deinitialize all components of a partition configuration struct.
* @brief Deinitialize all components of a partition configuration struct.
*
* @param partition Partition configuration struct.
*/
Expand All @@ -220,9 +221,9 @@ class KVMap : private mbed::NonCopyable<KVMap> {
/**
* @brief Full name lookup, and then break it into KVStore config and key
*
* @param full_name String parameter contains the /partition name/key.
* @param kv_config The configuration struct associated with the partition name
* @param key_index An index to the first character of the key.
* @param[in] full_name String parameter contains the /partition name/key.
* @param[out] kv_config Returns The configuration struct associated with the partition name
* @param[out] key_index Returns an index to the first character of the key.
* @return 0 on success, negative error code on failure
*/
int config_lookup(const char *full_name, kvstore_config_t **kv_config, size_t *key_index);
Expand Down
25 changes: 16 additions & 9 deletions features/storage/kvstore/securestore/SecureStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class SecureStore : public KVStore {
/**
* @brief Class constructor
*
* @param[in] underlying_kv Underlying KVStore.
* @param[in] rbp_kv Rollback protect KVStore.
* @param[in] underlying_kv KVStore that will hold the data.
* @param[in] rbp_kv Additional KVStore used for rollback protection.
*
* @returns none
*/
Expand All @@ -68,15 +68,16 @@ class SecureStore : public KVStore {
virtual ~SecureStore();

/**
* @brief Initialize SecureStore
* @brief Initialize SecureStore class. It will also initialize
* the underlying KVStore and the rollback protection KVStore.
*
* @returns MBED_SUCCESS Success.
* or any other error from underlying KVStore instances.
*/
virtual int init();

/**
* @brief Deinitialize SecureStore
* @brief Deinitialize SecureStore class, free handles and memory allocations.
*
* @returns MBED_SUCCESS Success.
* or any other error from underlying KVStore instances.
Expand All @@ -100,7 +101,8 @@ class SecureStore : public KVStore {
* @param[in] key Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'.
* @param[in] buffer Value data buffer.
* @param[in] size Value data size.
* @param[in] create_flags Flag mask.
* @param[in] create_flags Flag mask - WRITE_ONCE_FLAG|REQUIRE_CONFIDENTIALITY_FLAG|
* REQUIRE_INTEGRITY_FLAG|REQUIRE_REPLAY_PROTECTION_FLAG
*
* @returns MBED_SUCCESS Success.
* MBED_ERROR_NOT_READY Not initialized.
Expand Down Expand Up @@ -141,7 +143,7 @@ class SecureStore : public KVStore {
* @brief Get information of a given key.
*
* @param[in] key Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'.
* @param[out] info Returned information structure.
* @param[out] info Returned information structure containing size and flags.
*
* @returns MBED_SUCCESS Success.
* MBED_ERROR_NOT_READY Not initialized.
Expand Down Expand Up @@ -173,12 +175,14 @@ class SecureStore : public KVStore {


/**
* @brief Start an incremental KVStore set sequence.
* @brief Start an incremental KVStore set sequence. This operation is blocking other operations.
* Any get/set/remove/iterator operation will be blocked until set_finalize is called.
*
* @param[out] handle Returned incremental set handle.
* @param[in] key Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'.
* @param[in] final_data_size Final value data size.
* @param[in] create_flags Flag mask.
* @param[in] create_flags Flag mask - WRITE_ONCE_FLAG|REQUIRE_CONFIDENTIALITY_FLAG|
* REQUIRE_INTEGRITY_FLAG|REQUIRE_REPLAY_PROTECTION_FLAG
*
* @returns MBED_SUCCESS Success.
* MBED_ERROR_NOT_READY Not initialized.
Expand All @@ -192,7 +196,8 @@ class SecureStore : public KVStore {
virtual int set_start(set_handle_t *handle, const char *key, size_t final_data_size, uint32_t create_flags);

/**
* @brief Add data to incremental KVStore set sequence.
* @brief Add data to incremental KVStore set sequence. This operation is blocking other operations.
* Any get/set/remove operation will be blocked until set_finalize is called.
*
* @param[in] handle Incremental set handle.
* @param[in] value_data value data to add.
Expand Down Expand Up @@ -223,6 +228,7 @@ class SecureStore : public KVStore {

/**
* @brief Start an iteration over KVStore keys.
* There are no issue with any other operation while iterator is open.
*
* @param[out] it Returned iterator handle.
* @param[in] prefix Key prefix (null for all keys).
Expand All @@ -236,6 +242,7 @@ class SecureStore : public KVStore {

/**
* @brief Get next key in iteration.
* There are no issue with any other operation while iterator is open.
*
* @param[in] it Iterator handle.
* @param[in] key Buffer for returned key.
Expand Down
Loading