DBus-1-TQt
1.0
tqdbusunixfd.h
Go to the documentation of this file.
1
/* tqdbusunixfd.h DBUS unix file handle data type
2
*
3
* Copyright (C) 2013 Slávek Banko <slavek.banko@axis.cz>
4
*
5
* Licensed under the Academic Free License version 2.1
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20
* USA.
21
*
22
*/
23
24
#ifndef TQDBUSUNIXFD_H
25
#define TQDBUSUNIXFD_H
26
27
#include "dbus/dbus.h"
28
#ifndef QT_H
29
#include "tqshared.h"
30
#endif // QT_H
31
#include "
tqdbusmacros.h
"
32
33
34
#ifndef DBUS_TYPE_UNIX_FD
35
#define DBUS_TYPE_UNIX_FD ((int) 'h')
36
#endif
37
38
#ifndef DBUS_TYPE_UNIX_FD_AS_STRING
39
#define DBUS_TYPE_UNIX_FD_AS_STRING "h"
40
#endif
41
51
class
TQDBUS_EXPORT
TQT_DBusUnixFd
52
{
53
public
:
57
TQT_DBusUnixFd
();
58
64
TQT_DBusUnixFd
(
const
TQT_DBusUnixFd
& other);
65
71
TQT_DBusUnixFd
(
int
other);
72
76
virtual
~
TQT_DBusUnixFd
();
77
86
bool
isValid()
const
;
87
93
int
fileDescriptor()
const
;
94
100
void
setFileDescriptor(
int
fileDescriptor);
101
107
void
giveFileDescriptor(
int
fileDescriptor);
108
114
TQT_DBusUnixFd
&operator=(
const
TQT_DBusUnixFd
&other );
115
124
inline
bool
operator==
(
const
TQT_DBusUnixFd
& other)
const
125
{
126
return
(&other ==
this
) || (other.
d
== d);
127
}
128
137
inline
bool
operator!=
(
const
TQT_DBusUnixFd
& other)
const
138
{
139
return
(&other !=
this
) && (other.
d
!= d);
140
}
141
142
143
protected
:
144
struct
TQT_DBusUnixFdPrivate
:
public
TQShared {
145
int
fd
;
146
} *d;
147
148
};
149
150
#endif
TQT_DBusUnixFd::TQT_DBusUnixFdPrivate
Definition:
tqdbusunixfd.h:144
TQT_DBusUnixFd::operator!=
bool operator!=(const TQT_DBusUnixFd &other) const
Checks if the given other variant is not equal to this one.
Definition:
tqdbusunixfd.h:137
TQT_DBusUnixFd::operator==
bool operator==(const TQT_DBusUnixFd &other) const
Checks if the given other variant is equal to this one.
Definition:
tqdbusunixfd.h:124
TQT_DBusUnixFd::TQT_DBusUnixFdPrivate::fd
int fd
Definition:
tqdbusunixfd.h:145
TQT_DBusUnixFd
Class for representing D-Bus unix file handles.
Definition:
tqdbusunixfd.h:51
tqdbusmacros.h
TQT_DBusUnixFd::d
TQT_DBusUnixFd::TQT_DBusUnixFdPrivate * d
TQDBUS_EXPORT
#define TQDBUS_EXPORT
Definition:
tqdbusmacros.h:29
build
dbus-1-tqt-iiefrd
dbus-1-tqt-14.1.5~pre1
src
tqdbusunixfd.h
Generated by
1.8.17