forked from maliit/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverdbusaddress.h
More file actions
83 lines (63 loc) · 1.58 KB
/
serverdbusaddress.h
File metadata and controls
83 lines (63 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* * This file is part of Maliit framework *
*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation
* and appearing in the file LICENSE.LGPL included in the packaging
* of this file.
*/
#ifndef MALIIT_SERVER_DBUS_SERVERDBUSADDRESS_H
#define MALIIT_SERVER_DBUS_SERVERDBUSADDRESS_H
#include <QObject>
#include <QString>
QT_BEGIN_NAMESPACE
class QDBusServer;
QT_END_NAMESPACE
namespace Maliit {
namespace Server {
namespace DBus {
class AddressPublisher : public QObject
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.maliit.Server.Address")
Q_PROPERTY(QString address READ address)
public:
explicit AddressPublisher(const QString &address);
~AddressPublisher();
QString address() const;
private:
const QString mAddress;
};
class Address
{
public:
explicit Address();
virtual ~Address();
virtual QDBusServer* connect() = 0;
};
class DynamicAddress : public Address
{
public:
explicit DynamicAddress();
//! reimpl
virtual QDBusServer* connect();
private:
QScopedPointer<AddressPublisher> publisher;
};
class FixedAddress : public Address
{
public:
explicit FixedAddress(const QString &address);
//! reimpl
virtual QDBusServer* connect();
private:
QString mAddress;
};
} // namespace DBus
} // namespace Server
} // namespace Maliit
#endif // MALIIT_SERVER_DBUS_SERVERDBUSADDRESS_H