PropertyFile Class Reference
[Sync Client]

This is the implementation of the keyValueStore on filesystem. More...

#include <PropertyFile.h>

Inheritance diagram for PropertyFile:

Inheritance graph
[legend]
Collaboration diagram for PropertyFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PropertyFile (const char *n)
 The name of the general node.
int close ()
 Store the current properties that are in the data arraylist in the filesystem.
int setPropertyValue (const char *prop, const char *value)
 The setPropertyValue of the PropertyFile calls the super implementation and then write in the journal list with a simple append.
int removeProperty (const char *prop)
 To remove the property, also the journal has to be updated.
int removeAllProperties ()
 It remove all the properties in memory and in the storage.
bool separateKeyValue (StringBuffer &s, StringBuffer &key, StringBuffer &value)
 It sepatares from the line read from the property file the key and value.

Detailed Description

This is the implementation of the keyValueStore on filesystem.

It provides methods to read and write in the filesystem the arraylist of KeyValuePair


Member Function Documentation

int PropertyFile::close (  )  [virtual]

Store the current properties that are in the data arraylist in the filesystem.

It deletes the journal too

Implements MemoryKeyValueStore.

int PropertyFile::setPropertyValue ( const char *  prop,
const char *  value 
) [virtual]

The setPropertyValue of the PropertyFile calls the super implementation and then write in the journal list with a simple append.

Parameters:
prop - the name of the prop
value - the value

Reimplemented from MemoryKeyValueStore.

int PropertyFile::removeProperty ( const char *  prop  )  [virtual]

To remove the property, also the journal has to be updated.

In the case, it is always updated with an append so at the next read it can be fixed

Reimplemented from MemoryKeyValueStore.

bool PropertyFile::separateKeyValue ( StringBuffer &  s,
StringBuffer &  key,
StringBuffer &  value 
)

It sepatares from the line read from the property file the key and value.

It takes care


The documentation for this class was generated from the following file:
Generated on Wed Jan 14 17:15:47 2009 for Funambol C++ Client Library by  doxygen 1.5.2