Repository URL to install this package:
//
// DEDownloadOperation.h
// DynamicEngine
//
// Created by Mobile3D on 18/09/14.
// Copyright (c) 2014 Mobile3D. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "IDEServerManagerDownloadDelegate.h"
typedef enum : NSUInteger {
// Error code for the body to post being invalid.
kDEDownloadOperationInvalidPostBody = -1,
// Error code for the connection data being invalid.
kDEDownloadOperationInvalidConnectionData = -2,
// Error code for a generic exception.
kDEDownloadOperationGenericException = -3,
} DEDownloadOperationErrorCode;
@class DEServerRequest;
@interface DEDownloadOperation : NSOperation<NSURLConnectionDelegate, NSURLConnectionDataDelegate>
-(instancetype) init __attribute__((unavailable("Init not available: use initWithServerRequest:server:postPath:andDelegate:")));
/**
* This method initializes a download operation.
*
* @param serverRequest The server request to execute.
* @param server The server address.
* @param postPath The server post path.
* @param delegate The delegate that will be notified with the download status.
*
* @return An instance of DEDownloadOperation to be added to an operation queue.
*/
- (instancetype) initWithServerRequest:(DEServerRequest *) serverRequest
server:(NSString *) server
postPath:(NSString *) postPath
andDelegate:(id<IDEServerManagerDownloadDelegate>) delegate;
@end