mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-24 10:05:40 +01:00
Changed files_ to be a Dictionary.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@87 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
5b9bc2fd5e
commit
b7b89b3b01
@ -38,7 +38,7 @@
|
||||
@protected
|
||||
NSURL *url_; // The destination URL (STRONG)
|
||||
NSDictionary *parameters_; // The key/value pairs for sending data (STRONG)
|
||||
NSMutableArray *files_; // Array of NSDictionaries file/name (STRONG)
|
||||
NSMutableDictionary *files_; // Dictionary of name/file-path (STRONG)
|
||||
NSString *boundary_; // The boundary string (STRONG)
|
||||
NSHTTPURLResponse *response_; // The response from the send (STRONG)
|
||||
}
|
||||
@ -51,7 +51,7 @@
|
||||
- (NSDictionary *)parameters;
|
||||
|
||||
- (void)addFileAtPath:(NSString *)path name:(NSString *)name;
|
||||
- (NSArray *)files;
|
||||
- (NSDictionary *)files;
|
||||
|
||||
// Set the data and return the response
|
||||
- (NSData *)send:(NSError **)error;
|
||||
|
@ -120,13 +120,13 @@
|
||||
//=============================================================================
|
||||
- (void)addFileAtPath:(NSString *)path name:(NSString *)name {
|
||||
if (!files_)
|
||||
files_ = [[NSMutableArray alloc] init];
|
||||
files_ = [[NSMutableDictionary alloc] init];
|
||||
|
||||
[files_ addObject:[NSDictionary dictionaryWithObject:name forKey:path]];
|
||||
[files_ setObject:path forKey:name];
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
- (NSArray *)files {
|
||||
- (NSDictionary *)files {
|
||||
return files_;
|
||||
}
|
||||
|
||||
@ -151,11 +151,11 @@
|
||||
}
|
||||
|
||||
// Add any files to the message
|
||||
count = [files_ count];
|
||||
NSArray *fileNames = [files_ allKeys];
|
||||
count = [fileNames count];
|
||||
for (i = 0; i < count; ++i) {
|
||||
NSDictionary *dict = [files_ objectAtIndex:i];
|
||||
NSString *file = [[dict allKeys] objectAtIndex:0];
|
||||
NSString *name = [dict objectForKey:file];
|
||||
NSString *name = [fileNames objectAtIndex:i];
|
||||
NSString *file = [files_ objectForKey:name];
|
||||
|
||||
[postBody appendData:[self formDataForFile:file name:name]];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user