123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- #region Copyright notice and license
- // Protocol Buffers - Google's data interchange format
- // Copyright 2008 Google Inc. All rights reserved.
- // http://github.com/jskeet/dotnet-protobufs/
- // Original C++/Java/Python code:
- // http://code.google.com/p/protobuf/
- //
- // Redistribution and use in source and binary forms, with or without
- // modification, are permitted provided that the following conditions are
- // met:
- //
- // * Redistributions of source code must retain the above copyright
- // notice, this list of conditions and the following disclaimer.
- // * Redistributions in binary form must reproduce the above
- // copyright notice, this list of conditions and the following disclaimer
- // in the documentation and/or other materials provided with the
- // distribution.
- // * Neither the name of Google Inc. nor the names of its
- // contributors may be used to endorse or promote products derived from
- // this software without specific prior written permission.
- //
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- #endregion
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using Google.ProtocolBuffers.Descriptors;
- //Disable warning CS3010: CLS-compliant interfaces must have only CLS-compliant members
- #pragma warning disable 3010
- namespace Google.ProtocolBuffers
- {
- public interface ICodedOutputStream
- {
- void Flush();
- [Obsolete]
- void WriteUnknownGroup(int fieldNumber, IMessageLite value);
- void WriteUnknownBytes(int fieldNumber, ByteString value);
- [CLSCompliant(false)]
- void WriteUnknownField(int fieldNumber, WireFormat.WireType wireType, ulong value);
- void WriteMessageSetExtension(int fieldNumber, string fieldName, IMessageLite value);
- void WriteMessageSetExtension(int fieldNumber, string fieldName, ByteString value);
- void WriteField(FieldType fieldType, int fieldNumber, string fieldName, object value);
- /// <summary>
- /// Writes a double field value, including tag, to the stream.
- /// </summary>
- void WriteDouble(int fieldNumber, string fieldName, double value);
- /// <summary>
- /// Writes a float field value, including tag, to the stream.
- /// </summary>
- void WriteFloat(int fieldNumber, string fieldName, float value);
- /// <summary>
- /// Writes a uint64 field value, including tag, to the stream.
- /// </summary>
- [CLSCompliant(false)]
- void WriteUInt64(int fieldNumber, string fieldName, ulong value);
- /// <summary>
- /// Writes an int64 field value, including tag, to the stream.
- /// </summary>
- void WriteInt64(int fieldNumber, string fieldName, long value);
- /// <summary>
- /// Writes an int32 field value, including tag, to the stream.
- /// </summary>
- void WriteInt32(int fieldNumber, string fieldName, int value);
- /// <summary>
- /// Writes a fixed64 field value, including tag, to the stream.
- /// </summary>
- [CLSCompliant(false)]
- void WriteFixed64(int fieldNumber, string fieldName, ulong value);
- /// <summary>
- /// Writes a fixed32 field value, including tag, to the stream.
- /// </summary>
- [CLSCompliant(false)]
- void WriteFixed32(int fieldNumber, string fieldName, uint value);
- /// <summary>
- /// Writes a bool field value, including tag, to the stream.
- /// </summary>
- void WriteBool(int fieldNumber, string fieldName, bool value);
- /// <summary>
- /// Writes a string field value, including tag, to the stream.
- /// </summary>
- void WriteString(int fieldNumber, string fieldName, string value);
- /// <summary>
- /// Writes a group field value, including tag, to the stream.
- /// </summary>
- void WriteGroup(int fieldNumber, string fieldName, IMessageLite value);
- /// <summary>
- /// Writes a message field value, including tag, to the stream.
- /// </summary>
- void WriteMessage(int fieldNumber, string fieldName, IMessageLite value);
- /// <summary>
- /// Writes a byte array field value, including tag, to the stream.
- /// </summary>
- void WriteBytes(int fieldNumber, string fieldName, ByteString value);
- /// <summary>
- /// Writes a UInt32 field value, including tag, to the stream.
- /// </summary>
- [CLSCompliant(false)]
- void WriteUInt32(int fieldNumber, string fieldName, uint value);
- /// <summary>
- /// Writes an enum field value, including tag, to the stream.
- /// </summary>
- void WriteEnum(int fieldNumber, string fieldName, int value, object rawValue);
- /// <summary>
- /// Writes a fixed 32-bit field value, including tag, to the stream.
- /// </summary>
- void WriteSFixed32(int fieldNumber, string fieldName, int value);
- /// <summary>
- /// Writes a signed fixed 64-bit field value, including tag, to the stream.
- /// </summary>
- void WriteSFixed64(int fieldNumber, string fieldName, long value);
- /// <summary>
- /// Writes a signed 32-bit field value, including tag, to the stream.
- /// </summary>
- void WriteSInt32(int fieldNumber, string fieldName, int value);
- /// <summary>
- /// Writes a signed 64-bit field value, including tag, to the stream.
- /// </summary>
- void WriteSInt64(int fieldNumber, string fieldName, long value);
- void WriteArray(FieldType fieldType, int fieldNumber, string fieldName, IEnumerable list);
- void WriteGroupArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list)
- where T : IMessageLite;
- void WriteMessageArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list)
- where T : IMessageLite;
- void WriteStringArray(int fieldNumber, string fieldName, IEnumerable<string> list);
- void WriteBytesArray(int fieldNumber, string fieldName, IEnumerable<ByteString> list);
- void WriteBoolArray(int fieldNumber, string fieldName, IEnumerable<bool> list);
- void WriteInt32Array(int fieldNumber, string fieldName, IEnumerable<int> list);
- void WriteSInt32Array(int fieldNumber, string fieldName, IEnumerable<int> list);
- void WriteUInt32Array(int fieldNumber, string fieldName, IEnumerable<uint> list);
- void WriteFixed32Array(int fieldNumber, string fieldName, IEnumerable<uint> list);
- void WriteSFixed32Array(int fieldNumber, string fieldName, IEnumerable<int> list);
- void WriteInt64Array(int fieldNumber, string fieldName, IEnumerable<long> list);
- void WriteSInt64Array(int fieldNumber, string fieldName, IEnumerable<long> list);
- void WriteUInt64Array(int fieldNumber, string fieldName, IEnumerable<ulong> list);
- void WriteFixed64Array(int fieldNumber, string fieldName, IEnumerable<ulong> list);
- void WriteSFixed64Array(int fieldNumber, string fieldName, IEnumerable<long> list);
- void WriteDoubleArray(int fieldNumber, string fieldName, IEnumerable<double> list);
- void WriteFloatArray(int fieldNumber, string fieldName, IEnumerable<float> list);
- [CLSCompliant(false)]
- void WriteEnumArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list)
- where T : struct, IComparable, IFormattable, IConvertible;
- void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, IEnumerable list);
- void WritePackedBoolArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<bool> list);
- void WritePackedInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<int> list);
- void WritePackedSInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<int> list);
- void WritePackedUInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<uint> list);
- void WritePackedFixed32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<uint> list);
- void WritePackedSFixed32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<int> list);
- void WritePackedInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<long> list);
- void WritePackedSInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<long> list);
- void WritePackedUInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<ulong> list);
- void WritePackedFixed64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<ulong> list);
- void WritePackedSFixed64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<long> list);
- void WritePackedDoubleArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<double> list);
- void WritePackedFloatArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<float> list);
- [CLSCompliant(false)]
- void WritePackedEnumArray<T>(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<T> list)
- where T : struct, IComparable, IFormattable, IConvertible;
- }
- }
|