Async  0.18.0
AsyncFdWatch.h
Go to the documentation of this file.
1 
35 #ifndef ASYNC_FD_WATCH_INCLUDED
36 #define ASYNC_FD_WATCH_INCLUDED
37 
38 
39 /****************************************************************************
40  *
41  * System Includes
42  *
43  ****************************************************************************/
44 
45 #include <sigc++/sigc++.h>
46 
47 
48 /****************************************************************************
49  *
50  * Project Includes
51  *
52  ****************************************************************************/
53 
54 
55 
56 /****************************************************************************
57  *
58  * Local Includes
59  *
60  ****************************************************************************/
61 
62 
63 
64 /****************************************************************************
65  *
66  * Forward declarations
67  *
68  ****************************************************************************/
69 
70 
71 
72 /****************************************************************************
73  *
74  * Namespace
75  *
76  ****************************************************************************/
77 
78 namespace Async
79 {
80 
81 /****************************************************************************
82  *
83  * Defines & typedefs
84  *
85  ****************************************************************************/
86 
87 
88 
89 /****************************************************************************
90  *
91  * Exported Global Variables
92  *
93  ****************************************************************************/
94 
95 
96 
97 /****************************************************************************
98  *
99  * Class definitions
100  *
101  ****************************************************************************/
102 
119 class FdWatch : public SigC::Object
120 {
121  public:
125  typedef enum
126  {
129  } FdWatchType;
130 
140  FdWatch(int fd, FdWatchType type);
141 
145  ~FdWatch(void);
146 
151  int fd(void) const { return m_fd; }
152 
157  FdWatchType type(void) const { return m_type; }
158 
164  void setEnabled(bool enabled);
165 
170  bool isEnabled(void) const { return m_enabled; }
171 
176  SigC::Signal1<void, FdWatch*> activity;
177 
178 
179  protected:
180 
181  private:
182  int m_fd;
183  FdWatchType m_type;
184  bool m_enabled;
185 
186 }; /* class FdWatch */
187 
188 
189 } /* namespace */
190 
191 #endif /* ASYNC_FD_WATCH_INCLUDED */
192 
193 
194 
195 /*
196  * This file has not been truncated
197  */
198