dbus-cxx logo
filedescriptor.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2009,2010 by Rick L. Vinyard, Jr. *
3  * rvinyard@cs.nmsu.edu *
4  * Copyright (C) 2014- by Robert Middleton *
5  * *
6  * This file is part of the dbus-cxx library. *
7  * *
8  * The dbus-cxx library is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU General Public License *
10  * version 3 as published by the Free Software Foundation. *
11  * *
12  * The dbus-cxx library is distributed in the hope that it will be *
13  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty *
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15  * General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this software. If not see <http://www.gnu.org/licenses/>. *
19  ***************************************************************************/
20 
21 #ifndef DBUS_CXX_FILEDESCRIPTOR
22 #define DBUS_CXX_FILEDESCRIPTOR
23 
24 namespace DBus{
25 
31 public:
33  m_fd = -1;
34  }
35 
36  FileDescriptor( int fd ){
37  m_fd = fd;
38  }
39 
41 
43  m_fd = fd;
44  return *this;
45  }
46 
47  int getDescriptor() const{
48  return m_fd;
49  }
50 
51  void setDescriptor( int fd ){
52  m_fd = fd;
53  }
54 
55 private:
56  int m_fd;
57 };
58 
59 }
60 
61 #endif
FileDescriptor & operator=(int fd)
Definition: filedescriptor.h:42
Definition: accumulators.h:24
FileDescriptor()
Definition: filedescriptor.h:32
~FileDescriptor()
Definition: filedescriptor.h:40
void setDescriptor(int fd)
Definition: filedescriptor.h:51
int getDescriptor() const
Definition: filedescriptor.h:47
int m_fd
Definition: filedescriptor.h:56
A FileDescriptor holds a UNIX file descriptor that can be passed between processes.
Definition: filedescriptor.h:30
FileDescriptor(int fd)
Definition: filedescriptor.h:36

Generated on Sun Mar 19 2017 14:54:27 for dbus-cxx by doxygen 1.8.8