StorageClient
public protocol StorageClient
StorageClient protocol represents predefined interfaces and protocols for FRAuthenticator’s storage method
-
Stores Account object into Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func setAccount(account: Account) -> Bool
Parameters
account
Account object to be stored
-
Removes Account object from Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func removeAccount(account: Account) -> Bool
Parameters
account
Account object to be removed
-
Retrieves Account object with its unique identifier
Declaration
Swift
func getAccount(accountIdentifier: String) -> Account?
Parameters
accountIdentifier
String value of Account’s unique identifier
-
Retrieves all Account objects stored in Storage Client
Declaration
Swift
func getAllAccounts() -> [Account]
-
Stores Mechanism object into Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func setMechanism(mechanism: Mechanism) -> Bool
Parameters
mechanism
Mechanism object to be stored
-
Removes Mechanism object from Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func removeMechanism(mechanism: Mechanism) -> Bool
Parameters
mechanism
Mechanism object to be removed
-
Retrieves Mechanism object with given Mechanism UUID
Declaration
Swift
func getMechanismForUUID(uuid: String) -> Mechanism?
Parameters
uuid
UUID of Mechanism
-
Retrieves PushNotification object with its unique identifier
Declaration
Swift
func getNotification(notificationIdentifier: String) -> PushNotification?
Parameters
notificationIdentifier
String value of PushNotification’s unique identifier
-
Stores PushNotification object into Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func setNotification(notification: PushNotification) -> Bool
Parameters
notification
PushNotification object to be stored
-
Removes PushNotification object from Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func removeNotification(notification: PushNotification) -> Bool
Parameters
notification
PushNotification object to be removed
-
Retrieves all Notification objects from Storage Client with given Mechanism object
Declaration
Swift
func getAllNotificationsForMechanism(mechanism: Mechanism) -> [PushNotification]
Parameters
mechanism
Mechanism object that is associated with Notification(s)
-
Retrieves all Notification objects from Storage Client
Declaration
Swift
func getAllNotifications() -> [PushNotification]
-
Returns whether or not StorageClient has any data stored
Declaration
Swift
@discardableResult func isEmpty() -> Bool