| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 /* Copyright (c) 2009 Google Inc. | 1 /* Copyright (c) 2009 Google Inc. |
| 2 * | 2 * |
| 3 * Licensed under the Apache License, Version 2.0 (the "License"); | 3 * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 * you may not use this file except in compliance with the License. | 4 * you may not use this file except in compliance with the License. |
| 5 * You may obtain a copy of the License at | 5 * You may obtain a copy of the License at |
| 6 * | 6 * |
| 7 * http://www.apache.org/licenses/LICENSE-2.0 | 7 * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 * | 8 * |
| 9 * Unless required by applicable law or agreed to in writing, software | 9 * Unless required by applicable law or agreed to in writing, software |
| 10 * distributed under the License is distributed on an "AS IS" BASIS, | 10 * distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1009 // add this to our set of uploaded message IDs | 1009 // add this to our set of uploaded message IDs |
| 1010 NSString *path = [entryToUpload propertyForKey:kEmUpMessagePathKey]; | 1010 NSString *path = [entryToUpload propertyForKey:kEmUpMessagePathKey]; |
| 1011 [messageIDsUploaded_ setObject:path forKey:messageID]; | 1011 [messageIDsUploaded_ setObject:path forKey:messageID]; |
| 1012 } | 1012 } |
| 1013 } | 1013 } |
| 1014 } | 1014 } |
| 1015 ···· | 1015 ···· |
| 1016 // upload the entry now | 1016 // upload the entry now |
| 1017 [self uploadEntry:entryToUpload]; | 1017 [self uploadEntry:entryToUpload]; |
| 1018 ···· | 1018 ···· |
| 1019 if (isSlowUploadMode_ || ([uploadTickets_ count] >= maxTickets)) { | 1019 // calculate the size of messages being uploaded |
| 1020 NSNumber *totalUploadSizeNum = [uploadTickets_ valueForKeyPath:@"postedObjec t.uploadData.@sum.length"]; | |
| thomasvl 2010/03/01 21:52:06 sure this won't cause a problem like it did for gd Greg Robbins 2010/03/01 22:02:51 It's infrequently called here (once per message up | |
| 1021 unsigned long long totalUploadSize = [totalUploadSizeNum unsignedLongLongVal ue]; | |
| 1022 BOOL hasMaxedUploadSize = (totalUploadSize > kMaxTotalUploadDataSize); | |
| 1023 | |
| 1024 if (isSlowUploadMode_ | |
| 1025 || ([uploadTickets_ count] >= maxTickets) | |
| 1026 || hasMaxedUploadSize) { | |
| 1020 break; | 1027 break; |
| 1021 } | 1028 } |
| 1022 } | 1029 } |
| 1023 } | 1030 } |
| 1024 | 1031 |
| 1025 | 1032 |
| 1026 // nextEntryFromController returns the next upload mail entry from the specified | 1033 // nextEntryFromController returns the next upload mail entry from the specified |
| 1027 // controller, with additional properties and labels added to match user's | 1034 // controller, with additional properties and labels added to match user's |
| 1028 // settings in the user interface | 1035 // settings in the user interface |
| 1029 - (GDataEntryMailItem *)nextEntryFromController:(id<MailItemController>)controll er { | 1036 - (GDataEntryMailItem *)nextEntryFromController:(id<MailItemController>)controll er { |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1635 - (void)setLastUploadDate:(NSDate *)date { | 1642 - (void)setLastUploadDate:(NSDate *)date { |
| 1636 [lastUploadDate_ release]; | 1643 [lastUploadDate_ release]; |
| 1637 lastUploadDate_ = [date retain]; | 1644 lastUploadDate_ = [date retain]; |
| 1638 } | 1645 } |
| 1639 | 1646 |
| 1640 - (void)setSimulateUploads:(BOOL)flag { | 1647 - (void)setSimulateUploads:(BOOL)flag { |
| 1641 shouldSimulateUploads_ = flag; | 1648 shouldSimulateUploads_ = flag; |
| 1642 } | 1649 } |
| 1643 | 1650 |
| 1644 @end | 1651 @end |
| OLD | NEW |