summaryrefslogtreecommitdiffstats
path: root/kresources/tvanytime
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /kresources/tvanytime
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/tvanytime')
-rw-r--r--kresources/tvanytime/AUTHORS1
-rw-r--r--kresources/tvanytime/COPYING340
-rw-r--r--kresources/tvanytime/ChangeLog6
-rw-r--r--kresources/tvanytime/DESIGN22
-rw-r--r--kresources/tvanytime/Makefile.am27
-rw-r--r--kresources/tvanytime/README9
-rw-r--r--kresources/tvanytime/TODO9
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytime.cpp489
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytime.h129
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytime_plugin.cpp40
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp97
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytimeconfig.h61
-rw-r--r--kresources/tvanytime/kcal_tvanytime.desktop51
-rw-r--r--kresources/tvanytime/kcal_tvanytimeprefs.cpp33
-rw-r--r--kresources/tvanytime/kcal_tvanytimeprefs.h37
-rw-r--r--kresources/tvanytime/kcal_tvanytimeprefsbase.kcfgc11
-rw-r--r--kresources/tvanytime/kresources_kcal_tvanytime.kcfg20
-rw-r--r--kresources/tvanytime/service.cpp224
-rw-r--r--kresources/tvanytime/service.h111
-rw-r--r--kresources/tvanytime/tvanytime.kdevelop202
20 files changed, 1919 insertions, 0 deletions
diff --git a/kresources/tvanytime/AUTHORS b/kresources/tvanytime/AUTHORS
new file mode 100644
index 00000000..05ef12ec
--- /dev/null
+++ b/kresources/tvanytime/AUTHORS
@@ -0,0 +1 @@
+Will Stephenson <wstephenson@kde.org>
diff --git a/kresources/tvanytime/COPYING b/kresources/tvanytime/COPYING
new file mode 100644
index 00000000..5b6e7c66
--- /dev/null
+++ b/kresources/tvanytime/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/kresources/tvanytime/ChangeLog b/kresources/tvanytime/ChangeLog
new file mode 100644
index 00000000..fc31a7a2
--- /dev/null
+++ b/kresources/tvanytime/ChangeLog
@@ -0,0 +1,6 @@
+20050729
+Initial import.
+Supports parsing and displaying BBC Backstage schedule tarballs.
+Displays each channel as a subresource but requires a reload to show the
+subresources in the resource list.
+Takes a long time if every channel is enabled.
diff --git a/kresources/tvanytime/DESIGN b/kresources/tvanytime/DESIGN
new file mode 100644
index 00000000..b40b8877
--- /dev/null
+++ b/kresources/tvanytime/DESIGN
@@ -0,0 +1,22 @@
+Aim:
+Use Kontact as an EPG showing BBC TV and radio programs. Calendar KResource for BBC TV and radio schedules made available by the backstage.bbc.co.uk open tech portal. KResource can be used in other programs - kwintv?
+
+DESIGN: Fetch TVAnywhere tarballs via http. Parse contents using KArchive classes and QDom API. Present channel listing from tarball in resource config so that user can control which channels are shown in resource. Use subresources to show channels. Use categories for genre descriptors?
+
+Set alarms for programmes?
+Bookmark programmes?
+
+PROBLEMS: Tarball is huge. Ask about subdividing it?
+
+AIM: make generic TVAnywhere capable?
+
+Algorithm:
+Read ServiceInformation.
+Generate a subresource for each service
+read list of enabled subresources
+if null, assume bbc1, 2, 3, 4, radios 1 - 4?
+for enabled subresources, generate incidences for each program
+generate in-memory program information table keyed on CRID.
+generate an incidence for each <ScheduleEvent> in the program location table, using the values from the PIT.
+
+
diff --git a/kresources/tvanytime/Makefile.am b/kresources/tvanytime/Makefile.am
new file mode 100644
index 00000000..20792640
--- /dev/null
+++ b/kresources/tvanytime/Makefile.am
@@ -0,0 +1,27 @@
+INCLUDES = -I$(top_srcdir) $(all_includes)
+
+lib_LTLIBRARIES = libkcal_tvanytime.la
+
+libkcal_tvanytime_la_SOURCES = kcal_resourcetvanytime.cpp \
+ kcal_resourcetvanytimeconfig.cpp kcal_tvanytimeprefsbase.kcfgc kcal_tvanytimeprefs.cpp service.cpp
+
+libkcal_tvanytime_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) \
+ -version-info 1:0:0 -no-undefined
+libkcal_tvanytime_la_LIBADD = $(top_builddir)/libkcal/libkcal.la \
+ $(top_builddir)/libkdepim/libkdepim.la
+
+kde_module_LTLIBRARIES = kcal_tvanytime.la
+
+kcal_tvanytime_la_SOURCES = kcal_resourcetvanytime_plugin.cpp
+kcal_tvanytime_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
+kcal_tvanytime_la_LIBADD = libkcal_tvanytime.la
+
+kcal_servicedir = $(kde_servicesdir)/kresources/kcal
+kcal_service_DATA = kcal_tvanytime.desktop
+
+METASOURCES = AUTO
+
+messages: rc.cpp
+ $(EXTRACTRC) `find . -name "*.ui" -o -name "*.kcfg"` >> rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kres_tvanytime.pot
+noinst_HEADERS = service.h
diff --git a/kresources/tvanytime/README b/kresources/tvanytime/README
new file mode 100644
index 00000000..17ad628c
--- /dev/null
+++ b/kresources/tvanytime/README
@@ -0,0 +1,9 @@
+This is a KDE KResource for loading TV and radio schedule data in the TV-Anytime format into KDE applications as a calendar.
+
+Currently it only works with BBC schedule data as provided at http://backstage.bbc.co.uk/feeds/tvradio/
+
+To use, enter the full URL of the schedule tarball you want to view from the URL above.
+
+(C) 2005 Will Stephenson <wstephenson@kde.org>
+
+supported by backstage.bbc.co.uk
diff --git a/kresources/tvanytime/TODO b/kresources/tvanytime/TODO
new file mode 100644
index 00000000..bc2d8a1f
--- /dev/null
+++ b/kresources/tvanytime/TODO
@@ -0,0 +1,9 @@
+EASY
+Parse more fields (email addresses, webpages) and store as attachments.
+Allow the schedule timezone to be specified in the resource config.
+HARDER
+Fix subresource (channel) display at first load.
+Better caching to improve load times - stat the URL before fetching it.
+REQUIRES PROVIDER HELP
+Arrange a constant URL for the most recent data.
+
diff --git a/kresources/tvanytime/kcal_resourcetvanytime.cpp b/kresources/tvanytime/kcal_resourcetvanytime.cpp
new file mode 100644
index 00000000..6904d76a
--- /dev/null
+++ b/kresources/tvanytime/kcal_resourcetvanytime.cpp
@@ -0,0 +1,489 @@
+/*
+ This file is part of kdepim.
+
+ Copyright (c) 2005 Will Stephenson <wstephenson@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "kcal_resourcetvanytime.h"
+
+#include "kcal_tvanytimeprefsbase.h"
+#include "kcal_resourcetvanytimeconfig.h"
+
+#include <libkcal/icalformat.h>
+#include <libkcal/calendarlocal.h>
+#include <libkcal/confirmsavedialog.h>
+
+#include <libkdepim/kpimprefs.h>
+
+#include <qapplication.h>
+#include <qdom.h>
+#include <qdatetime.h>
+#include <qptrlist.h>
+#include <qregexp.h>
+#include <qstringlist.h>
+#include <qtimer.h>
+
+#include <kabc/locknull.h>
+#include <karchive.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kresources/configwidget.h>
+#include <kstandarddirs.h>
+#include <kstringhandler.h>
+#include <ktempfile.h>
+#include <ktar.h>
+#include <kurl.h>
+
+using namespace KCal;
+
+ResourceTVAnytime::ResourceTVAnytime()
+ : ResourceCached( 0 ), mLock( true )
+{
+ init();
+
+ mPrefs->addGroupPrefix( identifier() );
+}
+
+ResourceTVAnytime::ResourceTVAnytime( const KConfig *config )
+ : ResourceCached( config ), mLock( true )
+{
+ init();
+
+ mPrefs->addGroupPrefix( identifier() );
+
+ if ( config ) readConfig( config );
+}
+
+ResourceTVAnytime::~ResourceTVAnytime()
+{
+ disableChangeNotification();
+
+ delete mPrefs;
+ mPrefs = 0;
+}
+
+void ResourceTVAnytime::init()
+{
+ mDownloadJob = 0;
+ mProgress = 0;
+ mDestination = 0;
+
+ mIsShowingError = false;
+
+ mPrefs = new TVAnytimePrefsBase();
+
+ setType( "tvanytime" );
+
+ enableChangeNotification();
+
+ //setReadOnly( true );
+
+ connect( &mResourceChangedTimer, SIGNAL( timeout() ),
+ this, SLOT( slotEmitResourceChanged() ) );
+}
+
+TVAnytimePrefsBase *ResourceTVAnytime::prefs()
+{
+ return mPrefs;
+}
+
+void ResourceTVAnytime::readConfig( const KConfig *config )
+{
+ kdDebug() << "KCal::ResourceTVAnytime::readConfig()" << endl;
+
+ mPrefs->readConfig();
+
+ ResourceCached::readConfig( config );
+
+ QStringList defaultActive;
+ defaultActive << "BBCOne" << "BBCTwo" << "BBCThree" << "BBCROne" << "BBCRTwo" << "BBCRThree" << "BBCRFour";
+ mActiveServices = config->readListEntry( "ActiveServices", defaultActive );
+
+}
+
+void ResourceTVAnytime::writeConfig( KConfig *config )
+{
+ kdDebug() << "KCal::ResourceTVAnytime::writeConfig()" << endl;
+
+ ResourceCalendar::writeConfig( config );
+
+ mPrefs->writeConfig();
+
+ ResourceCached::writeConfig( config );
+ QStringList activeServices;
+ ServiceMap::ConstIterator it;
+ for ( it = mServiceMap.begin(); it != mServiceMap.end(); ++it )
+ if ( it.data().active() )
+ activeServices.append( it.key() );
+ config->writeEntry( "ActiveServices", activeServices );
+}
+
+bool ResourceTVAnytime::doOpen()
+{
+ return true;
+}
+
+void ResourceTVAnytime::doClose()
+{
+ ResourceCached::doClose();
+}
+
+bool ResourceTVAnytime::doLoad()
+{
+ kdDebug() << "ResourceTVAnytime::load()" << endl;
+
+ if ( mIsShowingError ) {
+ kdDebug() << "Still showing error" << endl;
+ return true;
+ }
+
+ if ( mDownloadJob ) {
+ kdWarning() << "Download still in progress" << endl;
+ return false;
+ }
+
+ mUidMap.clear();
+ mCalendar.close();
+
+ disableChangeNotification();
+ // FIXME - reenable cache
+ loadCache(); // TODO: default loadCache() won't set up the subresources...
+ enableChangeNotification();
+
+ emit resourceChanged( this );
+
+ clearChanges();
+
+ mDestination = new KTempFile;
+ KURL url( prefs()->url() );
+
+ KURL destination = KURL( mDestination->name() );
+
+ kdDebug(5850) << " SOURCE: " << url.url() << endl;
+ kdDebug(5850) << " DESTINATION: " << destination.url() << endl;
+
+ // TODO: find out if the file to download is fresh. if not, just work with the cache.
+ mDownloadJob = KIO::file_copy( url, destination, -1, true );
+ connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
+ SLOT( slotJobResult( KIO::Job * ) ) );
+
+ mProgress = KPIM::ProgressManager::instance()->createProgressItem(
+ KPIM::ProgressManager::getUniqueID(), i18n("Downloading program schedule") );
+
+ connect( mProgress,
+ SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ SLOT( cancelLoad() ) );
+
+ return true;
+}
+
+void ResourceTVAnytime::slotJobResult( KIO::Job *job )
+{
+ kdDebug() << "ResourceTVAnytime::slotJobResult(): " << endl;
+
+ if ( job->error() ) {
+ mIsShowingError = true;
+ loadError( job->errorString() );
+ mIsShowingError = false;
+ delete mDestination;
+ mDestination = 0;
+ } else {
+ disableChangeNotification();
+
+ clearCache();
+
+ // FIXME: This does not take into account the time zone!
+
+ readSchedule();
+
+ // FIXME - reenable cache
+ saveCache();
+ enableChangeNotification();
+
+ clearChanges();
+
+ emit resourceChanged( this );
+ emit resourceLoaded( this );
+ }
+
+ mDownloadJob = 0;
+ if ( mProgress ) mProgress->setComplete();
+ mProgress = 0;
+ delete mDestination;
+ mDestination = 0;
+}
+
+QDomDocument ResourceTVAnytime::archiveFileXml( const QString & name )
+{
+ QDomDocument result;
+ const KArchiveDirectory *dir = mScheduleArchive->directory();
+ const KArchiveEntry * entry = dir->entry( name );
+ if ( entry && entry->isFile() )
+ {
+ const KArchiveFile * file = static_cast<const KArchiveFile *>( entry );
+ result.setContent( file->data() );
+ }
+ return result;
+}
+
+bool ResourceTVAnytime::readSchedule()
+{
+ QString uncompress = "application/x-gzip";
+ mScheduleArchive = new KTar( mDestination->name(), uncompress );
+ mScheduleArchive->open( IO_ReadOnly );
+
+ QDomDocument serviceInfo = archiveFileXml( "ServiceInformation.xml" );
+ if ( !serviceInfo.isNull() )
+ readServiceInformation( serviceInfo );
+
+
+ ServiceMap::Iterator it;
+ // for each date in the tarball/or user preference:
+#if 1
+ for ( it = mServiceMap.begin(); it != mServiceMap.end(); ++it )
+ {
+ if ( (it.data().active() ) )
+ readService( it.key() );
+ }
+#else
+ QString serviceId = "BBCOne";
+ Service s = mServiceMap[ serviceId ];
+ if ( s.active() )
+ readService( serviceId );
+#endif
+
+ mScheduleArchive->close();
+ return true;
+}
+
+bool ResourceTVAnytime::readServiceInformation( const QDomDocument & serviceInfo )
+{
+ kdDebug() << k_funcinfo << endl;
+ QDomElement docElem = serviceInfo.documentElement();
+
+ QDomNode n = docElem.firstChild();
+ while( !n.isNull() ) {
+ QDomElement e = n.toElement(); // try to convert the node to an element.
+ if( !e.isNull() && e.tagName() == "ProgramDescription" ) {
+ QDomNode n2 = e.firstChild();
+ QDomElement e2 = n2.toElement();
+ if( !e2.isNull() && e2.tagName() == "ServiceInformationTable" ) {
+ QDomNode n3 = e2.firstChild();
+ while ( !n3.isNull() ) {
+ Service s;
+ QDomElement e3 = n3.toElement();
+ if (s.loadXML( e3 ) ) {
+ s.setActive( mActiveServices.contains( s.id() ) );
+ bool newService = !mServiceMap.contains( s.id() );
+ if ( newService )
+ {
+ mServiceMap.insert( s.id(), s );
+ emit signalSubresourceAdded( this, "Calendar", s.id(), s.name() );
+ }
+ }
+ else
+ kdDebug() << " couldn't find ServiceInformation: " << e3.tagName() << endl;
+ n3 = n3.nextSibling();
+ }
+ }
+ else
+ kdDebug() << " couldn't find ServiceInformationTable: " << e2.tagName() << endl;
+ }
+ else
+ kdDebug() << " couldn't find ProgramDescription: " << e.tagName() << endl;
+ n = n.nextSibling();
+ }
+ return true;
+}
+
+bool ResourceTVAnytime::readService( const QString & serviceId )
+{
+ kdDebug() << k_funcinfo << endl;
+ // open programme information table
+ Service service = mServiceMap[ serviceId ];
+
+ QStringList entries = mScheduleArchive->directory()->entries();
+ QRegExp re( "^(\\d{8})" + serviceId );
+ QStringList dates;
+ QString todaysDate = QDate::currentDate().toString( "yyyyMMdd" );
+ for( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
+ {
+ if ( re.search( *it ) != -1 ) // this entry belongs to the requested service
+ {
+ QString entry = re.cap( 1 );
+ // handle this date according to user preferences
+ QDate entryDate( entry.left( 4 ).toInt(), entry.mid( 4, 2 ).toInt(), entry.right( 2 ).toInt() );
+ if ( entryDate < QDate::currentDate() || ( entryDate > QDate::currentDate().addDays( prefs()->days() - 1 ) ) )
+ continue;
+
+ if ( !dates.contains( re.cap( 1 ) ) )
+ dates.append( re.cap( 1 ) );
+ }
+ }
+
+ kdDebug() << "reading schedule for " << serviceId << " on " << dates << endl;
+
+ for( QStringList::Iterator it = dates.begin(); it != dates.end(); ++it )
+ {
+ ProgramInformationMap progInfoMap = service.programmeInformation();
+ QString programInfoFileName = QString( *it + serviceId + "_pi.xml" );
+ QDomDocument programInfo = archiveFileXml( programInfoFileName );
+ if ( !programInfo.isNull() ) {
+ QDomElement docElem = programInfo.documentElement();
+ QDomNode n = docElem.firstChild();
+ while( !n.isNull() ) {
+ QDomElement e = n.toElement(); // try to convert the node to an element.
+ if( !e.isNull() && e.tagName() == "ProgramDescription" ) {
+ QDomNode n2 = e.firstChild();
+ QDomElement e2 = n2.toElement();
+ if( !e2.isNull() && e2.tagName() == "ProgramInformationTable" ) {
+ QDomNode n3 = e2.firstChild();
+ while ( !n3.isNull() ) {
+ QDomElement e3 = n3.toElement();
+ ProgramInformation pi;
+ if ( pi.loadXML( e3 ) ) {
+ //kdDebug() << "Found programme: " << pi.id() << "," << pi.title() << "," << pi.synopsis() << endl;
+ progInfoMap.insert( pi.id(), pi );
+ }
+ n3 = n3.nextSibling();
+ }
+ }
+ }
+ n = n.nextSibling();
+ }
+ service.setProgramInformation( progInfoMap );
+ }
+ else
+ kdDebug() << "Service file: " << programInfoFileName << " not found in archive" << endl;
+ // open programme location table, iterate and create incidences
+
+ QString programLocationFileName = QString( *it + serviceId + "_pl.xml" );
+ QDomDocument programLocation = archiveFileXml( programLocationFileName );
+ if ( !programLocation.isNull() ) {
+ QDomElement docElem = programLocation.documentElement();
+ QDomNode n = docElem.firstChild();
+ while( !n.isNull() ) {
+ QDomElement e = n.toElement(); // try to convert the node to an element.
+ if( !e.isNull() && e.tagName() == "ProgramDescription" ) {
+ QDomNode n2 = e.firstChild();
+ QDomElement e2 = n2.toElement();
+ if( !e2.isNull() && e2.tagName() == "ProgramLocationTable" ) {
+ QDomNode n3 = e2.firstChild();
+ QDomElement e3 = n3.toElement();
+ if( !e3.isNull() && e3.tagName() == "Schedule" ) {
+ QString foundServiceId = e3.attribute( "serviceIDRef" );
+ if ( serviceId == foundServiceId ) {
+ QDomNode n4 = e3.firstChild();
+ while ( !n4.isNull() ) {
+ QDomElement e4 = n4.toElement();
+ ScheduleEvent se;
+ if ( se.loadXML( e4 ) ) {
+ ProgramInformation pi = progInfoMap[ se.crid() ];
+ //kdDebug() << "programme incidence: " << se.crid() << "," << se.startTime() << "," << se.duration() << "," << pi.title() << "," << pi.synopsis() << endl;
+ KCal::Event *event = new KCal::Event();
+ event->setFloats( false );
+ event->setSummary( pi.title() );
+ event->setDescription( pi.synopsis() );
+ event->setDtStart( KPimPrefs::localTimeToUtc( se.startTime(), "Europe/London" ) );
+ event->setDuration( se.duration() );
+ event->setLocation( service.name() );
+ event->setCategories( pi.genres() );
+ event->setUid( se.programUrl() );
+ event->setCustomProperty( "TVANYWHERE", "SERVICEID", serviceId );
+ // store the reverse mapping from event to service, for subresources
+ mUidMap.insert( event->uid(), serviceId );
+ event->setReadOnly( true );
+
+ addIncidence( event );
+ }
+ n4 = n4.nextSibling();
+ }
+ }
+ else
+ kdDebug() << " file contains schedule for another service!" << endl;
+ }
+ }
+ }
+ n = n.nextSibling();
+ }
+ }
+ else
+ kdDebug() << "Program location file: " << programLocationFileName << " not found in archive" << endl;
+ }
+ return true;
+}
+
+QStringList ResourceTVAnytime::subresources() const
+{
+ //const_cast<ResourceTVAnytime*>( this )->doLoad();
+ return mServiceMap.keys();
+}
+
+const QString
+ResourceTVAnytime::labelForSubresource( const QString& subresource ) const
+{
+ Service s = mServiceMap[ subresource ];
+ return s.name();
+}
+
+QString ResourceTVAnytime::subresourceIdentifier( Incidence *incidence )
+{
+ return incidence->customProperty( "TVANYWHERE", "SERVICEID" );
+}
+
+bool ResourceTVAnytime::subresourceActive( const QString & subresource ) const
+{
+ Service s = mServiceMap[ subresource ];
+ return s.active();
+}
+
+void ResourceTVAnytime::setSubresourceActive( const QString & subresource, bool active )
+{
+ if ( mServiceMap.contains( subresource ) )
+ {
+ Service s = mServiceMap[ subresource ];
+ if ( s.active() != active )
+ {
+ s.setActive( active );
+ mServiceMap.insert( subresource, s );
+ doLoad();
+ mResourceChangedTimer.changeInterval( 150 );
+ }
+ }
+}
+
+KABC::Lock *ResourceTVAnytime::lock()
+{
+ return &mLock;
+}
+
+void ResourceTVAnytime::cancelLoad()
+{
+ if ( mDownloadJob ) mDownloadJob->kill();
+ mDownloadJob = 0;
+ if ( mProgress ) mProgress->setComplete();
+ mProgress = 0;
+}
+
+void ResourceTVAnytime::slotEmitResourceChanged()
+{
+ emit resourceChanged( this );
+ mResourceChangedTimer.stop();
+}
+
+#include "kcal_resourcetvanytime.moc"
diff --git a/kresources/tvanytime/kcal_resourcetvanytime.h b/kresources/tvanytime/kcal_resourcetvanytime.h
new file mode 100644
index 00000000..c4f07267
--- /dev/null
+++ b/kresources/tvanytime/kcal_resourcetvanytime.h
@@ -0,0 +1,129 @@
+ /*
+ This file is part of kdepim.
+
+ Copyright (c) 2005 Will Stephenson <wstephenson@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#ifndef KCAL_RESOURCETVANYTIME_H
+#define KCAL_RESOURCETVANYTIME_H
+
+#include <qtimer.h>
+
+#include <libkdepim/progressmanager.h>
+
+#include <libkcal/resourcecached.h>
+
+#include <kabc/locknull.h>
+#include <kio/job.h>
+#include <kconfig.h>
+#include <kdepimmacros.h>
+
+#include "service.h"
+
+class QDomDocument;
+class KTar;
+class KTempFile;
+
+typedef QMap< QString, Service > ServiceMap;
+typedef QMap< QString, QString > UidMap;
+
+namespace KCal {
+
+class TVAnytimePrefsBase;
+
+/**
+ This class provides a resource for accessing a BBC TV and radio schedule as a calendar.
+*/
+class KDE_EXPORT ResourceTVAnytime : public ResourceCached
+{
+ Q_OBJECT
+
+ public:
+ ResourceTVAnytime();
+
+ ResourceTVAnytime( const KConfig * );
+ virtual ~ResourceTVAnytime();
+
+ void readConfig( const KConfig *config );
+ void writeConfig( KConfig *config );
+
+ TVAnytimePrefsBase *prefs();
+
+ QStringList subresources() const;
+ const QString labelForSubresource( const QString& subresource ) const;
+ QString subresourceIdentifier( Incidence *incidence );
+ /** Is this subresource active? */
+ bool subresourceActive( const QString& ) const;
+ /** (De)activate the subresource */
+ virtual void setSubresourceActive( const QString &, bool );
+
+ bool doOpen();
+ void doClose();
+
+ bool doLoad();
+ bool doSave() { return true; }
+
+ KABC::Lock *lock();
+
+ protected:
+ void init();
+ /**
+ * Extract the XML from the given filename within the schedule archive
+ */
+ QDomDocument archiveFileXml( const QString & name );
+
+ /**
+ * Read the tv schedule from the tarball downloaded to mDestination
+ */
+ bool readSchedule();
+
+ /**
+ * Read the service information map from the supplied xml
+ */
+ bool readServiceInformation( const QDomDocument & );
+ bool readServices() { return true; }
+ bool readService( const QString & serviceId );
+ bool readProgrammeInformation( const QDomDocument & );
+
+ protected slots:
+ void slotJobResult( KIO::Job * );
+ void cancelLoad();
+ void slotEmitResourceChanged();
+
+ private:
+ TVAnytimePrefsBase *mPrefs;
+ KABC::LockNull mLock;
+
+ KIO::FileCopyJob *mDownloadJob;
+ KPIM::ProgressItem *mProgress;
+
+ bool mIsShowingError;
+
+ QTimer mResourceChangedTimer;
+ KTempFile * mDestination;
+ KTar * mScheduleArchive;
+
+ ServiceMap mServiceMap;
+ UidMap mUidMap;
+ //TODO: read this from subresource config
+ QStringList mActiveServices;
+
+};
+
+}
+
+#endif
diff --git a/kresources/tvanytime/kcal_resourcetvanytime_plugin.cpp b/kresources/tvanytime/kcal_resourcetvanytime_plugin.cpp
new file mode 100644
index 00000000..e04eca23
--- /dev/null
+++ b/kresources/tvanytime/kcal_resourcetvanytime_plugin.cpp
@@ -0,0 +1,40 @@
+/*
+ This file is part of kdepim.
+
+ Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "kcal_resourcetvanytime.h"
+#include "kcal_resourcetvanytimeconfig.h"
+#include <kglobal.h>
+#include <klocale.h>
+
+using namespace KCal;
+
+typedef KRES::PluginFactory< ResourceTVAnytime, ResourceTVAnytimeConfig > TVAnytimeFactory;
+// FIXME: Use K_EXPORT_COMPONENT_FACTORY( kcal_tvanytime, TVAnytimeFactory ); here
+// Problem: How do I insert the catalogue???
+extern "C"
+{
+ void *init_kcal_tvanytime()
+ {
+ KGlobal::locale()->insertCatalogue( "libkcal" );
+ KGlobal::locale()->insertCatalogue( "kres_tvanytime" );
+ return new TVAnytimeFactory;
+ }
+}
diff --git a/kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp b/kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp
new file mode 100644
index 00000000..8fc95945
--- /dev/null
+++ b/kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp
@@ -0,0 +1,97 @@
+/*
+ This file is part of kdepim.
+
+ Copyright (c) 2005 Will Stephenson <wstephenson@kde.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include <typeinfo>
+
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qspinbox.h>
+#include <qwhatsthis.h>
+
+#include <kconfigskeleton.h>
+#include <klocale.h>
+#include <kdebug.h>
+//#include <kdialogbase.h>
+//#include <kstandarddirs.h>
+#include <klineedit.h>
+
+#include <libkcal/resourcecachedconfig.h>
+
+#include "kcal_resourcetvanytime.h"
+#include "kcal_tvanytimeprefs.h"
+#include "kcal_resourcetvanytimeconfig.h"
+
+using namespace KCal;
+
+ResourceTVAnytimeConfig::ResourceTVAnytimeConfig( QWidget* parent, const char* name )
+ : KRES::ConfigWidget( parent, name )
+{
+ resize( 245, 115 );
+ QGridLayout *mainLayout = new QGridLayout( this, 2, 2 );
+
+ QLabel *label = new QLabel( i18n( "Schedule tarball URL:" ), this );
+ mainLayout->addWidget( label, 1, 0 );
+ mUrl = new KLineEdit( this );
+ mainLayout->addWidget( mUrl, 1, 1 );
+ label = new QLabel( i18n( "Retrieve how many days?" ), this );
+ mainLayout->addWidget( label, 2, 0 );
+ mDays = new QSpinBox( this );
+ mainLayout->addWidget( mDays, 2, 1 );
+ mReloadConfig = new KCal::ResourceCachedReloadConfig( this );
+ mainLayout->addMultiCellWidget( mReloadConfig, 3, 3, 0, 1 );
+
+}
+
+void ResourceTVAnytimeConfig::loadSettings( KRES::Resource *resource )
+{
+ kdDebug() << "KCal::ResourceTVAnytimeConfig::loadSettings()" << endl;
+ ResourceTVAnytime *res = static_cast<ResourceTVAnytime *>( resource );
+ mResource = res;
+
+ if ( res ) {
+ if ( !res->prefs() ) {
+ kdError() << "No PREF" << endl;
+ return;
+ }
+ KConfigSkeleton::ItemInt * daysItem = res->prefs()->daysItem();
+ mDays->setMinValue( daysItem->minValue().toInt() );
+ mDays->setMaxValue( daysItem->maxValue().toInt() );
+ QWhatsThis::add( mDays, daysItem->whatsThis() );
+ mUrl->setText( res->prefs()->url() );
+ mDays->setValue( res->prefs()->days() );
+ mReloadConfig->loadSettings( res );
+ } else {
+ kdError(5700) << "KCalResourceTVAnytimeConfig::loadSettings(): no KCalResourceTVAnytime, cast failed" << endl;
+ }
+}
+
+void ResourceTVAnytimeConfig::saveSettings( KRES::Resource *resource )
+{
+ ResourceTVAnytime *res = static_cast<ResourceTVAnytime*>( resource );
+ if ( res ) {
+ res->prefs()->setUrl( mUrl->text() );
+ res->prefs()->setDays( mDays->value() );
+ mReloadConfig->saveSettings( res );
+ } else {
+ kdError(5700) << "KCalResourceTVAnytimeConfig::saveSettings(): no KCalResourceTVAnytime, cast failed" << endl;
+ }
+}
+
+#include "kcal_resourcetvanytimeconfig.moc"
diff --git a/kresources/tvanytime/kcal_resourcetvanytimeconfig.h b/kresources/tvanytime/kcal_resourcetvanytimeconfig.h
new file mode 100644
index 00000000..942c1d38
--- /dev/null
+++ b/kresources/tvanytime/kcal_resourcetvanytimeconfig.h
@@ -0,0 +1,61 @@
+/*
+ This file is part of kdepim.
+
+ Copyright (c) 2005 Will Stephenson <wstephenson@kde.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#ifndef KCALRESOURCETVANYTIMECONFIG_H
+#define KCALRESOURCETVANYTIMECONFIG_H
+
+#include <kurlrequester.h>
+#include <kdepimmacros.h>
+
+#include <kresources/resource.h>
+#include <kresources/configwidget.h>
+
+class QSpinBox;
+class KLineEdit;
+
+namespace KCal {
+
+class ResourceCachedReloadConfig;
+class ResourceCachedSaveConfig;
+
+/**
+ Configuration widget for TVAnytime resource.
+ @see KCal::ResourceTVAnytime
+*/
+class KDE_EXPORT ResourceTVAnytimeConfig : public KRES::ConfigWidget
+{
+Q_OBJECT
+ public:
+ ResourceTVAnytimeConfig( QWidget *parent = 0, const char *name = 0 );
+
+ public slots:
+ virtual void loadSettings( KRES::Resource *resource );
+ virtual void saveSettings( KRES::Resource *resource );
+
+ private:
+ KLineEdit *mUrl;
+ QSpinBox *mDays;
+ ResourceCachedReloadConfig *mReloadConfig;
+ ResourceCachedSaveConfig *mSaveConfig;
+ ResourceTVAnytime *mResource;
+};
+
+}
+
+#endif
diff --git a/kresources/tvanytime/kcal_tvanytime.desktop b/kresources/tvanytime/kcal_tvanytime.desktop
new file mode 100644
index 00000000..217c8e40
--- /dev/null
+++ b/kresources/tvanytime/kcal_tvanytime.desktop
@@ -0,0 +1,51 @@
+[Desktop Entry]
+Name=TV Schedules
+Name[af]=TV skedules
+Name[ar]=جداول التلفزة
+Name[bg]=Разписание на ТВ
+Name[ca]=Programació de la TV
+Name[cs]=TV programy
+Name[da]=Tv-oversigt
+Name[de]=Fernsehprogramm
+Name[el]=Προγράμματα τηλεόρασης
+Name[es]=Programación de TV
+Name[et]=Telekavad
+Name[eu]=TB planifikazioak
+Name[fa]=زمان‌بندیهای تلویزیون
+Name[fi]=TV-ohjelmat
+Name[fr]=Programmes TV
+Name[fy]=Televissjeprogrammearring
+Name[ga]=Sceidil Teilifíse
+Name[gl]=Programación de TV
+Name[hu]=TV-műsorok
+Name[is]=Sjónvarpsdagskrár
+Name[it]=Programmi TV
+Name[ja]=TV 番組予定
+Name[ka]=ტელეპროგრამა
+Name[kk]=TV кестелері
+Name[km]=កាលវិភាគ​ទូរទស្សន៍
+Name[lt]=TV tvarkaraščiai
+Name[mk]=ТВ програми
+Name[nb]=TV-program
+Name[nds]=Feernsehprogramm
+Name[ne]=टीभी कार्यतालिका
+Name[nl]=Televisieprogrammering
+Name[nn]=TV-program
+Name[pl]=Program telewizyjny
+Name[pt]=Programação de TV
+Name[pt_BR]=Horários de TV
+Name[ru]=Программы телепередач
+Name[sk]=TV programy
+Name[sl]=TV spored
+Name[sr]=ТВ програм
+Name[sr@Latn]=TV program
+Name[sv]=Tv-tablåer
+Name[tr]=TV Programı
+Name[uk]=Програма телебачення
+Name[zh_CN]=电视日程安排
+Name[zh_TW]=電視時刻表
+X-KDE-Library=kcal_tvanytime
+Type=Service
+ServiceTypes=KResources/Plugin
+X-KDE-ResourceFamily=calendar
+X-KDE-ResourceType=tvschedule
diff --git a/kresources/tvanytime/kcal_tvanytimeprefs.cpp b/kresources/tvanytime/kcal_tvanytimeprefs.cpp
new file mode 100644
index 00000000..4beca588
--- /dev/null
+++ b/kresources/tvanytime/kcal_tvanytimeprefs.cpp
@@ -0,0 +1,33 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2005 Will Stephenson <wstephenson@kde.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "kcal_tvanytimeprefs.h"
+
+using namespace KCal;
+
+TVAnytimePrefs::TVAnytimePrefs()
+ : TVAnytimePrefsBase()
+{
+}
+
+QString TVAnytimePrefs::scheduleUrl() const
+{
+ return url();
+}
diff --git a/kresources/tvanytime/kcal_tvanytimeprefs.h b/kresources/tvanytime/kcal_tvanytimeprefs.h
new file mode 100644
index 00000000..7f0c90f3
--- /dev/null
+++ b/kresources/tvanytime/kcal_tvanytimeprefs.h
@@ -0,0 +1,37 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2005 Will Stephenson <wstephenson@kde.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#ifndef TVANYTIMEPREFS_H
+#define TVANYTIMEPREFS_H
+
+#include "kcal_tvanytimeprefsbase.h"
+
+namespace KCal {
+
+class TVAnytimePrefs : public TVAnytimePrefsBase
+{
+ public:
+ TVAnytimePrefs();
+
+ QString scheduleUrl() const;
+};
+
+}
+
+#endif
diff --git a/kresources/tvanytime/kcal_tvanytimeprefsbase.kcfgc b/kresources/tvanytime/kcal_tvanytimeprefsbase.kcfgc
new file mode 100644
index 00000000..7210fb57
--- /dev/null
+++ b/kresources/tvanytime/kcal_tvanytimeprefsbase.kcfgc
@@ -0,0 +1,11 @@
+# Code generation options for kconfig_compiler
+File=kresources_kcal_tvanytime.kcfg
+ClassName=TVAnytimePrefsBase
+NameSpace=KCal
+Singleton=false
+Mutators=true
+Inherits=KResourcePrefs
+IncludeFiles=libkdepim/kresourceprefs.h
+GlobalEnums=true
+ItemAccessors=true
+SetUserTexts=true
diff --git a/kresources/tvanytime/kresources_kcal_tvanytime.kcfg b/kresources/tvanytime/kresources_kcal_tvanytime.kcfg
new file mode 100644
index 00000000..774cdaea
--- /dev/null
+++ b/kresources/tvanytime/kresources_kcal_tvanytime.kcfg
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
+ http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
+ <kcfgfile name="kresources_kcal_bbcschedulerc" />
+ <group name="General" >
+ <entry key="Url" type="String" >
+ <label>Schedule URL</label>
+ <whatsthis>URL of TV AnyWhere schedule</whatsthis>
+ </entry>
+ <entry key="Days" type="Int" >
+ <label>How many days?</label>
+ <whatsthis>Show the next n days</whatsthis>
+ <min>1</min>
+ <default>3</default>
+ <max>7</max>
+ </entry>
+ </group>
+</kcfg>
diff --git a/kresources/tvanytime/service.cpp b/kresources/tvanytime/service.cpp
new file mode 100644
index 00000000..2f9d9bbb
--- /dev/null
+++ b/kresources/tvanytime/service.cpp
@@ -0,0 +1,224 @@
+/***************************************************************************
+ * Copyright (C) 2005 by Will Stephenson *
+ * wstephenson@kde.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program 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 General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#include "service.h"
+
+Service::Service() : mActive( true )
+{
+
+}
+
+Service::Service( bool active, const QString & name, const QString & owner, const KURL & serviceUrl, const KURL & logo, const QStringList & genres )
+: mActive( active ), mName( name ), mOwner( owner ), mServiceUrl( serviceUrl ), mLogo( logo ), mGenres( genres )
+{
+}
+
+void Service::setActive( bool active )
+{
+ mActive = active;
+}
+
+void Service::setName( const QString & name )
+{
+ mName = name;
+}
+
+void Service::setProgramInformation( const ProgramInformationMap & map )
+{
+ mProgInfo = map;
+}
+
+bool Service::active() const
+{
+ return mActive;
+}
+
+QString Service::name() const
+{
+ return mName;
+}
+
+bool Service::loadXML( const QDomElement & top )
+{
+ if ( top.tagName() != "ServiceInformation" ) {
+ qWarning( "XML error: Top tag was %s instead of the expected service information",
+ top.tagName().ascii() );
+ return false;
+ }
+
+ setId( top.attribute( "serviceId" ) );
+
+ for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ if ( n.isComment() )
+ continue;
+ if ( n.isElement() ) {
+ QDomElement e = n.toElement();
+ loadAttribute( e );
+ } else
+ qWarning( "Node is not a comment or an element???" );
+ }
+ return true;
+}
+
+bool Service::loadAttribute( const QDomElement& element )
+{
+ QString tagName = element.tagName();
+ if ( tagName == "Name" ) {
+ QDomNode cn = element.firstChild();
+ QDomText t = cn.toText();
+ mName = t.data();
+ }
+ else if ( tagName == "Owner" ) {
+ QDomNode cn = element.firstChild();
+ QDomText t = cn.toText();
+ mOwner = t.data();
+ }
+ else if ( tagName == "ServiceURL" ) {
+ QDomNode cn = element.firstChild();
+ QDomText t = cn.toText();
+ mServiceUrl = t.data();
+ }
+ // TODO: parse logo data
+ // TODO: parse genre data
+ return true;
+}
+
+QRegExp ScheduleEvent::sRegExp( "PT(\\d{2})H(\\d{2})M(\\d{2})S" );
+
+bool ScheduleEvent::loadXML( const QDomElement & top )
+{
+ if ( top.tagName() != "ScheduleEvent" ) {
+ qWarning( "XML error: Top tag was %s instead of the expected event",
+ top.tagName().ascii() );
+ return false;
+ }
+
+ mCrid = top.attribute( "serviceId" );
+
+ for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ if ( n.isComment() )
+ continue;
+ if ( n.isElement() ) {
+ QDomElement e = n.toElement();
+ loadAttribute( e );
+ } else
+ qWarning( "Node is not a comment or an element???" );
+ }
+ return true;
+}
+
+bool ScheduleEvent::loadAttribute( const QDomElement& element )
+{
+ QString tagName = element.tagName();
+ if ( tagName == "ProgramURL" ) {
+ QDomNode cn = element.firstChild();
+ QDomText t = cn.toText();
+ mUrl = t.data();
+ }
+ else if ( tagName == "Program" ) {
+ mCrid = element.attribute( "crid" );
+ }
+ else if ( tagName == "PublishedStartTime" ) {
+ QDomNode cn = element.firstChild();
+ QDomText t = cn.toText();
+ mStartTime = QDateTime::fromString( t.data(), Qt::ISODate );
+ }
+ else if ( tagName == "PublishedDuration" ) {
+ QDomNode cn = element.firstChild();
+ QDomText t = cn.toText();
+ QString duration = t.data();
+ if ( sRegExp.search( duration ) != -1 )
+ {
+ mDuration = 0;
+ mDuration += 60 * 60 * sRegExp.cap( 1 ).toUInt();
+ mDuration += 60 * sRegExp.cap( 2 ).toUInt();
+ mDuration += sRegExp.cap( 3 ).toUInt();
+ }
+ }
+ return true;
+}
+
+ProgramInformationMap Service::programmeInformation() const
+{
+ return mProgInfo;
+}
+
+ProgramInformation::ProgramInformation( const QString & title, const QString &synopsis )
+: mTitle( title ), mSynopsis( synopsis )
+{
+
+}
+
+bool ProgramInformation::loadXML( const QDomElement & top )
+{
+ if ( top.tagName() != "ProgramInformation" ) {
+ qWarning( "XML error: Top tag was %s instead of the expected program information",
+ top.tagName().ascii() );
+ return false;
+ }
+
+ setId( top.attribute( "programId" ) );
+
+ for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ if ( n.isComment() )
+ continue;
+ if ( n.isElement() ) {
+ QDomElement e = n.toElement();
+ if ( e.tagName() == "BasicDescription" )
+ {
+ for ( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ if ( n.isComment() )
+ continue;
+ if ( n.isElement() ) {
+ QDomElement e = n.toElement();
+ loadAttribute( e );
+ }
+ }
+ }
+ } else
+ qWarning( "Node is not a comment or an element???" );
+ }
+ return true;
+}
+
+bool ProgramInformation::loadAttribute( const QDomElement& element )
+{
+ QString tagName = element.tagName();
+ if ( tagName == "Title" ) {
+ QDomNode cn = element.firstChild();
+ QDomText t = cn.toText();
+ mTitle = t.data();
+ }
+ else if ( tagName == "Synopsis" ) {
+ QDomNode cn = element.firstChild();
+ QDomText t = cn.toText();
+ mSynopsis = t.data();
+ }
+ else if ( tagName == "Genre" ) {
+ QDomNode name = element.firstChild();
+ QDomElement nameElem = name.toElement();
+ if ( nameElem.tagName() == "Name" ) {
+ QDomNode cn = nameElem.firstChild();
+ QDomText t = cn.toText();
+ mGenres.append( t.data() );
+ }
+ }
+ return true;
+}
diff --git a/kresources/tvanytime/service.h b/kresources/tvanytime/service.h
new file mode 100644
index 00000000..d37aa811
--- /dev/null
+++ b/kresources/tvanytime/service.h
@@ -0,0 +1,111 @@
+/***************************************************************************
+ * Copyright (C) 2005 by Will Stephenson *
+ * wstephenson@kde.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program 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 General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#ifndef SERVICE_H
+#define SERVICE_H
+
+#include <qdatetime.h>
+#include <qdom.h>
+#include <qmap.h>
+#include <qregexp.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <kurl.h>
+
+
+class ProgramInformation {
+ public:
+ ProgramInformation() {}
+ ProgramInformation( const QString & title, const QString &synopsis );
+ virtual ~ProgramInformation() {}
+
+ QString id() const { return mId; }
+ QString title() const { return mTitle; }
+ QString synopsis() const { return mSynopsis; }
+ QStringList genres() const { return mGenres; }
+
+ void setId ( const QString & id ) { mId = id; }
+ void setGenres( const QStringList & genres ) { mGenres = genres; }
+ bool loadXML( const QDomElement & );
+ bool loadAttribute( const QDomElement& element );
+
+ private:
+ QString mId;
+ QString mTitle;
+ QString mSynopsis;
+ QStringList mGenres;
+};
+
+typedef QMap< QString, ProgramInformation > ProgramInformationMap;
+
+class ScheduleEvent {
+ public:
+ ScheduleEvent() {}
+ virtual ~ScheduleEvent() {}
+
+ QString crid() const { return mCrid; }
+ QDateTime startTime() const { return mStartTime; }
+ uint duration() const { return mDuration; }
+ QString programUrl() const { return mUrl; }
+
+ bool loadXML( const QDomElement & );
+ bool loadAttribute( const QDomElement& element );
+
+ private:
+ QString mCrid;
+ QString mUrl;
+ QDateTime mStartTime;
+ uint mDuration;
+
+ static QRegExp sRegExp;
+};
+
+class Service {
+ public:
+ Service();
+ Service( bool active, const QString & name, const QString & owner, const KURL & serviceUrl, const KURL & logo, const QStringList & genres );
+ virtual ~Service() {}
+
+ void setId( const QString & id ) { mId = id; }
+ void setActive( bool active );
+ void setName( const QString& name );
+ void setProgramInformation( const ProgramInformationMap & map );
+
+ QString id() const { return mId; }
+ bool active() const;
+ QString name() const;
+ ProgramInformationMap programmeInformation() const;
+
+ bool loadXML( const QDomElement & );
+ bool loadDescription( const QDomElement & );
+ bool loadAttribute( const QDomElement& element );
+
+ private:
+ QString mId;
+ bool mActive;
+ QString mName;
+ QString mOwner;
+ KURL mServiceUrl;
+ KURL mLogo;
+ QStringList mGenres;
+ ProgramInformationMap mProgInfo;
+};
+
+#endif
diff --git a/kresources/tvanytime/tvanytime.kdevelop b/kresources/tvanytime/tvanytime.kdevelop
new file mode 100644
index 00000000..9af3eb4c
--- /dev/null
+++ b/kresources/tvanytime/tvanytime.kdevelop
@@ -0,0 +1,202 @@
+<?xml version = '1.0'?>
+<kdevelop>
+ <general>
+ <author>Will Stephenson</author>
+ <email>wstephenson@kde.org</email>
+ <version>0.1</version>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ <keyword>Qt</keyword>
+ <keyword>KDE</keyword>
+ </keywords>
+ <versioncontrol>kdevsubversion</versioncontrol>
+ <ignoreparts/>
+ <projectdirectory>.</projectdirectory>
+ <absoluteprojectpath>false</absoluteprojectpath>
+ <description/>
+ </general>
+ <kdevautoproject>
+ <general>
+ <activetarget>libkcal_tvanytime.la</activetarget>
+ <useconfiguration>debug</useconfiguration>
+ </general>
+ <run>
+ <mainprogram>src/tvanytime</mainprogram>
+ <directoryradio>executable</directoryradio>
+ </run>
+ <configurations>
+ <optimized>
+ <builddir>optimized</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O2 -g0</cxxflags>
+ </optimized>
+ <debug>
+ <configargs>--enable-debug=full</configargs>
+ <builddir>/space/kde/svn/head/build/kdepim/kresources/tvanytime</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O0 -g3</cxxflags>
+ <envvars/>
+ <topsourcedir>/space/kde/svn/head/src/kdepim/kresources/tvanytime</topsourcedir>
+ <cppflags/>
+ <ldflags/>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags/>
+ <f77flags/>
+ </debug>
+ </configurations>
+ <make>
+ <envvars>
+ <envvar value="1" name="WANT_AUTOCONF_2_5" />
+ <envvar value="1" name="WANT_AUTOMAKE_1_6" />
+ </envvars>
+ <abortonerror>true</abortonerror>
+ <numberofjobs>1</numberofjobs>
+ <dontact>false</dontact>
+ <makebin>unsermake </makebin>
+ <prio>0</prio>
+ </make>
+ </kdevautoproject>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.cpp;*.cxx;*.h" name="Sources" />
+ <group pattern="*.ui" name="User Interface" />
+ <group pattern="*.png" name="Icons" />
+ <group pattern="*.po;*.ts" name="Translations" />
+ <group pattern="*" name="Others" />
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidenonlocation>false</hidenonlocation>
+ </groups>
+ <tree>
+ <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ </tree>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>w3c-svg</toc>
+ <toc>sw</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell>libtool</dbgshell>
+ <programargs/>
+ <gdbpath/>
+ <configGdbScript/>
+ <runShellScript/>
+ <runGdbScript/>
+ <breakonloadinglibs>true</breakonloadinglibs>
+ <separatetty>false</separatetty>
+ <floatingtoolbar>false</floatingtoolbar>
+ </general>
+ <display>
+ <staticmembers>false</staticmembers>
+ <demanglenames>true</demanglenames>
+ <outputradix>10</outputradix>
+ </display>
+ </kdevdebugger>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem>Doxygen Documentation Collection</docsystem>
+ <docurl>tvanytime.tag</docurl>
+ </projectdoc>
+ </kdevdocumentation>
+ <substmap>
+ <APPNAME>tvanytime</APPNAME>
+ <APPNAMELC>tvanytime</APPNAMELC>
+ <APPNAMESC>Bbcschedule</APPNAMESC>
+ <APPNAMEUC>BBCSCHEDULE</APPNAMEUC>
+ <AUTHOR>Will Stephenson</AUTHOR>
+ <EMAIL>wstephenson@kde.org</EMAIL>
+ <LICENSE>GPL</LICENSE>
+ <LICENSEFILE>COPYING</LICENSEFILE>
+ <VERSION>0.1</VERSION>
+ <YEAR>2005</YEAR>
+ <dest>/space/kde/head/src/kdepim/kresources/tvanytime</dest>
+ </substmap>
+ <kdevcppsupport>
+ <references>
+ <pcs>kdelibs</pcs>
+ <pcs>project</pcs>
+ <pcs>libkcal</pcs>
+ </references>
+ <codecompletion>
+ <includeGlobalFunctions>true</includeGlobalFunctions>
+ <includeTypes>true</includeTypes>
+ <includeEnums>true</includeEnums>
+ <includeTypedefs>false</includeTypedefs>
+ <automaticCodeCompletion>true</automaticCodeCompletion>
+ <automaticArgumentsHint>true</automaticArgumentsHint>
+ <automaticHeaderCompletion>true</automaticHeaderCompletion>
+ <codeCompletionDelay>250</codeCompletionDelay>
+ <argumentsHintDelay>400</argumentsHintDelay>
+ <headerCompletionDelay>250</headerCompletionDelay>
+ </codecompletion>
+ <qt>
+ <used>false</used>
+ <version>3</version>
+ <root>/usr/lib/qt3</root>
+ </qt>
+ <creategettersetter>
+ <prefixGet/>
+ <prefixSet>set</prefixSet>
+ <prefixVariable>m_,_</prefixVariable>
+ <parameterName>theValue</parameterName>
+ <inlineGet>true</inlineGet>
+ <inlineSet>true</inlineSet>
+ </creategettersetter>
+ </kdevcppsupport>
+ <cppsupportpart>
+ <filetemplates>
+ <interfacesuffix>.h</interfacesuffix>
+ <implementationsuffix>.cpp</implementationsuffix>
+ </filetemplates>
+ </cppsupportpart>
+</kdevelop>