BSUL::CIniDocument16 Class Reference
class BSUL::CIniDocument16 : public CBase
|
Dom parser for 16 bit ini file. This class provides the functionality to read and write settings of an 16 bit ini file.
Constructor & Destructor Documentation
CIniDocument16()
CIniDocument16
|
(
|
)
|
[private]
|
~CIniDocument16()
IMPORT_C
|
~CIniDocument16
|
(
|
)
|
|
Member Functions Documentation
AddSection(const TDesC16 &)
IMPORT_C
TInt
|
AddSection
|
(
|
const
TDesC16
&
|
aSectionName
|
)
|
|
Add a section to the ini document object
-
Post-condition
-
a section with that name is created and added to the document object
Parameters
const
TDesC16
& aSectionName
|
the name of the section to be added
|
CompareDocs(CIniDocument16 &)
Compare two document objects. If names, keys or values differ, a false is returned, else a true is returned.
Parameters
CIniDocument16
& aDoc
|
name of the document to compare against this object.
|
Externalise(const TDesC &)
IMPORT_C
TInt
|
Externalise
|
(
|
const
TDesC
&
|
aFileName
|
)
|
|
Flush the buffered content to an output file name This will first write into a temporary file in the same directory and path as the supplied aFileName.It will then replace the existing file or create a new file if does not exist yet.
Parameters
const
TDesC
& aFileName
|
the output file name to write to
|
GetKeyValue(const TDesC16 &, const TDesC16 &, TPtrC16 &)
Get the value of a key within a section
-
Post-condition
-
aKeyValue now points to the key value
Parameters
const
TDesC16
& aSectionName
|
the section where the key resides
|
const
TDesC16
& aKey
|
the key name
|
TPtrC16
& aValue
|
pointer to the key value
|
GetSectionList(RArray< TPtrC16 > &)
Get an array of the section name present in the ini document object Note that any items inside this array will be cleared and the array will be populated with the sections' names from this document object.
-
Post-condition
-
aSectionList contains all the section name in the document object
Parameters
RArray
<
TPtrC16
> & aSectionList
|
an array of descriptor to contain the section name
|
NewL(RFs &, const TDesC &)
Opening 16 bit ini file for reading.If the supplied file name is a valid ini file, it will instantiate the object and read the content of the ini file.If file not found it will simply instantiate the object. The file is opened for read only and close directly after the construction of this object is complete.
User
will need to explicitly call Externalise(aFileName) to write the content back to ini file.
Parameters
RFs
& aFs
|
the handle to the file session
|
const
TDesC
& aFileName
|
the ini file name to read from
|
RemoveKey(const TDesC16 &, const TDesC16 &)
Remove an existing key within a section if supplied section or key name does not exist, it does nothing
-
Post-condition
-
if exist that key is removed from the section
Parameters
const
TDesC16
& aSectionName
|
the name of the section where the key resides
|
const
TDesC16
& aKey
|
the name of the key to be removed
|
RemoveSection(const TDesC16 &)
IMPORT_C
TInt
|
RemoveSection
|
(
|
const
TDesC16
&
|
aSectionName
|
)
|
|
Remove an existing section from the ini document object
-
Post-condition
-
if exist that section is removed from the document object
Parameters
const
TDesC16
& aSectionName
|
the name of the section to be removed
|
SetKey(const TDesC16 &, const TDesC16 &, const TDesC16 &)
Set the value of a key within a section. This API offers the following flexibility: -If section does not exist,create a section and key and value -If section exists but key does not exist, create the key and value -Else replace the existing key value with the new value
Parameters
const
TDesC16
& aSectionName
|
the name of the section
|
const
TDesC16
& aKey
|
the name of the key
|
const
TDesC16
& aValue
|
the new value for this key
|
Member Data Documentation
CIniDocument16Impl * iImpl
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.