DARemoteDataAdapterDelegate

Overview

The DARemoteDataAdapterDelegate describes the delegate methods that a DARemoteDataAdapter will call on its delegate object, to inform it about any errors happening during remote call or necessity of login. All delegate methods are optional.

Location

Optional Methods


remoteDataAdapter:didFailToApplyChange:forTable:

Informs the delegate that the attempt of applying changes failed for given change on given adapter.

@optional - (void) remoteDataAdapter:(DARemoteDataAdapter *)adapter didFailToApplyChange:(DADeltaChange *)change forTable:(DADataTable *)table

Parameters:

  • adapter: Reference to remote data adapter instance that initiates update action.
  • change: Reference to failed DADeltaChange instance.
  • table: Reference to the DADataTable instance for which the change was failed during update.

remoteDataAdapter:didFailWithException:forAsyncRequest:

Informs the delegate that the given async request failed with given exception.

@optional - (void) remoteDataAdapter:(DARemoteDataAdapter *)adapter didFailWithException:(NSException *)exception forAsyncRequest:(DAAsyncRequest *)request

Parameters:

  • adapter: Reference to the remote data adapter instance that initiates update action.
  • exception: Exception that was raised during update action.
  • request: Reference to async request instance.

remoteDataAdapter:needsPassword:forLoginString:

Method that informs the delegate that remote data adapter needs password for given login string

@optional - (BOOL) remoteDataAdapter:(DARemoteDataAdapter *)adapter needsPassword:(NSString **)password forLoginString:(NSString *)loginString

Parameters:

  • adapter: Represents the instance of the DARemoteDataAdapter for which that event happened.
  • password: Reference to the password string which will be used for login.
  • loginString: Represents the particular login string which will be used for login

remoteDataAdapter:needsPassword:forUsername:

Method that informs the delegate that remote data adapter needs password for given User name

@optional - (BOOL) remoteDataAdapter:(DARemoteDataAdapter *)adapter needsPassword:(NSString **)password forUsername:(NSString *)username

Parameters:

  • adapter: Represents the instance of the DARemoteDataAdapter for which that event happened.
  • password: Reference to the password string which will be used for login.
  • username: Represents the particular user name string which will be used for login

remoteDataAdapter:verifiedPassword:forLoginString:

Method that informs the delegate that remote data adapter verified password for given Login string. If it returns YES then it means that password was correct and you can cache it (for example in KeyChain) for later use. If it returns No then it means that password was invalid.

@optional - (BOOL) remoteDataAdapter:(DARemoteDataAdapter *)adapter verifiedPassword:(NSString *)password forLoginString:(NSString *)loginString

Parameters:

  • adapter: Represents the instance of the DARemoteDataAdapter for which that event happened.
  • password: Reference to the password string which was used for login.
  • loginString: Represents the particular login string which was used for login

remoteDataAdapter:verifiedPassword:forUsername:

Method that informs the delegate that remote data adapter verified password for given User name. If it returns YES then it means that password was correct and you can cache it (for example in KeyChain) for later use. If it returns No then it means that password was invalid.

@optional - (BOOL) remoteDataAdapter:(DARemoteDataAdapter *)adapter verifiedPassword:(NSString *)password forUsername:(NSString *)username

Parameters:

  • adapter: Represents the instance of the DARemoteDataAdapter for which that event happened.
  • password: Reference to the password string which was used for login.
  • username: Represents the particular user name which was used for login

remoteDataAdapterNeedsLogin:__deprecated

Informs the delegate in the background thread that the given remote data adapter received a Session not found exception. Using remoteDataAdapterNeedsLogin will be faster than remoteDataAdapterNeedsLoginOnMainThread and does not disturb the main thread.

@optional - (BOOL) remoteDataAdapterNeedsLogin:(DARemoteDataAdapter *)adapter __deprecated

Parameters:

  • adapter: Reference to the remote data adapter instance that received a Session not found exception.

remoteDataAdapterNeedsLoginOnMainThread:__deprecated obsolete

Informs the delegate in the main thread that the given remote data adapter received a Session not found exception. Using remoteDataAdapterNeedsLoginOnMainThread will be safer and easier to use if you want to show some UI.

@optional - (BOOL) remoteDataAdapterNeedsLoginOnMainThread:(DARemoteDataAdapter *)adapter __deprecated

Parameters:

  • adapter: Reference to the remote data adapter instance that received a Session not found exception.