summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/ocontact.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/ocontact.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ocontact.h51
1 files changed, 31 insertions, 20 deletions
diff --git a/libopie2/opiepim/ocontact.h b/libopie2/opiepim/ocontact.h
index 1d46b81..34888dc 100644
--- a/libopie2/opiepim/ocontact.h
+++ b/libopie2/opiepim/ocontact.h
@@ -1,58 +1,68 @@
1/********************************************************************** 1/*
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2 This file is part of the Opie Project
3** Copyright (C) 2002-2003 by Stefan Eilers (eilers.stefan@epost.de) 3 Copyright (C) The Main Author <main-author@whereever.org>
4** 4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5** This file may be distributed and/or modified under the terms of the 5 .=l.
6** GNU General Public License version 2 as published by the Free Software 6 .>+-=
7** Foundation and appearing in the file LICENSE.GPL included in the 7 _;:, .> :=|. This program is free software; you can
8** packaging of this file. 8.> <`_, > . <= redistribute it and/or modify it under
9** 9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 10.="- .-=="i, .._ License as published by the Free Software
11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 11 - . .-<_> .<> Foundation; either version 2 of the License,
12** 12 ._= =} : or (at your option) any later version.
13** See http://www.trolltech.com/gpl/ for GPL licensing information. 13 .%`+i> _;_.
14** 14 .i_,=:_. -<s. This program is distributed in the hope that
15** Contact info@trolltech.com if any conditions of this licensing are 15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16** not clear to you. 16 : .. .:, . . . without even the implied warranty of
17** 17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18**********************************************************************/ 18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19 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*/
20#ifndef __OCONTACT_H__ 29#ifndef __OCONTACT_H__
21#define __OCONTACT_H__ 30#define __OCONTACT_H__
22 31
23#include <opie/opimrecord.h> 32#include <opie2/opimrecord.h>
24#include <qpe/recordfields.h> 33#include <qpe/recordfields.h>
25 34
26#include <qdatetime.h> 35#include <qdatetime.h>
27#include <qstringlist.h> 36#include <qstringlist.h>
28 37
29#if defined(QPC_TEMPLATEDLL) 38#if defined(QPC_TEMPLATEDLL)
30// MOC_SKIP_BEGIN 39// MOC_SKIP_BEGIN
31QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>; 40QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>;
32// MOC_SKIP_END 41// MOC_SKIP_END
33#endif 42#endif
34 43
44namespace Opie {
35class OContactPrivate; 45class OContactPrivate;
36 46
37/** 47/**
38 * OContact class represents a specialised PIM Record for contacts. 48 * OContact class represents a specialised PIM Record for contacts.
39 * It does store all kind of persopn related information. 49 * It does store all kind of persopn related information.
40 * 50 *
41 * @short Contact Container 51 * @short Contact Container
42 * @author TT, Stefan Eiler, Holger Freyther 52 * @author TT, Stefan Eiler, Holger Freyther
43 */ 53 */
44class QPC_EXPORT OContact : public OPimRecord 54class QPC_EXPORT OContact : public OPimRecord
45{ 55{
46 friend class DataSet; 56 friend class DataSet;
47public: 57public:
48 OContact(); 58 OContact();
49 OContact( const QMap<int, QString> &fromMap ); 59 OContact( const QMap<int, QString> &fromMap );
50 virtual ~OContact(); 60 virtual ~OContact();
51 61
52 enum DateFormat{ 62 enum DateFormat{
53 Zip_City_State = 0, 63 Zip_City_State = 0,
54 City_State_Zip 64 City_State_Zip
55 }; 65 };
56 66
57 /* 67 /*
58 * do we need to inline them 68 * do we need to inline them
@@ -215,26 +225,27 @@ public:
215 QString emails() const { return find( Qtopia::Emails ); } 225 QString emails() const { return find( Qtopia::Emails ); }
216 static int rtti(); 226 static int rtti();
217 227
218private: 228private:
219 // The XML Backend needs some access to the private functions 229 // The XML Backend needs some access to the private functions
220 friend class OContactAccessBackend_XML; 230 friend class OContactAccessBackend_XML;
221 231
222 void insert( int key, const QString &value ); 232 void insert( int key, const QString &value );
223 void replace( int key, const QString &value ); 233 void replace( int key, const QString &value );
224 QString find( int key ) const; 234 QString find( int key ) const;
225 static QStringList fields(); 235 static QStringList fields();
226 236
227 void save( QString &buf ) const; 237 void save( QString &buf ) const;
228 238
229 QString displayAddress( const QString &street, 239 QString displayAddress( const QString &street,
230 const QString &city, 240 const QString &city,
231 const QString &state, 241 const QString &state,
232 const QString &zip, 242 const QString &zip,
233 const QString &country ) const; 243 const QString &country ) const;
234 244
235 QMap<int, QString> mMap; 245 QMap<int, QString> mMap;
236 OContactPrivate *d; 246 OContactPrivate *d;
237}; 247};
238 248
249}
239 250
240#endif 251#endif