pando_storage_interface.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*******************************************************
  2. * File name: pando_storage_interface.h
  3. * Author:
  4. * Versions:1.0
  5. * Description:This module is the interface used to store the gateway data.
  6. * History:
  7. * 1.Date:
  8. * Author:
  9. * Modification:
  10. *********************************************************/
  11. #ifndef __PANDO_STORAGE_INTERFACE_H__
  12. #define __PANDO_STORAGE_INTERFACE_H__
  13. #include "pando_types.h"
  14. typedef enum {
  15. CHANGE_SAVE_OK = 0,
  16. CREAT_SAVE_OK,
  17. FULL_ERROR,
  18. SAVE_ERROR,
  19. } SET_RESULT;
  20. /******************************************************************************
  21. * FunctionName : pando_data_set
  22. * Description : set the vale of the parameter stored, if the parameter is existing.
  23. Else creat the parameter, and save it.
  24. * Parameters : key -- the parameter;
  25. value -- the value of the parameter.
  26. * Returns : the save result
  27. *******************************************************************************/
  28. SET_RESULT pando_data_set(char* key, char* value);
  29. /******************************************************************************
  30. * FunctionName : pando_data_get
  31. * Description : get the value of the key.
  32. * Parameters : key -- the parameter
  33. * Returns : the pointer of the value. NULL if not exist
  34. *******************************************************************************/
  35. char * pando_data_get(char* key);
  36. /******************************************************************************
  37. * FunctionName : pando_storage_space_left
  38. * Description : get the space left for pando data saved in the storage.
  39. * Parameters :
  40. * Returns : the space left for pando data saving.
  41. *******************************************************************************/
  42. uint16_t pando_storage_space_left(void);
  43. /******************************************************************************
  44. * FunctionName : pando_storage_clean.
  45. * Description : clean the pando configuration message.
  46. * Parameters : none
  47. * Returns : none
  48. *******************************************************************************/
  49. void pando_storage_clean(void);
  50. #endif