libqutim
0.3.1.0
Main Page
Related Pages
Namespaces
Classes
Globals
Globals
File List
authorizationdialog.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 AUTHORIZATIONDIALOG_H
26
#define AUTHORIZATIONDIALOG_H
27
28
#include "
libqutim_global.h
"
29
#include <QEvent>
30
31
32
namespace
qutim_sdk_0_3
33
{
34
35
class
Contact;
36
namespace
Authorization
37
{
38
42
//FIXME create new notification filter-like API
43
class
LIBQUTIM_EXPORT
Request
:
public
QEvent
44
{
45
public
:
46
Request
(
Contact
*contact,
const
QString &body = QString())
47
: QEvent(eventType()), m_contact(contact), m_body(body) {}
48
Contact
*
contact
()
const
{
return
m_contact; }
49
QString
body
()
const
{
return
m_body; }
51
static
QEvent::Type
eventType();
52
private
:
53
Type
m_type;
54
Contact
*m_contact;
55
QString m_body;
56
};
57
58
class
LIBQUTIM_EXPORT
Reply
:
public
QEvent
59
{
60
public
:
61
enum
Type
{
62
New
,
63
Accept
,
64
Reject
,
65
Accepted
,
66
Rejected
67
};
68
Reply
(
Type
type,
Contact
*contact,
const
QString &body = QString())
69
: QEvent(eventType()), m_type(type), m_contact(contact), m_body(body) {}
70
Contact
*
contact
()
const
{
return
m_contact; }
71
QString
body
()
const
{
return
m_body; }
72
Type
replyType
()
const
{
return
m_type; }
73
void
setType
(
Type
type) { m_type = type; }
75
static
QEvent::Type
eventType();
76
private
:
77
Type
m_type;
78
Contact
*m_contact;
79
QString m_body;
80
};
81
82
LIBQUTIM_EXPORT
QObject *
service
();
//alias
83
84
}
//namespace Authorization
85
86
}
//namespace qutim_sdk_0_3
87
88
89
#endif // AUTHORIZATIONDIALOG_H
90
Generated by Doxygen