#include <SyncSourceConfig.h>
Public Member Functions | |
SyncSourceConfig () | |
~SyncSourceConfig () | |
const char * | getName () const |
void | setName (const char *n) |
const char * | getURI () const |
void | setURI (const char *u) |
const char * | getSyncModes () const |
void | setSyncModes (const char *s) |
const char * | getType () const |
void | setType (const char *t) |
const char * | getSync () const |
void | setSync (const char *s) |
const char * | getEncoding () const |
void | setEncoding (const char *s) |
const char * | getVersion () const |
void | setVersion (const char *n) |
const char * | getSupportedTypes () const |
void | setSupportedTypes (const char *s) |
void | setLast (unsigned long timestamp) |
unsigned long | getLast () const |
const char * | getEncryption () const |
void | setEncryption (const char *n) |
const ArrayList & | getCtCaps () const |
ArrayList & | getCtCaps () |
void | addCtCap (ArrayList *props, const char *ct_Type=0, const char *ver_CT=0, int fLevel=FLEVEL_UNDEFINED) |
void | assign (const SyncSourceConfig &sc) |
bool | getFieldLevel () |
SyncSourceConfig & | operator= (const SyncSourceConfig &sc) |
Protected Member Functions | |
CTCap * | createCtCap (ArrayList *props, const char *ct_Type, const char *ver_CT, bool fLevel) |
Protected Attributes | |
char * | name |
char * | uri |
char * | syncModes |
char * | type |
char * | sync |
char * | encodings |
char * | version |
char * | supportedTypes |
char * | encryption |
unsigned long | last |
bool | fieldLevel |
ArrayList | ctCaps |
Definition at line 54 of file SyncSourceConfig.h.
SyncSourceConfig::SyncSourceConfig | ( | ) |
Constructs a new SyncSourceConfig object
SyncSourceConfig::~SyncSourceConfig | ( | ) |
Destructor
void SyncSourceConfig::addCtCap | ( | ArrayList * | props, | |
const char * | ct_Type = 0 , |
|||
const char * | ver_CT = 0 , |
|||
int | fLevel = FLEVEL_UNDEFINED | |||
) |
add a CTCap to the ArrayList. If ctType, verCT and FieldLevel are null we set a CTCap with the default verCT, fieldLevel and ctType taken from the config
the fieldLevel param has three status FLEVEL_DISABLED - to disable the FieldLevel param in the CtCap FLEVEL_ENABLED - to enable the FieldLevel param in the CtCap FLEVEL_UNDEFINED - not set. In this case the code sets the param to the value in the config. Now setted to disable the FieldLevel param
ArrayList* | props - the arrayList with the properties | |
const | char* ct_Type - optional | |
const | char* ver_CT - optional | |
int | fieldLevel - three different status |
void SyncSourceConfig::assign | ( | const SyncSourceConfig & | sc | ) |
Initialize this object with the given SyncSourceConfig
sc | the source config object |
Referenced by operator=().
CTCap* SyncSourceConfig::createCtCap | ( | ArrayList * | props, | |
const char * | ct_Type, | |||
const char * | ver_CT, | |||
bool | fLevel | |||
) | [protected] |
Create a new CTCap object, based on the current source configuration. To obtain a complete CTCap, the client must have set previously the list of CTCap properties with the method setCtCapProperties().
ArrayList& SyncSourceConfig::getCtCaps | ( | ) | [inline] |
const ArrayList& SyncSourceConfig::getCtCaps | ( | ) | const [inline, virtual] |
Sets the list of properties to use in the CTCap sent to the server in the DevInfo.
props | an ArrayList of Property Returns the list of properties to use in the CTCap sent to the server in the DevInfo. |
an ArrayList of CTCap
Implements AbstractSyncSourceConfig.
Definition at line 247 of file SyncSourceConfig.h.
References ctCaps.
const char* SyncSourceConfig::getEncoding | ( | ) | const [virtual] |
Specifies how the content of an outgoing item should be encoded by the client library if the sync source does not set an encoding on the item that it created. Valid values are listed in SyncItem::encodings.
Implements AbstractSyncSourceConfig.
const char* SyncSourceConfig::getEncryption | ( | ) | const [virtual] |
Specifies if the content of an outgoing item should be encrypted. If this property is not empty and valid, the 'encodings' value is ignored for outgoing items. The only valid value is "des".
Implements AbstractSyncSourceConfig.
bool SyncSourceConfig::getFieldLevel | ( | ) | [inline] |
Return fieldLevel param. Not implemented yet. Now just returns false
Definition at line 280 of file SyncSourceConfig.h.
unsigned long SyncSourceConfig::getLast | ( | ) | const [virtual] |
Returns the last sync timestamp
Implements AbstractSyncSourceConfig.
const char* SyncSourceConfig::getName | ( | ) | const [virtual] |
Returns the SyncSource name.
Implements AbstractSyncSourceConfig.
const char* SyncSourceConfig::getSupportedTypes | ( | ) | const [virtual] |
A string representing the source types (with versions) supported by the SyncSource. The string must be formatted as a sequence of "type:version" separated by commas ','. For example: "text/x-vcard:2.1,text/vcard:3.0". The version can be left empty, for example: "text/x-s4j-sifc:". Supported types will be sent as part of the DevInf.
Implements AbstractSyncSourceConfig.
const char* SyncSourceConfig::getSync | ( | ) | const [virtual] |
Gets the default syncMode as one of the strings listed in setSyncModes.
Implements AbstractSyncSourceConfig.
const char* SyncSourceConfig::getSyncModes | ( | ) | const [virtual] |
Returns a comma separated list of the possible syncModes for the SyncSource. Sync modes can be one of
Implements AbstractSyncSourceConfig.
const char* SyncSourceConfig::getType | ( | ) | const [virtual] |
Returns the mime type of the items handled by the sync source.
Implements AbstractSyncSourceConfig.
const char* SyncSourceConfig::getURI | ( | ) | const [virtual] |
Returns the SyncSource URI (used in SyncML addressing).
Implements AbstractSyncSourceConfig.
const char* SyncSourceConfig::getVersion | ( | ) | const [virtual] |
Returns the version of the source type used by client.
Implements AbstractSyncSourceConfig.
SyncSourceConfig& SyncSourceConfig::operator= | ( | const SyncSourceConfig & | sc | ) | [inline] |
void SyncSourceConfig::setEncoding | ( | const char * | s | ) |
void SyncSourceConfig::setEncryption | ( | const char * | n | ) |
Sets the encryption type
n | the encryption type |
void SyncSourceConfig::setLast | ( | unsigned long | timestamp | ) | [virtual] |
Sets the last sync timestamp
timestamp | the last sync timestamp |
Implements AbstractSyncSourceConfig.
void SyncSourceConfig::setName | ( | const char * | n | ) |
void SyncSourceConfig::setSupportedTypes | ( | const char * | s | ) |
Sets the supported source types for this source.
s | the supported types string |
void SyncSourceConfig::setSync | ( | const char * | s | ) |
Returns the default syncMode as one of the strings above.
void SyncSourceConfig::setSyncModes | ( | const char * | s | ) |
Sets the available syncModes for the SyncSource as comma separated values.
s | the new list |
void SyncSourceConfig::setType | ( | const char * | t | ) |
Sets the mime type of the items handled by the sync source.
t | the mime type |
void SyncSourceConfig::setURI | ( | const char * | u | ) |
void SyncSourceConfig::setVersion | ( | const char * | n | ) |
ArrayList SyncSourceConfig::ctCaps [protected] |
char* SyncSourceConfig::encodings [protected] |
Definition at line 63 of file SyncSourceConfig.h.
char* SyncSourceConfig::encryption [protected] |
Definition at line 66 of file SyncSourceConfig.h.
bool SyncSourceConfig::fieldLevel [protected] |
Definition at line 70 of file SyncSourceConfig.h.
unsigned long SyncSourceConfig::last [protected] |
Definition at line 68 of file SyncSourceConfig.h.
char* SyncSourceConfig::name [protected] |
Definition at line 58 of file SyncSourceConfig.h.
char* SyncSourceConfig::supportedTypes [protected] |
Definition at line 65 of file SyncSourceConfig.h.
char* SyncSourceConfig::sync [protected] |
Definition at line 62 of file SyncSourceConfig.h.
char* SyncSourceConfig::syncModes [protected] |
Definition at line 60 of file SyncSourceConfig.h.
char* SyncSourceConfig::type [protected] |
Definition at line 61 of file SyncSourceConfig.h.
char* SyncSourceConfig::uri [protected] |
Definition at line 59 of file SyncSourceConfig.h.
char* SyncSourceConfig::version [protected] |
Definition at line 64 of file SyncSourceConfig.h.