~ubuntu-branches/ubuntu/maverick/bluedevil/maverick-proposed

« back to all changes in this revision

Viewing changes to src/daemon/helpers/authorize/authorize.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2010-08-07 09:04:19 UTC
  • Revision ID: james.westby@ubuntu.com-20100807090419-68k54ucso2htcf5z
Tags: upstream-1.0~rc2
ImportĀ upstreamĀ versionĀ 1.0~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2010 Alejandro Fiestas Olivares <alex@eyeos.org>        *
 
3
 *   Copyright (C) 2010 Eduardo Robles Elvira <edulix@gmail.com>           *
 
4
 *   Copyright (C) 2010 UFO Coders <info@ufocoders.com>                    *
 
5
 *                                                                         *
 
6
 *   This program is free software; you can redistribute it and/or modify  *
 
7
 *   it under the terms of the GNU General Public License as published by  *
 
8
 *   the Free Software Foundation; either version 2 of the License, or     *
 
9
 *   (at your option) any later version.                                   *
 
10
 *                                                                         *
 
11
 *   This program is distributed in the hope that it will be useful,       *
 
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
14
 *   GNU General Public License for more details.                          *
 
15
 *                                                                         *
 
16
 *   You should have received a copy of the GNU General Public License     *
 
17
 *   along with this program; if not, write to the                         *
 
18
 *   Free Software Foundation, Inc.,                                       *
 
19
 *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
 
20
 ***************************************************************************/
 
21
 
 
22
#ifndef AUTHORIZE_H
 
23
#define AUTHORIZE_H
 
24
 
 
25
#include <QtCore/QObject>
 
26
 
 
27
/**
 
28
 * @short Small class which send a KNotificaton to know if the Bluetooth device is authorized or not
 
29
 * A popup KNotification is send with 3 actions, trust accept and reject.
 
30
 * Trust set the remote device as trusted (using libbluedevil remote device) and quits with 0
 
31
 * Authorize quits the app with 0 (which means authorized).
 
32
 * Deny quits the app with 1 (which means denied)
 
33
 * @internal
 
34
 */
 
35
class Authorize
 
36
    : public QObject
 
37
{
 
38
    Q_OBJECT
 
39
 
 
40
public:
 
41
    /**
 
42
     * Launch the KNotification which the respective actions, also makes the needed connection
 
43
     * between those actions and the slots
 
44
     */
 
45
    Authorize();
 
46
 
 
47
private Q_SLOTS:
 
48
    /**
 
49
     * Mark the remote device as trust and quit the application as success
 
50
     */
 
51
    void trust();
 
52
 
 
53
    /**
 
54
     * Quits the application as success
 
55
     */
 
56
    void authorize();
 
57
 
 
58
    /**
 
59
     * Quits the application as error
 
60
     */
 
61
    void deny();
 
62
};
 
63
#endif