RTEMS: cpukit/include/rtems/rtl/rtl-archive.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
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
37extern "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{
52 rtems_rtl_archive_search_not_found = 0,
54 rtems_rtl_archive_search_found = 1,
55 rtems_rtl_archive_search_loaded = 2,
57 rtems_rtl_archive_search_error = 3,
59 rtems_rtl_archive_search_no_config = 4
61} rtems_rtl_archive_search;
62
66 typedef struct rtems_rtl_archive_symbol
67{
68 size_t entry;
69 const char* label;
70} rtems_rtl_archive_symbol;
71
75 typedef struct rtems_rtl_archive_symbols
76{
77 void* base;
78 size_t size;
79 size_t entries;
80 const char* names;
81 rtems_rtl_archive_symbol* symbols;
82} rtems_rtl_archive_symbols;
83
87 typedef struct rtems_rtl_archive
88{
89 rtems_chain_node node;
90 const char* name;
91 size_t size;
92 time_t mtime;
93 off_t enames;
94 rtems_rtl_archive_symbols symbols;
95 size_t refs;
96 uint32_t flags;
97} rtems_rtl_archive;
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;
108 rtems_chain_control archives;
109} rtems_rtl_archives;
110
114 typedef void (*rtems_rtl_archive_error)(int num, const char* text);
115
123void rtems_rtl_archives_open (rtems_rtl_archives* archives, const char* config);
124
130void rtems_rtl_archives_close (rtems_rtl_archives* archives);
131
143bool rtems_rtl_archives_refresh (rtems_rtl_archives* archives);
144
152bool rtems_rtl_archive_load (rtems_rtl_archives* archives, const char* name);
153
162 rtems_rtl_archive_search rtems_rtl_archive_obj_load (rtems_rtl_archives* archives,
163 const char* symbol,
164 bool load);
165
185bool 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,
191 rtems_rtl_archive_error error);
192
193#ifdef __cplusplus
194}
195#endif /* __cplusplus */
196
197#endif
chain.h
Chain API.
printer.h
User print interface to the bspIO print plug in.
rtems.h
rtems_rtl_archives_close
void rtems_rtl_archives_close(rtems_rtl_archives *archives)
Definition: rtl-archive.c:567
rtems_rtl_obj_archive_find_obj
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
rtems_rtl_archive_obj_load
rtems_rtl_archive_search rtems_rtl_archive_obj_load(rtems_rtl_archives *archives, const char *symbol, bool load)
Definition: rtl-archive.c:913
rtems_rtl_archive_search
rtems_rtl_archive_search
Definition: rtl-archive.h:51
rtems_rtl_archive_search_found
@ rtems_rtl_archive_search_found
Definition: rtl-archive.h:54
rtems_rtl_archive_search_not_found
@ rtems_rtl_archive_search_not_found
Definition: rtl-archive.h:52
rtems_rtl_archive_search_no_config
@ rtems_rtl_archive_search_no_config
Definition: rtl-archive.h:59
rtems_rtl_archive_search_error
@ rtems_rtl_archive_search_error
Definition: rtl-archive.h:57
rtems_rtl_archive_search_loaded
@ rtems_rtl_archive_search_loaded
Definition: rtl-archive.h:55
rtems_rtl_archives_refresh
bool rtems_rtl_archives_refresh(rtems_rtl_archives *archives)
Definition: rtl-archive.c:761
rtems_rtl_archive_error
void(* rtems_rtl_archive_error)(int num, const char *text)
Definition: rtl-archive.h:114
rtems_rtl_archive_load
bool rtems_rtl_archive_load(rtems_rtl_archives *archives, const char *name)
Definition: rtl-archive.c:884
rtems_rtl_archives_open
void rtems_rtl_archives_open(rtems_rtl_archives *archives, const char *config)
Definition: rtl-archive.c:557
Chain_Node_struct
Definition: chain.h:68
config_s
Definition: deflate.c:115
rtems_rtl_archive_symbol
Definition: rtl-archive.h:67
rtems_rtl_archive_symbol::entry
size_t entry
Definition: rtl-archive.h:68
rtems_rtl_archive_symbol::label
const char * label
Definition: rtl-archive.h:69
rtems_rtl_archive_symbols
Definition: rtl-archive.h:76
rtems_rtl_archive_symbols::symbols
rtems_rtl_archive_symbol * symbols
Definition: rtl-archive.h:81
rtems_rtl_archive_symbols::entries
size_t entries
Definition: rtl-archive.h:79
rtems_rtl_archive_symbols::base
void * base
Definition: rtl-archive.h:77
rtems_rtl_archive_symbols::names
const char * names
Definition: rtl-archive.h:80
rtems_rtl_archive_symbols::size
size_t size
Definition: rtl-archive.h:78
rtems_rtl_archive
Definition: rtl-archive.h:88
rtems_rtl_archive::node
rtems_chain_node node
Definition: rtl-archive.h:89
rtems_rtl_archive::mtime
time_t mtime
Definition: rtl-archive.h:92
rtems_rtl_archive::symbols
rtems_rtl_archive_symbols symbols
Definition: rtl-archive.h:94
rtems_rtl_archive::flags
uint32_t flags
Definition: rtl-archive.h:96
rtems_rtl_archive::name
const char * name
Definition: rtl-archive.h:90
rtems_rtl_archive::refs
size_t refs
Definition: rtl-archive.h:95
rtems_rtl_archive::size
size_t size
Definition: rtl-archive.h:91
rtems_rtl_archive::enames
off_t enames
Definition: rtl-archive.h:93
rtems_rtl_archives
Definition: rtl-archive.h:103
rtems_rtl_archives::config
char * config
Definition: rtl-archive.h:107
rtems_rtl_archives::config_length
size_t config_length
Definition: rtl-archive.h:106
rtems_rtl_archives::config_mtime
time_t config_mtime
Definition: rtl-archive.h:105
rtems_rtl_archives::config_name
const char * config_name
Definition: rtl-archive.h:104
rtems_rtl_archives::archives
rtems_chain_control archives
Definition: rtl-archive.h:108
Chain_Control
Definition: chain.h:86