Initial documentation for QPipe.

svn path=/trunk/kdesupport/qca/; revision=670617
This commit is contained in:
Brad Hards 2007-06-02 07:08:31 +00:00
parent 562fb75a48
commit 3fedad1900
2 changed files with 36 additions and 2 deletions

View File

@ -1008,7 +1008,7 @@ INCLUDE_FILE_PATTERNS =
# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
PREDEFINED =
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.

View File

@ -30,6 +30,8 @@
#ifndef QPIPE_H
#define QPIPE_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifndef QPIPE_NO_SECURE
# define QPIPE_SECURE
#endif
@ -50,6 +52,8 @@ typedef int Q_PIPE_ID;
#define INVALID_Q_PIPE_ID -1
#endif
#endif
// Note: for Windows console, I/O must be in UTF-8. Reads are guaranteed to
// to completely decode (no partial characters). Likewise, writes must
// not contain partial characters.
@ -163,22 +167,52 @@ private:
Private *d;
};
// creates a full pipe (two pipe ends), non-inheritable
/**
A FIFO buffer (named pipe) abstraction
This class creates a full buffer, consisting of two ends (QPipeEnd).
\note This class is non-inheritable
*/
class QCA_EXPORT QPipe
{
public:
/**
Standard constructor
\param parent the parent object for this object
*/
QPipe(QObject *parent = 0);
~QPipe();
/**
reset the pipe
*/
void reset();
#ifdef QPIPE_SECURE
/**
create the pipe
\param secure whether to use secure memory (true) or not (false)
*/
bool create(bool secure = false);
#else
/**
create the pipe
*/
bool create();
#endif
/**
The read end of the pipe.
*/
QPipeEnd & readEnd() { return i; }
/**
The write end of the pipe.
*/
QPipeEnd & writeEnd() { return o; }
private: