client-c  0.7.0
io.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to you under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14  * implied. See the License for the specific language governing
15  * permissions and limitations under the License.
16  */
17 
18 #ifndef AVRO_IO_H
19 #define AVRO_IO_H
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #include "platform.h"
25 
27  const char *buf;
28  int64_t len;
29  int64_t read;
30 };
31 
33  const char *buf;
34  int64_t len;
35  int64_t written;
36 };
37 
38 typedef struct avro_reader_t_ *avro_reader_t;
39 typedef struct avro_writer_t_ *avro_writer_t;
40 
41 avro_reader_t avro_reader_memory(const char *buf, int64_t len);
42 avro_writer_t avro_writer_memory(const char *buf, int64_t len);
43 
44 int avro_read(avro_reader_t reader, void *buf, int64_t len);
45 int avro_skip(avro_reader_t reader, int64_t len);
46 int avro_write(avro_writer_t writer, void *buf, int64_t len);
47 
48 void avro_reader_free(avro_reader_t reader);
49 void avro_writer_free(avro_writer_t writer);
50 
51 #ifdef __cplusplus
52 } // extern "C"
53 #endif
54 #endif
struct avro_reader_t_ * avro_reader_t
Definition: io.h:38
int avro_skip(avro_reader_t reader, int64_t len)
const char * buf
Definition: io.h:27
int64_t read
Definition: io.h:29
int avro_read(avro_reader_t reader, void *buf, int64_t len)
void avro_writer_free(avro_writer_t writer)
avro_reader_t avro_reader_memory(const char *buf, int64_t len)
int64_t written
Definition: io.h:35
void avro_reader_free(avro_reader_t reader)
int avro_write(avro_writer_t writer, void *buf, int64_t len)
avro_writer_t avro_writer_memory(const char *buf, int64_t len)
int64_t len
Definition: io.h:28
int64_t len
Definition: io.h:34
const char * buf
Definition: io.h:33
struct avro_writer_t_ * avro_writer_t
Definition: io.h:39