blob: fb290eb65422cd575d62532f9118a3da99c414b2 [file] [log] [blame]
csharptestcc8d2aa2011-06-03 12:15:42 -05001using System;
2using Google.ProtocolBuffers.Descriptors;
3
4namespace Google.ProtocolBuffers
5{
6 public interface ICodedOutputStream
7 {
8 /// <summary>
9 /// Writes a double field value, including tag, to the stream.
10 /// </summary>
11 void WriteDouble(int fieldNumber, string fieldName, double value);
12
13 /// <summary>
14 /// Writes a float field value, including tag, to the stream.
15 /// </summary>
16 void WriteFloat(int fieldNumber, string fieldName, float value);
17
18 /// <summary>
19 /// Writes a uint64 field value, including tag, to the stream.
20 /// </summary>
21 [CLSCompliant(false)]
22 void WriteUInt64(int fieldNumber, string fieldName, ulong value);
23
24 /// <summary>
25 /// Writes an int64 field value, including tag, to the stream.
26 /// </summary>
27 void WriteInt64(int fieldNumber, string fieldName, long value);
28
29 /// <summary>
30 /// Writes an int32 field value, including tag, to the stream.
31 /// </summary>
32 void WriteInt32(int fieldNumber, string fieldName, int value);
33
34 /// <summary>
35 /// Writes a fixed64 field value, including tag, to the stream.
36 /// </summary>
37 [CLSCompliant(false)]
38 void WriteFixed64(int fieldNumber, string fieldName, ulong value);
39
40 /// <summary>
41 /// Writes a fixed32 field value, including tag, to the stream.
42 /// </summary>
43 [CLSCompliant(false)]
44 void WriteFixed32(int fieldNumber, string fieldName, uint value);
45
46 /// <summary>
47 /// Writes a bool field value, including tag, to the stream.
48 /// </summary>
49 void WriteBool(int fieldNumber, string fieldName, bool value);
50
51 /// <summary>
52 /// Writes a string field value, including tag, to the stream.
53 /// </summary>
54 void WriteString(int fieldNumber, string fieldName, string value);
55
56 /// <summary>
57 /// Writes a group field value, including tag, to the stream.
58 /// </summary>
59 void WriteGroup(int fieldNumber, string fieldName, IMessageLite value);
60
61 [Obsolete]
62 void WriteUnknownGroup(int fieldNumber, string fieldName, IMessageLite value);
63
64 void WriteMessage(int fieldNumber, string fieldName, IMessageLite value);
65 void WriteBytes(int fieldNumber, string fieldName, ByteString value);
66
67 [CLSCompliant(false)]
68 void WriteUInt32(int fieldNumber, string fieldName, uint value);
69
70 void WriteEnum(int fieldNumber, string fieldName, int value, string textValue);
71 void WriteSFixed32(int fieldNumber, string fieldName, int value);
72 void WriteSFixed64(int fieldNumber, string fieldName, long value);
73 void WriteSInt32(int fieldNumber, string fieldName, int value);
74 void WriteSInt64(int fieldNumber, string fieldName, long value);
75 void WriteMessageSetExtension(int fieldNumber, string fieldName, IMessageLite value);
76 void WriteMessageArray(int fieldNumber, string fieldName, System.Collections.IEnumerable list);
77 void WriteGroupArray(int fieldNumber, string fieldName, System.Collections.IEnumerable list);
78 void WriteArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
79 void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
80 void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, int calculatedSize, System.Collections.IEnumerable list);
81 void WriteField(FieldType fieldType, int fieldNumber, string fieldName, object value);
82 void Flush();
83 }
84}