DAAsyncRequestDelegate Protocol

From RemObjects Wiki

Jump to:navigation, search
Xcode-48.png

This is a Library topic for Data Abstract for Xcode
This page is generated from external data, please do not update

ClassesProtocolsEnums


Contents

Overview

The DAAsyncRequestDelegate describes the delegate methods that a DAAsyncRequest will call on its delegate object, to inform it about successful or failed data calls. All delegate methods are @optional.


Location

DataAbstract/DataAbstract.h


Optional Methods

asyncRequest:didFailToApplyChange:forTable:

Informs the delegate that one or more changes failed to be applied on the server. The delegate may inspect the passed DADeltaChange to find out more about the specific failures and to decide how to handle them (for example by correcting data itself, or showing a Reconcile Dialog.


@optional - (void) asyncRequest:(DAAsyncRequest *)request didFailToApplyChange:(DADeltaChange *)change forTable:(DADataTable *)table
Parameters:

  • request:
  • change:
  • table:


asyncRequest:didFailWithException:

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


@optional - (void) asyncRequest:(ROAsyncRequest *)request didFailWithException:(NSException *)exception
Parameters:

  • request:
  • exception:


Note that the request parameter is of type ROAsyncRequest; the matching DAAsyncRequest can be obtained via [request context].


asyncRequest:didFinishApplyingChangesForTables:withErrors:

Informs the delegate that the request has finished applying changes to all tables contained in the request. If any errors were encountered, the errors parameter contains a list of failing DADeltaChanges. The above delegate method, asyncRequest:didFailToApplyChange:forTable: will have been called for each item in the errors list.

If no errros were encountered and all changes were applied successfully, errors is nil.


@optional - (void) asyncRequest:(DAAsyncRequest *)request didFinishApplyingChangesForTables:(NSArray *)tables withErrors:(NSArray *)errors
Parameters:

  • request:
  • tables:
  • errors:


asyncRequest:didReceiveData:

Informs the delegate that the raw data for a given DADataTable has been successfully received from the server.

If the request was initiated by calling one of the beginGetDataFor* methods of the DARemoteDataAdapter to request raw data only, it is up to the delegate to further process the received block of data. If the request was initiated by calling one of the beginGetDataTable* methods instead, the async request will continue to process the data, load it into datatable(s) and call one or both of the above two delegate methods, as well.


@optional - (void) asyncRequest:(DAAsyncRequest *)request didReceiveData:(NSData *)data
Parameters:

  • request:
  • data:


asyncRequest:didReceiveDataSize:ofExpected:

Informs the delegate that the request is in progress and has received the amount of bytes indicated by size and that a total of totalSize bytes is expected. This delegate method is useful for displaying progress information to the user, or otherwise keeping track of a large download of data.


@optional - (void) asyncRequest:(ROAsyncRequest *)request didReceiveDataSize:(int)size ofExpected:(int)totalSize
Parameters:

  • request:
  • size:
  • totalSize:

Note that the request parameter is of type ROAsyncRequest; the matching DAAsyncRequest can be obtained via [request context].


asyncRequest:didReceiveSchema:


@optional - (void) asyncRequest:(DAAsyncRequest *)request didReceiveSchema:(DASchema *)schema
Parameters:

  • request:
  • schema:


asyncRequest:didReceiveTable:

Informs the delegate that the given DADataTable has been successfully received from the server.


@optional - (void) asyncRequest:(DAAsyncRequest *)request didReceiveTable:(DADataTable *)table
Parameters:

  • request:
  • table:


asyncRequest:didReceiveTables:
Informs the delegate that the given list DADataTables has been successfully received from the server. The tables parameter provides a dictionary containing all tables, keyed on the table name.



@optional - (void) asyncRequest:(DAAsyncRequest *)request didReceiveTables:(NSDictionary *)tables
Parameters:

  • request:
  • tables:



See Also


Da-48.png

Product: RemObjects Data Abstract
Available Editions: Data Abstract for .NET, Delphi and Xcode

Glossary   — ArticlesFeaturesLibrarySamples

Navigation
products
platforms
special
Toolbox