2016-09-24 15:38:26 +02:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using TeleSharp.TL;
|
|
|
|
|
namespace TeleSharp.TL.Updates
|
|
|
|
|
{
|
2017-07-20 04:07:24 +02:00
|
|
|
[TLObject(630429265)]
|
2016-09-24 15:38:26 +02:00
|
|
|
public class TLRequestGetDifference : TLMethod
|
|
|
|
|
{
|
|
|
|
|
public override int Constructor
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2017-07-20 04:07:24 +02:00
|
|
|
return 630429265;
|
2016-09-24 15:38:26 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
public int flags { get; set; }
|
|
|
|
|
public int pts { get; set; }
|
|
|
|
|
public int? pts_total_limit { get; set; }
|
|
|
|
|
public int date { get; set; }
|
|
|
|
|
public int qts { get; set; }
|
|
|
|
|
public Updates.TLAbsDifference Response { get; set; }
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
public void ComputeFlags()
|
|
|
|
|
{
|
|
|
|
|
flags = 0;
|
|
|
|
|
flags = pts_total_limit != null ? (flags | 1) : (flags & ~1);
|
|
|
|
|
|
|
|
|
|
}
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
public override void DeserializeBody(BinaryReader br)
|
|
|
|
|
{
|
2017-07-20 04:07:24 +02:00
|
|
|
flags = br.ReadInt32();
|
2016-09-24 15:38:26 +02:00
|
|
|
pts = br.ReadInt32();
|
2017-07-20 04:07:24 +02:00
|
|
|
if ((flags & 1) != 0)
|
|
|
|
|
pts_total_limit = br.ReadInt32();
|
|
|
|
|
else
|
|
|
|
|
pts_total_limit = null;
|
|
|
|
|
|
|
|
|
|
date = br.ReadInt32();
|
|
|
|
|
qts = br.ReadInt32();
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void SerializeBody(BinaryWriter bw)
|
|
|
|
|
{
|
2017-07-20 04:07:24 +02:00
|
|
|
bw.Write(Constructor);
|
|
|
|
|
ComputeFlags();
|
|
|
|
|
bw.Write(flags);
|
2016-09-24 15:38:26 +02:00
|
|
|
bw.Write(pts);
|
2017-07-20 04:07:24 +02:00
|
|
|
if ((flags & 1) != 0)
|
|
|
|
|
bw.Write(pts_total_limit.Value);
|
|
|
|
|
bw.Write(date);
|
|
|
|
|
bw.Write(qts);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
}
|
2017-07-20 04:07:24 +02:00
|
|
|
public override void deserializeResponse(BinaryReader br)
|
|
|
|
|
{
|
|
|
|
|
Response = (Updates.TLAbsDifference)ObjectUtils.DeserializeObject(br);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
}
|
2016-09-24 15:38:26 +02:00
|
|
|
}
|
|
|
|
|
}
|