4 * Copyright 2006 Massachusetts Institute of Technology.
7 * Export of this software from the United States of America may
8 * require a specific license from the United States Government.
9 * It is the responsibility of any person or organization contemplating
10 * export to obtain such a license before exporting.
12 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13 * distribute this software and its documentation for any purpose and
14 * without fee is hereby granted, provided that the above copyright
15 * notice appear in all copies and that both that copyright notice and
16 * this permission notice appear in supporting documentation, and that
17 * the name of M.I.T. not be used in advertising or publicity pertaining
18 * to distribution of the software without specific, written prior
19 * permission. Furthermore if you modify this software you must label
20 * your software as modified software and not distribute it in such a
21 * fashion that it might be confused with the original M.I.T. software.
22 * M.I.T. makes no representations about the suitability of
23 * this software for any purpose. It is provided "as is" without express
24 * or implied warranty.
27 #ifndef K5_IPC_STREAM_H
28 #define K5_IPC_STREAM_H
30 #include "k5-platform.h"
32 struct k5_ipc_stream_s;
33 typedef struct k5_ipc_stream_s *k5_ipc_stream;
36 int32_t k5_ipc_stream_new (k5_ipc_stream *out_stream);
38 uint32_t k5_ipc_stream_release (k5_ipc_stream io_stream);
40 uint64_t k5_ipc_stream_size (k5_ipc_stream in_stream);
42 const char *k5_ipc_stream_data (k5_ipc_stream in_stream);
44 uint32_t k5_ipc_stream_read (k5_ipc_stream in_stream,
47 uint32_t k5_ipc_stream_write (k5_ipc_stream in_stream,
51 uint32_t k5_ipc_stream_read_string (k5_ipc_stream io_stream,
53 uint32_t k5_ipc_stream_write_string (k5_ipc_stream io_stream,
54 const char *in_string);
55 void k5_ipc_stream_free_string (char *in_string);
57 uint32_t k5_ipc_stream_read_int32 (k5_ipc_stream io_stream,
59 uint32_t k5_ipc_stream_write_int32 (k5_ipc_stream io_stream,
62 uint32_t k5_ipc_stream_read_uint32 (k5_ipc_stream io_stream,
63 uint32_t *out_uint32);
64 uint32_t k5_ipc_stream_write_uint32 (k5_ipc_stream io_stream,
67 uint32_t k5_ipc_stream_read_int64 (k5_ipc_stream io_stream,
69 uint32_t k5_ipc_stream_write_int64 (k5_ipc_stream io_stream,
72 uint32_t k5_ipc_stream_read_uint64 (k5_ipc_stream io_stream,
73 uint64_t *out_uint64);
74 uint32_t k5_ipc_stream_write_uint64 (k5_ipc_stream io_stream,
77 #endif /* K5_IPC_STREAM_H */