Buteo Synchronization Framework
Public Member Functions | List of all members
Buteo::SyncLog Class Reference

History of completed synchronization sessions and their results. More...

#include <SyncLog.h>

Public Member Functions

 SyncLog (const QString &aProfileName)
 Constructs an empty log with the given profile name.
 
 SyncLog (const QDomElement &aRoot)
 Constructs a SyncLog from XML.
 
 SyncLog (const SyncLog &aSource)
 Copy constructor.
 
 ~SyncLog ()
 Destructor.
 
void setProfileName (const QString &aProfileName)
 Sets the name of the profile that owns this log.
 
QString profileName () const
 Gets the name of the profile that owns this log.
 
QDomElement toXml (QDomDocument &aDoc) const
 Exports the log to XML.
 
const SyncResultslastResults () const
 Gets the most recent results in the sync log.
 
QList< const SyncResults * > allResults () const
 Gets all results in the sync log.
 
const SyncResultslastSuccessfulResults () const
 Gets the last successful results in the sync log.
 
void addResults (const SyncResults &aResults)
 Adds results to the sync log. Also makes sure that log size doesn't exceed given size limit.
 

Detailed Description

History of completed synchronization sessions and their results.

Each SyncProfile has its own SyncLog associated to it. Loading and saving of SyncLog objects is handled by the ProfileManager. SyncLog is composed of SyncResults objects, one for each completed sync session.

Constructor & Destructor Documentation

◆ SyncLog() [1/3]

SyncLog::SyncLog ( const QString & aProfileName)
explicit

Constructs an empty log with the given profile name.

Parameters
aProfileNameName of the profile this log is related to.

◆ SyncLog() [2/3]

SyncLog::SyncLog ( const QDomElement & aRoot)
explicit

Constructs a SyncLog from XML.

Parameters
aRootRoot element of the XML representation of the log.

◆ SyncLog() [3/3]

SyncLog::SyncLog ( const SyncLog & aSource)

Copy constructor.

Parameters
aSourceCopy source.

Member Function Documentation

◆ addResults()

void SyncLog::addResults ( const SyncResults & aResults)

Adds results to the sync log. Also makes sure that log size doesn't exceed given size limit.

Parameters
aResultsResults to add.

◆ allResults()

QList< const SyncResults * > SyncLog::allResults ( ) const

Gets all results in the sync log.

Returns
List of results. The results are ordered by time so that the oldest results object is first in the list.

◆ lastResults()

const SyncResults * SyncLog::lastResults ( ) const

Gets the most recent results in the sync log.

Returns
The results. NULL if the log is empty.

◆ lastSuccessfulResults()

const SyncResults * SyncLog::lastSuccessfulResults ( ) const

Gets the last successful results in the sync log.

Returns
The results. NULL if no successful result have already been registered.

◆ profileName()

QString SyncLog::profileName ( ) const

Gets the name of the profile that owns this log.

Returns
Profile name.

◆ toXml()

QDomElement SyncLog::toXml ( QDomDocument & aDoc) const

Exports the log to XML.

Parameters
aDocParent document for the created XML elements. The created elements are not inserted to the document by this function, but the document is still required for creating the elements.
Returns
Root element of the created XML.

The documentation for this class was generated from the following files: