removed duplicate delegates on RKObjectLoader; inverted control for communicating request completion from RKResponse to RKRequest; added state tracking to RKRequest for loaded and loading states; changed queue processing logic to check request states before firing new requests; removed retains of RKObjectLoader from RKRequestTTModel since our queue is handling retains for all asynchronous RKRequest flavors; added separate state tracking to RKRequestTTModel since there are subtle differences between the meaning of loaded/loading in Three20 versus our RKRequest states; removed delegate forwarding code from RKObjectLoader since it is no longer an RKRequestDelegate (which was quite ugly to begin with); removed unnecessary error contructor for RKResponse that was only being used to fire delegate callbacks when an RKRequest failed to fire in offline mode; added TODOs to deep-dive into synchronous request handling

This commit is contained in:
Jeff Arena
2010-12-02 13:22:38 -08:00
parent 6249ece2bc
commit c9ba879937
9 changed files with 171 additions and 155 deletions

View File

@@ -40,9 +40,8 @@
/**
* Wraps a request/response cycle and loads a remote object representation into local domain objects
*/
@interface RKObjectLoader : RKRequest <RKRequestDelegate> {
@interface RKObjectLoader : RKRequest {
RKObjectMapper* _mapper;
NSObject<RKObjectLoaderDelegate>* _objectLoaderDelegate;
RKResponse* _response;
NSObject<RKObjectMappable>* _targetObject;
Class<RKObjectMappable> _objectClass;
@@ -56,14 +55,6 @@
*/
@property (nonatomic, readonly) RKObjectMapper* mapper;
/**
* The object to be invoked with the loaded models
*
* If this object implements life-cycle methods from the RKRequestDelegate protocol,
* events from the request will be forwarded back.
*/
@property (nonatomic, assign) NSObject<RKObjectLoaderDelegate>* objectLoaderDelegate;
/**
* The underlying response object for this loader
*/