2
* This file is part of buteo-syncfw package
4
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6
* Contact: Sateesh Kavuri <sateesh.kavuri@nokia.com>
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public License
10
* version 2.1 as published by the Free Software Foundation.
12
* This library is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with this library; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25
#ifndef SYNCSCHEDULE_P_H
26
#define SYNCSCHEDULE_P_H
33
// Private implementation class for SyncSchedule.
34
class SyncSchedulePrivate
37
SyncSchedulePrivate();
39
SyncSchedulePrivate(const SyncSchedulePrivate &aSource);
41
/*! \brief Parses week day numbers from a string.
43
* \param aDays String containing the week day numbers.
44
* \return Set of week day numbers.
46
DaySet parseDays(const QString &aDays) const;
48
/*! \brief Creates a string from a set of week day numbers.
50
* \param aDays Set of week day numbers.
51
* \return String of week day numbers.
53
QString createDays(const DaySet &aDays) const;
55
/*! \brief Adjusts given date to be in the set of given week days.
57
* Day is increased until the week day is contained in the given set of
59
* \param aTime Date/time to adjust.
60
* \param aDays Set of enabled week day numbers.
61
* \return Was day adjusted to a valid day. If the week day was already in
62
* the set of given week days, this function returns false. If the day
63
* set does not contain any valid days, this function sets aTime to null
64
* object and returns false.
66
bool adjustDate(QDateTime &aTime, const DaySet &aDays) const;
68
/*! \brief Checks if the given date/time is inside rush hours.
70
* \param aTime Date/time to check.
71
* \return True if in rush hours.
73
bool isRush(const QDateTime &aTime) const;
87
unsigned iRushInterval;
94
#endif // SYNCSCHEDULE_P_H