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