Lines Matching refs:key
20 * @brief Provides APIs for processing data in the form of key-value (KV) pairs.
22 * The key is of the string type, and the value can be a number, a string, a boolean value.
103 * @brief Obtains the integer value in a Preferences object based on the given key.
106 * @param key Pointer to the key of the value to obtain.
113 * {@link PREFERENCES_ERROR_KEY_NOT_FOUND} indicates the key does not exist.
117 int OH_Preferences_GetInt(OH_Preferences *preference, const char *key, int *value);
120 * @brief Obtains the Boolean value in a Preferences object based on the given key.
123 * @param key Pointer to the key of the value to obtain.
130 * {@link PREFERENCES_ERROR_KEY_NOT_FOUND} indicates the key does not exist.
134 int OH_Preferences_GetBool(OH_Preferences *preference, const char *key, bool *value);
137 * @brief Obtains the string value in a Preferences object based on the given key.
140 * @param key Pointer to the key of the value to obtain.
149 * {@link PREFERENCES_ERROR_KEY_NOT_FOUND} indicates the key does not exist.
153 int OH_Preferences_GetString(OH_Preferences *preference, const char *key, char **value, uint32_t *valueLen);
168 * @param key Pointer to the key to set.
178 int OH_Preferences_SetInt(OH_Preferences *preference, const char *key, int value);
184 * @param key Pointer to the key to set.
194 int OH_Preferences_SetBool(OH_Preferences *preference, const char *key, bool value);
200 * @param key Pointer to the key to set.
210 int OH_Preferences_SetString(OH_Preferences *preference, const char *key, const char *value);
216 * @param key Pointer to the key of the data to delete.
225 int OH_Preferences_Delete(OH_Preferences *preference, const char *key);