LibPkg
|
Classes | |
class | exception |
An exception class to represent a RISC OS error block. More... | |
struct | file_info |
Functions | |
void | call_swi (unsigned int number, _kernel_swi_regs *regs) |
Call a RISC OS software interrupt. More... | |
void | OS_Byte161 (int address, int *_value) |
Read byte from CMOS RAM. More... | |
void | OS_File1 (const char *name, unsigned int loadaddr, unsigned int execaddr, unsigned int attr) |
Write catalogue information. More... | |
void | OS_File4 (const char *name, unsigned int attr) |
Write file attributes. More... | |
void | OS_File6 (const char *name, unsigned int *_objtype, unsigned int *_loadaddr, unsigned int *_execaddr, unsigned int *_length, unsigned int *_attr) |
Delete object. More... | |
void | OS_File8 (const char *name, unsigned int entries) |
Create directory. More... | |
void | OS_File17 (const char *name, unsigned int *_objtype, unsigned int *_loadaddr, unsigned int *_execaddr, unsigned int *_length, unsigned int *_attr) |
Read catalogue information. More... | |
void | OS_File18 (const char *name, unsigned int filetype) |
Write filetype. More... | |
void | OS_Args5 (int handle, bool *_eof) |
Read EOF status. More... | |
void | OS_Find (int code, const char *name, const char *path, int *_handle) |
Open file. More... | |
void | OS_Find0 (int handle) |
Close file. More... | |
void | OS_GBPB2 (int handle, const void *buffer, unsigned int count, unsigned int *_fp) |
Write bytes to file. More... | |
void | OS_GBPB4 (int handle, void *buffer, unsigned int count, unsigned int *_excess, unsigned int *_fp) |
Read bytes from file. More... | |
void | OS_GBPB12 (const char *name, void *buffer, unsigned int count, int offset, unsigned int length, const char *pattern, unsigned int *_count, int *_offset) |
Read catalogue information from directory. More... | |
void | OS_SetVarVal (const char *varname, const char *value, unsigned int length, unsigned int context, unsigned int vartype, unsigned int *_context, unsigned int *_vartype) |
Set system variable. More... | |
void | OS_FSControl25 (const char *src_name, const char *dst_name) |
Rename object. More... | |
void | OS_FSControl26 (const char *src_name, const char *dst_name, unsigned int mask, unsigned long long start_time, unsigned long long end_time, void *extra_info) |
Copy objects. More... | |
void | OS_FSControl37 (const char *name, char *buffer, const char *pathvar, const char *path, unsigned int size, unsigned int *_size) |
Canonicalise pathname. More... | |
void | OS_ReadModeVariable (int index, int *_value) |
Read mode variable. More... | |
void | OS_ReadMonotonicTime (unsigned int *_time) |
Read monotonic time. More... | |
void | OS_CLI (const char *command) |
Execute a command line. More... | |
|
inline |
Call a RISC OS software interrupt.
number | the software interrupt number |
regs | the register state (for input and output) |
Referenced by pkg::module_info::lookup(), OS_Args5(), OS_Byte161(), OS_CLI(), OS_File1(), OS_File17(), OS_File18(), OS_File4(), OS_File6(), OS_File8(), OS_Find(), OS_Find0(), OS_FSControl25(), OS_FSControl26(), OS_FSControl37(), OS_GBPB12(), OS_GBPB2(), OS_GBPB4(), OS_ReadModeVariable(), OS_ReadMonotonicTime(), OS_SetVarVal(), pkg::platform_features(), and pkg::vfp_check::vfp_check().
void pkg::os::OS_Byte161 | ( | int | address, |
int * | _value | ||
) |
Read byte from CMOS RAM.
address | the address to read |
_value | a buffer for the returned value |
References call_swi(), and pkg::swi::OS_Byte.
void pkg::os::OS_File1 | ( | const char * | name, |
unsigned int | loadaddr, | ||
unsigned int | execaddr, | ||
unsigned int | attr | ||
) |
Write catalogue information.
name | the object name |
loadaddr | the required load address |
execaddr | the required execution address |
attr | the required file attributes |
References call_swi(), and pkg::swi::OS_File.
Referenced by pkg::write_file_info().
void pkg::os::OS_File4 | ( | const char * | name, |
unsigned int | attr | ||
) |
Write file attributes.
name | the object name |
attr | the required file attributes |
References call_swi(), and pkg::swi::OS_File.
Referenced by pkg::force_delete(), and pkg::force_move().
void pkg::os::OS_File6 | ( | const char * | name, |
unsigned int * | _objtype, | ||
unsigned int * | _loadaddr, | ||
unsigned int * | _execaddr, | ||
unsigned int * | _length, | ||
unsigned int * | _attr | ||
) |
Delete object.
name | the object name |
_objtype | a buffer for the returned object type |
_loadaddr | a buffer for the returned load address |
_execaddr | a buffer for the returned execution address |
_length | a buffer for the returned object length |
_attr | a buffer for the returned object attributes |
References call_swi(), and pkg::swi::OS_File.
Referenced by pkg::force_delete(), pkg::force_move(), pkg::auto_dir::operator()(), and pkg::soft_delete().
void pkg::os::OS_File8 | ( | const char * | name, |
unsigned int | entries | ||
) |
Create directory.
name | the object name |
entries | the initial number of entries, or 0 for default |
References call_swi(), and pkg::swi::OS_File.
Referenced by pkg::create_directory(), and pkg::auto_dir::operator()().
void pkg::os::OS_File17 | ( | const char * | name, |
unsigned int * | _objtype, | ||
unsigned int * | _loadaddr, | ||
unsigned int * | _execaddr, | ||
unsigned int * | _length, | ||
unsigned int * | _attr | ||
) |
Read catalogue information.
name | the object name |
_objtype | a buffer for the returned object type |
_loadaddr | a buffer for the returned load address |
_execaddr | a buffer for the returned execution address |
_length | a buffer for the returned object length |
_attr | a buffer for the returned object attributes |
References call_swi(), and pkg::swi::OS_File.
Referenced by pkg::force_move(), pkg::object_length(), pkg::object_type(), and pkg::auto_dir::operator()().
void pkg::os::OS_File18 | ( | const char * | name, |
unsigned int | filetype | ||
) |
Write filetype.
name | the object name |
filetype | the required filetype |
References call_swi(), and pkg::swi::OS_File.
Referenced by pkg::write_filetype().
void pkg::os::OS_Args5 | ( | int | handle, |
bool * | _eof | ||
) |
Read EOF status.
handle | the file handle |
_eof | a buffer for the returned EOF status (true=EOF) |
References call_swi(), and pkg::swi::OS_Args.
void pkg::os::OS_Find | ( | int | code, |
const char * | name, | ||
const char * | path, | ||
int * | _handle | ||
) |
Open file.
code | the reason code |
name | the object name |
path | the path (if any) |
_handle | a buffer for the returned file handle |
References call_swi(), and pkg::swi::OS_Find.
void pkg::os::OS_Find0 | ( | int | handle | ) |
void pkg::os::OS_GBPB2 | ( | int | handle, |
const void * | buffer, | ||
unsigned int | count, | ||
unsigned int * | _fp | ||
) |
Write bytes to file.
handle | the file handle |
buffer | the data to be written |
count | the number of bytes to be written |
_fp | a buffer for the returned file pointer |
References call_swi(), and pkg::swi::OS_GBPB.
void pkg::os::OS_GBPB4 | ( | int | handle, |
void * | buffer, | ||
unsigned int | count, | ||
unsigned int * | _excess, | ||
unsigned int * | _fp | ||
) |
Read bytes from file.
handle | the file handle |
buffer | a buffer for the data to be read |
count | the number of bytes to be read |
_excess | a buffer for the returned number of bytes not transferred |
_fp | a buffer for the returned file pointer |
References call_swi(), and pkg::swi::OS_GBPB.
void pkg::os::OS_GBPB12 | ( | const char * | name, |
void * | buffer, | ||
unsigned int | count, | ||
int | offset, | ||
unsigned int | length, | ||
const char * | pattern, | ||
unsigned int * | _count, | ||
int * | _offset | ||
) |
Read catalogue information from directory.
name | the directory pathname |
buffer | a buffer for the catalogue entries to be read |
count | the number of catalogue entries to be read |
offset | the offset at which to begin |
length | the length of the buffer |
pattern | the pattern to match |
_count | a buffer for the returned number of directory entries read |
_offset | a buffer for the returned offset, or -1 if finished |
References call_swi(), and pkg::swi::OS_GBPB.
Referenced by pkg::dirstream::operator>>().
void pkg::os::OS_SetVarVal | ( | const char * | varname, |
const char * | value, | ||
unsigned int | length, | ||
unsigned int | context, | ||
unsigned int | vartype, | ||
unsigned int * | _context, | ||
unsigned int * | _vartype | ||
) |
Set system variable.
varname | the variable name |
value | the required value |
length | the length of the required value |
context | the context pointer, or 0 if none |
vartype | the variable type |
_context | a buffer for the returned context pointer |
_vartype | a buffer for the returned variable type |
References call_swi(), and pkg::swi::OS_SetVarVal.
Referenced by pkg::update_sysvars().
void pkg::os::OS_FSControl25 | ( | const char * | src_name, |
const char * | dst_name | ||
) |
Rename object.
src_name | the source name |
dst_name | the destination name |
References call_swi(), and pkg::swi::OS_FSControl.
Referenced by pkg::force_move().
void pkg::os::OS_FSControl26 | ( | const char * | src_name, |
const char * | dst_name, | ||
unsigned int | mask, | ||
unsigned long long | start_time, | ||
unsigned long long | end_time, | ||
void * | extra_info | ||
) |
Copy objects.
src_name | the source name |
dst_name | the destination name |
mask | a bitmap describing the required action |
start_time | the optional inclusive start time |
end_time | the optional inclusive end time |
extra_info | an optional pointer to extra information |
References call_swi(), and pkg::swi::OS_FSControl.
Referenced by pkg::copy_object().
void pkg::os::OS_FSControl37 | ( | const char * | name, |
char * | buffer, | ||
const char * | pathvar, | ||
const char * | path, | ||
unsigned int | size, | ||
unsigned int * | _size | ||
) |
Canonicalise pathname.
name | the object name |
buffer | a buffer for the result |
pathvar | the name of a system variable containing the path |
path | the path to use if path_variable is null or non-existant |
size | the size of the buffer |
_size | the space remaining after the result (but the terminator) has been placed in the buffer |
References call_swi(), and pkg::swi::OS_FSControl.
Referenced by pkg::canonicalise().
void pkg::os::OS_ReadModeVariable | ( | int | index, |
int * | _value | ||
) |
Read mode variable.
index | the variable number |
_value | a buffer for the returned value |
References call_swi(), and pkg::swi::OS_ReadModeVariable.
void pkg::os::OS_ReadMonotonicTime | ( | unsigned int * | _time | ) |
Read monotonic time.
_time | a buffer for the returned time (in centiseconds) |
References call_swi(), and pkg::swi::OS_ReadMonotonicTime.
void pkg::os::OS_CLI | ( | const char * | command | ) |
Execute a command line.
command | line to execute ( < 256 characters) |
References call_swi(), and pkg::swi::OS_CLI.
Referenced by pkg::commit::poll().
Reference Manual | LibPkg | Version 0.6.1 (28 Jan 2015) |