blob: 1322e219f5be34193553ce7a4d42f92745cdb246 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/*
* upb - a minimalist implementation of protocol buffers.
*
* Implements a upb_sink that writes protobuf data to the binary wire format.
*
* For messages that have any submessages, the encoder needs a buffer
* containing the submessage sizes, so they can be properly written at the
* front of each message. Note that groups do *not* have this requirement.
*
* Copyright (c) 2009-2010 Joshua Haberman. See LICENSE for details.
*/
#ifndef UPB_ENCODER_H_
#define UPB_ENCODER_H_
#include "upb.h"
#include "upb_sink.h"
#ifdef __cplusplus
extern "C" {
#endif
struct upb_encoder;
typedef struct upb_encoder upb_encoder;
upb_encoder *upb_encoder_new();
void upb_encoder_free(upb_encoder *s);
void upb_encoder_reset(upb_encoder *s, uint32_t *sizes);
upb_sink *upb_encoder_sink(upb_encoder *s);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* UPB_ENCODER_H_ */
|