commit | author | age
|
09e73a
|
1 |
#if 0 |
L |
2 |
#elif defined(__arm64__) && __arm64__ |
|
3 |
// Generated by Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) |
|
4 |
#ifndef DIDOMI_SWIFT_H |
|
5 |
#define DIDOMI_SWIFT_H |
|
6 |
#pragma clang diagnostic push |
|
7 |
#pragma clang diagnostic ignored "-Wgcc-compat" |
|
8 |
|
|
9 |
#if !defined(__has_include) |
|
10 |
# define __has_include(x) 0 |
|
11 |
#endif |
|
12 |
#if !defined(__has_attribute) |
|
13 |
# define __has_attribute(x) 0 |
|
14 |
#endif |
|
15 |
#if !defined(__has_feature) |
|
16 |
# define __has_feature(x) 0 |
|
17 |
#endif |
|
18 |
#if !defined(__has_warning) |
|
19 |
# define __has_warning(x) 0 |
|
20 |
#endif |
|
21 |
|
|
22 |
#if __has_include(<swift/objc-prologue.h>) |
|
23 |
# include <swift/objc-prologue.h> |
|
24 |
#endif |
|
25 |
|
|
26 |
#pragma clang diagnostic ignored "-Wauto-import" |
|
27 |
#if defined(__OBJC__) |
|
28 |
#include <Foundation/Foundation.h> |
|
29 |
#endif |
|
30 |
#if defined(__cplusplus) |
|
31 |
#include <cstdint> |
|
32 |
#include <cstddef> |
|
33 |
#include <cstdbool> |
|
34 |
#include <cstring> |
|
35 |
#include <stdlib.h> |
|
36 |
#include <new> |
|
37 |
#include <type_traits> |
|
38 |
#else |
|
39 |
#include <stdint.h> |
|
40 |
#include <stddef.h> |
|
41 |
#include <stdbool.h> |
|
42 |
#include <string.h> |
|
43 |
#endif |
|
44 |
#if defined(__cplusplus) |
|
45 |
#if __has_include(<ptrauth.h>) |
|
46 |
# include <ptrauth.h> |
|
47 |
#else |
|
48 |
# ifndef __ptrauth_swift_value_witness_function_pointer |
|
49 |
# define __ptrauth_swift_value_witness_function_pointer(x) |
|
50 |
# endif |
|
51 |
#endif |
|
52 |
#endif |
|
53 |
|
|
54 |
#if !defined(SWIFT_TYPEDEFS) |
|
55 |
# define SWIFT_TYPEDEFS 1 |
|
56 |
# if __has_include(<uchar.h>) |
|
57 |
# include <uchar.h> |
|
58 |
# elif !defined(__cplusplus) |
|
59 |
typedef uint_least16_t char16_t; |
|
60 |
typedef uint_least32_t char32_t; |
|
61 |
# endif |
|
62 |
typedef float swift_float2 __attribute__((__ext_vector_type__(2))); |
|
63 |
typedef float swift_float3 __attribute__((__ext_vector_type__(3))); |
|
64 |
typedef float swift_float4 __attribute__((__ext_vector_type__(4))); |
|
65 |
typedef double swift_double2 __attribute__((__ext_vector_type__(2))); |
|
66 |
typedef double swift_double3 __attribute__((__ext_vector_type__(3))); |
|
67 |
typedef double swift_double4 __attribute__((__ext_vector_type__(4))); |
|
68 |
typedef int swift_int2 __attribute__((__ext_vector_type__(2))); |
|
69 |
typedef int swift_int3 __attribute__((__ext_vector_type__(3))); |
|
70 |
typedef int swift_int4 __attribute__((__ext_vector_type__(4))); |
|
71 |
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); |
|
72 |
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); |
|
73 |
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); |
|
74 |
#endif |
|
75 |
|
|
76 |
#if !defined(SWIFT_PASTE) |
|
77 |
# define SWIFT_PASTE_HELPER(x, y) x##y |
|
78 |
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) |
|
79 |
#endif |
|
80 |
#if !defined(SWIFT_METATYPE) |
|
81 |
# define SWIFT_METATYPE(X) Class |
|
82 |
#endif |
|
83 |
#if !defined(SWIFT_CLASS_PROPERTY) |
|
84 |
# if __has_feature(objc_class_property) |
|
85 |
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ |
|
86 |
# else |
|
87 |
# define SWIFT_CLASS_PROPERTY(...) |
|
88 |
# endif |
|
89 |
#endif |
|
90 |
#if !defined(SWIFT_RUNTIME_NAME) |
|
91 |
# if __has_attribute(objc_runtime_name) |
|
92 |
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) |
|
93 |
# else |
|
94 |
# define SWIFT_RUNTIME_NAME(X) |
|
95 |
# endif |
|
96 |
#endif |
|
97 |
#if !defined(SWIFT_COMPILE_NAME) |
|
98 |
# if __has_attribute(swift_name) |
|
99 |
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) |
|
100 |
# else |
|
101 |
# define SWIFT_COMPILE_NAME(X) |
|
102 |
# endif |
|
103 |
#endif |
|
104 |
#if !defined(SWIFT_METHOD_FAMILY) |
|
105 |
# if __has_attribute(objc_method_family) |
|
106 |
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) |
|
107 |
# else |
|
108 |
# define SWIFT_METHOD_FAMILY(X) |
|
109 |
# endif |
|
110 |
#endif |
|
111 |
#if !defined(SWIFT_NOESCAPE) |
|
112 |
# if __has_attribute(noescape) |
|
113 |
# define SWIFT_NOESCAPE __attribute__((noescape)) |
|
114 |
# else |
|
115 |
# define SWIFT_NOESCAPE |
|
116 |
# endif |
|
117 |
#endif |
|
118 |
#if !defined(SWIFT_RELEASES_ARGUMENT) |
|
119 |
# if __has_attribute(ns_consumed) |
|
120 |
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) |
|
121 |
# else |
|
122 |
# define SWIFT_RELEASES_ARGUMENT |
|
123 |
# endif |
|
124 |
#endif |
|
125 |
#if !defined(SWIFT_WARN_UNUSED_RESULT) |
|
126 |
# if __has_attribute(warn_unused_result) |
|
127 |
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) |
|
128 |
# else |
|
129 |
# define SWIFT_WARN_UNUSED_RESULT |
|
130 |
# endif |
|
131 |
#endif |
|
132 |
#if !defined(SWIFT_NORETURN) |
|
133 |
# if __has_attribute(noreturn) |
|
134 |
# define SWIFT_NORETURN __attribute__((noreturn)) |
|
135 |
# else |
|
136 |
# define SWIFT_NORETURN |
|
137 |
# endif |
|
138 |
#endif |
|
139 |
#if !defined(SWIFT_CLASS_EXTRA) |
|
140 |
# define SWIFT_CLASS_EXTRA |
|
141 |
#endif |
|
142 |
#if !defined(SWIFT_PROTOCOL_EXTRA) |
|
143 |
# define SWIFT_PROTOCOL_EXTRA |
|
144 |
#endif |
|
145 |
#if !defined(SWIFT_ENUM_EXTRA) |
|
146 |
# define SWIFT_ENUM_EXTRA |
|
147 |
#endif |
|
148 |
#if !defined(SWIFT_CLASS) |
|
149 |
# if __has_attribute(objc_subclassing_restricted) |
|
150 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA |
|
151 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
152 |
# else |
|
153 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
154 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
155 |
# endif |
|
156 |
#endif |
|
157 |
#if !defined(SWIFT_RESILIENT_CLASS) |
|
158 |
# if __has_attribute(objc_class_stub) |
|
159 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) |
|
160 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
161 |
# else |
|
162 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) |
|
163 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
164 |
# endif |
|
165 |
#endif |
|
166 |
#if !defined(SWIFT_PROTOCOL) |
|
167 |
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
168 |
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
169 |
#endif |
|
170 |
#if !defined(SWIFT_EXTENSION) |
|
171 |
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) |
|
172 |
#endif |
|
173 |
#if !defined(OBJC_DESIGNATED_INITIALIZER) |
|
174 |
# if __has_attribute(objc_designated_initializer) |
|
175 |
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) |
|
176 |
# else |
|
177 |
# define OBJC_DESIGNATED_INITIALIZER |
|
178 |
# endif |
|
179 |
#endif |
|
180 |
#if !defined(SWIFT_ENUM_ATTR) |
|
181 |
# if __has_attribute(enum_extensibility) |
|
182 |
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) |
|
183 |
# else |
|
184 |
# define SWIFT_ENUM_ATTR(_extensibility) |
|
185 |
# endif |
|
186 |
#endif |
|
187 |
#if !defined(SWIFT_ENUM) |
|
188 |
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type |
|
189 |
# if __has_feature(generalized_swift_name) |
|
190 |
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type |
|
191 |
# else |
|
192 |
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) |
|
193 |
# endif |
|
194 |
#endif |
|
195 |
#if !defined(SWIFT_UNAVAILABLE) |
|
196 |
# define SWIFT_UNAVAILABLE __attribute__((unavailable)) |
|
197 |
#endif |
|
198 |
#if !defined(SWIFT_UNAVAILABLE_MSG) |
|
199 |
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) |
|
200 |
#endif |
|
201 |
#if !defined(SWIFT_AVAILABILITY) |
|
202 |
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) |
|
203 |
#endif |
|
204 |
#if !defined(SWIFT_WEAK_IMPORT) |
|
205 |
# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) |
|
206 |
#endif |
|
207 |
#if !defined(SWIFT_DEPRECATED) |
|
208 |
# define SWIFT_DEPRECATED __attribute__((deprecated)) |
|
209 |
#endif |
|
210 |
#if !defined(SWIFT_DEPRECATED_MSG) |
|
211 |
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) |
|
212 |
#endif |
|
213 |
#if !defined(SWIFT_DEPRECATED_OBJC) |
|
214 |
# if __has_feature(attribute_diagnose_if_objc) |
|
215 |
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) |
|
216 |
# else |
|
217 |
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) |
|
218 |
# endif |
|
219 |
#endif |
|
220 |
#if defined(__OBJC__) |
|
221 |
#if !defined(IBSegueAction) |
|
222 |
# define IBSegueAction |
|
223 |
#endif |
|
224 |
#endif |
|
225 |
#if !defined(SWIFT_EXTERN) |
|
226 |
# if defined(__cplusplus) |
|
227 |
# define SWIFT_EXTERN extern "C" |
|
228 |
# else |
|
229 |
# define SWIFT_EXTERN extern |
|
230 |
# endif |
|
231 |
#endif |
|
232 |
#if !defined(SWIFT_CALL) |
|
233 |
# define SWIFT_CALL __attribute__((swiftcall)) |
|
234 |
#endif |
|
235 |
#if !defined(SWIFT_INDIRECT_RESULT) |
|
236 |
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) |
|
237 |
#endif |
|
238 |
#if !defined(SWIFT_CONTEXT) |
|
239 |
# define SWIFT_CONTEXT __attribute__((swift_context)) |
|
240 |
#endif |
|
241 |
#if !defined(SWIFT_ERROR_RESULT) |
|
242 |
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) |
|
243 |
#endif |
|
244 |
#if defined(__cplusplus) |
|
245 |
# define SWIFT_NOEXCEPT noexcept |
|
246 |
#else |
|
247 |
# define SWIFT_NOEXCEPT |
|
248 |
#endif |
|
249 |
#if defined(_WIN32) |
|
250 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
251 |
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) |
|
252 |
#endif |
|
253 |
#else |
|
254 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
255 |
# define SWIFT_IMPORT_STDLIB_SYMBOL |
|
256 |
#endif |
|
257 |
#endif |
|
258 |
#if defined(__OBJC__) |
|
259 |
#if __has_feature(objc_modules) |
|
260 |
#if __has_warning("-Watimport-in-framework-header") |
|
261 |
#pragma clang diagnostic ignored "-Watimport-in-framework-header" |
|
262 |
#endif |
|
263 |
@import Foundation; |
|
264 |
@import ObjectiveC; |
|
265 |
@import UIKit; |
|
266 |
#endif |
|
267 |
|
|
268 |
#endif |
|
269 |
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" |
|
270 |
#pragma clang diagnostic ignored "-Wduplicate-method-arg" |
|
271 |
#if __has_warning("-Wpragma-clang-attribute") |
|
272 |
# pragma clang diagnostic ignored "-Wpragma-clang-attribute" |
|
273 |
#endif |
|
274 |
#pragma clang diagnostic ignored "-Wunknown-pragmas" |
|
275 |
#pragma clang diagnostic ignored "-Wnullability" |
|
276 |
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" |
|
277 |
|
|
278 |
#if __has_attribute(external_source_symbol) |
|
279 |
# pragma push_macro("any") |
|
280 |
# undef any |
|
281 |
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Didomi",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) |
|
282 |
# pragma pop_macro("any") |
|
283 |
#endif |
|
284 |
|
|
285 |
#if defined(__OBJC__) |
|
286 |
|
|
287 |
/// Consent status to a vendor or purpose. |
|
288 |
typedef SWIFT_ENUM(NSInteger, ConsentStatus, open) { |
|
289 |
ConsentStatusEnable = 0, |
|
290 |
ConsentStatusDisable = 1, |
|
291 |
ConsentStatusUnknown = 2, |
|
292 |
}; |
|
293 |
|
|
294 |
@class NSString; |
|
295 |
@class DDMCurrentUserStatusPurpose; |
|
296 |
@class DDMCurrentUserStatusVendor; |
|
297 |
enum Regulation : NSInteger; |
|
298 |
|
|
299 |
SWIFT_CLASS_NAMED("CurrentUserStatus") |
|
300 |
@interface DDMCurrentUserStatus : NSObject |
|
301 |
@property (nonatomic, readonly, copy) NSDictionary<NSString *, DDMCurrentUserStatusPurpose *> * _Nonnull purposes; |
|
302 |
@property (nonatomic, readonly, copy) NSDictionary<NSString *, DDMCurrentUserStatusVendor *> * _Nonnull vendors; |
|
303 |
@property (nonatomic, readonly, copy) NSString * _Nonnull userID; |
|
304 |
@property (nonatomic, readonly, copy) NSString * _Nonnull created; |
|
305 |
@property (nonatomic, readonly, copy) NSString * _Nonnull updated; |
|
306 |
@property (nonatomic, readonly, copy) NSString * _Nonnull consentString; |
|
307 |
@property (nonatomic, readonly, copy) NSString * _Nonnull additionalConsent; |
|
308 |
@property (nonatomic, readonly) enum Regulation regulation; |
|
309 |
@property (nonatomic, readonly, copy) NSString * _Nonnull didomiDCS; |
|
310 |
- (nonnull instancetype)initWithPurposes:(NSDictionary<NSString *, DDMCurrentUserStatusPurpose *> * _Nonnull)purposes vendors:(NSDictionary<NSString *, DDMCurrentUserStatusVendor *> * _Nonnull)vendors OBJC_DESIGNATED_INITIALIZER; |
|
311 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
312 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
313 |
@end |
|
314 |
|
|
315 |
|
|
316 |
@interface DDMCurrentUserStatus (SWIFT_EXTENSION(Didomi)) |
|
317 |
@end |
|
318 |
|
|
319 |
|
|
320 |
SWIFT_CLASS_NAMED("PurposeStatus") |
|
321 |
@interface DDMCurrentUserStatusPurpose : NSObject |
|
322 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
323 |
@property (nonatomic) BOOL enabled; |
|
324 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id enabled:(BOOL)enabled OBJC_DESIGNATED_INITIALIZER; |
|
325 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
326 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
327 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
328 |
@end |
|
329 |
|
|
330 |
|
|
331 |
SWIFT_CLASS_NAMED("VendorStatus") |
|
332 |
@interface DDMCurrentUserStatusVendor : NSObject |
|
333 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
334 |
@property (nonatomic) BOOL enabled; |
|
335 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id enabled:(BOOL)enabled OBJC_DESIGNATED_INITIALIZER; |
|
336 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
337 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
338 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
339 |
@end |
|
340 |
|
|
341 |
|
|
342 |
/// Class used to asynchronously enable and disable purposes and vendors through different methods. |
|
343 |
/// These changes will not be reflected on the user status until the <code>commit</code> method is called. |
|
344 |
SWIFT_CLASS("_TtC6Didomi28CurrentUserStatusTransaction") |
|
345 |
@interface CurrentUserStatusTransaction : NSObject |
|
346 |
/// Enable purposes based on an array of IDs. |
|
347 |
/// \param ids array of purpose IDs. |
|
348 |
/// |
|
349 |
/// |
|
350 |
/// returns: |
|
351 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
352 |
- (CurrentUserStatusTransaction * _Nonnull)enablePurposes:(NSArray<NSString *> * _Nonnull)ids; |
|
353 |
/// Enable vendors based on an array of IDs. |
|
354 |
/// \param ids array of vendor IDs. |
|
355 |
/// |
|
356 |
/// |
|
357 |
/// returns: |
|
358 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
359 |
- (CurrentUserStatusTransaction * _Nonnull)enableVendors:(NSArray<NSString *> * _Nonnull)ids; |
|
360 |
/// Enable a single purpose based on its ID. |
|
361 |
/// \param id purpose ID. |
|
362 |
/// |
|
363 |
/// |
|
364 |
/// returns: |
|
365 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
366 |
- (CurrentUserStatusTransaction * _Nonnull)enablePurpose:(NSString * _Nonnull)id; |
|
367 |
/// Enable a single vendor based on its ID. |
|
368 |
/// \param id vendor ID. |
|
369 |
/// |
|
370 |
/// |
|
371 |
/// returns: |
|
372 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
373 |
- (CurrentUserStatusTransaction * _Nonnull)enableVendor:(NSString * _Nonnull)id; |
|
374 |
/// Disable purposes based on an array of IDs. |
|
375 |
/// \param ids array of purpose IDs. |
|
376 |
/// |
|
377 |
/// |
|
378 |
/// returns: |
|
379 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
380 |
- (CurrentUserStatusTransaction * _Nonnull)disablePurposes:(NSArray<NSString *> * _Nonnull)ids; |
|
381 |
/// Disable vendors based on an array of IDs. |
|
382 |
/// \param ids array of vendor IDs. |
|
383 |
/// |
|
384 |
/// |
|
385 |
/// returns: |
|
386 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
387 |
- (CurrentUserStatusTransaction * _Nonnull)disableVendors:(NSArray<NSString *> * _Nonnull)ids; |
|
388 |
/// Disable a single purpose based on its ID. |
|
389 |
/// \param id purpose ID. |
|
390 |
/// |
|
391 |
/// |
|
392 |
/// returns: |
|
393 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
394 |
- (CurrentUserStatusTransaction * _Nonnull)disablePurpose:(NSString * _Nonnull)id; |
|
395 |
/// Disable a single vendor based on its ID. |
|
396 |
/// \param id vendor ID. |
|
397 |
/// |
|
398 |
/// |
|
399 |
/// returns: |
|
400 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
401 |
- (CurrentUserStatusTransaction * _Nonnull)disableVendor:(NSString * _Nonnull)id; |
|
402 |
/// Commit the user status changes made through the “enable” and “disable” methods. |
|
403 |
/// |
|
404 |
/// returns: |
|
405 |
/// <em>true</em> if user’s choices have been updated, <em>false</em> otherwise. |
|
406 |
- (BOOL)commit SWIFT_WARN_UNUSED_RESULT; |
|
407 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
408 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
409 |
@end |
|
410 |
|
|
411 |
|
|
412 |
@protocol ViewProviderDelegate; |
|
413 |
@class DidomiInitializeParameters; |
|
414 |
@class DDMErrorEvent; |
|
415 |
@class DDMEventListener; |
|
416 |
@class DDMPurpose; |
|
417 |
@class DDMVendor; |
|
418 |
|
|
419 |
SWIFT_CLASS("_TtC6Didomi6Didomi") |
|
420 |
@interface Didomi : NSObject |
|
421 |
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) Didomi * _Nonnull shared;) |
|
422 |
+ (Didomi * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT; |
|
423 |
+ (void)setShared:(Didomi * _Nonnull)value; |
|
424 |
@property (nonatomic, weak) id <ViewProviderDelegate> _Nullable viewProviderDelegate; |
|
425 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
426 |
/// Initialize the Didomi SDK |
|
427 |
/// \param parameters object specifying parameters to initialize the SDK. |
|
428 |
/// |
|
429 |
- (void)initialize:(DidomiInitializeParameters * _Nonnull)parameters; |
|
430 |
/// Set custom user agent name and version. |
|
431 |
/// \param name Agent name. |
|
432 |
/// |
|
433 |
/// \param version Agent version. |
|
434 |
/// |
|
435 |
- (void)setUserAgentWithName:(NSString * _Nonnull)name version:(NSString * _Nonnull)version; |
|
436 |
/// Set the user consent status. |
|
437 |
/// \param enabledPurposeIds set containing <em>enabled purpose ids</em> |
|
438 |
/// |
|
439 |
/// \param disabledPurposeIds set containing <em>disabled purpose ids</em> |
|
440 |
/// |
|
441 |
/// \param enabledVendorIds set containing <em>enabled vendor ids</em> |
|
442 |
/// |
|
443 |
/// \param disabledVendorIds set containing <em>disabled purpose ids</em> |
|
444 |
/// |
|
445 |
/// |
|
446 |
/// returns: |
|
447 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
448 |
- (BOOL)setUserConsentStatusWithEnabledPurposeIds:(NSSet<NSString *> * _Nonnull)enabledPurposeIds disabledPurposeIds:(NSSet<NSString *> * _Nonnull)disabledPurposeIds enabledVendorIds:(NSSet<NSString *> * _Nonnull)enabledVendorIds disabledVendorIds:(NSSet<NSString *> * _Nonnull)disabledVendorIds SWIFT_WARN_UNUSED_RESULT; |
|
449 |
/// Determine if the user is subject to a regulation that requires consent collection. |
|
450 |
/// This along with the choices that the user has or has not made |
|
451 |
/// will determine each time that the SDK is initialized if the notice should be displayed or not. |
|
452 |
/// |
|
453 |
/// returns: |
|
454 |
/// <em>true</em> if consent is required, <em>false</em> if it is not required. |
|
455 |
- (BOOL)isConsentRequired SWIFT_WARN_UNUSED_RESULT; |
|
456 |
/// Determine if consent information is available for all purposes and vendors that are required |
|
457 |
/// |
|
458 |
/// returns: |
|
459 |
/// <em>true</em> if consent is required and consent information is available, <em>false</em> otherwise. |
|
460 |
- (BOOL)isUserConsentStatusPartial SWIFT_WARN_UNUSED_RESULT; |
|
461 |
/// Determine if legitimate interest information is available for all purposes and vendors that are required |
|
462 |
/// |
|
463 |
/// returns: |
|
464 |
/// <em>true</em> if consent is required and legitimate interest information is available, <em>false</em> otherwise. |
|
465 |
- (BOOL)isUserLegitimateInterestStatusPartial SWIFT_WARN_UNUSED_RESULT; |
|
466 |
/// Set the user status for purposes and vendors for consent and legitimate interest. |
|
467 |
/// \param purposesConsentStatus boolean used to determine if consent will be enabled or disabled for all purposes. |
|
468 |
/// |
|
469 |
/// \param purposesLIStatus boolean used to determine if legitimate interest will be enabled or disabled for all purposes. |
|
470 |
/// |
|
471 |
/// \param vendorsConsentStatus boolean used to determine if consent will be enabled or disabled for all vendors. |
|
472 |
/// |
|
473 |
/// \param vendorsLIStatus boolean used to determine if legitimate interest will be enabled or disabled for all vendors. |
|
474 |
/// |
|
475 |
/// |
|
476 |
/// returns: |
|
477 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
478 |
- (BOOL)setUserStatusWithPurposesConsentStatus:(BOOL)purposesConsentStatus purposesLIStatus:(BOOL)purposesLIStatus vendorsConsentStatus:(BOOL)vendorsConsentStatus vendorsLIStatus:(BOOL)vendorsLIStatus; |
|
479 |
/// Set the user status for purposes and vendors for consent and legitimate interest. |
|
480 |
/// \param enabledConsentPurposeIds List of purpose IDs to enable for consent. |
|
481 |
/// |
|
482 |
/// \param disabledConsentPurposeIds List of purpose IDs to disable for consent. |
|
483 |
/// |
|
484 |
/// \param enabledLIPurposeIds List of purpose IDs to enable for LI. |
|
485 |
/// |
|
486 |
/// \param disabledLIPurposeIds List of purpose IDs to disable for LI. |
|
487 |
/// |
|
488 |
/// \param enabledConsentVendorIds List of vendor IDs to enable for consent. |
|
489 |
/// |
|
490 |
/// \param disabledConsentVendorIds List of vendor IDs to disable for consent. |
|
491 |
/// |
|
492 |
/// \param enabledLIVendorIds List of vendor IDs to enable for LI. |
|
493 |
/// |
|
494 |
/// \param disabledLIVendorIds List of vendor IDs to disable for LI. |
|
495 |
/// |
|
496 |
- (BOOL)setUserStatusWithEnabledConsentPurposeIds:(NSSet<NSString *> * _Nonnull)enabledConsentPurposeIds disabledConsentPurposeIds:(NSSet<NSString *> * _Nonnull)disabledConsentPurposeIds enabledLIPurposeIds:(NSSet<NSString *> * _Nonnull)enabledLIPurposeIds disabledLIPurposeIds:(NSSet<NSString *> * _Nonnull)disabledLIPurposeIds enabledConsentVendorIds:(NSSet<NSString *> * _Nonnull)enabledConsentVendorIds disabledConsentVendorIds:(NSSet<NSString *> * _Nonnull)disabledConsentVendorIds enabledLIVendorIds:(NSSet<NSString *> * _Nonnull)enabledLIVendorIds disabledLIVendorIds:(NSSet<NSString *> * _Nonnull)disabledLIVendorIds; |
|
497 |
/// Method that allows to enable consent and legitimate interest for all the required purposes. |
|
498 |
/// |
|
499 |
/// returns: |
|
500 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
501 |
- (BOOL)setUserAgreeToAll; |
|
502 |
/// Method that allows to disable consent and legitimate interest for all the required purposes and vendors. |
|
503 |
/// |
|
504 |
/// returns: |
|
505 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
506 |
- (BOOL)setUserDisagreeToAll; |
|
507 |
/// Provide a function that needs to be called once the SDK is ready |
|
508 |
/// Automatically call the function if the SDK is already ready (that’s why this is not a standard event) |
|
509 |
- (void)onReadyWithCallback:(void (^ _Nonnull)(void))callback; |
|
510 |
/// Accepts a closure that will be called if an unexpected situation occurs. |
|
511 |
/// \param callback closure to be called if an unexpected situation occurs. |
|
512 |
/// |
|
513 |
- (void)onErrorWithCallback:(void (^ _Nonnull)(DDMErrorEvent * _Nonnull))callback; |
|
514 |
/// Listen for changes on the status of a vendor. |
|
515 |
/// \param id vendor ID. |
|
516 |
/// |
|
517 |
/// \param callback callback to be executed when there are changes on the specified vendor. |
|
518 |
/// |
|
519 |
- (void)addVendorStatusListenerWithId:(NSString * _Nonnull)id :(void (^ _Nonnull)(DDMCurrentUserStatusVendor * _Nonnull))callback; |
|
520 |
/// Stop listening for changes on the status of a vendor. |
|
521 |
/// \param id vendor ID. |
|
522 |
/// |
|
523 |
- (void)removeVendorStatusListenerWithId:(NSString * _Nonnull)id; |
|
524 |
/// Remove all consents for the user |
|
525 |
- (void)reset; |
|
526 |
/// Get the configured purpose IDs |
|
527 |
/// @return |
|
528 |
- (NSSet<NSString *> * _Nonnull)getRequiredPurposeIds SWIFT_WARN_UNUSED_RESULT; |
|
529 |
/// Get the configured vendor IDs |
|
530 |
/// @return |
|
531 |
- (NSSet<NSString *> * _Nonnull)getRequiredVendorIds SWIFT_WARN_UNUSED_RESULT; |
|
532 |
/// Add an event listener |
|
533 |
/// \param listener listener to be added. |
|
534 |
/// |
|
535 |
- (void)addEventListenerWithListener:(DDMEventListener * _Nonnull)listener; |
|
536 |
/// Remove an event listener |
|
537 |
/// \param listener listener to be removed. |
|
538 |
/// |
|
539 |
- (void)removeEventListenerWithListener:(DDMEventListener * _Nonnull)listener; |
|
540 |
/// Is the Didomi SDK ready? |
|
541 |
- (BOOL)isReady SWIFT_WARN_UNUSED_RESULT; |
|
542 |
/// Method used to get an array of required purposes. |
|
543 |
/// |
|
544 |
/// returns: |
|
545 |
/// array of required purposes. |
|
546 |
- (NSArray<DDMPurpose *> * _Nonnull)getRequiredPurposes SWIFT_WARN_UNUSED_RESULT; |
|
547 |
/// Method used to get an array of required vendors. |
|
548 |
/// |
|
549 |
/// returns: |
|
550 |
/// array of required vendors. |
|
551 |
- (NSArray<DDMVendor *> * _Nonnull)getRequiredVendors SWIFT_WARN_UNUSED_RESULT; |
|
552 |
/// Method used to get a Purpose based on its ID. |
|
553 |
/// \param purposeId purpose ID used in the search. |
|
554 |
/// |
|
555 |
/// |
|
556 |
/// returns: |
|
557 |
/// purpose found in the array. |
|
558 |
- (DDMPurpose * _Nullable)getPurposeWithPurposeId:(NSString * _Nonnull)purposeId SWIFT_WARN_UNUSED_RESULT; |
|
559 |
/// Method used to get a Vendor based on its ID. |
|
560 |
/// \param vendorId vendor ID used in the search. |
|
561 |
/// |
|
562 |
/// |
|
563 |
/// returns: |
|
564 |
/// vendor found in the array. |
|
565 |
- (DDMVendor * _Nullable)getVendorWithVendorId:(NSString * _Nonnull)vendorId SWIFT_WARN_UNUSED_RESULT; |
|
566 |
/// Get number of vendors. |
|
567 |
/// <ul> |
|
568 |
/// <li> |
|
569 |
/// Returns the count of all vendors |
|
570 |
/// </li> |
|
571 |
/// </ul> |
|
572 |
- (NSInteger)getTotalVendorCount SWIFT_WARN_UNUSED_RESULT; |
|
573 |
/// Get number of IAB vendors |
|
574 |
/// <ul> |
|
575 |
/// <li> |
|
576 |
/// Returns the count of IAB vendors |
|
577 |
/// </li> |
|
578 |
/// </ul> |
|
579 |
- (NSInteger)getIABVendorCount SWIFT_WARN_UNUSED_RESULT; |
|
580 |
/// Get number of non-IAB vendors |
|
581 |
/// <ul> |
|
582 |
/// <li> |
|
583 |
/// Returns the count of non-IAB vendors |
|
584 |
/// </li> |
|
585 |
/// </ul> |
|
586 |
- (NSInteger)getNonIABVendorCount SWIFT_WARN_UNUSED_RESULT; |
|
587 |
/// Get JavaScript to embed into a WebView to pass the consent status from the app |
|
588 |
/// to the Didomi Web SDK embedded into the WebView |
|
589 |
/// Inject the returned JavaScript into a WebView |
|
590 |
/// \param extra Extra JavaScript to inject in the returned code |
|
591 |
/// |
|
592 |
/// |
|
593 |
/// returns: |
|
594 |
/// JavaScript code to inject in a WebView |
|
595 |
- (NSString * _Nonnull)getJavaScriptForWebViewWithExtra:(NSString * _Nonnull)extra SWIFT_WARN_UNUSED_RESULT; |
|
596 |
/// Get a query-string to add to the URL of a WebView or Chrome Custom Tab to pass the consent status from the app to the Didomi Web SDK embedded on the target URL. |
|
597 |
/// The returned parameter will have the format <code>didomiConfig.user.externalConsent.value=...</code> It includes the user consent information URL-encoded and JSON-encoded. |
|
598 |
/// Append the returned query-string parameter to the URL of your WebView or SFSafariViewController. |
|
599 |
/// See https://developers.didomi.io/cmp/mobile-sdk/share-consent-with-webviews for more information. |
|
600 |
/// |
|
601 |
/// returns: |
|
602 |
/// Query string parameter to append to URL |
|
603 |
- (NSString * _Nonnull)getQueryStringForWebView SWIFT_WARN_UNUSED_RESULT; |
|
604 |
/// Method used to update the selected language of the Didomi SDK and any property that depends on it. |
|
605 |
/// In most cases this method doesn’t need to be called. It would only be required for those apps that allow language change on-the-fly, i.e.: from within the app rather than from the device settings. |
|
606 |
/// In order to update the language of the views displayed by the Didomi SDK, this method needs to be called before these views are displayed. |
|
607 |
/// \param languageCode string containing the language code e.g.: “es”, “fr”, etc. |
|
608 |
/// |
|
609 |
- (void)updateSelectedLanguageWithLanguageCode:(NSString * _Nonnull)languageCode; |
|
610 |
@end |
|
611 |
|
|
612 |
typedef SWIFT_ENUM(NSInteger, Views, open) { |
|
613 |
ViewsPurposes = 0, |
|
614 |
ViewsSensitivePersonalInformation = 1, |
|
615 |
ViewsVendors = 2, |
|
616 |
}; |
|
617 |
|
|
618 |
@class UIViewController; |
|
619 |
|
|
620 |
/// Protocol used to provide the view controllers for the preferences/purposes and notice view. |
|
621 |
/// To provide customs views, this protocol will have to be implemented. |
|
622 |
/// This protocol is implemented by the Didomi singleton to provide the default view controllers. |
|
623 |
SWIFT_PROTOCOL("_TtP6Didomi20ViewProviderDelegate_") |
|
624 |
@protocol ViewProviderDelegate |
|
625 |
/// Method used to provide a view controller that will be used to display the notice. |
|
626 |
/// \param position string that represents the position of the notice (e.g.: bottom, popup, etc.). |
|
627 |
/// |
|
628 |
/// \param skipped Whether notice display is skipped and Preferences are displayed directly |
|
629 |
/// |
|
630 |
/// |
|
631 |
/// returns: |
|
632 |
/// the view controller associated to the notice. |
|
633 |
- (UIViewController * _Nonnull)getNoticeViewControllerWithPosition:(NSString * _Nonnull)position noticeSkipped:(BOOL)noticeSkipped SWIFT_WARN_UNUSED_RESULT; |
|
634 |
/// Method used to provide a view controller that will be used to display the preferences/purposes view. |
|
635 |
/// |
|
636 |
/// returns: |
|
637 |
/// the view controller associated to the preferences/purposes view. |
|
638 |
- (UIViewController * _Nonnull)getPreferencesViewController SWIFT_WARN_UNUSED_RESULT; |
|
639 |
@end |
|
640 |
|
|
641 |
|
|
642 |
@interface Didomi (SWIFT_EXTENSION(Didomi)) <ViewProviderDelegate> |
|
643 |
- (UIViewController * _Nonnull)getNoticeViewControllerWithPosition:(NSString * _Nonnull)position noticeSkipped:(BOOL)noticeSkipped SWIFT_WARN_UNUSED_RESULT; |
|
644 |
- (UIViewController * _Nonnull)getPreferencesViewController SWIFT_WARN_UNUSED_RESULT; |
|
645 |
@end |
|
646 |
|
|
647 |
@class UserAuthParams; |
|
648 |
@class DDMUserStatus; |
|
649 |
|
|
650 |
@interface Didomi (SWIFT_EXTENSION(Didomi)) |
|
651 |
/// Provide the objects required to display UI elements |
|
652 |
- (void)setupUIWithContainerController:(UIViewController * _Nonnull)containerController; |
|
653 |
/// Force show the consent notice without checking if consent is required |
|
654 |
/// Important: Do not keep a local reference to the View Controller itself as that could create a memory leak |
|
655 |
- (void)forceShowNotice; |
|
656 |
/// Show the consent notice (if required, not disabled in the config and not already displayed) |
|
657 |
- (void)showNotice; |
|
658 |
/// Hide the notice if it is currently displayed |
|
659 |
- (void)hideNotice; |
|
660 |
/// Check if the consent notice is currently displayed |
|
661 |
/// @return |
|
662 |
- (BOOL)isNoticeVisible SWIFT_WARN_UNUSED_RESULT; |
|
663 |
/// Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet |
|
664 |
/// |
|
665 |
/// returns: |
|
666 |
/// A boolean depending if the consent should be collected or not |
|
667 |
- (BOOL)shouldConsentBeCollected SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_MSG("Use shouldUserStatusBeCollected() instead."); |
|
668 |
/// Determine if the User Status (consent) should be collected or not. User Status should be collected if: |
|
669 |
/// <ul> |
|
670 |
/// <li> |
|
671 |
/// Regulation is different from NONE and |
|
672 |
/// </li> |
|
673 |
/// <li> |
|
674 |
/// User status is partial and |
|
675 |
/// </li> |
|
676 |
/// <li> |
|
677 |
/// The number of days before displaying the notice again has exceeded the limit specified on the Console or no User Status has been saved |
|
678 |
/// </li> |
|
679 |
/// </ul> |
|
680 |
/// |
|
681 |
/// returns: |
|
682 |
/// A boolean depending if the User Status (consent) should be collected or not |
|
683 |
- (BOOL)shouldUserStatusBeCollected SWIFT_WARN_UNUSED_RESULT; |
|
684 |
/// Check if user status is partial |
|
685 |
/// |
|
686 |
/// returns: |
|
687 |
/// <em>true</em> if user status is partial, <em>false</em> otherwise |
|
688 |
- (BOOL)isUserStatusPartial SWIFT_WARN_UNUSED_RESULT; |
|
689 |
/// Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed. |
|
690 |
/// \param controller view controller from where preferences will be presented. |
|
691 |
/// |
|
692 |
/// \param view a value from <code>Didomi.Views</code>. It can be <code>.purposes</code> or <code>.sensitivePersonalInformation</code> or <code>.vendors</code> (<code>ViewsPurposes</code> or <code>ViewsSensitivePersonalInformation</code> or <code>ViewsVendors</code> in Objective-C) |
|
693 |
/// |
|
694 |
- (void)showPreferencesWithController:(UIViewController * _Nullable)controller view:(enum Views)view; |
|
695 |
/// Hide the preferences popup for purposes |
|
696 |
- (void)hidePreferences; |
|
697 |
/// Method used to check if the Preferences view is visible. |
|
698 |
/// |
|
699 |
/// returns: |
|
700 |
/// <em>true</em> if Preferences view is visible, <em>false</em> otherwise. |
|
701 |
- (BOOL)isPreferencesVisible SWIFT_WARN_UNUSED_RESULT; |
|
702 |
/// Method used to get a translated text based on the key being passed. |
|
703 |
/// The language and the source of this translated text will depend on the availability of the translation for the specific key. |
|
704 |
/// The language being used will be either the selected language of the SDK (based on device Locale and other parameters) or the language specified by app developers as the default language being used by the SDK. The source can be either the <code>didomi_config.json</code> file which can be either local or remote, or the <code>didomi_master_config.json</code> file which is bundled within the SDK. |
|
705 |
/// These are the attempts performed by the SDK to try to find a translation for the specific key: |
|
706 |
/// <ul> |
|
707 |
/// <li> |
|
708 |
/// Get translated value in user locale (selected language) from <code>didomi_config.json</code> (either local or remote). |
|
709 |
/// </li> |
|
710 |
/// <li> |
|
711 |
/// Get translated value in default locale (from the config) from <code>didomi_config.json</code> (either local or remote). |
|
712 |
/// </li> |
|
713 |
/// <li> |
|
714 |
/// Get translated value in user locale (selected language) from <code>didomi_master_config.json</code> (bundled within the Didomi SDK). |
|
715 |
/// </li> |
|
716 |
/// <li> |
|
717 |
/// Get translated value in default locale (from the config) from <code>didomi_master_config.json</code> (bundled within the Didomi SDK). |
|
718 |
/// </li> |
|
719 |
/// </ul> |
|
720 |
/// If no translation can be found after these 4 attempts, the key will be returned. |
|
721 |
/// App developers can provide these translated texts through the <code>didomi_config.json</code> file (locally or remotely) in 3 different ways: |
|
722 |
/// <ul> |
|
723 |
/// <li> |
|
724 |
/// Custom texts for the consent notice: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-notice#texts |
|
725 |
/// </li> |
|
726 |
/// <li> |
|
727 |
/// Custom texts for the preferences: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-preferences-popup#text |
|
728 |
/// </li> |
|
729 |
/// <li> |
|
730 |
/// Custom texts for custom notices: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-theme#translatable-texts-for-custom-notices |
|
731 |
/// </li> |
|
732 |
/// </ul> |
|
733 |
/// \param key used to find its corresponding value in one of the different sources. |
|
734 |
/// |
|
735 |
/// |
|
736 |
/// returns: |
|
737 |
/// a translated string if a translation was found, the same key that was passed otherwise. |
|
738 |
- (NSString * _Nonnull)getTranslatedTextWithKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
739 |
/// Method used to get a dictionary/map in the form of { “en”: “Key in English”, “fr”: “Key in French.” } |
|
740 |
/// for a given key. |
|
741 |
/// \param key used to find its corresponding value in the dictionary/map. |
|
742 |
/// |
|
743 |
/// |
|
744 |
/// returns: |
|
745 |
/// dictionary containing the different translations for a given key. |
|
746 |
- (NSDictionary<NSString *, NSString *> * _Nullable)getTextWithKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
747 |
/// Set the minimum level of messages to log |
|
748 |
/// Messages with a level below <code>minLevel</code> will not be logged. |
|
749 |
/// Levels are standard levels from <code>OSLogType</code> (https://developer.apple.com/documentation/os/logging/choosing_the_log_level_for_a_message): |
|
750 |
/// <ul> |
|
751 |
/// <li> |
|
752 |
/// OSLogType.info (1) |
|
753 |
/// </li> |
|
754 |
/// <li> |
|
755 |
/// OSLogType.debug (2) |
|
756 |
/// </li> |
|
757 |
/// <li> |
|
758 |
/// OSLogType.error (16) |
|
759 |
/// </li> |
|
760 |
/// <li> |
|
761 |
/// OSLogType.fault (17) |
|
762 |
/// </li> |
|
763 |
/// </ul> |
|
764 |
/// We recommend setting <code>OSLogType.error</code> (16) in production |
|
765 |
/// \param minLevel Minimum level of messages to log |
|
766 |
/// |
|
767 |
- (void)setLogLevelWithMinLevel:(uint8_t)minLevel; |
|
768 |
/// Set organization user information |
|
769 |
/// \param id Organization user ID |
|
770 |
/// |
|
771 |
- (void)setUserWithId:(NSString * _Nonnull)id; |
|
772 |
/// Set organization user information and display consent notice if it is needed after synchronization |
|
773 |
/// \param id Organization user ID |
|
774 |
/// |
|
775 |
/// \param containerController View controller from which we can setup Didomi UI |
|
776 |
/// |
|
777 |
- (void)setUserWithId:(NSString * _Nonnull)id containerController:(UIViewController * _Nonnull)containerController; |
|
778 |
/// Set organization user information with authentication |
|
779 |
/// \param userAuthParams Organization user authentication params |
|
780 |
/// |
|
781 |
- (void)setUserWithUserAuthParams:(UserAuthParams * _Nonnull)userAuthParams; |
|
782 |
/// Set organization user information with authentication, and display consent notice if it is needed after synchronization |
|
783 |
/// \param userAuthParams Organization user authentication params |
|
784 |
/// |
|
785 |
/// \param containerController View controller from which we can setup Didomi UI |
|
786 |
/// |
|
787 |
- (void)setUserWithUserAuthParams:(UserAuthParams * _Nonnull)userAuthParams containerController:(UIViewController * _Nonnull)containerController; |
|
788 |
/// Remove organization user information (should be called when the SDK is initialized). |
|
789 |
- (void)clearUser; |
|
790 |
/// Get an instance of <code>UserStatus</code> containing all the information related to the user’s choices. |
|
791 |
- (DDMUserStatus * _Nonnull)getUserStatus SWIFT_WARN_UNUSED_RESULT; |
|
792 |
/// Get an instance of <code>CurrentUserStatus</code> containing all the information related to the user’s choices. |
|
793 |
- (DDMCurrentUserStatus * _Nonnull)getCurrentUserStatus SWIFT_WARN_UNUSED_RESULT; |
|
794 |
/// Save user’s choices. |
|
795 |
/// \param currentUserStatus instance of CurrentUserStatus containing the user’s choices. |
|
796 |
/// |
|
797 |
/// |
|
798 |
/// returns: |
|
799 |
/// <em>true</em> if user’s choices have been saved, <em>false</em> otherwise. |
|
800 |
- (BOOL)setCurrentUserStatusWithCurrentUserStatus:(DDMCurrentUserStatus * _Nonnull)currentUserStatus SWIFT_WARN_UNUSED_RESULT; |
|
801 |
/// Create an instance of the<code>CurrentUserStatusTransaction</code> class. |
|
802 |
/// This class is used to asynchronously enable and disable purposes and vendors through different methods. |
|
803 |
/// These changes will not be reflected on the user status until the <code>commit</code> method of the returned object is called. |
|
804 |
/// |
|
805 |
/// returns: |
|
806 |
/// an instance of the <code>CurrentUserStatusTransaction</code> class |
|
807 |
- (CurrentUserStatusTransaction * _Nonnull)openCurrentUserStatusTransaction SWIFT_WARN_UNUSED_RESULT; |
|
808 |
@end |
|
809 |
|
|
810 |
enum DDMErrorEventType : NSInteger; |
|
811 |
|
|
812 |
/// Type used to represent unexpected situations during SDK initialization. |
|
813 |
SWIFT_CLASS_NAMED("DidomiErrorEvent") |
|
814 |
@interface DDMErrorEvent : NSObject |
|
815 |
@property (nonatomic, readonly, copy) NSString * _Nonnull descriptionText; |
|
816 |
@property (nonatomic, readonly) enum DDMErrorEventType type; |
|
817 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
818 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
819 |
@end |
|
820 |
|
|
821 |
/// Enum used to represent a type for the DidomiErrorEvent class. |
|
822 |
typedef SWIFT_ENUM_NAMED(NSInteger, DDMErrorEventType, "DidomiErrorEventType", open) { |
|
823 |
DDMErrorEventTypeNilProperty = 0, |
|
824 |
DDMErrorEventTypeNotReady = 1, |
|
825 |
DDMErrorEventTypeFailedAlready = 2, |
|
826 |
DDMErrorEventTypeConfigFileError = 3, |
|
827 |
DDMErrorEventTypeInvalidApiKey = 4, |
|
828 |
}; |
|
829 |
|
|
830 |
|
|
831 |
/// Initialization parameters for Didomi SDK |
|
832 |
SWIFT_CLASS("_TtC6Didomi26DidomiInitializeParameters") |
|
833 |
@interface DidomiInitializeParameters : NSObject |
|
834 |
- (nonnull instancetype)initWithApiKey:(NSString * _Nonnull)apiKey localConfigurationPath:(NSString * _Nullable)localConfigurationPath remoteConfigurationURL:(NSString * _Nullable)remoteConfigurationURL providerID:(NSString * _Nullable)providerID disableDidomiRemoteConfig:(BOOL)disableDidomiRemoteConfig languageCode:(NSString * _Nullable)languageCode noticeID:(NSString * _Nullable)noticeID OBJC_DESIGNATED_INITIALIZER; |
|
835 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
836 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
837 |
@end |
|
838 |
|
|
839 |
|
|
840 |
enum DDMEventType : NSInteger; |
|
841 |
|
|
842 |
/// Class used as a listener for internal events occurred in the SDK. |
|
843 |
SWIFT_CLASS_NAMED("EventListener") |
|
844 |
@interface DDMEventListener : NSObject |
|
845 |
/// Closures used to execute code when the different events are triggered. |
|
846 |
/// Internal |
|
847 |
@property (nonatomic, copy) void (^ _Nonnull onConsentChanged)(enum DDMEventType); |
|
848 |
@property (nonatomic, copy) void (^ _Nonnull onReady)(enum DDMEventType); |
|
849 |
@property (nonatomic, copy) void (^ _Nonnull onError)(DDMErrorEvent * _Nonnull); |
|
850 |
/// Notice |
|
851 |
@property (nonatomic, copy) void (^ _Nonnull onHideNotice)(enum DDMEventType); |
|
852 |
@property (nonatomic, copy) void (^ _Nonnull onShowNotice)(enum DDMEventType); |
|
853 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickAgree)(enum DDMEventType); |
|
854 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickDisagree)(enum DDMEventType); |
|
855 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickMoreInfo)(enum DDMEventType); |
|
856 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickViewVendors)(enum DDMEventType); |
|
857 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickViewSPIPurposes)(enum DDMEventType); |
|
858 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickPrivacyPolicy)(enum DDMEventType); |
|
859 |
/// Preferences |
|
860 |
@property (nonatomic, copy) void (^ _Nonnull onHidePreferences)(enum DDMEventType); |
|
861 |
@property (nonatomic, copy) void (^ _Nonnull onShowPreferences)(enum DDMEventType); |
|
862 |
/// Preferences - Views |
|
863 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewPurposes)(enum DDMEventType); |
|
864 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewVendors)(enum DDMEventType); |
|
865 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewSPIPurposes)(enum DDMEventType); |
|
866 |
/// Preferences - Purpose |
|
867 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAll)(enum DDMEventType); |
|
868 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAll)(enum DDMEventType); |
|
869 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAllPurposes)(enum DDMEventType); |
|
870 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAllPurposes)(enum DDMEventType); |
|
871 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickResetAllPurposes)(enum DDMEventType); |
|
872 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickPurposeAgree)(enum DDMEventType, NSString * _Nullable); |
|
873 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickPurposeDisagree)(enum DDMEventType, NSString * _Nullable); |
|
874 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickCategoryAgree)(enum DDMEventType, NSString * _Nullable); |
|
875 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickCategoryDisagree)(enum DDMEventType, NSString * _Nullable); |
|
876 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSaveChoices)(enum DDMEventType); |
|
877 |
/// Preferences - Vendor |
|
878 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAllVendors)(enum DDMEventType); |
|
879 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAllVendors)(enum DDMEventType); |
|
880 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorAgree)(enum DDMEventType, NSString * _Nullable); |
|
881 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorDisagree)(enum DDMEventType, NSString * _Nullable); |
|
882 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorSaveChoices)(enum DDMEventType); |
|
883 |
/// Preferences - Sensitive Personal Information |
|
884 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeAgree)(enum DDMEventType, NSString * _Nullable); |
|
885 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeDisagree)(enum DDMEventType, NSString * _Nullable); |
|
886 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPICategoryAgree)(enum DDMEventType, NSString * _Nullable); |
|
887 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPICategoryDisagree)(enum DDMEventType, NSString * _Nullable); |
|
888 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeSaveChoices)(enum DDMEventType); |
|
889 |
/// Sync |
|
890 |
@property (nonatomic, copy) void (^ _Nonnull onSyncDone)(enum DDMEventType, NSString * _Nullable); |
|
891 |
@property (nonatomic, copy) void (^ _Nonnull onSyncError)(enum DDMEventType, NSString * _Nullable); |
|
892 |
/// Language |
|
893 |
@property (nonatomic, copy) void (^ _Nonnull onLanguageUpdated)(enum DDMEventType, NSString * _Nullable); |
|
894 |
@property (nonatomic, copy) void (^ _Nonnull onLanguageUpdateFailed)(enum DDMEventType, NSString * _Nullable); |
|
895 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
896 |
@end |
|
897 |
|
|
898 |
/// Enum used to define the different type of internal events that can be triggered from the SDK. |
|
899 |
/// Please keep the current order because of Unity bridge. |
|
900 |
typedef SWIFT_ENUM_NAMED(NSInteger, DDMEventType, "EventType", open) { |
|
901 |
DDMEventTypeConsentChanged = 0, |
|
902 |
DDMEventTypeHideNotice = 1, |
|
903 |
DDMEventTypeReady = 2, |
|
904 |
DDMEventTypeShowNotice = 3, |
|
905 |
DDMEventTypeShowPreferences = 4, |
|
906 |
DDMEventTypeHidePreferences = 5, |
|
907 |
DDMEventTypeNoticeClickAgree = 6, |
|
908 |
DDMEventTypeNoticeClickDisagree = 7, |
|
909 |
DDMEventTypeNoticeClickMoreInfo = 8, |
|
910 |
DDMEventTypeNoticeClickViewVendors = 9, |
|
911 |
DDMEventTypeNoticeClickPrivacyPolicy = 10, |
|
912 |
DDMEventTypePreferencesClickAgreeToAll = 11, |
|
913 |
DDMEventTypePreferencesClickDisagreeToAll = 12, |
|
914 |
DDMEventTypePreferencesClickAgreeToAllPurposes = 13, |
|
915 |
DDMEventTypePreferencesClickDisagreeToAllPurposes = 14, |
|
916 |
DDMEventTypePreferencesClickResetAllPurposes = 15, |
|
917 |
DDMEventTypePreferencesClickAgreeToAllVendors = 16, |
|
918 |
DDMEventTypePreferencesClickDisagreeToAllVendors = 17, |
|
919 |
DDMEventTypePreferencesClickPurposeAgree = 18, |
|
920 |
DDMEventTypePreferencesClickPurposeDisagree = 19, |
|
921 |
DDMEventTypePreferencesClickCategoryAgree = 20, |
|
922 |
DDMEventTypePreferencesClickCategoryDisagree = 21, |
|
923 |
DDMEventTypePreferencesClickViewVendors = 22, |
|
924 |
DDMEventTypePreferencesClickViewPurposes = 23, |
|
925 |
DDMEventTypePreferencesClickSaveChoices = 24, |
|
926 |
DDMEventTypePreferencesClickVendorAgree = 25, |
|
927 |
DDMEventTypePreferencesClickVendorDisagree = 26, |
|
928 |
DDMEventTypePreferencesClickVendorSaveChoices = 27, |
|
929 |
/// Sync |
|
930 |
DDMEventTypeSyncDone = 28, |
|
931 |
DDMEventTypeSyncError = 29, |
|
932 |
/// Language |
|
933 |
DDMEventTypeLanguageUpdated = 30, |
|
934 |
DDMEventTypeLanguageUpdateFailed = 31, |
|
935 |
/// Preferences - Sensitive Personal Information |
|
936 |
DDMEventTypeNoticeClickViewSPIPurposes = 32, |
|
937 |
DDMEventTypePreferencesClickViewSPIPurposes = 33, |
|
938 |
DDMEventTypePreferencesClickSPIPurposeAgree = 34, |
|
939 |
DDMEventTypePreferencesClickSPIPurposeDisagree = 35, |
|
940 |
DDMEventTypePreferencesClickSPICategoryAgree = 36, |
|
941 |
DDMEventTypePreferencesClickSPICategoryDisagree = 37, |
|
942 |
DDMEventTypePreferencesClickSPIPurposeSaveChoices = 38, |
|
943 |
}; |
|
944 |
|
|
945 |
|
|
946 |
|
|
947 |
|
|
948 |
|
|
949 |
|
|
950 |
|
|
951 |
|
|
952 |
@class NSCoder; |
|
953 |
@protocol UIFocusEnvironment; |
|
954 |
@class NSBundle; |
|
955 |
|
|
956 |
SWIFT_CLASS("_TtC6Didomi20NoticeViewController") |
|
957 |
@interface NoticeViewController : UIViewController |
|
958 |
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; |
|
959 |
- (void)viewDidLoad; |
|
960 |
@property (nonatomic, readonly, copy) NSArray<id <UIFocusEnvironment>> * _Nonnull preferredFocusEnvironments; |
|
961 |
- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE; |
|
962 |
@end |
|
963 |
|
|
964 |
|
|
965 |
|
|
966 |
|
|
967 |
/// Public class representing a single Purpose configuration. |
|
968 |
SWIFT_CLASS_NAMED("Purpose") |
|
969 |
@interface DDMPurpose : NSObject |
|
970 |
/// Purpose id used by Didomi SDK. |
|
971 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
972 |
/// Purpose human-readable name, translated in selected language. |
|
973 |
@property (nonatomic, readonly, copy) NSString * _Nonnull name; |
|
974 |
/// Purpose description, translated in selected language. |
|
975 |
@property (nonatomic, readonly, copy) NSString * _Nonnull descriptionText; |
|
976 |
/// Initializer method for the Purpose class. |
|
977 |
/// \param id Purpose id used by Didomi SDK. |
|
978 |
/// |
|
979 |
/// \param name Purpose human-readable name, translated in selected language. |
|
980 |
/// |
|
981 |
/// \param descriptionText Purpose description, translated in selected language. |
|
982 |
/// |
|
983 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id name:(NSString * _Nonnull)name descriptionText:(NSString * _Nonnull)descriptionText OBJC_DESIGNATED_INITIALIZER; |
|
984 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
985 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
986 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
987 |
@end |
|
988 |
|
|
989 |
|
|
990 |
/// Regulation for which Didomi SDK is currently configured. Only one regulation is active at each run. |
|
991 |
typedef SWIFT_ENUM(NSInteger, Regulation, open) { |
|
992 |
RegulationGdpr = 0, |
|
993 |
RegulationCcpa = 1, |
|
994 |
RegulationCpa = 2, |
|
995 |
RegulationCpra = 3, |
|
996 |
RegulationCtdpa = 4, |
|
997 |
RegulationUcpa = 5, |
|
998 |
RegulationVcdpa = 6, |
|
999 |
RegulationNone = 7, |
|
1000 |
}; |
|
1001 |
|
|
1002 |
|
|
1003 |
|
|
1004 |
|
|
1005 |
|
|
1006 |
|
|
1007 |
|
|
1008 |
|
|
1009 |
|
|
1010 |
|
|
1011 |
|
|
1012 |
|
|
1013 |
|
|
1014 |
|
|
1015 |
|
|
1016 |
|
|
1017 |
|
|
1018 |
|
|
1019 |
|
|
1020 |
|
|
1021 |
|
|
1022 |
/// Protocol for User Authentication |
|
1023 |
/// declare the user id |
|
1024 |
SWIFT_PROTOCOL("_TtP6Didomi8UserAuth_") |
|
1025 |
@protocol UserAuth |
|
1026 |
/// Organization ID to associate with the user |
|
1027 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
1028 |
@end |
|
1029 |
|
|
1030 |
|
|
1031 |
/// Protocol for User Authentication Parameters |
|
1032 |
/// declare the common properties of encryption / hash parameters |
|
1033 |
SWIFT_CLASS("_TtC6Didomi14UserAuthParams") |
|
1034 |
@interface UserAuthParams : NSObject <UserAuth> |
|
1035 |
/// Organization ID to associate with the user |
|
1036 |
@property (nonatomic, copy) NSString * _Nonnull id; |
|
1037 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1038 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1039 |
@end |
|
1040 |
|
|
1041 |
|
|
1042 |
/// User Authentication Parameters with encryption |
|
1043 |
SWIFT_CLASS("_TtC6Didomi28UserAuthWithEncryptionParams") |
|
1044 |
@interface UserAuthWithEncryptionParams : UserAuthParams |
|
1045 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID initializationVector:(NSString * _Nonnull)initializationVector; |
|
1046 |
/// Initializer for Objective-C |
|
1047 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID initializationVector:(NSString * _Nonnull)initializationVector legacyExpiration:(NSTimeInterval)legacyExpiration; |
|
1048 |
/// Initialization Vector used for computing the user ID |
|
1049 |
@property (nonatomic, copy) NSString * _Nonnull initializationVector; |
|
1050 |
@end |
|
1051 |
|
|
1052 |
|
|
1053 |
/// User Authentication Parameters with hash |
|
1054 |
SWIFT_CLASS("_TtC6Didomi22UserAuthWithHashParams") |
|
1055 |
@interface UserAuthWithHashParams : UserAuthParams |
|
1056 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID digest:(NSString * _Nonnull)digest salt:(NSString * _Nullable)salt; |
|
1057 |
/// Initializer for Objective-C |
|
1058 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID digest:(NSString * _Nonnull)digest salt:(NSString * _Nullable)salt legacyExpiration:(NSTimeInterval)legacyExpiration; |
|
1059 |
/// Salt used for computing the user ID (optional) |
|
1060 |
@property (nonatomic, copy) NSString * _Nullable salt; |
|
1061 |
/// Digest used for representing the user ID |
|
1062 |
@property (nonatomic, copy) NSString * _Nonnull digest; |
|
1063 |
@end |
|
1064 |
|
|
1065 |
@class DDMUserStatusPurposes; |
|
1066 |
@class DDMUserStatusVendors; |
|
1067 |
|
|
1068 |
SWIFT_CLASS_NAMED("UserStatus") |
|
1069 |
@interface DDMUserStatus : NSObject |
|
1070 |
@property (nonatomic, readonly, strong) DDMUserStatusPurposes * _Nonnull purposes; |
|
1071 |
@property (nonatomic, readonly, strong) DDMUserStatusVendors * _Nonnull vendors; |
|
1072 |
@property (nonatomic, readonly, copy) NSString * _Nonnull userID; |
|
1073 |
@property (nonatomic, readonly, copy) NSString * _Nonnull created; |
|
1074 |
@property (nonatomic, readonly, copy) NSString * _Nonnull updated; |
|
1075 |
@property (nonatomic, readonly, copy) NSString * _Nonnull consentString; |
|
1076 |
@property (nonatomic, readonly, copy) NSString * _Nonnull additionalConsent; |
|
1077 |
@property (nonatomic, readonly) enum Regulation regulation; |
|
1078 |
@property (nonatomic, readonly, copy) NSString * _Nonnull didomiDCS; |
|
1079 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1080 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1081 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1082 |
@end |
|
1083 |
|
|
1084 |
|
|
1085 |
@interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) |
|
1086 |
@end |
|
1087 |
|
|
1088 |
@class DDMUserStatusIDs; |
|
1089 |
|
|
1090 |
SWIFT_CLASS_NAMED("Purposes") |
|
1091 |
@interface DDMUserStatusPurposes : NSObject |
|
1092 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull consent; |
|
1093 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull legitimateInterest; |
|
1094 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull global; |
|
1095 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull essential; |
|
1096 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1097 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1098 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1099 |
@end |
|
1100 |
|
|
1101 |
|
|
1102 |
@interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) |
|
1103 |
@end |
|
1104 |
|
|
1105 |
|
|
1106 |
SWIFT_CLASS_NAMED("IDs") |
|
1107 |
@interface DDMUserStatusIDs : NSObject |
|
1108 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull enabled; |
|
1109 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull disabled; |
|
1110 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1111 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1112 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1113 |
@end |
|
1114 |
|
|
1115 |
|
|
1116 |
@interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) |
|
1117 |
@end |
|
1118 |
|
|
1119 |
|
|
1120 |
SWIFT_CLASS_NAMED("Vendors") |
|
1121 |
@interface DDMUserStatusVendors : NSObject |
|
1122 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull consent; |
|
1123 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull legitimateInterest; |
|
1124 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull global; |
|
1125 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull globalConsent; |
|
1126 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull globalLegitimateInterest; |
|
1127 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1128 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1129 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1130 |
@end |
|
1131 |
|
|
1132 |
@class DDMVendorNamespaces; |
|
1133 |
@class DDMVendorURL; |
|
1134 |
|
|
1135 |
/// Public class representing a single Vendor configuration. |
|
1136 |
SWIFT_CLASS_NAMED("Vendor") |
|
1137 |
@interface DDMVendor : NSObject |
|
1138 |
/// Unique ID of the vendor provided by Didomi. This ID does not include prefixes. Example: “vendor-1”. |
|
1139 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
1140 |
/// Name of the vendor. |
|
1141 |
@property (nonatomic, readonly, copy) NSString * _Nonnull name; |
|
1142 |
/// Namespaces of the vendor (IAB, num) and their corresponding IDs. |
|
1143 |
@property (nonatomic, readonly, strong) DDMVendorNamespaces * _Nullable namespaces; |
|
1144 |
/// URL to the privacy policy of the vendor. |
|
1145 |
@property (nonatomic, readonly, copy) NSString * _Nullable policyUrl; |
|
1146 |
/// Purpose IDs that the vendor is operating under the consent legal basis. |
|
1147 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull purposeIDs; |
|
1148 |
/// Purpose IDs that the vendor is operating under the legitimate interest legal basis. |
|
1149 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull legIntPurposeIDs; |
|
1150 |
/// Set with IDs that represent features. |
|
1151 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull featureIDs; |
|
1152 |
/// Set with IDs that represent flexible purposes. Introduced in IAB TCF v2. |
|
1153 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull flexiblePurposeIDs; |
|
1154 |
/// Set with IDs that represent Special Purposes. Introduced in IAB TCF v2. |
|
1155 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull specialPurposeIDs; |
|
1156 |
/// Set with IDs that represent Special Features. Introduced in IAB TCF v2. |
|
1157 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull specialFeatureIDs; |
|
1158 |
/// Privacy policy and LI disclaimer urls. Introduced in IAB TCF v2.2. |
|
1159 |
@property (nonatomic, readonly, copy) NSArray<DDMVendorURL *> * _Nullable urls; |
|
1160 |
/// Initializer method for the Purpose class. |
|
1161 |
/// \param id Unique ID of the vendor. |
|
1162 |
/// |
|
1163 |
/// \param name Name of the vendor. |
|
1164 |
/// |
|
1165 |
/// \param policyUrl URL to the privacy policy of the vendor. |
|
1166 |
/// |
|
1167 |
/// \param namespaces Namespaces of the vendor (IAB, num) and their corresponding IDs. |
|
1168 |
/// |
|
1169 |
/// \param purposeIDs Purpose IDs that the vendor is operating under the consent legal basis. |
|
1170 |
/// |
|
1171 |
/// \param legIntPurposeIDs Purpose IDs that the vendor is operating under the legitimate interest legal basis. |
|
1172 |
/// |
|
1173 |
/// \param featureIDs Set with IDs that represent features. |
|
1174 |
/// |
|
1175 |
/// \param flexiblePurposeIDs Set with IDs that represent flexible purposes. |
|
1176 |
/// |
|
1177 |
/// \param specialPurposeIDs Set with IDs that represent Special Purposes. |
|
1178 |
/// |
|
1179 |
/// \param specialFeatureIDs Set with IDs that represent Special Features. |
|
1180 |
/// |
|
1181 |
/// \param urls Privacy policy and LI disclaimer urls. |
|
1182 |
/// |
|
1183 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id name:(NSString * _Nonnull)name policyUrl:(NSString * _Nullable)policyUrl namespaces:(DDMVendorNamespaces * _Nullable)namespaces purposeIDs:(NSSet<NSString *> * _Nonnull)purposeIDs legIntPurposeIDs:(NSSet<NSString *> * _Nonnull)legIntPurposeIDs featureIDs:(NSSet<NSString *> * _Nonnull)featureIDs flexiblePurposeIDs:(NSSet<NSString *> * _Nonnull)flexiblePurposeIDs specialPurposeIDs:(NSSet<NSString *> * _Nonnull)specialPurposeIDs specialFeatureIDs:(NSSet<NSString *> * _Nonnull)specialFeatureIDs urls:(NSArray<DDMVendorURL *> * _Nullable)urls OBJC_DESIGNATED_INITIALIZER; |
|
1184 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1185 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1186 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1187 |
@end |
|
1188 |
|
|
1189 |
|
|
1190 |
@interface DDMVendor (SWIFT_EXTENSION(Didomi)) |
|
1191 |
@end |
|
1192 |
|
|
1193 |
|
|
1194 |
/// Store additional IDs (IAB, num) for the Vendor. |
|
1195 |
SWIFT_CLASS_NAMED("Namespaces") |
|
1196 |
@interface DDMVendorNamespaces : NSObject |
|
1197 |
@property (nonatomic, readonly, copy) NSString * _Nullable iab2; |
|
1198 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1199 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1200 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1201 |
@end |
|
1202 |
|
|
1203 |
|
|
1204 |
@interface DDMVendor (SWIFT_EXTENSION(Didomi)) |
|
1205 |
@end |
|
1206 |
|
|
1207 |
|
|
1208 |
/// Store localized URLs for privacy policy and LI claim. |
|
1209 |
SWIFT_CLASS_NAMED("URL") |
|
1210 |
@interface DDMVendorURL : NSObject |
|
1211 |
@property (nonatomic, readonly, copy) NSString * _Nullable langID; |
|
1212 |
@property (nonatomic, readonly, copy) NSString * _Nullable privacy; |
|
1213 |
@property (nonatomic, readonly, copy) NSString * _Nullable legIntClaim; |
|
1214 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1215 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1216 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1217 |
@end |
|
1218 |
|
|
1219 |
|
|
1220 |
|
|
1221 |
#endif |
|
1222 |
#if defined(__cplusplus) |
|
1223 |
#endif |
|
1224 |
#if __has_attribute(external_source_symbol) |
|
1225 |
# pragma clang attribute pop |
|
1226 |
#endif |
|
1227 |
#pragma clang diagnostic pop |
|
1228 |
#endif |
|
1229 |
|
|
1230 |
#else |
|
1231 |
#error unsupported Swift architecture |
|
1232 |
#endif |