home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / WEBSERVE / PI3 / PI3WEB.EXE / DEVEL / INCLUDE / PIIO.H < prev    next >
C/C++ Source or Header  |  1997-10-19  |  4KB  |  127 lines

  1. /*____________________________________________________________________________*\
  2.  *
  3.  
  4.  Copyright (c) 1997 John Roy. All rights reserved.
  5.  
  6.  These sources, libraries and applications are
  7.  FREE FOR COMMERCIAL AND NON-COMMERCIAL USE
  8.  as long as the following conditions are adhered to.
  9.  
  10.  Redistribution and use in source and binary forms, with or without
  11.  modification, are permitted provided that the following conditions
  12.  are met:
  13.  
  14.  1. Redistributions of source code must retain the above copyright
  15.     notice, this list of conditions and the following disclaimer. 
  16.  
  17.  2. Redistributions in binary form must reproduce the above copyright
  18.     notice, this list of conditions and the following disclaimer in
  19.     the documentation and/or other materials provided with the
  20.     distribution.
  21.  
  22.  3. Redistributions of any form whatsoever and all advertising materials 
  23.     mentioning features must contain the following
  24.     acknowledgment:
  25.     "This product includes software developed by John Roy
  26.     (http://www.johnroy.com/pi3/)."
  27.  
  28.  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  29.  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  30.  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  31.  IN NO EVENT SHALL THE AUTHORS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
  32.  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  33.  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  34.  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35.  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  36.  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  37.  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  38.  OF THE POSSIBILITY OF SUCH DAMAGE.
  39.  
  40.  *____________________________________________________________________________*|
  41.  *
  42.  * $Source: PIIO.h$
  43.  * $Date: Sun Aug 10 06:42:18 1997$
  44.  *
  45.  Description:
  46. \*____________________________________________________________________________*/
  47. /* $HeaderTop:$ */
  48.  
  49. #ifndef PIIO_H_
  50. #define PIIO_H_
  51.  
  52. #include "PIObject.h"
  53.  
  54. /*____________________________________________________________________________*\
  55.  *
  56. Typedefs and function prototypes
  57. \*____________________________________________________________________________*/
  58.  
  59. /*____________________________________________________________________________*\
  60.  *
  61.  Name:
  62.     PIIO_in
  63.  
  64.  Synopsis:
  65.     int PIIO_in( PIObject *pObj, void *pData, int iLen, int *piReceived,
  66.         int iArgc, const char *ppArgv[] )
  67.     
  68.  Description:
  69.     Read a block of data from the IO object <B>pObj</B> into the buffer
  70.     <B>pData</B>. Up to
  71.     <B>iLen</B> bytes may be read. On success the number bytes read is written
  72.     to the integer pointer to by <B>piReceived</B>
  73.  
  74.     Optional additional parameters may be passed to the IO object, the
  75.     parameters <B>iArgc</B> and <B>ppArgv</B> specify the number of elements in
  76.     an array of values and the array of values respectively.
  77.  
  78.  Notes:
  79.     On normal channel close (gracefull socket or pipe close) PIAPI_COMPLETED
  80.     is returned and the value at <B>piReceived</B> set to zero.
  81.  
  82.  Return Values:
  83.     On success PIAPI_COMPLETED is returned. 
  84.  
  85.  Errors:
  86.     On error PIAPI_ERROR is returned.
  87.  
  88.  See Also:
  89.     PIIO_out
  90. \*____________________________________________________________________________*/
  91. PUBLIC_PIAPI int PIIO_in( PIObject *pObj, void *pData, int iLen,
  92.     int *piReceived, int iArgc, const char *ppArgv[] );
  93.  
  94. /*____________________________________________________________________________*\
  95.  *
  96.  Name:
  97.     PIIO_out
  98.  
  99.  Synopsis:
  100.     int PIIO_out( PIObject *pObj, void *pData, int iLen, int *piSent,
  101.         int iArgc, const char *ppArgv[] )
  102.     
  103.  Description:
  104.     Send a block of data in buffer <B>pData</B> with length <B>iLen</B> into
  105.     the IO object <B>pObj</B>. On success the value at <B>piSent</B> is set
  106.     to the number of bytes written.
  107.  
  108.     Optional additional parameters may be passed to the IO object, the
  109.     parameters <B>iArgc</B> and <B>ppArgv</B> specify the number of elements in
  110.     an array of values and the array of values respectively.
  111.  
  112.  Notes:
  113.  Return Values:
  114.     On success PIAPI_COMPLETED is returned. 
  115.  
  116.  Errors:
  117.     On error PIAPI_ERROR is returned.
  118.  
  119.  See Also:
  120.     PIIO_in
  121. \*____________________________________________________________________________*/
  122. PUBLIC_PIAPI int     PIIO_out( PIObject *pObj, void *pData, int iLen,
  123.     int *piSent, int iArgc, const char *ppArgv[] );
  124.  
  125. #endif    /* PIIO_H_ */
  126.  
  127.