1// -*- Mode: c++-mode; c-basic-offset: 2; indent-tabs-mode: t; tab-width: 2; -*-
2//
3// Copyright (C) 2004 Grzegorz Jaskiewicz <gj at pointblue.com.pl>
4//
5// gaducontactlist.cpp
6//
7// This program is free software; you can redistribute it and/or
8// modify it under the terms of the GNU General Public License
9// as published by the Free Software Foundation; either version 2
10// of the License, or (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program; if not, write to the Free Software
19// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20// 02110-1301, USA.
21//
22
23#ifndef GADUCONTACTLIST_H
24#define GADUCONTACTLIST_H
25
26#include <QList>
27#include <QString>
28
29class GaduContactsList
30{
31public:
32 struct ContactLine {
33
34 QString displayname;
35 QString group;
36 QString uin;
37 QString firstname;
38 QString surname;
39 QString nickname;
40 QString phonenr;
41 QString email;
42 bool ignored;
43 bool offlineTo;
44 QString landline;
45 };
46
47 GaduContactsList();
48 GaduContactsList( QString );
49 ~GaduContactsList();
50 QString asString();
51 void addContact( ContactLine &cl );
52 void addContact( QString& displayname, QString& group,
53 QString& uin, QString& firstname,
54 QString& surname, QString& nickname,
55 QString& phonenr, QString& email,
56 bool ignored, bool offlineTo,
57 QString& landline
58 );
59 unsigned int size();
60 const GaduContactsList::ContactLine& operator[]( unsigned int i );
61private:
62 typedef QList<ContactLine> CList;
63 CList cList;
64 CList::iterator it;
65};
66#endif
67