PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBLocalStorage
Wrapper Class for the ILocalStorage interface.
#include <SFBLocalStorage.h.hpp>
class SFBLocalStorage : public SFBQuery;
SFMTYPEDEFWRAPPER(SFBLocalStorage)

Inheritance diagram

 Inheritance diagram of SFBLocalStorageClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
X X O O

Reference

BREW API ILocalStorage

Member

Public Functions
SFCError Add( UInt32 key , LSEntry * entry )
Store a data pointer for the specified key value.
SFCError Get( UInt32 key , LSEntry ** entry )
Find and return the last added data pointer associated to the key that has not been removed.
Void Lock( Void )
Lock the object for an exclusive access by current thread. Caller might block in this request until lock is available.
static
SFBLocalStorageSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBLocalStorage instance.
static
SFBLocalStorageSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBLocalStorage instance.
Void Remove( LSEntry * entry )
Remove a data pointer
Void Unlock( Void )
Unlock the object.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBLocalStorage::Add
Store a data pointer for the specified key value.
[ public ]
SFCError Add(
    UInt32 key        // key value
    LSEntry * entry   // pointer to local storage entry 
);

Return value

  • AEE_SUCCESS if data is set
  • AEE_EFAILED/other Error code

Reference

BREW API ILocalStorage_Add SFBLocalStorage::Add | SFBLocalStorage::Remove


SFBLocalStorage::Get
Find and return the last added data pointer associated to the key that has not been removed.
[ public ]
SFCError Get(
    UInt32 key         // a key against which the entry was previously added 
    LSEntry ** entry   // pointer to be filled with the pointer to entry 
);

Return value

  • AEE_SUCCESS if data is found (has been set)
  • AEE_ENOSUCH if data can't be found (has not been set, or has been removed)

Reference

BREW API ILocalStorage_Get | SFBLocalStorage::Add | SFBLocalStorage::Remove


SFBLocalStorage::Lock
Lock the object for an exclusive access by current thread. Caller might block in this request until lock is available.
[ public ]
Void Lock(Void);

Reference

BREW API ILOCALSTORAGE_Lock SFBLocalStorage::Unlock


SFBLocalStorage::NewInstance
Create a new SFBLocalStorage instance.
[ public, static ]
SFBLocalStorageSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBLocalStorageSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBLocalStorage::Remove
Remove a data pointer
[ public ]
Void Remove(
    LSEntry * entry   // pointer to local storage entry 
);

Reference

BREW API ILocalStorage_Remove | SFBLocalStorage::Get


SFBLocalStorage::Unlock
Unlock the object.
[ public ]
Void Unlock(Void);

Reference

BREW API ILocalStorage_Unlock | SFBLocalStorage::Lock