mirror of
https://github.com/sochix/TLSharp.git
synced 2026-05-07 13:37:50 +00:00
Finish TLSharp -> TgSharp rename (#1)
This commit is contained in:
parent
a876314ddc
commit
932a733197
945 changed files with 162 additions and 167 deletions
6
src/TeleSharp.Generator/App.config
Normal file
6
src/TeleSharp.Generator/App.config
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
39
src/TeleSharp.Generator/Constructor.tmp
Normal file
39
src/TeleSharp.Generator/Constructor.tmp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TeleSharp.TL;
|
||||
namespace /* NAMESPACE */
|
||||
{
|
||||
[TLObject(/*Constructor*/)]
|
||||
public class /* NAME */ : /* PARENT */
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return /*Constructor*/;
|
||||
}
|
||||
}
|
||||
|
||||
/* PARAMS */
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
/* COMPUTE */
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
/* DESERIALIZE */
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
/* SERIALIZE */
|
||||
}
|
||||
}
|
||||
}
|
||||
13
src/TeleSharp.Generator/ConstructorAbs.tmp
Normal file
13
src/TeleSharp.Generator/ConstructorAbs.tmp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TeleSharp.TL;
|
||||
namespace /* NAMESPACE */
|
||||
{
|
||||
public abstract class /* NAME */ : TLObject
|
||||
{
|
||||
}
|
||||
}
|
||||
43
src/TeleSharp.Generator/Method.tmp
Normal file
43
src/TeleSharp.Generator/Method.tmp
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TeleSharp.TL;
|
||||
namespace /* NAMESPACE */
|
||||
{
|
||||
[TLObject(/*Constructor*/)]
|
||||
public class /* NAME */ : /* PARENT */
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return /*Constructor*/;
|
||||
}
|
||||
}
|
||||
|
||||
/* PARAMS */
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
/* COMPUTE */
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
/* DESERIALIZE */
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
/* SERIALIZE */
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
/* DESERIALIZEResp */
|
||||
}
|
||||
}
|
||||
}
|
||||
20
src/TeleSharp.Generator/Models/TlConstructor.cs
Normal file
20
src/TeleSharp.Generator/Models/TlConstructor.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace TeleSharp.Generator.Models
|
||||
{
|
||||
internal class TlConstructor
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[JsonProperty("predicate")]
|
||||
public string Predicate { get; set; }
|
||||
|
||||
[JsonProperty("params")]
|
||||
public List<TlParam> Params { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
}
|
||||
20
src/TeleSharp.Generator/Models/TlMethod.cs
Normal file
20
src/TeleSharp.Generator/Models/TlMethod.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace TeleSharp.Generator.Models
|
||||
{
|
||||
internal class TlMethod
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[JsonProperty("method")]
|
||||
public string Method { get; set; }
|
||||
|
||||
[JsonProperty("params")]
|
||||
public List<TlParam> Params { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
}
|
||||
13
src/TeleSharp.Generator/Models/TlParam.cs
Normal file
13
src/TeleSharp.Generator/Models/TlParam.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace TeleSharp.Generator.Models
|
||||
{
|
||||
internal class TlParam
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
}
|
||||
14
src/TeleSharp.Generator/Models/TlSchema.cs
Normal file
14
src/TeleSharp.Generator/Models/TlSchema.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace TeleSharp.Generator.Models
|
||||
{
|
||||
internal class TlSchema
|
||||
{
|
||||
[JsonProperty("constructors")]
|
||||
public List<TlConstructor> Constructors { get; set; }
|
||||
|
||||
[JsonProperty("methods")]
|
||||
public List<TlMethod> Methods { get; set; }
|
||||
}
|
||||
}
|
||||
432
src/TeleSharp.Generator/Program.cs
Normal file
432
src/TeleSharp.Generator/Program.cs
Normal file
|
|
@ -0,0 +1,432 @@
|
|||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using TeleSharp.Generator.Models;
|
||||
|
||||
namespace TeleSharp.Generator
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static List<string> keywords = new List<string>(new string[] { "abstract", "as", "base", "bool", "break", "byte", "case", "catch", "char", "checked", "class", "const", "continue", "decimal", "default", "delegate", "do", "double", "else", "enum", "event", "explicit", "extern", "false", "finally", "fixed", "float", "for", "foreach", "goto", "if", "implicit", "in", "in", "int", "interface", "internal", "is", "lock", "long", "namespace", "new", "null", "object", "operator", "out", "out", "override", "params", "private", "protected", "public", "readonly", "ref", "return", "sbyte", "sealed", "short", "sizeof", "stackalloc", "static", "string", "struct", "switch", "this", "throw", "true", "try", "typeof", "uint", "ulong", "unchecked", "unsafe", "ushort", "using", "virtual", "void", "volatile", "while", "add", "alias", "ascending", "async", "await", "descending", "dynamic", "from", "get", "global", "group", "into", "join", "let", "orderby", "partial", "partial", "remove", "select", "set", "value", "var", "where", "where", "yield" });
|
||||
static List<string> interfacesList = new List<string>();
|
||||
static List<string> classesList = new List<string>();
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
string AbsStyle = File.ReadAllText("ConstructorAbs.tmp");
|
||||
string NormalStyle = File.ReadAllText("Constructor.tmp");
|
||||
string MethodStyle = File.ReadAllText("Method.tmp");
|
||||
//string method = File.ReadAllText("constructor.tt");
|
||||
string Json = "";
|
||||
string url;
|
||||
if (args.Count() == 0) url = "tl-schema.json"; else url = args[0];
|
||||
|
||||
Json = File.ReadAllText(url);
|
||||
FileStream file = File.OpenWrite("Result.cs");
|
||||
StreamWriter sw = new StreamWriter(file);
|
||||
TlSchema schema = JsonConvert.DeserializeObject<TlSchema>(Json);
|
||||
foreach (var c in schema.Constructors)
|
||||
{
|
||||
interfacesList.Add(c.Type);
|
||||
classesList.Add(c.Predicate);
|
||||
}
|
||||
foreach (var c in schema.Constructors)
|
||||
{
|
||||
var list = schema.Constructors.Where(x => x.Type == c.Type);
|
||||
if (list.Count() > 1)
|
||||
{
|
||||
string path = (GetNameSpace(c.Type).Replace("TeleSharp.TL", "TL\\").Replace(".", "") + "\\" + GetNameofClass(c.Type, true) + ".cs").Replace("\\\\", "\\");
|
||||
FileStream classFile = MakeFile(path);
|
||||
using (StreamWriter writer = new StreamWriter(classFile))
|
||||
{
|
||||
string nspace = (GetNameSpace(c.Type).Replace("TeleSharp.TL", "TL\\").Replace(".", "")).Replace("\\\\", "\\").Replace("\\", ".");
|
||||
if (nspace.EndsWith("."))
|
||||
nspace = nspace.Remove(nspace.Length - 1, 1);
|
||||
string temp = AbsStyle.Replace("/* NAMESPACE */", "TeleSharp." + nspace);
|
||||
temp = temp.Replace("/* NAME */", GetNameofClass(c.Type, true));
|
||||
writer.Write(temp);
|
||||
writer.Close();
|
||||
classFile.Close();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
interfacesList.Remove(list.First().Type);
|
||||
list.First().Type = "himself";
|
||||
}
|
||||
}
|
||||
foreach (var c in schema.Constructors)
|
||||
{
|
||||
string path = (GetNameSpace(c.Predicate).Replace("TeleSharp.TL", "TL\\").Replace(".", "") + "\\" + GetNameofClass(c.Predicate, false) + ".cs").Replace("\\\\", "\\");
|
||||
FileStream classFile = MakeFile(path);
|
||||
using (StreamWriter writer = new StreamWriter(classFile))
|
||||
{
|
||||
#region About Class
|
||||
string nspace = (GetNameSpace(c.Predicate).Replace("TeleSharp.TL", "TL\\").Replace(".", "")).Replace("\\\\", "\\").Replace("\\", ".");
|
||||
if (nspace.EndsWith("."))
|
||||
nspace = nspace.Remove(nspace.Length - 1, 1);
|
||||
string temp = NormalStyle.Replace("/* NAMESPACE */", "TeleSharp." + nspace);
|
||||
temp = (c.Type == "himself") ? temp.Replace("/* PARENT */", "TLObject") : temp.Replace("/* PARENT */", GetNameofClass(c.Type, true));
|
||||
temp = temp.Replace("/*Constructor*/", c.Id.ToString());
|
||||
temp = temp.Replace("/* NAME */", GetNameofClass(c.Predicate, false));
|
||||
#endregion
|
||||
#region Fields
|
||||
string fields = "";
|
||||
foreach (var tmp in c.Params)
|
||||
{
|
||||
fields += $" public {CheckForFlagBase(tmp.Type, GetTypeName(tmp.Type))} {CheckForKeywordAndPascalCase(tmp.Name)} " + "{get;set;}" + Environment.NewLine;
|
||||
}
|
||||
temp = temp.Replace("/* PARAMS */", fields);
|
||||
#endregion
|
||||
#region ComputeFlagFunc
|
||||
if (!c.Params.Any(x => x.Name == "Flags")) temp = temp.Replace("/* COMPUTE */", "");
|
||||
else
|
||||
{
|
||||
var compute = "Flags = 0;" + Environment.NewLine;
|
||||
foreach (var param in c.Params.Where(x => IsFlagBase(x.Type)))
|
||||
{
|
||||
if (IsTrueFlag(param.Type))
|
||||
{
|
||||
compute += $"Flags = {CheckForKeywordAndPascalCase(param.Name)} ? (Flags | {GetBitMask(param.Type)}) : (Flags & ~{GetBitMask(param.Type)});" + Environment.NewLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
compute += $"Flags = {CheckForKeywordAndPascalCase(param.Name)} != null ? (Flags | {GetBitMask(param.Type)}) : (Flags & ~{GetBitMask(param.Type)});" + Environment.NewLine;
|
||||
}
|
||||
}
|
||||
temp = temp.Replace("/* COMPUTE */", compute);
|
||||
}
|
||||
#endregion
|
||||
#region SerializeFunc
|
||||
var serialize = "";
|
||||
|
||||
if (c.Params.Any(x => x.Name == "Flags")) serialize += "ComputeFlags();" + Environment.NewLine + "bw.Write(Flags);" + Environment.NewLine;
|
||||
foreach (var p in c.Params.Where(x => x.Name != "Flags"))
|
||||
{
|
||||
serialize += WriteWriteCode(p) + Environment.NewLine;
|
||||
}
|
||||
temp = temp.Replace("/* SERIALIZE */", serialize);
|
||||
#endregion
|
||||
#region DeSerializeFunc
|
||||
var deserialize = "";
|
||||
|
||||
foreach (var p in c.Params)
|
||||
{
|
||||
deserialize += WriteReadCode(p) + Environment.NewLine;
|
||||
}
|
||||
temp = temp.Replace("/* DESERIALIZE */", deserialize);
|
||||
#endregion
|
||||
writer.Write(temp);
|
||||
writer.Close();
|
||||
classFile.Close();
|
||||
}
|
||||
}
|
||||
foreach (var c in schema.Methods)
|
||||
{
|
||||
string path = (GetNameSpace(c.Method).Replace("TeleSharp.TL", "TL\\").Replace(".", "") + "\\" + GetNameofClass(c.Method, false, true) + ".cs").Replace("\\\\", "\\");
|
||||
FileStream classFile = MakeFile(path);
|
||||
using (StreamWriter writer = new StreamWriter(classFile))
|
||||
{
|
||||
#region About Class
|
||||
string nspace = (GetNameSpace(c.Method).Replace("TeleSharp.TL", "TL\\").Replace(".", "")).Replace("\\\\", "\\").Replace("\\", ".");
|
||||
if (nspace.EndsWith("."))
|
||||
nspace = nspace.Remove(nspace.Length - 1, 1);
|
||||
string temp = MethodStyle.Replace("/* NAMESPACE */", "TeleSharp." + nspace);
|
||||
temp = temp.Replace("/* PARENT */", "TLMethod");
|
||||
temp = temp.Replace("/*Constructor*/", c.Id.ToString());
|
||||
temp = temp.Replace("/* NAME */", GetNameofClass(c.Method, false, true));
|
||||
#endregion
|
||||
#region Fields
|
||||
string fields = "";
|
||||
foreach (var tmp in c.Params)
|
||||
{
|
||||
fields += $" public {CheckForFlagBase(tmp.Type, GetTypeName(tmp.Type))} {CheckForKeywordAndPascalCase(tmp.Name)} " + "{get;set;}" + Environment.NewLine;
|
||||
}
|
||||
fields += $" public {CheckForFlagBase(c.Type, GetTypeName(c.Type))} Response" + "{ get; set;}" + Environment.NewLine;
|
||||
temp = temp.Replace("/* PARAMS */", fields);
|
||||
#endregion
|
||||
#region ComputeFlagFunc
|
||||
if (!c.Params.Any(x => x.Name == "Flags")) temp = temp.Replace("/* COMPUTE */", "");
|
||||
else
|
||||
{
|
||||
var compute = "Flags = 0;" + Environment.NewLine;
|
||||
foreach (var param in c.Params.Where(x => IsFlagBase(x.Type)))
|
||||
{
|
||||
if (IsTrueFlag(param.Type))
|
||||
{
|
||||
compute += $"Flags = {CheckForKeywordAndPascalCase(param.Name)} ? (Flags | {GetBitMask(param.Type)}) : (Flags & ~{GetBitMask(param.Type)});" + Environment.NewLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
compute += $"Flags = {CheckForKeywordAndPascalCase(param.Name)} != null ? (Flags | {GetBitMask(param.Type)}) : (Flags & ~{GetBitMask(param.Type)});" + Environment.NewLine;
|
||||
}
|
||||
}
|
||||
temp = temp.Replace("/* COMPUTE */", compute);
|
||||
}
|
||||
#endregion
|
||||
#region SerializeFunc
|
||||
var serialize = "";
|
||||
|
||||
if (c.Params.Any(x => x.Name == "Flags")) serialize += "ComputeFlags();" + Environment.NewLine + "bw.Write(Flags);" + Environment.NewLine;
|
||||
foreach (var p in c.Params.Where(x => x.Name != "Flags"))
|
||||
{
|
||||
serialize += WriteWriteCode(p) + Environment.NewLine;
|
||||
}
|
||||
temp = temp.Replace("/* SERIALIZE */", serialize);
|
||||
#endregion
|
||||
#region DeSerializeFunc
|
||||
var deserialize = "";
|
||||
|
||||
foreach (var p in c.Params)
|
||||
{
|
||||
deserialize += WriteReadCode(p) + Environment.NewLine;
|
||||
}
|
||||
temp = temp.Replace("/* DESERIALIZE */", deserialize);
|
||||
#endregion
|
||||
#region DeSerializeRespFunc
|
||||
var deserializeResp = "";
|
||||
TlParam p2 = new TlParam() { Name = "Response", Type = c.Type };
|
||||
deserializeResp += WriteReadCode(p2) + Environment.NewLine;
|
||||
temp = temp.Replace("/* DESERIALIZEResp */", deserializeResp);
|
||||
#endregion
|
||||
writer.Write(temp);
|
||||
writer.Close();
|
||||
classFile.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
public static string FormatName(string input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input))
|
||||
throw new ArgumentException("ARGH!");
|
||||
if (input.IndexOf('.') != -1)
|
||||
{
|
||||
input = input.Replace(".", " ");
|
||||
var temp = "";
|
||||
foreach (var s in input.Split(' '))
|
||||
{
|
||||
temp += FormatName(s) + " ";
|
||||
}
|
||||
input = temp.Trim();
|
||||
}
|
||||
return input.First().ToString().ToUpper() + input.Substring(1);
|
||||
}
|
||||
public static string CheckForKeywordAndPascalCase(string name)
|
||||
{
|
||||
name = name.Replace("_", " ");
|
||||
name = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(name);
|
||||
name = name.Replace(" ", "");
|
||||
|
||||
if (keywords.Contains(name)) return "@" + name;
|
||||
return name;
|
||||
}
|
||||
public static string GetNameofClass(string type, bool isinterface = false, bool ismethod = false)
|
||||
{
|
||||
if (!ismethod)
|
||||
{
|
||||
if (type.IndexOf('.') != -1 && type.IndexOf('?') == -1)
|
||||
return isinterface ? "TLAbs" + FormatName(type.Split('.')[1]) : "TL" + FormatName(type.Split('.')[1]);
|
||||
else if (type.IndexOf('.') != -1 && type.IndexOf('?') != -1)
|
||||
return isinterface ? "TLAbs" + FormatName(type.Split('?')[1]) : "TL" + FormatName(type.Split('?')[1]);
|
||||
else
|
||||
return isinterface ? "TLAbs" + FormatName(type) : "TL" + FormatName(type);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (type.IndexOf('.') != -1 && type.IndexOf('?') == -1)
|
||||
return "TLRequest" + FormatName(type.Split('.')[1]);
|
||||
else if (type.IndexOf('.') != -1 && type.IndexOf('?') != -1)
|
||||
return "TLRequest" + FormatName(type.Split('?')[1]);
|
||||
else
|
||||
return "TLRequest" + FormatName(type);
|
||||
}
|
||||
}
|
||||
private static bool IsFlagBase(string type)
|
||||
{
|
||||
return type.IndexOf("?") != -1;
|
||||
}
|
||||
private static int GetBitMask(string type)
|
||||
{
|
||||
return (int)Math.Pow((double)2, (double)int.Parse(type.Split('?')[0].Split('.')[1]));
|
||||
}
|
||||
private static bool IsTrueFlag(string type)
|
||||
{
|
||||
return type.Split('?')[1] == "true";
|
||||
}
|
||||
public static string GetNameSpace(string type)
|
||||
{
|
||||
if (type.IndexOf('.') != -1)
|
||||
return "TeleSharp.TL" + FormatName(type.Split('.')[0]);
|
||||
else
|
||||
return "TeleSharp.TL";
|
||||
}
|
||||
public static string CheckForFlagBase(string type, string result)
|
||||
{
|
||||
if (type.IndexOf('?') == -1)
|
||||
return result;
|
||||
else
|
||||
{
|
||||
string innerType = type.Split('?')[1];
|
||||
if (innerType == "true") return result;
|
||||
else if ((new string[] { "bool", "int", "uint", "long", "double" }).Contains(result)) return result + "?";
|
||||
else return result;
|
||||
}
|
||||
}
|
||||
public static string GetTypeName(string type)
|
||||
{
|
||||
switch (type.ToLower())
|
||||
{
|
||||
case "#":
|
||||
case "int":
|
||||
return "int";
|
||||
case "uint":
|
||||
return "uint";
|
||||
case "long":
|
||||
return "long";
|
||||
case "double":
|
||||
return "double";
|
||||
case "string":
|
||||
return "string";
|
||||
case "bytes":
|
||||
return "byte[]";
|
||||
case "true":
|
||||
case "bool":
|
||||
return "bool";
|
||||
case "!x":
|
||||
return "TLObject";
|
||||
case "x":
|
||||
return "TLObject";
|
||||
}
|
||||
|
||||
if (type.StartsWith("Vector"))
|
||||
return "TLVector<" + GetTypeName(type.Replace("Vector<", "").Replace(">", "")) + ">";
|
||||
|
||||
if (type.ToLower().Contains("inputcontact"))
|
||||
return "TLInputPhoneContact";
|
||||
|
||||
|
||||
if (type.IndexOf('.') != -1 && type.IndexOf('?') == -1)
|
||||
{
|
||||
|
||||
if (interfacesList.Any(x => x.ToLower() == (type).ToLower()))
|
||||
return FormatName(type.Split('.')[0]) + "." + "TLAbs" + type.Split('.')[1];
|
||||
else if (classesList.Any(x => x.ToLower() == (type).ToLower()))
|
||||
return FormatName(type.Split('.')[0]) + "." + "TL" + type.Split('.')[1];
|
||||
else
|
||||
return FormatName(type.Split('.')[1]);
|
||||
}
|
||||
else if (type.IndexOf('?') == -1)
|
||||
{
|
||||
if (interfacesList.Any(x => x.ToLower() == type.ToLower()))
|
||||
return "TLAbs" + type;
|
||||
else if (classesList.Any(x => x.ToLower() == type.ToLower()))
|
||||
return "TL" + type;
|
||||
else
|
||||
return type;
|
||||
}
|
||||
else
|
||||
{
|
||||
return GetTypeName(type.Split('?')[1]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public static string LookTypeInLists(string src)
|
||||
{
|
||||
if (interfacesList.Any(x => x.ToLower() == src.ToLower()))
|
||||
return "TLAbs" + FormatName(src);
|
||||
else if (classesList.Any(x => x.ToLower() == src.ToLower()))
|
||||
return "TL" + FormatName(src);
|
||||
else
|
||||
return src;
|
||||
}
|
||||
public static string WriteWriteCode(TlParam p, bool flag = false)
|
||||
{
|
||||
switch (p.Type.ToLower())
|
||||
{
|
||||
case "#":
|
||||
case "int":
|
||||
return flag ? $"bw.Write({CheckForKeywordAndPascalCase(p.Name)}.Value);" : $"bw.Write({CheckForKeywordAndPascalCase(p.Name)});";
|
||||
case "long":
|
||||
return flag ? $"bw.Write({CheckForKeywordAndPascalCase(p.Name)}.Value);" : $"bw.Write({CheckForKeywordAndPascalCase(p.Name)});";
|
||||
case "string":
|
||||
return $"StringUtil.Serialize({CheckForKeywordAndPascalCase(p.Name)},bw);";
|
||||
case "bool":
|
||||
return flag ? $"BoolUtil.Serialize({CheckForKeywordAndPascalCase(p.Name)}.Value,bw);" : $"BoolUtil.Serialize({CheckForKeywordAndPascalCase(p.Name)},bw);";
|
||||
case "true":
|
||||
return $"BoolUtil.Serialize({CheckForKeywordAndPascalCase(p.Name)},bw);";
|
||||
case "bytes":
|
||||
return $"BytesUtil.Serialize({CheckForKeywordAndPascalCase(p.Name)},bw);";
|
||||
case "double":
|
||||
return flag ? $"bw.Write({CheckForKeywordAndPascalCase(p.Name)}.Value);" : $"bw.Write({CheckForKeywordAndPascalCase(p.Name)});";
|
||||
default:
|
||||
if (!IsFlagBase(p.Type))
|
||||
return $"ObjectUtils.SerializeObject({CheckForKeywordAndPascalCase(p.Name)},bw);";
|
||||
else
|
||||
{
|
||||
if (IsTrueFlag(p.Type))
|
||||
return $"";
|
||||
else
|
||||
{
|
||||
TlParam p2 = new TlParam() { Name = p.Name, Type = p.Type.Split('?')[1] };
|
||||
return $"if ((Flags & {GetBitMask(p.Type).ToString()}) != 0)" + Environment.NewLine +
|
||||
WriteWriteCode(p2, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public static string WriteReadCode(TlParam p)
|
||||
{
|
||||
switch (p.Type.ToLower())
|
||||
{
|
||||
case "#":
|
||||
case "int":
|
||||
return $"{CheckForKeywordAndPascalCase(p.Name)} = br.ReadInt32();";
|
||||
case "long":
|
||||
return $"{CheckForKeywordAndPascalCase(p.Name)} = br.ReadInt64();";
|
||||
case "string":
|
||||
return $"{CheckForKeywordAndPascalCase(p.Name)} = StringUtil.Deserialize(br);";
|
||||
case "bool":
|
||||
case "true":
|
||||
return $"{CheckForKeywordAndPascalCase(p.Name)} = BoolUtil.Deserialize(br);";
|
||||
case "bytes":
|
||||
return $"{CheckForKeywordAndPascalCase(p.Name)} = BytesUtil.Deserialize(br);";
|
||||
case "double":
|
||||
return $"{CheckForKeywordAndPascalCase(p.Name)} = br.ReadDouble();";
|
||||
default:
|
||||
if (!IsFlagBase(p.Type))
|
||||
{
|
||||
if (p.Type.ToLower().Contains("vector"))
|
||||
{
|
||||
return $"{CheckForKeywordAndPascalCase(p.Name)} = ({GetTypeName(p.Type)})ObjectUtils.DeserializeVector<{GetTypeName(p.Type).Replace("TLVector<", "").Replace(">", "")}>(br);";
|
||||
}
|
||||
else return $"{CheckForKeywordAndPascalCase(p.Name)} = ({GetTypeName(p.Type)})ObjectUtils.DeserializeObject(br);";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsTrueFlag(p.Type))
|
||||
return $"{CheckForKeywordAndPascalCase(p.Name)} = (Flags & {GetBitMask(p.Type).ToString()}) != 0;";
|
||||
else
|
||||
{
|
||||
TlParam p2 = new TlParam() { Name = p.Name, Type = p.Type.Split('?')[1] };
|
||||
return $"if ((Flags & {GetBitMask(p.Type).ToString()}) != 0)" + Environment.NewLine +
|
||||
WriteReadCode(p2) + Environment.NewLine +
|
||||
"else" + Environment.NewLine +
|
||||
$"{CheckForKeywordAndPascalCase(p.Name)} = null;" + Environment.NewLine;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public static FileStream MakeFile(string path)
|
||||
{
|
||||
if (!Directory.Exists(Path.GetDirectoryName(path)))
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
if (File.Exists(path))
|
||||
File.Delete(path);
|
||||
return File.OpenWrite(path);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
36
src/TeleSharp.Generator/Properties/AssemblyInfo.cs
Normal file
36
src/TeleSharp.Generator/Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TeleSharp.Generator")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TeleSharp.Generator")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9be3b9d4-9ff6-4dc8-b9cc-eb2e3f390129")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
84
src/TeleSharp.Generator/TeleSharp.Generator.csproj
Normal file
84
src/TeleSharp.Generator/TeleSharp.Generator.csproj
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{9BE3B9D4-9FF6-4DC8-B9CC-EB2E3F390129}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>TeleSharp.Generator</RootNamespace>
|
||||
<AssemblyName>TeleSharp.Generator</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Models\TlMethod.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Models\TlConstructor.cs" />
|
||||
<Compile Include="Models\TlParam.cs" />
|
||||
<Compile Include="Models\TlSchema.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<Content Include="Method.tmp">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Constructor.tmp">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="ConstructorAbs.tmp">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
4
src/TeleSharp.Generator/packages.config
Normal file
4
src/TeleSharp.Generator/packages.config
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
|
||||
</packages>
|
||||
51
src/TeleSharp.TL/ObjectDeserializer.cs
Normal file
51
src/TeleSharp.TL/ObjectDeserializer.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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
|
||||
{
|
||||
public class ObjectUtils
|
||||
{
|
||||
public static object DeserializeObject(BinaryReader reader)
|
||||
{
|
||||
int Constructor = reader.ReadInt32();
|
||||
object obj;
|
||||
Type t = null;
|
||||
try
|
||||
{
|
||||
t = TLContext.getType(Constructor);
|
||||
obj = Activator.CreateInstance(t);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new InvalidDataException("Constructor Invalid Or Context.Init Not Called !", ex);
|
||||
}
|
||||
if (t.IsSubclassOf(typeof(TLMethod)))
|
||||
{
|
||||
((TLMethod)obj).DeserializeResponse(reader);
|
||||
return obj;
|
||||
}
|
||||
else if (t.IsSubclassOf(typeof(TLObject)))
|
||||
{
|
||||
((TLObject)obj).DeserializeBody(reader);
|
||||
return obj;
|
||||
}
|
||||
else throw new NotImplementedException("Weird Type : " + t.Namespace + " | " + t.Name);
|
||||
}
|
||||
public static void SerializeObject(object obj, BinaryWriter writer)
|
||||
{
|
||||
((TLObject)obj).SerializeBody(writer);
|
||||
}
|
||||
public static TLVector<T> DeserializeVector<T>(BinaryReader reader)
|
||||
{
|
||||
if (reader.ReadInt32() != 481674261) throw new InvalidDataException("Bad Constructor");
|
||||
TLVector<T> t = new TLVector<T>();
|
||||
t.DeserializeBody(reader);
|
||||
return t;
|
||||
}
|
||||
}
|
||||
}
|
||||
36
src/TeleSharp.TL/Properties/AssemblyInfo.cs
Normal file
36
src/TeleSharp.TL/Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TeleSharp.TL")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TeleSharp.TL")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("d6144517-91d2-4880-86df-e9ff5d7f383a")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
13
src/TeleSharp.TL/TL/Account/TLAbsPassword.cs
Normal file
13
src/TeleSharp.TL/TL/Account/TLAbsPassword.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
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.Account
|
||||
{
|
||||
public abstract class TLAbsPassword : TLObject
|
||||
{
|
||||
}
|
||||
}
|
||||
42
src/TeleSharp.TL/TL/Account/TLAuthorizations.cs
Normal file
42
src/TeleSharp.TL/TL/Account/TLAuthorizations.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(307276766)]
|
||||
public class TLAuthorizations : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 307276766;
|
||||
}
|
||||
}
|
||||
|
||||
public TLVector<TLAuthorization> Authorizations { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Authorizations = (TLVector<TLAuthorization>)ObjectUtils.DeserializeVector<TLAuthorization>(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Authorizations, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Account/TLNoPassword.cs
Normal file
45
src/TeleSharp.TL/TL/Account/TLNoPassword.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-1764049896)]
|
||||
public class TLNoPassword : TLAbsPassword
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1764049896;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] NewSalt { get; set; }
|
||||
public string EmailUnconfirmedPattern { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
NewSalt = BytesUtil.Deserialize(br);
|
||||
EmailUnconfirmedPattern = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
BytesUtil.Serialize(NewSalt, bw);
|
||||
StringUtil.Serialize(EmailUnconfirmedPattern, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
54
src/TeleSharp.TL/TL/Account/TLPassword.cs
Normal file
54
src/TeleSharp.TL/TL/Account/TLPassword.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(2081952796)]
|
||||
public class TLPassword : TLAbsPassword
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 2081952796;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] CurrentSalt { get; set; }
|
||||
public byte[] NewSalt { get; set; }
|
||||
public string Hint { get; set; }
|
||||
public bool HasRecovery { get; set; }
|
||||
public string EmailUnconfirmedPattern { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
CurrentSalt = BytesUtil.Deserialize(br);
|
||||
NewSalt = BytesUtil.Deserialize(br);
|
||||
Hint = StringUtil.Deserialize(br);
|
||||
HasRecovery = BoolUtil.Deserialize(br);
|
||||
EmailUnconfirmedPattern = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
BytesUtil.Serialize(CurrentSalt, bw);
|
||||
BytesUtil.Serialize(NewSalt, bw);
|
||||
StringUtil.Serialize(Hint, bw);
|
||||
BoolUtil.Serialize(HasRecovery, bw);
|
||||
StringUtil.Serialize(EmailUnconfirmedPattern, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
80
src/TeleSharp.TL/TL/Account/TLPasswordInputSettings.cs
Normal file
80
src/TeleSharp.TL/TL/Account/TLPasswordInputSettings.cs
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-2037289493)]
|
||||
public class TLPasswordInputSettings : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -2037289493;
|
||||
}
|
||||
}
|
||||
|
||||
public int Flags { get; set; }
|
||||
public byte[] NewSalt { get; set; }
|
||||
public byte[] NewPasswordHash { get; set; }
|
||||
public string Hint { get; set; }
|
||||
public string Email { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
Flags = 0;
|
||||
Flags = NewSalt != null ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = NewPasswordHash != null ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = Hint != null ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = Email != null ? (Flags | 2) : (Flags & ~2);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Flags = br.ReadInt32();
|
||||
if ((Flags & 1) != 0)
|
||||
NewSalt = BytesUtil.Deserialize(br);
|
||||
else
|
||||
NewSalt = null;
|
||||
|
||||
if ((Flags & 1) != 0)
|
||||
NewPasswordHash = BytesUtil.Deserialize(br);
|
||||
else
|
||||
NewPasswordHash = null;
|
||||
|
||||
if ((Flags & 1) != 0)
|
||||
Hint = StringUtil.Deserialize(br);
|
||||
else
|
||||
Hint = null;
|
||||
|
||||
if ((Flags & 2) != 0)
|
||||
Email = StringUtil.Deserialize(br);
|
||||
else
|
||||
Email = null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(Flags);
|
||||
if ((Flags & 1) != 0)
|
||||
BytesUtil.Serialize(NewSalt, bw);
|
||||
if ((Flags & 1) != 0)
|
||||
BytesUtil.Serialize(NewPasswordHash, bw);
|
||||
if ((Flags & 1) != 0)
|
||||
StringUtil.Serialize(Hint, bw);
|
||||
if ((Flags & 2) != 0)
|
||||
StringUtil.Serialize(Email, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
42
src/TeleSharp.TL/TL/Account/TLPasswordSettings.cs
Normal file
42
src/TeleSharp.TL/TL/Account/TLPasswordSettings.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-1212732749)]
|
||||
public class TLPasswordSettings : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1212732749;
|
||||
}
|
||||
}
|
||||
|
||||
public string Email { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Email = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(Email, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Account/TLPrivacyRules.cs
Normal file
45
src/TeleSharp.TL/TL/Account/TLPrivacyRules.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(1430961007)]
|
||||
public class TLPrivacyRules : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1430961007;
|
||||
}
|
||||
}
|
||||
|
||||
public TLVector<TLAbsPrivacyRule> Rules { get; set; }
|
||||
public TLVector<TLAbsUser> Users { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Rules = (TLVector<TLAbsPrivacyRule>)ObjectUtils.DeserializeVector<TLAbsPrivacyRule>(br);
|
||||
Users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Rules, bw);
|
||||
ObjectUtils.SerializeObject(Users, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
54
src/TeleSharp.TL/TL/Account/TLRequestChangePhone.cs
Normal file
54
src/TeleSharp.TL/TL/Account/TLRequestChangePhone.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(1891839707)]
|
||||
public class TLRequestChangePhone : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1891839707;
|
||||
}
|
||||
}
|
||||
|
||||
public string PhoneNumber { get; set; }
|
||||
public string PhoneCodeHash { get; set; }
|
||||
public string PhoneCode { get; set; }
|
||||
public TLAbsUser Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PhoneNumber = StringUtil.Deserialize(br);
|
||||
PhoneCodeHash = StringUtil.Deserialize(br);
|
||||
PhoneCode = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(PhoneNumber, bw);
|
||||
StringUtil.Serialize(PhoneCodeHash, bw);
|
||||
StringUtil.Serialize(PhoneCode, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLAbsUser)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Account/TLRequestCheckUsername.cs
Normal file
48
src/TeleSharp.TL/TL/Account/TLRequestCheckUsername.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(655677548)]
|
||||
public class TLRequestCheckUsername : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 655677548;
|
||||
}
|
||||
}
|
||||
|
||||
public string Username { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Username = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(Username, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Account/TLRequestConfirmPhone.cs
Normal file
51
src/TeleSharp.TL/TL/Account/TLRequestConfirmPhone.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(1596029123)]
|
||||
public class TLRequestConfirmPhone : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1596029123;
|
||||
}
|
||||
}
|
||||
|
||||
public string PhoneCodeHash { get; set; }
|
||||
public string PhoneCode { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PhoneCodeHash = StringUtil.Deserialize(br);
|
||||
PhoneCode = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(PhoneCodeHash, bw);
|
||||
StringUtil.Serialize(PhoneCode, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Account/TLRequestDeleteAccount.cs
Normal file
48
src/TeleSharp.TL/TL/Account/TLRequestDeleteAccount.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(1099779595)]
|
||||
public class TLRequestDeleteAccount : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1099779595;
|
||||
}
|
||||
}
|
||||
|
||||
public string Reason { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Reason = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(Reason, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Account/TLRequestGetAccountTTL.cs
Normal file
45
src/TeleSharp.TL/TL/Account/TLRequestGetAccountTTL.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(150761757)]
|
||||
public class TLRequestGetAccountTTL : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 150761757;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAccountDaysTTL Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLAccountDaysTTL)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Account/TLRequestGetAuthorizations.cs
Normal file
45
src/TeleSharp.TL/TL/Account/TLRequestGetAuthorizations.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-484392616)]
|
||||
public class TLRequestGetAuthorizations : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -484392616;
|
||||
}
|
||||
}
|
||||
|
||||
public Account.TLAuthorizations Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Account.TLAuthorizations)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Account/TLRequestGetNotifySettings.cs
Normal file
48
src/TeleSharp.TL/TL/Account/TLRequestGetNotifySettings.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(313765169)]
|
||||
public class TLRequestGetNotifySettings : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 313765169;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputNotifyPeer Peer { get; set; }
|
||||
public TLAbsPeerNotifySettings Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Peer = (TLAbsInputNotifyPeer)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Peer, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLAbsPeerNotifySettings)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Account/TLRequestGetPassword.cs
Normal file
45
src/TeleSharp.TL/TL/Account/TLRequestGetPassword.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(1418342645)]
|
||||
public class TLRequestGetPassword : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1418342645;
|
||||
}
|
||||
}
|
||||
|
||||
public Account.TLAbsPassword Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Account.TLAbsPassword)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Account/TLRequestGetPasswordSettings.cs
Normal file
48
src/TeleSharp.TL/TL/Account/TLRequestGetPasswordSettings.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-1131605573)]
|
||||
public class TLRequestGetPasswordSettings : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1131605573;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] CurrentPasswordHash { get; set; }
|
||||
public Account.TLPasswordSettings Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
CurrentPasswordHash = BytesUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
BytesUtil.Serialize(CurrentPasswordHash, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Account.TLPasswordSettings)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Account/TLRequestGetPrivacy.cs
Normal file
48
src/TeleSharp.TL/TL/Account/TLRequestGetPrivacy.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-623130288)]
|
||||
public class TLRequestGetPrivacy : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -623130288;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputPrivacyKey Key { get; set; }
|
||||
public Account.TLPrivacyRules Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Key = (TLAbsInputPrivacyKey)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Key, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Account.TLPrivacyRules)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Account/TLRequestGetTmpPassword.cs
Normal file
51
src/TeleSharp.TL/TL/Account/TLRequestGetTmpPassword.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(1250046590)]
|
||||
public class TLRequestGetTmpPassword : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1250046590;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] PasswordHash { get; set; }
|
||||
public int Period { get; set; }
|
||||
public Account.TLTmpPassword Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PasswordHash = BytesUtil.Deserialize(br);
|
||||
Period = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
BytesUtil.Serialize(PasswordHash, bw);
|
||||
bw.Write(Period);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Account.TLTmpPassword)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Account/TLRequestGetWallPapers.cs
Normal file
45
src/TeleSharp.TL/TL/Account/TLRequestGetWallPapers.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-1068696894)]
|
||||
public class TLRequestGetWallPapers : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1068696894;
|
||||
}
|
||||
}
|
||||
|
||||
public TLVector<TLAbsWallPaper> Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLVector<TLAbsWallPaper>)ObjectUtils.DeserializeVector<TLAbsWallPaper>(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Account/TLRequestRegisterDevice.cs
Normal file
51
src/TeleSharp.TL/TL/Account/TLRequestRegisterDevice.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(1669245048)]
|
||||
public class TLRequestRegisterDevice : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1669245048;
|
||||
}
|
||||
}
|
||||
|
||||
public int TokenType { get; set; }
|
||||
public string Token { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
TokenType = br.ReadInt32();
|
||||
Token = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(TokenType);
|
||||
StringUtil.Serialize(Token, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Account/TLRequestReportPeer.cs
Normal file
51
src/TeleSharp.TL/TL/Account/TLRequestReportPeer.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-1374118561)]
|
||||
public class TLRequestReportPeer : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1374118561;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputPeer Peer { get; set; }
|
||||
public TLAbsReportReason Reason { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br);
|
||||
Reason = (TLAbsReportReason)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Peer, bw);
|
||||
ObjectUtils.SerializeObject(Reason, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Account/TLRequestResetAuthorization.cs
Normal file
48
src/TeleSharp.TL/TL/Account/TLRequestResetAuthorization.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-545786948)]
|
||||
public class TLRequestResetAuthorization : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -545786948;
|
||||
}
|
||||
}
|
||||
|
||||
public long Hash { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Hash = br.ReadInt64();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(Hash);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Account/TLRequestResetNotifySettings.cs
Normal file
45
src/TeleSharp.TL/TL/Account/TLRequestResetNotifySettings.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-612493497)]
|
||||
public class TLRequestResetNotifySettings : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -612493497;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
66
src/TeleSharp.TL/TL/Account/TLRequestSendChangePhoneCode.cs
Normal file
66
src/TeleSharp.TL/TL/Account/TLRequestSendChangePhoneCode.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(149257707)]
|
||||
public class TLRequestSendChangePhoneCode : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 149257707;
|
||||
}
|
||||
}
|
||||
|
||||
public int Flags { get; set; }
|
||||
public bool AllowFlashcall { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public bool? CurrentNumber { get; set; }
|
||||
public Auth.TLSentCode Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
Flags = 0;
|
||||
Flags = AllowFlashcall ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = CurrentNumber != null ? (Flags | 1) : (Flags & ~1);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Flags = br.ReadInt32();
|
||||
AllowFlashcall = (Flags & 1) != 0;
|
||||
PhoneNumber = StringUtil.Deserialize(br);
|
||||
if ((Flags & 1) != 0)
|
||||
CurrentNumber = BoolUtil.Deserialize(br);
|
||||
else
|
||||
CurrentNumber = null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(Flags);
|
||||
|
||||
StringUtil.Serialize(PhoneNumber, bw);
|
||||
if ((Flags & 1) != 0)
|
||||
BoolUtil.Serialize(CurrentNumber.Value, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLSentCode)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
66
src/TeleSharp.TL/TL/Account/TLRequestSendConfirmPhoneCode.cs
Normal file
66
src/TeleSharp.TL/TL/Account/TLRequestSendConfirmPhoneCode.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(353818557)]
|
||||
public class TLRequestSendConfirmPhoneCode : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 353818557;
|
||||
}
|
||||
}
|
||||
|
||||
public int Flags { get; set; }
|
||||
public bool AllowFlashcall { get; set; }
|
||||
public string Hash { get; set; }
|
||||
public bool? CurrentNumber { get; set; }
|
||||
public Auth.TLSentCode Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
Flags = 0;
|
||||
Flags = AllowFlashcall ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = CurrentNumber != null ? (Flags | 1) : (Flags & ~1);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Flags = br.ReadInt32();
|
||||
AllowFlashcall = (Flags & 1) != 0;
|
||||
Hash = StringUtil.Deserialize(br);
|
||||
if ((Flags & 1) != 0)
|
||||
CurrentNumber = BoolUtil.Deserialize(br);
|
||||
else
|
||||
CurrentNumber = null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(Flags);
|
||||
|
||||
StringUtil.Serialize(Hash, bw);
|
||||
if ((Flags & 1) != 0)
|
||||
BoolUtil.Serialize(CurrentNumber.Value, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLSentCode)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Account/TLRequestSetAccountTTL.cs
Normal file
48
src/TeleSharp.TL/TL/Account/TLRequestSetAccountTTL.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(608323678)]
|
||||
public class TLRequestSetAccountTTL : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 608323678;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAccountDaysTTL Ttl { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Ttl = (TLAccountDaysTTL)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Ttl, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Account/TLRequestSetPrivacy.cs
Normal file
51
src/TeleSharp.TL/TL/Account/TLRequestSetPrivacy.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-906486552)]
|
||||
public class TLRequestSetPrivacy : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -906486552;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputPrivacyKey Key { get; set; }
|
||||
public TLVector<TLAbsInputPrivacyRule> Rules { get; set; }
|
||||
public Account.TLPrivacyRules Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Key = (TLAbsInputPrivacyKey)ObjectUtils.DeserializeObject(br);
|
||||
Rules = (TLVector<TLAbsInputPrivacyRule>)ObjectUtils.DeserializeVector<TLAbsInputPrivacyRule>(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Key, bw);
|
||||
ObjectUtils.SerializeObject(Rules, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Account.TLPrivacyRules)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Account/TLRequestUnregisterDevice.cs
Normal file
51
src/TeleSharp.TL/TL/Account/TLRequestUnregisterDevice.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(1707432768)]
|
||||
public class TLRequestUnregisterDevice : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1707432768;
|
||||
}
|
||||
}
|
||||
|
||||
public int TokenType { get; set; }
|
||||
public string Token { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
TokenType = br.ReadInt32();
|
||||
Token = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(TokenType);
|
||||
StringUtil.Serialize(Token, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Account/TLRequestUpdateDeviceLocked.cs
Normal file
48
src/TeleSharp.TL/TL/Account/TLRequestUpdateDeviceLocked.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(954152242)]
|
||||
public class TLRequestUpdateDeviceLocked : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 954152242;
|
||||
}
|
||||
}
|
||||
|
||||
public int Period { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Period = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(Period);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Account/TLRequestUpdateNotifySettings.cs
Normal file
51
src/TeleSharp.TL/TL/Account/TLRequestUpdateNotifySettings.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-2067899501)]
|
||||
public class TLRequestUpdateNotifySettings : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -2067899501;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputNotifyPeer Peer { get; set; }
|
||||
public TLInputPeerNotifySettings Settings { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Peer = (TLAbsInputNotifyPeer)ObjectUtils.DeserializeObject(br);
|
||||
Settings = (TLInputPeerNotifySettings)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Peer, bw);
|
||||
ObjectUtils.SerializeObject(Settings, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-92517498)]
|
||||
public class TLRequestUpdatePasswordSettings : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -92517498;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] CurrentPasswordHash { get; set; }
|
||||
public Account.TLPasswordInputSettings NewSettings { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
CurrentPasswordHash = BytesUtil.Deserialize(br);
|
||||
NewSettings = (Account.TLPasswordInputSettings)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
BytesUtil.Serialize(CurrentPasswordHash, bw);
|
||||
ObjectUtils.SerializeObject(NewSettings, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
77
src/TeleSharp.TL/TL/Account/TLRequestUpdateProfile.cs
Normal file
77
src/TeleSharp.TL/TL/Account/TLRequestUpdateProfile.cs
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(2018596725)]
|
||||
public class TLRequestUpdateProfile : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 2018596725;
|
||||
}
|
||||
}
|
||||
|
||||
public int Flags { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string About { get; set; }
|
||||
public TLAbsUser Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
Flags = 0;
|
||||
Flags = FirstName != null ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = LastName != null ? (Flags | 2) : (Flags & ~2);
|
||||
Flags = About != null ? (Flags | 4) : (Flags & ~4);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Flags = br.ReadInt32();
|
||||
if ((Flags & 1) != 0)
|
||||
FirstName = StringUtil.Deserialize(br);
|
||||
else
|
||||
FirstName = null;
|
||||
|
||||
if ((Flags & 2) != 0)
|
||||
LastName = StringUtil.Deserialize(br);
|
||||
else
|
||||
LastName = null;
|
||||
|
||||
if ((Flags & 4) != 0)
|
||||
About = StringUtil.Deserialize(br);
|
||||
else
|
||||
About = null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(Flags);
|
||||
if ((Flags & 1) != 0)
|
||||
StringUtil.Serialize(FirstName, bw);
|
||||
if ((Flags & 2) != 0)
|
||||
StringUtil.Serialize(LastName, bw);
|
||||
if ((Flags & 4) != 0)
|
||||
StringUtil.Serialize(About, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLAbsUser)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Account/TLRequestUpdateStatus.cs
Normal file
48
src/TeleSharp.TL/TL/Account/TLRequestUpdateStatus.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(1713919532)]
|
||||
public class TLRequestUpdateStatus : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1713919532;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Offline { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Offline = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
BoolUtil.Serialize(Offline, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Account/TLRequestUpdateUsername.cs
Normal file
48
src/TeleSharp.TL/TL/Account/TLRequestUpdateUsername.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(1040964988)]
|
||||
public class TLRequestUpdateUsername : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1040964988;
|
||||
}
|
||||
}
|
||||
|
||||
public string Username { get; set; }
|
||||
public TLAbsUser Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Username = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(Username, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLAbsUser)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Account/TLTmpPassword.cs
Normal file
45
src/TeleSharp.TL/TL/Account/TLTmpPassword.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Account
|
||||
{
|
||||
[TLObject(-614138572)]
|
||||
public class TLTmpPassword : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -614138572;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] TmpPassword { get; set; }
|
||||
public int ValidUntil { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
TmpPassword = BytesUtil.Deserialize(br);
|
||||
ValidUntil = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
BytesUtil.Serialize(TmpPassword, bw);
|
||||
bw.Write(ValidUntil);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
13
src/TeleSharp.TL/TL/Auth/TLAbsCodeType.cs
Normal file
13
src/TeleSharp.TL/TL/Auth/TLAbsCodeType.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
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.Auth
|
||||
{
|
||||
public abstract class TLAbsCodeType : TLObject
|
||||
{
|
||||
}
|
||||
}
|
||||
13
src/TeleSharp.TL/TL/Auth/TLAbsSentCodeType.cs
Normal file
13
src/TeleSharp.TL/TL/Auth/TLAbsSentCodeType.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
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.Auth
|
||||
{
|
||||
public abstract class TLAbsSentCodeType : TLObject
|
||||
{
|
||||
}
|
||||
}
|
||||
56
src/TeleSharp.TL/TL/Auth/TLAuthorization.cs
Normal file
56
src/TeleSharp.TL/TL/Auth/TLAuthorization.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-855308010)]
|
||||
public class TLAuthorization : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -855308010;
|
||||
}
|
||||
}
|
||||
|
||||
public int Flags { get; set; }
|
||||
public int? TmpSessions { get; set; }
|
||||
public TLAbsUser User { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
Flags = 0;
|
||||
Flags = TmpSessions != null ? (Flags | 1) : (Flags & ~1);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Flags = br.ReadInt32();
|
||||
if ((Flags & 1) != 0)
|
||||
TmpSessions = br.ReadInt32();
|
||||
else
|
||||
TmpSessions = null;
|
||||
|
||||
User = (TLAbsUser)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(Flags);
|
||||
if ((Flags & 1) != 0)
|
||||
bw.Write(TmpSessions.Value);
|
||||
ObjectUtils.SerializeObject(User, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
42
src/TeleSharp.TL/TL/Auth/TLCheckedPhone.cs
Normal file
42
src/TeleSharp.TL/TL/Auth/TLCheckedPhone.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-2128698738)]
|
||||
public class TLCheckedPhone : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -2128698738;
|
||||
}
|
||||
}
|
||||
|
||||
public bool PhoneRegistered { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PhoneRegistered = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
BoolUtil.Serialize(PhoneRegistered, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
39
src/TeleSharp.TL/TL/Auth/TLCodeTypeCall.cs
Normal file
39
src/TeleSharp.TL/TL/Auth/TLCodeTypeCall.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(1948046307)]
|
||||
public class TLCodeTypeCall : TLAbsCodeType
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1948046307;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
39
src/TeleSharp.TL/TL/Auth/TLCodeTypeFlashCall.cs
Normal file
39
src/TeleSharp.TL/TL/Auth/TLCodeTypeFlashCall.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(577556219)]
|
||||
public class TLCodeTypeFlashCall : TLAbsCodeType
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 577556219;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
39
src/TeleSharp.TL/TL/Auth/TLCodeTypeSms.cs
Normal file
39
src/TeleSharp.TL/TL/Auth/TLCodeTypeSms.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(1923290508)]
|
||||
public class TLCodeTypeSms : TLAbsCodeType
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1923290508;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Auth/TLExportedAuthorization.cs
Normal file
45
src/TeleSharp.TL/TL/Auth/TLExportedAuthorization.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-543777747)]
|
||||
public class TLExportedAuthorization : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -543777747;
|
||||
}
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public byte[] Bytes { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Id = br.ReadInt32();
|
||||
Bytes = BytesUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(Id);
|
||||
BytesUtil.Serialize(Bytes, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
42
src/TeleSharp.TL/TL/Auth/TLPasswordRecovery.cs
Normal file
42
src/TeleSharp.TL/TL/Auth/TLPasswordRecovery.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(326715557)]
|
||||
public class TLPasswordRecovery : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 326715557;
|
||||
}
|
||||
}
|
||||
|
||||
public string EmailPattern { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
EmailPattern = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(EmailPattern, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
57
src/TeleSharp.TL/TL/Auth/TLRequestBindTempAuthKey.cs
Normal file
57
src/TeleSharp.TL/TL/Auth/TLRequestBindTempAuthKey.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-841733627)]
|
||||
public class TLRequestBindTempAuthKey : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -841733627;
|
||||
}
|
||||
}
|
||||
|
||||
public long PermAuthKeyId { get; set; }
|
||||
public long Nonce { get; set; }
|
||||
public int ExpiresAt { get; set; }
|
||||
public byte[] EncryptedMessage { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PermAuthKeyId = br.ReadInt64();
|
||||
Nonce = br.ReadInt64();
|
||||
ExpiresAt = br.ReadInt32();
|
||||
EncryptedMessage = BytesUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(PermAuthKeyId);
|
||||
bw.Write(Nonce);
|
||||
bw.Write(ExpiresAt);
|
||||
BytesUtil.Serialize(EncryptedMessage, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Auth/TLRequestCancelCode.cs
Normal file
51
src/TeleSharp.TL/TL/Auth/TLRequestCancelCode.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(520357240)]
|
||||
public class TLRequestCancelCode : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 520357240;
|
||||
}
|
||||
}
|
||||
|
||||
public string PhoneNumber { get; set; }
|
||||
public string PhoneCodeHash { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PhoneNumber = StringUtil.Deserialize(br);
|
||||
PhoneCodeHash = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(PhoneNumber, bw);
|
||||
StringUtil.Serialize(PhoneCodeHash, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Auth/TLRequestCheckPassword.cs
Normal file
48
src/TeleSharp.TL/TL/Auth/TLRequestCheckPassword.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(174260510)]
|
||||
public class TLRequestCheckPassword : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 174260510;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] PasswordHash { get; set; }
|
||||
public Auth.TLAuthorization Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PasswordHash = BytesUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
BytesUtil.Serialize(PasswordHash, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Auth/TLRequestCheckPhone.cs
Normal file
48
src/TeleSharp.TL/TL/Auth/TLRequestCheckPhone.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(1877286395)]
|
||||
public class TLRequestCheckPhone : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1877286395;
|
||||
}
|
||||
}
|
||||
|
||||
public string PhoneNumber { get; set; }
|
||||
public Auth.TLCheckedPhone Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PhoneNumber = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(PhoneNumber, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLCheckedPhone)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Auth/TLRequestDropTempAuthKeys.cs
Normal file
48
src/TeleSharp.TL/TL/Auth/TLRequestDropTempAuthKeys.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-1907842680)]
|
||||
public class TLRequestDropTempAuthKeys : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1907842680;
|
||||
}
|
||||
}
|
||||
|
||||
public TLVector<long> ExceptAuthKeys { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
ExceptAuthKeys = (TLVector<long>)ObjectUtils.DeserializeVector<long>(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(ExceptAuthKeys, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Auth/TLRequestExportAuthorization.cs
Normal file
48
src/TeleSharp.TL/TL/Auth/TLRequestExportAuthorization.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-440401971)]
|
||||
public class TLRequestExportAuthorization : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -440401971;
|
||||
}
|
||||
}
|
||||
|
||||
public int DcId { get; set; }
|
||||
public Auth.TLExportedAuthorization Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
DcId = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(DcId);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLExportedAuthorization)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Auth/TLRequestImportAuthorization.cs
Normal file
51
src/TeleSharp.TL/TL/Auth/TLRequestImportAuthorization.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-470837741)]
|
||||
public class TLRequestImportAuthorization : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -470837741;
|
||||
}
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public byte[] Bytes { get; set; }
|
||||
public Auth.TLAuthorization Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Id = br.ReadInt32();
|
||||
Bytes = BytesUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(Id);
|
||||
BytesUtil.Serialize(Bytes, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
59
src/TeleSharp.TL/TL/Auth/TLRequestImportBotAuthorization.cs
Normal file
59
src/TeleSharp.TL/TL/Auth/TLRequestImportBotAuthorization.cs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(1738800940)]
|
||||
public class TLRequestImportBotAuthorization : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1738800940;
|
||||
}
|
||||
}
|
||||
|
||||
public int Flags { get; set; }
|
||||
public int ApiId { get; set; }
|
||||
public string ApiHash { get; set; }
|
||||
public string BotAuthToken { get; set; }
|
||||
public Auth.TLAuthorization Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
Flags = 0;
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Flags = br.ReadInt32();
|
||||
ApiId = br.ReadInt32();
|
||||
ApiHash = StringUtil.Deserialize(br);
|
||||
BotAuthToken = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(Flags);
|
||||
bw.Write(ApiId);
|
||||
StringUtil.Serialize(ApiHash, bw);
|
||||
StringUtil.Serialize(BotAuthToken, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Auth/TLRequestLogOut.cs
Normal file
45
src/TeleSharp.TL/TL/Auth/TLRequestLogOut.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(1461180992)]
|
||||
public class TLRequestLogOut : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1461180992;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Auth/TLRequestRecoverPassword.cs
Normal file
48
src/TeleSharp.TL/TL/Auth/TLRequestRecoverPassword.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(1319464594)]
|
||||
public class TLRequestRecoverPassword : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1319464594;
|
||||
}
|
||||
}
|
||||
|
||||
public string Code { get; set; }
|
||||
public Auth.TLAuthorization Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Code = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(Code, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Auth/TLRequestRequestPasswordRecovery.cs
Normal file
45
src/TeleSharp.TL/TL/Auth/TLRequestRequestPasswordRecovery.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-661144474)]
|
||||
public class TLRequestRequestPasswordRecovery : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -661144474;
|
||||
}
|
||||
}
|
||||
|
||||
public Auth.TLPasswordRecovery Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLPasswordRecovery)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Auth/TLRequestResendCode.cs
Normal file
51
src/TeleSharp.TL/TL/Auth/TLRequestResendCode.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(1056025023)]
|
||||
public class TLRequestResendCode : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1056025023;
|
||||
}
|
||||
}
|
||||
|
||||
public string PhoneNumber { get; set; }
|
||||
public string PhoneCodeHash { get; set; }
|
||||
public Auth.TLSentCode Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PhoneNumber = StringUtil.Deserialize(br);
|
||||
PhoneCodeHash = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(PhoneNumber, bw);
|
||||
StringUtil.Serialize(PhoneCodeHash, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLSentCode)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Auth/TLRequestResetAuthorizations.cs
Normal file
45
src/TeleSharp.TL/TL/Auth/TLRequestResetAuthorizations.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-1616179942)]
|
||||
public class TLRequestResetAuthorizations : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1616179942;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
72
src/TeleSharp.TL/TL/Auth/TLRequestSendCode.cs
Normal file
72
src/TeleSharp.TL/TL/Auth/TLRequestSendCode.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-2035355412)]
|
||||
public class TLRequestSendCode : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -2035355412;
|
||||
}
|
||||
}
|
||||
|
||||
public int Flags { get; set; }
|
||||
public bool AllowFlashcall { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public bool? CurrentNumber { get; set; }
|
||||
public int ApiId { get; set; }
|
||||
public string ApiHash { get; set; }
|
||||
public Auth.TLSentCode Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
Flags = 0;
|
||||
Flags = AllowFlashcall ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = CurrentNumber != null ? (Flags | 1) : (Flags & ~1);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Flags = br.ReadInt32();
|
||||
AllowFlashcall = (Flags & 1) != 0;
|
||||
PhoneNumber = StringUtil.Deserialize(br);
|
||||
if ((Flags & 1) != 0)
|
||||
CurrentNumber = BoolUtil.Deserialize(br);
|
||||
else
|
||||
CurrentNumber = null;
|
||||
|
||||
ApiId = br.ReadInt32();
|
||||
ApiHash = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(Flags);
|
||||
|
||||
StringUtil.Serialize(PhoneNumber, bw);
|
||||
if ((Flags & 1) != 0)
|
||||
BoolUtil.Serialize(CurrentNumber.Value, bw);
|
||||
bw.Write(ApiId);
|
||||
StringUtil.Serialize(ApiHash, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLSentCode)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Auth/TLRequestSendInvites.cs
Normal file
51
src/TeleSharp.TL/TL/Auth/TLRequestSendInvites.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(1998331287)]
|
||||
public class TLRequestSendInvites : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1998331287;
|
||||
}
|
||||
}
|
||||
|
||||
public TLVector<string> PhoneNumbers { get; set; }
|
||||
public string Message { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PhoneNumbers = (TLVector<string>)ObjectUtils.DeserializeVector<string>(br);
|
||||
Message = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(PhoneNumbers, bw);
|
||||
StringUtil.Serialize(Message, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
54
src/TeleSharp.TL/TL/Auth/TLRequestSignIn.cs
Normal file
54
src/TeleSharp.TL/TL/Auth/TLRequestSignIn.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-1126886015)]
|
||||
public class TLRequestSignIn : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1126886015;
|
||||
}
|
||||
}
|
||||
|
||||
public string PhoneNumber { get; set; }
|
||||
public string PhoneCodeHash { get; set; }
|
||||
public string PhoneCode { get; set; }
|
||||
public Auth.TLAuthorization Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PhoneNumber = StringUtil.Deserialize(br);
|
||||
PhoneCodeHash = StringUtil.Deserialize(br);
|
||||
PhoneCode = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(PhoneNumber, bw);
|
||||
StringUtil.Serialize(PhoneCodeHash, bw);
|
||||
StringUtil.Serialize(PhoneCode, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
60
src/TeleSharp.TL/TL/Auth/TLRequestSignUp.cs
Normal file
60
src/TeleSharp.TL/TL/Auth/TLRequestSignUp.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(453408308)]
|
||||
public class TLRequestSignUp : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 453408308;
|
||||
}
|
||||
}
|
||||
|
||||
public string PhoneNumber { get; set; }
|
||||
public string PhoneCodeHash { get; set; }
|
||||
public string PhoneCode { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public Auth.TLAuthorization Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
PhoneNumber = StringUtil.Deserialize(br);
|
||||
PhoneCodeHash = StringUtil.Deserialize(br);
|
||||
PhoneCode = StringUtil.Deserialize(br);
|
||||
FirstName = StringUtil.Deserialize(br);
|
||||
LastName = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(PhoneNumber, bw);
|
||||
StringUtil.Serialize(PhoneCodeHash, bw);
|
||||
StringUtil.Serialize(PhoneCode, bw);
|
||||
StringUtil.Serialize(FirstName, bw);
|
||||
StringUtil.Serialize(LastName, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
72
src/TeleSharp.TL/TL/Auth/TLSentCode.cs
Normal file
72
src/TeleSharp.TL/TL/Auth/TLSentCode.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(1577067778)]
|
||||
public class TLSentCode : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1577067778;
|
||||
}
|
||||
}
|
||||
|
||||
public int Flags { get; set; }
|
||||
public bool PhoneRegistered { get; set; }
|
||||
public Auth.TLAbsSentCodeType Type { get; set; }
|
||||
public string PhoneCodeHash { get; set; }
|
||||
public Auth.TLAbsCodeType NextType { get; set; }
|
||||
public int? Timeout { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
Flags = 0;
|
||||
Flags = PhoneRegistered ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = NextType != null ? (Flags | 2) : (Flags & ~2);
|
||||
Flags = Timeout != null ? (Flags | 4) : (Flags & ~4);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Flags = br.ReadInt32();
|
||||
PhoneRegistered = (Flags & 1) != 0;
|
||||
Type = (Auth.TLAbsSentCodeType)ObjectUtils.DeserializeObject(br);
|
||||
PhoneCodeHash = StringUtil.Deserialize(br);
|
||||
if ((Flags & 2) != 0)
|
||||
NextType = (Auth.TLAbsCodeType)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
NextType = null;
|
||||
|
||||
if ((Flags & 4) != 0)
|
||||
Timeout = br.ReadInt32();
|
||||
else
|
||||
Timeout = null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(Flags);
|
||||
|
||||
ObjectUtils.SerializeObject(Type, bw);
|
||||
StringUtil.Serialize(PhoneCodeHash, bw);
|
||||
if ((Flags & 2) != 0)
|
||||
ObjectUtils.SerializeObject(NextType, bw);
|
||||
if ((Flags & 4) != 0)
|
||||
bw.Write(Timeout.Value);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
42
src/TeleSharp.TL/TL/Auth/TLSentCodeTypeApp.cs
Normal file
42
src/TeleSharp.TL/TL/Auth/TLSentCodeTypeApp.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(1035688326)]
|
||||
public class TLSentCodeTypeApp : TLAbsSentCodeType
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1035688326;
|
||||
}
|
||||
}
|
||||
|
||||
public int Length { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Length = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(Length);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
42
src/TeleSharp.TL/TL/Auth/TLSentCodeTypeCall.cs
Normal file
42
src/TeleSharp.TL/TL/Auth/TLSentCodeTypeCall.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(1398007207)]
|
||||
public class TLSentCodeTypeCall : TLAbsSentCodeType
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1398007207;
|
||||
}
|
||||
}
|
||||
|
||||
public int Length { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Length = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(Length);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
42
src/TeleSharp.TL/TL/Auth/TLSentCodeTypeFlashCall.cs
Normal file
42
src/TeleSharp.TL/TL/Auth/TLSentCodeTypeFlashCall.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-1425815847)]
|
||||
public class TLSentCodeTypeFlashCall : TLAbsSentCodeType
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1425815847;
|
||||
}
|
||||
}
|
||||
|
||||
public string Pattern { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Pattern = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(Pattern, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
42
src/TeleSharp.TL/TL/Auth/TLSentCodeTypeSms.cs
Normal file
42
src/TeleSharp.TL/TL/Auth/TLSentCodeTypeSms.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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.Auth
|
||||
{
|
||||
[TLObject(-1073693790)]
|
||||
public class TLSentCodeTypeSms : TLAbsSentCodeType
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1073693790;
|
||||
}
|
||||
}
|
||||
|
||||
public int Length { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Length = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(Length);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Bots/TLRequestAnswerWebhookJSONQuery.cs
Normal file
51
src/TeleSharp.TL/TL/Bots/TLRequestAnswerWebhookJSONQuery.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Bots
|
||||
{
|
||||
[TLObject(-434028723)]
|
||||
public class TLRequestAnswerWebhookJSONQuery : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -434028723;
|
||||
}
|
||||
}
|
||||
|
||||
public long QueryId { get; set; }
|
||||
public TLDataJSON Data { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
QueryId = br.ReadInt64();
|
||||
Data = (TLDataJSON)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(QueryId);
|
||||
ObjectUtils.SerializeObject(Data, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Bots/TLRequestSendCustomRequest.cs
Normal file
51
src/TeleSharp.TL/TL/Bots/TLRequestSendCustomRequest.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Bots
|
||||
{
|
||||
[TLObject(-1440257555)]
|
||||
public class TLRequestSendCustomRequest : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1440257555;
|
||||
}
|
||||
}
|
||||
|
||||
public string CustomMethod { get; set; }
|
||||
public TLDataJSON Params { get; set; }
|
||||
public TLDataJSON Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
CustomMethod = StringUtil.Deserialize(br);
|
||||
Params = (TLDataJSON)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(CustomMethod, bw);
|
||||
ObjectUtils.SerializeObject(Params, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLDataJSON)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/TeleSharp.TL/TL/Channels/TLChannelParticipant.cs
Normal file
45
src/TeleSharp.TL/TL/Channels/TLChannelParticipant.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-791039645)]
|
||||
public class TLChannelParticipant : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -791039645;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsChannelParticipant Participant { get; set; }
|
||||
public TLVector<TLAbsUser> Users { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Participant = (TLAbsChannelParticipant)ObjectUtils.DeserializeObject(br);
|
||||
Users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Participant, bw);
|
||||
ObjectUtils.SerializeObject(Users, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Channels/TLChannelParticipants.cs
Normal file
48
src/TeleSharp.TL/TL/Channels/TLChannelParticipants.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-177282392)]
|
||||
public class TLChannelParticipants : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -177282392;
|
||||
}
|
||||
}
|
||||
|
||||
public int Count { get; set; }
|
||||
public TLVector<TLAbsChannelParticipant> Participants { get; set; }
|
||||
public TLVector<TLAbsUser> Users { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Count = br.ReadInt32();
|
||||
Participants = (TLVector<TLAbsChannelParticipant>)ObjectUtils.DeserializeVector<TLAbsChannelParticipant>(br);
|
||||
Users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(Count);
|
||||
ObjectUtils.SerializeObject(Participants, bw);
|
||||
ObjectUtils.SerializeObject(Users, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Channels/TLRequestCheckUsername.cs
Normal file
51
src/TeleSharp.TL/TL/Channels/TLRequestCheckUsername.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(283557164)]
|
||||
public class TLRequestCheckUsername : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 283557164;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public string Username { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
Username = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
StringUtil.Serialize(Username, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
64
src/TeleSharp.TL/TL/Channels/TLRequestCreateChannel.cs
Normal file
64
src/TeleSharp.TL/TL/Channels/TLRequestCreateChannel.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-192332417)]
|
||||
public class TLRequestCreateChannel : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -192332417;
|
||||
}
|
||||
}
|
||||
|
||||
public int Flags { get; set; }
|
||||
public bool Broadcast { get; set; }
|
||||
public bool Megagroup { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string About { get; set; }
|
||||
public TLAbsUpdates Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
Flags = 0;
|
||||
Flags = Broadcast ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = Megagroup ? (Flags | 2) : (Flags & ~2);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Flags = br.ReadInt32();
|
||||
Broadcast = (Flags & 1) != 0;
|
||||
Megagroup = (Flags & 2) != 0;
|
||||
Title = StringUtil.Deserialize(br);
|
||||
About = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(Flags);
|
||||
|
||||
|
||||
StringUtil.Serialize(Title, bw);
|
||||
StringUtil.Serialize(About, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Channels/TLRequestDeleteChannel.cs
Normal file
48
src/TeleSharp.TL/TL/Channels/TLRequestDeleteChannel.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-1072619549)]
|
||||
public class TLRequestDeleteChannel : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1072619549;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public TLAbsUpdates Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Channels/TLRequestDeleteMessages.cs
Normal file
51
src/TeleSharp.TL/TL/Channels/TLRequestDeleteMessages.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-2067661490)]
|
||||
public class TLRequestDeleteMessages : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -2067661490;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public TLVector<int> Id { get; set; }
|
||||
public Messages.TLAffectedMessages Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
Id = (TLVector<int>)ObjectUtils.DeserializeVector<int>(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
ObjectUtils.SerializeObject(Id, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Messages.TLAffectedMessages)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Channels/TLRequestDeleteUserHistory.cs
Normal file
51
src/TeleSharp.TL/TL/Channels/TLRequestDeleteUserHistory.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-787622117)]
|
||||
public class TLRequestDeleteUserHistory : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -787622117;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public TLAbsInputUser UserId { get; set; }
|
||||
public Messages.TLAffectedHistory Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
UserId = (TLAbsInputUser)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
ObjectUtils.SerializeObject(UserId, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Messages.TLAffectedHistory)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Channels/TLRequestEditAbout.cs
Normal file
51
src/TeleSharp.TL/TL/Channels/TLRequestEditAbout.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(333610782)]
|
||||
public class TLRequestEditAbout : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 333610782;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public string About { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
About = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
StringUtil.Serialize(About, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
54
src/TeleSharp.TL/TL/Channels/TLRequestEditAdmin.cs
Normal file
54
src/TeleSharp.TL/TL/Channels/TLRequestEditAdmin.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-344583728)]
|
||||
public class TLRequestEditAdmin : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -344583728;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public TLAbsInputUser UserId { get; set; }
|
||||
public TLAbsChannelParticipantRole Role { get; set; }
|
||||
public TLAbsUpdates Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
UserId = (TLAbsInputUser)ObjectUtils.DeserializeObject(br);
|
||||
Role = (TLAbsChannelParticipantRole)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
ObjectUtils.SerializeObject(UserId, bw);
|
||||
ObjectUtils.SerializeObject(Role, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Channels/TLRequestEditPhoto.cs
Normal file
51
src/TeleSharp.TL/TL/Channels/TLRequestEditPhoto.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-248621111)]
|
||||
public class TLRequestEditPhoto : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -248621111;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public TLAbsInputChatPhoto Photo { get; set; }
|
||||
public TLAbsUpdates Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
Photo = (TLAbsInputChatPhoto)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
ObjectUtils.SerializeObject(Photo, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Channels/TLRequestEditTitle.cs
Normal file
51
src/TeleSharp.TL/TL/Channels/TLRequestEditTitle.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(1450044624)]
|
||||
public class TLRequestEditTitle : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1450044624;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public string Title { get; set; }
|
||||
public TLAbsUpdates Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
Title = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
StringUtil.Serialize(Title, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Channels/TLRequestExportInvite.cs
Normal file
48
src/TeleSharp.TL/TL/Channels/TLRequestExportInvite.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-950663035)]
|
||||
public class TLRequestExportInvite : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -950663035;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public TLAbsExportedChatInvite Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLAbsExportedChatInvite)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Channels/TLRequestExportMessageLink.cs
Normal file
51
src/TeleSharp.TL/TL/Channels/TLRequestExportMessageLink.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-934882771)]
|
||||
public class TLRequestExportMessageLink : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -934882771;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public int Id { get; set; }
|
||||
public TLExportedMessageLink Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
Id = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
bw.Write(Id);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (TLExportedMessageLink)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-1920105769)]
|
||||
public class TLRequestGetAdminedPublicChannels : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1920105769;
|
||||
}
|
||||
}
|
||||
|
||||
public Messages.TLAbsChats Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Messages.TLAbsChats)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Channels/TLRequestGetChannels.cs
Normal file
48
src/TeleSharp.TL/TL/Channels/TLRequestGetChannels.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(176122811)]
|
||||
public class TLRequestGetChannels : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 176122811;
|
||||
}
|
||||
}
|
||||
|
||||
public TLVector<TLAbsInputChannel> Id { get; set; }
|
||||
public Messages.TLAbsChats Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Id = (TLVector<TLAbsInputChannel>)ObjectUtils.DeserializeVector<TLAbsInputChannel>(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Id, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Messages.TLAbsChats)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/TeleSharp.TL/TL/Channels/TLRequestGetFullChannel.cs
Normal file
48
src/TeleSharp.TL/TL/Channels/TLRequestGetFullChannel.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(141781513)]
|
||||
public class TLRequestGetFullChannel : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 141781513;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public Messages.TLChatFull Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Messages.TLChatFull)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Channels/TLRequestGetMessages.cs
Normal file
51
src/TeleSharp.TL/TL/Channels/TLRequestGetMessages.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(-1814580409)]
|
||||
public class TLRequestGetMessages : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1814580409;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public TLVector<int> Id { get; set; }
|
||||
public Messages.TLAbsMessages Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
Id = (TLVector<int>)ObjectUtils.DeserializeVector<int>(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
ObjectUtils.SerializeObject(Id, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Messages.TLAbsMessages)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
src/TeleSharp.TL/TL/Channels/TLRequestGetParticipant.cs
Normal file
51
src/TeleSharp.TL/TL/Channels/TLRequestGetParticipant.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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.Channels
|
||||
{
|
||||
[TLObject(1416484774)]
|
||||
public class TLRequestGetParticipant : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1416484774;
|
||||
}
|
||||
}
|
||||
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public TLAbsInputUser UserId { get; set; }
|
||||
public Channels.TLChannelParticipant Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
UserId = (TLAbsInputUser)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
ObjectUtils.SerializeObject(UserId, bw);
|
||||
|
||||
}
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Channels.TLChannelParticipant)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue