TLSharp/TLSharp.Core/Requests/AckRequest.cs

41 lines
1 KiB
C#
Raw Normal View History

2015-09-28 04:01:17 +02:00
using System;
using System.Collections.Generic;
using System.IO;
2016-09-24 15:38:26 +02:00
using TeleSharp.TL;
2015-09-28 04:01:17 +02:00
namespace TLSharp.Core.Requests
{
2017-04-13 08:38:01 +02:00
public class AckRequest : TLMethod
2016-04-18 12:50:57 +02:00
{
private readonly List<ulong> _msgs;
2016-09-24 15:38:26 +02:00
2016-04-18 12:50:57 +02:00
public AckRequest(List<ulong> msgs)
{
_msgs = msgs;
}
2015-09-28 04:01:17 +02:00
2017-04-13 08:38:01 +02:00
public override bool Confirmed => false;
public override bool Responded { get; }
public override int Constructor => 0x62d6b459;
2016-09-24 15:38:26 +02:00
public override void SerializeBody(BinaryWriter writer)
2016-04-18 12:50:57 +02:00
{
writer.Write(0x62d6b459); // msgs_ack
writer.Write(0x1cb5c415); // Vector
writer.Write(_msgs.Count);
2017-04-13 08:38:01 +02:00
foreach (var messageId in _msgs)
2016-04-18 12:50:57 +02:00
writer.Write(messageId);
}
2015-09-28 04:01:17 +02:00
2016-09-24 15:38:26 +02:00
public override void DeserializeBody(BinaryReader reader)
2016-04-18 12:50:57 +02:00
{
2016-09-24 15:38:26 +02:00
throw new NotImplementedException();
2016-04-18 12:50:57 +02:00
}
2015-09-28 04:01:17 +02:00
2016-09-24 15:38:26 +02:00
public override void deserializeResponse(BinaryReader stream)
2016-04-18 12:50:57 +02:00
{
throw new NotImplementedException();
}
}
2017-04-13 08:38:01 +02:00
}