File stores can be given a unique identity, known as the file store type, in order to differentiate them from each other.
The file store type is defined as a TUidType which can be constructed from one, two or three UIDs, i.e. TUid components.
The first UID component identifies the layout of the file store; i.e. it identifies the file store as either a direct file store or a permanent file store. The second and/or the third UID components are application dependent.
After creating a new file store, an application must set the type of the file store using the file store's SetTypeL() member function.
As a minimum requirement, the first UID component of the TUidType , which identifies the layout of the file store, must be specified. This component takes one of the values:
KPermanentFileStoreLayout to identify a permanent file store.
KDirectFileStoreLayout to identify a direct file store.
The following code fragment is typical:
... CFileStore* store = CDirectFileStore::ReplaceLC(...,...,...); store->SetTypeL(KDirectFileStoreLayoutUid); ...
If an application needs to explicitly set the second or the third UID component, then the TUidType object must be constructed explicitly and passed to SetTypeL() ; for example:
... CFileStore* store = CDirectFileStore::ReplaceLC(...,...,...); TUidType thetype(KDirectFileStoreLayoutUid,...,...); store->SetTypeL(thetype); ...
The file store's type can be retrieved by calling the file store’s Type( ) member function.
The file store's layout can be retrieved by calling the file store’s Layout() member function.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.