RTEMS  5.1
rtl-archive.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT (c) 2018 Chris Johns <chrisj@rtems.org>
3  *
4  * The license and distribution terms for this file may be
5  * found in the file LICENSE in this distribution or at
6  * http://www.rtems.org/license/LICENSE.
7  */
29 #if !defined (_RTEMS_RTL_ARCHIVE_H_)
30 #define _RTEMS_RTL_ARCHIVE_H_
31 
32 #include <rtems.h>
33 #include <rtems/chain.h>
34 #include <rtems/printer.h>
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif /* __cplusplus */
39 
43 #define RTEMS_RTL_ARCHIVE_USER_LOAD (1 << 0)
44 #define RTEMS_RTL_ARCHIVE_REMOVE (1 << 1)
45 #define RTEMS_RTL_ARCHIVE_LOAD (1 << 2)
50 typedef enum rtems_rtl_archive_search
51 {
62 
67 {
68  size_t entry;
69  const char* label;
71 
76 {
77  void* base;
78  size_t size;
79  size_t entries;
80  const char* names;
83 
87 typedef struct rtems_rtl_archive
88 {
90  const char* name;
91  size_t size;
92  time_t mtime;
93  off_t enames;
95  size_t refs;
96  uint32_t flags;
98 
102 typedef struct rtems_rtl_archives
103 {
104  const char* config_name;
105  time_t config_mtime;
106  size_t config_length;
107  char* config;
110 
114 typedef void (*rtems_rtl_archive_error)(int num, const char* text);
115 
123 void rtems_rtl_archives_open (rtems_rtl_archives* archives, const char* config);
124 
131 
144 
152 bool rtems_rtl_archive_load (rtems_rtl_archives* archives, const char* name);
153 
163  const char* symbol,
164  bool load);
165 
185 bool rtems_rtl_obj_archive_find_obj (int fd,
186  size_t fsize,
187  const char** name,
188  off_t* offset,
189  size_t* size,
190  off_t* extended_names,
192 
193 #ifdef __cplusplus
194 }
195 #endif /* __cplusplus */
196 
197 #endif
rtems_chain_control archives
Definition: rtl-archive.h:108
bool rtems_rtl_obj_archive_find_obj(int fd, size_t fsize, const char **name, off_t *offset, size_t *size, off_t *extended_names, rtems_rtl_archive_error error)
Definition: rtl-archive.c:1040
void rtems_rtl_archives_open(rtems_rtl_archives *archives, const char *config)
Definition: rtl-archive.c:557
size_t size
Definition: rtl-archive.h:91
Definition: chain.h:68
const char * names
Definition: rtl-archive.h:80
const char * label
Definition: rtl-archive.h:69
Definition: deflate.c:115
Definition: rtl-archive.h:57
time_t config_mtime
Definition: rtl-archive.h:105
void(* rtems_rtl_archive_error)(int num, const char *text)
Definition: rtl-archive.h:114
Definition: rtl-archive.h:54
Definition: rtl-archive.h:87
rtems_rtl_archive_symbol * symbols
Definition: rtl-archive.h:81
struct rtems_rtl_archive rtems_rtl_archive
Definition: chain.h:86
const char * name
Definition: rtl-archive.h:90
off_t enames
Definition: rtl-archive.h:93
Definition: rtl-archive.h:102
Definition: rtl-archive.h:55
void * base
Definition: rtl-archive.h:77
bool rtems_rtl_archive_load(rtems_rtl_archives *archives, const char *name)
Definition: rtl-archive.c:884
rtems_rtl_archive_search
Definition: rtl-archive.h:50
rtems_chain_node node
Definition: rtl-archive.h:89
struct rtems_rtl_archive_symbols rtems_rtl_archive_symbols
rtems_rtl_archive_symbols symbols
Definition: rtl-archive.h:94
size_t entries
Definition: rtl-archive.h:79
Definition: rtl-archive.h:75
struct rtems_rtl_archive_symbol rtems_rtl_archive_symbol
struct rtems_rtl_archives rtems_rtl_archives
char * config
Definition: rtl-archive.h:107
Definition: rtl-archive.h:52
uint32_t flags
Definition: rtl-archive.h:96
size_t config_length
Definition: rtl-archive.h:106
Chain API.
bool rtems_rtl_archives_refresh(rtems_rtl_archives *archives)
Definition: rtl-archive.c:761
size_t refs
Definition: rtl-archive.h:95
const char * config_name
Definition: rtl-archive.h:104
Definition: rtl-archive.h:66
void rtems_rtl_archives_close(rtems_rtl_archives *archives)
Definition: rtl-archive.c:567
Definition: rtl-archive.h:59
rtems_rtl_archive_search rtems_rtl_archive_obj_load(rtems_rtl_archives *archives, const char *symbol, bool load)
Definition: rtl-archive.c:913
unsigned size
Definition: tte.h:74
time_t mtime
Definition: rtl-archive.h:92
size_t size
Definition: rtl-archive.h:78
User print interface to the bspIO print plug in.
size_t entry
Definition: rtl-archive.h:68