objc2_tv_services/generated/TVContentIdentifier.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 /// Represents unique identifiers for TVContentItems.
11 ///
12 /// A content identifier is represented by a string, with an optional
13 /// hierarchical structure of other content identifiers. A content identifier
14 /// should be unique to a particular Content Item, across ALL past, current,
15 /// and future content items. A content identifier should be durable: it
16 /// should be able to be saved by itself, and an item should be able to be
17 /// identified by it, unambiguously, in the future (though the user may not
18 /// have access to that item). The uniqueness of a content identifier comes
19 /// from the uniqueness of its two parts: its identifier string and its
20 /// container (another content identifier). The identifier property of
21 /// content identifiers need not be univerally unique across all the app's
22 /// content identifiers, if items have container properties which are
23 /// themselves unique. However, developers should then be careful to not
24 /// be confused by equal identifier strings in content identifiers with
25 /// different container hierarchies.
26 ///
27 /// See also [Apple's documentation](https://developer.apple.com/documentation/tvservices/tvcontentidentifier?language=objc)
28 #[unsafe(super(NSObject))]
29 #[derive(Debug, PartialEq, Eq, Hash)]
30 #[deprecated = "TVContentIdentifier has been replaced by TVTopShelfContentProvider"]
31 pub struct TVContentIdentifier;
32);
33
34extern_conformance!(
35 unsafe impl NSCoding for TVContentIdentifier {}
36);
37
38extern_conformance!(
39 unsafe impl NSCopying for TVContentIdentifier {}
40);
41
42unsafe impl CopyingHelper for TVContentIdentifier {
43 type Result = Self;
44}
45
46extern_conformance!(
47 unsafe impl NSObjectProtocol for TVContentIdentifier {}
48);
49
50extern_conformance!(
51 unsafe impl NSSecureCoding for TVContentIdentifier {}
52);
53
54impl TVContentIdentifier {
55 extern_methods!(
56 /// The string contents of this identifier.
57 ///
58 /// Any internal format or structure within the string is up to the application.
59 #[deprecated = "TVContentIdentifier has been replaced by TVTopShelfContentProvider"]
60 #[unsafe(method(identifier))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn identifier(&self) -> Retained<NSString>;
63
64 /// Optional content identifier for the next level up in the logical structure
65 /// which this content identifier is identifying a part of.
66 ///
67 /// Typically this would be the content identifier for the next larger grouping
68 /// that the content, identified by this content identifier, is part of. For
69 /// example, a podcast episode could be part of a larger podcast season, which
70 /// would be part of the entire podcast series; all three of those layers –
71 /// episodes, seasons, and the series – would need their own unique identifiers.
72 #[deprecated = "TVContentIdentifier has been replaced by TVTopShelfContentProvider"]
73 #[unsafe(method(container))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn container(&self) -> Option<Retained<TVContentIdentifier>>;
76
77 #[deprecated = "TVContentIdentifier has been replaced by TVTopShelfContentProvider"]
78 #[unsafe(method(initWithIdentifier:container:))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn initWithIdentifier_container(
81 this: Allocated<Self>,
82 identifier: &NSString,
83 container: Option<&TVContentIdentifier>,
84 ) -> Retained<Self>;
85
86 /// # Safety
87 ///
88 /// `coder` possibly has further requirements.
89 #[deprecated = "TVContentIdentifier has been replaced by TVTopShelfContentProvider"]
90 #[unsafe(method(initWithCoder:))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn initWithCoder(
93 this: Allocated<Self>,
94 coder: &NSCoder,
95 ) -> Option<Retained<Self>>;
96
97 #[deprecated = "TVContentIdentifier has been replaced by TVTopShelfContentProvider"]
98 #[unsafe(method(init))]
99 #[unsafe(method_family = init)]
100 pub unsafe fn init(this: Allocated<Self>) -> Option<Retained<Self>>;
101 );
102}
103
104/// Methods declared on superclass `NSObject`.
105impl TVContentIdentifier {
106 extern_methods!(
107 #[unsafe(method(new))]
108 #[unsafe(method_family = new)]
109 pub unsafe fn new() -> Retained<Self>;
110 );
111}