Update submodules

This commit is contained in:
Peter 2018-11-27 17:30:53 +03:00
parent b339741ea6
commit 991b1e1923
23 changed files with 1420 additions and 5 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:ModernProto.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>

View File

@ -0,0 +1,22 @@
import Foundation
import SwiftSignalKit
private enum ProtoInstanceState {
case none
}
private final class ProtoInstanceImpl {
private let target: ProtoTarget
private var state: ProtoInstanceState
init(target: ProtoTarget) {
self.target = target
self.state = .none
}
func update(sessionState: ProtoSessionState) {
}
}

View File

@ -0,0 +1,5 @@
import Foundation
struct ProtoSessionData {
}

View File

@ -0,0 +1,41 @@
import Foundation
@available(iOSApplicationExtension 9.0, *)
private final class ProtoTcpConnectionDelegate: NSObject, URLSessionDelegate, URLSessionStreamDelegate {
override init() {
super.init()
}
func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
}
func urlSession(_ session: URLSession, readClosedFor streamTask: URLSessionStreamTask) {
}
func urlSession(_ session: URLSession, writeClosedFor streamTask: URLSessionStreamTask) {
}
}
private func tcpReadTimeout(byteCount: Int) -> TimeInterval {
return 10.0
}
@available(iOSApplicationExtension 9.0, *)
final class ProtoTcpConnection {
let session: URLSession
let streamTask: URLSessionStreamTask
init(host: String, port: Int32) {
let configuration = URLSessionConfiguration.ephemeral.copy() as! URLSessionConfiguration
if #available(iOSApplicationExtension 11.0, *) {
configuration.waitsForConnectivity = true
}
self.session = URLSession(configuration: configuration, delegate: ProtoTcpConnectionDelegate(), delegateQueue: nil)
self.streamTask = self.session.streamTask(withHostName: host, port: Int(port))
self.streamTask.readData(ofMinLength: 1, maxLength: 1, timeout: tcpReadTimeout(byteCount: 1), completionHandler: { data, eof, error in
})
}
}

View File

@ -0,0 +1,11 @@
import Foundation
struct ProtoTransportState {
var connected: Bool
}
final class ProtoTransport {
func update(paths: [ProtoPath]) -> ProtoTransportState {
return ProtoTransportState(connected: false)
}
}

View File

@ -0,0 +1,19 @@
//
// ModernProto.h
// ModernProto
//
// Created by Peter on 11/24/18.
// Copyright © 2018 Telegram LLP. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for ModernProto.
FOUNDATION_EXPORT double ModernProtoVersionNumber;
//! Project version string for ModernProto.
FOUNDATION_EXPORT const unsigned char ModernProtoVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <ModernProto/PublicHeader.h>

View File

@ -0,0 +1,14 @@
import Foundation
struct ProtoAuthKey: Equatable {
let id: Int64
let value: Data
}
final class ProtoAuthData {
let key: ProtoAuthKey
init(key: ProtoAuthKey) {
self.key = key
}
}

View File

@ -0,0 +1,22 @@
import Foundation
import SwiftSignalKit
private enum ProtoAuthInstanceState {
case none
}
final class ProtoAuthInstance {
private let target: ProtoTarget
private var state: ProtoAuthInstanceState
init(target: ProtoTarget) {
self.target = target
self.state = .none
}
func update(sessionState: ProtoSessionState) {
}
}

View File

@ -0,0 +1,2 @@
import Foundation

View File

@ -0,0 +1,15 @@
import Foundation
public struct ProtoTcpPath: Equatable, Hashable {
let host: String
let port: Int32
public init(host: String, port: Int32) {
self.host = host
self.port = port
}
}
public enum ProtoPath: Equatable, Hashable {
case tcp(ProtoTcpPath)
}

View File

@ -0,0 +1,45 @@
import Foundation
import SwiftSignalKit
final class ProtoSessionState {
let authData: [ProtoTarget: ProtoAuthData] = [:]
let paths: [ProtoTarget: Set<ProtoPath>] = [:]
}
private final class ProtoSessionImpl {
private let queue: Queue
private let configuration: ProtoSessionConfiguration
init(queue: Queue, configuration: ProtoSessionConfiguration) {
self.queue = queue
self.configuration = configuration
}
deinit {
assert(self.queue.isCurrent())
}
}
public struct ProtoSessionConfiguration {
public let seedPaths: [ProtoTarget: ProtoPath]
public init(seedPaths: [ProtoTarget: ProtoPath]) {
self.seedPaths = seedPaths
}
}
public final class ProtoSession {
private let queue = Queue()
private let impl: QueueLocalObject<ProtoSessionImpl>
init(configuration: ProtoSessionConfiguration) {
let queue = self.queue
self.impl = QueueLocalObject(queue: queue, generate: {
return ProtoSessionImpl(queue: queue, configuration: configuration)
})
}
}

View File

@ -0,0 +1,5 @@
import Foundation
public enum ProtoTarget: Equatable, Hashable {
case datacenter(Int)
}

View File

