Header File Index

| VarEntry & FlashPage structures creation/deletion

### tifiles_ve_create

TIEXPORT2 VarEntry* TICALL tifiles_ve_create(void)

Allocate a new VarEntry structure.

Return value : | the entry or NULL if error.

### tifiles_ve_create_alloc_data

TIEXPORT2 VarEntry* TICALL tifiles_ve_create_alloc_data(uint32_t size)

Allocate a new VarEntry structure and space for data.

size : | length of data.
Return value : | the entry or NULL if error.

### tifiles_ve_create_with_data

return tifiles_ve_create_alloc_data(size);

Deprecated version of tifiles_ve_create_alloc_data(). /

size : | length of data.
Return value : |

### tifiles_ve_create_with_data2

TIEXPORT2 VarEntry* TICALL tifiles_ve_create_with_data2(uint32_t size, uint8_t * data)

Allocate a new VarEntry structure and set size + data. data should have been allocated by tifiles_ve_alloc_data().

data : | data.
size : | length of data.
Return value : | the entry or NULL if error.

### tifiles_ve_delete

TIEXPORT2 void TICALL tifiles_ve_delete(VarEntry* ve)

Free data buffer and the structure itself.

ve : | var entry.
Return value : | none.

### tifiles_ve_alloc_data

TIEXPORT2 void * TICALL tifiles_ve_alloc_data(size_t size)

Allocate space for data field of VarEntry.

size : | length of data.
Return value : | allocated space or NULL if error.

### tifiles_ve_realloc_data

TIEXPORT2 VarEntry * TICALL tifiles_ve_realloc_data(VarEntry* ve, size_t size)

Reallocate space for data field of VarEntry.

size : | length of data.
Return value : | allocated space or NULL if error.

### tifiles_ve_free_data

return g_free(data);

Free space for data field of VarEntry. /

data : | length of data.
Return value : |

### tifiles_ve_create_array

TIEXPORT2 VarEntry** TICALL tifiles_ve_create_array(unsigned int nelts)

Allocate a NULL-terminated array of VarEntry structures. You have to allocate each element of the array by yourself.

nelts : | size of NULL-terminated array (number of VarEntry structures).
Return value : | the array or NULL if error.

### tifiles_ve_resize_array

TIEXPORT2 VarEntry** TICALL tifiles_ve_resize_array(VarEntry** array, unsigned int nelts)

Re-allocate a NULL-terminated array of VarEntry structures. You have to allocate each element of the array by yourself.

array : | address of array
nelts : | size of NULL-terminated array (number of VarEntry structures).
Return value : | the array or NULL if error.

### tifiles_ve_delete_array

TIEXPORT2 void TICALL tifiles_ve_delete_array(VarEntry** array)

Free the whole array (data buffer, VarEntry structure and array itself).

array : | an NULL-terminated array of VarEntry structures.
Return value : | none.

### tifiles_ve_copy

TIEXPORT2 VarEntry* TICALL tifiles_ve_copy(VarEntry* dst, VarEntry* src)

Copy VarEntry and its content from src to dst. If data is NULL, a new buffer is allocated before copying.

dst : | destination entry.
src : | source entry.
Return value : | the dst pointer or NULL if malloc error.

### tifiles_ve_dup

TIEXPORT2 VarEntry* TICALL tifiles_ve_dup(VarEntry* src)

Duplicate VarEntry and its content from src to dst (full copy).

src : | source entry.
Return value : | a newly allocated entry (must be freed with #tifiles_ve_delete when no longer needed).

### tifiles_fp_create

TIEXPORT2 FlashPage* TICALL tifiles_fp_create(void)

Allocate a new FlashPage structure.

Return value : | the entry or NULL if error.

### tifiles_fp_alloc_data

TIEXPORT2 void * TICALL tifiles_fp_alloc_data(size_t size)

Allocate space for data field of FlashPage.

size : | length of data.
Return value : | allocated space or NULL if error.

### tifiles_fp_realloc_data

TIEXPORT2 FlashPage * TICALL tifiles_fp_realloc_data(FlashPage* fp, size_t size)

Reallocate space for data field of FlashPage.

size : | new length of data.
Return value : | flash page, or NULL if error.

### tifiles_fp_free_data

return g_free(data);

Free space for data field of FlashPage. /

data : | length of data.
Return value : |

### tifiles_fp_create_alloc_data

TIEXPORT2 FlashPage* TICALL tifiles_fp_create_alloc_data(uint32_t size)

Allocate a new FlashPage structure and space for data.

size : | length of data.
Return value : | the entry or NULL if error.

### tifiles_fp_create_alloc_data

return tifiles_fp_create_alloc_data(size);

Deprecated version of tifiles_ve_create_alloc_data(). /

size : | length of data.
Return value : |

### tifiles_fp_create_with_data2

TIEXPORT2 FlashPage* TICALL tifiles_fp_create_with_data2(uint32_t size, uint8_t * data)

Allocate a new FlashPage structure and set size + data. data should have been allocated by tifiles_fp_alloc_data().

data : | data.
size : | length of data.
Return value : | the entry or NULL if error.

### tifiles_fp_create_array

TIEXPORT2 FlashPage** TICALL tifiles_fp_create_array(unsigned int nelts)

Allocate a NULL-terminated array of FlashPage structures. You have to allocate each element of the array by yourself.

nelts : | size of NULL-terminated array (number of FlashPage structures).
Return value : | the array or NULL if error.

### tifiles_fp_resize_array

TIEXPORT2 FlashPage** TICALL tifiles_fp_resize_array(FlashPage** array, unsigned int nelts)

Re-allocate a NULL-terminated array of FlashPage structures. You have to allocate each element of the array by yourself.

array : | address of array
nelts : | size of NULL-terminated array (number of FlashPage structures).
Return value : | the array or NULL if error.

### tifiles_fp_delete

TIEXPORT2 void TICALL tifiles_fp_delete(FlashPage* fp)

Free data buffer and the structure itself.

ve : | var entry.
Return value : | none.

### tifiles_fp_delete_array

TIEXPORT2 void TICALL tifiles_fp_delete_array(FlashPage** array)

Free the whole array (data buffer, FlashPage structure and array itself).

array : | an NULL-terminated array of FlashPage structures.
Return value : | none.

### Return to the main index