CStreamStore Class Reference

#include <s32stor.h>

class CStreamStore : public CBase

Inherits from

  • CStreamStore

    Detailed Description

    Provides the core abstract framework for stores allowing streams to be created and manipulated.

    Member Function Documentation

    Commit ( )

    IMPORT_C TIntCommit()

    Commits changes.

    This function establishes a new commit point. Typically, this is done after changes to new or existing streams are complete and the streams themselves have been committed.

    Establishing a new commit point makes changes to the store permanent. Until such changes are committed, they can be rolled back or reverted, effectively causing the store to revert back to its state before the changes were made.

    This ensures that persistent data moves from one consistent state to another and guarantees the integrity of persistent store data in the event of failures. In particular, if a process terminates or a media failure occurs, the store reverts automatically to its state at the last successful commit point.

    Note that this function is not implemented by the direct file store CDirectFileStore and the non-persistent in-memory store CBufStore.

    See also: CDirectFileStore CBufStore

    Returns: KErrNone if successful, otherwise another of the system-wide error codes.

    CommitL ( )

    voidCommitL()[inline]

    Commit changes and leaves if unsuccessful.

    See also: CStreamStore::Commit()

    CompactL ( )

    IMPORT_C TIntCompactL()

    Compacts the store. This returns free space to the appropriate system pool, for example, the filing system in the case of file-based stores.

    On completion, the function returns the total amount of free space available within the store.

    The function does not return until the compaction process is complete. This can take an extended amount of time.

    Note:

    this function is only supported by the permanent file store, CPermanentFileStore, and not by CDirectFileStore or CBufStore.

    Streams must be closed before calling this function.

    See also: CPermanentFileStore

    Returns: The amount of free space available within the store.

    Delete ( TStreamId )

    IMPORT_C voidDelete(TStreamIdanId)

    Deletes the specified stream from this store.

    This function is deprecated.

    If unsuccessful, the function fails silently with no way to return information to the user.

    The function is not supported by the direct file store, CDirectFileStore.

    ParameterDescription
    anIdThe id of the stream to be deleted.

    DeleteL ( TStreamId )

    IMPORT_C voidDeleteL(TStreamIdanId)

    Deletes the specified stream from this store, leaving if unsuccessful.

    The function is not supported by the direct file store, CDirectFileStore.

    See also: CDirectFileStore

    ParameterDescription
    anIdThe id of the stream to be deleted from this store.

    ExtendL ( )

    TStreamId ExtendL()[inline]

    Generates a new stream within this store, and returns its id. This function can be used to create a new stream in advance of being written to.

    This function is not supported by the direct file store, CDirectFileStore.

    See also: CDirectFileStore

    Returns: The stream id for the newly generated stream.

    ReclaimL ( )

    IMPORT_C TIntReclaimL()

    Reclaims space within a store, returning the total amount of free space available within that store.

    The function does not return until the reclamation process is complete. This can take an extended amount of time.

    The function is only supported by the permanent file store, CPermanentFileStore, but not by other derived classes, e.g., CDirectFileStore or CBufStore.

    See also: CPermanentFileStore

    Returns: The amount of free space available within the store.

    Revert ( )

    IMPORT_C voidRevert()

    Rolls back the store to its state at the last commit point.

    This function is deprecated; use RevertL() instead.

    If unsuccessful, the function fails silently with no way to return information to the user.

    The function is not supported by the direct file store CDirectFileStore and the non-persistent in-memory store CBufStore.

    See also: CDirectFileStore CBufStore

    RevertL ( )

    voidRevertL()[inline]

    Rolls back the store to its state at the last commit point and leaves if unsuccessful.

    The function is not supported by the direct file store CDirectFileStore and the non-persistent in-memory store CBufStore.

    See also: CDirectFileStore CBufStore