libqutim  0.3.1.0
conference.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** qutIM - instant messenger
4 **
5 ** Copyright © 2011 Ruslan Nigmatullin <euroelessar@yandex.ru>
6 **
7 *****************************************************************************
8 **
9 ** $QUTIM_BEGIN_LICENSE$
10 ** This program is free software: you can redistribute it and/or modify
11 ** it under the terms of the GNU General Public License as published by
12 ** the Free Software Foundation, either version 3 of the License, or
13 ** (at your option) any later version.
14 **
15 ** This program is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 ** See the GNU General Public License for more details.
19 **
20 ** You should have received a copy of the GNU General Public License
21 ** along with this program. If not, see http://www.gnu.org/licenses/.
22 ** $QUTIM_END_LICENSE$
23 **
24 ****************************************************************************/
25 #ifndef CONFERENCE_H
26 #define CONFERENCE_H
27 
28 #include "chatunit.h"
29 #include "buddy.h"
30 
31 namespace qutim_sdk_0_3
32 {
33 class ConferencePrivate;
34 class Buddy;
35 
37 {
38  Q_DECLARE_PRIVATE(Conference)
39  Q_PROPERTY(QString topic READ topic WRITE setTopic NOTIFY topicChanged)
40  Q_PROPERTY(qutim_sdk_0_3::Buddy* me READ me NOTIFY meChanged)
41  Q_PROPERTY(bool isJoined READ isJoined NOTIFY joinedChanged)
42  Q_OBJECT
43 public:
44  Conference(Account *account);
45  virtual ~Conference();
46  virtual QString topic() const;
47  virtual void setTopic(const QString &topic);
48  virtual Buddy *me() const = 0;
49  bool isJoined() const;
50 public slots:
51  void join();
52  void leave();
53  virtual void invite(qutim_sdk_0_3::Contact *contact, const QString &reason = QString());
54 signals:
55  void topicChanged(const QString &current, const QString &previous);
56  void meChanged(qutim_sdk_0_3::Buddy *me);
57  void left();
58  void joined();
59  void joinedChanged(bool isJoined);
60 protected slots:
61  void setJoined(bool set);
62 protected:
63  bool event(QEvent *ev);
64  virtual void doJoin() = 0;
65  virtual void doLeave() = 0;
66 };
67 
68 }
69 
70 Q_DECLARE_METATYPE(qutim_sdk_0_3::Conference*)
71 Q_DECLARE_METATYPE(QList<qutim_sdk_0_3::Conference*>)
72 
73 #endif // CONFERENCE_H
74 

Generated by Doxygen