Buteo Synchronization Framework: Buteo::SyncLog Class Reference

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. More...
| SyncLog (const QDomElement &aRoot)
| Constructs a SyncLog from XML. More...
| SyncLog (const SyncLog &aSource)
| Copy constructor. More...
| ~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. More...
QDomElement | toXml (QDomDocument &aDoc) const
| Exports the log to XML. More...
const SyncResults * | lastResults () const
| Gets the most recent results in the sync log. More...
QList< const SyncResults * > | allResults () const
| Gets all results in the sync log. More...
const SyncResults * | lastSuccessfulResults () const
| Gets the last successful results in the sync log. More...
void | addResults (const SyncResults &aResults)
| Adds results to the sync log. Also makes sure that log size doesn't exceed given size limit. More...

## 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

  aProfileName | Name of the profile this log is related to.

## ◆ SyncLog() [2/3]

SyncLog::SyncLog | ( | const QDomElement & | aRoot | ) |
| explicit

Constructs a SyncLog from XML.

Parameters

  aRoot | Root element of the XML representation of the log.

## ◆ SyncLog() [3/3]

SyncLog::SyncLog | ( | const SyncLog & | aSource | ) |

Copy constructor.

Parameters

  aSource | Copy 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

  aResults | Results 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

  aDoc | Parent 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:

- SyncLog.h
- SyncLog.cpp