@ -214,6 +214,8 @@
09D304392174344900C00567 /* TGBridgeMessageEntities.m in Sources */ = {isa = PBXBuildFile; fileRef = 09C572F42172953500BDF00F /* TGBridgeMessageEntities.m */; };
09FDAEE62140477F00BF856F /* MtProtoKitDynamic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09FDAEE52140477F00BF856F /* MtProtoKitDynamic.framework */; };
D001D5AA1F878DA300DF975A /* PhoneCountries.txt in Resources */ = {isa = PBXBuildFile; fileRef = D001D5A91F878DA300DF975A /* PhoneCountries.txt */; };
D006CF9F21A8D11B00FDCD32 /* ModernProto.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D006CF9E21A8D11B00FDCD32 /* ModernProto.framework */; };
D006CFA021A8D11B00FDCD32 /* ModernProto.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D006CF9E21A8D11B00FDCD32 /* ModernProto.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D00859A21B28189D00EAF753 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D00859A11B28189D00EAF753 /* AppDelegate.swift */; };
D00859A91B28189D00EAF753 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D00859A81B28189D00EAF753 /* Images.xcassets */; };
D00859AC1B28189D00EAF753 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D00859AA1B28189D00EAF753 /* LaunchScreen.xib */; };
@ -512,6 +514,7 @@
D0B4AF901EC122A700D51FF6 /* TelegramUI.framework in Embed Frameworks */,
D096C2C21CC3C104006D814E /* Postbox.framework in Embed Frameworks */,
D096C2C51CC3C11A006D814E /* SwiftSignalKit.framework in Embed Frameworks */,
D006CFA021A8D11B00FDCD32 /* ModernProto.framework in Embed Frameworks */,
D0CAF3191D763B230011F558 /* MtProtoKitDynamic.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
@ -879,6 +882,8 @@
09D304212174335F00C00567 /* WatchBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchBridge.swift; sourceTree = "<group>"; };
09FDAEE52140477F00BF856F /* MtProtoKitDynamic.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MtProtoKitDynamic.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D001D5A91F878DA300DF975A /* PhoneCountries.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = PhoneCountries.txt; path = "Telegram-iOS/Resources/PhoneCountries.txt"; sourceTree = "<group>"; };
D006CF9E21A8D11B00FDCD32 /* ModernProto.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ModernProto.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D006CFA121A8D12600FDCD32 /* ModernProto.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ModernProto.framework; path = "../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-ffbqcdyqpehxdvcwhyaorlehrrdc/Build/Products/Debug Hockeyapp-iphoneos/ModernProto.framework"; sourceTree = "<group>"; };
D008599C1B28189D00EAF753 /* Telegram X.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Telegram X.app"; sourceTree = BUILT_PRODUCTS_DIR; };
D00859A01B28189D00EAF753 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D00859A11B28189D00EAF753 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@ -1170,6 +1175,7 @@
D0CD17B51CC3AE14007C5650 /* AsyncDisplayKit.framework in Frameworks */,
D0D17E8A1CAAD66600C4750B /* Accelerate.framework in Frameworks */,
D0F575132083B96B00F1C1E1 /* CloudKit.framework in Frameworks */,
D006CF9F21A8D11B00FDCD32 /* ModernProto.framework in Frameworks */,
D0B4AF8F1EC122A700D51FF6 /* TelegramUI.framework in Frameworks */,
D096C2BE1CC3C021006D814E /* Display.framework in Frameworks */,
D055BD441B7E216400F06C0A /* MapKit.framework in Frameworks */,
@ -1868,6 +1874,7 @@
D00859931B28189D00EAF753 = {
isa = PBXGroup;
children = (
D006CF9E21A8D11B00FDCD32 /* ModernProto.framework */,
D023EBB31DDB2F0E00BD496D /* Resources */,
D03B0E791D63484500955575 /* Share */,
D0D268771D79A70A00C422DA /* SiriIntents */,
@ -1974,6 +1981,7 @@
D00859C21B281E0000EAF753 /* Frameworks */ = {
isa = PBXGroup;
children = (
D006CFA121A8D12600FDCD32 /* ModernProto.framework */,
0972C6DF21791D950069E98A /* UserNotifications.framework */,
09C50E87217385CF009E676F /* WatchConnectivity.framework */,
09C50E852173854D009E676F /* WatchKit.framework */,

View File

@ -34,6 +34,9 @@
<FileRef
location = "group:submodules/HockeySDK-iOS/Support/HockeySDK.xcodeproj">
</FileRef>
<FileRef
location = "group:ModernProto/ModernProto.xcodeproj">
</FileRef>
<FileRef
location = "group:Telegram-iOS.xcodeproj">
</FileRef>

View File

@ -1504,6 +1504,7 @@
"ReportPeer.ReasonSpam" = "Spam";
"ReportPeer.ReasonViolence" = "Violence";
"ReportPeer.ReasonPornography" = "Pornography";
"ReportPeer.ReasonChildAbuse" = "Child Pornography";
"ReportPeer.ReasonOther" = "Other";
"ReportPeer.AlertSuccess" = "Thank you!\nYour report will be reviewed by our team very soon.";
@ -3525,3 +3526,6 @@ Unused sets are archived when you add more.";
"Login.CancelSignUpConfirmation" = "Do you want to stop the registration process?";
"Passcode.AppLockedAlert" = "Telegram\nLocked";
"ChatList.ReadAll" = "Read All";
"ChatList.Read" = "Read";

@ -1 +1 @@
Subproject commit c0fec6a466d47a6538bd506d1e5e6ae247e0d652
Subproject commit 3afb9200cfa3bb2b7197acbe55088fa906c2e680

@ -1 +1 @@
Subproject commit 2b46a8d6f5639a8b71d94e07676204b405c7c24d
Subproject commit 58ab411aea7fb2454c478ffbdf9a5fcea05f4fde

@ -1 +1 @@
Subproject commit d6858d186ecef1521cd2c6c3a1cfa7c7d8b19721
Subproject commit 0360c4e24b864045403105183b69f3b805a35704

@ -1 +1 @@
Subproject commit 84eed4d9f56377f768f7670efbd3143dbcdab1fd
Subproject commit 55d5c78e7845d862daedfae3564132e1e19e5c0f

@ -1 +1 @@
Subproject commit 394b204f299da4967b795081e5604f24bf24cb34
Subproject commit e9da154ac3e4d8b4ad3501879607e88f1348b3cb