00001 /* 00002 * conchan.h 00003 * 00004 * Console I/O channel class. 00005 * 00006 * Portable Windows Library 00007 * 00008 * Copyright (c) 1993-1998 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Portable Windows Library. 00021 * 00022 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 00023 * 00024 * Portions are Copyright (C) 1993 Free Software Foundation, Inc. 00025 * All Rights Reserved. 00026 * 00027 * Contributor(s): ______________________________________. 00028 * 00029 * $Log: conchan.h,v $ 00030 * Revision 1.5 2003/09/17 05:41:58 csoutheren 00031 * Removed recursive includes 00032 * 00033 * Revision 1.4 2003/09/17 01:18:02 csoutheren 00034 * Removed recursive include file system and removed all references 00035 * to deprecated coooperative threading support 00036 * 00037 * Revision 1.3 2002/09/16 01:08:59 robertj 00038 * Added #define so can select if #pragma interface/implementation is used on 00039 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00040 * 00041 * Revision 1.2 2001/05/22 12:49:32 robertj 00042 * Did some seriously wierd rewrite of platform headers to eliminate the 00043 * stupid GNU compiler warning about braces not matching. 00044 * 00045 * Revision 1.1 1999/06/13 13:54:07 robertj 00046 * Added PConsoleChannel class for access to stdin/stdout/stderr. 00047 * 00048 */ 00049 00050 #ifndef _PCONSOLECHANNEL 00051 #define _PCONSOLECHANNEL 00052 00053 #ifdef P_USE_PRAGMA 00054 #pragma interface 00055 #endif 00056 00058 // Console Channel 00059 00062 class PConsoleChannel : public PChannel 00063 { 00064 PCLASSINFO(PConsoleChannel, PChannel); 00065 00066 public: 00067 enum ConsoleType { 00068 StandardInput, 00069 StandardOutput, 00070 StandardError 00071 }; 00072 00075 00076 PConsoleChannel(); 00077 00079 PConsoleChannel( 00080 ConsoleType type 00081 ); 00083 00084 00091 virtual BOOL Open( 00092 ConsoleType type 00093 ); 00095 00096 00097 // Include platform dependent part of class 00098 #ifdef _WIN32 00099 #include "msos/ptlib/conchan.h" 00100 #else 00101 #include "unix/ptlib/conchan.h" 00102 #endif 00103 00104 }; 00105 00106 #endif 00107 00108 // End Of File ///////////////////////////////////////////////////////////////