Skip to content

Commit fe01ff4

Browse files
committed
Implementation of most of the API for Progress.
This implementation is based on the Darwin NSProgress implementation. One important detail is that swift-corelibs-foundation we do not have Key-Value Observing (KVO) yet. In the meantime, it is suggested to use polling or some other mechanism to read the values. Updates along the parent/child relationship in Progress are working. One additional thing that remains is an implementation of the localizedDescription methods. These are customized based on the contents of the userInfo dictionary.
1 parent e170040 commit fe01ff4

File tree

8 files changed

+1435
-223
lines changed

8 files changed

+1435
-223
lines changed

Foundation.xcodeproj/project.pbxproj

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@
331331
E1A03F361C4828650023AF4D /* PropertyList-1.0.dtd in Resources */ = {isa = PBXBuildFile; fileRef = E1A03F351C4828650023AF4D /* PropertyList-1.0.dtd */; };
332332
E1A03F381C482C730023AF4D /* NSXMLDTDTestData.xml in Resources */ = {isa = PBXBuildFile; fileRef = E1A03F371C482C730023AF4D /* NSXMLDTDTestData.xml */; };
333333
E1A3726F1C31EBFB0023AF4D /* NSXMLDocumentTestData.xml in Resources */ = {isa = PBXBuildFile; fileRef = E1A3726E1C31EBFB0023AF4D /* NSXMLDocumentTestData.xml */; };
334+
EA01AAEC1DA839C4008F4E07 /* TestProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA01AAEB1DA839C4008F4E07 /* TestProgress.swift */; };
335+
EA0812691DA71C8A00651B70 /* ProgressFraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0812681DA71C8A00651B70 /* ProgressFraction.swift */; };
336+
EA08126B1DA80C3600651B70 /* TestNSProgressFraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA08126A1DA80C3600651B70 /* TestNSProgressFraction.swift */; };
337+
EA08126C1DA810BE00651B70 /* ProgressFraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0812681DA71C8A00651B70 /* ProgressFraction.swift */; };
334338
EA418C261D57257D005EAD0D /* NSKeyedArchiverHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA418C251D57257D005EAD0D /* NSKeyedArchiverHelpers.swift */; };
335339
EA66F6361BEED03E00136161 /* TargetConditionals.h in Headers */ = {isa = PBXBuildFile; fileRef = EA66F6351BEED03E00136161 /* TargetConditionals.h */; settings = {ATTRIBUTES = (Public, ); }; };
336340
EA66F6481BF1619600136161 /* NSURLTestData.plist in Resources */ = {isa = PBXBuildFile; fileRef = EA66F63B1BF1619600136161 /* NSURLTestData.plist */; };
@@ -371,7 +375,7 @@
371375
EADE0BAF1BD15E0000C49C64 /* NSPersonNameComponentsFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B711BD15DFF00C49C64 /* NSPersonNameComponentsFormatter.swift */; };
372376
EADE0BB01BD15E0000C49C64 /* NSPort.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B721BD15DFF00C49C64 /* NSPort.swift */; };
373377
EADE0BB11BD15E0000C49C64 /* NSPredicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B731BD15DFF00C49C64 /* NSPredicate.swift */; };
374-
EADE0BB21BD15E0000C49C64 /* NSProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B741BD15DFF00C49C64 /* NSProgress.swift */; };
378+
EADE0BB21BD15E0000C49C64 /* Progress.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B741BD15DFF00C49C64 /* Progress.swift */; };
375379
EADE0BB31BD15E0000C49C64 /* NSRegularExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B751BD15DFF00C49C64 /* NSRegularExpression.swift */; };
376380
EADE0BB51BD15E0000C49C64 /* NSScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B771BD15DFF00C49C64 /* NSScanner.swift */; };
377381
EADE0BB61BD15E0000C49C64 /* NSSortDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADE0B781BD15DFF00C49C64 /* NSSortDescriptor.swift */; };
@@ -768,6 +772,9 @@
768772
E1A03F371C482C730023AF4D /* NSXMLDTDTestData.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = NSXMLDTDTestData.xml; sourceTree = "<group>"; };
769773
E1A3726E1C31EBFB0023AF4D /* NSXMLDocumentTestData.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = NSXMLDocumentTestData.xml; sourceTree = "<group>"; };
770774
E876A73D1C1180E000F279EC /* TestNSRange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestNSRange.swift; sourceTree = "<group>"; };
775+
EA01AAEB1DA839C4008F4E07 /* TestProgress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestProgress.swift; sourceTree = "<group>"; };
776+
EA0812681DA71C8A00651B70 /* ProgressFraction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProgressFraction.swift; sourceTree = "<group>"; };
777+
EA08126A1DA80C3600651B70 /* TestNSProgressFraction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestNSProgressFraction.swift; sourceTree = "<group>"; };
771778
EA313DFC1BE7F2E90060A403 /* CFURLComponents_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFURLComponents_Internal.h; sourceTree = "<group>"; };
772779
EA313DFD1BE7F2E90060A403 /* CFURLComponents_URIParser.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = CFURLComponents_URIParser.c; sourceTree = "<group>"; };
773780
EA313DFE1BE7F2E90060A403 /* CFURLComponents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = CFURLComponents.c; sourceTree = "<group>"; };
@@ -829,7 +836,7 @@
829836
EADE0B711BD15DFF00C49C64 /* NSPersonNameComponentsFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSPersonNameComponentsFormatter.swift; sourceTree = "<group>"; };
830837
EADE0B721BD15DFF00C49C64 /* NSPort.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSPort.swift; sourceTree = "<group>"; };
831838
EADE0B731BD15DFF00C49C64 /* NSPredicate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSPredicate.swift; sourceTree = "<group>"; };
832-
EADE0B741BD15DFF00C49C64 /* NSProgress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSProgress.swift; sourceTree = "<group>"; };
839+
EADE0B741BD15DFF00C49C64 /* Progress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Progress.swift; sourceTree = "<group>"; };
833840
EADE0B751BD15DFF00C49C64 /* NSRegularExpression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSRegularExpression.swift; sourceTree = "<group>"; };
834841
EADE0B761BD15DFF00C49C64 /* NSRunLoop.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSRunLoop.swift; sourceTree = "<group>"; };
835842
EADE0B771BD15DFF00C49C64 /* NSScanner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSScanner.swift; sourceTree = "<group>"; };
@@ -1339,6 +1346,8 @@
13391346
7900433A1CACD33E00ECCBF1 /* TestNSPredicate.swift */,
13401347
400E22641C1A4E58007C5933 /* TestNSProcessInfo.swift */,
13411348
EA66F6401BF1619600136161 /* TestNSPropertyList.swift */,
1349+
EA08126A1DA80C3600651B70 /* TestNSProgressFraction.swift */,
1350+
EA01AAEB1DA839C4008F4E07 /* TestProgress.swift */,
13421351
E876A73D1C1180E000F279EC /* TestNSRange.swift */,
13431352
5B0C6C211C1E07E600705A0E /* TestNSRegularExpression.swift */,
13441353
61E0117B1C1B554D000037DD /* TestNSRunLoop.swift */,
@@ -1660,7 +1669,8 @@
16601669
EADE0B6B1BD15DFF00C49C64 /* NSNull.swift */,
16611670
5BDC3F331BCC5DCB00ED97BB /* NSData.swift */,
16621671
5BA9BEA51CF3D747009DBD6C /* Data.swift */,
1663-
EADE0B741BD15DFF00C49C64 /* NSProgress.swift */,
1672+
EADE0B741BD15DFF00C49C64 /* Progress.swift */,
1673+
EA0812681DA71C8A00651B70 /* ProgressFraction.swift */,
16641674
5BDC3F381BCC5DCB00ED97BB /* NSError.swift */,
16651675
5BDC3F4B1BCC5DCB00ED97BB /* NSUUID.swift */,
16661676
6EB768271D18C12C00D4B719 /* UUID.swift */,
@@ -1973,6 +1983,7 @@
19731983
EADE0B9A1BD15DFF00C49C64 /* NSExpression.swift in Sources */,
19741984
EADE0BB01BD15E0000C49C64 /* NSPort.swift in Sources */,
19751985
EADE0BB91BD15E0000C49C64 /* NSTextCheckingResult.swift in Sources */,
1986+
EA0812691DA71C8A00651B70 /* ProgressFraction.swift in Sources */,
19761987
5BF7AEBE1BCD51F9008F214A /* NSTimeZone.swift in Sources */,
19771988
EADE0B951BD15DFF00C49C64 /* NSDateComponentsFormatter.swift in Sources */,
19781989
EADE0BBD1BD15E0000C49C64 /* NSURLCredential.swift in Sources */,
@@ -2029,7 +2040,7 @@
20292040
EADE0BA41BD15E0000C49C64 /* NSLengthFormatter.swift in Sources */,
20302041
5BDC3FCA1BCF176100ED97BB /* NSCFArray.swift in Sources */,
20312042
5B1FD9D61D6D16580080E83C /* HTTPBodySource.swift in Sources */,
2032-
EADE0BB21BD15E0000C49C64 /* NSProgress.swift in Sources */,
2043+
EADE0BB21BD15E0000C49C64 /* Progress.swift in Sources */,
20332044
EADE0B961BD15DFF00C49C64 /* NSDateIntervalFormatter.swift in Sources */,
20342045
6EB768281D18C12C00D4B719 /* UUID.swift in Sources */,
20352046
5B1FD9D41D6D16580080E83C /* Configuration.swift in Sources */,
@@ -2197,9 +2208,11 @@
21972208
5B13B34D1C582D4C00651CE2 /* TestNSUUID.swift in Sources */,
21982209
5B13B3281C582D4C00651CE2 /* TestNSBundle.swift in Sources */,
21992210
5B13B32A1C582D4C00651CE2 /* TestNSCharacterSet.swift in Sources */,
2211+
EA01AAEC1DA839C4008F4E07 /* TestProgress.swift in Sources */,
22002212
5B13B3411C582D4C00651CE2 /* TestNSRegularExpression.swift in Sources */,
22012213
5B13B3491C582D4C00651CE2 /* TestNSTimeZone.swift in Sources */,
22022214
5B13B34B1C582D4C00651CE2 /* TestNSURLRequest.swift in Sources */,
2215+
EA08126B1DA80C3600651B70 /* TestNSProgressFraction.swift in Sources */,
22032216
5B13B33E1C582D4C00651CE2 /* TestNSProcessInfo.swift in Sources */,
22042217
5B13B33F1C582D4C00651CE2 /* TestNSPropertyList.swift in Sources */,
22052218
5B13B32C1C582D4C00651CE2 /* TestNSDate.swift in Sources */,
@@ -2221,6 +2234,7 @@
22212234
5B13B34F1C582D4C00651CE2 /* TestNSXMLParser.swift in Sources */,
22222235
D5C40F331CDA1D460005690C /* TestNSOperationQueue.swift in Sources */,
22232236
5B13B32F1C582D4C00651CE2 /* TestNSGeometry.swift in Sources */,
2237+
EA08126C1DA810BE00651B70 /* ProgressFraction.swift in Sources */,
22242238
5B13B3351C582D4C00651CE2 /* TestNSKeyedUnarchiver.swift in Sources */,
22252239
5B13B33D1C582D4C00651CE2 /* TestNSPipe.swift in Sources */,
22262240
F9E0BB371CA70B8000F7FF3C /* TestNSURLCredential.swift in Sources */,

0 commit comments

Comments
 (0)