DeleteNV()
Synopsis
BOOL DeleteNV(
STRPTR appName,
STRPTR itemName,
BOOL killRequesters );
Function
Delete a piece of data in the nonvolatile storage.
Result
Success / failure indicator.
Notes
The 'appName' and 'itemName' strings may NOT include the characters
'/' or ':'.
FreeNVData()
Synopsis
VOID FreeNVData(
APTR data );
Function
Free data allocated by nonvolatile.library (GetCopyNV(), GetNVInfo(),
GetNVList()).
GetCopyNV()
Synopsis
APTR GetCopyNV(
STRPTR appName,
STRPTR itemName,
BOOL killRequesters );
Function
Search the nonvolatile storage for the object 'itemName' allocated by
'appName' and return a copy of the data.
Result
Pointer to the data assocated with 'itemName' as allocated by 'appName'.
GetNVInfo()
Synopsis
struct NVInfo * GetNVInfo(
BOOL killRequesters );
Function
Report information on the user's preferred nonvolatile storage device.
Result
Pointer to an NVInfo structure containing the information on the nonvolatile
storage device currently in use. Returns NULL in case of a failure.
GetNVList()
Synopsis
struct MinList * GetNVList(
STRPTR appName,
BOOL killRequesters );
Function
Returns a list of items allocated by application 'appName'.
Result
Pointer to a MinList of NVEntries which describes the items. Failure due to
lack of memory will be indicated by returning NULL.
Notes
The protection field should be examined using the field masks NVIF_DELETE
or by the bit definition NVIB_DELETE as the other bits are reserved for
system use.
SetNVProtection()
Synopsis
BOOL SetNVProtection(
STRPTR appName,
STRPTR itemName,
LONG mask,
BOOL killRequesters );
Function
Set the protection attributes for a nonvolatile item.
Result
Success / failure indicator.
Notes
The only bit that should currently be used in the 'mask' is the DELETE bit.
StoreNV()
Synopsis
LONG StoreNV(
STRPTR appName,
STRPTR itemName,
APTR data,
ULONG length,
BOOL killRequesters );
Function
Save data in the nonvolatile storage.
Result
Indication of the success of the operation
0 -- no error
NVERR_BADNAME -- 'appName' or 'itemName' were not correctly
specified names
NVERR_WRITEPROT -- the nonvolatile storage is read only
NVERR_FAIL -- failure in data saving (storage is full or write
protected)
NVERR_FATAL -- fatal error (possible loss of previously saved
data)
Notes
The strings 'appName' and 'itemName' should be descripive but short as the
size of the nonvolatile storage may be very limited. The strings may not
contatin the characters ':' or '/'. The maximum length for each of these
strings is 31.