author | alwin <alwin> | 2004-02-20 02:06:52 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-02-20 02:06:52 (UTC) |
commit | 55f4d502486e01927356908223622e435c975f7e (patch) (unidiff) | |
tree | 824b5c1e8992564677c4f39473bc108a32a2cf2a /libopie2/opiepim/backend/otodoaccessxml.cpp | |
parent | 060b4fc7a3fd5c1b5f745167fe084f7486719b7e (diff) | |
download | opie-55f4d502486e01927356908223622e435c975f7e.zip opie-55f4d502486e01927356908223622e435c975f7e.tar.gz opie-55f4d502486e01927356908223622e435c975f7e.tar.bz2 |
moved the opie pim stuff to libopie2 - pim. Tried to resort them, may be someone should take a look for a better file order. but now all applications can start using libopiepim2 instead of libopie1-pim-stuff.
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessxml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp index 4a5cb33..2d50ecd 100644 --- a/libopie2/opiepim/backend/otodoaccessxml.cpp +++ b/libopie2/opiepim/backend/otodoaccessxml.cpp | |||
@@ -1,8 +1,36 @@ | |||
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 <errno.h> | 29 | #include <errno.h> |
2 | #include <fcntl.h> | 30 | #include <fcntl.h> |
3 | 31 | ||
4 | #include <sys/mman.h> | 32 | #include <sys/mman.h> |
5 | #include <sys/stat.h> | 33 | #include <sys/stat.h> |
6 | #include <sys/types.h> | 34 | #include <sys/types.h> |
7 | 35 | ||
8 | #include <unistd.h> | 36 | #include <unistd.h> |
@@ -10,22 +38,24 @@ | |||
10 | 38 | ||
11 | #include <qfile.h> | 39 | #include <qfile.h> |
12 | #include <qvector.h> | 40 | #include <qvector.h> |
13 | 41 | ||
14 | #include <qpe/global.h> | 42 | #include <qpe/global.h> |
15 | #include <qpe/stringutil.h> | 43 | #include <qpe/stringutil.h> |
16 | #include <qpe/timeconversion.h> | 44 | #include <qpe/timeconversion.h> |
17 | 45 | ||
18 | #include "oconversion.h" | 46 | #include <opie2/oconversion.h> |
19 | #include "opimstate.h" | 47 | #include <opie2/opimstate.h> |
20 | #include "otimezone.h" | 48 | #include <opie2/otimezone.h> |
21 | #include "opimnotifymanager.h" | 49 | #include <opie2/opimnotifymanager.h> |
22 | #include "orecur.h" | 50 | #include <opie2/orecur.h> |
23 | #include "otodoaccessxml.h" | 51 | #include <opie2/otodoaccessxml.h> |
52 | |||
53 | using namespace Opie; | ||
24 | 54 | ||
25 | namespace { | 55 | namespace { |
26 | time_t rp_end; | 56 | time_t rp_end; |
27 | ORecur* rec; | 57 | ORecur* rec; |
28 | ORecur *recur() { | 58 | ORecur *recur() { |
29 | if (!rec ) rec = new ORecur; | 59 | if (!rec ) rec = new ORecur; |
30 | return rec; | 60 | return rec; |
31 | } | 61 | } |
@@ -61,16 +91,17 @@ char *strstrlen(const char *haystack, int hLen, const char* needle, int nLen) | |||
61 | } while (haystackChar != needleChar); | 91 | } while (haystackChar != needleChar); |
62 | } while (strncmp(hsearch, needle, QMIN(hLen - (hsearch - haystack), nLen)) != 0); | 92 | } while (strncmp(hsearch, needle, QMIN(hLen - (hsearch - haystack), nLen)) != 0); |
63 | hsearch--; | 93 | hsearch--; |
64 | } | 94 | } |
65 | return ((char *)hsearch); | 95 | return ((char *)hsearch); |
66 | } | 96 | } |
67 | } | 97 | } |
68 | 98 | ||
99 | namespace Opie { | ||
69 | 100 | ||
70 | OTodoAccessXML::OTodoAccessXML( const QString& appName, | 101 | OTodoAccessXML::OTodoAccessXML( const QString& appName, |
71 | const QString& fileName ) | 102 | const QString& fileName ) |
72 | : OTodoAccessBackend(), m_app( appName ), m_opened( false ), m_changed( false ) | 103 | : OTodoAccessBackend(), m_app( appName ), m_opened( false ), m_changed( false ) |
73 | { | 104 | { |
74 | if (!fileName.isEmpty() ) | 105 | if (!fileName.isEmpty() ) |
75 | m_file = fileName; | 106 | m_file = fileName; |
76 | else | 107 | else |
@@ -869,8 +900,10 @@ QArray<int> OTodoAccessXML::matchRegexp( const QRegExp &r ) const | |||
869 | m_currentQuery[arraycounter++] = it.data().uid(); | 900 | m_currentQuery[arraycounter++] = it.data().uid(); |
870 | 901 | ||
871 | } | 902 | } |
872 | // Shrink to fit.. | 903 | // Shrink to fit.. |
873 | m_currentQuery.resize(arraycounter); | 904 | m_currentQuery.resize(arraycounter); |
874 | 905 | ||
875 | return m_currentQuery; | 906 | return m_currentQuery; |
876 | } | 907 | } |
908 | |||
909 | } | ||