summaryrefslogtreecommitdiff
path: root/dbusInterfaces/DBusTypes.cpp
blob: 0345ab163956d23521c6f1ae1f0b6f20e281a4db (plain)
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
#include "DBusTypes.h"

class QDBusArgument;

QDBusArgument &operator<<(QDBusArgument &argument, const SourceType &mySource) {
	argument.beginStructure();
  	argument << mySource.name << mySource.ID;
 	argument.endStructure();
  	return argument;
}

const QDBusArgument &operator>>(QDBusArgument const &argument, SourceType &mySource) {
	argument.beginStructure();
    argument >> mySource.name >> mySource.ID;
    argument.endStructure();
    return argument;
}

QDBusArgument &operator<<(QDBusArgument &argument, const SinkType &mySink) {
	argument.beginStructure();
  	argument << mySink.name << mySink.ID;
 	argument.endStructure();
  	return argument;
}

const QDBusArgument &operator>>(QDBusArgument const &argument, SinkType &mySink) {
	argument.beginStructure();
    argument >> mySink.name >> mySink.ID;
    argument.endStructure();
    return argument;
}

QDBusArgument &operator<<(QDBusArgument &argument, const ConnectionType &myConnection) {
	argument.beginStructure();
  	argument << myConnection.Source_ID << myConnection.Sink_ID;
 	argument.endStructure();
  	return argument;
}

const QDBusArgument &operator>>(QDBusArgument const &argument, ConnectionType &myConnection) {
	argument.beginStructure();
    argument >> myConnection.Source_ID >> myConnection.Sink_ID;
    argument.endStructure();
    return argument;
}