csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 1 | using System;
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 2 | using System.Collections.Generic;
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 3 | using Google.ProtocolBuffers.Descriptors;
|
| 4 |
|
csharptest | ffafdaa | 2011-06-03 12:58:14 -0500 | [diff] [blame] | 5 | //Disable warning CS3010: CLS-compliant interfaces must have only CLS-compliant members
|
| 6 | #pragma warning disable 3010
|
| 7 |
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 8 | namespace Google.ProtocolBuffers
|
| 9 | {
|
| 10 | public interface ICodedOutputStream
|
| 11 | {
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 12 | void Flush();
|
| 13 |
|
| 14 | [Obsolete]
|
| 15 | void WriteUnknownGroup(int fieldNumber, string fieldName, IMessageLite value);
|
| 16 | void WriteMessageSetExtension(int fieldNumber, string fieldName, IMessageLite value);
|
| 17 | void WriteMessageSetExtension(int fieldNumber, string fieldName, ByteString value);
|
| 18 |
|
| 19 | void WriteField(FieldType fieldType, int fieldNumber, string fieldName, object value);
|
| 20 |
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 21 | /// <summary>
|
| 22 | /// Writes a double field value, including tag, to the stream.
|
| 23 | /// </summary>
|
| 24 | void WriteDouble(int fieldNumber, string fieldName, double value);
|
| 25 |
|
| 26 | /// <summary>
|
| 27 | /// Writes a float field value, including tag, to the stream.
|
| 28 | /// </summary>
|
| 29 | void WriteFloat(int fieldNumber, string fieldName, float value);
|
| 30 |
|
| 31 | /// <summary>
|
| 32 | /// Writes a uint64 field value, including tag, to the stream.
|
| 33 | /// </summary>
|
| 34 | [CLSCompliant(false)]
|
| 35 | void WriteUInt64(int fieldNumber, string fieldName, ulong value);
|
| 36 |
|
| 37 | /// <summary>
|
| 38 | /// Writes an int64 field value, including tag, to the stream.
|
| 39 | /// </summary>
|
| 40 | void WriteInt64(int fieldNumber, string fieldName, long value);
|
| 41 |
|
| 42 | /// <summary>
|
| 43 | /// Writes an int32 field value, including tag, to the stream.
|
| 44 | /// </summary>
|
| 45 | void WriteInt32(int fieldNumber, string fieldName, int value);
|
| 46 |
|
| 47 | /// <summary>
|
| 48 | /// Writes a fixed64 field value, including tag, to the stream.
|
| 49 | /// </summary>
|
| 50 | [CLSCompliant(false)]
|
| 51 | void WriteFixed64(int fieldNumber, string fieldName, ulong value);
|
| 52 |
|
| 53 | /// <summary>
|
| 54 | /// Writes a fixed32 field value, including tag, to the stream.
|
| 55 | /// </summary>
|
| 56 | [CLSCompliant(false)]
|
| 57 | void WriteFixed32(int fieldNumber, string fieldName, uint value);
|
| 58 |
|
| 59 | /// <summary>
|
| 60 | /// Writes a bool field value, including tag, to the stream.
|
| 61 | /// </summary>
|
| 62 | void WriteBool(int fieldNumber, string fieldName, bool value);
|
| 63 |
|
| 64 | /// <summary>
|
| 65 | /// Writes a string field value, including tag, to the stream.
|
| 66 | /// </summary>
|
| 67 | void WriteString(int fieldNumber, string fieldName, string value);
|
| 68 |
|
| 69 | /// <summary>
|
| 70 | /// Writes a group field value, including tag, to the stream.
|
| 71 | /// </summary>
|
| 72 | void WriteGroup(int fieldNumber, string fieldName, IMessageLite value);
|
| 73 |
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 74 | /// <summary>
|
| 75 | /// Writes a message field value, including tag, to the stream.
|
| 76 | /// </summary>
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 77 | void WriteMessage(int fieldNumber, string fieldName, IMessageLite value);
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 78 | /// <summary>
|
| 79 | /// Writes a byte array field value, including tag, to the stream.
|
| 80 | /// </summary>
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 81 | void WriteBytes(int fieldNumber, string fieldName, ByteString value);
|
| 82 |
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 83 | /// <summary>
|
| 84 | /// Writes a UInt32 field value, including tag, to the stream.
|
| 85 | /// </summary>
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 86 | [CLSCompliant(false)]
|
| 87 | void WriteUInt32(int fieldNumber, string fieldName, uint value);
|
| 88 |
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 89 | /// <summary>
|
| 90 | /// Writes an enum field value, including tag, to the stream.
|
| 91 | /// </summary>
|
csharptest | ced18e1 | 2011-06-09 19:47:56 -0500 | [diff] [blame] | 92 | void WriteEnum(int fieldNumber, string fieldName, int value, object rawValue);
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 93 | /// <summary>
|
| 94 | /// Writes a fixed 32-bit field value, including tag, to the stream.
|
| 95 | /// </summary>
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 96 | void WriteSFixed32(int fieldNumber, string fieldName, int value);
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 97 | /// <summary>
|
| 98 | /// Writes a signed fixed 64-bit field value, including tag, to the stream.
|
| 99 | /// </summary>
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 100 | void WriteSFixed64(int fieldNumber, string fieldName, long value);
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 101 | /// <summary>
|
| 102 | /// Writes a signed 32-bit field value, including tag, to the stream.
|
| 103 | /// </summary>
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 104 | void WriteSInt32(int fieldNumber, string fieldName, int value);
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 105 | /// <summary>
|
| 106 | /// Writes a signed 64-bit field value, including tag, to the stream.
|
| 107 | /// </summary>
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 108 | void WriteSInt64(int fieldNumber, string fieldName, long value);
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 109 |
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 110 | void WriteArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 111 |
|
| 112 | void WriteGroupArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list)
|
| 113 | where T : IMessageLite;
|
| 114 |
|
| 115 | void WriteMessageArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list)
|
| 116 | where T : IMessageLite;
|
| 117 |
|
| 118 | void WriteStringArray(int fieldNumber, string fieldName, IEnumerable<string> list);
|
| 119 |
|
| 120 | void WriteBytesArray(int fieldNumber, string fieldName, IEnumerable<ByteString> list);
|
| 121 |
|
| 122 | void WriteBoolArray(int fieldNumber, string fieldName, IEnumerable<bool> list);
|
| 123 |
|
| 124 | void WriteInt32Array(int fieldNumber, string fieldName, IEnumerable<int> list);
|
| 125 |
|
| 126 | void WriteSInt32Array(int fieldNumber, string fieldName, IEnumerable<int> list);
|
| 127 |
|
| 128 | void WriteUInt32Array(int fieldNumber, string fieldName, IEnumerable<uint> list);
|
| 129 |
|
| 130 | void WriteFixed32Array(int fieldNumber, string fieldName, IEnumerable<uint> list);
|
| 131 |
|
| 132 | void WriteSFixed32Array(int fieldNumber, string fieldName, IEnumerable<int> list);
|
| 133 |
|
| 134 | void WriteInt64Array(int fieldNumber, string fieldName, IEnumerable<long> list);
|
| 135 |
|
| 136 | void WriteSInt64Array(int fieldNumber, string fieldName, IEnumerable<long> list);
|
| 137 |
|
| 138 | void WriteUInt64Array(int fieldNumber, string fieldName, IEnumerable<ulong> list);
|
| 139 |
|
| 140 | void WriteFixed64Array(int fieldNumber, string fieldName, IEnumerable<ulong> list);
|
| 141 |
|
| 142 | void WriteSFixed64Array(int fieldNumber, string fieldName, IEnumerable<long> list);
|
| 143 |
|
| 144 | void WriteDoubleArray(int fieldNumber, string fieldName, IEnumerable<double> list);
|
| 145 |
|
| 146 | void WriteFloatArray(int fieldNumber, string fieldName, IEnumerable<float> list);
|
| 147 |
|
| 148 | [CLSCompliant(false)]
|
| 149 | void WriteEnumArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list)
|
| 150 | where T : struct, IComparable, IFormattable, IConvertible;
|
| 151 |
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 152 | void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
|
csharptest | b00ea13 | 2011-06-10 01:09:57 -0500 | [diff] [blame^] | 153 |
|
| 154 | void WritePackedBoolArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<bool> list);
|
| 155 |
|
| 156 | void WritePackedInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<int> list);
|
| 157 |
|
| 158 | void WritePackedSInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<int> list);
|
| 159 |
|
| 160 | void WritePackedUInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<uint> list);
|
| 161 |
|
| 162 | void WritePackedFixed32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<uint> list);
|
| 163 |
|
| 164 | void WritePackedSFixed32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<int> list);
|
| 165 |
|
| 166 | void WritePackedInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<long> list);
|
| 167 |
|
| 168 | void WritePackedSInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<long> list);
|
| 169 |
|
| 170 | void WritePackedUInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<ulong> list);
|
| 171 |
|
| 172 | void WritePackedFixed64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<ulong> list);
|
| 173 |
|
| 174 | void WritePackedSFixed64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<long> list);
|
| 175 |
|
| 176 | void WritePackedDoubleArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<double> list);
|
| 177 |
|
| 178 | void WritePackedFloatArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<float> list);
|
| 179 |
|
| 180 | [CLSCompliant(false)]
|
| 181 | void WritePackedEnumArray<T>(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<T> list)
|
| 182 | where T : struct, IComparable, IFormattable, IConvertible;
|
csharptest | cc8d2aa | 2011-06-03 12:15:42 -0500 | [diff] [blame] | 183 | }
|
| 184 | } |