summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/otodoaccessvcal.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessvcal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/otodoaccessvcal.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.cpp b/libopie2/opiepim/backend/otodoaccessvcal.cpp
index 6415952..e364ee2 100644
--- a/libopie2/opiepim/backend/otodoaccessvcal.cpp
+++ b/libopie2/opiepim/backend/otodoaccessvcal.cpp
@@ -1,19 +1,49 @@
1/*
2 This file is part of the Opie Project
3 Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5 .=l.
6 .>+-=
7 _;:, .> :=|. This program is free software; you can
8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
10.="- .-=="i, .._ License as published by the Free Software
11 - . .-<_> .<> Foundation; either version 2 of the License,
12 ._= =} : or (at your option) any later version.
13 .%`+i> _;_.
14 .i_,=:_. -<s. This program is distributed in the hope that
15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16 : .. .:, . . . without even the implied warranty of
17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.= = ; Library General Public License for more
20++= -. .` .: details.
21 : = ...= . :.=-
22 -. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA.
28*/
1#include <qfile.h> 29#include <qfile.h>
2 30
3#include <qtopia/private/vobject_p.h> 31#include <qtopia/private/vobject_p.h>
4#include <qtopia/timeconversion.h> 32#include <qtopia/timeconversion.h>
5#include <qtopia/private/qfiledirect_p.h> 33#include <qtopia/private/qfiledirect_p.h>
6 34
7#include "otodoaccessvcal.h" 35#include <opie2/otodoaccessvcal.h>
36
37using namespace Opie;
8 38
9namespace { 39namespace {
10 static OTodo eventByVObj( VObject *obj ){ 40 static OTodo eventByVObj( VObject *obj ){
11 OTodo event; 41 OTodo event;
12 VObject *ob; 42 VObject *ob;
13 QCString name; 43 QCString name;
14 // no uid, attendees, ... and no fun 44 // no uid, attendees, ... and no fun
15 // description 45 // description
16 if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){ 46 if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){
17 name = vObjectStringZValue( ob ); 47 name = vObjectStringZValue( ob );
18#if 0 48#if 0
19 event.setDescription( name ); 49 event.setDescription( name );
@@ -98,24 +128,25 @@ namespace {
98 128
99#else 129#else
100 addPropValue( task, VCDescriptionProp, 130 addPropValue( task, VCDescriptionProp,
101 event.summary().local8Bit() ); 131 event.summary().local8Bit() );
102 132
103 addPropValue( task, VCSummaryProp, 133 addPropValue( task, VCSummaryProp,
104 event.description().local8Bit() ); 134 event.description().local8Bit() );
105#endif 135#endif
106 return task; 136 return task;
107}; 137};
108} 138}
109 139
140namespace Opie {
110OTodoAccessVCal::OTodoAccessVCal( const QString& path ) 141OTodoAccessVCal::OTodoAccessVCal( const QString& path )
111 : m_dirty(false), m_file( path ) 142 : m_dirty(false), m_file( path )
112{ 143{
113} 144}
114OTodoAccessVCal::~OTodoAccessVCal() { 145OTodoAccessVCal::~OTodoAccessVCal() {
115} 146}
116bool OTodoAccessVCal::load() { 147bool OTodoAccessVCal::load() {
117 m_map.clear(); 148 m_map.clear();
118 m_dirty = false; 149 m_dirty = false;
119 150
120 VObject* vcal = 0l; 151 VObject* vcal = 0l;
121 vcal = Parse_MIME_FromFileName( QFile::encodeName(m_file).data() ); 152 vcal = Parse_MIME_FromFileName( QFile::encodeName(m_file).data() );
@@ -238,12 +269,14 @@ QBitArray OTodoAccessVCal::sup() {
238 269
239 ar[OTodo::CrossReference] = false; 270 ar[OTodo::CrossReference] = false;
240 ar[OTodo::State ] = false; 271 ar[OTodo::State ] = false;
241 ar[OTodo::Reminders] = false; 272 ar[OTodo::Reminders] = false;
242 ar[OTodo::Notifiers] = false; 273 ar[OTodo::Notifiers] = false;
243 ar[OTodo::Maintainer] = false; 274 ar[OTodo::Maintainer] = false;
244 ar[OTodo::Progress] = false; 275 ar[OTodo::Progress] = false;
245 ar[OTodo::Alarms ] = false; 276 ar[OTodo::Alarms ] = false;
246 ar[OTodo::Recurrence] = false; 277 ar[OTodo::Recurrence] = false;
247 278
248 return ar; 279 return ar;
249} 280}
281
282}