Buteo Synchronization Framework
Public Member Functions | Public Attributes | List of all members
Buteo::SyncSchedulePrivate Class Reference

Private implementation class for SyncSchedule. More...

#include <SyncSchedule_p.h>

Public Member Functions

 SyncSchedulePrivate ()
 Constructor.
 
 SyncSchedulePrivate (const SyncSchedulePrivate &aSource)
 Copy Constructor.
 
DaySet parseDays (const QString &aDays) const
 Parses week day numbers from a string. More...
 
QString createDays (const DaySet &aDays) const
 Creates a string from a set of week day numbers. More...
 
bool adjustDate (QDateTime &aTime, const DaySet &aDays) const
 Adjusts given date to be in the set of given week days. More...
 
bool isRush (const QDateTime &aTime) const
 Checks if the given date/time is inside rush hours. More...
 

Public Attributes

DaySet iDays
 Number of Days before the next sync starts.
 
QTime iTime
 Sync Time.
 
QDateTime iScheduleConfiguredTime
 sync schedule configure time for intial update
 
unsigned int iInterval
 Time interval.
 
bool iEnabled
 
DaySet iRushDays
 indicates the schedule for rush hour - days
 
QTime iRushBegin
 indicates the schedule for rush hour start
 
QTime iRushEnd
 indicates the schedule for rush hour end
 
unsigned int iRushInterval
 Rush Hour Time interval.
 
bool iRushEnabled
 Indicates if Rush Hour is Enabled.
 
bool iExternalRushEnabled
 Indicates if External Rush Hour schedule is Enabled.
 

Detailed Description

Private implementation class for SyncSchedule.

Member Function Documentation

◆ adjustDate()

bool SyncSchedulePrivate::adjustDate ( QDateTime &  aTime,
const DaySet &  aDays 
) const

Adjusts given date to be in the set of given week days.

Day is increased until the week day is contained in the given set of week day numbers.

Parameters
aTimeDate/time to adjust.
aDaysSet of enabled week day numbers.
Returns
Was day adjusted to a valid day. If the week day was already in the set of given week days, this function returns false. If the day set does not contain any valid days, this function sets aTime to null object and returns false.

◆ createDays()

QString SyncSchedulePrivate::createDays ( const DaySet &  aDays) const

Creates a string from a set of week day numbers.

Parameters
aDaysSet of week day numbers.
Returns
String of week day numbers.

◆ isRush()

bool SyncSchedulePrivate::isRush ( const QDateTime &  aTime) const

Checks if the given date/time is inside rush hours.

Parameters
aTimeDate/time to check.
Returns
True if in rush hours.

◆ parseDays()

DaySet SyncSchedulePrivate::parseDays ( const QString &  aDays) const

Parses week day numbers from a string.

Parameters
aDaysString containing the week day numbers.
Returns
Set of week day numbers.

The documentation for this class was generated from the following files: