//
//  NetworkMakerBlocks.h
//  Project
//
//  Created by Vae on 2018/12/18.
//
@class NetworkMaker;
@import AFNetworking;

typedef NS_ENUM(NSUInteger, NetworkType) {
	NetworkTypeTEXT = 0,
	NetworkTypeXML,
	NetworkTypeJSON,
	NetworkTypeSOAP,
	NetworkTypeREST,
	NetworkTypeUpload
};

typedef NetworkMaker *(^NetWorkChainableBool)(BOOL boolean);
#define NetWorkChainableBool(boolean) ^NetworkMaker *(BOOL boolean)

typedef NetworkMaker *(^NetWorkChainableNetworkType)(NetworkType type);
#define NetWorkChainableNetworkType(type) ^NetworkMaker *(NetworkType type)

typedef NetworkMaker *(^NetWorkChainableString)(NSString *string);
#define NetWorkChainableString(string) ^NetworkMaker *(NSString *string)

typedef NetworkMaker *(^NetWorkChainableDic)(NSDictionary *dic);
#define NetWorkChainableDic(dic) ^NetworkMaker *(NSDictionary *dic)

typedef NetworkMaker *(^NetWorkChainableNumber)(NSNumber *number);
#define NetWorkChainableNumber(number) ^NetworkMaker *(NSNumber *number)

typedef NetworkMaker *(^NetWorkChainableDicArray)(NSArray *array);
#define NetWorkChainableDicArray(dic) ^NetworkMaker *(NSArray *array)

typedef void(^HandleBlock)(void);
typedef NetworkMaker *(^NetWorkChainableHandle)(HandleBlock handle);
#define NetWorkChainableHandle(handle) ^NetworkMaker *(HandleBlock handle)

typedef void (^NetWorkFinishBlock)(id response);
typedef NetworkMaker *(^NetWorkChainableFinish)(NetWorkFinishBlock handle);
#define NetWorkChainableFinish(handle) ^NetworkMaker *(NetWorkFinishBlock handle)

typedef void(^FormDataBlock)(id <AFMultipartFormData> formData);
typedef NetworkMaker *(^NetWorkChainableMultipartFormData)(FormDataBlock formData);
#define NetWorkChainableMultipartFormData(formData) ^NetworkMaker *(FormDataBlock formData)

typedef void (^uploadProgressBlock)(CGFloat progress);
typedef NetworkMaker *(^NetWorkChainableBlock)(uploadProgressBlock block);
#define NetWorkChainableBlock(block) ^NetworkMaker *(uploadProgressBlock block)

