1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00
persephone/Persephone/MPDClient/Models/Status.swift
2019-02-08 13:49:55 -05:00

33 lines
561 B
Swift

//
// MPDClientStatus.swift
// Persephone
//
// Created by Daniel Barber on 2019/2/04.
// Copyright © 2019 Dan Barber. All rights reserved.
//
import Foundation
import mpdclient
extension MPDClient {
class Status {
let mpdStatus: OpaquePointer
init(_ mpdStatus: OpaquePointer) {
self.mpdStatus = mpdStatus
}
deinit {
mpd_status_free(mpdStatus)
}
func state() -> mpd_state {
return mpd_status_get_state(mpdStatus)
}
func song() -> Int32 {
return mpd_status_get_song_pos(mpdStatus)
}
}
}