1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
/*
* im.h - XMPP "IM" library API
* Copyright (C) 2003 Justin Karneges
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef XMPP_IM_H
#define XMPP_IM_H
#include <qdatetime.h>
//Added by qt3to4:
#include <QList>
#include "xmpp.h"
#include "xmpp_jid.h"
#include "xmpp_muc.h"
#include "xmpp_message.h"
#include "xmpp_chatstate.h"
#include "xmpp_status.h"
#include "xmpp_htmlelement.h"
#include "xmpp_features.h"
#include "xmpp_httpauthrequest.h"
#include "xmpp_url.h"
#include "xmpp_task.h"
#include "xmpp_resource.h"
#include "xmpp_resourcelist.h"
#include "xmpp_roster.h"
#include "xmpp_rosteritem.h"
#include "xmpp_liverosteritem.h"
#include "xmpp_liveroster.h"
#include "xmpp_rosterx.h"
#include "xmpp_xdata.h"
#include "xmpp_discoitem.h"
#include "xmpp_agentitem.h"
#include "xmpp_client.h"
#include "xmpp_address.h"
#include "xmpp_pubsubitem.h"
#include "xmpp_pubsubretraction.h"
namespace XMPP
{
typedef QMap<QString, QString> StringMap;
typedef QList<AgentItem> AgentList;
typedef QList<DiscoItem> DiscoList;
class FormField
{
public:
enum { username, nick, password, name, first, last, email, address, city, state, zip, phone, url, date, misc };
FormField(const QString &type="", const QString &value="");
~FormField();
int type() const;
QString fieldName() const;
QString realName() const;
bool isSecret() const;
const QString & value() const;
void setType(int);
bool setType(const QString &);
void setValue(const QString &);
private:
int tagNameToType(const QString &) const;
QString typeToTagName(int) const;
int v_type;
QString v_value;
class Private;
Private *d;
};
class Form : public QList<FormField>
{
public:
Form(const Jid &j="");
~Form();
Jid jid() const;
QString instructions() const;
QString key() const;
void setJid(const Jid &);
void setInstructions(const QString &);
void setKey(const QString &);
private:
Jid v_jid;
QString v_instructions, v_key;
class Private;
Private *d;
};
class SearchResult
{
public:
SearchResult(const Jid &jid="");
~SearchResult();
const Jid & jid() const;
const QString & nick() const;
const QString & first() const;
const QString & last() const;
const QString & email() const;
void setJid(const Jid &);
void setNick(const QString &);
void setFirst(const QString &);
void setLast(const QString &);
void setEmail(const QString &);
private:
Jid v_jid;
QString v_nick, v_first, v_last, v_email;
};
}
#endif
|