nonvolatile
Index
BOOL DeleteNV(
STRPTR appName,
STRPTR itemName,
BOOL killRequesters );
Delete a piece of data in the nonvolatile storage.
appName -- the application owning the data to be deleted; maximum
length 31
itemName -- name of the data to be deleted; maximum length 31
killRequesters -- if set to TRUE no system requesters will be displayed
during the deletion operation; if set to FALSE, system
requesters will be allowed to be displayed
Success / failure indicator.
The 'appName' and 'itemName' strings may NOT include the characters
'/' or ':'.
VOID FreeNVData(
APTR data );
Free data allocated by nonvolatile.library (GetCopyNV(), GetNVInfo(),
GetNVList()).
data -- data got from a nonvolatile.library function; may be NULL in
which case this function does nothing
APTR GetCopyNV(
STRPTR appName,
STRPTR itemName,
BOOL killRequesters );
Search the nonvolatile storage for the object 'itemName' allocated by
'appName' and return a copy of the data.
appName -- name of the application that allocated the item
itemName -- the object to look for
killRequesters -- if TRUE no system requesters will be allowed to be
displayed during the operation of this function
Pointer to the data assocated with 'itemName' as allocated by 'appName'.
struct NVInfo * GetNVInfo(
BOOL killRequesters );
Report information on the user's preferred nonvolatile storage device.
killRequesters -- if TRUE no system requesters will be displayed during
the operation of this function
Pointer to an NVInfo structure containing the information on the nonvolatile
storage device currently in use. Returns NULL in case of a failure.
struct MinList * GetNVList(
STRPTR appName,
BOOL killRequesters );
Returns a list of items allocated by application 'appName'.
appName -- the application the nonvolatile items of which to query
about
killRequesters -- if TRUE you make sure that no system requesters will be
displayed during the operation of this function
Pointer to a MinList of NVEntries which describes the items. Failure due to
lack of memory will be indicated by returning NULL.
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.
BOOL SetNVProtection(
STRPTR appName,
STRPTR itemName,
LONG mask,
BOOL killRequesters );
Set the protection attributes for a nonvolatile item.
appName -- the application owning the item stored in nonvolatile
memory
itemName -- the name of the item to change the protection of
mask -- the new protection status
killRequesters -- if TRUE no system requesters will be displayed during
the operation of this function
Success / failure indicator.
The only bit that should currently be used in the 'mask' is the DELETE bit.
LONG StoreNV(
STRPTR appName,
STRPTR itemName,
APTR data,
ULONG length,
BOOL killRequesters );
Save data in the nonvolatile storage.
appName -- the application to save an item in the nonvolatile
storage
itemName -- the name of the item to save
data -- the data to save
length -- number of tens of bytes of the data to save rounded
upwards (for instance to save 24 bytes specify 3).
killRequesters -- if TRUE no system requesters will be displayed during
the operation of this function
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)
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.
|
|