From 0c80c384756a48d5f731eeafa62b6cd5f3861749 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 25 May 2009 18:31:27 -0700 Subject: A flurry of activity. Doesn't compile yet. - a descriptor.c that describes the data structures in descriptor.proto using the data structures in descriptor.h. - everything renamed pbstream -> upb. - modularization rethought. - Doesn't compile yet, but should once things settle back down. --- pbstream_lowlevel.h | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 pbstream_lowlevel.h (limited to 'pbstream_lowlevel.h') diff --git a/pbstream_lowlevel.h b/pbstream_lowlevel.h deleted file mode 100644 index c25b16d..0000000 --- a/pbstream_lowlevel.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * pbstream - a stream-oriented implementation of protocol buffers. - * - * Copyright (c) 2008 Joshua Haberman. See LICENSE for details. - * - * The structures and functions in this file offer more control than what is - * offered in pbstream.h. These can be used for more specialized/optimized - * parsing applications. */ - -#ifndef PBSTREAM_LOWLEVEL_H_ -#define PBSTREAM_LOWLEVEL_H_ - -#include "pbstream.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* A tag occurs before each value on-the-wire. */ -struct pbstream_tag { - pbstream_field_number_t field_number; - pbstream_wire_type_t wire_type; -}; - -/* Parses a single tag from the character data starting at buf, and updates - * buf to point one past the bytes that were consumed. buf will be incremented - * by at most ten bytes. */ -pbstream_status_t parse_tag(uint8_t **buf, struct pbstream_tag *tag); - -/* Parses a wire value with the given type (which must have been obtained from - * a tag that was just parsed) and adds the number of bytes that were consumed - * to *offset. */ -pbstream_status_t parse_wire_value(uint8_t *buf, size_t *offset, - pbstream_wire_type_t wt, - union pbstream_wire_value *wv); - -/* Like the above, but discards the wire value instead of saving it. */ -pbstream_status_t skip_wire_value(uint8_t *buf, size_t *offset, - pbstream_wire_type_t wt); - -/* Looks the given field number up in the fieldset, and returns the - * corresponding pbstream_field definition (or NULL if this field number - * does not exist in this fieldset). */ -struct pbstream_field *pbstream_find_field(struct pbstream_fieldset *fs, - pbstream_field_number_t num); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* PBSTREAM_LOWLEVEL_H_ */ -- cgit v1.2.3