blob: 56ee5b616204a73abac1fe74072925255d4aba04 [file] [log] [blame]
csharptestcc8d2aa2011-06-03 12:15:42 -05001using System;
csharptestb00ea132011-06-10 01:09:57 -05002using System.Collections.Generic;
csharptestcc8d2aa2011-06-03 12:15:42 -05003using Google.ProtocolBuffers.Descriptors;
4
csharptestffafdaa2011-06-03 12:58:14 -05005//Disable warning CS3010: CLS-compliant interfaces must have only CLS-compliant members
6#pragma warning disable 3010
7
csharptestcc8d2aa2011-06-03 12:15:42 -05008namespace Google.ProtocolBuffers
9{
10 public interface ICodedOutputStream
11 {
csharptestb00ea132011-06-10 01:09:57 -050012 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
csharptestcc8d2aa2011-06-03 12:15:42 -050021 /// <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
csharptestb00ea132011-06-10 01:09:57 -050074 /// <summary>
75 /// Writes a message field value, including tag, to the stream.
76 /// </summary>
csharptestcc8d2aa2011-06-03 12:15:42 -050077 void WriteMessage(int fieldNumber, string fieldName, IMessageLite value);
csharptestb00ea132011-06-10 01:09:57 -050078 /// <summary>
79 /// Writes a byte array field value, including tag, to the stream.
80 /// </summary>
csharptestcc8d2aa2011-06-03 12:15:42 -050081 void WriteBytes(int fieldNumber, string fieldName, ByteString value);
82
csharptestb00ea132011-06-10 01:09:57 -050083 /// <summary>
84 /// Writes a UInt32 field value, including tag, to the stream.
85 /// </summary>
csharptestcc8d2aa2011-06-03 12:15:42 -050086 [CLSCompliant(false)]
87 void WriteUInt32(int fieldNumber, string fieldName, uint value);
88
csharptestb00ea132011-06-10 01:09:57 -050089 /// <summary>
90 /// Writes an enum field value, including tag, to the stream.
91 /// </summary>
csharptestced18e12011-06-09 19:47:56 -050092 void WriteEnum(int fieldNumber, string fieldName, int value, object rawValue);
csharptestb00ea132011-06-10 01:09:57 -050093 /// <summary>
94 /// Writes a fixed 32-bit field value, including tag, to the stream.
95 /// </summary>
csharptestcc8d2aa2011-06-03 12:15:42 -050096 void WriteSFixed32(int fieldNumber, string fieldName, int value);
csharptestb00ea132011-06-10 01:09:57 -050097 /// <summary>
98 /// Writes a signed fixed 64-bit field value, including tag, to the stream.
99 /// </summary>
csharptestcc8d2aa2011-06-03 12:15:42 -0500100 void WriteSFixed64(int fieldNumber, string fieldName, long value);
csharptestb00ea132011-06-10 01:09:57 -0500101 /// <summary>
102 /// Writes a signed 32-bit field value, including tag, to the stream.
103 /// </summary>
csharptestcc8d2aa2011-06-03 12:15:42 -0500104 void WriteSInt32(int fieldNumber, string fieldName, int value);
csharptestb00ea132011-06-10 01:09:57 -0500105 /// <summary>
106 /// Writes a signed 64-bit field value, including tag, to the stream.
107 /// </summary>
csharptestcc8d2aa2011-06-03 12:15:42 -0500108 void WriteSInt64(int fieldNumber, string fieldName, long value);
csharptestb00ea132011-06-10 01:09:57 -0500109
csharptestcc8d2aa2011-06-03 12:15:42 -0500110 void WriteArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
csharptestb00ea132011-06-10 01:09:57 -0500111
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
csharptestcc8d2aa2011-06-03 12:15:42 -0500152 void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
csharptestb00ea132011-06-10 01:09:57 -0500153
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;
csharptestcc8d2aa2011-06-03 12:15:42 -0500183 }
184}