SyncSchedule_p.h
/*
* This file is part of buteo-syncfw package
*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
* Copyright (C) 2014-2015 Jolla Ltd.
*
* 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 SYNCSCHEDULE_P_H
#define SYNCSCHEDULE_P_H
#include <QDateTime>
#include <QString>
#include "SyncSchedule.h"
namespace Buteo {
class SyncSchedulePrivate
{
public:
SyncSchedulePrivate();
SyncSchedulePrivate(const SyncSchedulePrivate &aSource);
static bool daysMatch(SyncSchedule::Days aDays, int aDay);
SyncSchedule::Days parseDays(const QString &aDays) const;
QString createDays(SyncSchedule::Days aDays) const;
bool adjustDate(QDateTime &aTime, SyncSchedule::Days aDays) const;
bool isRush(const QDateTime &aTime) const;
SyncSchedule::Days iDays;
QTime iTime;
QDateTime iScheduleConfiguredTime;
unsigned int iInterval;
bool iEnabled;
// ============ RUSH HOUR SETTINGS ===========
SyncSchedule::Days iRushDays;
QTime iRushBegin;
QTime iRushEnd;
unsigned int iRushInterval;
bool iRushEnabled;
bool iExternalRushEnabled;
};
}
#endif // SYNCSCHEDULE_P_H
Buteo::SyncSchedulePrivate::iDays
SyncSchedule::Days iDays
Days for the sync.
Definition SyncSchedule_p.h:91
Buteo::SyncSchedulePrivate::iRushEnd
QTime iRushEnd
indicates the schedule for rush hour end
Definition SyncSchedule_p.h:113
Buteo::SyncSchedulePrivate::createDays
QString createDays(SyncSchedule::Days aDays) const
Creates a string from a set of week day numbers.
Definition SyncSchedule.cpp:586
Buteo::SyncSchedulePrivate::iInterval
unsigned int iInterval
Time interval.
Definition SyncSchedule_p.h:100
Buteo::SyncSchedulePrivate::iTime
QTime iTime
Sync Time.
Definition SyncSchedule_p.h:94
Buteo::SyncSchedulePrivate::daysMatch
static bool daysMatch(SyncSchedule::Days aDays, int aDay)
Tell if aDays contains aDay.
Definition SyncSchedule.cpp:615
Buteo::SyncSchedulePrivate::iExternalRushEnabled
bool iExternalRushEnabled
Indicates if External Rush Hour schedule is Enabled.
Definition SyncSchedule_p.h:122
Buteo::SyncSchedulePrivate::iRushEnabled
bool iRushEnabled
Indicates if Rush Hour is Enabled.
Definition SyncSchedule_p.h:119
Buteo::SyncSchedulePrivate::adjustDate
bool adjustDate(QDateTime &aTime, SyncSchedule::Days aDays) const
Adjusts given date to be in the set of given week days.
Definition SyncSchedule.cpp:626
Buteo::SyncSchedulePrivate::SyncSchedulePrivate
SyncSchedulePrivate()
Constructor.
Definition SyncSchedule.cpp:38
Buteo::SyncSchedulePrivate::iRushDays
SyncSchedule::Days iRushDays
indicates the schedule for rush hour - days
Definition SyncSchedule_p.h:107
Buteo::SyncSchedulePrivate::iRushBegin
QTime iRushBegin
indicates the schedule for rush hour start
Definition SyncSchedule_p.h:110
Buteo::SyncSchedulePrivate::iRushInterval
unsigned int iRushInterval
Rush Hour Time interval.
Definition SyncSchedule_p.h:116
Buteo::SyncSchedulePrivate::parseDays
SyncSchedule::Days parseDays(const QString &aDays) const
Parses week day numbers from a string.
Definition SyncSchedule.cpp:563
Buteo::SyncSchedulePrivate::iScheduleConfiguredTime
QDateTime iScheduleConfiguredTime
sync schedule configure time for intial update
Definition SyncSchedule_p.h:97
Buteo::SyncSchedulePrivate::isRush
bool isRush(const QDateTime &aTime) const
Checks if the given date/time is inside rush hours.
Definition SyncSchedule.cpp:651