Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: gsmustor.h
Link against: gsmu.lib

This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.

Class CSARStore

class CSARStore : public CBase;

Description

Controls the segmentation and reassembly (SAR) store, used for SMS segmentation and reassembly, and WAP reassembly.

Derivation

Members

Defined in CSARStore:
AddEntryL(), BeginTransactionLC(), CSARStore(), ChangeEntryL(), Close(), CommitTransactionL(), CompactL(), DeleteEntryL(), DoOpenL(), Entries(), ExtraStreamId(), FileSession(), FileStore(), FileStore(), InTransaction(), OpenL(), PrivatePath(), PurgeL(), PurgeL(), SetExtraStreamIdL(), iFs, ~CSARStore()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


CSARStore()

Capability: Illegal

protected: IMPORT_C CSARStore(RFs &aFs);

Description

Constructor, initialises class members only.

Parameters

RFs &aFs

File system handle


~CSARStore()

Capability: Illegal

protected: IMPORT_C ~CSARStore();

Description

Destructor. Frees resource.

[Top]


Member functions


OpenL()

Capability: Illegal

IMPORT_C void OpenL(const TDesC &aFullName, const TUid &aThirdUid);

Description

Opens a specified SAR store.

A SAR filestore has has three uids, KPermanentFileStoreLayoutUid, KSARStoreUid (which designates that the file store is a SAR store) and a third UID, that identifies the particular implementation of CSARStore.

Parameters

const TDesC &aFullName

Name for the segmentation and reassembly filestore

const TUid &aThirdUid

Third UID for the filestore.


Close()

Capability: Illegal

IMPORT_C void Close();

Description

Closes the file store.

The function deletes the file store object and resets the entry array. It should be called once when the protocol module is closing down.


CompactL()

Capability: Illegal

IMPORT_C void CompactL();

Description

Compacts the file store.

This is done on every reboot and for every eighth SMS message sent, to keep the size of the file as low as possible.

This function opens and closes the file automatically.


Entries()

Capability: Illegal

IMPORT_C const CArrayFix< TSAREntry > &Entries() const;

Description

Gets a const reference to the entry array.

Return value

const CArrayFix< TSAREntry > &

Entry array


PurgeL()

Capability: Illegal

IMPORT_C void PurgeL(const TTimeIntervalMinutes &aTimeIntervalMinutes, TBool aPurgeIncompleteOnly);

Description

Purges the reassembly file store.

After a multipart message, it delete all the old entries.

Entries will be purged when: 1) The complete message is received; 2) After aTimerintervalMinutes, if aPurgeIncompletely is false.

PurgeL() will be called after the booting of the device or when a message has been received.

This function opens and closes the file automatically.

Note: overload function for segmentation store.

Parameters

const TTimeIntervalMinutes &aTimeIntervalMinutes

Purge time

TBool aPurgeIncompleteOnly

Purge complete messages flag


PurgeL()

Capability: Illegal

IMPORT_C void PurgeL(TInt aKSegmentationLifetimeMultiplier, TBool aPurgeIncompleteOnly);

Description

Purges the segmentation store.

This purges the filestore after a multipart message, deleting all the old entries.

This function opens and closes the file automatically.

Parameters

TInt aKSegmentationLifetimeMultiplier

The coefficient for calculating whether a message should be purged

TBool aPurgeIncompleteOnly

Set to false to purge all entries. Set to true to purge incomplete messages only.


DeleteEntryL()

Capability: Illegal

IMPORT_C void DeleteEntryL(TInt aIndex);

Description

Deletes an entry from the entry array, and externalizes it.

The file store must be open before calling this function.

Parameters

TInt aIndex

Entry in the SAR store to delete


BeginTransactionLC()

Capability: Illegal

IMPORT_C void BeginTransactionLC();

Description

Sets the SAR store as in-transaction.

The function checks the validity of the call and leaves KErrAccessDenied if invalid.


CommitTransactionL()

Capability: Illegal

IMPORT_C void CommitTransactionL();

Description

Commits a transaction to the filestore.

TODO AA: What should we do if err == KErrCorrupt?


FileSession()

inline RFs &FileSession() const;

Description

Gets the file server handle.

Return value

RFs &

File server handle


InTransaction()

inline TBool InTransaction() const;

Description

Return value

TBool

whether it's in transaction


DoOpenL()

Capability: Illegal

IMPORT_C void DoOpenL();

Description

Opens a filestore.

This is called by OpenL(), and does the work of really opening the file. If the file is not there, it creates a new one.


PrivatePath()

Capability: Illegal

IMPORT_C void PrivatePath(TDes &aPath);

Description

Returns the private path used to open a store.

Parameters

TDes &aPath

The private path of a store.


FileStore()

Capability: Illegal

protected: IMPORT_C CFileStore &FileStore();

Description

Gets a reference to the filestore.

Return value

CFileStore &

The filestore


FileStore()

Capability: Illegal

protected: IMPORT_C const CFileStore &FileStore() const;

Description

Gets a (const) reference to the filestore.

Return value

const CFileStore &

The filestore


AddEntryL()

Capability: Illegal

protected: IMPORT_C void AddEntryL(const TSAREntry &aEntry);

Description

Adds a new entry to the file store.

The function appends the new entry to the internal entry array, and then externalises it.

The file store must be open before calling this function.

Parameters

const TSAREntry &aEntry

SAR entry to add


ChangeEntryL()

Capability: Illegal

protected: IMPORT_C void ChangeEntryL(TInt aIndex, const TSAREntry &aNewEntry);

Description

Changes an entry in the file store - changes it first in the internal entry array, and then externalizes it.

The file store must be open before calling this function.

Parameters

TInt aIndex

The index into the SAR store to be changed

const TSAREntry &aNewEntry

The new SAR store entry


ExtraStreamId()

Capability: Illegal

protected: IMPORT_C TStreamId ExtraStreamId() const;

Description

Gets the extra stream ID.

Return value

TStreamId

Extra stream ID


SetExtraStreamIdL()

Capability: Illegal

protected: IMPORT_C void SetExtraStreamIdL(const TStreamId &aExtraStreamId);

Description

Sets the extra stream ID - changes it first in the internal entry array, and then externalizes it.

You must call Close() when the function returns.

Parameters

const TStreamId &aExtraStreamId

Extra stream ID

[Top]


Member data


iFs

protected: RFs & iFs;

Description

File server handle.