SyncLog.h
/*
* This file is part of buteo-syncfw package
*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Contact: Sateesh Kavuri <sateesh.kavuri@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef SYNCLOG_H
#define SYNCLOG_H
#include <QList>
#include <QString>
#include "SyncResults.h"
class QDomDocument;
class QDomElement;
namespace Buteo {
class SyncLogPrivate;
class SyncLogTest;
class SyncLog
{
public:
explicit SyncLog(const QString &aProfileName);
explicit SyncLog(const QDomElement &aRoot);
SyncLog(const SyncLog &aSource);
~SyncLog();
void setProfileName(const QString &aProfileName);
QString profileName() const;
QDomElement toXml(QDomDocument &aDoc) const;
const SyncResults *lastResults() const;
QList<const SyncResults *> allResults() const;
const SyncResults *lastSuccessfulResults() const;
void addResults(const SyncResults &aResults);
private:
SyncLog &operator=(const SyncLog &aRhs);
SyncLogPrivate *d_ptr;
};
}
#endif // SYNCLOG_H
Buteo::SyncLog::profileName
QString profileName() const
Gets the name of the profile that owns this log.
Definition SyncLog.cpp:144
Buteo::SyncLog::setProfileName
void setProfileName(const QString &aProfileName)
Sets the name of the profile that owns this log.
Definition SyncLog.cpp:138
Buteo::SyncLog::addResults
void addResults(const SyncResults &aResults)
Adds results to the sync log. Also makes sure that log size doesn't exceed given size limit.
Definition SyncLog.cpp:186
Buteo::SyncLog::lastResults
const SyncResults * lastResults() const
Gets the most recent results in the sync log.
Definition SyncLog.cpp:166
Buteo::SyncLog::toXml
QDomElement toXml(QDomDocument &aDoc) const
Exports the log to XML.
Definition SyncLog.cpp:149
Buteo::SyncLog::SyncLog
SyncLog(const QString &aProfileName)
Constructs an empty log with the given profile name.
Definition SyncLog.cpp:107
Buteo::SyncLog::lastSuccessfulResults
const SyncResults * lastSuccessfulResults() const
Gets the last successful results in the sync log.
Definition SyncLog.cpp:181
Buteo::SyncLog::allResults
QList< const SyncResults * > allResults() const
Gets all results in the sync log.
Definition SyncLog.cpp:176
Buteo::SyncLog::~SyncLog
~SyncLog()
Destructor.
Definition SyncLog.cpp:132
Buteo::SyncResults
Contains information about a completed synchronization session.
Definition SyncResults.h:67
QList
Definition SyncBackupAdaptor.h:40