• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KHolidays Library

holidayparserdriver_p.h

00001 /*
00002   This file is part of the kholidays library.
00003 
00004   Copyright 2010 John Layt <john@layt.net>
00005 
00006   This library is free software; you can redistribute it and/or
00007   modify it under the terms of the GNU Library General Public
00008   License as published by the Free Software Foundation; either
00009   version 2 of the License, or (at your option) any later version.
00010 
00011   This library is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014   GNU Library General Public License for more details.
00015 
00016   You should have received a copy of the GNU Library General Public License
00017   along with this library; see the file COPYING.LIB.  If not, write to the
00018   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019   Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KHOLIDAYS_HOLIDAYPARSERDRIVER_P_H
00023 #define KHOLIDAYS_HOLIDAYPARSERDRIVER_P_H
00024 
00025 #include <QDate>
00026 #include <QString>
00027 
00028 #include "holiday.h"
00029 
00030 class KCalendarSystem;
00031 
00032 namespace KHolidays {
00033 
00044 class HolidayParserDriver
00045 {
00046   public:
00047 
00054     explicit HolidayParserDriver( const QString &filePath );
00055 
00059     virtual ~HolidayParserDriver();
00060 
00069     virtual QString fileCountryCode() const;
00070 
00079     virtual QString fileLanguageCode() const;
00080 
00086     virtual QString fileName() const;
00087 
00093     virtual QString fileDescription() const;
00094 
00103     virtual Holiday::List parseHolidays( const QDate &startDate, const QDate &endDate );
00104 
00113     virtual Holiday::List parseHolidays( const QDate &date );
00114 
00125     virtual Holiday::List parseHolidays( int calendarYear, const QString &calendarType );
00126 
00132     virtual void error( const QString &errorMessage );
00133 
00134   protected:
00138     virtual void parse();
00139 
00143     virtual void parseMetadata();
00144 
00150     virtual void setParseCalendar( const QString &calendarType );
00151 
00155     virtual void setParseStartEnd();
00156 
00157     QString          m_filePath;           // File to be parsed
00158 
00159     QString          m_fileCountryCode;    // File country code in ISO 3166-2 standard
00160     QString          m_fileLanguageCode;   // File language
00161     QString          m_fileName;           // File name
00162     QString          m_fileDescription;    // File description
00163 
00164     QDate            m_requestStart;       // First day of period being requested
00165     QDate            m_requestEnd;         // Last day of period being requested
00166 
00167     Holiday::List    m_resultList;         // List of requested holidays
00168 
00169     KCalendarSystem *m_parseCalendar;      // Calendar system being parsed
00170     int              m_parseYear;          // Year currently being parsed
00171     int              m_parseStartYear;     // First year to parse in parse calendar
00172     int              m_parseEndYear;       // Last year to parse in parse calendar
00173 };
00174 
00175 }
00176 
00177 #endif // KHOLIDAYS_HOLIDAYPARSERDRIVER_P_H

KHolidays Library

Skip menu "KHolidays Library"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal