2
* tasks.h - basic tasks
3
* Copyright (C) 2001, 2002 Justin Karneges
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#ifndef JABBER_TASKS_H
22
#define JABBER_TASKS_H
28
#include"xmpp_vcard.h"
35
class JT_Register : public Task
39
JT_Register(Task *parent);
42
void reg(const QString &user, const QString &pass);
43
void changepw(const QString &pass);
44
void unreg(const Jid &j="");
46
const Form & form() const;
47
void getForm(const Jid &);
48
void setForm(const Form &);
51
bool take(const QDomElement &);
61
class JT_UnRegister : public Task
65
JT_UnRegister(Task *parent);
68
void unreg(const Jid &);
73
void getFormFinished();
81
class JT_Roster : public Task
85
JT_Roster(Task *parent);
89
void set(const Jid &, const QString &name, const QStringList &groups);
90
void remove(const Jid &);
92
const Roster & roster() const;
94
QString toString() const;
95
bool fromString(const QString &);
98
bool take(const QDomElement &x);
109
class JT_PushRoster : public Task
113
JT_PushRoster(Task *parent);
116
bool take(const QDomElement &);
119
void roster(const Roster &);
126
class JT_Presence : public Task
130
JT_Presence(Task *parent);
133
void pres(const Status &);
134
void pres(const Jid &, const Status &);
135
void sub(const Jid &, const QString &subType);
147
class JT_PushPresence : public Task
151
JT_PushPresence(Task *parent);
154
bool take(const QDomElement &);
157
void presence(const Jid &, const Status &);
158
void subscription(const Jid &, const QString &);
165
class JT_Message : public Task
169
JT_Message(Task *parent, const Message &);
181
class JT_PushMessage : public Task
185
JT_PushMessage(Task *parent);
188
bool take(const QDomElement &);
191
void message(const Message &);
198
class JT_GetServices : public Task
202
JT_GetServices(Task *);
204
void get(const Jid &);
206
const AgentList & agents() const;
209
bool take(const QDomElement &x);
220
class JT_VCard : public Task
224
JT_VCard(Task *parent);
227
void get(const Jid &);
228
void set(const VCard &);
230
const Jid & jid() const;
231
const VCard & vcard() const;
234
bool take(const QDomElement &x);
243
class JT_Search : public Task
247
JT_Search(Task *parent);
250
const Form & form() const;
251
const QValueList<SearchResult> & results() const;
253
void get(const Jid &);
254
void set(const Form &);
257
bool take(const QDomElement &x);
267
class JT_ClientVersion : public Task
271
JT_ClientVersion(Task *);
273
void get(const Jid &);
275
bool take(const QDomElement &);
277
const Jid & jid() const;
278
const QString & name() const;
279
const QString & version() const;
280
const QString & os() const;
286
QString v_name, v_ver, v_os;
289
class JT_ClientTime : public Task
293
JT_ClientTime(Task *, const Jid &);
296
bool take(const QDomElement &);
300
QString timezone, display;
306
class JT_ServInfo : public Task
313
bool take(const QDomElement &);
316
class JT_Gateway : public Task
322
void get(const Jid &);
323
void set(const Jid &, const QString &prompt);
325
bool take(const QDomElement &);
328
QString desc() const;
329
QString prompt() const;
336
QString v_prompt, v_desc;
339
class JT_Browse : public Task
346
void get(const Jid &);
348
const AgentList & agents() const;
349
const AgentItem & root() const;
352
bool take(const QDomElement &);
358
AgentItem browseHelper (const QDomElement &i);
361
class JT_DiscoItems : public Task
365
JT_DiscoItems(Task *);
368
void get(const Jid &, const QString &node = QString::null);
369
void get(const DiscoItem &);
371
const DiscoList &items() const;
374
bool take(const QDomElement &);
381
class JT_DiscoInfo : public Task
385
JT_DiscoInfo(Task *);
388
void get(const Jid &, const QString &node = QString::null, const DiscoItem::Identity = DiscoItem::Identity());
389
void get(const DiscoItem &);
391
const DiscoItem &item() const;
394
bool take(const QDomElement &);
401
class JT_DiscoPublish : public Task
405
JT_DiscoPublish(Task *);
408
void set(const Jid &, const DiscoList &);
411
bool take(const QDomElement &);