HTTPMultipartUpload:
- [HTTPMultipartUpload send] : (modified)
This method will test if the url scheme is file://. In that case, the request body is written to the pointed file and method returns nil.
Uploader
- [Uploader report] (modified)
Split this method into two method :
- [Uploader report] that will initiate the upload
- [handleResponse:(NSData*)response withError:(NSError*)error] that will handle the response.
If the URL is not file://, - [Uploader report] will directly call - [handleResponse:(NSData*)response withError:(NSError*)error].
- [handleResponse:(NSData*)response withError:(NSError*)error] (added)
that will handle the response.
NSDictionary *readConfigurationData(const char *configFile); (added)
The configuration has to be saved to be able to recreate the uploader object when the network response is received. This method has to be public.
Breakpad
NSDictionary* BreakpadGetNextReportConfiguration(BreakpadRef ref); (added)
This method is needed to retrieve the configuration of the next report to be uploaded.
void BreakpadUploadReportWithParametersAndConfiguration(BreakpadRef ref,
NSDictionary *server_parameters,
NSDictionary *configuration); (added)
void BreakpadHandleNetworkResponse(BreakpadRef ref,
NSDictionary* configuration,
NSData* data,
NSError* error); (added)
BreakpadController :
- (void)threadUnsafeSendReportWithConfiguration:(NSDictionary*)configuration
withBreakpadRef:ref; (added)
This method calls BreakpadUploadReportWithParametersAndConfiguration in the current thread. It is needed to keep the sequentiality of the operations. As the name of the method suggests, it is threadUnsafe and should only be used from the - (void)withBreakpadRef:(void(^)(BreakpadRef))callback
callback.