2021-02-19 16:28:05 +01:00
|
|
|
//
|
|
|
|
// AVAuthorizationStatus+descriptor.swift
|
2021-06-21 22:42:46 +02:00
|
|
|
// mrousavy
|
2021-02-19 16:28:05 +01:00
|
|
|
//
|
|
|
|
// Created by Marc Rousavy on 29.12.20.
|
2021-06-01 13:07:57 +02:00
|
|
|
// Copyright © 2020 mrousavy. All rights reserved.
|
2021-02-19 16:28:05 +01:00
|
|
|
//
|
|
|
|
|
|
|
|
import AVFoundation
|
|
|
|
|
|
|
|
extension AVAuthorizationStatus {
|
|
|
|
var descriptor: String {
|
|
|
|
switch self {
|
|
|
|
case .authorized:
|
|
|
|
return "authorized"
|
|
|
|
case .denied:
|
|
|
|
return "denied"
|
|
|
|
case .notDetermined:
|
|
|
|
return "not-determined"
|
|
|
|
case .restricted:
|
|
|
|
return "restricted"
|
|
|
|
@unknown default:
|
|
|
|
fatalError("AVAuthorizationStatus has unknown state.")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|