![]() |
Diffusion Apple API 6.12.0
Unified Client Library for iOS, tvOS and OS X / macOS
|
Functions | |
| NSString * | PTDiffusionEscape (NSString *string) |
| BOOL | PTDiffusionRolesFromString (NSString *string, NSSet< NSString * > *_Nullable *_Nonnull roles, NSError **error) |
| NSString * | PTDiffusionStringFromRoles (NSSet< NSString * > *roles) |
Collection of utility functions
| 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. |