2024-08-19 07:07:17 +02:00
|
|
|
//
|
2024-08-24 05:31:13 +02:00
|
|
|
// OPMLFeedSpecifier.swift
|
2024-08-24 03:03:59 +02:00
|
|
|
//
|
2024-08-19 07:07:17 +02:00
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 8/18/24.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2024-08-27 07:39:46 +02:00
|
|
|
import SAX
|
2024-08-19 07:07:17 +02:00
|
|
|
|
2024-08-24 05:31:13 +02:00
|
|
|
public struct OPMLFeedSpecifier: Sendable {
|
2024-08-19 07:07:17 +02:00
|
|
|
|
2024-08-24 03:03:59 +02:00
|
|
|
let title: String?
|
|
|
|
let feedDescription: String?
|
|
|
|
let homePageURL: String?
|
|
|
|
let feedURL: String
|
|
|
|
|
|
|
|
init(title: String?, feedDescription: String?, homePageURL: String?, feedURL: String) {
|
|
|
|
|
|
|
|
if String.isEmptyOrNil(title) {
|
|
|
|
self.title = nil
|
|
|
|
} else {
|
|
|
|
self.title = title
|
|
|
|
}
|
2024-08-19 07:07:17 +02:00
|
|
|
|
2024-08-24 03:03:59 +02:00
|
|
|
if String.isEmptyOrNil(feedDescription) {
|
|
|
|
self.feedDescription = nil
|
|
|
|
} else {
|
|
|
|
self.feedDescription = feedDescription
|
|
|
|
}
|
2024-08-19 07:07:17 +02:00
|
|
|
|
2024-08-24 03:03:59 +02:00
|
|
|
if String.isEmptyOrNil(homePageURL) {
|
|
|
|
self.homePageURL = nil
|
|
|
|
} else {
|
|
|
|
self.homePageURL = homePageURL
|
|
|
|
}
|
|
|
|
|
|
|
|
self.feedURL = feedURL
|
2024-08-19 07:07:17 +02:00
|
|
|
}
|
|
|
|
}
|
2024-08-24 03:03:59 +02:00
|
|
|
|