~ubuntu-branches/ubuntu/jaunty/psi/jaunty

« back to all changes in this revision

Viewing changes to src/userlist.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-04-14 18:57:30 UTC
  • mfrom: (2.1.9 hardy)
  • Revision ID: james.westby@ubuntu.com-20080414185730-528re3zp0m2hdlhi
Tags: 0.11-8
* added CONFIG -= link_prl to .pro files and removed dependencies
  which are made unnecessary by this change
* Fix segfault when closing last chat tab with qt4.4
  (This is from upstream svn, rev. 1101) (Closes: Bug#476122)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef USERLIST_H
22
22
#define USERLIST_H
23
23
 
24
 
#include<qstring.h>
25
 
#include<qdatetime.h>
26
 
#include<qvaluelist.h>
27
 
#include"im.h"
 
24
#include <qstring.h>
 
25
#include <qdatetime.h>
 
26
#include <QList>
 
27
#include <QPixmap>
 
28
#include <Q3PtrList>
 
29
#include "xmpp_resource.h"
 
30
#include "xmpp_liverosteritem.h"
 
31
#include "mood.h"
 
32
#include "geolocation.h"
 
33
#include "physicallocation.h"
28
34
 
29
35
class AvatarFactory;
 
36
namespace XMPP {
 
37
        class Jid;
 
38
}
30
39
 
31
40
class UserResource : public XMPP::Resource
32
41
{
50
59
        void setPGPVerifyStatus(int);
51
60
        void setSigTimestamp(const QDateTime &);
52
61
 
 
62
        void setTune(const QString&);
 
63
        const QString& tune() const;
 
64
        void setGeoLocation(const GeoLocation&);
 
65
        const GeoLocation& geoLocation() const;
 
66
        void setPhysicalLocation(const PhysicalLocation&);
 
67
        const PhysicalLocation& physicalLocation() const;
 
68
 
53
69
private:
54
70
        QString v_ver, v_clientName, v_clientVersion, v_clientOS, v_keyID;
 
71
        QString v_tune;
 
72
        GeoLocation v_geoLocation;
 
73
        PhysicalLocation v_physicalLocation;
55
74
        int v_pgpVerifyStatus;
56
75
        QDateTime sigts;
57
76
};
62
81
bool operator>(const UserResource &r1, const UserResource &r2);
63
82
bool operator>=(const UserResource &r1, const UserResource &r2);
64
83
 
65
 
class UserResourceList : public QValueList<UserResource>
 
84
class UserResourceList : public QList<UserResource>
66
85
{
67
86
public:
68
87
        UserResourceList();
97
116
        QString makeBareTip(bool trim, bool doLinkify) const;
98
117
        QString makeDesc() const;
99
118
        bool isPrivate() const;
 
119
        const Mood& mood() const;
100
120
 
101
121
        void setJid(const XMPP::Jid &);
102
122
        void setInList(bool);
103
123
        void setLastAvailable(const QDateTime &);
104
124
        void setPresenceError(const QString &);
105
125
        void setPrivate(bool);
 
126
        void setMood(const Mood&);
 
127
        void setTune(const QString&);
 
128
        const QString& tune() const;
 
129
        void setGeoLocation(const GeoLocation&);
 
130
        const GeoLocation& geoLocation() const;
 
131
        void setPhysicalLocation(const PhysicalLocation&);
 
132
        const PhysicalLocation& physicalLocation() const;
 
133
        void setAvatarFactory(AvatarFactory*);
106
134
 
107
135
        UserResourceList & userResourceList();
108
136
        UserResourceList::Iterator priority();
115
143
        const QString & publicKeyID() const;
116
144
        void setPublicKeyID(const QString &);
117
145
        
118
 
        AvatarFactory* avatarFactory() const;
119
 
        void setAvatarFactory(AvatarFactory* av);
120
 
 
121
146
private:
122
147
        int lastmsgtype;
123
148
        bool v_inList;
128
153
        bool v_private;
129
154
        QStringList secList;
130
155
        QString v_keyID;
 
156
        QPixmap v_avatar;
 
157
        Mood v_mood;
 
158
        QString v_tune;
 
159
        GeoLocation v_geoLocation;
 
160
        PhysicalLocation v_physicalLocation;
131
161
        AvatarFactory* v_avatarFactory;
132
 
 
133
162
};
134
163
 
135
 
typedef QPtrListIterator<UserListItem> UserListIt;
 
164
typedef Q3PtrListIterator<UserListItem> UserListIt;
136
165
 
137
 
class UserList : public QPtrList<UserListItem>
 
166
class UserList : public Q3PtrList<UserListItem>
138
167
{
139
168
public:
140
169
        UserList();