From f083fb9b30d4f415580fe12562a91093b235b227 Mon Sep 17 00:00:00 2001 From: Afshin Arani Date: Thu, 22 Sep 2016 16:42:27 +0330 Subject: [PATCH 1/4] Remove Test Project --- TLSharp.Tests/Properties/AssemblyInfo.cs | 36 -- TLSharp.Tests/TLSharp.Tests.csproj | 94 ----- TLSharp.Tests/TLSharpTests.cs | 423 ----------------------- TLSharp.Tests/app.config | 11 - TLSharp.Tests/data/cat.jpg | Bin 20780 -> 0 bytes TLSharp.Tests/packages.config | 3 - TLSharp.sln | 8 +- 7 files changed, 1 insertion(+), 574 deletions(-) delete mode 100644 TLSharp.Tests/Properties/AssemblyInfo.cs delete mode 100644 TLSharp.Tests/TLSharp.Tests.csproj delete mode 100644 TLSharp.Tests/TLSharpTests.cs delete mode 100644 TLSharp.Tests/app.config delete mode 100644 TLSharp.Tests/data/cat.jpg delete mode 100644 TLSharp.Tests/packages.config diff --git a/TLSharp.Tests/Properties/AssemblyInfo.cs b/TLSharp.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index 706d0a4..0000000 --- a/TLSharp.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -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("TLSharp.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("TLSharp.Tests")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[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("de5c0467-ee99-4734-95f2-eff7a0b99924")] - -// 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")] diff --git a/TLSharp.Tests/TLSharp.Tests.csproj b/TLSharp.Tests/TLSharp.Tests.csproj deleted file mode 100644 index a2463ad..0000000 --- a/TLSharp.Tests/TLSharp.Tests.csproj +++ /dev/null @@ -1,94 +0,0 @@ - - - - Debug - AnyCPU - {DE5C0467-EE99-4734-95F2-EFF7A0B99924} - Library - Properties - TLSharp.Tests - TLSharp.Tests - v4.5.2 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - {400d2544-1cc6-4d8a-a62c-2292d9947a16} - TLSharp.Core - - - - - - - False - - - False - - - False - - - False - - - - - - - - \ No newline at end of file diff --git a/TLSharp.Tests/TLSharpTests.cs b/TLSharp.Tests/TLSharpTests.cs deleted file mode 100644 index d5ed580..0000000 --- a/TLSharp.Tests/TLSharpTests.cs +++ /dev/null @@ -1,423 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using TLSharp.Core; -using TLSharp.Core.Auth; -using TLSharp.Core.MTProto; -using TLSharp.Core.Network; - -namespace TLSharp.Tests -{ - [TestClass] - public class TLSharpTests - { - private string NumberToSendMessage { get; set; } - - private string NumberToAuthenticate { get; set; } - - private string NotRegisteredNumberToSignUp { get; set; } - - private string UserNameToSendMessage { get; set; } - - private string NumberToGetUserFull { get; set; } - - private string NumberToAddToChat { get; set; } - - private string apiHash = ""; - - private int apiId = 0; - - [TestInitialize] - public void Init() - { - // Setup your phone numbers in app.config - NumberToAuthenticate = ConfigurationManager.AppSettings[nameof(NumberToAuthenticate)]; - if (string.IsNullOrEmpty(NumberToAuthenticate)) - Debug.WriteLine("NumberToAuthenticate not configured in app.config! Some tests may fail."); - - NotRegisteredNumberToSignUp = ConfigurationManager.AppSettings[nameof(NotRegisteredNumberToSignUp)]; - if (string.IsNullOrEmpty(NotRegisteredNumberToSignUp)) - Debug.WriteLine("NotRegisteredNumberToSignUp not configured in app.config! Some tests may fail."); - - NumberToSendMessage = ConfigurationManager.AppSettings[nameof(NumberToSendMessage)]; - if (string.IsNullOrEmpty(NumberToSendMessage)) - Debug.WriteLine("NumberToSendMessage not configured in app.config! Some tests may fail."); - - UserNameToSendMessage = ConfigurationManager.AppSettings[nameof(UserNameToSendMessage)]; - if (string.IsNullOrEmpty(UserNameToSendMessage)) - Debug.WriteLine("UserNameToSendMessage not configured in app.config! Some tests may fail."); - - NumberToGetUserFull = ConfigurationManager.AppSettings[nameof(NumberToGetUserFull)]; - if (string.IsNullOrEmpty(NumberToGetUserFull)) - Debug.WriteLine("NumberToGetUserFull not configured in app.config! Some tests may fail."); - - NumberToAddToChat = ConfigurationManager.AppSettings[nameof(NumberToAddToChat)]; - if (string.IsNullOrEmpty(NumberToAddToChat)) - Debug.WriteLine("NumberToAddToChat not configured in app.config! Some tests may fail."); - } - - [TestMethod] - public async Task AuthUser() - { - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - - await client.Connect(); - - var hash = await client.SendCodeRequest(NumberToAuthenticate); - var code = "93463"; // you can change code in debugger - - var user = await client.MakeAuth(NumberToAuthenticate, hash, code); - - Assert.IsNotNull(user); - Assert.IsTrue(client.IsUserAuthorized()); - } - - [TestMethod] - public async Task SignUpNewUser() - { - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - await client.Connect(); - - var hash = await client.SendCodeRequest(NotRegisteredNumberToSignUp); - var code = ""; - - var registeredUser = await client.SignUp(NotRegisteredNumberToSignUp, hash, code, "TLSharp", "User"); - Assert.IsNotNull(registeredUser); - Assert.IsTrue(client.IsUserAuthorized()); - - var loggedInUser = await client.MakeAuth(NotRegisteredNumberToSignUp, hash, code); - Assert.IsNotNull(loggedInUser); - } - - [TestMethod] - public async Task CheckPhones() - { - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - await client.Connect(); - - var result = await client.IsPhoneRegistered(NumberToAuthenticate); - Assert.IsTrue(result); - } - - [TestMethod] - public async Task ImportContactByPhoneNumber() - { - // User should be already authenticated! - - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - - await client.Connect(); - - Assert.IsTrue(client.IsUserAuthorized()); - - var res = await client.ImportContactByPhoneNumber(NumberToSendMessage); - - Assert.IsNotNull(res); - } - - [TestMethod] - public async Task ImportByUserName() - { - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - - await client.Connect(); - - Assert.IsTrue(client.IsUserAuthorized()); - - var res = await client.ImportByUserName(UserNameToSendMessage); - - Assert.IsNotNull(res); - } - - [TestMethod] - public async Task ImportByUserNameAndSendMessage() - { - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - - await client.Connect(); - - Assert.IsTrue(client.IsUserAuthorized()); - - var res = await client.ImportByUserName(UserNameToSendMessage); - - Assert.IsNotNull(res); - - await client.SendMessage(res.Value, "Test message from TelegramClient"); - } - - [TestMethod] - public async Task ImportContactByPhoneNumberAndSendMessage() - { - // User should be already authenticated! - - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - await client.Connect(); - - Assert.IsTrue(client.IsUserAuthorized()); - - var res = await client.ImportContactByPhoneNumber(NumberToSendMessage); - - Assert.IsNotNull(res); - - await client.SendMessage(res.Value, "Test message from TelegramClient"); - } - - [TestMethod] - public async Task GetHistory() - { - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - await client.Connect(); - - Assert.IsTrue(client.IsUserAuthorized()); - - var res = await client.ImportContactByPhoneNumber(NumberToSendMessage); - - Assert.IsNotNull(res); - - var hist = await client.GetMessagesHistoryForContact(res.Value, 0, 5); - - Assert.IsNotNull(hist); - } - - [TestMethod] - public async Task UploadAndSendMedia() - { - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - await client.Connect(); - - Assert.IsTrue(client.IsUserAuthorized()); - - var res = await client.ImportContactByPhoneNumber(NumberToSendMessage); - - Assert.IsNotNull(res); - - var file = File.ReadAllBytes("../../data/cat.jpg"); - - var mediaFile = await client.UploadFile("test_file.jpg", file); - - Assert.IsNotNull(mediaFile); - - var state = await client.SendMediaMessage(res.Value, mediaFile); - - Assert.IsTrue(state); - } - - [TestMethod] - public async Task GetFile() - { - // Get uploaded file from last message (ie: cat.jpg) - - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - await client.Connect(); - Assert.IsTrue(client.IsUserAuthorized()); - - var res = await client.ImportContactByPhoneNumber(NumberToSendMessage); - Assert.IsNotNull(res); - - // Get last message - var hist = await client.GetMessagesHistoryForContact(res.Value, 0, 1); - Assert.AreEqual(1, hist.Count); - - var message = (MessageConstructor) hist[0]; - Assert.AreEqual(typeof (MessageMediaPhotoConstructor), message.media.GetType()); - - var media = (MessageMediaPhotoConstructor) message.media; - Assert.AreEqual(typeof (PhotoConstructor), media.photo.GetType()); - - var photo = (PhotoConstructor) media.photo; - Assert.AreEqual(3, photo.sizes.Count); - Assert.AreEqual(typeof (PhotoSizeConstructor), photo.sizes[2].GetType()); - - var photoSize = (PhotoSizeConstructor) photo.sizes[2]; - Assert.AreEqual(typeof (FileLocationConstructor), photoSize.location.GetType()); - - var fileLocation = (FileLocationConstructor) photoSize.location; - var file = await client.GetFile(fileLocation.volume_id, fileLocation.local_id, fileLocation.secret, 0, photoSize.size + 1024); - storage_FileType type = file.Item1; - byte[] bytes = file.Item2; - - string name = "../../data/get_file."; - if (type.GetType() == typeof (Storage_fileJpegConstructor)) - name += "jpg"; - else if (type.GetType() == typeof (Storage_fileGifConstructor)) - name += "gif"; - else if (type.GetType() == typeof (Storage_filePngConstructor)) - name += "png"; - - using (var fileStream = new FileStream(name, FileMode.Create, FileAccess.Write)) - { - fileStream.Write(bytes, 4, photoSize.size); // The first 4 bytes seem to be the error code - } - } - - [TestMethod] - public async Task TestConnection() - { - var store = new FakeSessionStore(); - var client = new TelegramClient(store, "", apiId, apiHash); - - Assert.IsTrue(await client.Connect()); - } - - [TestMethod] - public async Task AuthenticationWorks() - { - using (var transport = new TcpTransport("91.108.56.165", 443)) - { - var authKey = await Authenticator.DoAuthentication(transport); - - Assert.IsNotNull(authKey.AuthKey.Data); - } - } - - [TestMethod] - public async Task GetUserFullRequest() - { - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - await client.Connect(); - - Assert.IsTrue(client.IsUserAuthorized()); - - var res = await client.ImportContactByPhoneNumber(NumberToGetUserFull); - - Assert.IsNotNull(res); - - var userFull = await client.GetUserFull(res.Value); - - Assert.IsNotNull(userFull); - } - - [TestMethod] - public async Task CreateChatRequest() - { - var client = await InitializeClient(); - - var chatName = Guid.NewGuid().ToString(); - var statedMessage = await client.CreateChat(chatName, new List {NumberToSendMessage}); - - var createdChat = GetChatFromStatedMessage(statedMessage); - - Assert.AreEqual(chatName, createdChat.title); - Assert.AreEqual(2, createdChat.participants_count); - } - - [TestMethod] - public async Task AddChatUserRequest() - { - var client = await InitializeClient(); - - var chatName = Guid.NewGuid().ToString(); - var statedMessageAfterCreation = await client.CreateChat(chatName, new List { NumberToSendMessage }); - - var createdChat = GetChatFromStatedMessage(statedMessageAfterCreation); - - var addUserId = await client.ImportContactByPhoneNumber(NumberToAddToChat); - - var statedMessageAfterAddUser = await client.AddChatUser(createdChat.id, addUserId.Value); - var modifiedChat = GetChatFromStatedMessage(statedMessageAfterAddUser); - - Assert.AreEqual(createdChat.id, modifiedChat.id); - Assert.AreEqual(3, modifiedChat.participants_count); - } - - [TestMethod] - public async Task LeaveChatRequest() - { - var client = await InitializeClient(); - - var chatName = Guid.NewGuid().ToString(); - var statedMessageAfterCreation = await client.CreateChat(chatName, new List { NumberToSendMessage }); - - var createdChat = GetChatFromStatedMessage(statedMessageAfterCreation); - - var statedMessageAfterLeave = await client.LeaveChat(createdChat.id); - var modifiedChat = GetChatFromStatedMessage(statedMessageAfterLeave); - - Assert.AreEqual(createdChat.id, modifiedChat.id); - Assert.AreEqual(1, modifiedChat.participants_count); - } - - private ChatConstructor GetChatFromStatedMessage(Messages_statedMessageConstructor message) - { - var serviceMessage = message.message as MessageServiceConstructor; - var peerChat = serviceMessage.to_id as PeerChatConstructor; - - var createdChatId = peerChat.chat_id; - return message.chats.OfType().Single(c => c.id == createdChatId); - } - - private async Task InitializeClient() - { - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - await client.Connect(); - - if (!client.IsUserAuthorized()) - { - var hash = await client.SendCodeRequest(NumberToAuthenticate); - - var code = ""; // you can change code in debugger - Debugger.Break(); - - await client.MakeAuth(NumberToAuthenticate, hash, code); - } - - Assert.IsTrue(client.IsUserAuthorized()); - - return client; - } - - [TestMethod] - public async Task GetUpdates() - { - var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiId, apiHash); - await client.Connect(); - - Assert.IsTrue(client.IsUserAuthorized()); - - var updatesState = await client.GetUpdatesState(); - var initialState = updatesState as Updates_stateConstructor; - - Assert.IsNotNull(initialState); - - var difference = await client.GetUpdatesDifference(initialState.pts, initialState.date, initialState.qts); - Assert.IsNotNull(difference); - Assert.AreEqual(difference.Constructor, Constructor.updates_differenceEmpty); - - var userIdToSendMessage = await client.ImportContactByPhoneNumber(NumberToSendMessage); - - await client.SendMessage(userIdToSendMessage.Value, "test"); - - var differenceAfterMessage = await client.GetUpdatesDifference(initialState.pts, initialState.date, initialState.qts); - - Assert.IsNotNull(differenceAfterMessage); - Assert.AreEqual(differenceAfterMessage.Constructor, Constructor.updates_difference); - - var differenceUpdate = differenceAfterMessage as Updates_differenceConstructor; - Assert.IsNotNull(differenceUpdate); - Assert.AreEqual(1, differenceUpdate.new_messages.Count); - - var messageUpdate = differenceUpdate.new_messages[0] as MessageConstructor; - Assert.IsNotNull(messageUpdate); - - Assert.AreEqual("test", messageUpdate.message); - } - } -} diff --git a/TLSharp.Tests/app.config b/TLSharp.Tests/app.config deleted file mode 100644 index 62aae65..0000000 --- a/TLSharp.Tests/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/TLSharp.Tests/data/cat.jpg b/TLSharp.Tests/data/cat.jpg deleted file mode 100644 index f64b383766a1ea4a6ee4cfec45810538141e9163..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20780 zcmb4qWn5Iz*Y41WbV&?7bV$q4IdsF&N_Uqaox(5-%+M*_A>B%McZkvrN{9%em;d|T z``-KYt`FzS*?XP+TW9@NJnPy2R{w1Qh}9sf5CGbf@SyPk0RJ`s3IHq&OiWA+tfvPS z78W)RJ}%Ca5IukX44;IEl$3;sgoKO|_=1d_hJu8IiiwJbj*fwWf$Rk{h?yP)q-UW2 zj}o+}tvJ{?gt)kb^yDPu^#9-TuNOdqi-wPujDbc1Kqo=NAVK>#2mk^AXjo5&1^ka- z0?;wAu+eaEpWaFn1JKbhFwn8kuy8QYu`!+&qhkOtNw7$n1mv*En02kZa0DZeh2$*q z4SjPzDD<{*y(vNZ){U2}LOxIXY0v-||1rh?CXRt+|bW2W_Xa5ksO(78On zXKP&O{}T8kvLvZHH#9)Fj;-<}%g)13PzdKOL}B1uGAVn1B3|&vsB7@cP4K`-une6+Z3EGW41)yjN(xHhUu8Q6s+zakKLE&ikLPL2(&7Q|8(HCf&EVp z{BR~E4XzHcUt-mg&CTAQscO4_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Z< vr2)9&kkCnJ0BL&A0FyD#S^yqKG@uPL9Ce@pC1Z}XAOX22Gyo&kA&>vrZq#-A diff --git a/TLSharp.Tests/packages.config b/TLSharp.Tests/packages.config deleted file mode 100644 index 6b8deb9..0000000 --- a/TLSharp.Tests/packages.config +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/TLSharp.sln b/TLSharp.sln index d9ec695..1d8702f 100644 --- a/TLSharp.sln +++ b/TLSharp.sln @@ -1,12 +1,10 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.24720.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TLSharp.Core", "TLSharp.Core\TLSharp.Core.csproj", "{400D2544-1CC6-4D8A-A62C-2292D9947A16}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TLSharp.Tests", "TLSharp.Tests\TLSharp.Tests.csproj", "{DE5C0467-EE99-4734-95F2-EFF7A0B99924}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -17,10 +15,6 @@ Global {400D2544-1CC6-4D8A-A62C-2292D9947A16}.Debug|Any CPU.Build.0 = Debug|Any CPU {400D2544-1CC6-4D8A-A62C-2292D9947A16}.Release|Any CPU.ActiveCfg = Release|Any CPU {400D2544-1CC6-4D8A-A62C-2292D9947A16}.Release|Any CPU.Build.0 = Release|Any CPU - {DE5C0467-EE99-4734-95F2-EFF7A0B99924}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DE5C0467-EE99-4734-95F2-EFF7A0B99924}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DE5C0467-EE99-4734-95F2-EFF7A0B99924}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DE5C0467-EE99-4734-95F2-EFF7A0B99924}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 1c2e354967488490124f7cd14948556d9f574ccb Mon Sep 17 00:00:00 2001 From: Afshin Arani Date: Thu, 22 Sep 2016 17:01:59 +0330 Subject: [PATCH 2/4] Update Everything --- TLSharp.Core/MTProto/TL.cs | 14864 ---------------- TLSharp.Core/Requests/AddChatUserRequest.cs | 45 - .../Requests/AuthCheckPhoneRequest.cs | 39 - TLSharp.Core/Requests/AuthSendCodeRequest.cs | 42 +- TLSharp.Core/Requests/AuthSendSmsRequest.cs | 40 - TLSharp.Core/Requests/AuthSignInRequest.cs | 23 +- TLSharp.Core/Requests/AuthSignUpRequest.cs | 52 - TLSharp.Core/Requests/CreateChatRequest.cs | 44 - .../Requests/DeleteChatUserRequest.cs | 44 - TLSharp.Core/Requests/GetContactsRequest.cs | 85 - TLSharp.Core/Requests/GetDialogsRequest.cs | 91 - TLSharp.Core/Requests/GetFileRequest.cs | 49 - TLSharp.Core/Requests/GetHistoryRequest.cs | 78 - TLSharp.Core/Requests/GetNearestDcRequest.cs | 45 - .../Requests/GetUpdatesDifferenceRequest.cs | 43 - .../Requests/GetUpdatesStateRequest.cs | 29 - TLSharp.Core/Requests/GetUserFullRequest.cs | 42 - TLSharp.Core/Requests/GetUsersRequest.cs | 48 - TLSharp.Core/Requests/ImportByUserName.cs | 36 - TLSharp.Core/Requests/ImportContactRequest.cs | 62 - .../Requests/InitConnectionRequest.cs | 38 +- .../Requests/Message_SendMediaRequest.cs | 48 - TLSharp.Core/Requests/SendMessageRequest.cs | 46 - .../Requests/Upload_SaveFilePartRequest.cs | 53 - TLSharp.Core/Session.cs | 9 +- TLSharp.Core/TLSharp.Core.csproj | 30 +- TLSharp.Core/TelegramClient.cs | 386 +- TLSharp.Core/packages.config | 2 + 28 files changed, 250 insertions(+), 16163 deletions(-) delete mode 100644 TLSharp.Core/MTProto/TL.cs delete mode 100644 TLSharp.Core/Requests/AddChatUserRequest.cs delete mode 100644 TLSharp.Core/Requests/AuthCheckPhoneRequest.cs delete mode 100644 TLSharp.Core/Requests/AuthSendSmsRequest.cs delete mode 100644 TLSharp.Core/Requests/AuthSignUpRequest.cs delete mode 100644 TLSharp.Core/Requests/CreateChatRequest.cs delete mode 100644 TLSharp.Core/Requests/DeleteChatUserRequest.cs delete mode 100644 TLSharp.Core/Requests/GetContactsRequest.cs delete mode 100644 TLSharp.Core/Requests/GetDialogsRequest.cs delete mode 100644 TLSharp.Core/Requests/GetFileRequest.cs delete mode 100644 TLSharp.Core/Requests/GetHistoryRequest.cs delete mode 100644 TLSharp.Core/Requests/GetNearestDcRequest.cs delete mode 100644 TLSharp.Core/Requests/GetUpdatesDifferenceRequest.cs delete mode 100644 TLSharp.Core/Requests/GetUpdatesStateRequest.cs delete mode 100644 TLSharp.Core/Requests/GetUserFullRequest.cs delete mode 100644 TLSharp.Core/Requests/GetUsersRequest.cs delete mode 100644 TLSharp.Core/Requests/ImportByUserName.cs delete mode 100644 TLSharp.Core/Requests/ImportContactRequest.cs delete mode 100644 TLSharp.Core/Requests/Message_SendMediaRequest.cs delete mode 100644 TLSharp.Core/Requests/SendMessageRequest.cs delete mode 100644 TLSharp.Core/Requests/Upload_SaveFilePartRequest.cs diff --git a/TLSharp.Core/MTProto/TL.cs b/TLSharp.Core/MTProto/TL.cs deleted file mode 100644 index 70bca44..0000000 --- a/TLSharp.Core/MTProto/TL.cs +++ /dev/null @@ -1,14864 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; - -namespace TLSharp.Core.MTProto -{ - - public abstract class TLObject - { - public abstract Constructor Constructor { get; } - public abstract void Write(BinaryWriter writer); - public abstract void Read(BinaryReader reader); - } - - // all constructor types - - public enum Constructor - { - messageUndelivered, - error, - inputPeerEmpty, - inputPeerSelf, - inputPeerContact, - inputPeerForeign, - inputPeerChat, - inputUserEmpty, - inputUserSelf, - inputUserContact, - inputUserForeign, - inputPhoneContact, - inputFile, - inputMediaEmpty, - inputMediaUploadedPhoto, - inputMediaPhoto, - inputMediaGeoPoint, - inputMediaContact, - inputMediaUploadedVideo, - inputMediaUploadedThumbVideo, - inputMediaVideo, - inputChatPhotoEmpty, - inputChatUploadedPhoto, - inputChatPhoto, - inputGeoPointEmpty, - inputGeoPoint, - inputPhotoEmpty, - inputPhoto, - inputVideoEmpty, - inputVideo, - inputFileLocation, - inputVideoFileLocation, - inputPhotoCropAuto, - inputPhotoCrop, - inputAppEvent, - peerUser, - peerChat, - storage_fileUnknown, - storage_fileJpeg, - storage_fileGif, - storage_filePng, - storage_fileMp3, - storage_fileMov, - storage_filePartial, - storage_fileMp4, - storage_fileWebp, - fileLocationUnavailable, - fileLocation, - userEmpty, - userSelf, - userContact, - userRequest, - userForeign, - userDeleted, - userProfilePhotoEmpty, - userProfilePhoto, - userStatusEmpty, - userStatusOnline, - userStatusOffline, - chatEmpty, - chat, - chatForbidden, - chatFull, - chatParticipant, - chatParticipantsForbidden, - chatParticipants, - chatPhotoEmpty, - chatPhoto, - messageEmpty, - message, - messageForwarded, - messageService, - messageMediaEmpty, - messageMediaPhoto, - messageMediaVideo, - messageMediaGeo, - messageMediaContact, - messageMediaUnsupported, - messageActionEmpty, - messageActionChatCreate, - messageActionChatEditTitle, - messageActionChatEditPhoto, - messageActionChatDeletePhoto, - messageActionChatAddUser, - messageActionChatDeleteUser, - dialog, - photoEmpty, - photo, - photoSizeEmpty, - photoSize, - photoCachedSize, - videoEmpty, - video, - geoPointEmpty, - geoPoint, - auth_checkedPhone, - auth_sentCode, - auth_authorization, - auth_exportedAuthorization, - inputNotifyPeer, - inputNotifyUsers, - inputNotifyChats, - inputNotifyAll, - inputPeerNotifyEventsEmpty, - inputPeerNotifyEventsAll, - inputPeerNotifySettings, - peerNotifyEventsEmpty, - peerNotifyEventsAll, - peerNotifySettingsEmpty, - peerNotifySettings, - wallPaper, - userFull, - contact, - importedContact, - contactBlocked, - contactFound, - contactSuggested, - contactStatus, - chatLocated, - contacts_foreignLinkUnknown, - contacts_foreignLinkRequested, - contacts_foreignLinkMutual, - contacts_myLinkEmpty, - contacts_myLinkRequested, - contacts_myLinkContact, - contacts_link, - contacts_contacts, - contacts_contactsNotModified, - contacts_importedContacts, - contacts_blocked, - contacts_blockedSlice, - contacts_found, - contacts_suggested, - messages_dialogs, - messages_dialogsSlice, - messages_messages, - messages_messagesSlice, - messages_messageEmpty, - messages_message, - messages_statedMessages, - messages_statedMessage, - messages_sentMessage, - messages_chat, - messages_chats, - messages_chatFull, - messages_affectedHistory, - inputMessagesFilterEmpty, - inputMessagesFilterPhotos, - inputMessagesFilterVideo, - inputMessagesFilterPhotoVideo, - updateNewMessage, - updateMessageID, - updateReadMessages, - updateDeleteMessages, - updateRestoreMessages, - updateUserTyping, - updateChatUserTyping, - updateChatParticipants, - updateUserStatus, - updateUserName, - updateUserPhoto, - updateContactRegistered, - updateContactLink, - updateActivation, - updateNewAuthorization, - updates_state, - updates_differenceEmpty, - updates_difference, - updates_differenceSlice, - updatesTooLong, - updateShortMessage, - updateShortChatMessage, - updateShort, - updatesCombined, - updates, - photos_photos, - photos_photosSlice, - photos_photo, - upload_file, - dcOption, - config, - nearestDc, - help_appUpdate, - help_noAppUpdate, - help_inviteText, - messages_statedMessagesLinks, - messages_statedMessageLink, - messages_sentMessageLink, - inputGeoChat, - inputNotifyGeoChatPeer, - geoChat, - geoChatMessageEmpty, - geoChatMessage, - geoChatMessageService, - geochats_statedMessage, - geochats_located, - geochats_messages, - geochats_messagesSlice, - messageActionGeoChatCreate, - messageActionGeoChatCheckin, - updateNewGeoChatMessage, - wallPaperSolid, - updateNewEncryptedMessage, - updateEncryptedChatTyping, - updateEncryption, - updateEncryptedMessagesRead, - encryptedChatEmpty, - encryptedChatWaiting, - encryptedChatRequested, - encryptedChat, - encryptedChatDiscarded, - inputEncryptedChat, - encryptedFileEmpty, - encryptedFile, - inputEncryptedFileEmpty, - inputEncryptedFileUploaded, - inputEncryptedFile, - inputEncryptedFileLocation, - encryptedMessage, - encryptedMessageService, - decryptedMessageLayer, - decryptedMessage, - decryptedMessageService, - decryptedMessageMediaEmpty, - decryptedMessageMediaPhoto, - decryptedMessageMediaVideo, - decryptedMessageMediaGeoPoint, - decryptedMessageMediaContact, - decryptedMessageActionSetMessageTTL, - messages_dhConfigNotModified, - messages_dhConfig, - messages_sentEncryptedMessage, - messages_sentEncryptedFile, - inputFileBig, - inputEncryptedFileBigUploaded, - updateChatParticipantAdd, - updateChatParticipantDelete, - updateDcOptions, - inputMediaUploadedAudio, - inputMediaAudio, - inputMediaUploadedDocument, - inputMediaUploadedThumbDocument, - inputMediaDocument, - messageMediaDocument, - messageMediaAudio, - inputAudioEmpty, - inputAudio, - inputDocumentEmpty, - inputDocument, - inputAudioFileLocation, - inputDocumentFileLocation, - decryptedMessageMediaDocument, - decryptedMessageMediaAudio, - audioEmpty, - audio, - documentEmpty, - document - } - - public class TL - { - - private static Dictionary constructors = new Dictionary() - { - {0xc4b9f9bb, typeof (ErrorConstructor)}, - {0x7f3b18ea, typeof (InputPeerEmptyConstructor)}, - {0x7da07ec9, typeof (InputPeerSelfConstructor)}, - {0x1023dbe8, typeof (InputPeerContactConstructor)}, - {0x9b447325, typeof (InputPeerForeignConstructor)}, - {0x179be863, typeof (InputPeerChatConstructor)}, - {0xb98886cf, typeof (InputUserEmptyConstructor)}, - {0xf7c1b13f, typeof (InputUserSelfConstructor)}, - {0x86e94f65, typeof (InputUserContactConstructor)}, - {0x655e74ff, typeof (InputUserForeignConstructor)}, - {0xf392b7f4, typeof (InputPhoneContactConstructor)}, - {0xf52ff27f, typeof (InputFileConstructor)}, - {0x9664f57f, typeof (InputMediaEmptyConstructor)}, - {0x2dc53a7d, typeof (InputMediaUploadedPhotoConstructor)}, - {0x8f2ab2ec, typeof (InputMediaPhotoConstructor)}, - {0xf9c44144, typeof (InputMediaGeoPointConstructor)}, - {0xa6e45987, typeof (InputMediaContactConstructor)}, - {0x4847d92a, typeof (InputMediaUploadedVideoConstructor)}, - {0xe628a145, typeof (InputMediaUploadedThumbVideoConstructor)}, - {0x7f023ae6, typeof (InputMediaVideoConstructor)}, - {0x1ca48f57, typeof (InputChatPhotoEmptyConstructor)}, - {0x94254732, typeof (InputChatUploadedPhotoConstructor)}, - {0xb2e1bf08, typeof (InputChatPhotoConstructor)}, - {0xe4c123d6, typeof (InputGeoPointEmptyConstructor)}, - {0xf3b7acc9, typeof (InputGeoPointConstructor)}, - {0x1cd7bf0d, typeof (InputPhotoEmptyConstructor)}, - {0xfb95c6c4, typeof (InputPhotoConstructor)}, - {0x5508ec75, typeof (InputVideoEmptyConstructor)}, - {0xee579652, typeof (InputVideoConstructor)}, - {0x14637196, typeof (InputFileLocationConstructor)}, - {0x3d0364ec, typeof (InputVideoFileLocationConstructor)}, - {0xade6b004, typeof (InputPhotoCropAutoConstructor)}, - {0xd9915325, typeof (InputPhotoCropConstructor)}, - {0x770656a8, typeof (InputAppEventConstructor)}, - {0x9db1bc6d, typeof (PeerUserConstructor)}, - {0xbad0e5bb, typeof (PeerChatConstructor)}, - {0xaa963b05, typeof (Storage_fileUnknownConstructor)}, - {0x007efe0e, typeof (Storage_fileJpegConstructor)}, - {0xcae1aadf, typeof (Storage_fileGifConstructor)}, - {0x0a4f63c0, typeof (Storage_filePngConstructor)}, - {0x528a0677, typeof (Storage_fileMp3Constructor)}, - {0x4b09ebbc, typeof (Storage_fileMovConstructor)}, - {0x40bc6f52, typeof (Storage_filePartialConstructor)}, - {0xb3cea0e4, typeof (Storage_fileMp4Constructor)}, - {0x1081464c, typeof (Storage_fileWebpConstructor)}, - {0x7c596b46, typeof (FileLocationUnavailableConstructor)}, - {0x53d69076, typeof (FileLocationConstructor)}, - {0x200250ba, typeof (UserEmptyConstructor)}, - {0x720535EC, typeof (UserSelfConstructor)}, - {0x7007b451, typeof (UserSelfConstructor)}, - {0xcab35e18, typeof (UserContactConstructor)}, //before signed as 0xf2fb8319 - {0x22e8ceb0, typeof (UserRequestConstructor)}, - {0x5214c89d, typeof (UserForeignConstructor)}, - {0xb29ad7cc, typeof (UserDeletedConstructor)}, - {0x4f11bae1, typeof (UserProfilePhotoEmptyConstructor)}, - {0xd559d8c8, typeof (UserProfilePhotoConstructor)}, - {0x09d05049, typeof (UserStatusEmptyConstructor)}, - {0xedb93949, typeof (UserStatusOnlineConstructor)}, - {0x008c703f, typeof (UserStatusOfflineConstructor)}, - {0x9ba2d800, typeof (ChatEmptyConstructor)}, - {0x6e9c9bc7, typeof (ChatConstructor)}, - {0xfb0ccc41, typeof (ChatForbiddenConstructor)}, - {0x630e61be, typeof (ChatFullConstructor)}, - {0xc8d7493e, typeof (ChatParticipantConstructor)}, - {0x0fd2bb8a, typeof (ChatParticipantsForbiddenConstructor)}, - {0x7841b415, typeof (ChatParticipantsConstructor)}, - {0x37c1011c, typeof (ChatPhotoEmptyConstructor)}, - {0x6153276a, typeof (ChatPhotoConstructor)}, - {0x83e5de54, typeof (MessageEmptyConstructor)}, - {0x567699B3, typeof (MessageConstructor)}, - {0xa367e716, typeof (MessageForwardedConstructor)}, - {0x1d86f70e, typeof (MessageServiceConstructor)}, - {0x3ded6320, typeof (MessageMediaEmptyConstructor)}, - {0xc8c45a2a, typeof (MessageMediaPhotoConstructor)}, - {0xa2d24290, typeof (MessageMediaVideoConstructor)}, - {0x56e0d474, typeof (MessageMediaGeoConstructor)}, - {0x5e7d2f39, typeof (MessageMediaContactConstructor)}, - {0x29632a36, typeof (MessageMediaUnsupportedConstructor)}, - {0xb6aef7b0, typeof (MessageActionEmptyConstructor)}, - {0xa6638b9a, typeof (MessageActionChatCreateConstructor)}, - {0xb5a1ce5a, typeof (MessageActionChatEditTitleConstructor)}, - {0x7fcb13a8, typeof (MessageActionChatEditPhotoConstructor)}, - {0x95e3fbef, typeof (MessageActionChatDeletePhotoConstructor)}, - {0x5e3cfc4b, typeof (MessageActionChatAddUserConstructor)}, - {0xb2ae9b0c, typeof (MessageActionChatDeleteUserConstructor)}, - {0x214a8cdf, typeof (DialogConstructor)}, - {0x2331b22d, typeof (PhotoEmptyConstructor)}, - {0x22b56751, typeof (PhotoConstructor)}, - {0x0e17e23c, typeof (PhotoSizeEmptyConstructor)}, - {0x77bfb61b, typeof (PhotoSizeConstructor)}, - {0xe9a734fa, typeof (PhotoCachedSizeConstructor)}, - {0xc10658a8, typeof (VideoEmptyConstructor)}, - {0x5a04a49f, typeof (VideoConstructor)}, - {0x1117dd5f, typeof (GeoPointEmptyConstructor)}, - {0x2049d70c, typeof (GeoPointConstructor)}, - {0xe300cc3b, typeof (Auth_checkedPhoneConstructor)}, - {0x2215bcbd, typeof (Auth_sentCodeConstructor)}, - {0xf6b673a4, typeof (Auth_authorizationConstructor)}, - {0xdf969c2d, typeof (Auth_exportedAuthorizationConstructor)}, - {0xb8bc5b0c, typeof (InputNotifyPeerConstructor)}, - {0x193b4417, typeof (InputNotifyUsersConstructor)}, - {0x4a95e84e, typeof (InputNotifyChatsConstructor)}, - {0xa429b886, typeof (InputNotifyAllConstructor)}, - {0xf03064d8, typeof (InputPeerNotifyEventsEmptyConstructor)}, - {0xe86a2c74, typeof (InputPeerNotifyEventsAllConstructor)}, - {0x46a2ce98, typeof (InputPeerNotifySettingsConstructor)}, - {0xadd53cb3, typeof (PeerNotifyEventsEmptyConstructor)}, - {0x6d1ded88, typeof (PeerNotifyEventsAllConstructor)}, - {0x70a68512, typeof (PeerNotifySettingsEmptyConstructor)}, - {0x8d5e11ee, typeof (PeerNotifySettingsConstructor)}, - {0xccb03657, typeof (WallPaperConstructor)}, - {0x771095da, typeof (UserFullConstructor)}, - {0xf911c994, typeof (ContactConstructor)}, - {0xd0028438, typeof (ImportedContactConstructor)}, - {0x561bc879, typeof (ContactBlockedConstructor)}, - {0xea879f95, typeof (ContactFoundConstructor)}, - {0x3de191a1, typeof (ContactSuggestedConstructor)}, - {0xaa77b873, typeof (ContactStatusConstructor)}, - {0x3631cf4c, typeof (ChatLocatedConstructor)}, - {0x133421f8, typeof (Contacts_foreignLinkUnknownConstructor)}, - {0xa7801f47, typeof (Contacts_foreignLinkRequestedConstructor)}, - {0x1bea8ce1, typeof (Contacts_foreignLinkMutualConstructor)}, - {0xd22a1c60, typeof (Contacts_myLinkEmptyConstructor)}, - {0x6c69efee, typeof (Contacts_myLinkRequestedConstructor)}, - {0xc240ebd9, typeof (Contacts_myLinkContactConstructor)}, - {0xeccea3f5, typeof (Contacts_linkConstructor)}, - {0x6f8b8cb2, typeof (Contacts_contactsConstructor)}, - {0xb74ba9d2, typeof (Contacts_contactsNotModifiedConstructor)}, - {0xd1cd0a4c, typeof (Contacts_importedContactsConstructor)}, - {0x1c138d15, typeof (Contacts_blockedConstructor)}, - {0x900802a1, typeof (Contacts_blockedSliceConstructor)}, - {0x0566000e, typeof (Contacts_foundConstructor)}, - {0x5649dcc5, typeof (Contacts_suggestedConstructor)}, - {0x15ba6c40, typeof (Messages_dialogsConstructor)}, - {0x71e094f3, typeof (Messages_dialogsSliceConstructor)}, - {0x8c718e87, typeof (Messages_messagesConstructor)}, - {0x0b446ae3, typeof (Messages_messagesSliceConstructor)}, - {0x3f4e0648, typeof (Messages_messageEmptyConstructor)}, - {0xff90c417, typeof (Messages_messageConstructor)}, - {0x969478bb, typeof (Messages_statedMessagesConstructor)}, - {0xd07ae726, typeof (Messages_statedMessageConstructor)}, - {0xd1f4d35c, typeof (Messages_sentMessageConstructor)}, - {0x40e9002a, typeof (Messages_chatConstructor)}, - {0x8150cbd8, typeof (Messages_chatsConstructor)}, - {0xe5d7d19c, typeof (Messages_chatFullConstructor)}, - {0xb7de36f2, typeof (Messages_affectedHistoryConstructor)}, - {0x57e2f66c, typeof (InputMessagesFilterEmptyConstructor)}, - {0x9609a51c, typeof (InputMessagesFilterPhotosConstructor)}, - {0x9fc00e65, typeof (InputMessagesFilterVideoConstructor)}, - {0x56e9f0e4, typeof (InputMessagesFilterPhotoVideoConstructor)}, - {0x013abdb3, typeof (UpdateNewMessageConstructor)}, - {0x4e90bfd6, typeof (UpdateMessageIDConstructor)}, - {0xc6649e31, typeof (UpdateReadMessagesConstructor)}, - {0xa92bfe26, typeof (UpdateDeleteMessagesConstructor)}, - {0xd15de04d, typeof (UpdateRestoreMessagesConstructor)}, - {0x6baa8508, typeof (UpdateUserTypingConstructor)}, - {0x3c46cfe6, typeof (UpdateChatUserTypingConstructor)}, - {0x07761198, typeof (UpdateChatParticipantsConstructor)}, - {0x1bfbd823, typeof (UpdateUserStatusConstructor)}, - {0xda22d9ad, typeof (UpdateUserNameConstructor)}, - {0x95313b0c, typeof (UpdateUserPhotoConstructor)}, - {0x2575bbb9, typeof (UpdateContactRegisteredConstructor)}, - {0x51a48a9a, typeof (UpdateContactLinkConstructor)}, - {0x6f690963, typeof (UpdateActivationConstructor)}, - {0x8f06529a, typeof (UpdateNewAuthorizationConstructor)}, - {0xa56c2a3e, typeof (Updates_stateConstructor)}, - {0x5d75a138, typeof (Updates_differenceEmptyConstructor)}, - {0x00f49ca0, typeof (Updates_differenceConstructor)}, - {0xa8fb1981, typeof (Updates_differenceSliceConstructor)}, - {0xe317af7e, typeof (UpdatesTooLongConstructor)}, - {0xd3f45784, typeof (UpdateShortMessageConstructor)}, - {0x2b2fbd4e, typeof (UpdateShortChatMessageConstructor)}, - {0x78d4dec1, typeof (UpdateShortConstructor)}, - {0x725b04c3, typeof (UpdatesCombinedConstructor)}, - {0x74ae4240, typeof (UpdatesConstructor)}, - {0x8dca6aa5, typeof (Photos_photosConstructor)}, - {0x15051f54, typeof (Photos_photosSliceConstructor)}, - {0x20212ca8, typeof (Photos_photoConstructor)}, - {0x096a18d5, typeof (Upload_fileConstructor)}, - {0x2ec2a43c, typeof (DcOptionConstructor)}, - {0x232d5905, typeof (ConfigConstructor)}, - {0x8e1a1775, typeof (NearestDcConstructor)}, - {0x8987f311, typeof (Help_appUpdateConstructor)}, - {0xc45a6536, typeof (Help_noAppUpdateConstructor)}, - {0x18cb9f78, typeof (Help_inviteTextConstructor)}, - {0x3e74f5c6, typeof (Messages_statedMessagesLinksConstructor)}, - {0xa9af2881, typeof (Messages_statedMessageLinkConstructor)}, - {0xe9db4a3f, typeof (Messages_sentMessageLinkConstructor)}, - {0x74d456fa, typeof (InputGeoChatConstructor)}, - {0x4d8ddec8, typeof (InputNotifyGeoChatPeerConstructor)}, - {0x75eaea5a, typeof (GeoChatConstructor)}, - {0x60311a9b, typeof (GeoChatMessageEmptyConstructor)}, - {0x4505f8e1, typeof (GeoChatMessageConstructor)}, - {0xd34fa24e, typeof (GeoChatMessageServiceConstructor)}, - {0x17b1578b, typeof (Geochats_statedMessageConstructor)}, - {0x48feb267, typeof (Geochats_locatedConstructor)}, - {0xd1526db1, typeof (Geochats_messagesConstructor)}, - {0xbc5863e8, typeof (Geochats_messagesSliceConstructor)}, - {0x6f038ebc, typeof (MessageActionGeoChatCreateConstructor)}, - {0x0c7d53de, typeof (MessageActionGeoChatCheckinConstructor)}, - {0x5a68e3f7, typeof (UpdateNewGeoChatMessageConstructor)}, - {0x63117f24, typeof (WallPaperSolidConstructor)}, - {0x12bcbd9a, typeof (UpdateNewEncryptedMessageConstructor)}, - {0x1710f156, typeof (UpdateEncryptedChatTypingConstructor)}, - {0xb4a2e88d, typeof (UpdateEncryptionConstructor)}, - {0x38fe25b7, typeof (UpdateEncryptedMessagesReadConstructor)}, - {0xab7ec0a0, typeof (EncryptedChatEmptyConstructor)}, - {0x3bf703dc, typeof (EncryptedChatWaitingConstructor)}, - {0xfda9a7b7, typeof (EncryptedChatRequestedConstructor)}, - {0x6601d14f, typeof (EncryptedChatConstructor)}, - {0x13d6dd27, typeof (EncryptedChatDiscardedConstructor)}, - {0xf141b5e1, typeof (InputEncryptedChatConstructor)}, - {0xc21f497e, typeof (EncryptedFileEmptyConstructor)}, - {0x4a70994c, typeof (EncryptedFileConstructor)}, - {0x1837c364, typeof (InputEncryptedFileEmptyConstructor)}, - {0x64bd0306, typeof (InputEncryptedFileUploadedConstructor)}, - {0x5a17b5e5, typeof (InputEncryptedFileConstructor)}, - {0xf5235d55, typeof (InputEncryptedFileLocationConstructor)}, - {0xed18c118, typeof (EncryptedMessageConstructor)}, - {0x23734b06, typeof (EncryptedMessageServiceConstructor)}, - {0x99a438cf, typeof (DecryptedMessageLayerConstructor)}, - {0x1f814f1f, typeof (DecryptedMessageConstructor)}, - {0xaa48327d, typeof (DecryptedMessageServiceConstructor)}, - {0x089f5c4a, typeof (DecryptedMessageMediaEmptyConstructor)}, - {0x32798a8c, typeof (DecryptedMessageMediaPhotoConstructor)}, - {0x4cee6ef3, typeof (DecryptedMessageMediaVideoConstructor)}, - {0x35480a59, typeof (DecryptedMessageMediaGeoPointConstructor)}, - {0x588a0a97, typeof (DecryptedMessageMediaContactConstructor)}, - {0xa1733aec, typeof (DecryptedMessageActionSetMessageTTLConstructor)}, - {0xc0e24635, typeof (Messages_dhConfigNotModifiedConstructor)}, - {0x2c221edd, typeof (Messages_dhConfigConstructor)}, - {0x560f8935, typeof (Messages_sentEncryptedMessageConstructor)}, - {0x9493ff32, typeof (Messages_sentEncryptedFileConstructor)}, - {0xfa4f0bb5, typeof (InputFileBigConstructor)}, - {0x2dc173c8, typeof (InputEncryptedFileBigUploadedConstructor)}, - {0x3a0eeb22, typeof (UpdateChatParticipantAddConstructor)}, - {0x6e5f8c22, typeof (UpdateChatParticipantDeleteConstructor)}, - {0x8e5e9873, typeof (UpdateDcOptionsConstructor)}, - {0x61a6d436, typeof (InputMediaUploadedAudioConstructor)}, - {0x89938781, typeof (InputMediaAudioConstructor)}, - {0x34e794bd, typeof (InputMediaUploadedDocumentConstructor)}, - {0x3e46de5d, typeof (InputMediaUploadedThumbDocumentConstructor)}, - {0xd184e841, typeof (InputMediaDocumentConstructor)}, - {0x2fda2204, typeof (MessageMediaDocumentConstructor)}, - {0xc6b68300, typeof (MessageMediaAudioConstructor)}, - {0xd95adc84, typeof (InputAudioEmptyConstructor)}, - {0x77d440ff, typeof (InputAudioConstructor)}, - {0x72f0eaae, typeof (InputDocumentEmptyConstructor)}, - {0x18798952, typeof (InputDocumentConstructor)}, - {0x74dc404d, typeof (InputAudioFileLocationConstructor)}, - {0x4e45abe9, typeof (InputDocumentFileLocationConstructor)}, - {0xb095434b, typeof (DecryptedMessageMediaDocumentConstructor)}, - {0x6080758f, typeof (DecryptedMessageMediaAudioConstructor)}, - {0x586988d8, typeof (AudioEmptyConstructor)}, - {0x427425e7, typeof (AudioConstructor)}, - {0x36f8c871, typeof (DocumentEmptyConstructor)}, - {0xf9a39f4f, typeof (DocumentConstructor)}, - {0xab3a99ac, typeof (DialogConstructor)}, - {0xd9ccc4ef, typeof (UserRequestConstructor)}, - {0x075cf7a8, typeof (UserForeignConstructor)}, - }; - - public static TLObject Parse(BinaryReader reader, uint code) - { - if (!constructors.ContainsKey(code)) - { - throw new Exception("unknown constructor code"); - } - - uint dataCode = reader.ReadUInt32(); - if (dataCode != code) - { - throw new Exception(String.Format("target code {0} != data code {1}", code, dataCode)); - } - - TLObject obj = (TLObject)Activator.CreateInstance(constructors[code]); - obj.Read(reader); - return obj; - } - - public static T Parse(BinaryReader reader) - { - if (typeof(TLObject).IsAssignableFrom(typeof(T))) - { - uint dataCode = reader.ReadUInt32(); - - if (!constructors.ContainsKey(dataCode)) - { - throw new Exception(String.Format("invalid constructor code {0}", dataCode.ToString("X"))); - } - - Type constructorType = constructors[dataCode]; - if (!typeof(T).IsAssignableFrom(constructorType)) - { - throw new Exception(String.Format("try to parse {0}, but incompatible type {1}", typeof(T).FullName, - constructorType.FullName)); - } - - T obj = (T)Activator.CreateInstance(constructorType); - ((TLObject)(object)obj).Read(reader); - return obj; - } - else if (typeof(T) == typeof(bool)) - { - uint code = reader.ReadUInt32(); - if (code == 0x997275b5) - { - return (T)(object)true; - } - else if (code == 0xbc799737) - { - return (T)(object)false; - } - else - { - throw new Exception("unknown bool value"); - } - } - else - { - throw new Exception("unknown return type"); - } - } - - //public delegate TLObject InputPeerContactDelegate(InputPeerContactConstructor x); - // constructors - - public static Error error(int code, string text) - { - return new ErrorConstructor(code, text); - } - - public static InputPeer inputPeerEmpty() - { - return new InputPeerEmptyConstructor(); - } - - public static InputPeer inputPeerSelf() - { - return new InputPeerSelfConstructor(); - } - - public static InputPeer inputPeerContact(int user_id) - { - return new InputPeerContactConstructor(user_id); - } - - public static InputPeer inputPeerForeign(int user_id, long access_hash) - { - return new InputPeerForeignConstructor(user_id, access_hash); - } - - public static InputPeer inputPeerChat(int chat_id) - { - return new InputPeerChatConstructor(chat_id); - } - - public static InputUser inputUserEmpty() - { - return new InputUserEmptyConstructor(); - } - - public static InputUser inputUserSelf() - { - return new InputUserSelfConstructor(); - } - - public static InputUser inputUserContact(int user_id) - { - return new InputUserContactConstructor(user_id); - } - - public static InputUser inputUserForeign(int user_id, long access_hash) - { - return new InputUserForeignConstructor(user_id, access_hash); - } - - public static InputContact inputPhoneContact(long client_id, string phone, string first_name, string last_name) - { - return new InputPhoneContactConstructor(client_id, phone, first_name, last_name); - } - - public static InputFile inputFile(long id, int parts, string name, string md5_checksum) - { - return new InputFileConstructor(id, parts, name, md5_checksum); - } - - public static InputMedia inputMediaEmpty() - { - return new InputMediaEmptyConstructor(); - } - - public static InputMedia inputMediaUploadedPhoto(InputFile file) - { - return new InputMediaUploadedPhotoConstructor(file); - } - - public static InputMedia inputMediaPhoto(InputPhoto id) - { - return new InputMediaPhotoConstructor(id); - } - - public static InputMedia inputMediaGeoPoint(InputGeoPoint geo_point) - { - return new InputMediaGeoPointConstructor(geo_point); - } - - public static InputMedia inputMediaContact(string phone_number, string first_name, string last_name) - { - return new InputMediaContactConstructor(phone_number, first_name, last_name); - } - - public static InputMedia inputMediaUploadedVideo(InputFile file, int duration, int w, int h) - { - return new InputMediaUploadedVideoConstructor(file, duration, w, h); - } - - public static InputMedia inputMediaUploadedThumbVideo(InputFile file, InputFile thumb, int duration, int w, int h) - { - return new InputMediaUploadedThumbVideoConstructor(file, thumb, duration, w, h); - } - - public static InputMedia inputMediaVideo(InputVideo id) - { - return new InputMediaVideoConstructor(id); - } - - public static InputChatPhoto inputChatPhotoEmpty() - { - return new InputChatPhotoEmptyConstructor(); - } - - public static InputChatPhoto inputChatUploadedPhoto(InputFile file, InputPhotoCrop crop) - { - return new InputChatUploadedPhotoConstructor(file, crop); - } - - public static InputChatPhoto inputChatPhoto(InputPhoto id, InputPhotoCrop crop) - { - return new InputChatPhotoConstructor(id, crop); - } - - public static InputGeoPoint inputGeoPointEmpty() - { - return new InputGeoPointEmptyConstructor(); - } - - public static InputGeoPoint inputGeoPoint(double lat, double lng) - { - return new InputGeoPointConstructor(lat, lng); - } - - public static InputPhoto inputPhotoEmpty() - { - return new InputPhotoEmptyConstructor(); - } - - public static InputPhoto inputPhoto(long id, long access_hash) - { - return new InputPhotoConstructor(id, access_hash); - } - - public static InputVideo inputVideoEmpty() - { - return new InputVideoEmptyConstructor(); - } - - public static InputVideo inputVideo(long id, long access_hash) - { - return new InputVideoConstructor(id, access_hash); - } - - public static InputFileLocation inputFileLocation(long volume_id, int local_id, long secret) - { - return new InputFileLocationConstructor(volume_id, local_id, secret); - } - - public static InputFileLocation inputVideoFileLocation(long id, long access_hash) - { - return new InputVideoFileLocationConstructor(id, access_hash); - } - - public static InputPhotoCrop inputPhotoCropAuto() - { - return new InputPhotoCropAutoConstructor(); - } - - public static InputPhotoCrop inputPhotoCrop(double crop_left, double crop_top, double crop_width) - { - return new InputPhotoCropConstructor(crop_left, crop_top, crop_width); - } - - public static InputAppEvent inputAppEvent(double time, string type, long peer, string data) - { - return new InputAppEventConstructor(time, type, peer, data); - } - - public static Peer peerUser(int user_id) - { - return new PeerUserConstructor(user_id); - } - - public static Peer peerChat(int chat_id) - { - return new PeerChatConstructor(chat_id); - } - - public static storage_FileType storage_fileUnknown() - { - return new Storage_fileUnknownConstructor(); - } - - public static storage_FileType storage_fileJpeg() - { - return new Storage_fileJpegConstructor(); - } - - public static storage_FileType storage_fileGif() - { - return new Storage_fileGifConstructor(); - } - - public static storage_FileType storage_filePng() - { - return new Storage_filePngConstructor(); - } - - public static storage_FileType storage_fileMp3() - { - return new Storage_fileMp3Constructor(); - } - - public static storage_FileType storage_fileMov() - { - return new Storage_fileMovConstructor(); - } - - public static storage_FileType storage_filePartial() - { - return new Storage_filePartialConstructor(); - } - - public static storage_FileType storage_fileMp4() - { - return new Storage_fileMp4Constructor(); - } - - public static storage_FileType storage_fileWebp() - { - return new Storage_fileWebpConstructor(); - } - - public static FileLocation fileLocationUnavailable(long volume_id, int local_id, long secret) - { - return new FileLocationUnavailableConstructor(volume_id, local_id, secret); - } - - public static FileLocation fileLocation(int dc_id, long volume_id, int local_id, long secret) - { - return new FileLocationConstructor(dc_id, volume_id, local_id, secret); - } - - public static User userEmpty(int id) - { - return new UserEmptyConstructor(id); - } - - public static User userSelf(int id, string first_name, string last_name, string username, string phone, UserProfilePhoto photo, - UserStatus status, bool inactive) - { - return new UserSelfConstructor(id, first_name, last_name, username, phone, photo, status, inactive); - } - - public static User userContact(int id, string first_name, string last_name, string username, long access_hash, string phone, - UserProfilePhoto photo, UserStatus status) - { - return new UserContactConstructor(id, first_name, last_name, username, access_hash, phone, photo, status); - } - - public static User userRequest(int id, string first_name, string last_name, string username, long access_hash, string phone, - UserProfilePhoto photo, UserStatus status) - { - return new UserRequestConstructor(id, first_name, last_name, username, access_hash, phone, photo, status); - } - - public static User userForeign(int id, string first_name, string last_name, string username, long access_hash, UserProfilePhoto photo, - UserStatus status) - { - return new UserForeignConstructor(id, first_name, last_name, username, access_hash, photo, status); - } - - public static User userDeleted(int id, string first_name, string last_name, string username) - { - return new UserDeletedConstructor(id, first_name, last_name, username); - } - - public static UserProfilePhoto userProfilePhotoEmpty() - { - return new UserProfilePhotoEmptyConstructor(); - } - - public static UserProfilePhoto userProfilePhoto(long photo_id, FileLocation photo_small, FileLocation photo_big) - { - return new UserProfilePhotoConstructor(photo_id, photo_small, photo_big); - } - - public static UserStatus userStatusEmpty() - { - return new UserStatusEmptyConstructor(); - } - - public static UserStatus userStatusOnline(int expires) - { - return new UserStatusOnlineConstructor(expires); - } - - public static UserStatus userStatusOffline(int was_online) - { - return new UserStatusOfflineConstructor(was_online); - } - - public static Chat chatEmpty(int id) - { - return new ChatEmptyConstructor(id); - } - - public static Chat chat(int id, string title, ChatPhoto photo, int participants_count, int date, bool left, - int version) - { - return new ChatConstructor(id, title, photo, participants_count, date, left, version); - } - - public static Chat chatForbidden(int id, string title, int date) - { - return new ChatForbiddenConstructor(id, title, date); - } - - public static ChatFull chatFull(int id, ChatParticipants participants, Photo chat_photo, - PeerNotifySettings notify_settings) - { - return new ChatFullConstructor(id, participants, chat_photo, notify_settings); - } - - public static ChatParticipant chatParticipant(int user_id, int inviter_id, int date) - { - return new ChatParticipantConstructor(user_id, inviter_id, date); - } - - public static ChatParticipants chatParticipantsForbidden(int chat_id) - { - return new ChatParticipantsForbiddenConstructor(chat_id); - } - - public static ChatParticipants chatParticipants(int chat_id, int admin_id, List participants, - int version) - { - return new ChatParticipantsConstructor(chat_id, admin_id, participants, version); - } - - public static ChatPhoto chatPhotoEmpty() - { - return new ChatPhotoEmptyConstructor(); - } - - public static ChatPhoto chatPhoto(FileLocation photo_small, FileLocation photo_big) - { - return new ChatPhotoConstructor(photo_small, photo_big); - } - - public static Message messageEmpty(int id) - { - return new MessageEmptyConstructor(id); - } - - public static Message message(int id, int from_id, int to_id, bool output, bool unread, int date, string message, - MessageMedia media) - { - return new MessageConstructor(id, from_id, to_id, output, unread, date, message, media); - } - - public static Message messageForwarded(int id, int fwd_from_id, int fwd_date, int from_id, int to_id, bool output, - bool unread, int date, string message, MessageMedia media) - { - return new MessageForwardedConstructor(id, fwd_from_id, fwd_date, from_id, to_id, output, unread, date, message, - media); - } - - public static Message messageService(int flags, int id, int from_id, Peer to_id, int date, MessageAction action) - { - return new MessageServiceConstructor(flags, id, from_id, to_id, date, action); - } - - public static MessageMedia messageMediaEmpty() - { - return new MessageMediaEmptyConstructor(); - } - - public static MessageMedia messageMediaPhoto(Photo photo) - { - return new MessageMediaPhotoConstructor(photo); - } - - public static MessageMedia messageMediaVideo(Video video) - { - return new MessageMediaVideoConstructor(video); - } - - public static MessageMedia messageMediaGeo(GeoPoint geo) - { - return new MessageMediaGeoConstructor(geo); - } - - public static MessageMedia messageMediaContact(string phone_number, string first_name, string last_name, int user_id) - { - return new MessageMediaContactConstructor(phone_number, first_name, last_name, user_id); - } - - public static MessageMedia messageMediaUnsupported(byte[] bytes) - { - return new MessageMediaUnsupportedConstructor(bytes); - } - - public static MessageAction messageActionEmpty() - { - return new MessageActionEmptyConstructor(); - } - - public static MessageAction messageActionChatCreate(string title, List users) - { - return new MessageActionChatCreateConstructor(title, users); - } - - public static MessageAction messageActionChatEditTitle(string title) - { - return new MessageActionChatEditTitleConstructor(title); - } - - public static MessageAction messageActionChatEditPhoto(Photo photo) - { - return new MessageActionChatEditPhotoConstructor(photo); - } - - public static MessageAction messageActionChatDeletePhoto() - { - return new MessageActionChatDeletePhotoConstructor(); - } - - public static MessageAction messageActionChatAddUser(int user_id) - { - return new MessageActionChatAddUserConstructor(user_id); - } - - public static MessageAction messageActionChatDeleteUser(int user_id) - { - return new MessageActionChatDeleteUserConstructor(user_id); - } - - public static Dialog dialog(Peer peer, int top_message, int unread_count, PeerNotifySettings peerNotifySettings) - { - return new DialogConstructor(peer, top_message, unread_count, peerNotifySettings); - } - - public static Photo photoEmpty(long id) - { - return new PhotoEmptyConstructor(id); - } - - public static Photo photo(long id, long access_hash, int user_id, int date, string caption, GeoPoint geo, - List sizes) - { - return new PhotoConstructor(id, access_hash, user_id, date, caption, geo, sizes); - } - - public static PhotoSize photoSizeEmpty(string type) - { - return new PhotoSizeEmptyConstructor(type); - } - - public static PhotoSize photoSize(string type, FileLocation location, int w, int h, int size) - { - return new PhotoSizeConstructor(type, location, w, h, size); - } - - public static PhotoSize photoCachedSize(string type, FileLocation location, int w, int h, byte[] bytes) - { - return new PhotoCachedSizeConstructor(type, location, w, h, bytes); - } - - public static Video videoEmpty(long id) - { - return new VideoEmptyConstructor(id); - } - - public static Video video(long id, long access_hash, int user_id, int date, string caption, int duration, int size, - PhotoSize thumb, int dc_id, int w, int h) - { - return new VideoConstructor(id, access_hash, user_id, date, caption, duration, size, thumb, dc_id, w, h); - } - - public static GeoPoint geoPointEmpty() - { - return new GeoPointEmptyConstructor(); - } - - public static GeoPoint geoPoint(double lng, double lat) - { - return new GeoPointConstructor(lng, lat); - } - - public static auth_CheckedPhone auth_checkedPhone(bool phone_registered, bool phone_invited) - { - return new Auth_checkedPhoneConstructor(phone_registered, phone_invited); - } - - public static auth_SentCode auth_sentCode(bool phone_registered, string phone_code_hash) - { - return new Auth_sentCodeConstructor(phone_registered, phone_code_hash); - } - - public static auth_Authorization auth_authorization(int expires, User user) - { - return new Auth_authorizationConstructor(expires, user); - } - - public static auth_ExportedAuthorization auth_exportedAuthorization(int id, byte[] bytes) - { - return new Auth_exportedAuthorizationConstructor(id, bytes); - } - - public static InputNotifyPeer inputNotifyPeer(InputPeer peer) - { - return new InputNotifyPeerConstructor(peer); - } - - public static InputNotifyPeer inputNotifyUsers() - { - return new InputNotifyUsersConstructor(); - } - - public static InputNotifyPeer inputNotifyChats() - { - return new InputNotifyChatsConstructor(); - } - - public static InputNotifyPeer inputNotifyAll() - { - return new InputNotifyAllConstructor(); - } - - public static InputPeerNotifyEvents inputPeerNotifyEventsEmpty() - { - return new InputPeerNotifyEventsEmptyConstructor(); - } - - public static InputPeerNotifyEvents inputPeerNotifyEventsAll() - { - return new InputPeerNotifyEventsAllConstructor(); - } - - public static InputPeerNotifySettings inputPeerNotifySettings(int mute_until, string sound, bool show_previews, - int events_mask) - { - return new InputPeerNotifySettingsConstructor(mute_until, sound, show_previews, events_mask); - } - - public static PeerNotifyEvents peerNotifyEventsEmpty() - { - return new PeerNotifyEventsEmptyConstructor(); - } - - public static PeerNotifyEvents peerNotifyEventsAll() - { - return new PeerNotifyEventsAllConstructor(); - } - - public static PeerNotifySettings peerNotifySettingsEmpty() - { - return new PeerNotifySettingsEmptyConstructor(); - } - - public static PeerNotifySettings peerNotifySettings(int mute_until, string sound, bool show_previews, int events_mask) - { - return new PeerNotifySettingsConstructor(mute_until, sound, show_previews, events_mask); - } - - public static WallPaper wallPaper(int id, string title, List sizes, int color) - { - return new WallPaperConstructor(id, title, sizes, color); - } - - public static UserFull userFull(User user, contacts_Link link, Photo profile_photo, PeerNotifySettings notify_settings, - bool blocked, string real_first_name, string real_last_name) - { - return new UserFullConstructor(user, link, profile_photo, notify_settings, blocked, real_first_name, real_last_name); - } - - public static Contact contact(int user_id, bool mutual) - { - return new ContactConstructor(user_id, mutual); - } - - public static ImportedContact importedContact(int user_id, long client_id) - { - return new ImportedContactConstructor(user_id, client_id); - } - - public static ContactBlocked contactBlocked(int user_id, int date) - { - return new ContactBlockedConstructor(user_id, date); - } - - public static ContactFound contactFound(int user_id) - { - return new ContactFoundConstructor(user_id); - } - - public static ContactSuggested contactSuggested(int user_id, int mutual_contacts) - { - return new ContactSuggestedConstructor(user_id, mutual_contacts); - } - - public static ContactStatus contactStatus(int user_id, int expires) - { - return new ContactStatusConstructor(user_id, expires); - } - - public static ChatLocated chatLocated(int chat_id, int distance) - { - return new ChatLocatedConstructor(chat_id, distance); - } - - public static contacts_ForeignLink contacts_foreignLinkUnknown() - { - return new Contacts_foreignLinkUnknownConstructor(); - } - - public static contacts_ForeignLink contacts_foreignLinkRequested(bool has_phone) - { - return new Contacts_foreignLinkRequestedConstructor(has_phone); - } - - public static contacts_ForeignLink contacts_foreignLinkMutual() - { - return new Contacts_foreignLinkMutualConstructor(); - } - - public static contacts_MyLink contacts_myLinkEmpty() - { - return new Contacts_myLinkEmptyConstructor(); - } - - public static contacts_MyLink contacts_myLinkRequested(bool contact) - { - return new Contacts_myLinkRequestedConstructor(contact); - } - - public static contacts_MyLink contacts_myLinkContact() - { - return new Contacts_myLinkContactConstructor(); - } - - public static contacts_Link contacts_link(contacts_MyLink my_link, contacts_ForeignLink foreign_link, User user) - { - return new Contacts_linkConstructor(my_link, foreign_link, user); - } - - public static contacts_Contacts contacts_contacts(List contacts, List users) - { - return new Contacts_contactsConstructor(contacts, users); - } - - public static contacts_Contacts contacts_contactsNotModified() - { - return new Contacts_contactsNotModifiedConstructor(); - } - - public static contacts_ImportedContacts contacts_importedContacts(List imported, List users) - { - return new Contacts_importedContactsConstructor(imported, users); - } - - public static contacts_Blocked contacts_blocked(List blocked, List users) - { - return new Contacts_blockedConstructor(blocked, users); - } - - public static contacts_Blocked contacts_blockedSlice(int count, List blocked, List users) - { - return new Contacts_blockedSliceConstructor(count, blocked, users); - } - - public static contacts_Found contacts_found(List results, List users) - { - return new Contacts_foundConstructor(results, users); - } - - public static contacts_Suggested contacts_suggested(List results, List users) - { - return new Contacts_suggestedConstructor(results, users); - } - - public static messages_Dialogs messages_dialogs(List dialogs, List messages, List chats, - List users) - { - return new Messages_dialogsConstructor(dialogs, messages, chats, users); - } - - public static messages_Dialogs messages_dialogsSlice(int count, List dialogs, List messages, - List chats, List users) - { - return new Messages_dialogsSliceConstructor(count, dialogs, messages, chats, users); - } - - public static messages_Messages messages_messages(List messages, List chats, List users) - { - return new Messages_messagesConstructor(messages, chats, users); - } - - public static messages_Messages messages_messagesSlice(int count, List messages, List chats, - List users) - { - return new Messages_messagesSliceConstructor(count, messages, chats, users); - } - - public static messages_Message messages_messageEmpty() - { - return new Messages_messageEmptyConstructor(); - } - - public static messages_Message messages_message(Message message, List chats, List users) - { - return new Messages_messageConstructor(message, chats, users); - } - - public static messages_StatedMessages messages_statedMessages(List messages, List chats, - List users, int pts, int seq) - { - return new Messages_statedMessagesConstructor(messages, chats, users, pts, seq); - } - - public static messages_StatedMessage messages_statedMessage(Message message, List chats, List users, - int pts, int seq) - { - return new Messages_statedMessageConstructor(message, chats, users, pts, seq); - } - - public static messages_SentMessage messages_sentMessage(int id, int date, int pts, int seq) - { - return new Messages_sentMessageConstructor(id, date, pts, seq); - } - - public static messages_Chat messages_chat(Chat chat, List users) - { - return new Messages_chatConstructor(chat, users); - } - - public static messages_Chats messages_chats(List chats, List users) - { - return new Messages_chatsConstructor(chats, users); - } - - public static messages_ChatFull messages_chatFull(ChatFull full_chat, List chats, List users) - { - return new Messages_chatFullConstructor(full_chat, chats, users); - } - - public static messages_AffectedHistory messages_affectedHistory(int pts, int seq, int offset) - { - return new Messages_affectedHistoryConstructor(pts, seq, offset); - } - - public static MessagesFilter inputMessagesFilterEmpty() - { - return new InputMessagesFilterEmptyConstructor(); - } - - public static MessagesFilter inputMessagesFilterPhotos() - { - return new InputMessagesFilterPhotosConstructor(); - } - - public static MessagesFilter inputMessagesFilterVideo() - { - return new InputMessagesFilterVideoConstructor(); - } - - public static MessagesFilter inputMessagesFilterPhotoVideo() - { - return new InputMessagesFilterPhotoVideoConstructor(); - } - - public static Update updateNewMessage(Message message, int pts) - { - return new UpdateNewMessageConstructor(message, pts); - } - - public static Update updateMessageID(int id, long random_id) - { - return new UpdateMessageIDConstructor(id, random_id); - } - - public static Update updateReadMessages(List messages, int pts) - { - return new UpdateReadMessagesConstructor(messages, pts); - } - - public static Update updateDeleteMessages(List messages, int pts) - { - return new UpdateDeleteMessagesConstructor(messages, pts); - } - - public static Update updateRestoreMessages(List messages, int pts) - { - return new UpdateRestoreMessagesConstructor(messages, pts); - } - - public static Update updateUserTyping(int user_id) - { - return new UpdateUserTypingConstructor(user_id); - } - - public static Update updateChatUserTyping(int chat_id, int user_id) - { - return new UpdateChatUserTypingConstructor(chat_id, user_id); - } - - public static Update updateChatParticipants(ChatParticipants participants) - { - return new UpdateChatParticipantsConstructor(participants); - } - - public static Update updateUserStatus(int user_id, UserStatus status) - { - return new UpdateUserStatusConstructor(user_id, status); - } - - public static Update updateUserName(int user_id, string first_name, string last_name) - { - return new UpdateUserNameConstructor(user_id, first_name, last_name); - } - - public static Update updateUserPhoto(int user_id, int date, UserProfilePhoto photo, bool previous) - { - return new UpdateUserPhotoConstructor(user_id, date, photo, previous); - } - - public static Update updateContactRegistered(int user_id, int date) - { - return new UpdateContactRegisteredConstructor(user_id, date); - } - - public static Update updateContactLink(int user_id, contacts_MyLink my_link, contacts_ForeignLink foreign_link) - { - return new UpdateContactLinkConstructor(user_id, my_link, foreign_link); - } - - public static Update updateActivation(int user_id) - { - return new UpdateActivationConstructor(user_id); - } - - public static Update updateNewAuthorization(long auth_key_id, int date, string device, string location) - { - return new UpdateNewAuthorizationConstructor(auth_key_id, date, device, location); - } - - public static updates_State updates_state(int pts, int qts, int date, int seq, int unread_count) - { - return new Updates_stateConstructor(pts, qts, date, seq, unread_count); - } - - public static updates_Difference updates_differenceEmpty(int date, int seq) - { - return new Updates_differenceEmptyConstructor(date, seq); - } - - public static updates_Difference updates_difference(List new_messages, - List new_encrypted_messages, List other_updates, List chats, List users, - updates_State state) - { - return new Updates_differenceConstructor(new_messages, new_encrypted_messages, other_updates, chats, users, state); - } - - public static updates_Difference updates_differenceSlice(List new_messages, - List new_encrypted_messages, List other_updates, List chats, List users, - updates_State intermediate_state) - { - return new Updates_differenceSliceConstructor(new_messages, new_encrypted_messages, other_updates, chats, users, - intermediate_state); - } - - public static Updates updatesTooLong() - { - return new UpdatesTooLongConstructor(); - } - - public static Updates updateShortMessage(int id, int from_id, string message, int pts, int date, int seq) - { - return new UpdateShortMessageConstructor(id, from_id, message, pts, date, seq); - } - - public static Updates updateShortChatMessage(int id, int from_id, int chat_id, string message, int pts, int date, - int seq) - { - return new UpdateShortChatMessageConstructor(id, from_id, chat_id, message, pts, date, seq); - } - - public static Updates updateShort(Update update, int date) - { - return new UpdateShortConstructor(update, date); - } - - public static Updates updatesCombined(List updates, List users, List chats, int date, - int seq_start, int seq) - { - return new UpdatesCombinedConstructor(updates, users, chats, date, seq_start, seq); - } - - public static Updates updates(List updates, List users, List chats, int date, int seq) - { - return new UpdatesConstructor(updates, users, chats, date, seq); - } - - public static photos_Photos photos_photos(List photos, List users) - { - return new Photos_photosConstructor(photos, users); - } - - public static photos_Photos photos_photosSlice(int count, List photos, List users) - { - return new Photos_photosSliceConstructor(count, photos, users); - } - - public static photos_Photo photos_photo(Photo photo, List users) - { - return new Photos_photoConstructor(photo, users); - } - - public static upload_File upload_file(storage_FileType type, int mtime, byte[] bytes) - { - return new Upload_fileConstructor(type, mtime, bytes); - } - - public static DcOption dcOption(int id, string hostname, string ip_address, int port) - { - return new DcOptionConstructor(id, hostname, ip_address, port); - } - - public static Config config(int date, bool test_mode, int this_dc, List dc_options, int chat_size_max) - { - return new ConfigConstructor(date, test_mode, this_dc, dc_options, chat_size_max); - } - - public static NearestDc nearestDc(string country, int this_dc, int nearest_dc) - { - return new NearestDcConstructor(country, this_dc, nearest_dc); - } - - public static help_AppUpdate help_appUpdate(int id, bool critical, string url, string text) - { - return new Help_appUpdateConstructor(id, critical, url, text); - } - - public static help_AppUpdate help_noAppUpdate() - { - return new Help_noAppUpdateConstructor(); - } - - public static help_InviteText help_inviteText(string message) - { - return new Help_inviteTextConstructor(message); - } - - public static messages_StatedMessages messages_statedMessagesLinks(List messages, List chats, - List users, List links, int pts, int seq) - { - return new Messages_statedMessagesLinksConstructor(messages, chats, users, links, pts, seq); - } - - public static messages_StatedMessage messages_statedMessageLink(Message message, List chats, List users, - List links, int pts, int seq) - { - return new Messages_statedMessageLinkConstructor(message, chats, users, links, pts, seq); - } - - public static messages_SentMessage messages_sentMessageLink(int id, int date, int pts, int seq, - List links) - { - return new Messages_sentMessageLinkConstructor(id, date, pts, seq, links); - } - - public static InputGeoChat inputGeoChat(int chat_id, long access_hash) - { - return new InputGeoChatConstructor(chat_id, access_hash); - } - - public static InputNotifyPeer inputNotifyGeoChatPeer(InputGeoChat peer) - { - return new InputNotifyGeoChatPeerConstructor(peer); - } - - public static Chat geoChat(int id, long access_hash, string title, string address, string venue, GeoPoint geo, - ChatPhoto photo, int participants_count, int date, bool checked_in, int version) - { - return new GeoChatConstructor(id, access_hash, title, address, venue, geo, photo, participants_count, date, - checked_in, version); - } - - public static GeoChatMessage geoChatMessageEmpty(int chat_id, int id) - { - return new GeoChatMessageEmptyConstructor(chat_id, id); - } - - public static GeoChatMessage geoChatMessage(int chat_id, int id, int from_id, int date, string message, - MessageMedia media) - { - return new GeoChatMessageConstructor(chat_id, id, from_id, date, message, media); - } - - public static GeoChatMessage geoChatMessageService(int chat_id, int id, int from_id, int date, MessageAction action) - { - return new GeoChatMessageServiceConstructor(chat_id, id, from_id, date, action); - } - - public static geochats_StatedMessage geochats_statedMessage(GeoChatMessage message, List chats, List users, - int seq) - { - return new Geochats_statedMessageConstructor(message, chats, users, seq); - } - - public static geochats_Located geochats_located(List results, List messages, - List chats, List users) - { - return new Geochats_locatedConstructor(results, messages, chats, users); - } - - public static geochats_Messages geochats_messages(List messages, List chats, List users) - { - return new Geochats_messagesConstructor(messages, chats, users); - } - - public static geochats_Messages geochats_messagesSlice(int count, List messages, List chats, - List users) - { - return new Geochats_messagesSliceConstructor(count, messages, chats, users); - } - - public static MessageAction messageActionGeoChatCreate(string title, string address) - { - return new MessageActionGeoChatCreateConstructor(title, address); - } - - public static MessageAction messageActionGeoChatCheckin() - { - return new MessageActionGeoChatCheckinConstructor(); - } - - public static Update updateNewGeoChatMessage(GeoChatMessage message) - { - return new UpdateNewGeoChatMessageConstructor(message); - } - - public static WallPaper wallPaperSolid(int id, string title, int bg_color, int color) - { - return new WallPaperSolidConstructor(id, title, bg_color, color); - } - - public static Update updateNewEncryptedMessage(EncryptedMessage message, int qts) - { - return new UpdateNewEncryptedMessageConstructor(message, qts); - } - - public static Update updateEncryptedChatTyping(int chat_id) - { - return new UpdateEncryptedChatTypingConstructor(chat_id); - } - - public static Update updateEncryption(EncryptedChat chat, int date) - { - return new UpdateEncryptionConstructor(chat, date); - } - - public static Update updateEncryptedMessagesRead(int chat_id, int max_date, int date) - { - return new UpdateEncryptedMessagesReadConstructor(chat_id, max_date, date); - } - - public static EncryptedChat encryptedChatEmpty(int id) - { - return new EncryptedChatEmptyConstructor(id); - } - - public static EncryptedChat encryptedChatWaiting(int id, long access_hash, int date, int admin_id, int participant_id) - { - return new EncryptedChatWaitingConstructor(id, access_hash, date, admin_id, participant_id); - } - - public static EncryptedChat encryptedChatRequested(int id, long access_hash, int date, int admin_id, - int participant_id, byte[] g_a, byte[] nonce) - { - return new EncryptedChatRequestedConstructor(id, access_hash, date, admin_id, participant_id, g_a, nonce); - } - - public static EncryptedChat encryptedChat(int id, long access_hash, int date, int admin_id, int participant_id, - byte[] g_a_or_b, byte[] nonce, long key_fingerprint) - { - return new EncryptedChatConstructor(id, access_hash, date, admin_id, participant_id, g_a_or_b, nonce, key_fingerprint); - } - - public static EncryptedChat encryptedChatDiscarded(int id) - { - return new EncryptedChatDiscardedConstructor(id); - } - - public static InputEncryptedChat inputEncryptedChat(int chat_id, long access_hash) - { - return new InputEncryptedChatConstructor(chat_id, access_hash); - } - - public static EncryptedFile encryptedFileEmpty() - { - return new EncryptedFileEmptyConstructor(); - } - - public static EncryptedFile encryptedFile(long id, long access_hash, int size, int dc_id, int key_fingerprint) - { - return new EncryptedFileConstructor(id, access_hash, size, dc_id, key_fingerprint); - } - - public static InputEncryptedFile inputEncryptedFileEmpty() - { - return new InputEncryptedFileEmptyConstructor(); - } - - public static InputEncryptedFile inputEncryptedFileUploaded(long id, int parts, string md5_checksum, - int key_fingerprint) - { - return new InputEncryptedFileUploadedConstructor(id, parts, md5_checksum, key_fingerprint); - } - - public static InputEncryptedFile inputEncryptedFile(long id, long access_hash) - { - return new InputEncryptedFileConstructor(id, access_hash); - } - - public static InputFileLocation inputEncryptedFileLocation(long id, long access_hash) - { - return new InputEncryptedFileLocationConstructor(id, access_hash); - } - - public static EncryptedMessage encryptedMessage(long random_id, int chat_id, int date, byte[] bytes, - EncryptedFile file) - { - return new EncryptedMessageConstructor(random_id, chat_id, date, bytes, file); - } - - public static EncryptedMessage encryptedMessageService(long random_id, int chat_id, int date, byte[] bytes) - { - return new EncryptedMessageServiceConstructor(random_id, chat_id, date, bytes); - } - - public static DecryptedMessageLayer decryptedMessageLayer(int layer, DecryptedMessage message) - { - return new DecryptedMessageLayerConstructor(layer, message); - } - - public static DecryptedMessage decryptedMessage(long random_id, byte[] random_bytes, string message, - DecryptedMessageMedia media) - { - return new DecryptedMessageConstructor(random_id, random_bytes, message, media); - } - - public static DecryptedMessage decryptedMessageService(long random_id, byte[] random_bytes, - DecryptedMessageAction action) - { - return new DecryptedMessageServiceConstructor(random_id, random_bytes, action); - } - - public static DecryptedMessageMedia decryptedMessageMediaEmpty() - { - return new DecryptedMessageMediaEmptyConstructor(); - } - - public static DecryptedMessageMedia decryptedMessageMediaPhoto(byte[] thumb, int thumb_w, int thumb_h, int w, int h, - int size, byte[] key, byte[] iv) - { - return new DecryptedMessageMediaPhotoConstructor(thumb, thumb_w, thumb_h, w, h, size, key, iv); - } - - public static DecryptedMessageMedia decryptedMessageMediaVideo(byte[] thumb, int thumb_w, int thumb_h, int duration, - int w, int h, int size, byte[] key, byte[] iv) - { - return new DecryptedMessageMediaVideoConstructor(thumb, thumb_w, thumb_h, duration, w, h, size, key, iv); - } - - public static DecryptedMessageMedia decryptedMessageMediaGeoPoint(double lat, double lng) - { - return new DecryptedMessageMediaGeoPointConstructor(lat, lng); - } - - public static DecryptedMessageMedia decryptedMessageMediaContact(string phone_number, string first_name, - string last_name, int user_id) - { - return new DecryptedMessageMediaContactConstructor(phone_number, first_name, last_name, user_id); - } - - public static DecryptedMessageAction decryptedMessageActionSetMessageTTL(int ttl_seconds) - { - return new DecryptedMessageActionSetMessageTTLConstructor(ttl_seconds); - } - - public static messages_DhConfig messages_dhConfigNotModified(byte[] random) - { - return new Messages_dhConfigNotModifiedConstructor(random); - } - - public static messages_DhConfig messages_dhConfig(int g, byte[] p, int version, byte[] random) - { - return new Messages_dhConfigConstructor(g, p, version, random); - } - - public static messages_SentEncryptedMessage messages_sentEncryptedMessage(int date) - { - return new Messages_sentEncryptedMessageConstructor(date); - } - - public static messages_SentEncryptedMessage messages_sentEncryptedFile(int date, EncryptedFile file) - { - return new Messages_sentEncryptedFileConstructor(date, file); - } - - public static InputFile inputFileBig(long id, int parts, string name) - { - return new InputFileBigConstructor(id, parts, name); - } - - public static InputEncryptedFile inputEncryptedFileBigUploaded(long id, int parts, int key_fingerprint) - { - return new InputEncryptedFileBigUploadedConstructor(id, parts, key_fingerprint); - } - - public static Update updateChatParticipantAdd(int chat_id, int user_id, int inviter_id, int version) - { - return new UpdateChatParticipantAddConstructor(chat_id, user_id, inviter_id, version); - } - - public static Update updateChatParticipantDelete(int chat_id, int user_id, int version) - { - return new UpdateChatParticipantDeleteConstructor(chat_id, user_id, version); - } - - public static Update updateDcOptions(List dc_options) - { - return new UpdateDcOptionsConstructor(dc_options); - } - - public static InputMedia inputMediaUploadedAudio(InputFile file, int duration) - { - return new InputMediaUploadedAudioConstructor(file, duration); - } - - public static InputMedia inputMediaAudio(InputAudio id) - { - return new InputMediaAudioConstructor(id); - } - - public static InputMedia inputMediaUploadedDocument(InputFile file, string file_name, string mime_type) - { - return new InputMediaUploadedDocumentConstructor(file, file_name, mime_type); - } - - public static InputMedia inputMediaUploadedThumbDocument(InputFile file, InputFile thumb, string file_name, - string mime_type) - { - return new InputMediaUploadedThumbDocumentConstructor(file, thumb, file_name, mime_type); - } - - public static InputMedia inputMediaDocument(InputDocument id) - { - return new InputMediaDocumentConstructor(id); - } - - public static MessageMedia messageMediaDocument(Document document) - { - return new MessageMediaDocumentConstructor(document); - } - - public static MessageMedia messageMediaAudio(Audio audio) - { - return new MessageMediaAudioConstructor(audio); - } - - public static InputAudio inputAudioEmpty() - { - return new InputAudioEmptyConstructor(); - } - - public static InputAudio inputAudio(long id, long access_hash) - { - return new InputAudioConstructor(id, access_hash); - } - - public static InputDocument inputDocumentEmpty() - { - return new InputDocumentEmptyConstructor(); - } - - public static InputDocument inputDocument(long id, long access_hash) - { - return new InputDocumentConstructor(id, access_hash); - } - - public static InputFileLocation inputAudioFileLocation(long id, long access_hash) - { - return new InputAudioFileLocationConstructor(id, access_hash); - } - - public static InputFileLocation inputDocumentFileLocation(long id, long access_hash) - { - return new InputDocumentFileLocationConstructor(id, access_hash); - } - - public static DecryptedMessageMedia decryptedMessageMediaDocument(byte[] thumb, int thumb_w, int thumb_h, - string file_name, string mime_type, int size, byte[] key, byte[] iv) - { - return new DecryptedMessageMediaDocumentConstructor(thumb, thumb_w, thumb_h, file_name, mime_type, size, key, iv); - } - - public static DecryptedMessageMedia decryptedMessageMediaAudio(int duration, int size, byte[] key, byte[] iv) - { - return new DecryptedMessageMediaAudioConstructor(duration, size, key, iv); - } - - public static Audio audioEmpty(long id) - { - return new AudioEmptyConstructor(id); - } - - public static Audio audio(long id, long access_hash, int user_id, int date, int duration, int size, int dc_id) - { - return new AudioConstructor(id, access_hash, user_id, date, duration, size, dc_id); - } - - public static Document documentEmpty(long id) - { - return new DocumentEmptyConstructor(id); - } - - public static Document document(long id, long access_hash, int user_id, int date, string file_name, string mime_type, - int size, PhotoSize thumb, int dc_id) - { - return new DocumentConstructor(id, access_hash, user_id, date, file_name, mime_type, size, thumb, dc_id); - } - - } - - // abstract types - public abstract class contacts_ImportedContacts : TLObject - { - - } - - public abstract class Peer : TLObject - { - - } - - public abstract class InputVideo : TLObject - { - - } - - public abstract class help_InviteText : TLObject - { - - } - - public abstract class UserStatus : TLObject - { - - } - - public abstract class MessagesFilter : TLObject - { - - } - - public abstract class Error : TLObject - { - - } - - public abstract class Updates : TLObject - { - - } - - public abstract class help_AppUpdate : TLObject - { - - } - - public abstract class InputEncryptedChat : TLObject - { - - } - - public abstract class DecryptedMessage : TLObject - { - - } - - public abstract class InputAudio : TLObject - { - - } - - public abstract class ChatLocated : TLObject - { - - } - - public abstract class PhotoSize : TLObject - { - - } - - public abstract class messages_SentEncryptedMessage : TLObject - { - - } - - public abstract class MessageMedia : TLObject - { - - } - - public abstract class InputDocument : TLObject - { - - } - - public abstract class ImportedContact : TLObject - { - - } - - public abstract class ContactBlocked : TLObject - { - - } - - public abstract class Message : TLObject - { - - } - - public abstract class InputNotifyPeer : TLObject - { - - } - - public abstract class messages_ChatFull : TLObject - { - - } - - public abstract class ChatParticipant : TLObject - { - - } - - public abstract class InputPhoto : TLObject - { - - } - - public abstract class DecryptedMessageMedia : TLObject - { - - } - - public abstract class InputFileLocation : TLObject - { - - } - - public abstract class InputEncryptedFile : TLObject - { - - } - - public abstract class contacts_ForeignLink : TLObject - { - - } - - public abstract class Document : TLObject - { - - } - - public abstract class UserFull : TLObject - { - - } - - public abstract class messages_Message : TLObject - { - - } - - public abstract class DcOption : TLObject - { - - } - - public abstract class photos_Photos : TLObject - { - - } - - public abstract class InputPeerNotifySettings : TLObject - { - - } - - public abstract class contacts_Suggested : TLObject - { - - } - - public abstract class InputGeoPoint : TLObject - { - - } - - public abstract class InputGeoChat : TLObject - { - - } - - public abstract class InputContact : TLObject - { - - } - - public abstract class EncryptedFile : TLObject - { - - } - - public abstract class PeerNotifySettings : TLObject - { - - } - - public abstract class auth_Authorization : TLObject - { - - } - - public abstract class auth_CheckedPhone : TLObject - { - - } - - public abstract class FileLocation : TLObject - { - - } - - public abstract class messages_Chats : TLObject - { - - } - - public abstract class contacts_Link : TLObject - { - - } - - public abstract class messages_StatedMessage : TLObject - { - - } - - public abstract class geochats_Located : TLObject - { - - } - - public abstract class updates_State : TLObject - { - - } - - public abstract class storage_FileType : TLObject - { - - } - - public abstract class geochats_StatedMessage : TLObject - { - - } - - public abstract class ContactFound : TLObject - { - - } - - public abstract class Photo : TLObject - { - - } - - public abstract class InputMedia : TLObject - { - - } - - public abstract class photos_Photo : TLObject - { - - } - - public abstract class InputFile : TLObject - { - - } - - public abstract class auth_ExportedAuthorization : TLObject - { - - } - - public abstract class User : TLObject - { - - } - - public abstract class NearestDc : TLObject - { - - } - - public abstract class Video : TLObject - { - - } - - public abstract class contacts_Blocked : TLObject - { - - } - - public abstract class messages_AffectedHistory : TLObject - { - - } - - public abstract class messages_Chat : TLObject - { - - } - - public abstract class Chat : TLObject - { - - } - - public abstract class ChatParticipants : TLObject - { - - } - - public abstract class InputAppEvent : TLObject - { - - } - - public abstract class messages_Messages : TLObject - { - - } - - public abstract class messages_Dialogs : TLObject - { - - } - - public abstract class InputPeer : TLObject - { - - } - - public abstract class ChatPhoto : TLObject - { - - } - - public abstract class contacts_MyLink : TLObject - { - - } - - public abstract class InputChatPhoto : TLObject - { - - } - - public abstract class messages_SentMessage : TLObject - { - - } - - public abstract class messages_StatedMessages : TLObject - { - - } - - public abstract class UserProfilePhoto : TLObject - { - - } - - public abstract class updates_Difference : TLObject - { - - } - - public abstract class Update : TLObject - { - - } - - public abstract class GeoPoint : TLObject - { - - } - - public abstract class WallPaper : TLObject - { - - } - - public abstract class DecryptedMessageLayer : TLObject - { - - } - - public abstract class Config : TLObject - { - - } - - public abstract class EncryptedMessage : TLObject - { - - } - - public abstract class Dialog : TLObject - { - - } - - public abstract class ContactStatus : TLObject - { - - } - - public abstract class InputPeerNotifyEvents : TLObject - { - - } - - public abstract class MessageAction : TLObject - { - - } - - public abstract class DecryptedMessageAction : TLObject - { - - } - - public abstract class auth_SentCode : TLObject - { - - } - - public abstract class geochats_Messages : TLObject - { - - } - - public abstract class InputUser : TLObject - { - - } - - public abstract class EncryptedChat : TLObject - { - - } - - public abstract class contacts_Contacts : TLObject - { - - } - - public abstract class GeoChatMessage : TLObject - { - - } - - public abstract class PeerNotifyEvents : TLObject - { - - } - - public abstract class contacts_Found : TLObject - { - - } - - public abstract class Audio : TLObject - { - - } - - public abstract class ChatFull : TLObject - { - - } - - public abstract class messages_DhConfig : TLObject - { - - } - - public abstract class Contact : TLObject - { - - } - - public abstract class upload_File : TLObject - { - - } - - public abstract class InputPhotoCrop : TLObject - { - - } - - public abstract class ContactSuggested : TLObject - { - - } - - // types implementations - - - public class ErrorConstructor : Error - { - public int code; - public string text; - - public ErrorConstructor() - { - - } - - public ErrorConstructor(int code, string text) - { - this.code = code; - this.text = text; - } - - - public override Constructor Constructor - { - get { return Constructor.error; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xc4b9f9bb); - writer.Write(this.code); - Serializers.String.write(writer, this.text); - } - - public override void Read(BinaryReader reader) - { - this.code = reader.ReadInt32(); - this.text = Serializers.String.read(reader); - } - - public override string ToString() - { - return String.Format("(error code:{0} text:'{1}')", code, text); - } - } - - - public class InputPeerEmptyConstructor : InputPeer - { - - public InputPeerEmptyConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.inputPeerEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x7f3b18ea); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(inputPeerEmpty)"); - } - } - - - public class InputPeerSelfConstructor : InputPeer - { - - public InputPeerSelfConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.inputPeerSelf; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x7da07ec9); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(inputPeerSelf)"); - } - } - - - public class InputPeerContactConstructor : InputPeer - { - public int user_id; - - public InputPeerContactConstructor() - { - - } - - public InputPeerContactConstructor(int user_id) - { - this.user_id = user_id; - } - - - public override Constructor Constructor - { - get { return Constructor.inputPeerContact; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x1023dbe8); - writer.Write(this.user_id); - } - - public override void Read(BinaryReader reader) - { - this.user_id = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(inputPeerContact user_id:{0})", user_id); - } - } - - - public class InputPeerForeignConstructor : InputPeer - { - public int user_id; - public long access_hash; - - public InputPeerForeignConstructor() - { - - } - - public InputPeerForeignConstructor(int user_id, long access_hash) - { - this.user_id = user_id; - this.access_hash = access_hash; - } - - - public override Constructor Constructor - { - get { return Constructor.inputPeerForeign; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x9b447325); - writer.Write(this.user_id); - writer.Write(this.access_hash); - } - - public override void Read(BinaryReader reader) - { - this.user_id = reader.ReadInt32(); - this.access_hash = reader.ReadInt64(); - } - - public override string ToString() - { - return String.Format("(inputPeerForeign user_id:{0} access_hash:{1})", user_id, access_hash); - } - } - - - public class InputPeerChatConstructor : InputPeer - { - public int chat_id; - - public InputPeerChatConstructor() - { - - } - - public InputPeerChatConstructor(int chat_id) - { - this.chat_id = chat_id; - } - - - public override Constructor Constructor - { - get { return Constructor.inputPeerChat; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x179be863); - writer.Write(this.chat_id); - } - - public override void Read(BinaryReader reader) - { - this.chat_id = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(inputPeerChat chat_id:{0})", chat_id); - } - } - - - public class InputUserEmptyConstructor : InputUser - { - - public InputUserEmptyConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.inputUserEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xb98886cf); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(inputUserEmpty)"); - } - } - - - public class InputUserSelfConstructor : InputUser - { - - public InputUserSelfConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.inputUserSelf; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xf7c1b13f); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(inputUserSelf)"); - } - } - - - public class InputUserContactConstructor : InputUser - { - public int user_id; - - public InputUserContactConstructor() - { - - } - - public InputUserContactConstructor(int user_id) - { - this.user_id = user_id; - } - - - public override Constructor Constructor - { - get { return Constructor.inputUserContact; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x86e94f65); - writer.Write(this.user_id); - } - - public override void Read(BinaryReader reader) - { - this.user_id = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(inputUserContact user_id:{0})", user_id); - } - } - - - public class InputUserForeignConstructor : InputUser - { - public int user_id; - public long access_hash; - - public InputUserForeignConstructor() - { - - } - - public InputUserForeignConstructor(int user_id, long access_hash) - { - this.user_id = user_id; - this.access_hash = access_hash; - } - - - public override Constructor Constructor - { - get { return Constructor.inputUserForeign; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x655e74ff); - writer.Write(this.user_id); - writer.Write(this.access_hash); - } - - public override void Read(BinaryReader reader) - { - this.user_id = reader.ReadInt32(); - this.access_hash = reader.ReadInt64(); - } - - public override string ToString() - { - return String.Format("(inputUserForeign user_id:{0} access_hash:{1})", user_id, access_hash); - } - } - - - public class InputPhoneContactConstructor : InputContact - { - public long client_id; - public string phone; - public string first_name; - public string last_name; - - public InputPhoneContactConstructor() - { - - } - - public InputPhoneContactConstructor(long client_id, string phone, string first_name, string last_name) - { - this.client_id = client_id; - this.phone = phone; - this.first_name = first_name; - this.last_name = last_name; - } - - - public override Constructor Constructor - { - get { return Constructor.inputPhoneContact; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xf392b7f4); - writer.Write(this.client_id); - Serializers.String.write(writer, this.phone); - Serializers.String.write(writer, this.first_name); - Serializers.String.write(writer, this.last_name); - } - - public override void Read(BinaryReader reader) - { - this.client_id = reader.ReadInt64(); - this.phone = Serializers.String.read(reader); - this.first_name = Serializers.String.read(reader); - this.last_name = Serializers.String.read(reader); - } - - public override string ToString() - { - return String.Format("(inputPhoneContact client_id:{0} phone:'{1}' first_name:'{2}' last_name:'{3}')", client_id, - phone, first_name, last_name); - } - } - - - public class InputFileConstructor : InputFile - { - public long id; - public int parts; - public string name; - public string md5_checksum; - - public InputFileConstructor() - { - - } - - public InputFileConstructor(long id, int parts, string name, string md5_checksum) - { - this.id = id; - this.parts = parts; - this.name = name; - this.md5_checksum = md5_checksum; - } - - - public override Constructor Constructor - { - get { return Constructor.inputFile; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xf52ff27f); - writer.Write(this.id); - writer.Write(this.parts); - Serializers.String.write(writer, this.name); - Serializers.String.write(writer, this.md5_checksum); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt64(); - this.parts = reader.ReadInt32(); - this.name = Serializers.String.read(reader); - this.md5_checksum = Serializers.String.read(reader); - } - - public override string ToString() - { - return String.Format("(inputFile id:{0} parts:{1} name:'{2}' md5_checksum:'{3}')", id, parts, name, md5_checksum); - } - } - - - public class InputMediaEmptyConstructor : InputMedia - { - - public InputMediaEmptyConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.inputMediaEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x9664f57f); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(inputMediaEmpty)"); - } - } - - - public class InputMediaUploadedPhotoConstructor : InputMedia - { - public InputFile file; - - public InputMediaUploadedPhotoConstructor() - { - - } - - public InputMediaUploadedPhotoConstructor(InputFile file) - { - this.file = file; - } - - - public override Constructor Constructor - { - get { return Constructor.inputMediaUploadedPhoto; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x2dc53a7d); - this.file.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.file = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(inputMediaUploadedPhoto file:{0})", file); - } - } - - - public class InputMediaPhotoConstructor : InputMedia - { - public InputPhoto id; - - public InputMediaPhotoConstructor() - { - - } - - public InputMediaPhotoConstructor(InputPhoto id) - { - this.id = id; - } - - - public override Constructor Constructor - { - get { return Constructor.inputMediaPhoto; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x8f2ab2ec); - this.id.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.id = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(inputMediaPhoto id:{0})", id); - } - } - - - public class InputMediaGeoPointConstructor : InputMedia - { - public InputGeoPoint geo_point; - - public InputMediaGeoPointConstructor() - { - - } - - public InputMediaGeoPointConstructor(InputGeoPoint geo_point) - { - this.geo_point = geo_point; - } - - - public override Constructor Constructor - { - get { return Constructor.inputMediaGeoPoint; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xf9c44144); - this.geo_point.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.geo_point = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(inputMediaGeoPoint geo_point:{0})", geo_point); - } - } - - - public class InputMediaContactConstructor : InputMedia - { - public string phone_number; - public string first_name; - public string last_name; - - public InputMediaContactConstructor() - { - - } - - public InputMediaContactConstructor(string phone_number, string first_name, string last_name) - { - this.phone_number = phone_number; - this.first_name = first_name; - this.last_name = last_name; - } - - - public override Constructor Constructor - { - get { return Constructor.inputMediaContact; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xa6e45987); - Serializers.String.write(writer, this.phone_number); - Serializers.String.write(writer, this.first_name); - Serializers.String.write(writer, this.last_name); - } - - public override void Read(BinaryReader reader) - { - this.phone_number = Serializers.String.read(reader); - this.first_name = Serializers.String.read(reader); - this.last_name = Serializers.String.read(reader); - } - - public override string ToString() - { - return String.Format("(inputMediaContact phone_number:'{0}' first_name:'{1}' last_name:'{2}')", phone_number, - first_name, last_name); - } - } - - - public class InputMediaUploadedVideoConstructor : InputMedia - { - public InputFile file; - public int duration; - public int w; - public int h; - - public InputMediaUploadedVideoConstructor() - { - - } - - public InputMediaUploadedVideoConstructor(InputFile file, int duration, int w, int h) - { - this.file = file; - this.duration = duration; - this.w = w; - this.h = h; - } - - - public override Constructor Constructor - { - get { return Constructor.inputMediaUploadedVideo; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x4847d92a); - this.file.Write(writer); - writer.Write(this.duration); - writer.Write(this.w); - writer.Write(this.h); - } - - public override void Read(BinaryReader reader) - { - this.file = TL.Parse(reader); - this.duration = reader.ReadInt32(); - this.w = reader.ReadInt32(); - this.h = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(inputMediaUploadedVideo file:{0} duration:{1} w:{2} h:{3})", file, duration, w, h); - } - } - - - public class InputMediaUploadedThumbVideoConstructor : InputMedia - { - public InputFile file; - public InputFile thumb; - public int duration; - public int w; - public int h; - - public InputMediaUploadedThumbVideoConstructor() - { - - } - - public InputMediaUploadedThumbVideoConstructor(InputFile file, InputFile thumb, int duration, int w, int h) - { - this.file = file; - this.thumb = thumb; - this.duration = duration; - this.w = w; - this.h = h; - } - - - public override Constructor Constructor - { - get { return Constructor.inputMediaUploadedThumbVideo; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xe628a145); - this.file.Write(writer); - this.thumb.Write(writer); - writer.Write(this.duration); - writer.Write(this.w); - writer.Write(this.h); - } - - public override void Read(BinaryReader reader) - { - this.file = TL.Parse(reader); - this.thumb = TL.Parse(reader); - this.duration = reader.ReadInt32(); - this.w = reader.ReadInt32(); - this.h = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(inputMediaUploadedThumbVideo file:{0} thumb:{1} duration:{2} w:{3} h:{4})", file, thumb, - duration, w, h); - } - } - - - public class InputMediaVideoConstructor : InputMedia - { - public InputVideo id; - - public InputMediaVideoConstructor() - { - - } - - public InputMediaVideoConstructor(InputVideo id) - { - this.id = id; - } - - - public override Constructor Constructor - { - get { return Constructor.inputMediaVideo; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x7f023ae6); - this.id.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.id = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(inputMediaVideo id:{0})", id); - } - } - - - public class InputChatPhotoEmptyConstructor : InputChatPhoto - { - - public InputChatPhotoEmptyConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.inputChatPhotoEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x1ca48f57); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(inputChatPhotoEmpty)"); - } - } - - - public class InputChatUploadedPhotoConstructor : InputChatPhoto - { - public InputFile file; - public InputPhotoCrop crop; - - public InputChatUploadedPhotoConstructor() - { - - } - - public InputChatUploadedPhotoConstructor(InputFile file, InputPhotoCrop crop) - { - this.file = file; - this.crop = crop; - } - - - public override Constructor Constructor - { - get { return Constructor.inputChatUploadedPhoto; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x94254732); - this.file.Write(writer); - this.crop.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.file = TL.Parse(reader); - this.crop = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(inputChatUploadedPhoto file:{0} crop:{1})", file, crop); - } - } - - - public class InputChatPhotoConstructor : InputChatPhoto - { - public InputPhoto id; - public InputPhotoCrop crop; - - public InputChatPhotoConstructor() - { - - } - - public InputChatPhotoConstructor(InputPhoto id, InputPhotoCrop crop) - { - this.id = id; - this.crop = crop; - } - - - public override Constructor Constructor - { - get { return Constructor.inputChatPhoto; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xb2e1bf08); - this.id.Write(writer); - this.crop.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.id = TL.Parse(reader); - this.crop = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(inputChatPhoto id:{0} crop:{1})", id, crop); - } - } - - - public class InputGeoPointEmptyConstructor : InputGeoPoint - { - - public InputGeoPointEmptyConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.inputGeoPointEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xe4c123d6); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(inputGeoPointEmpty)"); - } - } - - - public class InputGeoPointConstructor : InputGeoPoint - { - public double lat; - public double lng; - - public InputGeoPointConstructor() - { - - } - - public InputGeoPointConstructor(double lat, double lng) - { - this.lat = lat; - this.lng = lng; - } - - - public override Constructor Constructor - { - get { return Constructor.inputGeoPoint; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xf3b7acc9); - writer.Write(this.lat); - writer.Write(this.lng); - } - - public override void Read(BinaryReader reader) - { - this.lat = reader.ReadDouble(); - this.lng = reader.ReadDouble(); - } - - public override string ToString() - { - return String.Format("(inputGeoPoint lat:{0} long:{1})", lat, lng); - } - } - - - public class InputPhotoEmptyConstructor : InputPhoto - { - - public InputPhotoEmptyConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.inputPhotoEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x1cd7bf0d); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(inputPhotoEmpty)"); - } - } - - - public class InputPhotoConstructor : InputPhoto - { - public long id; - public long access_hash; - - public InputPhotoConstructor() - { - - } - - public InputPhotoConstructor(long id, long access_hash) - { - this.id = id; - this.access_hash = access_hash; - } - - - public override Constructor Constructor - { - get { return Constructor.inputPhoto; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xfb95c6c4); - writer.Write(this.id); - writer.Write(this.access_hash); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt64(); - this.access_hash = reader.ReadInt64(); - } - - public override string ToString() - { - return String.Format("(inputPhoto id:{0} access_hash:{1})", id, access_hash); - } - } - - - public class InputVideoEmptyConstructor : InputVideo - { - - public InputVideoEmptyConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.inputVideoEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x5508ec75); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(inputVideoEmpty)"); - } - } - - - public class InputVideoConstructor : InputVideo - { - public long id; - public long access_hash; - - public InputVideoConstructor() - { - - } - - public InputVideoConstructor(long id, long access_hash) - { - this.id = id; - this.access_hash = access_hash; - } - - - public override Constructor Constructor - { - get { return Constructor.inputVideo; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xee579652); - writer.Write(this.id); - writer.Write(this.access_hash); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt64(); - this.access_hash = reader.ReadInt64(); - } - - public override string ToString() - { - return String.Format("(inputVideo id:{0} access_hash:{1})", id, access_hash); - } - } - - - public class InputFileLocationConstructor : InputFileLocation - { - public long volume_id; - public int local_id; - public long secret; - - public InputFileLocationConstructor() - { - - } - - public InputFileLocationConstructor(long volume_id, int local_id, long secret) - { - this.volume_id = volume_id; - this.local_id = local_id; - this.secret = secret; - } - - - public override Constructor Constructor - { - get { return Constructor.inputFileLocation; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x14637196); - writer.Write(this.volume_id); - writer.Write(this.local_id); - writer.Write(this.secret); - } - - public override void Read(BinaryReader reader) - { - this.volume_id = reader.ReadInt64(); - this.local_id = reader.ReadInt32(); - this.secret = reader.ReadInt64(); - } - - public override string ToString() - { - return String.Format("(inputFileLocation volume_id:{0} local_id:{1} secret:{2})", volume_id, local_id, secret); - } - } - - - public class InputVideoFileLocationConstructor : InputFileLocation - { - public long id; - public long access_hash; - - public InputVideoFileLocationConstructor() - { - - } - - public InputVideoFileLocationConstructor(long id, long access_hash) - { - this.id = id; - this.access_hash = access_hash; - } - - - public override Constructor Constructor - { - get { return Constructor.inputVideoFileLocation; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x3d0364ec); - writer.Write(this.id); - writer.Write(this.access_hash); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt64(); - this.access_hash = reader.ReadInt64(); - } - - public override string ToString() - { - return String.Format("(inputVideoFileLocation id:{0} access_hash:{1})", id, access_hash); - } - } - - - public class InputPhotoCropAutoConstructor : InputPhotoCrop - { - - public InputPhotoCropAutoConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.inputPhotoCropAuto; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xade6b004); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(inputPhotoCropAuto)"); - } - } - - - public class InputPhotoCropConstructor : InputPhotoCrop - { - public double crop_left; - public double crop_top; - public double crop_width; - - public InputPhotoCropConstructor() - { - - } - - public InputPhotoCropConstructor(double crop_left, double crop_top, double crop_width) - { - this.crop_left = crop_left; - this.crop_top = crop_top; - this.crop_width = crop_width; - } - - - public override Constructor Constructor - { - get { return Constructor.inputPhotoCrop; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xd9915325); - writer.Write(this.crop_left); - writer.Write(this.crop_top); - writer.Write(this.crop_width); - } - - public override void Read(BinaryReader reader) - { - this.crop_left = reader.ReadDouble(); - this.crop_top = reader.ReadDouble(); - this.crop_width = reader.ReadDouble(); - } - - public override string ToString() - { - return String.Format("(inputPhotoCrop crop_left:{0} crop_top:{1} crop_width:{2})", crop_left, crop_top, crop_width); - } - } - - - public class InputAppEventConstructor : InputAppEvent - { - public double time; - public string type; - public long peer; - public string data; - - public InputAppEventConstructor() - { - - } - - public InputAppEventConstructor(double time, string type, long peer, string data) - { - this.time = time; - this.type = type; - this.peer = peer; - this.data = data; - } - - - public override Constructor Constructor - { - get { return Constructor.inputAppEvent; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x770656a8); - writer.Write(this.time); - Serializers.String.write(writer, this.type); - writer.Write(this.peer); - Serializers.String.write(writer, this.data); - } - - public override void Read(BinaryReader reader) - { - this.time = reader.ReadDouble(); - this.type = Serializers.String.read(reader); - this.peer = reader.ReadInt64(); - this.data = Serializers.String.read(reader); - } - - public override string ToString() - { - return String.Format("(inputAppEvent time:{0} type:'{1}' peer:{2} data:'{3}')", time, type, peer, data); - } - } - - - public class PeerUserConstructor : Peer - { - public int user_id; - - public PeerUserConstructor() - { - - } - - public PeerUserConstructor(int user_id) - { - this.user_id = user_id; - } - - - public override Constructor Constructor - { - get { return Constructor.peerUser; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x9db1bc6d); - writer.Write(this.user_id); - } - - public override void Read(BinaryReader reader) - { - this.user_id = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(peerUser user_id:{0})", user_id); - } - } - - - public class PeerChatConstructor : Peer - { - public int chat_id; - - public PeerChatConstructor() - { - - } - - public PeerChatConstructor(int chat_id) - { - this.chat_id = chat_id; - } - - - public override Constructor Constructor - { - get { return Constructor.peerChat; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xbad0e5bb); - writer.Write(this.chat_id); - } - - public override void Read(BinaryReader reader) - { - this.chat_id = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(peerChat chat_id:{0})", chat_id); - } - } - - - public class Storage_fileUnknownConstructor : storage_FileType - { - - public Storage_fileUnknownConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.storage_fileUnknown; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xaa963b05); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(storage_fileUnknown)"); - } - } - - - public class Storage_fileJpegConstructor : storage_FileType - { - - public Storage_fileJpegConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.storage_fileJpeg; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x007efe0e); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(storage_fileJpeg)"); - } - } - - - public class Storage_fileGifConstructor : storage_FileType - { - - public Storage_fileGifConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.storage_fileGif; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xcae1aadf); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(storage_fileGif)"); - } - } - - - public class Storage_filePngConstructor : storage_FileType - { - - public Storage_filePngConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.storage_filePng; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x0a4f63c0); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(storage_filePng)"); - } - } - - - public class Storage_fileMp3Constructor : storage_FileType - { - - public Storage_fileMp3Constructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.storage_fileMp3; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x528a0677); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(storage_fileMp3)"); - } - } - - - public class Storage_fileMovConstructor : storage_FileType - { - - public Storage_fileMovConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.storage_fileMov; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x4b09ebbc); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(storage_fileMov)"); - } - } - - - public class Storage_filePartialConstructor : storage_FileType - { - - public Storage_filePartialConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.storage_filePartial; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x40bc6f52); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(storage_filePartial)"); - } - } - - - public class Storage_fileMp4Constructor : storage_FileType - { - - public Storage_fileMp4Constructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.storage_fileMp4; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xb3cea0e4); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(storage_fileMp4)"); - } - } - - - public class Storage_fileWebpConstructor : storage_FileType - { - - public Storage_fileWebpConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.storage_fileWebp; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x1081464c); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(storage_fileWebp)"); - } - } - - - public class FileLocationUnavailableConstructor : FileLocation - { - public long volume_id; - public int local_id; - public long secret; - - public FileLocationUnavailableConstructor() - { - - } - - public FileLocationUnavailableConstructor(long volume_id, int local_id, long secret) - { - this.volume_id = volume_id; - this.local_id = local_id; - this.secret = secret; - } - - - public override Constructor Constructor - { - get { return Constructor.fileLocationUnavailable; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x7c596b46); - writer.Write(this.volume_id); - writer.Write(this.local_id); - writer.Write(this.secret); - } - - public override void Read(BinaryReader reader) - { - this.volume_id = reader.ReadInt64(); - this.local_id = reader.ReadInt32(); - this.secret = reader.ReadInt64(); - } - - public override string ToString() - { - return String.Format("(fileLocationUnavailable volume_id:{0} local_id:{1} secret:{2})", volume_id, local_id, secret); - } - } - - - public class FileLocationConstructor : FileLocation - { - public int dc_id; - public long volume_id; - public int local_id; - public long secret; - - public FileLocationConstructor() - { - - } - - public FileLocationConstructor(int dc_id, long volume_id, int local_id, long secret) - { - this.dc_id = dc_id; - this.volume_id = volume_id; - this.local_id = local_id; - this.secret = secret; - } - - - public override Constructor Constructor - { - get { return Constructor.fileLocation; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x53d69076); - writer.Write(this.dc_id); - writer.Write(this.volume_id); - writer.Write(this.local_id); - writer.Write(this.secret); - } - - public override void Read(BinaryReader reader) - { - this.dc_id = reader.ReadInt32(); - this.volume_id = reader.ReadInt64(); - this.local_id = reader.ReadInt32(); - this.secret = reader.ReadInt64(); - } - - public override string ToString() - { - return String.Format("(fileLocation dc_id:{0} volume_id:{1} local_id:{2} secret:{3})", dc_id, volume_id, local_id, - secret); - } - } - - - public class UserEmptyConstructor : User - { - public int id; - - public UserEmptyConstructor() - { - - } - - public UserEmptyConstructor(int id) - { - this.id = id; - } - - - public override Constructor Constructor - { - get { return Constructor.userEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x200250ba); - writer.Write(this.id); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(userEmpty id:{0})", id); - } - } - - - public class UserSelfConstructor : User //userSelf#7007b451 id:int first_name:string last_name:string username:string phone:string photo:UserProfilePhoto status:UserStatus inactive:Bool = User; - { - public int id; - public string first_name; - public string last_name; - public string username; - public string phone; - public UserProfilePhoto photo; - public UserStatus status; - public bool inactive; - - public UserSelfConstructor() - { - - } - - public UserSelfConstructor(int id, string first_name, string last_name, string username, string phone, UserProfilePhoto photo, - UserStatus status, bool inactive) - { - this.id = id; - this.first_name = first_name; - this.last_name = last_name; - this.username = username; - this.phone = phone; - this.photo = photo; - this.status = status; - this.inactive = inactive; - } - - - public override Constructor Constructor - { - get { return Constructor.userSelf; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x720535ec); - writer.Write(this.id); - Serializers.String.write(writer, this.first_name); - Serializers.String.write(writer, this.last_name); - Serializers.String.write(writer, this.username); - Serializers.String.write(writer, this.phone); - this.photo.Write(writer); - this.status.Write(writer); - writer.Write(this.inactive ? 0x997275b5 : 0xbc799737); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - this.first_name = Serializers.String.read(reader); - this.last_name = Serializers.String.read(reader); - this.username = Serializers.String.read(reader); - this.phone = Serializers.String.read(reader); - this.photo = TL.Parse(reader); - this.status = TL.Parse(reader); - this.inactive = reader.ReadUInt32() == 0x997275b5; - } - - public override string ToString() - { - return - String.Format("(userSelf id:{0} first_name:'{1}' last_name:'{2}' username: '{3}' phone:'{4}' photo:{5} status:{6} inactive:{7})", id, - first_name, last_name, username, phone, photo, status, inactive); - } - } - - - public class UserContactConstructor : User //userContact#cab35e18 id:int first_name:string last_name:string username:string access_hash:long phone:string photo:UserProfilePhoto status:UserStatus = User; - { - public int id; - public string first_name; - public string last_name; - public string username; - public long access_hash; - public string phone; - public UserProfilePhoto photo; - public UserStatus status; - - public UserContactConstructor() - { - - } - - public UserContactConstructor(int id, string first_name, string last_name, string username, long access_hash, string phone, - UserProfilePhoto photo, UserStatus status) - { - this.id = id; - this.first_name = first_name; - this.last_name = last_name; - this.username = username; - this.access_hash = access_hash; - this.phone = phone; - this.photo = photo; - this.status = status; - } - - - public override Constructor Constructor - { - get { return Constructor.userContact; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xcab35e18); - writer.Write(this.id); - Serializers.String.write(writer, this.first_name); - Serializers.String.write(writer, this.last_name); - Serializers.String.write(writer, this.username); - writer.Write(this.access_hash); - Serializers.String.write(writer, this.phone); - this.photo.Write(writer); - this.status.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - this.first_name = Serializers.String.read(reader); - this.last_name = Serializers.String.read(reader); - this.username = Serializers.String.read(reader); - this.access_hash = reader.ReadInt64(); - this.phone = Serializers.String.read(reader); - this.photo = TL.Parse(reader); - this.status = TL.Parse(reader); - } - - public override string ToString() - { - return - String.Format( - "(userContact id:{0} first_name:'{1}' last_name:'{2}' username: '{3}' access_hash:{4} phone:'{5}' photo:{6} status:{7})", id, - first_name, last_name, username, access_hash, phone, photo, status); - } - } - - - public class UserRequestConstructor : User //userRequest#d9ccc4ef id:int first_name:string last_name:string username:string access_hash:long phone:string photo:UserProfilePhoto status:UserStatus = User; - { - public int id; - public string first_name; - public string last_name; - public string username; - public long access_hash; - public string phone; - public UserProfilePhoto photo; - public UserStatus status; - - public UserRequestConstructor() - { - - } - - public UserRequestConstructor(int id, string first_name, string last_name, string username, long access_hash, string phone, - UserProfilePhoto photo, UserStatus status) - { - this.id = id; - this.first_name = first_name; - this.last_name = last_name; - this.username = username; - this.access_hash = access_hash; - this.phone = phone; - this.photo = photo; - this.status = status; - } - - - public override Constructor Constructor - { - get { return Constructor.userRequest; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x22e8ceb0); - writer.Write(this.id); - Serializers.String.write(writer, this.first_name); - Serializers.String.write(writer, this.last_name); - Serializers.String.write(writer, this.username); - writer.Write(this.access_hash); - Serializers.String.write(writer, this.phone); - this.photo.Write(writer); - this.status.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - this.first_name = Serializers.String.read(reader); - this.last_name = Serializers.String.read(reader); - this.username = Serializers.String.read(reader); - this.access_hash = reader.ReadInt64(); - this.phone = Serializers.String.read(reader); - this.photo = TL.Parse(reader); - this.status = TL.Parse(reader); - } - - public override string ToString() - { - return - String.Format( - "(userRequest id:{0} first_name:'{1}' last_name:'{2}' username:'{3}' access_hash:{4} phone:'{5}' photo:{6} status:{7})", id, - first_name, last_name, username, access_hash, phone, photo, status); - } - } - - - public class UserForeignConstructor : User //userForeign#75cf7a8 id:int first_name:string last_name:string username:string access_hash:long photo:UserProfilePhoto status:UserStatus = User; - { - public int id; - public string first_name; - public string last_name; - public string username; - public long access_hash; - public UserProfilePhoto photo; - public UserStatus status; - - public UserForeignConstructor() - { - - } - - public UserForeignConstructor(int id, string first_name, string last_name, string username, long access_hash, UserProfilePhoto photo, UserStatus status) - { - this.id = id; - this.first_name = first_name; - this.last_name = last_name; - this.username = username; - this.access_hash = access_hash; - this.photo = photo; - this.status = status; - } - - - public override Constructor Constructor - { - get { return Constructor.userForeign; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x5214c89d); - writer.Write(this.id); - Serializers.String.write(writer, this.first_name); - Serializers.String.write(writer, this.last_name); - Serializers.String.write(writer, this.username); - writer.Write(this.access_hash); - this.photo.Write(writer); - this.status.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - this.first_name = Serializers.String.read(reader); - this.last_name = Serializers.String.read(reader); - this.username = Serializers.String.read(reader); - this.access_hash = reader.ReadInt64(); - this.photo = TL.Parse(reader); - this.status = TL.Parse(reader); - long tamano = reader.BaseStream.Length; - } - - public override string ToString() - { - return String.Format("(userForeign id:{0} first_name:'{1}' last_name:'{2}' username:'{3}' access_hash:{4} photo:{5} status:{6})", id, - first_name, last_name, username, access_hash, photo, status); - } - } - - - public class UserDeletedConstructor : User //userDeleted#d6016d7a id:int first_name:string last_name:string username:string = User; - { - public int id; - public string first_name; - public string last_name; - public string username; - - public UserDeletedConstructor() - { - - } - - public UserDeletedConstructor(int id, string first_name, string last_name, string username) - { - this.id = id; - this.first_name = first_name; - this.last_name = last_name; - this.username = username; - } - - - public override Constructor Constructor - { - get { return Constructor.userDeleted; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xb29ad7cc); - writer.Write(this.id); - Serializers.String.write(writer, this.first_name); - Serializers.String.write(writer, this.last_name); - Serializers.String.write(writer, this.username); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - this.first_name = Serializers.String.read(reader); - this.last_name = Serializers.String.read(reader); - this.username = Serializers.String.read(reader); - } - - public override string ToString() - { - return String.Format("(userDeleted id:{0} first_name:'{1}' last_name:'{2}' username: '{3}')", id, first_name, last_name, username); - } - } - - - public class UserProfilePhotoEmptyConstructor : UserProfilePhoto - { - - public UserProfilePhotoEmptyConstructor() - { - - } - - public override Constructor Constructor - { - get { return Constructor.userProfilePhotoEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x4f11bae1); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(userProfilePhotoEmpty)"); - } - } - - - public class UserProfilePhotoConstructor : UserProfilePhoto - { - public long photo_id; - public FileLocation photo_small; - public FileLocation photo_big; - - public UserProfilePhotoConstructor() - { - - } - - public UserProfilePhotoConstructor(long photo_id, FileLocation photo_small, FileLocation photo_big) - { - this.photo_id = photo_id; - this.photo_small = photo_small; - this.photo_big = photo_big; - } - - - public override Constructor Constructor - { - get { return Constructor.userProfilePhoto; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xd559d8c8); - writer.Write(this.photo_id); - this.photo_small.Write(writer); - this.photo_big.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.photo_id = reader.ReadInt64(); - this.photo_small = TL.Parse(reader); - this.photo_big = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(userProfilePhoto photo_id:{0} photo_small:{1} photo_big:{2})", photo_id, photo_small, - photo_big); - } - } - - - public class UserStatusEmptyConstructor : UserStatus - { - - public UserStatusEmptyConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.userStatusEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x09d05049); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(userStatusEmpty)"); - } - } - - - public class UserStatusOnlineConstructor : UserStatus - { - public int expires; - - public UserStatusOnlineConstructor() - { - - } - - public UserStatusOnlineConstructor(int expires) - { - this.expires = expires; - } - - - public override Constructor Constructor - { - get { return Constructor.userStatusOnline; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xedb93949); - writer.Write(this.expires); - } - - public override void Read(BinaryReader reader) - { - this.expires = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(userStatusOnline expires:{0})", expires); - } - } - - - public class UserStatusOfflineConstructor : UserStatus - { - public int was_online; - - public UserStatusOfflineConstructor() - { - - } - - public UserStatusOfflineConstructor(int was_online) - { - this.was_online = was_online; - } - - - public override Constructor Constructor - { - get { return Constructor.userStatusOffline; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x008c703f); - writer.Write(this.was_online); - } - - public override void Read(BinaryReader reader) - { - this.was_online = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(userStatusOffline was_online:{0})", was_online); - } - } - - - public class ChatEmptyConstructor : Chat - { - public int id; - - public ChatEmptyConstructor() - { - - } - - public ChatEmptyConstructor(int id) - { - this.id = id; - } - - - public override Constructor Constructor - { - get { return Constructor.chatEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x9ba2d800); - writer.Write(this.id); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(chatEmpty id:{0})", id); - } - } - - - public class ChatConstructor : Chat - { - public int id; - public string title; - public ChatPhoto photo; - public int participants_count; - public int date; - public bool left; - public int version; - - public ChatConstructor() - { - - } - - public ChatConstructor(int id, string title, ChatPhoto photo, int participants_count, int date, bool left, int version) - { - this.id = id; - this.title = title; - this.photo = photo; - this.participants_count = participants_count; - this.date = date; - this.left = left; - this.version = version; - } - - - public override Constructor Constructor - { - get { return Constructor.chat; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x6e9c9bc7); - writer.Write(this.id); - Serializers.String.write(writer, this.title); - this.photo.Write(writer); - writer.Write(this.participants_count); - writer.Write(this.date); - writer.Write(this.left ? 0x997275b5 : 0xbc799737); - writer.Write(this.version); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - this.title = Serializers.String.read(reader); - this.photo = TL.Parse(reader); - this.participants_count = reader.ReadInt32(); - this.date = reader.ReadInt32(); - this.left = reader.ReadUInt32() == 0x997275b5; - this.version = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(chat id:{0} title:'{1}' photo:{2} participants_count:{3} date:{4} left:{5} version:{6})", id, - title, photo, participants_count, date, left, version); - } - } - - - public class ChatForbiddenConstructor : Chat - { - public int id; - public string title; - public int date; - - public ChatForbiddenConstructor() - { - - } - - public ChatForbiddenConstructor(int id, string title, int date) - { - this.id = id; - this.title = title; - this.date = date; - } - - - public override Constructor Constructor - { - get { return Constructor.chatForbidden; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xfb0ccc41); - writer.Write(this.id); - Serializers.String.write(writer, this.title); - writer.Write(this.date); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - this.title = Serializers.String.read(reader); - this.date = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(chatForbidden id:{0} title:'{1}' date:{2})", id, title, date); - } - } - - - public class ChatFullConstructor : ChatFull - { - public int id; - public ChatParticipants participants; - public Photo chat_photo; - public PeerNotifySettings notify_settings; - - public ChatFullConstructor() - { - - } - - public ChatFullConstructor(int id, ChatParticipants participants, Photo chat_photo, PeerNotifySettings notify_settings) - { - this.id = id; - this.participants = participants; - this.chat_photo = chat_photo; - this.notify_settings = notify_settings; - } - - - public override Constructor Constructor - { - get { return Constructor.chatFull; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x630e61be); - writer.Write(this.id); - this.participants.Write(writer); - this.chat_photo.Write(writer); - this.notify_settings.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - this.participants = TL.Parse(reader); - this.chat_photo = TL.Parse(reader); - this.notify_settings = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(chatFull id:{0} participants:{1} chat_photo:{2} notify_settings:{3})", id, participants, - chat_photo, notify_settings); - } - } - - - public class ChatParticipantConstructor : ChatParticipant - { - public int user_id; - public int inviter_id; - public int date; - - public ChatParticipantConstructor() - { - - } - - public ChatParticipantConstructor(int user_id, int inviter_id, int date) - { - this.user_id = user_id; - this.inviter_id = inviter_id; - this.date = date; - } - - - public override Constructor Constructor - { - get { return Constructor.chatParticipant; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xc8d7493e); - writer.Write(this.user_id); - writer.Write(this.inviter_id); - writer.Write(this.date); - } - - public override void Read(BinaryReader reader) - { - this.user_id = reader.ReadInt32(); - this.inviter_id = reader.ReadInt32(); - this.date = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(chatParticipant user_id:{0} inviter_id:{1} date:{2})", user_id, inviter_id, date); - } - } - - - public class ChatParticipantsForbiddenConstructor : ChatParticipants - { - public int chat_id; - - public ChatParticipantsForbiddenConstructor() - { - - } - - public ChatParticipantsForbiddenConstructor(int chat_id) - { - this.chat_id = chat_id; - } - - - public override Constructor Constructor - { - get { return Constructor.chatParticipantsForbidden; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x0fd2bb8a); - writer.Write(this.chat_id); - } - - public override void Read(BinaryReader reader) - { - this.chat_id = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(chatParticipantsForbidden chat_id:{0})", chat_id); - } - } - - - public class ChatParticipantsConstructor : ChatParticipants - { - public int chat_id; - public int admin_id; - public List participants; - public int version; - - public ChatParticipantsConstructor() - { - - } - - public ChatParticipantsConstructor(int chat_id, int admin_id, List participants, int version) - { - this.chat_id = chat_id; - this.admin_id = admin_id; - this.participants = participants; - this.version = version; - } - - - public override Constructor Constructor - { - get { return Constructor.chatParticipants; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x7841b415); - writer.Write(this.chat_id); - writer.Write(this.admin_id); - writer.Write(0x1cb5c415); - writer.Write(this.participants.Count); - foreach (ChatParticipant participants_element in this.participants) - { - participants_element.Write(writer); - } - writer.Write(this.version); - } - - public override void Read(BinaryReader reader) - { - this.chat_id = reader.ReadInt32(); - this.admin_id = reader.ReadInt32(); - reader.ReadInt32(); // vector code - int participants_len = reader.ReadInt32(); - this.participants = new List(participants_len); - for (int participants_index = 0; participants_index < participants_len; participants_index++) - { - ChatParticipant participants_element; - participants_element = TL.Parse(reader); - this.participants.Add(participants_element); - } - this.version = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(chatParticipants chat_id:{0} admin_id:{1} participants:{2} version:{3})", chat_id, admin_id, - Serializers.VectorToString(participants), version); - } - } - - - public class ChatPhotoEmptyConstructor : ChatPhoto - { - - public ChatPhotoEmptyConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.chatPhotoEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x37c1011c); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(chatPhotoEmpty)"); - } - } - - - public class ChatPhotoConstructor : ChatPhoto - { - public FileLocation photo_small; - public FileLocation photo_big; - - public ChatPhotoConstructor() - { - - } - - public ChatPhotoConstructor(FileLocation photo_small, FileLocation photo_big) - { - this.photo_small = photo_small; - this.photo_big = photo_big; - } - - - public override Constructor Constructor - { - get { return Constructor.chatPhoto; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x6153276a); - this.photo_small.Write(writer); - this.photo_big.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.photo_small = TL.Parse(reader); - this.photo_big = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(chatPhoto photo_small:{0} photo_big:{1})", photo_small, photo_big); - } - } - - - public class MessageEmptyConstructor : Message - { - public int id; - - public MessageEmptyConstructor() - { - - } - - public MessageEmptyConstructor(int id) - { - this.id = id; - } - - - public override Constructor Constructor - { - get { return Constructor.messageEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x83e5de54); - writer.Write(this.id); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - } - - public override string ToString() - { - return String.Format("(messageEmpty id:{0})", id); - } - } - - - public class MessageConstructor : Message - { - public int id; - public int from_id; - public int to_id; - public bool output; - public bool unread; - public int date; - public string message; - public MessageMedia media; - - public MessageConstructor() - { - - } - - public MessageConstructor(int id, int from_id, int to_id, bool output, bool unread, int date, string message, - MessageMedia media) - { - this.id = id; - this.from_id = from_id; - this.to_id = to_id; - this.output = output; - this.unread = unread; - this.date = date; - this.message = message; - this.media = media; - } - - - public override Constructor Constructor - { - get { return Constructor.message; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x22eb6aba); - writer.Write(this.id); - writer.Write(this.from_id); - writer.Write(this.to_id); - writer.Write(this.output ? 0x997275b5 : 0xbc799737); - writer.Write(this.unread ? 0x997275b5 : 0xbc799737); - writer.Write(this.date); - Serializers.String.write(writer, this.message); - this.media.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - this.from_id = reader.ReadInt32(); - this.to_id = reader.ReadInt32(); - this.output = reader.ReadUInt32() == 0x997275b5; - this.unread = reader.ReadUInt32() == 0x997275b5; - this.date = reader.ReadInt32(); - this.message = Serializers.String.read(reader); - this.media = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(message id:{0} from_id:{1} to_id:{2} out:{3} unread:{4} date:{5} message:'{6}' media:{7})", id, - from_id, to_id, output, unread, date, message, media); - } - } - - - public class MessageForwardedConstructor : Message - { - public int id; - public int fwd_from_id; - public int fwd_date; - public int from_id; - public int to_id; - public bool output; - public bool unread; - public int date; - public string message; - public MessageMedia media; - - public MessageForwardedConstructor() - { - - } - - public MessageForwardedConstructor(int id, int fwd_from_id, int fwd_date, int from_id, int to_id, bool output, - bool unread, int date, string message, MessageMedia media) - { - this.id = id; - this.fwd_from_id = fwd_from_id; - this.fwd_date = fwd_date; - this.from_id = from_id; - this.to_id = to_id; - this.output = output; - this.unread = unread; - this.date = date; - this.message = message; - this.media = media; - } - - - public override Constructor Constructor - { - get { return Constructor.messageForwarded; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x05f46804); - writer.Write(this.id); - writer.Write(this.fwd_from_id); - writer.Write(this.fwd_date); - writer.Write(this.from_id); - writer.Write(this.to_id); - writer.Write(this.output ? 0x997275b5 : 0xbc799737); - writer.Write(this.unread ? 0x997275b5 : 0xbc799737); - writer.Write(this.date); - Serializers.String.write(writer, this.message); - this.media.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.id = reader.ReadInt32(); - this.fwd_from_id = reader.ReadInt32(); - this.fwd_date = reader.ReadInt32(); - this.from_id = reader.ReadInt32(); - this.to_id = reader.ReadInt32(); - this.output = reader.ReadUInt32() == 0x997275b5; - this.unread = reader.ReadUInt32() == 0x997275b5; - this.date = reader.ReadInt32(); - this.message = Serializers.String.read(reader); - this.media = TL.Parse(reader); - } - - public override string ToString() - { - return - String.Format( - "(messageForwarded id:{0} fwd_from_id:{1} fwd_date:{2} from_id:{3} to_id:{4} out:{5} unread:{6} date:{7} message:'{8}' media:{9})", - id, fwd_from_id, fwd_date, from_id, to_id, output, unread, date, message, media); - } - } - - - public class MessageServiceConstructor : Message // messageService#1d86f70e flags:int id:int from_id:int to_id:Peer date:int action:MessageAction = Message; - { - public int flags; - public int id; - public int from_id; - public Peer to_id; - public int date; - public MessageAction action; - - public MessageServiceConstructor() { } - - public MessageServiceConstructor(int flags, int id, int from_id, Peer to_id, int date, MessageAction action) - { - this.flags = flags; - this.id = id; - this.from_id = from_id; - this.to_id = to_id; - this.date = date; - this.action = action; - } - - public override Constructor Constructor - { - get { return Constructor.messageService; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x1d86f70e); - writer.Write(this.flags); - writer.Write(this.id); - writer.Write(this.from_id); - this.to_id.Write(writer); - writer.Write(this.date); - this.action.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.flags = reader.ReadInt32(); - this.id = reader.ReadInt32(); - this.from_id = reader.ReadInt32(); - this.to_id = TL.Parse(reader); - this.date = reader.ReadInt32(); - this.action = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(messageService flags:{0} id:{1} from_id:{2} to_id:{3} date:{4} action:{5})", - flags, id, from_id, to_id, date, action); - } - } - - - public class MessageMediaEmptyConstructor : MessageMedia - { - - public MessageMediaEmptyConstructor() - { - - } - - - - public override Constructor Constructor - { - get { return Constructor.messageMediaEmpty; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0x3ded6320); - } - - public override void Read(BinaryReader reader) - { - } - - public override string ToString() - { - return String.Format("(messageMediaEmpty)"); - } - } - - - public class MessageMediaPhotoConstructor : MessageMedia - { - public Photo photo; - - public MessageMediaPhotoConstructor() - { - - } - - public MessageMediaPhotoConstructor(Photo photo) - { - this.photo = photo; - } - - - public override Constructor Constructor - { - get { return Constructor.messageMediaPhoto; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xc8c45a2a); - this.photo.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.photo = TL.Parse(reader); - } - - public override string ToString() - { - return String.Format("(messageMediaPhoto photo:{0})", photo); - } - } - - - public class MessageMediaVideoConstructor : MessageMedia - { - public Video video; - - public MessageMediaVideoConstructor() - { - - } - - public MessageMediaVideoConstructor(Video video) - { - this.video = video; - } - - - public override Constructor Constructor - { - get { return Constructor.messageMediaVideo; } - } - - public override void Write(BinaryWriter writer) - { - writer.Write(0xa2d24290); - this.video.Write(writer); - } - - public override void Read(BinaryReader reader) - { - this.video = TL.Parse