mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
[WIP] Stories
This commit is contained in:
@@ -1,3 +1,43 @@
|
||||
public extension Api.account {
|
||||
enum TmpPassword: TypeConstructorDescription {
|
||||
case tmpPassword(tmpPassword: Buffer, validUntil: Int32)
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .tmpPassword(let tmpPassword, let validUntil):
|
||||
if boxed {
|
||||
buffer.appendInt32(-614138572)
|
||||
}
|
||||
serializeBytes(tmpPassword, buffer: buffer, boxed: false)
|
||||
serializeInt32(validUntil, buffer: buffer, boxed: false)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||
switch self {
|
||||
case .tmpPassword(let tmpPassword, let validUntil):
|
||||
return ("tmpPassword", [("tmpPassword", tmpPassword as Any), ("validUntil", validUntil as Any)])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_tmpPassword(_ reader: BufferReader) -> TmpPassword? {
|
||||
var _1: Buffer?
|
||||
_1 = parseBytes(reader)
|
||||
var _2: Int32?
|
||||
_2 = reader.readInt32()
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _2 != nil
|
||||
if _c1 && _c2 {
|
||||
return Api.account.TmpPassword.tmpPassword(tmpPassword: _1!, validUntil: _2!)
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public extension Api.account {
|
||||
enum WallPapers: TypeConstructorDescription {
|
||||
case wallPapers(hash: Int64, wallpapers: [Api.WallPaper])
|
||||
|
||||
Reference in New Issue
Block a user