Buteo Synchronization Framework: SyncSchedule_p.h Source File

Buteo Synchronization Framework

SyncSchedule_p.h
1 /*
2 * This file is part of buteo-syncfw package
3 *
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 * Copyright (C) 2014-2015 Jolla Ltd.
6 *
7 * Contact: Sateesh Kavuri <sateesh.kavuri@nokia.com>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * version 2.1 as published by the Free Software Foundation.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24 #ifndef SYNCSCHEDULE_P_H
25 #define SYNCSCHEDULE_P_H
26
27 #include <QDateTime>
28 #include <QString>
29
30 namespace Buteo {
31
33 class SyncSchedulePrivate
34 {
35 public:
39 SyncSchedulePrivate();
40
44 SyncSchedulePrivate(const SyncSchedulePrivate &aSource);
45
51 DaySet parseDays(const QString &aDays) const;
52
58 QString createDays(const DaySet &aDays) const;
59
71 bool adjustDate(QDateTime &aTime, const DaySet &aDays) const;
72
78 bool isRush(const QDateTime &aTime) const;
79
81 DaySet iDays;
82
84 QTime iTime;
85
87 QDateTime iScheduleConfiguredTime;
88
90 unsigned int iInterval;
91
92 bool iEnabled;
93
94 // ============ RUSH HOUR SETTINGS ===========
95
97 DaySet iRushDays;
98
100 QTime iRushBegin;
101
103 QTime iRushEnd;
104
106 unsigned int iRushInterval;
107
109 bool iRushEnabled;
110
112 bool iExternalRushEnabled;
113 };
114
115 }
116
117 #endif // SYNCSCHEDULE_P_H
Buteo::SyncSchedulePrivate
Private implementation class for SyncSchedule.
Definition: SyncSchedule_p.h:34
Buteo::SyncSchedulePrivate::iRushEnd
QTime iRushEnd
indicates the schedule for rush hour end
Definition: SyncSchedule_p.h:103
Buteo::SyncSchedulePrivate::iInterval
unsigned int iInterval
Time interval.
Definition: SyncSchedule_p.h:90
Buteo::SyncSchedulePrivate::iTime
QTime iTime
Sync Time.
Definition: SyncSchedule_p.h:84
Buteo::SyncSchedulePrivate::iExternalRushEnabled
bool iExternalRushEnabled
Indicates if External Rush Hour schedule is Enabled.
Definition: SyncSchedule_p.h:112
Buteo::SyncSchedulePrivate::iRushEnabled
bool iRushEnabled
Indicates if Rush Hour is Enabled.
Definition: SyncSchedule_p.h:109
Buteo::SyncSchedulePrivate::iDays
DaySet iDays
Number of Days before the next sync starts.
Definition: SyncSchedule_p.h:81
Buteo::SyncSchedulePrivate::SyncSchedulePrivate
SyncSchedulePrivate()
Constructor.
Definition: SyncSchedule.cpp:38
Buteo::SyncSchedulePrivate::adjustDate
bool adjustDate(QDateTime &aTime, const DaySet &aDays) const
Adjusts given date to be in the set of given week days.
Definition: SyncSchedule.cpp:590
Buteo::SyncSchedulePrivate::parseDays
DaySet parseDays(const QString &aDays) const
Parses week day numbers from a string.
Definition: SyncSchedule.cpp:561
Buteo::SyncSchedulePrivate::createDays
QString createDays(const DaySet &aDays) const
Creates a string from a set of week day numbers.
Definition: SyncSchedule.cpp:579
Buteo::SyncSchedulePrivate::iRushBegin
QTime iRushBegin
indicates the schedule for rush hour start
Definition: SyncSchedule_p.h:100
Buteo::SyncSchedulePrivate::iRushDays
DaySet iRushDays
indicates the schedule for rush hour - days
Definition: SyncSchedule_p.h:97
Buteo::SyncSchedulePrivate::iRushInterval
unsigned int iRushInterval
Rush Hour Time interval.
Definition: SyncSchedule_p.h:106
Buteo::SyncSchedulePrivate::iScheduleConfiguredTime
QDateTime iScheduleConfiguredTime
sync schedule configure time for intial update
Definition: SyncSchedule_p.h:87
Buteo::SyncSchedulePrivate::isRush
bool isRush(const QDateTime &aTime) const
Checks if the given date/time is inside rush hours.
Definition: SyncSchedule.cpp:615