Swiftgram/TelegramCore/Namespaces.swift
2016-10-07 19:14:32 +03:00

41 lines
1.2 KiB
Swift

import Foundation
#if os(macOS)
import PostboxMac
#else
import Postbox
#endif
public struct Namespaces {
public struct Message {
public static let Cloud: Int32 = 0
public static let Local: Int32 = 1
}
public struct Media {
public static let CloudImage: Int32 = 0
public static let CloudVideo: Int32 = 1
public static let CloudAudio: Int32 = 2
public static let CloudContact: Int32 = 3
public static let CloudMap: Int32 = 4
public static let CloudFile: Int32 = 5
public static let CloudWebpage: Int32 = 6
}
public struct Peer {
public static let CloudUser: Int32 = 0
public static let CloudGroup: Int32 = 1
public static let CloudChannel: Int32 = 2
public static let Empty: Int32 = Int32.max
}
}
public extension MessageTags {
static let PhotoOrVideo = MessageTags(rawValue: 1 << 0)
static let File = MessageTags(rawValue: 1 << 1)
static let Music = MessageTags(rawValue: 1 << 2)
static let WebPage = MessageTags(rawValue: 1 << 3)
static let Voice = MessageTags(rawValue: 1 << 4)
}
let allMessageTags: MessageTags = [.PhotoOrVideo, .File, .Music, .WebPage, .Voice]