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
|
|
|
|
|
|
{
|
2016-09-24 15:38:26 +02:00
|
|
|
|
public class AckRequest : TeleSharp.TL.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
|
|
|
|
|
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);
|
|
|
|
|
|
foreach (ulong messageId in _msgs)
|
|
|
|
|
|
{
|
|
|
|
|
|
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();
|
|
|
|
|
|
}
|
2015-09-28 04:01:17 +02:00
|
|
|
|
|
2016-04-18 12:50:57 +02:00
|
|
|
|
public override bool Confirmed => false;
|
|
|
|
|
|
public override bool Responded { get; }
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
|
|
public override int Constructor
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return 0x62d6b459;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2016-04-18 12:50:57 +02:00
|
|
|
|
}
|
2015-09-28 04:01:17 +02:00
|
|
|
|
}
|