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

« back to all changes in this revision

Viewing changes to kdebluetooth/libkbluetooth/service.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
 
 *  Security implementation of bluez DBus API
4
 
 *
5
 
 *  Copyright (C) 2006  Daniel Gollub <dgollub@suse.de>
6
 
 *
7
 
 *
8
 
 *  This file is part of libkbluetooth.
9
 
 *
10
 
 *  libkbluetooth 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 2 of the License, or
13
 
 *  (at your option) any later version.
14
 
 *
15
 
 *  libkbluetooth 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.  See the
18
 
 *  GNU General Public License for more details.
19
 
 *
20
 
 *  You should have received a copy of the GNU General Public License
21
 
 *  along with libkbluetooth; if not, write to the Free Software
22
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
23
 
 *
24
 
 */
25
 
 
26
 
 
27
 
#ifndef SERVICE_H
28
 
#define SERVICE_H
29
 
 
30
 
#include "dbussignal.h"
31
 
#include "dbusfilter.h"
32
 
 
33
 
#define INTERFACE_SERVICE "org.bluez.Service"
34
 
 
35
 
namespace KBluetooth
36
 
{
37
 
 
38
 
class Service : public DBusSignal
39
 
{
40
 
 
41
 
        Q_OBJECT
42
 
        public:
43
 
                Service(DBusConnection *dbusconn, const QString &servicepath);
44
 
                ~Service();
45
 
 
46
 
                typedef QValueList<QString> UserList;
47
 
 
48
 
                QString getIdentifier();
49
 
                QString getName();
50
 
                QString getDescription();
51
 
                QString getBusName();
52
 
                bool start();
53
 
                bool stop();
54
 
                bool isRunning();
55
 
                bool isExternal();
56
 
                UserList listUsers();
57
 
                bool removeUser(const QString &address);
58
 
                bool setTrusted(const QString &address);
59
 
                bool isTrusted(const QString &address);
60
 
                bool removeTrust(const QString &address);
61
 
                QStringList listTrusts();
62
 
 
63
 
        signals:        
64
 
                void stopped();
65
 
                void started();
66
 
                void trustAdded(const QString &address);
67
 
                void trustRemoved(const QString &address);
68
 
 
69
 
        private:        
70
 
                QString path;
71
 
                QString match;
72
 
                DBusConnection *conn;
73
 
                DBusFilter *filter;
74
 
 
75
 
                static Service *_service;
76
 
                static DBusHandlerResult filterFunction(DBusConnection * conn, DBusMessage *msg, void * data);
77
 
};
78
 
}
79
 
 
80
 
#endif // SERVICE_H