Sha256: 7afc560a1dead532c1cad8793f1c3bd07ec887c1385a0aefba5833f1f1ae5f4a

Contents?: true

Size: 1.42 KB

Versions: 22

Compression:

Stored size: 1.42 KB

Contents

// Protocol Buffers - Google's data interchange format
// Copyright 2023 Google LLC.  All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

#ifndef UPB_TEXT_ENCODE_H_
#define UPB_TEXT_ENCODE_H_

#include "upb/reflection/def.h"

// Must be last.
#include "upb/port/def.inc"

#ifdef __cplusplus
extern "C" {
#endif

enum {
  // When set, prints everything on a single line.
  UPB_TXTENC_SINGLELINE = 1,

  // When set, unknown fields are not printed.
  UPB_TXTENC_SKIPUNKNOWN = 2,

  // When set, maps are *not* sorted (this avoids allocating tmp mem).
  UPB_TXTENC_NOSORT = 4
};

/* Encodes the given |msg| to text format.  The message's reflection is given in
 * |m|.  The symtab in |symtab| is used to find extensions (if NULL, extensions
 * will not be printed).
 *
 * Output is placed in the given buffer, and always NULL-terminated.  The output
 * size (excluding NULL) is returned.  This means that a return value >= |size|
 * implies that the output was truncated.  (These are the same semantics as
 * snprintf()). */
size_t upb_TextEncode(const upb_Message* msg, const upb_MessageDef* m,
                      const upb_DefPool* ext_pool, int options, char* buf,
                      size_t size);

#ifdef __cplusplus
} /* extern "C" */
#endif

#include "upb/port/undef.inc"

#endif /* UPB_TEXT_ENCODE_H_ */

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
grpc-1.67.0 third_party/upb/upb/text/encode.h
grpc-1.67.0.pre1 third_party/upb/upb/text/encode.h
grpc-1.66.0 third_party/upb/upb/text/encode.h
grpc-1.66.0.pre5 third_party/upb/upb/text/encode.h
grpc-1.66.0.pre3 third_party/upb/upb/text/encode.h
grpc-1.60.2 third_party/upb/upb/text/encode.h
grpc-1.61.3 third_party/upb/upb/text/encode.h
grpc-1.62.3 third_party/upb/upb/text/encode.h
grpc-1.63.2 third_party/upb/upb/text/encode.h
grpc-1.64.3 third_party/upb/upb/text/encode.h
grpc-1.65.2 third_party/upb/upb/text/encode.h
grpc-1.65.1 third_party/upb/upb/text/encode.h
grpc-1.65.0 third_party/upb/upb/text/encode.h
grpc-1.65.0.pre2 third_party/upb/upb/text/encode.h
grpc-1.65.0.pre1 third_party/upb/upb/text/encode.h
grpc-1.63.0 third_party/upb/upb/text/encode.h
grpc-1.62.0 third_party/upb/upb/text/encode.h
grpc-1.62.0.pre1 third_party/upb/upb/text/encode.h
grpc-1.61.0 third_party/upb/upb/text/encode.h
grpc-1.61.0.pre2 third_party/upb/upb/text/encode.h