Make all sounds cloud

This commit is contained in:
Ali
2022-04-08 00:17:15 +04:00
parent 5b66668753
commit c7c24a6c60
39 changed files with 400 additions and 253 deletions

View File

@@ -658,6 +658,56 @@ public extension Api.account {
}
}
public extension Api.account {
enum SavedRingtone: TypeConstructorDescription {
case savedRingtone
case savedRingtoneConverted(document: Api.Document)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .savedRingtone:
if boxed {
buffer.appendInt32(-1222230163)
}
break
case .savedRingtoneConverted(let document):
if boxed {
buffer.appendInt32(523271863)
}
document.serialize(buffer, true)
break
}
}
public func descriptionFields() -> (String, [(String, Any)]) {
switch self {
case .savedRingtone:
return ("savedRingtone", [])
case .savedRingtoneConverted(let document):
return ("savedRingtoneConverted", [("document", String(describing: document))])
}
}
public static func parse_savedRingtone(_ reader: BufferReader) -> SavedRingtone? {
return Api.account.SavedRingtone.savedRingtone
}
public static func parse_savedRingtoneConverted(_ reader: BufferReader) -> SavedRingtone? {
var _1: Api.Document?
if let signature = reader.readInt32() {
_1 = Api.parse(reader, signature: signature) as? Api.Document
}
let _c1 = _1 != nil
if _c1 {
return Api.account.SavedRingtone.savedRingtoneConverted(document: _1!)
}
else {
return nil
}
}
}
}
public extension Api.account {
enum SavedRingtones: TypeConstructorDescription {
case savedRingtones(hash: Int64, ringtones: [Api.Document])
@@ -1140,83 +1190,3 @@ public extension Api.auth {
}
}
public extension Api.auth {
enum ExportedAuthorization: TypeConstructorDescription {
case exportedAuthorization(id: Int64, bytes: Buffer)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .exportedAuthorization(let id, let bytes):
if boxed {
buffer.appendInt32(-1271602504)
}
serializeInt64(id, buffer: buffer, boxed: false)
serializeBytes(bytes, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, Any)]) {
switch self {
case .exportedAuthorization(let id, let bytes):
return ("exportedAuthorization", [("id", String(describing: id)), ("bytes", String(describing: bytes))])
}
}
public static func parse_exportedAuthorization(_ reader: BufferReader) -> ExportedAuthorization? {
var _1: Int64?
_1 = reader.readInt64()
var _2: Buffer?
_2 = parseBytes(reader)
let _c1 = _1 != nil
let _c2 = _2 != nil
if _c1 && _c2 {
return Api.auth.ExportedAuthorization.exportedAuthorization(id: _1!, bytes: _2!)
}
else {
return nil
}
}
}
}
public extension Api.auth {
enum LoggedOut: TypeConstructorDescription {
case loggedOut(flags: Int32, futureAuthToken: Buffer?)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .loggedOut(let flags, let futureAuthToken):
if boxed {
buffer.appendInt32(-1012759713)
}
serializeInt32(flags, buffer: buffer, boxed: false)
if Int(flags) & Int(1 << 0) != 0 {serializeBytes(futureAuthToken!, buffer: buffer, boxed: false)}
break
}
}
public func descriptionFields() -> (String, [(String, Any)]) {
switch self {
case .loggedOut(let flags, let futureAuthToken):
return ("loggedOut", [("flags", String(describing: flags)), ("futureAuthToken", String(describing: futureAuthToken))])
}
}
public static func parse_loggedOut(_ reader: BufferReader) -> LoggedOut? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Buffer?
if Int(_1!) & Int(1 << 0) != 0 {_2 = parseBytes(reader) }
let _c1 = _1 != nil
let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil
if _c1 && _c2 {
return Api.auth.LoggedOut.loggedOut(flags: _1!, futureAuthToken: _2)
}
else {
return nil
}
}
}
}