Eneboo - Documentación para desarrolladores
src/qt/include/private/qpipe_p.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 ** $Id: qpipe_p.h,v 1.1.2.3 2005/03/12 11:04:38 chehrlic Exp $
00003 **
00004 ** Implementation of (internal used) QPipe class
00005 **
00006 ** Created : 20040420
00007 **
00008 ** Copyright (C) 2004-2005 Ralf Habacker
00009 **
00010 ** This file is part of the kernel module of the Qt GUI Toolkit.
00011 **
00012 ** This file may be distributed and/or modified under the terms of the
00013 ** GNU General Public License version 2 as published by the Free Software
00014 ** Foundation and appearing in the file LICENSE.GPL included in the
00015 ** packaging of this file.
00016 **
00017 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00018 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00019 **
00020 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00021 **   information about Qt Commercial License Agreements.
00022 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
00023 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00024 **
00025 ** Contact kde-cygwin@kde.org if any conditions of this licensing are
00026 ** not clear to you.
00027 **
00028 **********************************************************************/
00029 
00030 
00031 #ifndef QPIPE_H
00032 #define QPIPE_H
00033 
00034 #include "qobject.h"
00035 
00036 class QPipe
00037 {
00038 public:
00039     typedef enum { toClient, fromClient } Type;
00040     typedef enum { none, Stdin, Stdout, Stderr} StdType;
00041     QPipe( Type _type, StdType stdtype = none );
00042     ~QPipe();
00043     const char *getError()
00044     {
00045         return error;
00046     }
00047     int write( char *buf, int size );
00048     int read( char *buf, int size );
00049     int isReadable();
00050     HANDLE getClientHandle();
00051 
00052     void restore();
00053 
00054 private:
00055     DWORD get_std_handle( StdType stdtype );
00056     HANDLE hRead, hWrite, hDup, hSave;
00057     char *error;
00058     Type type;
00059     StdType m_stdtype;
00060     DWORD std_handle;
00061 };
00062 
00063 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'