Diffusion Apple API
6.10.0
Unified Client Library for iOS, tvOS and OS X / macOS
|
Enumerations | |
enum | PTDiffusionErrorCode { PTDiffusionErrorCode_MisquotedInput = 1 } |
Functions | |
NSString * | PTDiffusionEscape (NSString *string) |
BOOL | PTDiffusionRolesFromString (NSString *string, NSSet< NSString * > *_Nullable *_Nonnull roles, NSError **error) |
NSString * | PTDiffusionStringFromRoles (NSSet< NSString * > *roles) |
Variables | |
import | Foundation |
NSString *const | PTDiffusionErrorDomain |
Collection of utility functions
enum PTDiffusionErrorCode |
Values assigned to the code
property of NSError objects generated from some methods in the Diffusion API.
Enumerator | |
---|---|
PTDiffusionErrorCode_MisquotedInput |
The string supplied has been encoded incorrectly.
|
NSString* PTDiffusionEscape | ( | NSString * | string | ) |
Escapes special characters in a string that is to be used within a topic property or a session filter.
This is a convenience method which inserts an escape character \
before any of the special characters '
, "
or \
.
string | The string to be escaped. |
NSInvalidArgumentException | If the given string is nil . |
BOOL PTDiffusionRolesFromString | ( | NSString * | string, |
NSSet< NSString * > *_Nullable *_Nonnull | roles, | ||
NSError ** | error | ||
) |
Converts a string of the format required by the rolesPropertyKey (PTDiffusionSession) into a set of strings.
string | Quoted roles, separated by whitespace or commas. |
roles | If successful, upon return contains the set of roles. |
error | If an error occurs, upon return contains an NSError object that describes the problem. |
NSString* PTDiffusionStringFromRoles | ( | NSSet< NSString * > * | roles | ) |
Converts a set of authorisation roles to the string format required by the rolesPropertyKey (PTDiffusionSession).
roles | The roles to format. |
NSString* const PTDiffusionErrorDomain |
The value assigned to the domain
property of NSError objects generated from some methods in the Diffusion API.