blob: 6408d98c1e88d7e7a678fbd9a6f65dd7c9f2f453 [file] [log] [blame]
csharptestcc8d2aa2011-06-03 12:15:42 -05001using System;
2using Google.ProtocolBuffers.Descriptors;
3
csharptestffafdaa2011-06-03 12:58:14 -05004//Disable warning CS3010: CLS-compliant interfaces must have only CLS-compliant members
5#pragma warning disable 3010
6
csharptestcc8d2aa2011-06-03 12:15:42 -05007namespace Google.ProtocolBuffers
8{
9 public interface ICodedOutputStream
10 {
11 /// <summary>
12 /// Writes a double field value, including tag, to the stream.
13 /// </summary>
14 void WriteDouble(int fieldNumber, string fieldName, double value);
15
16 /// <summary>
17 /// Writes a float field value, including tag, to the stream.
18 /// </summary>
19 void WriteFloat(int fieldNumber, string fieldName, float value);
20
21 /// <summary>
22 /// Writes a uint64 field value, including tag, to the stream.
23 /// </summary>
24 [CLSCompliant(false)]
25 void WriteUInt64(int fieldNumber, string fieldName, ulong value);
26
27 /// <summary>
28 /// Writes an int64 field value, including tag, to the stream.
29 /// </summary>
30 void WriteInt64(int fieldNumber, string fieldName, long value);
31
32 /// <summary>
33 /// Writes an int32 field value, including tag, to the stream.
34 /// </summary>
35 void WriteInt32(int fieldNumber, string fieldName, int value);
36
37 /// <summary>
38 /// Writes a fixed64 field value, including tag, to the stream.
39 /// </summary>
40 [CLSCompliant(false)]
41 void WriteFixed64(int fieldNumber, string fieldName, ulong value);
42
43 /// <summary>
44 /// Writes a fixed32 field value, including tag, to the stream.
45 /// </summary>
46 [CLSCompliant(false)]
47 void WriteFixed32(int fieldNumber, string fieldName, uint value);
48
49 /// <summary>
50 /// Writes a bool field value, including tag, to the stream.
51 /// </summary>
52 void WriteBool(int fieldNumber, string fieldName, bool value);
53
54 /// <summary>
55 /// Writes a string field value, including tag, to the stream.
56 /// </summary>
57 void WriteString(int fieldNumber, string fieldName, string value);
58
59 /// <summary>
60 /// Writes a group field value, including tag, to the stream.
61 /// </summary>
62 void WriteGroup(int fieldNumber, string fieldName, IMessageLite value);
63
64 [Obsolete]
65 void WriteUnknownGroup(int fieldNumber, string fieldName, IMessageLite value);
66
67 void WriteMessage(int fieldNumber, string fieldName, IMessageLite value);
68 void WriteBytes(int fieldNumber, string fieldName, ByteString value);
69
70 [CLSCompliant(false)]
71 void WriteUInt32(int fieldNumber, string fieldName, uint value);
72
csharptestced18e12011-06-09 19:47:56 -050073 void WriteEnum(int fieldNumber, string fieldName, int value, object rawValue);
csharptestcc8d2aa2011-06-03 12:15:42 -050074 void WriteSFixed32(int fieldNumber, string fieldName, int value);
75 void WriteSFixed64(int fieldNumber, string fieldName, long value);
76 void WriteSInt32(int fieldNumber, string fieldName, int value);
77 void WriteSInt64(int fieldNumber, string fieldName, long value);
78 void WriteMessageSetExtension(int fieldNumber, string fieldName, IMessageLite value);
csharptestffafdaa2011-06-03 12:58:14 -050079 void WriteMessageSetExtension(int fieldNumber, string fieldName, ByteString value);
csharptestcc8d2aa2011-06-03 12:15:42 -050080 void WriteArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
81 void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
csharptestc671a4b2011-06-08 11:51:24 -050082 void WriteArray<T>(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.Generic.IEnumerable<T> list);
83 void WritePackedArray<T>(FieldType fieldType, int fieldNumber, string fieldName, int calculatedSize, System.Collections.Generic.IEnumerable<T> list);
csharptestcc8d2aa2011-06-03 12:15:42 -050084 void WriteField(FieldType fieldType, int fieldNumber, string fieldName, object value);
85 void Flush();
86 }
87}