Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 #include <stdint.h>
26 
28  const char *buf;
29  int64_t len;
30  int64_t read;
31 };
32 
34  const char *buf;
35  int64_t len;
36  int64_t written;
37 };
38 
39 typedef struct avro_reader_t_ *avro_reader_t;
40 typedef struct avro_writer_t_ *avro_writer_t;
41 
42 avro_reader_t avro_reader_memory(const char *buf, int64_t len);
43 avro_writer_t avro_writer_memory(const char *buf, int64_t len);
44 
45 int avro_read(avro_reader_t reader, void *buf, int64_t len);
46 int avro_skip(avro_reader_t reader, int64_t len);
47 int avro_write(avro_writer_t writer, void *buf, int64_t len);
48 
49 void avro_reader_free(avro_reader_t reader);
50 void avro_writer_free(avro_writer_t writer);
51 
52 #ifdef __cplusplus
53 } // extern "C"
54 #endif
55 #endif
struct avro_reader_t_ * avro_reader_t
Definition: io.h:39
int avro_skip(avro_reader_t reader, int64_t len)
const char * buf
Definition: io.h:28
int64_t read
Definition: io.h:30
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:36
void avro_reader_free(avro_reader_t reader)
Definition: io.h:33
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:29
int64_t len
Definition: io.h:35
const char * buf
Definition: io.h:34
struct avro_writer_t_ * avro_writer_t
Definition: io.h:40
Definition: io.h:27