diff options
author | Andreas Volz <andreas.volz@tux-style.com> | 2011-11-28 12:44:11 +0100 |
---|---|---|
committer | Andreas Volz <andreas.volz@tux-style.com> | 2011-11-28 12:44:11 +0100 |
commit | 1c8e43e6d60205b427c2c7540254c6d6fb9c2682 (patch) | |
tree | c0cb9512c6b607c5885c637b9630fb9f5e570c8e /include/dbus-c++/pipe.h | |
parent | b100e9d32a45b6173a8c9b1963f60bccc793afbe (diff) | |
download | dbus-c++-1c8e43e6d60205b427c2c7540254c6d6fb9c2682.tar.gz |
- NO FUNCTIONAL CODE CHANGES!!!!
- changed code formating from tabs to spaces and others
- used astyle with this option:
--style=ansi --indent=spaces=2 -M --pad-oper --unpad-paren --pad-header --align-pointer=name --lineend=linux
Diffstat (limited to 'include/dbus-c++/pipe.h')
-rw-r--r-- | include/dbus-c++/pipe.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/include/dbus-c++/pipe.h b/include/dbus-c++/pipe.h index 752d48d..999f042 100644 --- a/include/dbus-c++/pipe.h +++ b/include/dbus-c++/pipe.h @@ -30,38 +30,39 @@ /* STD */ #include <cstdlib> -namespace DBus { +namespace DBus +{ class DXXAPI Pipe { public: - /*! - * Write some data into the communication pipe. - * - * @param buffer The raw data to write. - * @param nbytes The number of bytes to write from the buffer. - */ - void write(const void *buffer, unsigned int nbytes); + /*! + * Write some data into the communication pipe. + * + * @param buffer The raw data to write. + * @param nbytes The number of bytes to write from the buffer. + */ + void write(const void *buffer, unsigned int nbytes); ssize_t read(void *buffer, unsigned int &nbytes); - /*! - * Simply write one single byte into the pipe. This is a shortcut - * if there's really no data to transport, but to activate the handler. - */ - void signal(); - + /*! + * Simply write one single byte into the pipe. This is a shortcut + * if there's really no data to transport, but to activate the handler. + */ + void signal(); + private: - void(*_handler)(const void *data, void *buffer, unsigned int nbyte); - int _fd_write; + void(*_handler)(const void *data, void *buffer, unsigned int nbyte); + int _fd_write; int _fd_read; - const void *_data; - - // allow construction only in BusDispatcher - Pipe (void(*handler)(const void *data, void *buffer, unsigned int nbyte), const void *data); - ~Pipe () {}; + const void *_data; + + // allow construction only in BusDispatcher + Pipe(void(*handler)(const void *data, void *buffer, unsigned int nbyte), const void *data); + ~Pipe() {}; -friend class BusDispatcher; + friend class BusDispatcher; }; } /* namespace DBus */ |