File: stream_proto_utils.h

package info (click to toggle)
android-platform-frameworks-base 1%3A10.0.0%2Br36-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 321,788 kB
  • sloc: java: 962,234; cpp: 274,314; xml: 242,770; python: 5,060; sh: 1,432; ansic: 494; makefile: 47; sed: 19
file content (29 lines) | stat: -rw-r--r-- 685 bytes parent folder | download | duplicates (4)
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
#include <stdint.h>

#include "google/protobuf/compiler/plugin.pb.h"
#include "google/protobuf/io/zero_copy_stream_impl.h"

namespace android {
namespace stream_proto {

using namespace google::protobuf;
using namespace google::protobuf::compiler;
using namespace std;

/**
 * Get encoded field id from a field.
 */
uint64_t get_field_id(const FieldDescriptorProto& field);

/**
 * Get the string name for a field.
 */
string get_proto_type(const FieldDescriptorProto& field);

/**
 * See if this is the file for this request, and not one of the imported ones.
 */
bool should_generate_for_file(const CodeGeneratorRequest& request, const string& file);

} // stream_proto
} // android