~ubuntu-branches/ubuntu/intrepid/kdebluetooth/intrepid-proposed

« back to all changes in this revision

Viewing changes to kdebluetooth/kcm_btpaired/pairedtab.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2008-08-07 09:49:47 UTC
  • mto: This revision was merged to the branch mainline in revision 56.
  • Revision ID: james.westby@ubuntu.com-20080807094947-pj6q3uxwuv7l844q
Tags: upstream-0.1
ImportĀ upstreamĀ versionĀ 0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *
3
 
 *  KDE Control Center Module for managing Bluetooth linkkeys 
4
 
 *
5
 
 *  Copyright (C) 2003  Fred Schaettgen <kdebluetooth@schaettgen.de>
6
 
 *  Copyright (C) 2006  Daniel Gollub <dgollub@suse.de>
7
 
 *
8
 
 *
9
 
 *  This file is part of kcm_btpaired.
10
 
 *
11
 
 *  libkbluetooth is free software; you can redistribute it and/or modify
12
 
 *  it under the terms of the GNU General Public License as published by
13
 
 *  the Free Software Foundation; either version 2 of the License, or
14
 
 *  (at your option) any later version.
15
 
 *
16
 
 *  libkbluetooth is distributed in the hope that it will be useful,
17
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 
 *  GNU General Public License for more details.
20
 
 *
21
 
 *  You should have received a copy of the GNU General Public License
22
 
 *  along with libkbluetooth; if not, write to the Free Software
23
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
24
 
 *
25
 
 */
26
 
 
27
 
 
28
 
#ifndef PAIREDTAB_H
29
 
#define PAIREDTAB_H
30
 
 
31
 
#include "pairedtabbase.h"
32
 
#include <qcstring.h>
33
 
#include <qdatastream.h>
34
 
#include <qstringlist.h>
35
 
#include <qdatetime.h>
36
 
#include <vector>
37
 
#include <stdint.h>
38
 
 
39
 
#include "exportdialog.h"
40
 
 
41
 
#include <libkbluetooth/dbusinit.h>
42
 
#include <libkbluetooth/dbusfilter.h>
43
 
#include <libkbluetooth/adapter.h>
44
 
#include <libkbluetooth/manager.h>
45
 
#include <libkbluetooth/service.h>
46
 
 
47
 
class DCOPClient;
48
 
class KDirWatch;
49
 
class FileSettingsBase;
50
 
 
51
 
using namespace KBluetooth;
52
 
 
53
 
/**
54
 
@author Fred Schaettgen
55
 
*/
56
 
class PairedTab : public PairedTabBase
57
 
{
58
 
Q_OBJECT
59
 
public:
60
 
    PairedTab(QWidget *parent, const char* name);
61
 
    ~PairedTab();
62
 
private:
63
 
    struct PairingInfo {
64
 
        QString localAddr;
65
 
        QString localName;
66
 
        QString remoteAddr;
67
 
        QString remoteName;
68
 
        QString remoteClass;
69
 
        uint8_t linkKey[16];
70
 
        uint8_t type;
71
 
        QString lastUsedTime;
72
 
        QString lastSeenTime;
73
 
        QListViewItem *listViewItem;
74
 
    };
75
 
    std::vector<PairingInfo> pairingList;
76
 
    std::vector<Service*> ServiceList;
77
 
    
78
 
    void reloadList();
79
 
    void updateGUI();
80
 
 
81
 
    DBusInit *dbus;
82
 
    DBusFilter *filter;
83
 
    DBusConnection *conn;
84
 
 
85
 
    static DBusHandlerResult filterFunction(DBusConnection *conn, DBusMessage *msg, void *data);
86
 
 
87
 
    static PairedTab *_ctx; 
88
 
 
89
 
    ExportDialog *exportBondingDialog;
90
 
    Service* service;
91
 
    QString truststring;
92
 
    bool trustedDev;
93
 
 
94
 
    void getDetails(const char*,Adapter&);
95
 
    void getServiceList(Adapter&);
96
 
    void getBondingList(Adapter&);
97
 
    QString localAddr;
98
 
    QString localName;
99
 
    
100
 
private slots:
101
 
    void slotListChanged();
102
 
    void slotRemovePairing();
103
 
    void slotRemoveTrust();
104
 
    void slotSelectionChanged();
105
 
    void slotExportBonding();
106
 
 
107
 
};
108
 
 
109
 
#endif