ese_data.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (C) 2020 Samsung Electronics. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, write to the Free Software
  15. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. #ifndef _ESE_DATA_H_
  18. #define _ESE_DATA_H_
  19. #include "ese_error.h"
  20. typedef struct data_packet_s {
  21. uint8_t *data;
  22. uint32_t size;
  23. } data_packet_t;
  24. typedef struct data_list_s {
  25. data_packet_t packet;
  26. struct data_list_s *next;
  27. } data_list_t;
  28. ESE_STATUS ese_data_init(data_list_t *head);
  29. ESE_STATUS ese_data_store(data_list_t *head, uint8_t *data, uint32_t data_size, uint8_t copy);
  30. ESE_STATUS ese_data_get(data_list_t *head, uint8_t **data, uint32_t *data_size);
  31. ESE_STATUS ese_data_delete(data_list_t *head);
  32. #endif