8 #ifndef _STREAM_DEFINED
10 #define _STREAM_DEFINED
12 #if defined( INC_ALL )
17 #if defined( __WIN32__ ) || defined( __WINCE__ )
19 #elif defined( __UNIX__ ) || defined( __BEOS__ ) || defined( __XMK__ )
21 #elif defined( __MAC__ )
23 #elif defined( __PALMOS__ )
25 #elif defined( __UCOSII__ )
27 #elif !defined( CONFIG_NO_STDIO )
48 #define FILE_FLAG_NONE 0x00
49 #define FILE_FLAG_READ 0x01
50 #define FILE_FLAG_WRITE 0x02
51 #define FILE_FLAG_EXCLUSIVE_ACCESS 0x04
52 #define FILE_FLAG_PRIVATE 0x08
53 #define FILE_FLAG_SENSITIVE 0x10
54 #define FILE_FLAG_RW_MASK 0x03
55 #define FILE_FLAG_MAX 0x1F
117 #ifdef CONFIG_CONSERVE_MEMORY
118 #define STREAM_BUFSIZE 512
120 #define STREAM_BUFSIZE 4096
146 #if defined( __WIN32__ ) || defined( __WINCE__ )
149 char name[ MAX_PATH_LENGTH + 8 ];
151 #elif defined( __AMX__ ) || defined( __BEOS__ ) || defined( __ECOS__ ) || \
152 ( defined( __MVS__ ) && !defined( CONFIG_NO_STDIO ) ) || \
153 defined( __RTEMS__ ) || defined( __SYMBIAN32__ ) || \
154 defined( __TANDEM_NSK__ ) || defined( __TANDEM_OSS__ ) || \
155 defined( __UNIX__ ) || defined( __VXWORKS__ ) || defined( __XMK__ )
158 char name[ MAX_PATH_LENGTH + 8 ];
160 #elif defined( __MAC__ )
163 #elif defined( __PALMOS__ )
165 #elif defined( __FileX__ )
168 #elif defined( __UCOSII__ )
170 #elif defined( CONFIG_NO_STDIO )
171 #if defined( __IBM4758__ )
174 #elif defined( __MVS__ ) || defined( __VMCMS__ ) || defined( __TESTIO__ )
175 char name[ MAX_PATH_LENGTH + 8 ];
204 const
char *userInfo;
210 const
char *location;
264 #define initNetConnectInfo( netConnectInfo, netUserObject, netTimeout, \
265 netConnectTimeout, netOption ) \
267 memset( netConnectInfo, 0, sizeof( NET_CONNECT_INFO ) ); \
268 ( netConnectInfo )->networkSocket = CRYPT_ERROR; \
269 ( netConnectInfo )->iCryptSession = CRYPT_ERROR; \
270 ( netConnectInfo )->iUserObject = netUserObject; \
271 ( netConnectInfo )->timeout = netTimeout; \
272 ( netConnectInfo )->connectTimeout = netConnectTimeout; \
273 ( netConnectInfo )->options = netOption; \
297 const
char *contentType;
322 #define initHttpDataInfo( httpDataInfo, dataBuffer, dataLength ) \
324 memset( httpDataInfo, 0, sizeof( HTTP_DATA_INFO ) ); \
325 ( httpDataInfo )->buffer= dataBuffer; \
326 ( httpDataInfo )->bufSize = dataLength; \
328 #define initHttpDataInfoEx( httpDataInfo, dataBuffer, dataLength, uriInfo ) \
330 memset( httpDataInfo, 0, sizeof( HTTP_DATA_INFO ) ); \
331 memset( uriInfo, 0, sizeof( HTTP_URI_INFO ) ); \
332 ( httpDataInfo )->buffer= dataBuffer; \
333 ( httpDataInfo )->bufSize = dataLength; \
334 ( httpDataInfo )->reqInfo = uriInfo; \
353 RETVAL STDC_NONNULL_ARG( ( 1, 2 ) ) \
359 RETVAL STDC_NONNULL_ARG( ( 1 ) ) \
363 RETVAL STDC_NONNULL_ARG( ( 1 ) ) \
367 RETVAL STDC_NONNULL_ARG( ( 1 ) ) \
381 RETVAL STDC_NONNULL_ARG( ( 1 ) ) \
391 #define sGetStatus( stream ) ( stream )->status
392 #define sStatusOK( stream ) cryptStatusOK( ( stream )->status )
462 int sMemGetDataBlockRemaining(
INOUT STREAM *stream,
471 RETVAL STDC_NONNULL_ARG( ( 1 ) ) \
500 RETVAL STDC_NONNULL_ARG( ( 1 ) ) \
502 STDC_NONNULL_ARG( ( 1, 2 ) ) \
509 STDC_NONNULL_ARG( ( 1 ) ) \
511 STDC_NONNULL_ARG( ( 1 ) ) \
530 #define netInitTCP() CRYPT_OK
531 #define netSignalShutdown()