~ubuntu-branches/ubuntu/utopic/psi/utopic

« back to all changes in this revision

Viewing changes to iris/src/xmpp/xmpp-im/xmpp_discoitem.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2009-09-25 17:49:51 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090925174951-lvm7kdap82o8xhn3
Tags: 0.13-1
* Updated to upstream version 0.13
* Set Standards-Version to 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * xmpp_discoitem.h
 
3
 * Copyright (C) 2003  Justin Karneges
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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
 
18
 *
 
19
 */
 
20
 
 
21
#ifndef XMPP_DISCOITEM
 
22
#define XMPP_DISCOITEM
 
23
 
 
24
#include <QString>
 
25
 
 
26
#include "xmpp/jid/jid.h"
 
27
#include "xmpp_features.h"
 
28
#include "xmpp_agentitem.h"
 
29
 
 
30
namespace XMPP {
 
31
        class DiscoItem
 
32
        {
 
33
        public:
 
34
                DiscoItem();
 
35
                ~DiscoItem();
 
36
 
 
37
                const Jid &jid() const;
 
38
                const QString &node() const;
 
39
                const QString &name() const;
 
40
 
 
41
                void setJid(const Jid &);
 
42
                void setName(const QString &);
 
43
                void setNode(const QString &);
 
44
 
 
45
                enum Action {
 
46
                        None = 0,
 
47
                        Remove,
 
48
                        Update
 
49
                };
 
50
 
 
51
                Action action() const;
 
52
                void setAction(Action);
 
53
 
 
54
                const Features &features() const;
 
55
                void setFeatures(const Features &);
 
56
 
 
57
                struct Identity
 
58
                {
 
59
                        QString category;
 
60
                        QString name;
 
61
                        QString type;
 
62
                };
 
63
 
 
64
                typedef QList<Identity> Identities;
 
65
 
 
66
                const Identities &identities() const;
 
67
                void setIdentities(const Identities &);
 
68
 
 
69
                // some useful helper functions
 
70
                static Action string2action(QString s);
 
71
                static QString action2string(Action a);
 
72
 
 
73
                DiscoItem & operator= (const DiscoItem &);
 
74
                DiscoItem(const DiscoItem &);
 
75
 
 
76
                operator AgentItem() const { return toAgentItem(); }
 
77
                AgentItem toAgentItem() const;
 
78
                void fromAgentItem(const AgentItem &);
 
79
 
 
80
        private:
 
81
                class Private;
 
82
                Private *d;
 
83
        };
 
84
}
 
85
 
 
86
#endif