-rw-r--r-- | libopie2/opiepim/backend/backends.pro | 53 | ||||
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessvcal.cpp | 2 |
3 files changed, 25 insertions, 32 deletions
diff --git a/libopie2/opiepim/backend/backends.pro b/libopie2/opiepim/backend/backends.pro index f91e98a..42d807c 100644 --- a/libopie2/opiepim/backend/backends.pro +++ b/libopie2/opiepim/backend/backends.pro @@ -1,44 +1,37 @@ SOURCES += \ - core/backends/ocontactaccessbackend_vcard.cpp \ - core/backends/ocontactaccessbackend_xml.cpp \ - core/backends/ocontactaccess.cpp \ - core/backends/odatebookaccessbackend.cpp \ - core/backends/odatebookaccessbackend_xml.cpp \ - core/backends/otodoaccessbackend.cpp \ - core/backends/otodoaccess.cpp \ - core/backends/otodoaccessvcal.cpp \ - core/backends/otodoaccessxml.cpp \ - core/backends/odatebookaccess.cpp + backend/ocontactaccessbackend_vcard.cpp \ + backend/ocontactaccessbackend_xml.cpp \ + backend/odatebookaccessbackend.cpp \ + backend/odatebookaccessbackend_xml.cpp \ + backend/otodoaccessbackend.cpp \ + backend/otodoaccessvcal.cpp \ + backend/otodoaccessxml.cpp HEADERS += \ - core/backends/obackendfactory.h \ - core/backends/ocontactaccessbackend.h \ - core/backends/ocontactaccessbackend_vcard.h \ - core/backends/ocontactaccessbackend_xml.h \ - core/backends/ocontactaccess.h \ - core/backends/odatebookaccessbackend.h \ - core/backends/odatebookaccessbackend_xml.h \ - core/backends/opimaccessbackend.h \ - core/backends/opimaccesstemplate.h \ - core/backends/otodoaccessbackend.h \ - core/backends/otodoaccess.h \ - core/backends/otodoaccessvcal.h \ - core/backends/otodoaccessxml.h \ - core/backends/odatebookaccess.h + backend/obackendfactory.h \ + backend/ocontactaccessbackend.h \ + backend/ocontactaccessbackend_vcard.h \ + backend/ocontactaccessbackend_xml.h \ + backend/odatebookaccessbackend.h \ + backend/odatebookaccessbackend_xml.h \ + backend/opimaccessbackend.h \ + backend/otodoaccessbackend.h \ + backend/otodoaccessvcal.h \ + backend/otodoaccessxml.h contains( ENABLE_SQL_PIM_BACKEND, y ) { message ( Enabling the SQL Backend for libopiepim2 ) DEFINES += __USE_SQL LIBS += -lopiedb2 - HEADERS += core/backends/otodoaccesssql.h \ - core/backends/ocontactaccessbackend_sql.h \ - core/backends/odatebookaccessbackend_sql.h - SOURCES += core/backends/otodoaccesssql.cpp \ - core/backends/ocontactaccessbackend_sql.cpp \ - core/backends/odatebookaccessbackend_sql.cpp + HEADERS += backend/otodoaccesssql.h \ + backend/ocontactaccessbackend_sql.h \ + backend/odatebookaccessbackend_sql.h + SOURCES += backend/otodoaccesssql.cpp \ + backend/ocontactaccessbackend_sql.cpp \ + backend/odatebookaccessbackend_sql.cpp } !contains( ENABLE_SQL_PIM_BACKEND, y ) { message ( No SQL Backend in libopiepim2 ) } diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp index 6b66814..af77a05 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp @@ -1,82 +1,82 @@ /* This file is part of the Opie Project Copyright (C) The Main Author <main-author@whereever.org> =. Copyright (C) The Opie Team <opie-devel@handhelds.org> .=l. .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. 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 ..}^=.= = ; 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. */ /* * VCard Backend for the OPIE-Contact Database. */ -#include "vobject_p.h" +#include <opie2/private/vobject_p.h> /* OPIE */ #include <opie2/ocontactaccessbackend_vcard.h> #include <opie2/odebug.h> #include <qpe/timeconversion.h> //FIXME: Hack to allow direct access to FILE* fh. Rewrite this! #define protected public #include <qfile.h> #undef protected namespace Opie { OPimContactAccessBackend_VCard::OPimContactAccessBackend_VCard ( const QString& , const QString& filename ): m_dirty( false ), m_file( filename ) { load(); } bool OPimContactAccessBackend_VCard::load () { m_map.clear(); m_dirty = false; VObject* obj = 0l; if ( QFile::exists(m_file) ){ obj = Parse_MIME_FromFileName( QFile::encodeName(m_file).data() ); if ( !obj ) return false; }else{ odebug << "File \"" << m_file << "\" not found !" << oendl; return false; } while ( obj ) { OPimContact con = parseVObject( obj ); /* * if uid is 0 assign a new one * this at least happens on * Nokia6210 */ if ( con.uid() == 0 ){ con.setUid( 1 ); owarn << "assigned new uid " << con.uid() << "" << oendl; diff --git a/libopie2/opiepim/backend/otodoaccessvcal.cpp b/libopie2/opiepim/backend/otodoaccessvcal.cpp index 14a325e..7d58a40 100644 --- a/libopie2/opiepim/backend/otodoaccessvcal.cpp +++ b/libopie2/opiepim/backend/otodoaccessvcal.cpp @@ -1,78 +1,78 @@ /* This file is part of the Opie Project Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de) =. Copyright (C) The Opie Team <opie-devel@handhelds.org> .=l. .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. 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 ..}^=.= = ; 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 "vobject_p.h" +#include <opie2/private/vobject_p.h> /* OPIE */ #include <opie2/otodoaccessvcal.h> #include <opie2/odebug.h> #include <qpe/timeconversion.h> /* QT */ //FIXME: Hack to allow direct access to FILE* fh. Rewrite this! #define protected public #include <qfile.h> #undef protected using namespace Opie; namespace { static OPimTodo eventByVObj( VObject *obj ){ OPimTodo event; VObject *ob; QCString name; // no uid, attendees, ... and no fun // description if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){ name = vObjectStringZValue( ob ); #if 0 event.setDescription( name ); #else event.setSummary( name ); #endif } // summary if ( ( ob = isAPropertyOf( obj, VCSummaryProp ) ) != 0 ) { name = vObjectStringZValue( ob ); #if 0 event.setSummary( name ); #else event.setDescription( name ); #endif } // completed if( ( ob = isAPropertyOf( obj, VCStatusProp )) != 0 ){ name = vObjectStringZValue( ob ); if( name == "COMPLETED" ){ event.setCompleted( true ); }else{ event.setCompleted( false ); } }else |