~ubuntu-branches/ubuntu/quantal/psi/quantal

« back to all changes in this revision

Viewing changes to iris/include/xmpp_features.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_features.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_FEATURES_H
22
 
#define XMPP_FEATURES_H
23
 
 
24
 
#include <QStringList>
25
 
 
26
 
class QString;
27
 
 
28
 
namespace XMPP
29
 
{
30
 
        class Features
31
 
        {
32
 
        public:
33
 
                Features();
34
 
                Features(const QStringList &);
35
 
                Features(const QString &);
36
 
                ~Features();
37
 
 
38
 
                QStringList list() const; // actual featurelist
39
 
                void setList(const QStringList &);
40
 
                void addFeature(const QString&);
41
 
 
42
 
                // features
43
 
                bool canRegister() const;
44
 
                bool canSearch() const;
45
 
                bool canMulticast() const;
46
 
                bool canGroupchat() const;
47
 
                bool canVoice() const;
48
 
                bool canDisco() const;
49
 
                bool canChatState() const;
50
 
                bool canCommand() const;
51
 
                bool isGateway() const;
52
 
                bool haveVCard() const;
53
 
 
54
 
                enum FeatureID {
55
 
                        FID_Invalid = -1,
56
 
                        FID_None,
57
 
                        FID_Register,
58
 
                        FID_Search,
59
 
                        FID_Groupchat,
60
 
                        FID_Disco,
61
 
                        FID_Gateway,
62
 
                        FID_VCard,
63
 
                        FID_AHCommand,
64
 
 
65
 
                        // private Psi actions
66
 
                        FID_Add
67
 
                };
68
 
 
69
 
                // useful functions
70
 
                bool test(const QStringList &) const;
71
 
 
72
 
                QString name() const;
73
 
                static QString name(long id);
74
 
                static QString name(const QString &feature);
75
 
 
76
 
                long id() const;
77
 
                static long id(const QString &feature);
78
 
                static QString feature(long id);
79
 
 
80
 
                class FeatureName;
81
 
        private:
82
 
                QStringList _list;
83
 
        };
84
 
}
85
 
 
86
 
#endif