diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/App Framework/ReferMe.php b/App Framework/ReferMe.php deleted file mode 100755 index e3a754a..0000000 --- a/App Framework/ReferMe.php +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/App Framework/database.json b/App Framework/database.json deleted file mode 100755 index ac528a0..0000000 --- a/App Framework/database.json +++ /dev/null @@ -1,24 +0,0 @@ -null{ - "EmergencyContacts": { - - "saneline": { - "name": "SANELINE", - "number": "08457678000" - }, - - "samaritans": { - "name": "Samaritans", - "number": "08457909090" - }, - - "fwdthink": { - "name": "Forward Thinking Birmingham", - "number": "03003000099" - }, - - "bsmhft": { - "name": "Birmingham and Solihull Mental Health Foundation Trust", - "number": "01213010000" - }, - } -} diff --git a/Branding/My Mind Logo b/Branding/My Mind Logo old mode 100755 new mode 100644 diff --git a/Branding/My Mind Logo.png b/Branding/My Mind Logo.png old mode 100755 new mode 100644 diff --git a/Completed Work/.DS_Store b/Completed Work/.DS_Store new file mode 100644 index 0000000..1e95fe9 Binary files /dev/null and b/Completed Work/.DS_Store differ diff --git a/Project Reports/Critical Literature Review Feedback Sheet.pdf b/Completed Work/Feedback Sheets/Critical Literature Review Feedback Sheet.pdf old mode 100755 new mode 100644 similarity index 100% rename from Project Reports/Critical Literature Review Feedback Sheet.pdf rename to Completed Work/Feedback Sheets/Critical Literature Review Feedback Sheet.pdf diff --git a/Completed Work/Feedback Sheets/PresentationMarksheet_AlexanderDavis (1).pdf b/Completed Work/Feedback Sheets/PresentationMarksheet_AlexanderDavis (1).pdf new file mode 100644 index 0000000..8ec1120 Binary files /dev/null and b/Completed Work/Feedback Sheets/PresentationMarksheet_AlexanderDavis (1).pdf differ diff --git a/Project Reports/Project Proposal Feedback Sheet.pdf b/Completed Work/Feedback Sheets/Proposal Feedback Sheet.pdf old mode 100755 new mode 100644 similarity index 82% rename from Project Reports/Project Proposal Feedback Sheet.pdf rename to Completed Work/Feedback Sheets/Proposal Feedback Sheet.pdf index 62abf95..057dfdf Binary files a/Project Reports/Project Proposal Feedback Sheet.pdf and b/Completed Work/Feedback Sheets/Proposal Feedback Sheet.pdf differ diff --git a/Completed Work/Original Documents/Critical Literature Review.docx b/Completed Work/Original Documents/Critical Literature Review.docx new file mode 100644 index 0000000..42a1a75 Binary files /dev/null and b/Completed Work/Original Documents/Critical Literature Review.docx differ diff --git a/Project Reports/Final Year Project Report.docx b/Completed Work/Original Documents/Final Year Project Report.docx old mode 100755 new mode 100644 similarity index 100% rename from Project Reports/Final Year Project Report.docx rename to Completed Work/Original Documents/Final Year Project Report.docx diff --git a/Project Reports/Project Presentation.psd b/Completed Work/Original Documents/Project Presentation.psd old mode 100755 new mode 100644 similarity index 100% rename from Project Reports/Project Presentation.psd rename to Completed Work/Original Documents/Project Presentation.psd diff --git a/Completed Work/Original Documents/Project Proposal.docx b/Completed Work/Original Documents/Project Proposal.docx new file mode 100644 index 0000000..1f50e21 Binary files /dev/null and b/Completed Work/Original Documents/Project Proposal.docx differ diff --git a/Completed Work/Submitted Work/.DS_Store b/Completed Work/Submitted Work/.DS_Store new file mode 100644 index 0000000..7afe3de Binary files /dev/null and b/Completed Work/Submitted Work/.DS_Store differ diff --git a/Project Reports/Critical Literature Review.pdf b/Completed Work/Submitted Work/Critical Literature Review.pdf old mode 100755 new mode 100644 similarity index 100% rename from Project Reports/Critical Literature Review.pdf rename to Completed Work/Submitted Work/Critical Literature Review.pdf diff --git a/Completed Work/Submitted Work/Presentation.pdf b/Completed Work/Submitted Work/Presentation.pdf new file mode 100644 index 0000000..a7a692c Binary files /dev/null and b/Completed Work/Submitted Work/Presentation.pdf differ diff --git a/Completed Work/Submitted Work/Proposal.pdf b/Completed Work/Submitted Work/Proposal.pdf new file mode 100644 index 0000000..1162ce3 Binary files /dev/null and b/Completed Work/Submitted Work/Proposal.pdf differ diff --git a/Project Reports/Final Year Project Report FINAL COPY.pdf b/Completed Work/Submitted Work/Report.pdf old mode 100755 new mode 100644 similarity index 100% rename from Project Reports/Final Year Project Report FINAL COPY.pdf rename to Completed Work/Submitted Work/Report.pdf diff --git a/My Mind/Cartfile b/My Mind/Cartfile old mode 100755 new mode 100644 diff --git a/My Mind/Cartfile.resolved b/My Mind/Cartfile.resolved old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/.SwiftForms.version b/My Mind/Carthage/Build/.SwiftForms.version deleted file mode 100644 index a8b111a..0000000 --- a/My Mind/Carthage/Build/.SwiftForms.version +++ /dev/null @@ -1,19 +0,0 @@ -{ - "commitish" : "1.7", - "iOS" : [ - { - "hash" : "1b042d4b9f79c1a317cdf2d1afcd1ed9430370bf63200ab7e5d4fc2e3d16f650", - "name" : "SwiftForms" - } - ], - "xcodeVersion" : "Xcode 8.3.2\nBuild version 8E2002", - "watchOS" : [ - - ], - "tvOS" : [ - - ], - "Mac" : [ - - ] -} \ No newline at end of file diff --git a/My Mind/Carthage/Build/iOS/06EF1DFA-753D-3739-A8B9-3692BFA5B0AA.bcsymbolmap b/My Mind/Carthage/Build/iOS/06EF1DFA-753D-3739-A8B9-3692BFA5B0AA.bcsymbolmap old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/F42B5CAC-35B4-3B0F-B6B8-C7735F7793FF.bcsymbolmap b/My Mind/Carthage/Build/iOS/F42B5CAC-35B4-3B0F-B6B8-C7735F7793FF.bcsymbolmap old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Info.plist b/My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Resources/DWARF/SwiftForms b/My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Resources/DWARF/SwiftForms old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms-Swift.h b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms-Swift.h old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms.h b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms.h old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Info.plist b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftdoc b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftdoc old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftmodule b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftmodule old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm64.swiftdoc b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm64.swiftdoc old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm64.swiftmodule b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm64.swiftmodule old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftdoc b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftdoc old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftmodule b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftmodule old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/x86_64.swiftdoc b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/x86_64.swiftdoc old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/x86_64.swiftmodule b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/x86_64.swiftmodule old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/module.modulemap b/My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/module.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Build/iOS/SwiftForms.framework/SwiftForms b/My Mind/Carthage/Build/iOS/SwiftForms.framework/SwiftForms old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/.gitignore b/My Mind/Carthage/Checkouts/SwiftForms/.gitignore deleted file mode 100644 index 7469951..0000000 --- a/My Mind/Carthage/Checkouts/SwiftForms/.gitignore +++ /dev/null @@ -1,60 +0,0 @@ -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite - -# OS generated files # -###################### -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -ehthumbs.db -Thumbs.db - -# Pods # -######## -Pods/ - -# Xcode # -######### -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -*.xcworkspace -!default.xcworkspace -xcuserdata -profile -*.moved-aside -DerivedData -.idea/ diff --git a/My Mind/Carthage/Checkouts/SwiftForms/LICENSE b/My Mind/Carthage/Checkouts/SwiftForms/LICENSE old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/README.MD b/My Mind/Carthage/Checkouts/SwiftForms/README.MD old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms.podspec b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms.podspec old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/FormErrorType.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/FormErrorType.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/Info.plist b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/SwiftForms.h b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/SwiftForms.h old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormButtonCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormButtonCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormCheckCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormCheckCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormDateCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormDateCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormLabelCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormLabelCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormPickerCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormPickerCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSegmentedControlCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSegmentedControlCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSelectorCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSelectorCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSliderCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSliderCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormStepperCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormStepperCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSwitchCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSwitchCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextFieldCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextFieldCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextViewCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextViewCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormBaseCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormBaseCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormTitleCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormTitleCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormValueCell.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormValueCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormOptionsViewController.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormOptionsViewController.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormSelector.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormSelector.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormViewController.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormViewController.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormDescriptor.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormDescriptor.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormRowDescriptor.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormRowDescriptor.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormSectionDescriptor.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormSectionDescriptor.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication.xcodeproj/project.pbxproj b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication.xcodeproj/project.pbxproj old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication.xcodeproj/xcshareddata/xcschemes/SwiftForms.xcscheme b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication.xcodeproj/xcshareddata/xcschemes/SwiftForms.xcscheme old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/AppDelegate.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/AppDelegate.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Base.lproj/Main.storyboard b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Base.lproj/Main.storyboard old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Example.gif b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Example.gif old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/ExampleFormViewController.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/ExampleFormViewController.swift old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Images.xcassets/AppIcon.appiconset/Contents.json b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Images.xcassets/AppIcon.appiconset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Images.xcassets/LaunchImage.launchimage/Contents.json b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Images.xcassets/LaunchImage.launchimage/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Images.xcassets/LaunchImage.launchimage/iphone5_splash.png b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Images.xcassets/LaunchImage.launchimage/iphone5_splash.png old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Info.plist b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Launch.storyboard b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Launch.storyboard old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Screenshot.png b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Screenshot.png old mode 100755 new mode 100644 diff --git a/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/ViewController.swift b/My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/ViewController.swift old mode 100755 new mode 100644 diff --git a/My Mind/My Mind.xcodeproj/project.pbxproj b/My Mind/My Mind.xcodeproj/project.pbxproj old mode 100755 new mode 100644 diff --git a/My Mind/My Mind.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/My Mind/My Mind.xcodeproj/project.xcworkspace/contents.xcworkspacedata old mode 100755 new mode 100644 diff --git a/My Mind/My Mind.xcodeproj/project.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/UserInterfaceState.xcuserstate b/My Mind/My Mind.xcodeproj/project.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/UserInterfaceState.xcuserstate old mode 100755 new mode 100644 diff --git a/My Mind/My Mind.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/My Mind.xcscheme b/My Mind/My Mind.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/My Mind.xcscheme old mode 100755 new mode 100644 diff --git a/My Mind/My Mind.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/xcschememanagement.plist b/My Mind/My Mind.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/xcschememanagement.plist old mode 100755 new mode 100644 diff --git a/My Mind/My Mind.xcworkspace/contents.xcworkspacedata b/My Mind/My Mind.xcworkspace/contents.xcworkspacedata old mode 100755 new mode 100644 diff --git a/My Mind/My Mind.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/UserInterfaceState_conflict-20170506-020639.xcuserstate b/My Mind/My Mind.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/UserInterfaceState_conflict-20170506-020639.xcuserstate deleted file mode 100755 index c5bc3bd..0000000 Binary files a/My Mind/My Mind.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/UserInterfaceState_conflict-20170506-020639.xcuserstate and /dev/null differ diff --git a/My Mind/My Mind/AppDelegate.swift b/My Mind/My Mind/AppDelegate.swift old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Appointments.imageset/Clock-50 (1).png b/My Mind/My Mind/Assets.xcassets/Appointments.imageset/Clock-50 (1).png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Appointments.imageset/Contents.json b/My Mind/My Mind/Assets.xcassets/Appointments.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Back.imageset/Back-50.png b/My Mind/My Mind/Assets.xcassets/Back.imageset/Back-50.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Back.imageset/Contents.json b/My Mind/My Mind/Assets.xcassets/Back.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Contents.json b/My Mind/My Mind/Assets.xcassets/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/Contents.json b/My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph150.png b/My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph150.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph300.png b/My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph300.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph450.png b/My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph450.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Engage.imageset/Contents.json b/My Mind/My Mind/Assets.xcassets/Engage.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage100.png b/My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage100.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage150.png b/My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage150.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage50.png b/My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage50.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/Contents.json b/My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage30.png b/My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage30.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage60.png b/My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage60.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage90.png b/My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage90.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Forum.imageset/Brief-50 (1).png b/My Mind/My Mind/Assets.xcassets/Forum.imageset/Brief-50 (1).png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Forum.imageset/Contents.json b/My Mind/My Mind/Assets.xcassets/Forum.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/Contents.json b/My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money150.png b/My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money150.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money300.png b/My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money300.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money450.png b/My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money450.png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Referrals.imageset/Contents.json b/My Mind/My Mind/Assets.xcassets/Referrals.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/Referrals.imageset/Create New-50 (1).png b/My Mind/My Mind/Assets.xcassets/Referrals.imageset/Create New-50 (1).png old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/first.imageset/Contents.json b/My Mind/My Mind/Assets.xcassets/first.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/first.imageset/first.pdf b/My Mind/My Mind/Assets.xcassets/first.imageset/first.pdf old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/iTunesArtwork.imageset/Contents.json b/My Mind/My Mind/Assets.xcassets/iTunesArtwork.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/second.imageset/Contents.json b/My Mind/My Mind/Assets.xcassets/second.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Assets.xcassets/second.imageset/second.pdf b/My Mind/My Mind/Assets.xcassets/second.imageset/second.pdf old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Base.lproj/LaunchScreen.storyboard b/My Mind/My Mind/Base.lproj/LaunchScreen.storyboard old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Base.lproj/Main.storyboard b/My Mind/My Mind/Base.lproj/Main.storyboard old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/FormViews.swift b/My Mind/My Mind/FormViews.swift old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/ForumView.swift b/My Mind/My Mind/ForumView.swift old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/GoogleService-Info.plist b/My Mind/My Mind/GoogleService-Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/Info.plist b/My Mind/My Mind/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/MainViews.swift b/My Mind/My Mind/MainViews.swift old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/My_Mind.xcdatamodeld/.xccurrentversion b/My Mind/My Mind/My_Mind.xcdatamodeld/.xccurrentversion deleted file mode 100755 index 53f5a56..0000000 --- a/My Mind/My Mind/My_Mind.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ - - - - - _XCCurrentVersionName - My_Mind.xcdatamodel - - diff --git a/My Mind/My Mind/My_Mind.xcdatamodeld/My_Mind.xcdatamodel/contents b/My Mind/My Mind/My_Mind.xcdatamodeld/My_Mind.xcdatamodel/contents old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/OnBoardingController.swift b/My Mind/My Mind/OnBoardingController.swift old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/OnlineInterfaces.swift b/My Mind/My Mind/OnlineInterfaces.swift old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/TabBarController.swift b/My Mind/My Mind/TabBarController.swift old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/UserViews.swift b/My Mind/My Mind/UserViews.swift old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/WelcomeScreenOne.swift b/My Mind/My Mind/WelcomeScreenOne.swift old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/WelcomeScreenThree.swift b/My Mind/My Mind/WelcomeScreenThree.swift old mode 100755 new mode 100644 diff --git a/My Mind/My Mind/WelcomeScreenTwo.swift b/My Mind/My Mind/WelcomeScreenTwo.swift old mode 100755 new mode 100644 diff --git a/My Mind/My MindTests/Info.plist b/My Mind/My MindTests/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/My MindTests/My_MindTests.swift b/My Mind/My MindTests/My_MindTests.swift old mode 100755 new mode 100644 diff --git a/My Mind/My MindUITests/Info.plist b/My Mind/My MindUITests/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/My MindUITests/My_MindUITests.swift b/My Mind/My MindUITests/My_MindUITests.swift old mode 100755 new mode 100644 diff --git a/My Mind/Podfile b/My Mind/Podfile old mode 100755 new mode 100644 diff --git a/My Mind/Podfile.lock b/My Mind/Podfile.lock old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Firebase/Core/Sources/Firebase.h b/My Mind/Pods/Firebase/Core/Sources/Firebase.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Firebase/Core/Sources/module.modulemap b/My Mind/Pods/Firebase/Core/Sources/module.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Firebase/README.md b/My Mind/Pods/Firebase/README.md old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap b/My Mind/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/CHANGELOG.md b/My Mind/Pods/FirebaseAuth/CHANGELOG.md old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/FirebaseAuth b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/FirebaseAuth old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuth.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuth.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthCredential.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthCredential.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthErrors.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthErrors.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIREmailPasswordAuthProvider.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIREmailPasswordAuthProvider.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUser.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUser.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUserInfo.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUserInfo.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuth.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuth.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Modules/module.modulemap b/My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Modules/module.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseAuth/README.md b/My Mind/Pods/FirebaseAuth/README.md old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore b/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h b/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h b/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h b/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h b/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIROptions.h b/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIROptions.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h b/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Modules/module.modulemap b/My Mind/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Modules/module.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/FirebaseDatabase b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/FirebaseDatabase old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDataEventType.h b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDataEventType.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDataSnapshot.h b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDataSnapshot.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabase.h b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabase.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseQuery.h b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseQuery.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseReference.h b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseReference.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRMutableData.h b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRMutableData.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRServerValue.h b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRServerValue.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRTransactionResult.h b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRTransactionResult.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FirebaseDatabase.h b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FirebaseDatabase.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Info.plist b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Modules/module.modulemap b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Modules/module.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/NOTICE b/My Mind/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/NOTICE old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseInstanceID/CHANGELOG.md b/My Mind/Pods/FirebaseInstanceID/CHANGELOG.md old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/FirebaseInstanceID b/My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/FirebaseInstanceID old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h b/My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h b/My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap b/My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseInstanceID/README.md b/My Mind/Pods/FirebaseInstanceID/README.md old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/FirebaseMessaging b/My Mind/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/FirebaseMessaging old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Headers/FIRMessaging.h b/My Mind/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Headers/FIRMessaging.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Headers/FirebaseMessaging.h b/My Mind/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Headers/FirebaseMessaging.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Modules/module.modulemap b/My Mind/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Modules/module.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/FirebaseStorage b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/FirebaseStorage old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorage.h b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorage.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageConstants.h b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageConstants.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageDownloadTask.h b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageDownloadTask.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageMetadata.h b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageMetadata.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageObservableTask.h b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageObservableTask.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageReference.h b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageReference.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageTask.h b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageTask.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageTaskSnapshot.h b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageTaskSnapshot.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageUploadTask.h b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageUploadTask.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FirebaseStorage.h b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FirebaseStorage.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Modules/module.modulemap b/My Mind/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Modules/module.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GTMSessionFetcher/LICENSE b/My Mind/Pods/GTMSessionFetcher/LICENSE old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GTMSessionFetcher/README.md b/My Mind/Pods/GTMSessionFetcher/README.md old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.h b/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.m b/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.h b/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.m b/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.h b/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.m b/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.h b/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.m b/My Mind/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMDebugSelectorValidation.h b/My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMDebugSelectorValidation.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMDebugThreadValidation.h b/My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMDebugThreadValidation.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMMethodCheck.h b/My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMMethodCheck.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMLogger.h b/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMLogger.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMLogger.m b/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMLogger.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSData+zlib.h b/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSData+zlib.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSData+zlib.m b/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSData+zlib.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSDictionary+URLArguments.h b/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSDictionary+URLArguments.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSDictionary+URLArguments.m b/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSDictionary+URLArguments.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSString+URLArguments.h b/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSString+URLArguments.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSString+URLArguments.m b/My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSString+URLArguments.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/GTMDefines.h b/My Mind/Pods/GoogleToolboxForMac/GTMDefines.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/LICENSE b/My Mind/Pods/GoogleToolboxForMac/LICENSE old mode 100755 new mode 100644 diff --git a/My Mind/Pods/GoogleToolboxForMac/README.md b/My Mind/Pods/GoogleToolboxForMac/README.md old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Headers/Private/Firebase/Firebase.h b/My Mind/Pods/Headers/Private/Firebase/Firebase.h deleted file mode 120000 index 6d62033..0000000 --- a/My Mind/Pods/Headers/Private/Firebase/Firebase.h +++ /dev/null @@ -1 +0,0 @@ -../../../Firebase/Core/Sources/Firebase.h \ No newline at end of file diff --git a/My Mind/Pods/Headers/Public/Firebase/Firebase.h b/My Mind/Pods/Headers/Public/Firebase/Firebase.h deleted file mode 120000 index 6d62033..0000000 --- a/My Mind/Pods/Headers/Public/Firebase/Firebase.h +++ /dev/null @@ -1 +0,0 @@ -../../../Firebase/Core/Sources/Firebase.h \ No newline at end of file diff --git a/My Mind/Pods/Manifest.lock b/My Mind/Pods/Manifest.lock old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Pods.xcodeproj/project.pbxproj b/My Mind/Pods/Pods.xcodeproj/project.pbxproj old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/GTMSessionFetcher.xcscheme b/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/GTMSessionFetcher.xcscheme old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/GoogleToolboxForMac.xcscheme b/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/GoogleToolboxForMac.xcscheme old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My Mind.xcscheme b/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My Mind.xcscheme old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My MindTests.xcscheme b/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My MindTests.xcscheme old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My MindUITests.xcscheme b/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My MindUITests.xcscheme old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Protobuf.xcscheme b/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Protobuf.xcscheme old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/SwiftForms.xcscheme b/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/SwiftForms.xcscheme old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/xcschememanagement.plist b/My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/xcschememanagement.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/LICENSE b/My Mind/Pods/Protobuf/LICENSE old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/README.md b/My Mind/Pods/Protobuf/README.md old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBArray.h b/My Mind/Pods/Protobuf/objectivec/GPBArray.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBArray.m b/My Mind/Pods/Protobuf/objectivec/GPBArray.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBArray_PackagePrivate.h b/My Mind/Pods/Protobuf/objectivec/GPBArray_PackagePrivate.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBBootstrap.h b/My Mind/Pods/Protobuf/objectivec/GPBBootstrap.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream.h b/My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream.m b/My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h b/My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream.h b/My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream.m b/My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream_PackagePrivate.h b/My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream_PackagePrivate.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBDescriptor.h b/My Mind/Pods/Protobuf/objectivec/GPBDescriptor.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBDescriptor.m b/My Mind/Pods/Protobuf/objectivec/GPBDescriptor.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBDescriptor_PackagePrivate.h b/My Mind/Pods/Protobuf/objectivec/GPBDescriptor_PackagePrivate.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBDictionary.h b/My Mind/Pods/Protobuf/objectivec/GPBDictionary.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBDictionary.m b/My Mind/Pods/Protobuf/objectivec/GPBDictionary.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBDictionary_PackagePrivate.h b/My Mind/Pods/Protobuf/objectivec/GPBDictionary_PackagePrivate.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBExtensionInternals.h b/My Mind/Pods/Protobuf/objectivec/GPBExtensionInternals.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBExtensionInternals.m b/My Mind/Pods/Protobuf/objectivec/GPBExtensionInternals.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBExtensionRegistry.h b/My Mind/Pods/Protobuf/objectivec/GPBExtensionRegistry.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBExtensionRegistry.m b/My Mind/Pods/Protobuf/objectivec/GPBExtensionRegistry.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBMessage.h b/My Mind/Pods/Protobuf/objectivec/GPBMessage.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBMessage.m b/My Mind/Pods/Protobuf/objectivec/GPBMessage.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBMessage_PackagePrivate.h b/My Mind/Pods/Protobuf/objectivec/GPBMessage_PackagePrivate.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBProtocolBuffers.h b/My Mind/Pods/Protobuf/objectivec/GPBProtocolBuffers.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBProtocolBuffers_RuntimeSupport.h b/My Mind/Pods/Protobuf/objectivec/GPBProtocolBuffers_RuntimeSupport.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBRootObject.h b/My Mind/Pods/Protobuf/objectivec/GPBRootObject.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBRootObject.m b/My Mind/Pods/Protobuf/objectivec/GPBRootObject.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBRootObject_PackagePrivate.h b/My Mind/Pods/Protobuf/objectivec/GPBRootObject_PackagePrivate.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBRuntimeTypes.h b/My Mind/Pods/Protobuf/objectivec/GPBRuntimeTypes.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBUnknownField.h b/My Mind/Pods/Protobuf/objectivec/GPBUnknownField.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBUnknownField.m b/My Mind/Pods/Protobuf/objectivec/GPBUnknownField.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet.h b/My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet.m b/My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet_PackagePrivate.h b/My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet_PackagePrivate.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBUnknownField_PackagePrivate.h b/My Mind/Pods/Protobuf/objectivec/GPBUnknownField_PackagePrivate.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBUtilities.h b/My Mind/Pods/Protobuf/objectivec/GPBUtilities.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBUtilities.m b/My Mind/Pods/Protobuf/objectivec/GPBUtilities.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBUtilities_PackagePrivate.h b/My Mind/Pods/Protobuf/objectivec/GPBUtilities_PackagePrivate.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBWellKnownTypes.h b/My Mind/Pods/Protobuf/objectivec/GPBWellKnownTypes.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBWellKnownTypes.m b/My Mind/Pods/Protobuf/objectivec/GPBWellKnownTypes.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBWireFormat.h b/My Mind/Pods/Protobuf/objectivec/GPBWireFormat.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/GPBWireFormat.m b/My Mind/Pods/Protobuf/objectivec/GPBWireFormat.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.h b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.m b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.h b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.m b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Duration.pbobjc.h b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Duration.pbobjc.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Duration.pbobjc.m b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Duration.pbobjc.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Empty.pbobjc.h b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Empty.pbobjc.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Empty.pbobjc.m b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Empty.pbobjc.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.h b/My Mind/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.m b/My Mind/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/SourceContext.pbobjc.h b/My Mind/Pods/Protobuf/objectivec/google/protobuf/SourceContext.pbobjc.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/SourceContext.pbobjc.m b/My Mind/Pods/Protobuf/objectivec/google/protobuf/SourceContext.pbobjc.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Struct.pbobjc.h b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Struct.pbobjc.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Struct.pbobjc.m b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Struct.pbobjc.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Timestamp.pbobjc.h b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Timestamp.pbobjc.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Timestamp.pbobjc.m b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Timestamp.pbobjc.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.h b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.m b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Wrappers.pbobjc.h b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Wrappers.pbobjc.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Protobuf/objectivec/google/protobuf/Wrappers.pbobjc.m b/My Mind/Pods/Protobuf/objectivec/google/protobuf/Wrappers.pbobjc.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/LICENSE b/My Mind/Pods/SwiftForms/LICENSE old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/README.MD b/My Mind/Pods/SwiftForms/README.MD old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/FormErrorType.swift b/My Mind/Pods/SwiftForms/SwiftForms/FormErrorType.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormButtonCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormButtonCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormCheckCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormCheckCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormDateCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormDateCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormLabelCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormLabelCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormPickerCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormPickerCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormSegmentedControlCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormSegmentedControlCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormSelectorCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormSelectorCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormSliderCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormSliderCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormStepperCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormStepperCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormSwitchCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormSwitchCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormTextFieldCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormTextFieldCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/FormTextViewCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/FormTextViewCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormBaseCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormBaseCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormTitleCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormTitleCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormValueCell.swift b/My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormValueCell.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/controllers/FormOptionsViewController.swift b/My Mind/Pods/SwiftForms/SwiftForms/controllers/FormOptionsViewController.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/controllers/FormSelector.swift b/My Mind/Pods/SwiftForms/SwiftForms/controllers/FormSelector.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/controllers/FormViewController.swift b/My Mind/Pods/SwiftForms/SwiftForms/controllers/FormViewController.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormDescriptor.swift b/My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormDescriptor.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormRowDescriptor.swift b/My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormRowDescriptor.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormSectionDescriptor.swift b/My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormSectionDescriptor.swift old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher-dummy.m b/My Mind/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher-dummy.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher-prefix.pch b/My Mind/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher-prefix.pch old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher-umbrella.h b/My Mind/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher-umbrella.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher.modulemap b/My Mind/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher.xcconfig b/My Mind/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher.xcconfig old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GTMSessionFetcher/Info.plist b/My Mind/Pods/Target Support Files/GTMSessionFetcher/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac-dummy.m b/My Mind/Pods/Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac-dummy.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac-prefix.pch b/My Mind/Pods/Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac-prefix.pch old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac-umbrella.h b/My Mind/Pods/Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac-umbrella.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac.modulemap b/My Mind/Pods/Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac.xcconfig b/My Mind/Pods/Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac.xcconfig old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/GoogleToolboxForMac/Info.plist b/My Mind/Pods/Target Support Files/GoogleToolboxForMac/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My Mind/Info.plist b/My Mind/Pods/Target Support Files/Pods-My Mind/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-acknowledgements.markdown b/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-acknowledgements.markdown old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-acknowledgements.plist b/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-acknowledgements.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-dummy.m b/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-dummy.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-frameworks.sh b/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-frameworks.sh old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-resources.sh b/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-resources.sh old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-umbrella.h b/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-umbrella.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.debug.xcconfig b/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.debug.xcconfig old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.modulemap b/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.release.xcconfig b/My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.release.xcconfig old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindTests/Info.plist b/My Mind/Pods/Target Support Files/Pods-My MindTests/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-acknowledgements.markdown b/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-acknowledgements.markdown old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-acknowledgements.plist b/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-acknowledgements.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-dummy.m b/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-dummy.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-frameworks.sh b/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-frameworks.sh old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-resources.sh b/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-resources.sh old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-umbrella.h b/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-umbrella.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.debug.xcconfig b/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.debug.xcconfig old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.modulemap b/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.release.xcconfig b/My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.release.xcconfig old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindUITests/Info.plist b/My Mind/Pods/Target Support Files/Pods-My MindUITests/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-acknowledgements.markdown b/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-acknowledgements.markdown old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-acknowledgements.plist b/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-acknowledgements.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-dummy.m b/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-dummy.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-frameworks.sh b/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-frameworks.sh old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-resources.sh b/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-resources.sh old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-umbrella.h b/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-umbrella.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.debug.xcconfig b/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.debug.xcconfig old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.modulemap b/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.release.xcconfig b/My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.release.xcconfig old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Protobuf/Info.plist b/My Mind/Pods/Target Support Files/Protobuf/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Protobuf/Protobuf-dummy.m b/My Mind/Pods/Target Support Files/Protobuf/Protobuf-dummy.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Protobuf/Protobuf-prefix.pch b/My Mind/Pods/Target Support Files/Protobuf/Protobuf-prefix.pch old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Protobuf/Protobuf-umbrella.h b/My Mind/Pods/Target Support Files/Protobuf/Protobuf-umbrella.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Protobuf/Protobuf.modulemap b/My Mind/Pods/Target Support Files/Protobuf/Protobuf.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/Protobuf/Protobuf.xcconfig b/My Mind/Pods/Target Support Files/Protobuf/Protobuf.xcconfig old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/SwiftForms/Info.plist b/My Mind/Pods/Target Support Files/SwiftForms/Info.plist old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-dummy.m b/My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-dummy.m old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-prefix.pch b/My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-prefix.pch old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-umbrella.h b/My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-umbrella.h old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/SwiftForms/SwiftForms.modulemap b/My Mind/Pods/Target Support Files/SwiftForms/SwiftForms.modulemap old mode 100755 new mode 100644 diff --git a/My Mind/Pods/Target Support Files/SwiftForms/SwiftForms.xcconfig b/My Mind/Pods/Target Support Files/SwiftForms/SwiftForms.xcconfig old mode 100755 new mode 100644 diff --git a/Old My Mind/Cartfile b/Old My Mind/Cartfile deleted file mode 100755 index 409f0b4..0000000 --- a/Old My Mind/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "ortuman/SwiftForms" diff --git a/Old My Mind/Cartfile.resolved b/Old My Mind/Cartfile.resolved deleted file mode 100755 index c3e5c6a..0000000 --- a/Old My Mind/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "ortuman/SwiftForms" "1.7" diff --git a/Old My Mind/Carthage/Build/.SwiftForms.version b/Old My Mind/Carthage/Build/.SwiftForms.version deleted file mode 100644 index 60d66cb..0000000 --- a/Old My Mind/Carthage/Build/.SwiftForms.version +++ /dev/null @@ -1,19 +0,0 @@ -{ - "commitish" : "1.7", - "iOS" : [ - { - "hash" : "4b56df5067379e0e62b6efe3961c120e1ff4a0a68ca6fd123a2a8dd1743567db", - "name" : "SwiftForms" - } - ], - "xcodeVersion" : "Xcode 8.3.1\nBuild version 8E1000a", - "watchOS" : [ - - ], - "tvOS" : [ - - ], - "Mac" : [ - - ] -} \ No newline at end of file diff --git a/Old My Mind/Carthage/Build/iOS/6BCB07E4-2437-36B4-B727-A0CBDC960D1F.bcsymbolmap b/Old My Mind/Carthage/Build/iOS/6BCB07E4-2437-36B4-B727-A0CBDC960D1F.bcsymbolmap deleted file mode 100755 index 5fb5af3..0000000 --- a/Old My Mind/Carthage/Build/iOS/6BCB07E4-2437-36B4-B727-A0CBDC960D1F.bcsymbolmap +++ /dev/null @@ -1,1907 +0,0 @@ -BCSymbolMap Version: 2.0 -__T0SqWy.3 -_swift_rt_swift_retain -_swift_rt_swift_release -__T0SqWe.11 -__T0SqWe.19 -__TTWOSC28UITableViewCellAccessoryTypes9Equatable5UIKitZFS0_oi2eefTxx_Sb -__TTWOSC28UITableViewCellAccessoryTypes16RawRepresentable5UIKitFS0_CfT8rawValuewx8RawValue_GSqx_ -__TTWOSC28UITableViewCellAccessoryTypes16RawRepresentable5UIKitFS0_g8rawValuewx8RawValue -__TTWVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKitFS0_19_bridgeToObjectiveCfT_wx15_ObjectiveCType -__TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_19_bridgeToObjectiveCfT_WxS0_15_ObjectiveCType_ -__TTWVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKitZFS0_26_forceBridgeFromObjectiveCfTwx15_ObjectiveCType6resultRGSqx__T_ -__TTWVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKitZFS0_34_conditionallyBridgeFromObjectiveCfTwx15_ObjectiveCType6resultRGSqx__Sb -__TTWVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKitZFS0_36_unconditionallyBridgeFromObjectiveCfGSqwx15_ObjectiveCType_x -__TTWVSC15UIFontTextStyles16RawRepresentable5UIKitFS0_CfT8rawValuewx8RawValue_GSqx_ -__TTWVSC15UIFontTextStyles16RawRepresentable5UIKitFS0_g8rawValuewx8RawValue -__TTSgq5GVs16IndexingIteratorGSRVs5UInt8__GS_GSRS0___s16IteratorProtocols___TFVs4UTF86decodeuRxs16IteratorProtocolwx7ElementzVs5UInt8rfRxOs21UnicodeDecodingResult -__TTSfq4n_n_n_d___TFVs13_StringBufferCfT8capacitySi11initialSizeSi12elementWidthSi_S_ -__TTSfq4d___TTSgq5Vs18_StringBufferIVars_Vs6UInt16___TZFVs11_HeapBuffer14_elementOffsetfT_Si -__TTSfq4n_d___TZFVs4UTF810_decodeOnefVs6UInt32T6resultGSqS0__6lengthVs5UInt8_ -__TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -__TTSg5P__SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -__TTSfq4n_d___TFVs6MirrorCfT10reflectingP__S_ -__TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_L_13printTypeNameu0_R_S_rfPMP_T_ -__TTSfq4gs_d___TFVs9CharacterCfSSS_ -__TTSfq4n_d___TFSSCfVs9CharacterSS -__TTSfq4s_d_n_n_d___TTSgq5VVs9Character10_SmallUTF8S0_s10Collections_Vs4UTF8S2_s12UnicodeCodecs___TZFVs13_StringBuffer13fromCodeUnitsu0_Rxs10Collection_s12UnicodeCodecw_8CodeUnitzWx8Iterator7Element_rfTx8encodingMq_24repairIllFormedSequencesSb15minimumCapacitySi_TGSqS__8hadErrorSb_ -__TTSfq4n_d_n_d___TTSgq5VVVs9Character10_SmallUTF88IteratorS1_s16IteratorProtocols_Vs4UTF8S3_s12UnicodeCodecs___TZFVs5UTF1616transcodedLengthu0_Rxs16IteratorProtocol_s12UnicodeCodecw_8CodeUnitzwx7ElementrfT2ofx9decodedAsMq_27repairingIllFormedSequencesSb_GSqT5countSi7isASCIISb__ -__TTSg5O10SwiftForms13FormErrorTypeS0_s8HashableS____TFVs11AnyHashableCuRxs8HashablerfxS_ -__TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS____TFVs11AnyHashableCuRxs8HashablerfxS_ -__TMaCSo8NSString -_swift_rt_swift_getInitializedObjCClass -___swift_noop_void_return -___swift_memcpy8_8 -___swift_noop_self_return -___swift_memcpy_array8_8 -___swift_memmove_array8_8 -__TwugOSC28UITableViewCellAccessoryType -__TwupOSC28UITableViewCellAccessoryType -__TwuiOSC28UITableViewCellAccessoryType -__TwXXVSC15UIFontTextStyle -__TwCPVSC15UIFontTextStyle -__TwcpVSC15UIFontTextStyle -__TwcaVSC15UIFontTextStyle -__TwtaVSC15UIFontTextStyle -__TwXxVSC15UIFontTextStyle -__TwCcVSC15UIFontTextStyle -__TwxgVSC15UIFontTextStyle -_swift_rt_swift_slowAlloc -_swift_rt_swift_slowDealloc -__TTSf4s_n___TTSg5SS_SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -__TTSf4n_gs_n_n___TTSg5P__SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -__TTSf4n_gs_n_n___TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -__TTSf4g_n_d___TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_26_forceBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__T_ -__TTSf4g_n_d___TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_34_conditionallyBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__Sb -__TMaPs35_HasCustomAnyHashableRepresentation_ -_swift_rt_swift_getExistentialTypeMetadata -_swift_rt_swift_dynamicCast -__TMaGVs20_ConcreteHashableBoxSi_ -__TMaMO10SwiftForms13FormErrorType -__TMaPs28CustomDebugStringConvertible_ -__TMaPs23CustomStringConvertible_ -__TMaPs20TextOutputStreamable_ -__TMaGCs17_AnyCollectionBoxT5labelGSqSS_5valueP___ -__TMaGCs19_AnyIteratorBoxBaseT5labelGSqSS_5valueP___ -__TMaGCs17_AnyCollectionBoxT5labelGSqSS_5valueP____merged -__swift_dead_method_stub -__TwxsVSC15UIFontTextStyle -__TwCpVSC15UIFontTextStyle -__TTSg5P__SSSSs16TextOutputStreams___TFFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_L_13printTypeNameu0_R_S_rfPMP_T_ -__TwxxVSC15UIFontTextStyle -_swift_rt_swift_release_n -_globalinit_33_A98A5792941355E0FC6070FE05AD0013_token0 -_globalinit_33_A98A5792941355E0FC6070FE05AD0013_token1 -_globalinit_33_A98A5792941355E0FC6070FE05AD0013_token2 -__TWPOSC28UITableViewCellAccessoryTypes9Equatable5UIKit -__TWPOSC28UITableViewCellAccessoryTypes16RawRepresentable5UIKit -__TWPVSC15UIFontTextStyles16RawRepresentable5UIKit -__TMLCSo8NSString -__TWPVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKit -__TWPVSC15UIFontTextStyles20_SwiftNewtypeWrapper5UIKit -__TMRfP10SwiftForms12FormSelector_ -l_OBJC_LABEL_PROTOCOL_$__TtP10SwiftForms12FormSelector_ -l_OBJC_PROTOCOL_REFERENCE_$__TtP10SwiftForms12FormSelector_ -__swift_FORCE_LOAD_$_swiftUIKit_$_SwiftForms -__swift_FORCE_LOAD_$_swiftCoreImage_$_SwiftForms -__swift_FORCE_LOAD_$_swiftDarwin_$_SwiftForms -__swift_FORCE_LOAD_$_swiftCoreGraphics_$_SwiftForms -__swift_FORCE_LOAD_$_swiftDispatch_$_SwiftForms -__swift_FORCE_LOAD_$_swiftObjectiveC_$_SwiftForms -__swift_FORCE_LOAD_$_swiftFoundation_$_SwiftForms -__swift_FORCE_LOAD_$_swiftQuartzCore_$_SwiftForms -__TWVOSC28UITableViewCellAccessoryType -__TMnOSC28UITableViewCellAccessoryType -__TMOSC28UITableViewCellAccessoryType -__TMRaOSC28UITableViewCellAccessoryTypes16RawRepresentable5UIKit -__TMRaVSC15UIFontTextStyles16RawRepresentable5UIKit -__TWVVSC15UIFontTextStyle -__TMnVSC15UIFontTextStyle -__TMVSC15UIFontTextStyle -__TMRaVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKit -___swift_reflection_version -__TMRfCSo8NSString -__TMRsCSo8NSString -__TMLPs35_HasCustomAnyHashableRepresentation_ -__TMLGVs20_ConcreteHashableBoxSi_ -__TMLMO10SwiftForms13FormErrorType -__TMLPs28CustomDebugStringConvertible_ -__TMLPs23CustomStringConvertible_ -__TMLPs20TextOutputStreamable_ -__TMLGCs17_AnyCollectionBoxT5labelGSqSS_5valueP___ -__TMLT5labelGSqSS_5valueP__ -__TMLGSqSS_ -__TMLP_ -__TMLGCs19_AnyIteratorBoxBaseT5labelGSqSS_5valueP___ -l_OBJC_LABEL_PROTOCOL_$__TtPs9AnyObject_ -l_OBJC_PROTOCOL_REFERENCE_$__TtPs9AnyObject_ -__TMLPMP_ -__TMLPs17CustomReflectable_ -l_OBJC_LABEL_PROTOCOL_$_NSObject -l_OBJC_PROTOCOL_REFERENCE_$_NSObject -Apple LLVM version 8.1.0 (clang-802.0.41) --emit-bc "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormSelector.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormTitleCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSliderCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormSectionDescriptor.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormDescriptor.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormBaseCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormLabelCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextViewCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/FormErrorType.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormViewController.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormButtonCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormStepperCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSelectorCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSwitchCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormCheckCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormValueCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSegmentedControlCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextFieldCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormPickerCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormOptionsViewController.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormDateCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormRowDescriptor.swift" -target arm64-apple-ios8.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -I /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Products/Release-iphoneos -F /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Products/Release-iphoneos -g -import-underlying-module -module-cache-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/ModuleCache -serialize-debugging-options -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/SwiftForms-generated-files.hmap -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/SwiftForms-own-target-headers.hmap -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/SwiftForms-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/SwiftForms-project-headers.hmap -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Products/Release-iphoneos/include -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/DerivedSources/arm64 -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/DerivedSources -Xcc -ivfsoverlay -Xcc /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/unextended-module-overlay.yaml -Xcc "-working-directory/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms" -emit-module-doc-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/SwiftForms.swiftdoc -serialize-diagnostics-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormSelector.dia -O -module-name SwiftForms -emit-module-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/SwiftForms.swiftmodule -emit-objc-header-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/SwiftForms-Swift.h -emit-dependencies-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormSelector.d -num-threads 4 -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormSelector.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormTitleCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormSliderCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormSectionDescriptor.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormDescriptor.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormBaseCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormLabelCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormTextViewCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormErrorType.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormViewController.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormButtonCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormStepperCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormSelectorCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormSwitchCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormCheckCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormValueCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormSegmentedControlCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormTextFieldCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormPickerCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormOptionsViewController.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormDateCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/arm64/FormRowDescriptor.bc -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift - -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms -Apple Swift version 3.1 (swiftlang-802.0.51 clang-802.0.41) -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormSelector.swift -_TMaGCs17_AnyCollectionBoxT5labelGSqSS_5valueP___ -FormSelector.swift -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers -_TMaT5labelGSqSS_5valueP__ -_TMaP_ -_TMaGSqSS_ -_TMaPs20TextOutputStreamable_ -_TMaPs23CustomStringConvertible_ -_TMaPs28CustomDebugStringConvertible_ -_TMaMO10SwiftForms13FormErrorType -_TMaGVs20_ConcreteHashableBoxSi_ -_TMaPs35_HasCustomAnyHashableRepresentation_ -_TTSf4g_n_d___TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_34_conditionallyBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__Sb -_TTSg5SS_VSC15UIFontTextStyle___TFSq7flatMapurfzFzxGSqqd___GSqqd___ -_TTSr5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_34_conditionallyBridgeFromObjectiveCFTWxS0_15_ObjectiveCType_6resultRGSqx__SbU_FwxS0_GSqx_ -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_34_conditionallyBridgeFromObjectiveCFTWxS0_15_ObjectiveCType_6resultRGSqx__SbU_FwxS0_GSqx_ -init -_TTSf4g_n_d___TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_26_forceBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__T_ -_TTSr5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_26_forceBridgeFromObjectiveCFTWxS0_15_ObjectiveCType_6resultRGSqx__T_U_FwxS0_GSqx_ -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_26_forceBridgeFromObjectiveCFTWxS0_15_ObjectiveCType_6resultRGSqx__T_U_FwxS0_GSqx_ -_TTSf4n_gs_n_n___TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -_TTSfq4s_s___TFVs11_StringCoreg9subscriptFGVs5RangeSi_S_ -_TTSfq4n_n_d___TTSgq5Vs5UInt8___TFSRCfT5startGSqGSPx__5countSi_GSRx_ -_TTWSSs16TextOutputStreamsFS_5writefSST_ -_TTSg5SS_SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -_TTSf4n_gs_n_n___TTSg5P__SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -_TMaPMP_ -_TTSf4s_n___TTSg5SS_SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -_TTSg5SSSSs16TextOutputStreams___TFSS5writeuRxs16TextOutputStreamrfT2toRx_T_ -get_field_types_UIFontTextStyle -_TMaCSo8NSString -_TwxgVSC15UIFontTextStyle -_TwCcVSC15UIFontTextStyle -_TwXxVSC15UIFontTextStyle -_TwtaVSC15UIFontTextStyle -_TwcaVSC15UIFontTextStyle -_TwcpVSC15UIFontTextStyle -_TwCPVSC15UIFontTextStyle -_TwXXVSC15UIFontTextStyle -get_field_types_UITableViewCellAccessoryType -_TwuiOSC28UITableViewCellAccessoryType -_TwupOSC28UITableViewCellAccessoryType -_TwugOSC28UITableViewCellAccessoryType -__swift_memmove_array8_8 -__swift_memcpy_array8_8 -__swift_noop_self_return -__swift_memcpy8_8 -__swift_noop_void_return -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS____TFVs11AnyHashableCuRxs8HashablerfxS_ -_TTSg5O10SwiftForms13FormErrorTypeS0_s8HashableS____TFVs11AnyHashableCuRxs8HashablerfxS_ -_TTSfq4n_d_n_d___TTSgq5VVVs9Character10_SmallUTF88IteratorS1_s16IteratorProtocols_Vs4UTF8S3_s12UnicodeCodecs___TZFVs5UTF1616transcodedLengthu0_Rxs16IteratorProtocol_s12UnicodeCodecw_8CodeUnitzwx7ElementrfT2ofx9decodedAsMq_27repairingIllFormedSequencesSb_GSqT5countSi7isASCIISb__ -_TTSfq4s_d_n_n_d___TTSgq5VVs9Character10_SmallUTF8S0_s10Collections_Vs4UTF8S2_s12UnicodeCodecs___TZFVs13_StringBuffer13fromCodeUnitsu0_Rxs10Collection_s12UnicodeCodecw_8CodeUnitzWx8Iterator7Element_rfTx8encodingMq_24repairIllFormedSequencesSb15minimumCapacitySi_TGSqS__8hadErrorSb_ -_TTSfq4n_d___TFSSCfVs9CharacterSS -_TTSfq4gs_d___TFVs9CharacterCfSSS_ -_TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_L_13printTypeNameu0_R_S_rfPMP_T_ -_TTSfq4n_d___TFVs6MirrorCfT10reflectingP__S_ -_TMaPs17CustomReflectable_ -_TTSg5P__SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -_TTSg5P__SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -_TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -_TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -rawValue.get -_TTSg5SSSSs21_ObjectiveCBridgeable10Foundation___forceBridgeFromObjectiveC_bridgeable -_unconditionallyBridgeFromObjectiveC -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_36_unconditionallyBridgeFromObjectiveCfGSqWxS0_15_ObjectiveCType__x -_conditionallyBridgeFromObjectiveC -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_34_conditionallyBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__Sb -_forceBridgeFromObjectiveC -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_26_forceBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__T_ -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_19_bridgeToObjectiveCfT_WxS0_15_ObjectiveCType_ -_bridgeToObjectiveC -== -_TTSg5OSC28UITableViewCellAccessoryTypeS_s16RawRepresentable5UIKit___TFsoi2eeuRxs16RawRepresentablewx8RawValues9EquatablerFTxx_Sb -_TTWSis9EquatablesZFS_oi2eefTxx_Sb -value.materialize -_toAnyHashable -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS____TFEsPs8Hashable14_toAnyHashablefT_Vs11AnyHashable -hashValue.get -_TTSg5O10SwiftForms13FormErrorTypeS0_s8HashableS____TFEsPs8Hashable14_toAnyHashablefT_Vs11AnyHashable -_getEmbeddedNSError -_userInfo.get -_TTSg5O10SwiftForms13FormErrorTypeS0_s5ErrorS____TFEsPs5Errorg9_userInfoGSqPs9AnyObject__ -_code.get -_TTSg5O10SwiftForms13FormErrorTypeS0_s5ErrorS____TFEsPs5Errorg5_codeSi -_domain.get -_TTSg5O10SwiftForms13FormErrorTypeS0_s5ErrorS____TFEsPs5Errorg7_domainSS -_TTSg5MO10SwiftForms13FormErrorType___TFSSCurfT10reflectingx_SS -formViewController.materialize -rowDescriptor.materialize -rowDescriptor.set -rowDescriptor.didset -__TToFC10SwiftForms13FormTitleCellg10titleLabelCSo7UILabel -__TMaCSo7UILabel -__TFs27_bridgeAnythingToObjectiveCurFxPs9AnyObject_ -__TToFC10SwiftForms13FormTitleCell9configurefT_T_ -__TMaGCs23_ContiguousArrayStorageTSSCSo6UIView__ -__TToFC10SwiftForms13FormTitleCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms13FormTitleCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms13FormTitleCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms13FormTitleCellcfT5coderCSo7NSCoder_GSqS0__ -__TTSf4g_d___TTSg5SSSSs8Hashables_CSo6UIView___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_swift_rt_swift_allocObject -__TMLCSo7UILabel -__TMLCSo6UIView -__TMLGCs23_ContiguousArrayStorageTSSCSo6UIView__ -__TMLTSSCSo6UIView_ -__TMLGCs23_ContiguousArrayStorageSS_ -__TWvdvC10SwiftForms12FormBaseCellP33_94960B1EEBF3E30EC85548629F87883B17customConstraintsGSaCSo18NSLayoutConstraint_ -__TMfC10SwiftForms13FormTitleCell -__TMRfC10SwiftForms13FormTitleCell -__TMRsC10SwiftForms13FormTitleCell -__TMRfCSo7UILabel -__TMRsCSo7UILabel -_objc_classes -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormTitleCell.swift -get_field_types_FormTitleCell -FormTitleCell.swift -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base -_TTSg5CSo18NSLayoutConstraint___TFs27_allocateUninitializedArrayurFBwTGSax_Bp_ -_TMaC10SwiftForms13FormTitleCell -defaultVisualConstraints -_TTSg5SS___TFs27_allocateUninitializedArrayurFBwTGSax_Bp_ -_TTSg5SS___TZFSa13_adoptStoragefTGCs23_ContiguousArrayStoragex_5countSi_TGSax_GSpx__ -_TTSg5SS___TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5SS___TFVs22_ContiguousArrayBufferCfT5countSi7storageGCs23_ContiguousArrayStoragex__GS_x_ -_TTSg5SS___TFVs22_ContiguousArrayBuffer18_initStorageHeaderfT5countSi8capacitySi_T_ -_TMaGCs23_ContiguousArrayStorageSS_ -deinit -constraintsViews -_TMaCSo6UIView -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10DictionaryCft17dictionaryLiteralGSaTxq____GS_xq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10DictionaryCfT13_nativeBufferGVs23_NativeDictionaryBufferxq___GS_xq__ -_TTSg5TSSCSo6UIView____TFCs23_ContiguousArrayStorageD -_TTSg5TSSCSo6UIView____TFCs23_ContiguousArrayStoraged -_TTSg5TSSCSo6UIView____TFSp12deinitializefT5countSi_Sv -_TTSg5TSSCSo6UIView____TFCs23_ContiguousArrayStorageg15_elementPointerGSpx_ -_TTSg5SSSSs8Hashables_CSo6UIView___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TTSg5TSSCSo6UIView____TFs27_allocateUninitializedArrayurFBwTGSax_Bp_ -_TTSg5TSSCSo6UIView____TZFSa13_adoptStoragefTGCs23_ContiguousArrayStoragex_5countSi_TGSax_GSpx__ -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBufferCfT5countSi7storageGCs23_ContiguousArrayStoragex__GS_x_ -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBuffer18_initStorageHeaderfT5countSi8capacitySi_T_ -_TMaGCs23_ContiguousArrayStorageTSSCSo6UIView__ -_TMaTSSCSo6UIView_ -configure -_TMaCSo7UILabel -titleLabel.get -_TToFC10SwiftForms13FormTitleCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms14FormSliderCellg10sliderViewCSo8UISlider -__TMaCSo8UISlider -__TToFC10SwiftForms14FormSliderCell9configurefT_T_ -__TToFC10SwiftForms14FormSliderCell6updatefT_T_ -__TToFC10SwiftForms14FormSliderCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms14FormSliderCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms14FormSliderCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms14FormSliderCellcfT5coderCSo7NSCoder_GSqS0__ -__TTSg5SS___TFSa16_copyToNewBufferfT8oldCountSi_T_ -__TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -__TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols_GVs14_IgnorePointerSS_GS1_SS_s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_swift_rt_swift_isUniquelyReferenced_nonNull_native -__TMLCSo8UISlider -__TMLPs9AnyObject_ -__TWoFC10SwiftForms14FormSliderCell12valueChangedfCSo8UISliderT_ -__TMfC10SwiftForms14FormSliderCell -__TMRfC10SwiftForms14FormSliderCell -__TMRsC10SwiftForms14FormSliderCell -__TMRfCSo8UISlider -__TMRsCSo8UISlider -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSliderCell.swift -get_field_types_FormSliderCell -FormSliderCell.swift -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells -_TMaC10SwiftForms14FormSliderCell -_TTSg5SS___TFSa6appendfxT_ -_TTSg5SS___TFSa36_reserveCapacityAssumingUniqueBufferfT8oldCountSi_T_ -_TTSg5SS___TFSa37_appendElementAssumeUniqueAndCapacityfTSi10newElementx_T_ -_TTSg5SS___TFSp10initializefT2tox5countSi_T_ -_TTSg5SS___TFVs12_ArrayBufferg19firstElementAddressGSpx_ -_TTSg5SS___TFVs12_ArrayBuffers5countSi -_TTSg5SS___TFVs22_ContiguousArrayBuffers5countSi -_TTSg5SS___TFVs12_ArrayBufferg8capacitySi -_TTSg5SS___TFVs22_ContiguousArrayBufferg8capacitySi -_TTSg5SS___TFSa9_getCountfT_Si -_TTSg5SS___TFVs12_ArrayBufferg5countSi -_TTSg5SS___TFVs22_ContiguousArrayBufferg5countSi -_TTSg5SS___TFSa40_makeUniqueAndReserveCapacityIfNotUniquefT_T_ -_TTSg5SS___TFVs12_ArrayBuffer30isMutableAndUniquelyReferencedfT_Sb -_TTSg5SS___TFVs12_ArrayBuffer20isUniquelyReferencedfT_Sb -_TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols_GVs14_IgnorePointerSS_GS1_SS_s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpwx7Element__GSpwxS2__ -_TTSg5SS___TFVs12_ArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5SS___TFVs22_ContiguousArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5SS___TFSp10initializefT4fromGSPx_5countSi_T_ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8endIndexSi -_TTSg5SS___TFVs12_ArrayBufferg8endIndexSi -_TTSg5SS___TFSp12deinitializefT5countSi_Sv -_TTSg5SS___TFSp14moveInitializefT4fromGSpx_5countSi_T_ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g19firstElementAddressGSpwx7Element_ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferwx7Element__ -_TTSg5SS___TFVs12_ArrayBuffer33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferx__ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g5countSi -_TTSg5SS___TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol35_forceCreateUniqueMutableBufferImplfT14countForBufferSi14minNewCapacitySi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5SS___TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -_TTSg5SS___TFVs22_ContiguousArrayBufferCfT_GS_x_ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8capacitySi -_TTSg5SS___TFSa16_copyToNewBufferfT8oldCountSi_T_ -_TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols_GVs14_IgnorePointerSS_GS1_SS_s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -valueChanged -rowDescriptor.get -value.set -update -_TMaPs9AnyObject_ -_TMaCSo8UISlider -sliderView.get -_TToFC10SwiftForms14FormSliderCellg10sliderViewCSo8UISlider -__TMfC10SwiftForms21FormSectionDescriptor -__TMRfC10SwiftForms21FormSectionDescriptor -__TMRfCSo6UIView -__TMRsCSo6UIView -__TMLGSaC10SwiftForms17FormRowDescriptor_ -__TMLGSqCSo6UIView_ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormSectionDescriptor.swift -get_field_types_FormSectionDescriptor -FormSectionDescriptor.swift -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors -_TMaGSqCSo6UIView_ -_TMaGSaC10SwiftForms17FormRowDescriptor_ -footerViewHeight.materialize -footerViewHeight.set -footerViewHeight.get -headerViewHeight.materialize -headerViewHeight.set -headerViewHeight.get -footerView.materialize -footerView.set -footerView.get -headerView.materialize -headerView.set -headerView.get -footerTitle.materialize -footerTitle.set -footerTitle.get -headerTitle.materialize -headerTitle.set -headerTitle.get -rows.materialize -rows.set -rows.get -_TMaC10SwiftForms21FormSectionDescriptor -__T0s24_VariantDictionaryBufferOWy -__T0s24_VariantDictionaryBufferOWy.1 -__TFCs24_CocoaDictionaryIterator4nextfT_GSqTPs9AnyObject_PS0____ -__TTSg5C10SwiftForms21FormSectionDescriptor___TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -__TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -__TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -__TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -__TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject__merged -__TTSf4n_n_d___TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -__TTSf4g_d___TTSg5SSSSs8Hashables_Ps9AnyObject____TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -__TMaPs9AnyObject_ -__T0SqWe -__TTSf4gs_n_n___TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -__TTSf4n_s_n___TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -__TMaGCs37_HashableTypedNativeDictionaryStorageSSPs9AnyObject__ -_swift_rt_swift_dynamicCastClass -_swift_rt_swift_retain_n -__TMfC10SwiftForms14FormDescriptor -__TMRfC10SwiftForms14FormDescriptor -__TMLGSaC10SwiftForms21FormSectionDescriptor_ -l_OBJC_LABEL_PROTOCOL_$__TtPs13_NSStringCore_ -l_OBJC_PROTOCOL_REFERENCE_$__TtPs13_NSStringCore_ -__TMLGCs37_HashableTypedNativeDictionaryStorageSSPs9AnyObject__ -l_OBJC_LABEL_PROTOCOL_$__TtPs10_NSCopying_ -l_OBJC_PROTOCOL_REFERENCE_$__TtPs10_NSCopying_ -l_OBJC_LABEL_PROTOCOL_$__TtPs18_NSFastEnumeration_ -l_OBJC_PROTOCOL_REFERENCE_$__TtPs18_NSFastEnumeration_ -l_OBJC_LABEL_PROTOCOL_$__TtPs15_ShadowProtocol_ -l_OBJC_PROTOCOL_REFERENCE_$__TtPs15_ShadowProtocol_ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormDescriptor.swift -_TMaGCs37_HashableTypedNativeDictionaryStorageSSPs9AnyObject__ -FormDescriptor.swift -get_field_types_FormDescriptor -_TMaGSaC10SwiftForms21FormSectionDescriptor_ -_TTSf4n_s_n___TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer5_findfTx11startBucketSi_T3posGVs22_NativeDictionaryIndexxq__5foundSb_ -_TTWSSs9EquatablesZFS_oi2eefTxx_Sb -_TTSfq4gs_gs_d___TZFSSoi2eefTSSSS_Sb -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffers8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffers5countSi -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg5countSi -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBufferg8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSg5Ps9AnyObject____TFSp10initializefT2tox5countSi_T_ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg6valuesGSpq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg4keysGSpx_ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffer18isInitializedEntryfT2atSi_Sb -_TTSfq4n_s___TFVs13_UnsafeBitMapg9subscriptFSiSb -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer6_indexfT5afterSi_Si -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferg11_bucketMaskSi -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg8capacitySi -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffer3keyfT2atSi_x -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer7_bucketfxSi -_TTWSSs8HashablesFS_g9hashValueSi -_TTSfq4s___TFSSg9hashValueSi -_TTSf4gs_n_n___TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSf4g_d___TTSg5SSSSs8Hashables_Ps9AnyObject____TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TTSg5GSaTSSPs9AnyObject___GSaTSSPS____s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5TSSPs9AnyObject_____TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5TSSPs9AnyObject_____TFSa9formIndexfT5afterRSi_T_ -_TTSg5TSSPs9AnyObject_____TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5TSSPs9AnyObject_____TFSag9subscriptFSix -_TTSg5TSSPs9AnyObject_____TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5TSSPs9AnyObject_____TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5TSSPs9AnyObject_____TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT15minimumCapacitySi_GS0_xq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT8capacitySi_GS0_xq__ -_TTSg5TSSPs9AnyObject_____TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5TSSPs9AnyObject_____TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5TSSPs9AnyObject_____TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5TSSPs9AnyObject_____TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5TSSPs9AnyObject_____TFVs22_ContiguousArrayBufferg5countSi -_TTSg5TSSPs9AnyObject_____TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferCfT_GS_xq__ -_TTSg5GSaTSSPs9AnyObject___GSaTSSPS____s10Collections___TFEsPs10Collectiong7isEmptySb -_TTSg5TSSPs9AnyObject_____TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5TSSPs9AnyObject_____TFSag8endIndexSi -_TTSg5TSSPs9AnyObject_____TFSa9_getCountfT_Si -_TTSg5TSSPs9AnyObject_____TFVs12_ArrayBufferg5countSi -_TTSg5TSSPs9AnyObject_____TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSf4n_n_d___TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSgq5Su___TFSp10initializefT2tox5countSi_T_ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg40_initializedHashtableEntriesBitMapBufferGSpSu_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg10_nonNativePs12_NSArrayCore_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs22_ContiguousArrayBufferg5countSi -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg9_isNativeSb -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -_TTSg5SS___TFs26_forceBridgeFromObjectiveCurFTPs9AnyObject_Mx_x -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer20isUniquelyReferencedfT_Sb -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs22_ContiguousArrayBufferg5countSi -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg20_isNativeTypeCheckedSb -sections.materialize -sections.set -sections.get -title.materialize -title.set -title.get -validateForm -_TTSg5GSaC10SwiftForms21FormSectionDescriptor_GSaS0__s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSag9subscriptFSix -_TTSg5GSaC10SwiftForms17FormRowDescriptor_GSaS0__s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5C10SwiftForms17FormRowDescriptor___TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFSa9formIndexfT5afterRSi_T_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSa9formIndexfT5afterRSi_T_ -_TTSg5C10SwiftForms17FormRowDescriptor___TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5C10SwiftForms17FormRowDescriptor___TFSag9subscriptFSix -_TTSg5C10SwiftForms17FormRowDescriptor___TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFSa29_hoistableIsNativeTypeCheckedfT_Sb -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg32arrayPropertyIsNativeTypeCheckedSb -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg20_isNativeTypeCheckedSb -_TTSg5C10SwiftForms17FormRowDescriptor___TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5C10SwiftForms17FormRowDescriptor___TFSag8endIndexSi -_TTSg5C10SwiftForms17FormRowDescriptor___TFSa9_getCountfT_Si -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg5countSi -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSa29_hoistableIsNativeTypeCheckedfT_Sb -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg32arrayPropertyIsNativeTypeCheckedSb -_TTSg5C10SwiftForms21FormSectionDescriptor___TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSag8endIndexSi -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSa9_getCountfT_Si -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg5countSi -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg10_nonNativePs12_NSArrayCore_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg9_isNativeSb -formValues -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs10Dictionarys9subscriptFxGSqq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer11updateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s9EquatableS____TFsoi2neuRxs9EquatablerFTxx_Sb -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs10DictionaryCft17dictionaryLiteralGSaTxq____GS_xq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs10DictionaryCfT13_nativeBufferGVs23_NativeDictionaryBufferxq___GS_xq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TMaC10SwiftForms14FormDescriptor -__TToFC10SwiftForms12FormBaseCellg18formViewControllerXwGSqCS_18FormViewController_ -__TToFC10SwiftForms12FormBaseCells18formViewControllerXwGSqCS_18FormViewController_ -__TToFC10SwiftForms12FormBaseCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms12FormBaseCellcfT5coderCSo7NSCoder_GSqS0__ -__TToFC10SwiftForms12FormBaseCell9configurefT_T_ -__TToFC10SwiftForms12FormBaseCell6updatefT_T_ -__TToFC10SwiftForms12FormBaseCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms12FormBaseCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms12FormBaseCell21firstResponderElementfT_GSqCSo11UIResponder_ -__TToFC10SwiftForms12FormBaseCell17inputAccesoryViewfT_CSo9UIToolbar -__TToZFC10SwiftForms12FormBaseCell17formRowCellHeightfT_V12CoreGraphics7CGFloat -__TToZFC10SwiftForms12FormBaseCell30formRowCanBecomeFirstResponderfT_Sb -__TToZFC10SwiftForms12FormBaseCell18formViewControllerfTCS_18FormViewController12didSelectRowS0__T_ -__TToFC10SwiftForms12FormBaseCell17updateConstraintsfT_T_ -__TTSg5CSo18NSLayoutConstraint___TFSa16_copyToNewBufferfT8oldCountSi_T_ -__TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -__TFs25_isClassOrObjCExistentialurFMxSb -__TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffer5indexfT5afterGVs22_NativeDictionaryIndexxq___GS0_xq__ -__TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -__TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol35_forceCreateUniqueMutableBufferImplfT14countForBufferSi14minNewCapacitySi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -__TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -__TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -__TTWSis9EquatablesZFS_oi2eefTxx_Sb -__TTSgq5GVs14CountableRangeSi_GS_Si_s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -__TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer18_typeCheckSlowPathfSiT_ -__TTSf4n_n_d___TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -__TTSf4n_n_d___TTSg5SS_P____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -__TTSf4s_n_n___TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -__TTSf4g___TTSg5SSSSs8Hashables_CSo6UIView_SSSSS_s_P____TFs17_dictionaryUpCastu2_Rxs8Hashable0_S_rFGVs10Dictionaryxq__GS0_q0_q1__ -__TTSf4n_n_d___TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -__TTSf4s_n_n___TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -__TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols_GVs14_IgnorePointerS0__GS2_S0__s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -__TMaCSo18NSLayoutConstraint -__TMaP_ -__TMaCSo6UIView -__T0s32DictionaryIteratorRepresentationOWy.10 -__TMaGCs37_HashableTypedNativeDictionaryStorageSSP__ -__TMaGCs37_HashableTypedNativeDictionaryStorageSSCSo6UIView_ -__TMLGCs23_ContiguousArrayStorageCSo15UIBarButtonItem_ -__TMLCSo15UIBarButtonItem -__TMLCSo18NSLayoutConstraint -__TWoFC10SwiftForms12FormBaseCellgP33_94960B1EEBF3E30EC85548629F87883B17customConstraintsGSaCSo18NSLayoutConstraint_ -__TWoFC10SwiftForms12FormBaseCellsP33_94960B1EEBF3E30EC85548629F87883B17customConstraintsGSaCSo18NSLayoutConstraint_ -__TWoFC10SwiftForms12FormBaseCellmP33_94960B1EEBF3E30EC85548629F87883B17customConstraintsGSaCSo18NSLayoutConstraint_ -__TWoFC10SwiftForms12FormBaseCell16handleDoneActionfCSo15UIBarButtonItemT_ -__TMfC10SwiftForms12FormBaseCell -__TMRfC10SwiftForms12FormBaseCell -__TMRsC10SwiftForms12FormBaseCell -__TMRfCSo18NSLayoutConstraint -__TMRsCSo18NSLayoutConstraint -__TMLGSqC10SwiftForms17FormRowDescriptor_ -__TMLGSqC10SwiftForms18FormViewController_ -__TMLGSaCSo18NSLayoutConstraint_ -__TMLGCs23_ContiguousArrayStorageCSo18NSLayoutConstraint_ -__TMLGCs37_HashableTypedNativeDictionaryStorageSSP__ -__TMLGCs37_HashableTypedNativeDictionaryStorageSSCSo6UIView_ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormBaseCell.swift -_TMaGCs37_HashableTypedNativeDictionaryStorageSSCSo6UIView_ -FormBaseCell.swift -_TMaGCs37_HashableTypedNativeDictionaryStorageSSP__ -get_field_types_FormBaseCell -_TMaGSaCSo18NSLayoutConstraint_ -_TMaGSqC10SwiftForms18FormViewController_ -_TMaGSqC10SwiftForms17FormRowDescriptor_ -formViewController.set -_TMaCSo18NSLayoutConstraint -_TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols_GVs14_IgnorePointerS0__GS2_S0__s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpwx7Element__GSpwxS2__ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8endIndexSi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg8endIndexSi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg5countSi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg10_nonNativePs12_NSArrayCore_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferg5countSi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg9_isNativeSb -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBuffers5countSi -_TTSg5CSo18NSLayoutConstraint___TFSp12deinitializefT5countSi_Sv -_TTSg5CSo18NSLayoutConstraint___TFSp14moveInitializefT4fromGSpx_5countSi_T_ -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g19firstElementAddressGSpwx7Element_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg19firstElementAddressGSpx_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferwx7Element__ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferx__ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferg8capacitySi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer20isUniquelyReferencedfT_Sb -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g5countSi -_TTSf4s_n_n___TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5CSo18NSLayoutConstraint___TFSp10initializefT2tox5countSi_T_ -_TTSf4g_n_n___TTSg5CSo18NSLayoutConstraint___TFSp10initializefT2tox5countSi_T_ -_TTSg5CSo18NSLayoutConstraint___TFSp10initializefT4fromGSPx_5countSi_T_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer10_typeCheckfGVs5RangeSi_T_ -_TTSgq5GVs14CountableRangeSi_GS_Si_s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg21needsElementTypeCheckSb -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg20_isNativeTypeCheckedSb -_TTSf4n_n_d___TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBuffer18_initStorageHeaderfT5countSi8capacitySi_T_ -_TMaGCs23_ContiguousArrayStorageCSo18NSLayoutConstraint_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferCfT_GS_x_ -_TTSf4g___TTSg5SSSSs8Hashables_CSo6UIView_SSSSS_s_P____TFs17_dictionaryUpCastu2_Rxs8Hashable0_S_rFGVs10Dictionaryxq__GS0_q0_q1__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs18DictionaryIterator4nextfT_GSqT3keyx5valueq___ -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs18DictionaryIterator11_nativeNextfT_GSqT3keyx5valueq___ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffer12assertingGetfGVs22_NativeDictionaryIndexxq__T3keyx5valueq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffer18isInitializedEntryfT2atSi_Sb -_TTSg5SSSSs8Hashables_P____TFVs10DictionaryCfT15minimumCapacitySi_GS_xq__ -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT15minimumCapacitySi_GS0_xq__ -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT8capacitySi_GS0_xq__ -_TTSg5SS_CSo6UIView___TZFVs22_NativeDictionaryIndexoi2eefTGS_xq__GS_xq___Sb -_TTSg5SSSSs8Hashables_P____TFVs10Dictionarys9subscriptFxGSqq__ -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer11updateValuefTq_6forKeyx_GSqq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg6valuesGSpq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffer3keyfT2atSi_x -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg4keysGSpx_ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg8capacitySi -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10Dictionary12makeIteratorfT_GVs18DictionaryIteratorxq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer12makeIteratorfT_GVs18DictionaryIteratorxq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TZFVs18DictionaryIterator6_cocoafCs24_CocoaDictionaryIteratorGS_xq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg8endIndexGVs22_NativeDictionaryIndexxq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg10startIndexGVs22_NativeDictionaryIndexxq__ -_TTSg5SS_P____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10Dictionaryg5countSi -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBufferg5countSi -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg5countSi -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBufferg8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSf4s_n_n___TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer5_findfTx11startBucketSi_T3posGVs22_NativeDictionaryIndexxq__5foundSb_ -_TTSg5SS_P____TFVs23_NativeDictionaryBufferg4keysGSpx_ -_TTSg5SS_P____TFVs23_NativeDictionaryBuffer18isInitializedEntryfT2atSi_Sb -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer6_indexfT5afterSi_Si -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferg11_bucketMaskSi -_TTSg5SS_P____TFVs23_NativeDictionaryBufferg8capacitySi -_TTSg5P____TFSp10initializefT2tox5countSi_T_ -_TTSg5SS_P____TFVs23_NativeDictionaryBufferg6valuesGSpq__ -_TTSg5SS_P____TFVs23_NativeDictionaryBuffer3keyfT2atSi_x -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer7_bucketfxSi -_TTSf4n_n_d___TTSg5SS_P____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5SS_P____TFVs23_NativeDictionaryBufferg40_initializedHashtableEntriesBitMapBufferGSpSu_ -formViewController -formRowCellHeight -firstResponderElement -_TTSf4g_d___TTSg5SSSSs8Hashables_CSo6UIView___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer5_findfTx11startBucketSi_T3posGVs22_NativeDictionaryIndexxq__5foundSb_ -_TTSg5GSaTSSCSo6UIView__GSaTSSS___s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5TSSCSo6UIView____TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5TSSCSo6UIView____TFSa9formIndexfT5afterRSi_T_ -_TTSg5TSSCSo6UIView____TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5TSSCSo6UIView____TFSag9subscriptFSix -_TTSg5TSSCSo6UIView____TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5TSSCSo6UIView____TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT15minimumCapacitySi_GS0_xq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT8capacitySi_GS0_xq__ -_TTSg5TSSCSo6UIView____TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5TSSCSo6UIView____TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBufferg5countSi -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffers5countSi -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer6_indexfT5afterSi_Si -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBufferg11_bucketMaskSi -_TTSg5CSo6UIView___TFSp10initializefT2tox5countSi_T_ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer7_bucketfxSi -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferCfT_GS_xq__ -_TTSg5GSaTSSCSo6UIView__GSaTSSS___s10Collections___TFEsPs10Collectiong7isEmptySb -_TTSg5TSSCSo6UIView____TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5TSSCSo6UIView____TFSag8endIndexSi -_TTSg5TSSCSo6UIView____TFSa9_getCountfT_Si -_TTSg5TSSCSo6UIView____TFVs12_ArrayBufferg5countSi -_TTSg5TSSCSo6UIView____TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TMaC10SwiftForms12FormBaseCell -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer18_typeCheckSlowPathfSiT_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -_TTSg5P____TFs26_forceBridgeFromObjectiveCurFTPs9AnyObject_Mx_x -_TTSg5SS_P____TFVs23_NativeDictionaryBuffers5countSi -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSg5SS_P____TFVs23_NativeDictionaryBufferg5countSi -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer20isUniquelyReferencedfT_Sb -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBufferg8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol35_forceCreateUniqueMutableBufferImplfT14countForBufferSi14minNewCapacitySi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8capacitySi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg8capacitySi -_TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffer5indexfT5afterGVs22_NativeDictionaryIndexxq___GS0_xq__ -_TTSg5GVs22_NativeDictionaryIndexSSCSo6UIView_GS_SSS0__s9Equatables___TFsoi2neuRxs9EquatablerFTxx_Sb -_TTSg5SS_CSo6UIView___TTWu0_rGVs22_NativeDictionaryIndexxq__s9EquatablesZFS0_oi2eefTxx_Sb -_TFs25_isClassOrObjCExistentialurFMxSb -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffers8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSg5CSo18NSLayoutConstraint___TFSa16_copyToNewBufferfT8oldCountSi_T_ -_TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols_GVs14_IgnorePointerS0__GS2_S0__s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -updateConstraints -formRowCanBecomeFirstResponder -handleDoneAction -inputAccesoryView -_TToFC10SwiftForms12FormBaseCells18formViewControllerXwGSqCS_18FormViewController_ -_TToFC10SwiftForms12FormBaseCellg18formViewControllerXwGSqCS_18FormViewController_ -formViewController.get -_TFs27_bridgeAnythingToObjectiveCurFxPs9AnyObject_ -_TTSg5CSo18NSLayoutConstraint___TFSa6appendfxT_ -_TTSg5CSo18NSLayoutConstraint___TFSa36_reserveCapacityAssumingUniqueBufferfT8oldCountSi_T_ -_TTSg5GSaCSo18NSLayoutConstraint_GSaS__s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5CSo18NSLayoutConstraint___TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5CSo18NSLayoutConstraint___TFSa9formIndexfT5afterRSi_T_ -_TTSg5GSaSS_GSaSS_s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5SS___TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5SS___TFSa9formIndexfT5afterRSi_T_ -_TTSg5SS___TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5SS___TFSag9subscriptFSix -_TTSg5SS___TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5SS___TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5SS___TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5CSo18NSLayoutConstraint___TFSa9removeAllfT15keepingCapacitySb_T_ -_TTSg5CSo18NSLayoutConstraint___TFSa37_appendElementAssumeUniqueAndCapacityfTSi10newElementx_T_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffers5countSi -_TTSg5CSo18NSLayoutConstraint___TFSa9_getCountfT_Si -_TTSg5CSo18NSLayoutConstraint___TFSa40_makeUniqueAndReserveCapacityIfNotUniquefT_T_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer30isMutableAndUniquelyReferencedfT_Sb -_TTSg5CSo18NSLayoutConstraint___TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5CSo18NSLayoutConstraint___TFSag9subscriptFSix -_TTSg5CSo18NSLayoutConstraint___TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5CSo18NSLayoutConstraint___TFSa29_hoistableIsNativeTypeCheckedfT_Sb -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg32arrayPropertyIsNativeTypeCheckedSb -_TTSg5CSo18NSLayoutConstraint___TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5CSo18NSLayoutConstraint___TFSag8endIndexSi -_TTSg5SSSSs8Hashables_CSo6UIView_SSSSS_s_P____TFs17_dictionaryUpCastu2_Rxs8Hashable0_S_rFGVs10Dictionaryxq__GS0_q0_q1__ -_TTSg5SS___TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5SS___TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5SS___TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5SS___TFVs22_ContiguousArrayBuffer10getElementfSix -customConstraints.get -_TTSg5SS___TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5SS___TFSag8endIndexSi -_TTSg5CSo18NSLayoutConstraint___TFSag5countSi -_TMaCSo15UIBarButtonItem -_TTSg5CSo15UIBarButtonItem___TFs27_allocateUninitializedArrayurFBwTGSax_Bp_ -_TTSg5CSo15UIBarButtonItem___TZFSa13_adoptStoragefTGCs23_ContiguousArrayStoragex_5countSi_TGSax_GSpx__ -_TTSg5CSo15UIBarButtonItem___TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5CSo15UIBarButtonItem___TFVs22_ContiguousArrayBufferCfT5countSi7storageGCs23_ContiguousArrayStoragex__GS_x_ -_TTSg5CSo15UIBarButtonItem___TFVs22_ContiguousArrayBuffer18_initStorageHeaderfT5countSi8capacitySi_T_ -_TMaGCs23_ContiguousArrayStorageCSo15UIBarButtonItem_ -__TFC10SwiftForms13FormLabelCell9configurefT_T_ -__TToFC10SwiftForms13FormLabelCell9configurefT_T_ -__TFC10SwiftForms13FormLabelCell6updatefT_T_ -__TToFC10SwiftForms13FormLabelCell6updatefT_T_ -__TFC10SwiftForms13FormLabelCellD -__TFC10SwiftForms13FormLabelCellCfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TFC10SwiftForms13FormLabelCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms13FormLabelCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TFC10SwiftForms13FormLabelCellCfT5coderCSo7NSCoder_GSqS0__ -__TFC10SwiftForms13FormLabelCellcfT5coderCSo7NSCoder_GSqS0__ -__TToFC10SwiftForms13FormLabelCellcfT5coderCSo7NSCoder_GSqS0__ -__TMaC10SwiftForms13FormLabelCell -_OBJC_METACLASS_$__TtC10SwiftForms13FormLabelCell -__TMnC10SwiftForms13FormLabelCell -__TMLC10SwiftForms13FormLabelCell -__TMfC10SwiftForms13FormLabelCell -__TMRfC10SwiftForms13FormLabelCell -__TMRsC10SwiftForms13FormLabelCell -__TWvdvC10SwiftForms13FormValueCellP33_82F16EA997B7B04DB1F3F41F679BB19017customConstraintsGSQGSaPs9AnyObject___ -__TMC10SwiftForms13FormLabelCell -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormLabelCell.swift -_TMaC10SwiftForms13FormLabelCell -FormLabelCell.swift -get_field_types_FormLabelCell -__TToFC10SwiftForms16FormTextViewCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms16FormTextViewCellg9textFieldCSo10UITextView -__TToZFC10SwiftForms16FormTextViewCell17formRowCellHeightfT_V12CoreGraphics7CGFloat -__TToFC10SwiftForms16FormTextViewCell9configurefT_T_ -__TToFC10SwiftForms16FormTextViewCell6updatefT_T_ -__TToFC10SwiftForms16FormTextViewCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms16FormTextViewCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms16FormTextViewCell17textViewDidChangefCSo10UITextViewT_ -__TToFC10SwiftForms16FormTextViewCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms16FormTextViewCellcfT5coderCSo7NSCoder_GSqS0__ -__TTSfq4gs_gs_d___TZFSSoi2eefTSSSS_Sb -__TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -__TTWSSs9EquatablesZFS_oi2eefTxx_Sb -__TTWSSs8HashablesFS_g9hashValueSi -__TTSfq4s___TFSSg9hashValueSi -__TTSf4gs_n_n___TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -__TTSf4g_n_n_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer12nativeDeletefTGVs23_NativeDictionaryBufferxq__11idealBucketSi6offsetSi_T_ -__TTSf4s_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer18nativeRemoveObjectfT6forKeyx_GSqq__ -__TTSf4n_s_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -__TMaCSo10UITextView -__T0SqWe.2 -__T0s24_VariantDictionaryBufferOWy.3 -__TMLCSo10UITextView -__TWvdvC10SwiftForms16FormTextViewCellP33_872CBDA890CBCF32517E3701A6021DB517customConstraintsGSQGSaPs9AnyObject___ -l_OBJC_LABEL_PROTOCOL_$_UITextViewDelegate -l_OBJC_PROTOCOL_REFERENCE_$_UITextViewDelegate -__TWoFC10SwiftForms16FormTextViewCellgP33_872CBDA890CBCF32517E3701A6021DB517customConstraintsGSQGSaPs9AnyObject___ -__TWoFC10SwiftForms16FormTextViewCellsP33_872CBDA890CBCF32517E3701A6021DB517customConstraintsGSQGSaPs9AnyObject___ -__TWoFC10SwiftForms16FormTextViewCellmP33_872CBDA890CBCF32517E3701A6021DB517customConstraintsGSQGSaPs9AnyObject___ -__TMfC10SwiftForms16FormTextViewCell -__TMRfC10SwiftForms16FormTextViewCell -__TMRsC10SwiftForms16FormTextViewCell -__TMRfCSo10UITextView -__TMRsCSo10UITextView -__TMLGSQGSaPs9AnyObject___ -__TMLGSaPs9AnyObject__ -l_OBJC_LABEL_PROTOCOL_$_UIScrollViewDelegate -l_OBJC_PROTOCOL_REFERENCE_$_UIScrollViewDelegate -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextViewCell.swift -get_field_types_FormTextViewCell -FormTextViewCell.swift -_TMaGSQGSaPs9AnyObject___ -_TMaGSaPs9AnyObject__ -_TMaC10SwiftForms16FormTextViewCell -textViewDidChange -_TTSg5VSS13CharacterViewS_s10Collections___TFEsPs10Collectiong5countwx13IndexDistance -_TTWVSS13CharacterViews10CollectionsFS0_8distancefT4fromwx5Index2towxS1__wx13IndexDistance -_TTSfq4s_s_n___TTSgq5VSS13CharacterViewS_s23_BidirectionalIndexables___TFEsPs23_BidirectionalIndexable8distancefT4fromwx5Index2towxS0__wx13IndexDistance -_TTWVSS13CharacterViews14_IndexableBasesFS0_g8endIndexwx5Index -_TTWVSS13CharacterViews14_IndexableBasesFS0_g10startIndexwx5Index -_TMaCSo10UITextView -_TTSf4n_s_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffers8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSf4s_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer18nativeRemoveObjectfT6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer12nativeDeletefTGVs23_NativeDictionaryBufferxq__11idealBucketSi6offsetSi_T_ -_TTSf4g_n_n_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer12nativeDeletefTGVs23_NativeDictionaryBufferxq__11idealBucketSi6offsetSi_T_ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer5_prevfSiSi -_TTSg5CSo6UIView___TFSp4movefT_x -_TTSg5SS___TFSp4movefT_x -_TTSg5CSo6UIView___TFSp12deinitializefT5countSi_Sv -_TTSf4gs_n_n___TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSf4n_n_d___TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg40_initializedHashtableEntriesBitMapBufferGSpSu_ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSg5CSo6UIView___TFs26_forceBridgeFromObjectiveCurFTPs9AnyObject_Mx_x -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer20isUniquelyReferencedfT_Sb -_TTSg5CSo7UIImageCSo8NSObjects9Equatable5UIKit___TFsoi2neuRxs9EquatablerFTGSqx_GSqx__Sb -_TTSg5CSo7UIImageCSo8NSObjects9Equatable5UIKit___TFsoi2eeuRxs9EquatablerFTGSqx_GSqx__Sb -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10Dictionarys9subscriptFxGSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer11updateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10Dictionary11removeValuefT6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer11removeValuefT6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer18nativeRemoveObjectfT6forKeyx_GSqq__ -textField.get -_TToFC10SwiftForms16FormTextViewCellg9textFieldCSo10UITextView -_TToFC10SwiftForms16FormTextViewCellg10titleLabelCSo7UILabel -___swift_memcpy1_1 -___swift_memcpy_array1_1 -___swift_memmove_array1_1 -__TwxsO10SwiftForms13FormErrorType -__TwxgO10SwiftForms13FormErrorType -__TwugO10SwiftForms13FormErrorType -__TwupO10SwiftForms13FormErrorType -__TwuiO10SwiftForms13FormErrorType -__TMfO10SwiftForms13FormErrorType -__TMRfO10SwiftForms13FormErrorType -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/FormErrorType.swift -_TMaO10SwiftForms13FormErrorType -FormErrorType.swift -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms -get_field_types_FormErrorType -_TwuiO10SwiftForms13FormErrorType -_TwupO10SwiftForms13FormErrorType -_TwugO10SwiftForms13FormErrorType -_TwxgO10SwiftForms13FormErrorType -_TwxsO10SwiftForms13FormErrorType -__swift_memmove_array1_1 -__swift_memcpy_array1_1 -__swift_memcpy1_1 -_TWaO10SwiftForms13FormErrorTypes9_HashableS_ -_TWaO10SwiftForms13FormErrorTypes5ErrorS_ -_TWaO10SwiftForms13FormErrorTypes8HashableS_ -_TWaO10SwiftForms13FormErrorTypes9EquatableS_ -_globalinit_33_A98A5792941355E0FC6070FE05AD0013_func0 -__TFIZvC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD00136__onceT_iU_FT_T_ -_globalinit_33_A98A5792941355E0FC6070FE05AD0013_func2 -__TToFC10SwiftForms18FormViewControllercfT_S0_ -__TToFC10SwiftForms18FormViewControllercfT5styleOSC16UITableViewStyle_S0_ -__TToFC10SwiftForms18FormViewControllercfT7nibNameGSqSS_6bundleGSqCSo6Bundle__S0_ -__TToFC10SwiftForms18FormViewControllercfT5coderCSo7NSCoder_S0_ -__TToFC10SwiftForms18FormViewController11viewDidLoadfT_T_ -__TToFC10SwiftForms18FormViewController11valueForTagfSSGSqPs9AnyObject__ -__TToFC10SwiftForms18FormViewController8setValuefTPs9AnyObject_6forTagSS_T_ -__TToFC10SwiftForms18FormViewController16numberOfSectionsfT2inCSo11UITableView_Si -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView21numberOfRowsInSectionSi_Si -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView12cellForRowAtV10Foundation9IndexPath_CSo15UITableViewCell -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView23titleForHeaderInSectionSi_GSqSS_ -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView23titleForFooterInSectionSi_GSqSS_ -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView22viewForFooterInSectionSi_GSqCSo6UIView_ -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView22viewForHeaderInSectionSi_GSqCSo6UIView_ -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView22viewForFooterInSectionSi_GSqCSo6UIView__merged -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView24heightForHeaderInSectionSi_V12CoreGraphics7CGFloat -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView24heightForFooterInSectionSi_V12CoreGraphics7CGFloat -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView24heightForHeaderInSectionSi_V12CoreGraphics7CGFloat_merged -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView14heightForRowAtV10Foundation9IndexPath_V12CoreGraphics7CGFloat -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView14didSelectRowAtV10Foundation9IndexPath_T_ -__TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -__TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffer5indexfT5afterGVs22_NativeDictionaryIndexxq___GS0_xq__ -__TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -__TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -__TTSf4g_d___TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -__T0SqWy.2 -__T0s32DictionaryIteratorRepresentationOWy.12 -__TZvC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD001320onceDefaultCellClassSi -__TZvC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD001318defaultCellClassesGVs10DictionaryOCS_17FormRowDescriptor7RowTypeMCS_12FormBaseCell_ -__TWvdvC10SwiftForms17FormTextFieldCellP33_149870142910A653EE2CFFFC6D820B4A17customConstraintsGSaPs9AnyObject__ -__TWvdvC10SwiftForms24FormSegmentedControlCellP33_DBE9D27F80989AD1EAE3BA68E841BE3517customConstraintsGSaPs9AnyObject__ -__TWoZFC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD001326defaultCellClassForRowTypefOCS_17FormRowDescriptor7RowTypeMCS_12FormBaseCell -__TWoFC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD001328formRowDescriptorAtIndexPathfV10Foundation9IndexPathCS_17FormRowDescriptor -__TWoFC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD001334formBaseCellClassFromRowDescriptorfCS_17FormRowDescriptorGSQMCS_12FormBaseCell_ -__TMfC10SwiftForms18FormViewController -__TMRfC10SwiftForms18FormViewController -__TMRsC10SwiftForms18FormViewController -__TMLGCs37_HashableTypedNativeDictionaryStorageOC10SwiftForms17FormRowDescriptor7RowTypeMCS0_12FormBaseCell_ -__TMLMC10SwiftForms12FormBaseCell -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormViewController.swift -get_field_types_FormViewController -FormViewController.swift -tableView -formBaseCellClassFromRowDescriptor -defaultCellClassForRowType -formRowDescriptorAtIndexPath -form.get -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs18DictionaryIterator4nextfT_GSqT3keyx5valueq___ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs18DictionaryIterator11_nativeNextfT_GSqT3keyx5valueq___ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffer12assertingGetfGVs22_NativeDictionaryIndexxq__T3keyx5valueq__ -FormTextFieldCell.swift -FormSegmentedControlCell.swift -FormValueCell.swift -_TTSg5SS_Ps9AnyObject____TZFVs22_NativeDictionaryIndexoi2eefTGS_xq__GS_xq___Sb -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs10Dictionary12makeIteratorfT_GVs18DictionaryIteratorxq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer12makeIteratorfT_GVs18DictionaryIteratorxq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TZFVs18DictionaryIterator6_cocoafCs24_CocoaDictionaryIteratorGS_xq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg8endIndexGVs22_NativeDictionaryIndexxq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg10startIndexGVs22_NativeDictionaryIndexxq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFVs10Dictionaryg9subscriptFxGSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer8maybeGetfxGSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer8maybeGetfxGSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer5_findfTx11startBucketSi_T3posGVs22_NativeDictionaryIndexxq__5foundSb_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBuffer3keyfT2atSi_x -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferg4keysGSpx_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBuffer18isInitializedEntryfT2atSi_Sb -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer6_indexfT5afterSi_Si -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferg6valuesGSpq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer7_bucketfxSi -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferg8capacitySi -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferg5countSi -_TFC10SwiftForms18FormViewControllerauP33_A98A5792941355E0FC6070FE05AD001318defaultCellClassesGVs10DictionaryOCS_17FormRowDescriptor7RowTypeMCS_12FormBaseCell_ -_TFC10SwiftForms18FormViewControllerauP33_A98A5792941355E0FC6070FE05AD00136__onceT_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -setValue -_TTSg5GVs16IndexingIteratorGSaC10SwiftForms21FormSectionDescriptor__GS_GSaS1___s16IteratorProtocols___TFVs18EnumeratedIterator4nextfT_GSqT6offsetSi7elementwx7Element__ -_TTSg5GSaC10SwiftForms21FormSectionDescriptor_GSaS0__s14_IndexableBases___TTWuRxs14_IndexableBaserGVs16IndexingIteratorx_s16IteratorProtocolsFS1_4nextfT_GSqwx7Element_ -_TTSg5GVs16IndexingIteratorGSaC10SwiftForms17FormRowDescriptor__GS_GSaS1___s16IteratorProtocols___TFVs18EnumeratedIterator4nextfT_GSqT6offsetSi7elementwx7Element__ -_TTSg5GSaC10SwiftForms17FormRowDescriptor_GSaS0__s14_IndexableBases___TTWuRxs14_IndexableBaserGVs16IndexingIteratorx_s16IteratorProtocolsFS1_4nextfT_GSqwx7Element_ -_TZFSSoi2eefTSSSS_Sb -valueForTag -_TTSf4g_d___TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TTSg5GSaTOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell__GSaTS1_MS2___s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSa9formIndexfT5afterRSi_T_ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSag9subscriptFSix -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT15minimumCapacitySi_GS0_xq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT8capacitySi_GS0_xq__ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs22_ContiguousArrayBufferg5countSi -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBuffers5countSi -_TTSg5MC10SwiftForms12FormBaseCell___TFSp10initializefT2tox5countSi_T_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType___TFSp10initializefT2tox5countSi_T_ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSf4n_n_d___TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferg40_initializedHashtableEntriesBitMapBufferGSpSu_ -_TMaGCs37_HashableTypedNativeDictionaryStorageOC10SwiftForms17FormRowDescriptor7RowTypeMCS0_12FormBaseCell_ -_TMaMC10SwiftForms12FormBaseCell -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferCfT_GS_xq__ -_TTSg5GSaTOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell__GSaTS1_MS2___s10Collections___TFEsPs10Collectiong7isEmptySb -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSag8endIndexSi -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSa9_getCountfT_Si -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs12_ArrayBufferg5countSi -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType___TFs26_forceBridgeFromObjectiveCurFTPs9AnyObject_Mx_x -_TTSg5MC10SwiftForms12FormBaseCell___TFs26_forceBridgeFromObjectiveCurFTPs9AnyObject_Mx_x -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer20isUniquelyReferencedfT_Sb -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBufferg8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffer5indexfT5afterGVs22_NativeDictionaryIndexxq___GS0_xq__ -_TTSg5GVs22_NativeDictionaryIndexSSPs9AnyObject__GS_SSPS0___s9Equatables___TFsoi2neuRxs9EquatablerFTxx_Sb -_TTSg5SS_Ps9AnyObject____TTWu0_rGVs22_NativeDictionaryIndexxq__s9EquatablesZFS0_oi2eefTxx_Sb -_TFCs24_CocoaDictionaryIterator4nextfT_GSqTPs9AnyObject_PS0____ -_TTSfq4n_d_n___TTSgq5GVs9UnmanagedPs9AnyObject_____TFSv4loadurfT14fromByteOffsetSi2asMx_x -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffers8asNativeGVs23_NativeDictionaryBufferxq__ -_TMaC10SwiftForms18FormViewController -form.materialize -form.set -_TTSg5C10SwiftForms17FormRowDescriptor___TFSag5countSi -numberOfSections -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSag5countSi -viewDidLoad -globalinit_33_A98A5792941355E0FC6070FE05AD0013_func2 -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFVs10DictionaryCft17dictionaryLiteralGSaTxq____GS_xq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFVs10DictionaryCfT13_nativeBufferGVs23_NativeDictionaryBufferxq___GS_xq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TFIZvC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD00136__onceT_iU_FT_T_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFVs10Dictionarys9subscriptFxGSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer11updateValuefTq_6forKeyx_GSqq__ -globalinit_33_A98A5792941355E0FC6070FE05AD0013_func0 -__TToFC10SwiftForms14FormButtonCell9configurefT_T_ -__TToFC10SwiftForms14FormButtonCell6updatefT_T_ -__TToFC10SwiftForms14FormButtonCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms14FormButtonCellcfT5coderCSo7NSCoder_GSqS0__ -__TMfC10SwiftForms14FormButtonCell -__TMRfC10SwiftForms14FormButtonCell -__TMRsC10SwiftForms14FormButtonCell -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormButtonCell.swift -get_field_types_FormButtonCell -FormButtonCell.swift -_TMaC10SwiftForms14FormButtonCell -__TToFC10SwiftForms15FormStepperCellg11stepperViewCSo9UIStepper -__TToFC10SwiftForms15FormStepperCellg10countLabelCSo7UILabel -__TMaCSo9UIStepper -__TToFC10SwiftForms15FormStepperCell9configurefT_T_ -__TToFC10SwiftForms15FormStepperCell6updatefT_T_ -__TToFC10SwiftForms15FormStepperCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms15FormStepperCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms15FormStepperCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms15FormStepperCellcfT5coderCSo7NSCoder_GSqS0__ -__TFFs16_float64ToStringFTSd5debugSb_SSU_FGSpVs5UInt8_SS -__TMLCSo9UIStepper -__TWoFC10SwiftForms15FormStepperCell12valueChangedfCSo8UISwitchT_ -__TMfC10SwiftForms15FormStepperCell -__TMRfC10SwiftForms15FormStepperCell -__TMRsC10SwiftForms15FormStepperCell -__TMRfCSo9UIStepper -__TMRsCSo9UIStepper -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormStepperCell.swift -get_field_types_FormStepperCell -FormStepperCell.swift -_TMaC10SwiftForms15FormStepperCell -_TFFs16_float64ToStringFTSd5debugSb_SSU_FGSpVs5UInt8_SS -_TTSfq4n_d___TZFVs4UTF810_decodeOnefVs6UInt32T6resultGSqS0__6lengthVs5UInt8_ -_TTSgq5GVs16IndexingIteratorGSRVs5UInt8__GS_GSRS0___s16IteratorProtocols___TFVs4UTF86decodeuRxs16IteratorProtocolwx7ElementzVs5UInt8rfRxOs21UnicodeDecodingResult -_TTSgq5GSRVs5UInt8_GSRS__s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSfq4n_s___TTSgq5Vs5UInt8___TFSRg9subscriptFSix -_TTSg5SdSds25LosslessStringConvertibles___TFSSCuRxs25LosslessStringConvertiblerfxSS -_TTWSds23CustomStringConvertiblesFS_g11descriptionSS -_TFs16_float64ToStringFTSd5debugSb_SS -_TMaCSo9UIStepper -countLabel.get -_TToFC10SwiftForms15FormStepperCellg10countLabelCSo7UILabel -stepperView.get -_TToFC10SwiftForms15FormStepperCellg11stepperViewCSo9UIStepper -__TToFC10SwiftForms16FormSelectorCell6updatefT_T_ -__TToZFC10SwiftForms16FormSelectorCell18formViewControllerfTCS_18FormViewController12didSelectRowCS_12FormBaseCell_T_ -__TToFC10SwiftForms16FormSelectorCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms16FormSelectorCellcfT5coderCSo7NSCoder_GSqS0__ -__TTSg5Ps9AnyObject____TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -__TMaCSo16UIViewController -__TMLCSo16UIViewController -__TMfC10SwiftForms16FormSelectorCell -__TMRfC10SwiftForms16FormSelectorCell -__TMRsC10SwiftForms16FormSelectorCell -__TMLGCs18_HeapBufferStorageVs18_StringBufferIVarsVs6UInt16_ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSelectorCell.swift -get_field_types_FormSelectorCell -FormSelectorCell.swift -_TMaCSo16UIViewController -_TMaC10SwiftForms16FormSelectorCell -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg10_nonNativePs12_NSArrayCore_ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferg5countSi -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg9_isNativeSb -_TTSfq4d___TTSgq5Vs18_StringBufferIVars_Vs6UInt16___TZFVs11_HeapBuffer14_elementOffsetfT_Si -_TTSfq4n_n_n_d___TFVs13_StringBufferCfT8capacitySi11initialSizeSi12elementWidthSi_S_ -_TTSgq5Vs18_StringBufferIVars_Vs6UInt16___TFVs11_HeapBuffer9_capacityfT_Si -_TTSfq4n_n_n_d___TTSgq5Vs18_StringBufferIVars_Vs6UInt16___TFVs11_HeapBufferCfTPMPs9AnyObject_xSi_GS_xq__ -_TTSgq5Vs18_StringBufferIVars___TFSp10initializefT2tox5countSi_T_ -_TMaGCs18_HeapBufferStorageVs18_StringBufferIVarsVs6UInt16_ -_TTSg5GVs16IndexingIteratorGSaPs9AnyObject___GS_GSaPS0____s16IteratorProtocols___TFVs18EnumeratedIterator4nextfT_GSqT6offsetSi7elementwx7Element__ -_TTSg5GSaPs9AnyObject__GSaPS___s14_IndexableBases___TTWuRxs14_IndexableBaserGVs16IndexingIteratorx_s16IteratorProtocolsFS1_4nextfT_GSqwx7Element_ -_TTSg5GSaPs9AnyObject__GSaPS___s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5Ps9AnyObject____TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5Ps9AnyObject____TFSag9subscriptFSix -_TTSg5Ps9AnyObject____TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5Ps9AnyObject____TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5Ps9AnyObject____TFSa9formIndexfT5afterRSi_T_ -_TZFSSoi2pefTRSSSS_T_ -_TTSg5Ps9AnyObject____TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5Ps9AnyObject____TFSa29_hoistableIsNativeTypeCheckedfT_Sb -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg32arrayPropertyIsNativeTypeCheckedSb -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg20_isNativeTypeCheckedSb -_TTSg5Ps9AnyObject____TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5Ps9AnyObject____TFSag8endIndexSi -_TTSg5Ps9AnyObject____TFSa9_getCountfT_Si -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg5countSi -__TToFC10SwiftForms14FormSwitchCellg10switchViewCSo8UISwitch -__TToFC10SwiftForms14FormSwitchCell9configurefT_T_ -__TToFC10SwiftForms14FormSwitchCell6updatefT_T_ -__TToFC10SwiftForms14FormSwitchCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms14FormSwitchCellcfT5coderCSo7NSCoder_GSqS0__ -__TWoFC10SwiftForms14FormSwitchCell12valueChangedfCSo8UISwitchT_ -__TMfC10SwiftForms14FormSwitchCell -__TMRfC10SwiftForms14FormSwitchCell -__TMRsC10SwiftForms14FormSwitchCell -__TMRfCSo8UISwitch -__TMRsCSo8UISwitch -__TMLCSo8UISwitch -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSwitchCell.swift -get_field_types_FormSwitchCell -FormSwitchCell.swift -_TMaCSo8UISwitch -_TMaC10SwiftForms14FormSwitchCell -switchView.get -_TToFC10SwiftForms14FormSwitchCellg10switchViewCSo8UISwitch -__TToFC10SwiftForms13FormCheckCell9configurefT_T_ -__TToFC10SwiftForms13FormCheckCell6updatefT_T_ -__TToZFC10SwiftForms13FormCheckCell18formViewControllerfTCS_18FormViewController12didSelectRowCS_12FormBaseCell_T_ -__TToFC10SwiftForms13FormCheckCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms13FormCheckCellcfT5coderCSo7NSCoder_GSqS0__ -__TWoFC10SwiftForms13FormCheckCellP33_254C49D6E5637BF0BEB3218F3FC093E75checkfT_T_ -__TMfC10SwiftForms13FormCheckCell -__TMRfC10SwiftForms13FormCheckCell -__TMRsC10SwiftForms13FormCheckCell -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormCheckCell.swift -get_field_types_FormCheckCell -FormCheckCell.swift -_TMaC10SwiftForms13FormCheckCell -check -__TToFC10SwiftForms13FormValueCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms13FormValueCellg10valueLabelCSo7UILabel -__TToFC10SwiftForms13FormValueCell9configurefT_T_ -__TToFC10SwiftForms13FormValueCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms13FormValueCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms13FormValueCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms13FormValueCellcfT5coderCSo7NSCoder_GSqS0__ -__TTSgq5SSSSs20TextOutputStreamables___TFs27_toStringReadOnlyStreamableuRxs20TextOutputStreamablerFxSS -__TTSgq5SiSis23CustomStringConvertibles___TFs26_toStringReadOnlyPrintableuRxs23CustomStringConvertiblerFxSS -__TTSfq4g_d___TFSSCft19stringInterpolationGSaSS__SS -__TTWVSS13CharacterViews14_IndexableBasesFS0_g10startIndexwx5Index -__TTWVSS13CharacterViews14_IndexableBasesFS0_g8endIndexwx5Index -__TTWVSS13CharacterViews10CollectionsFS0_8distancefT4fromwx5Index2towxS1__wx13IndexDistance -__TTSfq4s_s_n___TTSgq5VSS13CharacterViewS_s23_BidirectionalIndexables___TFEsPs23_BidirectionalIndexable8distancefT4fromwx5Index2towxS0__wx13IndexDistance -__TWoFC10SwiftForms13FormValueCellgP33_82F16EA997B7B04DB1F3F41F679BB19017customConstraintsGSQGSaPs9AnyObject___ -__TWoFC10SwiftForms13FormValueCellsP33_82F16EA997B7B04DB1F3F41F679BB19017customConstraintsGSQGSaPs9AnyObject___ -__TWoFC10SwiftForms13FormValueCellmP33_82F16EA997B7B04DB1F3F41F679BB19017customConstraintsGSQGSaPs9AnyObject___ -__TMfC10SwiftForms13FormValueCell -__TMRfC10SwiftForms13FormValueCell -__TMRsC10SwiftForms13FormValueCell -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormValueCell.swift -get_field_types_FormValueCell -_TMaC10SwiftForms13FormValueCell -_TTSfq4g_d___TFSSCft19stringInterpolationGSaSS__SS -_TTSgq5SiSis23CustomStringConvertibles___TFs26_toStringReadOnlyPrintableuRxs23CustomStringConvertiblerFxSS -_TTSgq5SSSSs20TextOutputStreamables___TFs27_toStringReadOnlyStreamableuRxs20TextOutputStreamablerFxSS -valueLabel.get -_TToFC10SwiftForms13FormValueCellg10valueLabelCSo7UILabel -_TToFC10SwiftForms13FormValueCellg10titleLabelCSo7UILabel -_TTSg5SS___TFCs23_ContiguousArrayStorageD -_TTSg5SS___TFCs23_ContiguousArrayStoraged -_TTSg5SS___TFCs23_ContiguousArrayStorageg15_elementPointerGSpx_ -_TFSSCft19stringInterpolationGSaSS__SS -_TFSSCfT26stringInterpolationSegmentSS_SS -_TFSSCfT26stringInterpolationSegmentSi_SS -__TToFC10SwiftForms24FormSegmentedControlCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms24FormSegmentedControlCellg16segmentedControlCSo18UISegmentedControl -__TMaCSo18UISegmentedControl -__TToFC10SwiftForms24FormSegmentedControlCell9configurefT_T_ -__TToFC10SwiftForms24FormSegmentedControlCell6updatefT_T_ -__TToFC10SwiftForms24FormSegmentedControlCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms24FormSegmentedControlCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms24FormSegmentedControlCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms24FormSegmentedControlCellcfT5coderCSo7NSCoder_GSqS0__ -__TMLCSo18UISegmentedControl -__TWoFC10SwiftForms24FormSegmentedControlCellgP33_DBE9D27F80989AD1EAE3BA68E841BE3517customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms24FormSegmentedControlCellsP33_DBE9D27F80989AD1EAE3BA68E841BE3517customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms24FormSegmentedControlCellmP33_DBE9D27F80989AD1EAE3BA68E841BE3517customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms24FormSegmentedControlCell12valueChangedfCSo18UISegmentedControlT_ -__TWoFC10SwiftForms24FormSegmentedControlCellP33_DBE9D27F80989AD1EAE3BA68E841BE3522updateSegmentedControlfT_T_ -__TMfC10SwiftForms24FormSegmentedControlCell -__TMRfC10SwiftForms24FormSegmentedControlCell -__TMRsC10SwiftForms24FormSegmentedControlCell -__TMRfCSo18UISegmentedControl -__TMRsCSo18UISegmentedControl -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSegmentedControlCell.swift -get_field_types_FormSegmentedControlCell -_TTSg5GSaPs9AnyObject__GSaPS___s10Collections___TFEsPs10Collectiong7isEmptySb -_TMaC10SwiftForms24FormSegmentedControlCell -updateSegmentedControl -_TFsoi3eeeFTGSqPs9AnyObject__GSqPS____Sb -_TMaCSo18UISegmentedControl -segmentedControl.get -_TToFC10SwiftForms24FormSegmentedControlCellg16segmentedControlCSo18UISegmentedControl -_TToFC10SwiftForms24FormSegmentedControlCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms17FormTextFieldCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms17FormTextFieldCellg9textFieldCSo11UITextField -__TMaCSo11UITextField -__TToFC10SwiftForms17FormTextFieldCell9configurefT_T_ -__TToFC10SwiftForms17FormTextFieldCell6updatefT_T_ -__TToFC10SwiftForms17FormTextFieldCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms17FormTextFieldCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms17FormTextFieldCell21firstResponderElementfT_GSqCSo11UIResponder_ -__TToZFC10SwiftForms17FormTextFieldCell30formRowCanBecomeFirstResponderfT_Sb -__TToFC10SwiftForms17FormTextFieldCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms17FormTextFieldCellcfT5coderCSo7NSCoder_GSqS0__ -__TMLCSo11UITextField -__TWoFC10SwiftForms17FormTextFieldCellgP33_149870142910A653EE2CFFFC6D820B4A17customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms17FormTextFieldCellsP33_149870142910A653EE2CFFFC6D820B4A17customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms17FormTextFieldCellmP33_149870142910A653EE2CFFFC6D820B4A17customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms17FormTextFieldCell14editingChangedfCSo11UITextFieldT_ -__TMfC10SwiftForms17FormTextFieldCell -__TMRfC10SwiftForms17FormTextFieldCell -__TMRsC10SwiftForms17FormTextFieldCell -__TMRfCSo11UITextField -__TMRsCSo11UITextField -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextFieldCell.swift -get_field_types_FormTextFieldCell -editingChanged -_TMaC10SwiftForms17FormTextFieldCell -_TTSg5CSo6UIViewCSo8NSObjects9Equatable5UIKit___TFsoi2eeuRxs9EquatablerFTGSqx_GSqx__Sb -_TMaCSo11UITextField -_TToFC10SwiftForms17FormTextFieldCellg9textFieldCSo11UITextField -_TToFC10SwiftForms17FormTextFieldCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms14FormPickerCell9configurefT_T_ -__TToFC10SwiftForms14FormPickerCell6updatefT_T_ -__TToFC10SwiftForms14FormPickerCell21firstResponderElementfT_GSqCSo11UIResponder_ -__TToZFC10SwiftForms14FormPickerCell18formViewControllerfTCS_18FormViewController12didSelectRowCS_12FormBaseCell_T_ -__TToFC10SwiftForms14FormPickerCell10pickerViewfTCSo12UIPickerView11titleForRowSi12forComponentSi_GSqSS_ -__TToFC10SwiftForms14FormPickerCell10pickerViewfTCSo12UIPickerView12didSelectRowSi11inComponentSi_T_ -__TToFC10SwiftForms14FormPickerCell18numberOfComponentsfT2inCSo12UIPickerView_Si -__TToFC10SwiftForms14FormPickerCell10pickerViewfTCSo12UIPickerView23numberOfRowsInComponentSi_Si -__TToFC10SwiftForms14FormPickerCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms14FormPickerCellcfT5coderCSo7NSCoder_GSqS0__ -__TWvdvC10SwiftForms14FormPickerCellP33_509F42A1F3552FA9D46F9A9EE75C8D9B6pickerCSo12UIPickerView -__TWvdvC10SwiftForms14FormPickerCellP33_509F42A1F3552FA9D46F9A9EE75C8D9B15hiddenTextFieldCSo11UITextField -l_OBJC_LABEL_PROTOCOL_$_UIPickerViewDelegate -l_OBJC_PROTOCOL_REFERENCE_$_UIPickerViewDelegate -l_OBJC_LABEL_PROTOCOL_$_UIPickerViewDataSource -l_OBJC_PROTOCOL_REFERENCE_$_UIPickerViewDataSource -__TMfC10SwiftForms14FormPickerCell -__TMRfC10SwiftForms14FormPickerCell -__TMRsC10SwiftForms14FormPickerCell -__TMRfCSo12UIPickerView -__TMRsCSo12UIPickerView -__TMLCSo12UIPickerView -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormPickerCell.swift -get_field_types_FormPickerCell -FormPickerCell.swift -_TMaCSo12UIPickerView -_TMaC10SwiftForms14FormPickerCell -pickerView -_TTSg5Ps9AnyObject____TFSag5countSi -numberOfComponents -_TTSg5GSaPs9AnyObject__GSaPS___s8Sequences___TFEsPs8Sequence10enumeratedfT_GVs18EnumeratedSequencex_ -__TToFC10SwiftForms29FormOptionsSelectorControllerg8formCellGSqCS_12FormBaseCell_ -__TToFC10SwiftForms29FormOptionsSelectorControllers8formCellGSqCS_12FormBaseCell_ -__TToFC10SwiftForms29FormOptionsSelectorControllercfT_S0_ -__TToFC10SwiftForms29FormOptionsSelectorControllercfT5coderCSo7NSCoder_S0_ -__TToFC10SwiftForms29FormOptionsSelectorController11viewDidLoadfT_T_ -__TToFC10SwiftForms29FormOptionsSelectorController16numberOfSectionsfT2inCSo11UITableView_Si -__TToFC10SwiftForms29FormOptionsSelectorController9tableViewfTCSo11UITableView21numberOfRowsInSectionSi_Si -__TToFC10SwiftForms29FormOptionsSelectorController9tableViewfTCSo11UITableView24heightForHeaderInSectionSi_V12CoreGraphics7CGFloat -__TToFC10SwiftForms29FormOptionsSelectorController9tableViewfTCSo11UITableView12cellForRowAtV10Foundation9IndexPath_CSo15UITableViewCell -__TToFC10SwiftForms29FormOptionsSelectorController9tableViewfTCSo11UITableView14didSelectRowAtV10Foundation9IndexPath_T_ -__TToFC10SwiftForms29FormOptionsSelectorControllercfT5styleOSC16UITableViewStyle_S0_ -__TTSg5Ps9AnyObject____TFSa40_makeUniqueAndReserveCapacityIfNotUniquefT_T_ -__TTSg5Ps9AnyObject____TFSa16_copyToNewBufferfT8oldCountSi_T_ -__TTSfq4s___TTSgq5Vs5UInt8___TFSRg5countSi -__TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT8newCountSi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -__TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -__TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol35_forceCreateUniqueMutableBufferImplfT14countForBufferSi14minNewCapacitySi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -__TTSf4n_n_d___TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -__TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs14_IgnorePointerPS0___GS2_PS0___s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -__TTSf4s_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withSi10elementsOfqd___T_ -__TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs31_InitializeMemoryFromCollectionGVs15EmptyCollectionPS0____GS2_GS3_PS0____s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -__TTSf4s_d_n_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol23_arrayOutOfPlaceReplaceuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withqd__5countSi_T_ -__TTSf4s_d_n___TTSg5Ps9AnyObject__GVs15EmptyCollectionPS___GS0_PS___s10Collections___TFSa15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zxrfTGVs5RangeSi_4withqd___T_ -__T0SqWy.8 -__T0SqWe.9 -__TMaGSaPs9AnyObject__ -__TMaGCs23_ContiguousArrayStoragePs9AnyObject__ -__TMaGSaPs9AnyObject___merged -__TMLGCs23_ContiguousArrayStoragePs9AnyObject__ -__TWoFC10SwiftForms29FormOptionsSelectorControllerCfT7nibNameGSqSS_6bundleGSqCSo6Bundle__S0_ -__TMfC10SwiftForms29FormOptionsSelectorController -__TMRfC10SwiftForms29FormOptionsSelectorController -__TMRsC10SwiftForms29FormOptionsSelectorController -__TMLGSqC10SwiftForms12FormBaseCell_ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormOptionsViewController.swift -get_field_types_FormOptionsSelectorController -FormOptionsViewController.swift -_TMaGSqC10SwiftForms12FormBaseCell_ -_TTSg5Ps9AnyObject____TFSa6removefT2atSi_x -_TTSg5Ps9AnyObject____TFSa6appendfxT_ -_TTSg5Ps9AnyObject____TFSa36_reserveCapacityAssumingUniqueBufferfT8oldCountSi_T_ -_TTSg5GSaPs9AnyObject__GSaPS___s10Collections___TFEsPs10Collection5indexfzT5whereFzWx8Iterator7Element_Sb_GSqwx5Index_ -formCell.get -_TTSg5Ps9AnyObject____TFs27_allocateUninitializedArrayurFBwTGSax_Bp_ -_TTSg5Ps9AnyObject____TZFSa13_adoptStoragefTGCs23_ContiguousArrayStoragex_5countSi_TGSax_GSpx__ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferCfT5countSi7storageGCs23_ContiguousArrayStoragex__GS_x_ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBuffer18_initStorageHeaderfT5countSi8capacitySi_T_ -_TTSg5SiSis9Equatables___TFsoi2neuRxs9EquatablerFTxx_Sb -_TTSg5GSaPs9AnyObject__GSaPS___s26RangeReplaceableCollections_GVs15EmptyCollectionPS___GS1_PS___s10Collections___TFesRxs26RangeReplaceableCollectionwx5Indexs10StrideableWxS0_6Stride_s13SignedIntegerrS_15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zWxS5_S6__rfTGVs14CountableRangewxS0__4withqd___T_ -_TTSg5Ps9AnyObject__GVs15EmptyCollectionPS___GS0_PS___s10Collections___TTWurGSax_s26RangeReplaceableCollectionsFS_15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zWxS1_S2__rfTGVs5Rangewx5Index_4withqd___T_ -_TTSg5Ps9AnyObject__GVs15EmptyCollectionPS___GS0_PS___s10Collections___TFSa15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zxrfTGVs5RangeSi_4withqd___T_ -_TTRXFo_oPs9AnyObject__dSbzoPs5Error__XFo_iPS___dSbzoPS0___ -_TFFC10SwiftForms29FormOptionsSelectorController9tableViewFTCSo11UITableView14didSelectRowAtV10Foundation9IndexPath_T_U_FPs9AnyObject_Sb -_TTSf4g_g___TFFC10SwiftForms29FormOptionsSelectorController9tableViewFTCSo11UITableView14didSelectRowAtV10Foundation9IndexPath_T_U_FPs9AnyObject_Sb -_TTSg5Ps9AnyObject____TTWurGSax_s10CollectionsFS_g9subscriptFwx5IndexWx8Iterator7Element_ -_TTSg5Ps9AnyObject____TFSa37_appendElementAssumeUniqueAndCapacityfTSi10newElementx_T_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg19firstElementAddressGSpx_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffers5countSi -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBuffers5countSi -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg8capacitySi -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferg8capacitySi -_TTSf4s_d_n___TTSg5Ps9AnyObject__GVs15EmptyCollectionPS___GS0_PS___s10Collections___TFSa15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zxrfTGVs5RangeSi_4withqd___T_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol23_arrayOutOfPlaceReplaceuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withqd__5countSi_T_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withSi10elementsOfqd___T_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferx__ -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer20isUniquelyReferencedfT_Sb -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg8endIndexSi -_TTSf4s_d_n_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol23_arrayOutOfPlaceReplaceuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withqd__5countSi_T_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs31_InitializeMemoryFromCollectionGVs15EmptyCollectionPS0____GS2_GS3_PS0____s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g5countSi -_TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs31_InitializeMemoryFromCollectionGVs15EmptyCollectionPS0____GS2_GS3_PS0____s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSg5GVs15EmptyCollectionPs9AnyObject__GS_PS0___s10Collections___TTWuRxs10CollectionrGVs31_InitializeMemoryFromCollectionx_s16_PointerFunctionsFS1_4callfTGSpwx7Element_5countSi_T_ -_TTSg5GVs15EmptyCollectionPs9AnyObject__GS_PS0___s10Collections___TFVs31_InitializeMemoryFromCollection4callfTGSpWx8Iterator7Element__5countSi_T_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpwx7Element__GSpwxS2__ -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSf4g_n_n___TTSg5Ps9AnyObject____TFSp10initializefT2tox5countSi_T_ -_TTSfq4n_s_n___TTSgq5GVs14CountableRangeSi_GS_Si_s10_Indexables___TFEsPs10_Indexable20_failEarlyRangeCheckfTwx5Index6boundsGVs5RangewxS0___T_ -_TTSg5Ps9AnyObject____TFSp10initializefT4fromGSPx_5countSi_T_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8endIndexSi -_TTSg5Ps9AnyObject____TTWurGVs15EmptyCollectionx_s10CollectionsFS0_g9subscriptFwx5IndexWx8Iterator7Element_ -_TTSg5Ps9AnyObject____TFVs15EmptyCollectiong9subscriptFSix -_TTSg5Ps9AnyObject____TFSp12deinitializefT5countSi_Sv -_TTSg5Ps9AnyObject____TFSp14moveInitializefT4fromGSpx_5countSi_T_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g19firstElementAddressGSpwx7Element_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferwx7Element__ -_TTSf4s_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withSi10elementsOfqd___T_ -_TTSg5Ps9AnyObject____TFSp10moveAssignfT4fromGSpx_5countSi_T_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g20subscriptBaseAddressGSpwx7Element_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocolg20subscriptBaseAddressGSpwx7Element_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_s5countSi -_TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs14_IgnorePointerPS0___GS2_PS0___s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSf4n_n_d___TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -_TMaGCs23_ContiguousArrayStoragePs9AnyObject__ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferCfT_GS_x_ -_TFFC10SwiftForms29FormOptionsSelectorController9tableViewFTCSo11UITableView12cellForRowAtV10Foundation9IndexPath_CSo15UITableViewCellU_FPs9AnyObject_Sb -_TTSf4g_g___TFFC10SwiftForms29FormOptionsSelectorController9tableViewFTCSo11UITableView12cellForRowAtV10Foundation9IndexPath_CSo15UITableViewCellU_FPs9AnyObject_Sb -_TTSg5CSo15UITableViewCellCSo8NSObjects9Equatable5UIKit___TFsoi2eeuRxs9EquatablerFTGSqx_GSqx__Sb -_TMaC10SwiftForms29FormOptionsSelectorController -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol35_forceCreateUniqueMutableBufferImplfT14countForBufferSi14minNewCapacitySi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8capacitySi -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT8newCountSi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSfq4s___TTSgq5Vs5UInt8___TFSRg5countSi -_TTSg5Ps9AnyObject____TFSa16_copyToNewBufferfT8oldCountSi_T_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs14_IgnorePointerPS0___GS2_PS0___s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSg5Ps9AnyObject____TFSa40_makeUniqueAndReserveCapacityIfNotUniquefT_T_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer30isMutableAndUniquelyReferencedfT_Sb -_TTSfq1n_cl39_TTRXFo_dGSRVs5UInt8___XFo_dGSRS___iT__XFo_dGSRVs5UInt8____n___TTSgq5T____TFVs12StaticString14withUTF8BufferurfFGSRVs5UInt8_xx -_TFFs25_unimplementedInitializerFT9classNameVs12StaticString8initNameS_4fileS_4lineSu6columnSu_Os5NeverU0_FGSRVs5UInt8_T_ -_TFFFs25_unimplementedInitializerFT9classNameVs12StaticString8initNameS_4fileS_4lineSu6columnSu_Os5NeverU0_FGSRVs5UInt8_T_U_FGSRS1__T_ -_TTSfq4s_s___TFFFs25_unimplementedInitializerFT9classNameVs12StaticString8initNameS_4fileS_4lineSu6columnSu_Os5NeverU0_FGSRVs5UInt8_T_U_FGSRS1__T_ -formCell.materialize -formCell.set -_TToFC10SwiftForms29FormOptionsSelectorControllers8formCellGSqCS_12FormBaseCell_ -_TToFC10SwiftForms29FormOptionsSelectorControllerg8formCellGSqCS_12FormBaseCell_ -__TToFC10SwiftForms12FormDateCell9configurefT_T_ -__TToFC10SwiftForms12FormDateCell6updatefT_T_ -__TToZFC10SwiftForms12FormDateCell18formViewControllerfTCS_18FormViewController12didSelectRowCS_12FormBaseCell_T_ -__TToFC10SwiftForms12FormDateCell21firstResponderElementfT_GSqCSo11UIResponder_ -__TToZFC10SwiftForms12FormDateCell30formRowCanBecomeFirstResponderfT_Sb -__TToFC10SwiftForms12FormDateCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms12FormDateCellcfT5coderCSo7NSCoder_GSqS0__ -__TWvdvC10SwiftForms12FormDateCellP33_C023FAD6768D46095D3739AAF2D7822915hiddenTextFieldCSo11UITextField -__TWvdvC10SwiftForms12FormDateCellP33_C023FAD6768D46095D3739AAF2D7822910datePickerCSo12UIDatePicker -__TWvdvC10SwiftForms12FormDateCellP33_C023FAD6768D46095D3739AAF2D7822920defaultDateFormatterCSo13DateFormatter -__TWoFC10SwiftForms12FormDateCell12valueChangedfCSo12UIDatePickerT_ -__TWoFC10SwiftForms12FormDateCellP33_C023FAD6768D46095D3739AAF2D7822916getDateFormatterfT_CSo13DateFormatter -__TMfC10SwiftForms12FormDateCell -__TMRfC10SwiftForms12FormDateCell -__TMRsC10SwiftForms12FormDateCell -__TMRfCSo12UIDatePicker -__TMRsCSo12UIDatePicker -__TMRfCSo13DateFormatter -__TMRsCSo13DateFormatter -__TMLCSo12UIDatePicker -__TMLCSo13DateFormatter -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormDateCell.swift -get_field_types_FormDateCell -FormDateCell.swift -_TMaCSo13DateFormatter -_TMaCSo12UIDatePicker -getDateFormatter -_TMaC10SwiftForms12FormDateCell -__TwxsOC10SwiftForms17FormRowDescriptor7RowType -__TwxgOC10SwiftForms17FormRowDescriptor7RowType -__TwugOC10SwiftForms17FormRowDescriptor7RowType -__TwupOC10SwiftForms17FormRowDescriptor7RowType -__TwuiOC10SwiftForms17FormRowDescriptor7RowType -__TwXXVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwdeVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwxxVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwcpVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwcaVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwTkVC10SwiftForms17FormRowDescriptor17CellConfiguration -___swift_memcpy96_8 -__TwtaVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwalVC10SwiftForms17FormRowDescriptor17CellConfiguration -___swift_copy_outline_pointer -__TwXxVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwCcVC10SwiftForms17FormRowDescriptor17CellConfiguration -___swift_memmove_array96_8 -__TwXXVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwdeVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwxxVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwcpVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwcaVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwTkVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -___swift_memcpy33_8 -__TwtaVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwalVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwXxVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwCcVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -___swift_memmove_array40_8 -__TwXXVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwxxVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwcpVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwcaVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -___swift_memcpy16_8 -__TwtaVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwXxVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwCcVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -___swift_memmove_array16_8 -__TwXXVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor20StepperConfiguration -___swift_memcpy25_8 -__TwalVC10SwiftForms17FormRowDescriptor20StepperConfiguration -___swift_memcpy_array32_8 -___swift_memmove_array32_8 -__TwXXVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwcpVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwcaVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwtaVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwXxVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwCcVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwXXVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwprVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwdeVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwxxVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwcpVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwcaVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwTkVC10SwiftForms17FormRowDescriptor16RowConfiguration -___swift_memcpy200_8 -__TwtaVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwalVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwXxVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwCcVC10SwiftForms17FormRowDescriptor16RowConfiguration -___swift_memmove_array200_8 -__TwxsVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwxgVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwxsVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwxsVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwxsVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwxsVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwxgVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwxgVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwxgVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwxgVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwprVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwprVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TwprVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwdeVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TwxxVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwTkVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TMfC10SwiftForms17FormRowDescriptor -__TMfOC10SwiftForms17FormRowDescriptor7RowType -__TMRfOC10SwiftForms17FormRowDescriptor7RowType -__TMfVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TMfVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TMfVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TMfVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TMfVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TMfVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TMRfC10SwiftForms17FormRowDescriptor -__TMLGVs10DictionarySSPs9AnyObject__ -__TMLGSqCSo13DateFormatter_ -__TMLGSqFC10SwiftForms17FormRowDescriptorT__ -__TMLFC10SwiftForms17FormRowDescriptorT_ -__TMLGSqPMPs9AnyObject__ -__TMLPMPs9AnyObject_ -__TMLGSqFPs9AnyObject_SS_ -__TMLFPs9AnyObject_SS -__TMLGSqFC10SwiftForms12FormBaseCellGSaSS__ -__TMLFC10SwiftForms12FormBaseCellGSaSS_ -__TMLGSaSS_ -__TMLGSqPs9AnyObject__ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormRowDescriptor.swift -initialize_metadata_RowConfiguration -FormRowDescriptor.swift -_TMaC10SwiftForms17FormRowDescriptor -_TMaVC10SwiftForms17FormRowDescriptor16RowConfiguration -get_field_types_RowConfiguration -_TMaGVs10DictionarySSPs9AnyObject__ -_TMaVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TMaVC10SwiftForms17FormRowDescriptor20StepperConfiguration -_TMaVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TMaVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TMaVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwxgVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwxsVC10SwiftForms17FormRowDescriptor16RowConfiguration -__swift_memmove_array200_8 -_TwCcVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwXxVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwalVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwtaVC10SwiftForms17FormRowDescriptor16RowConfiguration -__swift_memcpy200_8 -_TwTkVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwcaVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwcpVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwCpVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwxxVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwdeVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwprVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor16RowConfiguration -initialize_metadata_DateConfiguration -get_field_types_DateConfiguration -_TMaGSqCSo13DateFormatter_ -_TwCcVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwXxVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwtaVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwcaVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwcpVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor17DateConfiguration -initialize_metadata_StepperConfiguration -get_field_types_StepperConfiguration -__swift_memmove_array32_8 -__swift_memcpy_array32_8 -_TwalVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__swift_memcpy25_8 -_TwCpVC10SwiftForms17FormRowDescriptor20StepperConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor20StepperConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor20StepperConfiguration -initialize_metadata_ButtonConfiguration -get_field_types_ButtonConfiguration -_TMaGSqFC10SwiftForms17FormRowDescriptorT__ -_TMaFC10SwiftForms17FormRowDescriptorT_ -__swift_memmove_array16_8 -_TwCcVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwXxVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwtaVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__swift_memcpy16_8 -_TwcaVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwcpVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwCpVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwxxVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -initialize_metadata_SelectionConfiguration -get_field_types_SelectionConfiguration -_TMaGSqFPs9AnyObject_SS_ -_TMaFPs9AnyObject_SS -_TMaGSqPMPs9AnyObject__ -_TMaPMPs9AnyObject_ -__swift_memmove_array40_8 -_TwCcVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwXxVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwalVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwtaVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__swift_memcpy33_8 -_TwTkVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwcaVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwcpVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwCpVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwxxVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwdeVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -initialize_metadata_CellConfiguration -get_field_types_CellConfiguration -_TMaGSqFC10SwiftForms12FormBaseCellGSaSS__ -_TMaFC10SwiftForms12FormBaseCellGSaSS_ -_TMaGSaSS_ -__swift_memmove_array96_8 -_TwCcVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwXxVC10SwiftForms17FormRowDescriptor17CellConfiguration -__swift_copy_outline_pointer -_TwalVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwtaVC10SwiftForms17FormRowDescriptor17CellConfiguration -__swift_memcpy96_8 -_TwTkVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwcaVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwcpVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwCpVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwxxVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwdeVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor17CellConfiguration -initialize_metadata_RowType -_TMaOC10SwiftForms17FormRowDescriptor7RowType -get_field_types_RowType -_TwuiOC10SwiftForms17FormRowDescriptor7RowType -_TwupOC10SwiftForms17FormRowDescriptor7RowType -_TwugOC10SwiftForms17FormRowDescriptor7RowType -_TwxgOC10SwiftForms17FormRowDescriptor7RowType -_TwxsOC10SwiftForms17FormRowDescriptor7RowType -get_field_types_FormRowDescriptor -_TMaGSqPs9AnyObject__ -_TWaOC10SwiftForms17FormRowDescriptor7RowTypes9_HashableS_ -_TWaOC10SwiftForms17FormRowDescriptor7RowTypes8HashableS_ -_TWaOC10SwiftForms17FormRowDescriptor7RowTypes9EquatableS_ -value.didset -value.willset -configuration.materialize -configuration.set -configuration.get -type.get -tag.get -value.get -userInfo.materialize -userInfo.set -userInfo.get -date.materialize -date.set -date.get -stepper.materialize -stepper.set -stepper.get -button.materialize -button.set -button.get -selection.materialize -selection.set -selection.get -cell.materialize -cell.set -cell.get -dateFormatter.materialize -dateFormatter.set -dateFormatter.get -continuous.materialize -continuous.set -continuous.get -steps.materialize -steps.set -steps.get -minimumValue.materialize -minimumValue.set -minimumValue.get -maximumValue.materialize -maximumValue.set -maximumValue.get -didSelectClosure.materialize -didSelectClosure.set -didSelectClosure.get -allowsMultipleSelection.materialize -allowsMultipleSelection.set -allowsMultipleSelection.get -optionTitleClosure.materialize -optionTitleClosure.set -optionTitleClosure.get -options.materialize -options.set -options.get -controllerClass.materialize -controllerClass.set -controllerClass.get -visualConstraintsClosure.materialize -visualConstraintsClosure.set -visualConstraintsClosure.get -didUpdateClosure.materialize -didUpdateClosure.set -didUpdateClosure.get -willUpdateClosure.materialize -willUpdateClosure.set -willUpdateClosure.get -required.materialize -required.set -required.get -showsInputToolbar.materialize -showsInputToolbar.set -showsInputToolbar.get -placeholder.materialize -placeholder.set -placeholder.get -appearance.materialize -appearance.set -appearance.get -cellClass.materialize -cellClass.set -cellClass.get -/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/DerivedSources/SwiftForms_vers.c -__ZL15__ARCLite__loadv -__ZL58__arclite_NSMutableDictionary__setObject_forKeyedSubscriptP19NSMutableDictionaryP13objc_selectorP11objc_objectS4_ -__ZL22add_image_hook_swiftV1PK11mach_headerl -__ZL42__arclite_NSUndoManagerProxy_isKindOfClassP11objc_objectP13objc_selectorP10objc_class -__ZL13replaceMethodP10objc_classP13objc_selectorPFP11objc_objectS4_S2_zEPS6_ -__ZL30__arclite_NSManagedObject_initP11objc_objectP13objc_selector -__ZL41__arclite_NSManagedObject_allocWithEntityP11objc_objectP13objc_selectorS0_ -__ZL36__arclite_NSManagedObject_allocBatchP11objc_objectP13objc_selectorPS0_S0_j -__ZL37__arclite_NSKKMS_fastIndexForKnownKeyP11objc_objectP13objc_selectorS0_ -__ZL28__arclite_NSKKMS_indexForKeyP11objc_objectP13objc_selectorS0_ -__ZL29__arclite_NSKKsD_objectForKeyP11objc_objectP13objc_selectorS0_ -__ZL35__arclite_NSKKsD_removeObjectForKeyP11objc_objectP13objc_selectorS0_ -__ZL33__arclite_NSKKsD_setObject_forKeyP11objc_objectP13objc_selectorS0_S0_ -__ZL41__arclite_NSKKsD_addEntriesFromDictionaryP11objc_objectP13objc_selectorP12NSDictionary -__ZL28__arclite_objc_readClassPairP10objc_classPK15objc_image_info -__ZL32__arclite_objc_allocateClassPairP10objc_classPKcm -__ZL32__arclite_object_getIndexedIvarsP11objc_object -__ZL23__arclite_objc_getClassPKc -__ZL27__arclite_objc_getMetaClassPKc -__ZL31__arclite_objc_getRequiredClassPKc -__ZL26__arclite_objc_lookUpClassPKc -__ZL26__arclite_objc_getProtocolPKc -__ZL23__arclite_class_getNameP10objc_class -__ZL26__arclite_protocol_getNameP8Protocol -__ZL37__arclite_objc_copyClassNamesForImagePKcPj -__ZL17transcribeMethodsP10objc_classP15glue_class_ro_t -__ZL19transcribeProtocolsP10objc_classP15glue_class_ro_t -__ZL20transcribePropertiesP10objc_classP15glue_class_ro_t -__ZL14initialize_impP11objc_objectP13objc_selector -__ZL18allocateMaybeSwiftP18glue_swift_class_tm -__ZL22copySwiftV1MangledNamePKcb -__ZL13demangledNamePKcb -__ZL16scanMangledFieldRPKcS0_S1_Ri -__ZL30arclite_uninitialized_functionv -__ZL12cxxConstructP11objc_object -__ZL20fixStringForCoreDataP11objc_object -_OBJC_METACLASS_$___ARCLite__ -__ZL24OBJC_CLASS_$___ARCLite__ -__ZL31OBJC_METACLASS_RO_$___ARCLite__ -__non_lazy_classes -__ZL27OBJC_CLASS_RO_$___ARCLite__ -__ZL11_class_name -__ZL32OBJC_$_CLASS_METHODS___ARCLite__ -__ZL17_load_method_name -__ZL17_load_method_type -l_OBJC_PROTOCOL_$___ARCLiteKeyedSubscripting__ -l_OBJC_LABEL_PROTOCOL_$___ARCLiteKeyedSubscripting__ -l_OBJC_PROTOCOL_REFERENCE_$___ARCLiteKeyedSubscripting__ -__ZL30NSUndoManagerProxy_targetClass -__ZL29original_NSManagedObject_init -__ZL40original_NSManagedObject_allocWithEntity -__ZL35original_NSManagedObject_allocBatch -__ZL25NSMutableDictionary_class -__ZL22NSConstantString_class -__ZL14NSString_class -__ZL36original_NSKKMS_fastIndexForKnownKey -__ZL27original_NSKKMS_indexForKey -__ZL28original_NSKKsD_objectForKey -__ZL34original_NSKKsD_removeObjectForKey -__ZL32original_NSKKsD_setObject_forKey -__ZL40original_NSKKsD_addEntriesFromDictionary -__ZZL22add_image_hook_swiftV1PK11mach_headerlE7patches -__ZGVZL22add_image_hook_swiftV1PK11mach_headerlE7patches -__ZL31original_objc_allocateClassPair -__ZL31original_object_getIndexedIvars -__ZL22original_objc_getClass -__ZL26original_objc_getMetaClass -__ZL30original_objc_getRequiredClass -__ZL25original_objc_lookUpClass -__ZL25original_objc_getProtocol -__ZL22original_class_getName -__ZL25original_protocol_getName -__ZL36original_objc_copyClassNamesForImage -__ZL12demangleLock -__ZL9Demangled -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11 -Wno-trigraphs -fno-exceptions -fno-rtti -mpascal-strings -Os -Wno-missing-field-initializers -Wmissing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -Wno-c++11-extensions -D NDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.Internal.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -miphoneos-version-min=4.3 -g -fno-threadsafe-statics -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -fembed-bitcode=all -iquote /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/arclite_iphoneos-generated-files.hmap -I /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/arclite_iphoneos-own-target-headers.hmap -I /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/arclite_iphoneos-all-target-headers.hmap -iquote /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/arclite_iphoneos-project-headers.hmap -I /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/Symbols/BuiltProducts/include -I /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/DerivedSources/arm64 -I /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/DerivedSources -F/Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/Symbols/BuiltProducts -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.Internal.sdk/System/Library/PrivateFrameworks -Wall -Wextra -Wno-gcc-compat -Wno-error=incomplete-umbrella -Wno-error=incomplete-umbrella -MMD -MT dependencies -MF /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/Objects-normal/arm64/arclite.d --serialize-diagnostics /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/Objects-normal/arm64/arclite.dia -c /Library/Caches/com.apple.xbs/Sources/arclite_iOS/arclite-66/source/arclite.mm -o /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/Objects-normal/arm64/arclite.o -mlinker-version=278.4 -/Library/Caches/com.apple.xbs/Sources/arclite_iOS/arclite-66/source/arclite.mm -/Library/Caches/com.apple.xbs/Sources/arclite_iOS/arclite-66 -fixStringForCoreData -cxxConstruct -arclite_uninitialized_function -scanMangledField -isdigit -/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.Internal.sdk/usr/include/ctype.h -__isctype -demangledName -copySwiftV1DemangledName -copySwiftV1MangledName -allocateMaybeSwift -word_align -isSwift -initialize_imp -transcribeProperties -property_list_nth -transcribeProtocols -transcribeMethods -data -method_list_nth -__arclite_objc_copyClassNamesForImage -__arclite_protocol_getName -__arclite_class_getName -__arclite_objc_getProtocol -__arclite_objc_lookUpClass -__arclite_objc_getRequiredClass -__arclite_objc_getMetaClass -__arclite_objc_getClass -__arclite_object_getIndexedIvars -__arclite_objc_allocateClassPair -metaclass -__arclite_objc_readClassPair -transcribeIvars -ivar_list_nth -max -alignment -ro -fastFlags -__arclite_NSKKsD_addEntriesFromDictionary -__arclite_NSKKsD_setObject_forKey -__arclite_NSKKsD_removeObjectForKey -__arclite_NSKKsD_objectForKey -__arclite_NSKKMS_indexForKey -__arclite_NSKKMS_fastIndexForKnownKey -__arclite_NSManagedObject_allocBatch -__arclite_NSManagedObject_allocWithEntity -__arclite_NSManagedObject_init -replaceMethod -__arclite_NSUndoManagerProxy_isKindOfClass -add_image_hook_swiftV1 -patch_lazy_pointers -patch_t -patch_t -patch_t -patch_t -patch_t -patch_t -patch_t -patch_t -__arclite_NSMutableDictionary__setObject_forKeyedSubscript -__ARCLite__load -install_swiftV1 -install_dict_nil_value -addOrReplaceMethod -keyedGetter diff --git a/Old My Mind/Carthage/Build/iOS/85DD66AC-AD94-3DF6-B342-7073A4D87D71.bcsymbolmap b/Old My Mind/Carthage/Build/iOS/85DD66AC-AD94-3DF6-B342-7073A4D87D71.bcsymbolmap deleted file mode 100755 index 67e2662..0000000 --- a/Old My Mind/Carthage/Build/iOS/85DD66AC-AD94-3DF6-B342-7073A4D87D71.bcsymbolmap +++ /dev/null @@ -1,1985 +0,0 @@ -BCSymbolMap Version: 2.0 -__T0SqWy.3 -_swift_rt_swift_retain -_swift_rt_swift_release -__T0SqWe.11 -__T0SqWe.19 -__TTWOSC28UITableViewCellAccessoryTypes9Equatable5UIKitZFS0_oi2eefTxx_Sb -__TTWOSC28UITableViewCellAccessoryTypes16RawRepresentable5UIKitFS0_CfT8rawValuewx8RawValue_GSqx_ -__TTWOSC28UITableViewCellAccessoryTypes16RawRepresentable5UIKitFS0_g8rawValuewx8RawValue -__TTWVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKitFS0_19_bridgeToObjectiveCfT_wx15_ObjectiveCType -__TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_19_bridgeToObjectiveCfT_WxS0_15_ObjectiveCType_ -__TTWVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKitZFS0_26_forceBridgeFromObjectiveCfTwx15_ObjectiveCType6resultRGSqx__T_ -__TTWVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKitZFS0_34_conditionallyBridgeFromObjectiveCfTwx15_ObjectiveCType6resultRGSqx__Sb -__TTWVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKitZFS0_36_unconditionallyBridgeFromObjectiveCfGSqwx15_ObjectiveCType_x -__TTWVSC15UIFontTextStyles16RawRepresentable5UIKitFS0_CfT8rawValuewx8RawValue_GSqx_ -__TTWVSC15UIFontTextStyles16RawRepresentable5UIKitFS0_g8rawValuewx8RawValue -__TTSgq5GVs16IndexingIteratorGSRVs5UInt8__GS_GSRS0___s16IteratorProtocols___TFVs4UTF86decodeuRxs16IteratorProtocolwx7ElementzVs5UInt8rfRxOs21UnicodeDecodingResult -__TTSfq4n_n_n_d___TFVs13_StringBufferCfT8capacitySi11initialSizeSi12elementWidthSi_S_ -__TTSfq4d___TTSgq5Vs18_StringBufferIVars_Vs6UInt16___TZFVs11_HeapBuffer14_elementOffsetfT_Si -__TTSfq4n_d___TZFVs4UTF810_decodeOnefVs6UInt32T6resultGSqS0__6lengthVs5UInt8_ -__TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -__TTSg5P__SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -__TTSfq4n_d___TFVs6MirrorCfT10reflectingP__S_ -__TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_L_13printTypeNameu0_R_S_rfPMP_T_ -__TTSfq4gs_d___TFVs9CharacterCfSSS_ -__TTSfq4n_d___TFSSCfVs9CharacterSS -__TTSfq4s_d_n_n_d___TTSgq5VVs9Character10_SmallUTF8S0_s10Collections_Vs4UTF8S2_s12UnicodeCodecs___TZFVs13_StringBuffer13fromCodeUnitsu0_Rxs10Collection_s12UnicodeCodecw_8CodeUnitzWx8Iterator7Element_rfTx8encodingMq_24repairIllFormedSequencesSb15minimumCapacitySi_TGSqS__8hadErrorSb_ -__TTSfq4n_d_n_d___TTSgq5VVVs9Character10_SmallUTF88IteratorS1_s16IteratorProtocols_Vs4UTF8S3_s12UnicodeCodecs___TZFVs5UTF1616transcodedLengthu0_Rxs16IteratorProtocol_s12UnicodeCodecw_8CodeUnitzwx7ElementrfT2ofx9decodedAsMq_27repairingIllFormedSequencesSb_GSqT5countSi7isASCIISb__ -__TTSg5O10SwiftForms13FormErrorTypeS0_s8HashableS____TFVs11AnyHashableCuRxs8HashablerfxS_ -__TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS____TFVs11AnyHashableCuRxs8HashablerfxS_ -__TMaCSo8NSString -_swift_rt_swift_getInitializedObjCClass -___swift_noop_void_return -___swift_memcpy4_4 -___swift_noop_self_return -___swift_memcpy_array4_4 -___swift_memmove_array4_4 -__TwugOSC28UITableViewCellAccessoryType -__TwupOSC28UITableViewCellAccessoryType -__TwuiOSC28UITableViewCellAccessoryType -__TwXXVSC15UIFontTextStyle -__TwCPVSC15UIFontTextStyle -__TwcpVSC15UIFontTextStyle -__TwcaVSC15UIFontTextStyle -__TwtaVSC15UIFontTextStyle -__TwXxVSC15UIFontTextStyle -__TwCcVSC15UIFontTextStyle -__TwxgVSC15UIFontTextStyle -_swift_rt_swift_slowAlloc -_swift_rt_swift_slowDealloc -__TTSf4s_n___TTSg5SS_SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -__TTSf4n_gs_n_n___TTSg5P__SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -__TTSf4n_gs_n_n___TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -__TTSf4g_n_d___TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_26_forceBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__T_ -__TTSf4g_n_d___TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_34_conditionallyBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__Sb -__TMaPs35_HasCustomAnyHashableRepresentation_ -_swift_rt_swift_getExistentialTypeMetadata -_swift_rt_swift_dynamicCast -__TMaGVs20_ConcreteHashableBoxSi_ -__TMaMO10SwiftForms13FormErrorType -__TMaPs28CustomDebugStringConvertible_ -__TMaPs23CustomStringConvertible_ -__TMaPs20TextOutputStreamable_ -__TMaGCs17_AnyCollectionBoxT5labelGSqSS_5valueP___ -__TMaGCs19_AnyIteratorBoxBaseT5labelGSqSS_5valueP___ -__TMaGCs17_AnyCollectionBoxT5labelGSqSS_5valueP____merged -__swift_dead_method_stub -__TwCpVSC15UIFontTextStyle -__TTSg5P__SSSSs16TextOutputStreams___TFFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_L_13printTypeNameu0_R_S_rfPMP_T_ -__TwxsVSC15UIFontTextStyle -__TwxxVSC15UIFontTextStyle -_swift_rt_swift_release_n -_globalinit_33_A98A5792941355E0FC6070FE05AD0013_token0 -_globalinit_33_A98A5792941355E0FC6070FE05AD0013_token1 -_globalinit_33_A98A5792941355E0FC6070FE05AD0013_token2 -__TWPOSC28UITableViewCellAccessoryTypes9Equatable5UIKit -__TWPOSC28UITableViewCellAccessoryTypes16RawRepresentable5UIKit -__TWPVSC15UIFontTextStyles16RawRepresentable5UIKit -__TMLCSo8NSString -__TWPVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKit -__TWPVSC15UIFontTextStyles20_SwiftNewtypeWrapper5UIKit -__TMRfP10SwiftForms12FormSelector_ -l_OBJC_LABEL_PROTOCOL_$__TtP10SwiftForms12FormSelector_ -l_OBJC_PROTOCOL_REFERENCE_$__TtP10SwiftForms12FormSelector_ -__swift_FORCE_LOAD_$_swiftUIKit_$_SwiftForms -__swift_FORCE_LOAD_$_swiftCoreImage_$_SwiftForms -__swift_FORCE_LOAD_$_swiftDarwin_$_SwiftForms -__swift_FORCE_LOAD_$_swiftCoreGraphics_$_SwiftForms -__swift_FORCE_LOAD_$_swiftDispatch_$_SwiftForms -__swift_FORCE_LOAD_$_swiftObjectiveC_$_SwiftForms -__swift_FORCE_LOAD_$_swiftFoundation_$_SwiftForms -__swift_FORCE_LOAD_$_swiftQuartzCore_$_SwiftForms -__TWVOSC28UITableViewCellAccessoryType -__TMnOSC28UITableViewCellAccessoryType -__TMOSC28UITableViewCellAccessoryType -__TMRaOSC28UITableViewCellAccessoryTypes16RawRepresentable5UIKit -__TMRaVSC15UIFontTextStyles16RawRepresentable5UIKit -__TWVVSC15UIFontTextStyle -__TMnVSC15UIFontTextStyle -__TMVSC15UIFontTextStyle -__TMRaVSC15UIFontTextStyles21_ObjectiveCBridgeable5UIKit -___swift_reflection_version -__TMRfCSo8NSString -__TMRsCSo8NSString -__TMLPs35_HasCustomAnyHashableRepresentation_ -__TMLGVs20_ConcreteHashableBoxSi_ -__TMLMO10SwiftForms13FormErrorType -__TMLPs28CustomDebugStringConvertible_ -__TMLPs23CustomStringConvertible_ -__TMLPs20TextOutputStreamable_ -__TMLGCs17_AnyCollectionBoxT5labelGSqSS_5valueP___ -__TMLT5labelGSqSS_5valueP__ -__TMLGSqSS_ -__TMLP_ -__TMLGCs19_AnyIteratorBoxBaseT5labelGSqSS_5valueP___ -l_OBJC_LABEL_PROTOCOL_$__TtPs9AnyObject_ -l_OBJC_PROTOCOL_REFERENCE_$__TtPs9AnyObject_ -__TMLPMP_ -__TMLPs17CustomReflectable_ -l_OBJC_LABEL_PROTOCOL_$_NSObject -l_OBJC_PROTOCOL_REFERENCE_$_NSObject -Apple LLVM version 8.1.0 (clang-802.0.41) --emit-bc "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormSelector.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormTitleCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSliderCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormSectionDescriptor.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormDescriptor.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormBaseCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormLabelCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextViewCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/FormErrorType.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormViewController.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormButtonCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormStepperCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSelectorCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSwitchCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormCheckCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormValueCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSegmentedControlCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextFieldCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormPickerCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormOptionsViewController.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormDateCell.swift" "/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormRowDescriptor.swift" -target armv7-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -I /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Products/Release-iphoneos -F /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Products/Release-iphoneos -g -import-underlying-module -module-cache-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/ModuleCache -serialize-debugging-options -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/SwiftForms-generated-files.hmap -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/SwiftForms-own-target-headers.hmap -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/SwiftForms-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/SwiftForms-project-headers.hmap -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Products/Release-iphoneos/include -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/DerivedSources/armv7 -Xcc -I/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/DerivedSources -Xcc -ivfsoverlay -Xcc /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/unextended-module-overlay.yaml -Xcc "-working-directory/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms" -emit-module-doc-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/SwiftForms.swiftdoc -serialize-diagnostics-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormSelector.dia -O -module-name SwiftForms -emit-module-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/SwiftForms.swiftmodule -emit-objc-header-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/SwiftForms-Swift.h -emit-dependencies-path /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormSelector.d -num-threads 4 -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormSelector.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormTitleCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormSliderCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormSectionDescriptor.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormDescriptor.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormBaseCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormLabelCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormTextViewCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormErrorType.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormViewController.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormButtonCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormStepperCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormSelectorCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormSwitchCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormCheckCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormValueCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormSegmentedControlCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormTextFieldCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormPickerCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormOptionsViewController.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormDateCell.bc -o /Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/Objects-normal/armv7/FormRowDescriptor.bc -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift - -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms -Apple Swift version 3.1 (swiftlang-802.0.51 clang-802.0.41) -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormSelector.swift -_TMaGCs17_AnyCollectionBoxT5labelGSqSS_5valueP___ -FormSelector.swift -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers -_TMaT5labelGSqSS_5valueP__ -_TMaP_ -_TMaGSqSS_ -_TMaPs20TextOutputStreamable_ -_TMaPs23CustomStringConvertible_ -_TMaPs28CustomDebugStringConvertible_ -_TMaMO10SwiftForms13FormErrorType -_TMaGVs20_ConcreteHashableBoxSi_ -_TMaPs35_HasCustomAnyHashableRepresentation_ -_TTSf4g_n_d___TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_34_conditionallyBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__Sb -_TTSg5SS_VSC15UIFontTextStyle___TFSq7flatMapurfzFzxGSqqd___GSqqd___ -_TTSr5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_34_conditionallyBridgeFromObjectiveCFTWxS0_15_ObjectiveCType_6resultRGSqx__SbU_FwxS0_GSqx_ -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_34_conditionallyBridgeFromObjectiveCFTWxS0_15_ObjectiveCType_6resultRGSqx__SbU_FwxS0_GSqx_ -init -_TTSf4g_n_d___TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_26_forceBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__T_ -_TTSr5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_26_forceBridgeFromObjectiveCFTWxS0_15_ObjectiveCType_6resultRGSqx__T_U_FwxS0_GSqx_ -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_26_forceBridgeFromObjectiveCFTWxS0_15_ObjectiveCType_6resultRGSqx__T_U_FwxS0_GSqx_ -_TTSf4n_gs_n_n___TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -_TTSfq4s_s___TFVs11_StringCoreg9subscriptFGVs5RangeSi_S_ -_TTSfq4n_n_d___TTSgq5Vs5UInt8___TFSRCfT5startGSqGSPx__5countSi_GSRx_ -_TTWSSs16TextOutputStreamsFS_5writefSST_ -_TTSg5SS_SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -_TTSf4n_gs_n_n___TTSg5P__SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -_TMaPMP_ -_TTSf4s_n___TTSg5SS_SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -_TTSg5SSSSs16TextOutputStreams___TFSS5writeuRxs16TextOutputStreamrfT2toRx_T_ -get_field_types_UIFontTextStyle -_TMaCSo8NSString -_TwxgVSC15UIFontTextStyle -_TwCcVSC15UIFontTextStyle -_TwXxVSC15UIFontTextStyle -_TwtaVSC15UIFontTextStyle -_TwcaVSC15UIFontTextStyle -_TwcpVSC15UIFontTextStyle -_TwCPVSC15UIFontTextStyle -_TwXXVSC15UIFontTextStyle -get_field_types_UITableViewCellAccessoryType -_TwuiOSC28UITableViewCellAccessoryType -_TwupOSC28UITableViewCellAccessoryType -_TwugOSC28UITableViewCellAccessoryType -__swift_memmove_array4_4 -__swift_memcpy_array4_4 -__swift_noop_self_return -__swift_memcpy4_4 -__swift_noop_void_return -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS____TFVs11AnyHashableCuRxs8HashablerfxS_ -_TTSg5O10SwiftForms13FormErrorTypeS0_s8HashableS____TFVs11AnyHashableCuRxs8HashablerfxS_ -_TTSfq4n_d_n_d___TTSgq5VVVs9Character10_SmallUTF88IteratorS1_s16IteratorProtocols_Vs4UTF8S3_s12UnicodeCodecs___TZFVs5UTF1616transcodedLengthu0_Rxs16IteratorProtocol_s12UnicodeCodecw_8CodeUnitzwx7ElementrfT2ofx9decodedAsMq_27repairingIllFormedSequencesSb_GSqT5countSi7isASCIISb__ -_TTSfq4s_d_n_n_d___TTSgq5VVs9Character10_SmallUTF8S0_s10Collections_Vs4UTF8S2_s12UnicodeCodecs___TZFVs13_StringBuffer13fromCodeUnitsu0_Rxs10Collection_s12UnicodeCodecw_8CodeUnitzWx8Iterator7Element_rfTx8encodingMq_24repairIllFormedSequencesSb15minimumCapacitySi_TGSqS__8hadErrorSb_ -_TTSfq4n_d___TFSSCfVs9CharacterSS -_TTSfq4gs_d___TFVs9CharacterCfSSS_ -_TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_L_13printTypeNameu0_R_S_rfPMP_T_ -_TTSfq4n_d___TFVs6MirrorCfT10reflectingP__S_ -_TMaPs17CustomReflectable_ -_TTSg5P__SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -_TTSg5P__SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -_TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFs20_debugPrint_unlockedu0_R_s16TextOutputStreamrFTxRq__T_ -_TTSg5MO10SwiftForms13FormErrorType_SSSSs16TextOutputStreams___TFs20_adHocPrint_unlockedu0_R_s16TextOutputStreamrFTxVs6MirrorRq_12isDebugPrintSb_T_ -rawValue.get -_TTSg5SSSSs21_ObjectiveCBridgeable10Foundation___forceBridgeFromObjectiveC_bridgeable -_unconditionallyBridgeFromObjectiveC -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_36_unconditionallyBridgeFromObjectiveCfGSqWxS0_15_ObjectiveCType__x -_conditionallyBridgeFromObjectiveC -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_34_conditionallyBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__Sb -_forceBridgeFromObjectiveC -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TZFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_26_forceBridgeFromObjectiveCfTWxS0_15_ObjectiveCType_6resultRGSqx__T_ -_TTSg5VSC15UIFontTextStyleS_s20_SwiftNewtypeWrapper5UIKit___TFesRxs20_SwiftNewtypeWrapperwx8RawValues21_ObjectiveCBridgeablerS_19_bridgeToObjectiveCfT_WxS0_15_ObjectiveCType_ -_bridgeToObjectiveC -== -_TTSg5OSC28UITableViewCellAccessoryTypeS_s16RawRepresentable5UIKit___TFsoi2eeuRxs16RawRepresentablewx8RawValues9EquatablerFTxx_Sb -_TTWSis9EquatablesZFS_oi2eefTxx_Sb -value.materialize -_toAnyHashable -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS____TFEsPs8Hashable14_toAnyHashablefT_Vs11AnyHashable -hashValue.get -_TTSg5O10SwiftForms13FormErrorTypeS0_s8HashableS____TFEsPs8Hashable14_toAnyHashablefT_Vs11AnyHashable -_getEmbeddedNSError -_userInfo.get -_TTSg5O10SwiftForms13FormErrorTypeS0_s5ErrorS____TFEsPs5Errorg9_userInfoGSqPs9AnyObject__ -_code.get -_TTSg5O10SwiftForms13FormErrorTypeS0_s5ErrorS____TFEsPs5Errorg5_codeSi -_domain.get -_TTSg5O10SwiftForms13FormErrorTypeS0_s5ErrorS____TFEsPs5Errorg7_domainSS -_TTSg5MO10SwiftForms13FormErrorType___TFSSCurfT10reflectingx_SS -formViewController.materialize -rowDescriptor.materialize -rowDescriptor.set -rowDescriptor.didset -__TToFC10SwiftForms13FormTitleCellg10titleLabelCSo7UILabel -__TMaCSo7UILabel -__TFs27_bridgeAnythingToObjectiveCurFxPs9AnyObject_ -__TToFC10SwiftForms13FormTitleCell9configurefT_T_ -__TMaGCs23_ContiguousArrayStorageTSSCSo6UIView__ -__TToFC10SwiftForms13FormTitleCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms13FormTitleCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms13FormTitleCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms13FormTitleCellcfT5coderCSo7NSCoder_GSqS0__ -__TTSf4g_d___TTSg5SSSSs8Hashables_CSo6UIView___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_swift_rt_swift_allocObject -__TMLCSo7UILabel -__TMLCSo6UIView -__TMLGCs23_ContiguousArrayStorageTSSCSo6UIView__ -__TMLTSSCSo6UIView_ -__TMLGCs23_ContiguousArrayStorageSS_ -__TWvdvC10SwiftForms12FormBaseCellP33_94960B1EEBF3E30EC85548629F87883B17customConstraintsGSaCSo18NSLayoutConstraint_ -__TMfC10SwiftForms13FormTitleCell -__TMRfC10SwiftForms13FormTitleCell -__TMRsC10SwiftForms13FormTitleCell -__TMRfCSo7UILabel -__TMRsCSo7UILabel -_objc_classes -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormTitleCell.swift -get_field_types_FormTitleCell -FormTitleCell.swift -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base -_TTSg5CSo18NSLayoutConstraint___TFs27_allocateUninitializedArrayurFBwTGSax_Bp_ -_TMaC10SwiftForms13FormTitleCell -defaultVisualConstraints -_TTSg5SS___TFs27_allocateUninitializedArrayurFBwTGSax_Bp_ -_TTSg5SS___TZFSa13_adoptStoragefTGCs23_ContiguousArrayStoragex_5countSi_TGSax_GSpx__ -_TTSg5SS___TFVs22_ContiguousArrayBufferCfT5countSi7storageGCs23_ContiguousArrayStoragex__GS_x_ -_TTSg5SS___TFVs22_ContiguousArrayBuffer18_initStorageHeaderfT5countSi8capacitySi_T_ -_TTSg5SS___TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TMaGCs23_ContiguousArrayStorageSS_ -deinit -constraintsViews -_TMaCSo6UIView -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10DictionaryCft17dictionaryLiteralGSaTxq____GS_xq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10DictionaryCfT13_nativeBufferGVs23_NativeDictionaryBufferxq___GS_xq__ -_TTSg5TSSCSo6UIView____TFCs23_ContiguousArrayStorageD -_TTSg5TSSCSo6UIView____TFCs23_ContiguousArrayStoraged -_TTSg5TSSCSo6UIView____TFSp12deinitializefT5countSi_Sv -_TTSg5TSSCSo6UIView____TFCs23_ContiguousArrayStorageg15_elementPointerGSpx_ -_TTSg5SSSSs8Hashables_CSo6UIView___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TTSg5TSSCSo6UIView____TFs27_allocateUninitializedArrayurFBwTGSax_Bp_ -_TTSg5TSSCSo6UIView____TZFSa13_adoptStoragefTGCs23_ContiguousArrayStoragex_5countSi_TGSax_GSpx__ -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBufferCfT5countSi7storageGCs23_ContiguousArrayStoragex__GS_x_ -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBuffer18_initStorageHeaderfT5countSi8capacitySi_T_ -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TMaGCs23_ContiguousArrayStorageTSSCSo6UIView__ -_TMaTSSCSo6UIView_ -configure -_TMaCSo7UILabel -titleLabel.get -_TToFC10SwiftForms13FormTitleCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms14FormSliderCellg10sliderViewCSo8UISlider -__TMaCSo8UISlider -__TToFC10SwiftForms14FormSliderCell9configurefT_T_ -__TToFC10SwiftForms14FormSliderCell6updatefT_T_ -__TToFC10SwiftForms14FormSliderCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms14FormSliderCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms14FormSliderCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms14FormSliderCellcfT5coderCSo7NSCoder_GSqS0__ -__TTSg5SS___TFSa16_copyToNewBufferfT8oldCountSi_T_ -__TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -__TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols_GVs14_IgnorePointerSS_GS1_SS_s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_swift_rt_swift_isUniquelyReferenced_nonNull_native -__TMLCSo8UISlider -__TMLPs9AnyObject_ -__TWoFC10SwiftForms14FormSliderCell12valueChangedfCSo8UISliderT_ -__TMfC10SwiftForms14FormSliderCell -__TMRfC10SwiftForms14FormSliderCell -__TMRsC10SwiftForms14FormSliderCell -__TMRfCSo8UISlider -__TMRsCSo8UISlider -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSliderCell.swift -get_field_types_FormSliderCell -FormSliderCell.swift -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells -_TMaC10SwiftForms14FormSliderCell -_TTSg5SS___TFSa6appendfxT_ -_TTSg5SS___TFSa36_reserveCapacityAssumingUniqueBufferfT8oldCountSi_T_ -_TTSg5SS___TFSa37_appendElementAssumeUniqueAndCapacityfTSi10newElementx_T_ -_TTSg5SS___TFSp10initializefT2tox5countSi_T_ -_TTSg5SS___TFVs12_ArrayBufferg19firstElementAddressGSpx_ -_TTSg5SS___TFVs12_ArrayBuffers5countSi -_TTSg5SS___TFVs22_ContiguousArrayBuffers5countSi -_TTSg5SS___TFVs12_ArrayBufferg8capacitySi -_TTSg5SS___TFVs22_ContiguousArrayBufferg8capacitySi -_TTSg5SS___TFSa9_getCountfT_Si -_TTSg5SS___TFVs12_ArrayBufferg5countSi -_TTSg5SS___TFVs22_ContiguousArrayBufferg5countSi -_TTSg5SS___TFSa40_makeUniqueAndReserveCapacityIfNotUniquefT_T_ -_TTSg5SS___TFVs12_ArrayBuffer30isMutableAndUniquelyReferencedfT_Sb -_TTSg5SS___TFVs12_ArrayBuffer20isUniquelyReferencedfT_Sb -_TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols_GVs14_IgnorePointerSS_GS1_SS_s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpwx7Element__GSpwxS2__ -_TTSg5SS___TFVs12_ArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5SS___TFVs22_ContiguousArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5SS___TFSp10initializefT4fromGSPx_5countSi_T_ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8endIndexSi -_TTSg5SS___TFVs12_ArrayBufferg8endIndexSi -_TTSg5SS___TFSp12deinitializefT5countSi_Sv -_TTSg5SS___TFSp14moveInitializefT4fromGSpx_5countSi_T_ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g19firstElementAddressGSpwx7Element_ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferwx7Element__ -_TTSg5SS___TFVs12_ArrayBuffer33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferx__ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g5countSi -_TTSg5SS___TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol35_forceCreateUniqueMutableBufferImplfT14countForBufferSi14minNewCapacitySi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5SS___TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -_TTSg5SS___TFVs22_ContiguousArrayBufferCfT_GS_x_ -_TTSg5SS___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8capacitySi -_TTSg5SS___TFSa16_copyToNewBufferfT8oldCountSi_T_ -_TTSg5GVs12_ArrayBufferSS_GS_SS_s20_ArrayBufferProtocols_GVs14_IgnorePointerSS_GS1_SS_s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -valueChanged -rowDescriptor.get -value.set -update -_TMaPs9AnyObject_ -_TMaCSo8UISlider -sliderView.get -_TToFC10SwiftForms14FormSliderCellg10sliderViewCSo8UISlider -__TMfC10SwiftForms21FormSectionDescriptor -__TMRfC10SwiftForms21FormSectionDescriptor -__TMRfCSo6UIView -__TMRsCSo6UIView -__TMLGSaC10SwiftForms17FormRowDescriptor_ -__TMLGSqCSo6UIView_ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormSectionDescriptor.swift -get_field_types_FormSectionDescriptor -FormSectionDescriptor.swift -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors -_TMaGSqCSo6UIView_ -_TMaGSaC10SwiftForms17FormRowDescriptor_ -footerViewHeight.materialize -footerViewHeight.set -footerViewHeight.get -headerViewHeight.materialize -headerViewHeight.set -headerViewHeight.get -footerView.materialize -footerView.set -footerView.get -headerView.materialize -headerView.set -headerView.get -footerTitle.materialize -footerTitle.set -footerTitle.get -headerTitle.materialize -headerTitle.set -headerTitle.get -rows.materialize -rows.set -rows.get -_TMaC10SwiftForms21FormSectionDescriptor -__T0s24_VariantDictionaryBufferOWy -__T0s24_VariantDictionaryBufferOWy.1 -__TFCs24_CocoaDictionaryIterator4nextfT_GSqTPs9AnyObject_PS0____ -__TTSg5C10SwiftForms21FormSectionDescriptor___TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -__TFs17_squeezeHashValueFTSiSi_Si -__TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -__TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -__TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -__TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject__merged -__TTSgq5Su___TFSp10initializefT2tox5countSi_T_ -__TTSfq4s___TFSSg9hashValueSi -__TTSf4n_n_d___TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -__TTSf4g_d___TTSg5SSSSs8Hashables_Ps9AnyObject____TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -__TMaPs9AnyObject_ -__T0SqWy -__T0SqWe -__TTSf4n_s_n___TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -__TMaGCs37_HashableTypedNativeDictionaryStorageSSPs9AnyObject__ -_swift_rt_swift_dynamicCastClass -_swift_rt_swift_retain_n -__TMfC10SwiftForms14FormDescriptor -__TMRfC10SwiftForms14FormDescriptor -__TMLGSaC10SwiftForms21FormSectionDescriptor_ -__TMLGCs37_HashableTypedNativeDictionaryStorageSSPs9AnyObject__ -l_OBJC_LABEL_PROTOCOL_$__TtPs13_NSStringCore_ -l_OBJC_PROTOCOL_REFERENCE_$__TtPs13_NSStringCore_ -l_OBJC_LABEL_PROTOCOL_$__TtPs10_NSCopying_ -l_OBJC_PROTOCOL_REFERENCE_$__TtPs10_NSCopying_ -l_OBJC_LABEL_PROTOCOL_$__TtPs18_NSFastEnumeration_ -l_OBJC_PROTOCOL_REFERENCE_$__TtPs18_NSFastEnumeration_ -l_OBJC_LABEL_PROTOCOL_$__TtPs15_ShadowProtocol_ -l_OBJC_PROTOCOL_REFERENCE_$__TtPs15_ShadowProtocol_ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormDescriptor.swift -_TMaGCs37_HashableTypedNativeDictionaryStorageSSPs9AnyObject__ -FormDescriptor.swift -get_field_types_FormDescriptor -_TMaGSaC10SwiftForms21FormSectionDescriptor_ -_TTSf4n_s_n___TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer5_findfTx11startBucketSi_T3posGVs22_NativeDictionaryIndexxq__5foundSb_ -_TTWSSs9EquatablesZFS_oi2eefTxx_Sb -_TTSfq4gs_gs_d___TZFSSoi2eefTSSSS_Sb -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffers8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffers5countSi -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg5countSi -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBufferg8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSg5Ps9AnyObject____TFSp10initializefT2tox5countSi_T_ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg6valuesGSpq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg4keysGSpx_ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffer18isInitializedEntryfT2atSi_Sb -_TTSfq4n_s___TFVs13_UnsafeBitMapg9subscriptFSiSb -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer6_indexfT5afterSi_Si -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferg11_bucketMaskSi -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg8capacitySi -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffer3keyfT2atSi_x -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer7_bucketfxSi -_TTWSSs8HashablesFS_g9hashValueSi -_TTSf4g_d___TTSg5SSSSs8Hashables_Ps9AnyObject____TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TTSg5GSaTSSPs9AnyObject___GSaTSSPS____s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5TSSPs9AnyObject_____TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5TSSPs9AnyObject_____TFSa9formIndexfT5afterRSi_T_ -_TTSg5TSSPs9AnyObject_____TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5TSSPs9AnyObject_____TFSag9subscriptFSix -_TTSg5TSSPs9AnyObject_____TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5TSSPs9AnyObject_____TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5TSSPs9AnyObject_____TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT15minimumCapacitySi_GS0_xq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT8capacitySi_GS0_xq__ -_TTSg5TSSPs9AnyObject_____TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5TSSPs9AnyObject_____TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5TSSPs9AnyObject_____TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5TSSPs9AnyObject_____TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5TSSPs9AnyObject_____TFVs22_ContiguousArrayBufferg5countSi -_TTSfq4s___TFSSg9hashValueSi -_TFs17_squeezeHashValueFTSiSi_Si -_TTSg5TSSPs9AnyObject_____TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferCfT_GS_xq__ -_TTSg5GSaTSSPs9AnyObject___GSaTSSPS____s10Collections___TFEsPs10Collectiong7isEmptySb -_TTSg5TSSPs9AnyObject_____TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5TSSPs9AnyObject_____TFSag8endIndexSi -_TTSg5TSSPs9AnyObject_____TFSa9_getCountfT_Si -_TTSg5TSSPs9AnyObject_____TFVs12_ArrayBufferg5countSi -_TTSg5TSSPs9AnyObject_____TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSf4n_n_d___TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg40_initializedHashtableEntriesBitMapBufferGSpSu_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg10_nonNativePs12_NSArrayCore_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs22_ContiguousArrayBufferg5countSi -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg9_isNativeSb -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSf4gs_n_n___TTSg5SSSSs8Hashables_Ps9AnyObject____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSg5SS___TFs26_forceBridgeFromObjectiveCurFTPs9AnyObject_Mx_x -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer20isUniquelyReferencedfT_Sb -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs22_ContiguousArrayBufferg5countSi -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg20_isNativeTypeCheckedSb -sections.materialize -sections.set -sections.get -title.materialize -title.set -title.get -validateForm -_TTSg5GSaC10SwiftForms21FormSectionDescriptor_GSaS0__s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSag9subscriptFSix -_TTSg5GSaC10SwiftForms17FormRowDescriptor_GSaS0__s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5C10SwiftForms17FormRowDescriptor___TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFSa9formIndexfT5afterRSi_T_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSa9formIndexfT5afterRSi_T_ -_TTSg5C10SwiftForms17FormRowDescriptor___TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5C10SwiftForms17FormRowDescriptor___TFSag9subscriptFSix -_TTSg5C10SwiftForms17FormRowDescriptor___TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFSa29_hoistableIsNativeTypeCheckedfT_Sb -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg32arrayPropertyIsNativeTypeCheckedSb -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg20_isNativeTypeCheckedSb -_TTSg5C10SwiftForms17FormRowDescriptor___TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5C10SwiftForms17FormRowDescriptor___TFSag8endIndexSi -_TTSg5C10SwiftForms17FormRowDescriptor___TFSa9_getCountfT_Si -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBufferg5countSi -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSa29_hoistableIsNativeTypeCheckedfT_Sb -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg32arrayPropertyIsNativeTypeCheckedSb -_TTSg5C10SwiftForms21FormSectionDescriptor___TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSag8endIndexSi -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSa9_getCountfT_Si -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg5countSi -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg10_nonNativePs12_NSArrayCore_ -_TTSg5C10SwiftForms21FormSectionDescriptor___TFVs12_ArrayBufferg9_isNativeSb -formValues -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs10Dictionarys9subscriptFxGSqq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer11updateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s9EquatableS____TFsoi2neuRxs9EquatablerFTxx_Sb -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs10DictionaryCft17dictionaryLiteralGSaTxq____GS_xq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs10DictionaryCfT13_nativeBufferGVs23_NativeDictionaryBufferxq___GS_xq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TMaC10SwiftForms14FormDescriptor -__TToFC10SwiftForms12FormBaseCellg18formViewControllerXwGSqCS_18FormViewController_ -__TToFC10SwiftForms12FormBaseCells18formViewControllerXwGSqCS_18FormViewController_ -__TToFC10SwiftForms12FormBaseCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms12FormBaseCellcfT5coderCSo7NSCoder_GSqS0__ -__TToFC10SwiftForms12FormBaseCell9configurefT_T_ -__TToFC10SwiftForms12FormBaseCell6updatefT_T_ -__TToFC10SwiftForms12FormBaseCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms12FormBaseCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms12FormBaseCell21firstResponderElementfT_GSqCSo11UIResponder_ -__TToFC10SwiftForms12FormBaseCell17inputAccesoryViewfT_CSo9UIToolbar -__TToZFC10SwiftForms12FormBaseCell17formRowCellHeightfT_V12CoreGraphics7CGFloat -__TToZFC10SwiftForms12FormBaseCell30formRowCanBecomeFirstResponderfT_Sb -__TToZFC10SwiftForms12FormBaseCell18formViewControllerfTCS_18FormViewController12didSelectRowS0__T_ -__TToFC10SwiftForms12FormBaseCell17updateConstraintsfT_T_ -__TTSg5CSo18NSLayoutConstraint___TFSa16_copyToNewBufferfT8oldCountSi_T_ -__TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -__TFs25_isClassOrObjCExistentialurFMxSb -__TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffer5indexfT5afterGVs22_NativeDictionaryIndexxq___GS0_xq__ -__TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -__TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -__TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -__TTWSis9EquatablesZFS_oi2eefTxx_Sb -__TTSgq5GVs14CountableRangeSi_GS_Si_s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -__TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer18_typeCheckSlowPathfSiT_ -__TTSf4n_n_d___TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -__TTSf4n_n_d___TTSg5SS_P____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -__TTSf4s_n_n___TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -__TTSf4g___TTSg5SSSSs8Hashables_CSo6UIView_SSSSS_s_P____TFs17_dictionaryUpCastu2_Rxs8Hashable0_S_rFGVs10Dictionaryxq__GS0_q0_q1__ -__TTSf4n_n_d___TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -__TTSf4s_n_n___TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -__TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols_GVs14_IgnorePointerS0__GS2_S0__s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -__TMaCSo18NSLayoutConstraint -__TMaP_ -__TMaCSo6UIView -__T0s32DictionaryIteratorRepresentationOWy.10 -__TMaGCs37_HashableTypedNativeDictionaryStorageSSP__ -__TMaGCs37_HashableTypedNativeDictionaryStorageSSCSo6UIView_ -__TMLGCs23_ContiguousArrayStorageCSo15UIBarButtonItem_ -__TMLCSo15UIBarButtonItem -__TMLCSo18NSLayoutConstraint -__TWoFC10SwiftForms12FormBaseCellgP33_94960B1EEBF3E30EC85548629F87883B17customConstraintsGSaCSo18NSLayoutConstraint_ -__TWoFC10SwiftForms12FormBaseCellsP33_94960B1EEBF3E30EC85548629F87883B17customConstraintsGSaCSo18NSLayoutConstraint_ -__TWoFC10SwiftForms12FormBaseCellmP33_94960B1EEBF3E30EC85548629F87883B17customConstraintsGSaCSo18NSLayoutConstraint_ -__TWoFC10SwiftForms12FormBaseCell16handleDoneActionfCSo15UIBarButtonItemT_ -__TMfC10SwiftForms12FormBaseCell -__TMRfC10SwiftForms12FormBaseCell -__TMRsC10SwiftForms12FormBaseCell -__TMRfCSo18NSLayoutConstraint -__TMRsCSo18NSLayoutConstraint -__TMLGSqC10SwiftForms17FormRowDescriptor_ -__TMLGSqC10SwiftForms18FormViewController_ -__TMLGSaCSo18NSLayoutConstraint_ -__TMLGCs23_ContiguousArrayStorageCSo18NSLayoutConstraint_ -__TMLGCs37_HashableTypedNativeDictionaryStorageSSP__ -__TMLGCs37_HashableTypedNativeDictionaryStorageSSCSo6UIView_ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormBaseCell.swift -_TMaGCs37_HashableTypedNativeDictionaryStorageSSCSo6UIView_ -FormBaseCell.swift -_TMaGCs37_HashableTypedNativeDictionaryStorageSSP__ -get_field_types_FormBaseCell -_TMaGSaCSo18NSLayoutConstraint_ -_TMaGSqC10SwiftForms18FormViewController_ -_TMaGSqC10SwiftForms17FormRowDescriptor_ -formViewController.set -_TMaCSo18NSLayoutConstraint -_TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols_GVs14_IgnorePointerS0__GS2_S0__s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpwx7Element__GSpwxS2__ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8endIndexSi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg8endIndexSi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg5countSi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg10_nonNativePs12_NSArrayCore_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferg5countSi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg9_isNativeSb -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBuffers5countSi -_TTSg5CSo18NSLayoutConstraint___TFSp12deinitializefT5countSi_Sv -_TTSg5CSo18NSLayoutConstraint___TFSp14moveInitializefT4fromGSpx_5countSi_T_ -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g19firstElementAddressGSpwx7Element_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg19firstElementAddressGSpx_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferwx7Element__ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferx__ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferg8capacitySi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer20isUniquelyReferencedfT_Sb -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g5countSi -_TTSf4s_n_n___TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer10_typeCheckfGVs5RangeSi_T_ -_TTSgq5GVs14CountableRangeSi_GS_Si_s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSfq4n_s_n___TTSgq5GVs14CountableRangeSi_GS_Si_s10_Indexables___TFEsPs10_Indexable20_failEarlyRangeCheckfTwx5Index6boundsGVs5RangewxS0___T_ -_TTSg5CSo18NSLayoutConstraint___TFSp10initializefT2tox5countSi_T_ -_TTSf4g_n_n___TTSg5CSo18NSLayoutConstraint___TFSp10initializefT2tox5countSi_T_ -_TTSg5CSo18NSLayoutConstraint___TFSp10initializefT4fromGSPx_5countSi_T_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg21needsElementTypeCheckSb -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg20_isNativeTypeCheckedSb -_TTSf4n_n_d___TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBuffer18_initStorageHeaderfT5countSi8capacitySi_T_ -_TMaGCs23_ContiguousArrayStorageCSo18NSLayoutConstraint_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferCfT_GS_x_ -_TTSf4g___TTSg5SSSSs8Hashables_CSo6UIView_SSSSS_s_P____TFs17_dictionaryUpCastu2_Rxs8Hashable0_S_rFGVs10Dictionaryxq__GS0_q0_q1__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs18DictionaryIterator4nextfT_GSqT3keyx5valueq___ -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs18DictionaryIterator11_nativeNextfT_GSqT3keyx5valueq___ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffer12assertingGetfGVs22_NativeDictionaryIndexxq__T3keyx5valueq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffer18isInitializedEntryfT2atSi_Sb -_TTSg5SSSSs8Hashables_P____TFVs10DictionaryCfT15minimumCapacitySi_GS_xq__ -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT15minimumCapacitySi_GS0_xq__ -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT8capacitySi_GS0_xq__ -_TTSg5SS_CSo6UIView___TZFVs22_NativeDictionaryIndexoi2eefTGS_xq__GS_xq___Sb -_TTSg5SSSSs8Hashables_P____TFVs10Dictionarys9subscriptFxGSqq__ -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer11updateValuefTq_6forKeyx_GSqq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg6valuesGSpq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffer3keyfT2atSi_x -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg4keysGSpx_ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg8capacitySi -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10Dictionary12makeIteratorfT_GVs18DictionaryIteratorxq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer12makeIteratorfT_GVs18DictionaryIteratorxq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TZFVs18DictionaryIterator6_cocoafCs24_CocoaDictionaryIteratorGS_xq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg8endIndexGVs22_NativeDictionaryIndexxq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg10startIndexGVs22_NativeDictionaryIndexxq__ -_TTSg5SS_P____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10Dictionaryg5countSi -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBufferg5countSi -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg5countSi -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBufferg8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSf4s_n_n___TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer5_findfTx11startBucketSi_T3posGVs22_NativeDictionaryIndexxq__5foundSb_ -_TTSg5P____TFSp10initializefT2tox5countSi_T_ -_TTSg5SS_P____TFVs23_NativeDictionaryBufferg6valuesGSpq__ -_TTSg5SS_P____TFVs23_NativeDictionaryBufferg4keysGSpx_ -_TTSg5SS_P____TFVs23_NativeDictionaryBuffer18isInitializedEntryfT2atSi_Sb -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer6_indexfT5afterSi_Si -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBufferg11_bucketMaskSi -_TTSg5SS_P____TFVs23_NativeDictionaryBufferg8capacitySi -_TTSg5SS_P____TFVs23_NativeDictionaryBuffer3keyfT2atSi_x -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer7_bucketfxSi -_TTSf4n_n_d___TTSg5SS_P____TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5SS_P____TFVs23_NativeDictionaryBufferg40_initializedHashtableEntriesBitMapBufferGSpSu_ -formViewController -formRowCellHeight -firstResponderElement -_TTSf4g_d___TTSg5SSSSs8Hashables_CSo6UIView___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer5_findfTx11startBucketSi_T3posGVs22_NativeDictionaryIndexxq__5foundSb_ -_TTSg5GSaTSSCSo6UIView__GSaTSSS___s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5TSSCSo6UIView____TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5TSSCSo6UIView____TFSa9formIndexfT5afterRSi_T_ -_TTSg5TSSCSo6UIView____TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5TSSCSo6UIView____TFSag9subscriptFSix -_TTSg5TSSCSo6UIView____TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5TSSCSo6UIView____TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT15minimumCapacitySi_GS0_xq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT8capacitySi_GS0_xq__ -_TTSg5TSSCSo6UIView____TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5TSSCSo6UIView____TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5TSSCSo6UIView____TFVs22_ContiguousArrayBufferg5countSi -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffers5countSi -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer6_indexfT5afterSi_Si -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBufferg11_bucketMaskSi -_TTSg5CSo6UIView___TFSp10initializefT2tox5countSi_T_ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer7_bucketfxSi -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferCfT_GS_xq__ -_TTSg5GSaTSSCSo6UIView__GSaTSSS___s10Collections___TFEsPs10Collectiong7isEmptySb -_TTSg5TSSCSo6UIView____TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5TSSCSo6UIView____TFSag8endIndexSi -_TTSg5TSSCSo6UIView____TFSa9_getCountfT_Si -_TTSg5TSSCSo6UIView____TFVs12_ArrayBufferg5countSi -_TTSg5TSSCSo6UIView____TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TMaC10SwiftForms12FormBaseCell -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer18_typeCheckSlowPathfSiT_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -_TTSg5P____TFs26_forceBridgeFromObjectiveCurFTPs9AnyObject_Mx_x -_TTSg5SS_P____TFVs23_NativeDictionaryBuffers5countSi -_TTSg5SSSSs8Hashables_P____TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSg5SS_P____TFVs23_NativeDictionaryBufferg5countSi -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer20isUniquelyReferencedfT_Sb -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBufferg8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol35_forceCreateUniqueMutableBufferImplfT14countForBufferSi14minNewCapacitySi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -_TTSg5CSo18NSLayoutConstraint___TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8capacitySi -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg8capacitySi -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBuffer5indexfT5afterGVs22_NativeDictionaryIndexxq___GS0_xq__ -_TTSg5GVs22_NativeDictionaryIndexSSCSo6UIView_GS_SSS0__s9Equatables___TFsoi2neuRxs9EquatablerFTxx_Sb -_TTSg5SS_CSo6UIView___TTWu0_rGVs22_NativeDictionaryIndexxq__s9EquatablesZFS0_oi2eefTxx_Sb -_TFs25_isClassOrObjCExistentialurFMxSb -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_P____TFOs24_VariantDictionaryBuffers8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSg5CSo18NSLayoutConstraint___TFSa16_copyToNewBufferfT8oldCountSi_T_ -_TTSg5GVs12_ArrayBufferCSo18NSLayoutConstraint_GS_S0__s20_ArrayBufferProtocols_GVs14_IgnorePointerS0__GS2_S0__s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -updateConstraints -formRowCanBecomeFirstResponder -handleDoneAction -inputAccesoryView -_TToFC10SwiftForms12FormBaseCells18formViewControllerXwGSqCS_18FormViewController_ -_TToFC10SwiftForms12FormBaseCellg18formViewControllerXwGSqCS_18FormViewController_ -formViewController.get -_TFs27_bridgeAnythingToObjectiveCurFxPs9AnyObject_ -_TTSg5CSo18NSLayoutConstraint___TFSa6appendfxT_ -_TTSg5CSo18NSLayoutConstraint___TFSa36_reserveCapacityAssumingUniqueBufferfT8oldCountSi_T_ -_TTSg5GSaCSo18NSLayoutConstraint_GSaS__s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5CSo18NSLayoutConstraint___TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5CSo18NSLayoutConstraint___TFSa9formIndexfT5afterRSi_T_ -_TTSg5GSaSS_GSaSS_s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5SS___TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5SS___TFSa9formIndexfT5afterRSi_T_ -_TTSg5SS___TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5SS___TFSag9subscriptFSix -_TTSg5SS___TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5SS___TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5SS___TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5CSo18NSLayoutConstraint___TFSa9removeAllfT15keepingCapacitySb_T_ -_TTSg5CSo18NSLayoutConstraint___TFSa37_appendElementAssumeUniqueAndCapacityfTSi10newElementx_T_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffers5countSi -_TTSg5CSo18NSLayoutConstraint___TFSa9_getCountfT_Si -_TTSg5CSo18NSLayoutConstraint___TFSa40_makeUniqueAndReserveCapacityIfNotUniquefT_T_ -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer30isMutableAndUniquelyReferencedfT_Sb -_TTSg5CSo18NSLayoutConstraint___TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5CSo18NSLayoutConstraint___TFSag9subscriptFSix -_TTSg5CSo18NSLayoutConstraint___TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5CSo18NSLayoutConstraint___TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5CSo18NSLayoutConstraint___TFSa29_hoistableIsNativeTypeCheckedfT_Sb -_TTSg5CSo18NSLayoutConstraint___TFVs12_ArrayBufferg32arrayPropertyIsNativeTypeCheckedSb -_TTSg5CSo18NSLayoutConstraint___TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5CSo18NSLayoutConstraint___TFSag8endIndexSi -_TTSg5SSSSs8Hashables_CSo6UIView_SSSSS_s_P____TFs17_dictionaryUpCastu2_Rxs8Hashable0_S_rFGVs10Dictionaryxq__GS0_q0_q1__ -_TTSg5SS___TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5SS___TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5SS___TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5SS___TFVs22_ContiguousArrayBuffer10getElementfSix -customConstraints.get -_TTSg5SS___TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5SS___TFSag8endIndexSi -_TTSg5CSo18NSLayoutConstraint___TFSag5countSi -_TMaCSo15UIBarButtonItem -_TTSg5CSo15UIBarButtonItem___TFs27_allocateUninitializedArrayurFBwTGSax_Bp_ -_TTSg5CSo15UIBarButtonItem___TZFSa13_adoptStoragefTGCs23_ContiguousArrayStoragex_5countSi_TGSax_GSpx__ -_TTSg5CSo15UIBarButtonItem___TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5CSo15UIBarButtonItem___TFVs22_ContiguousArrayBufferCfT5countSi7storageGCs23_ContiguousArrayStoragex__GS_x_ -_TTSg5CSo15UIBarButtonItem___TFVs22_ContiguousArrayBuffer18_initStorageHeaderfT5countSi8capacitySi_T_ -_TMaGCs23_ContiguousArrayStorageCSo15UIBarButtonItem_ -__TFC10SwiftForms13FormLabelCell9configurefT_T_ -__TToFC10SwiftForms13FormLabelCell9configurefT_T_ -__TFC10SwiftForms13FormLabelCell6updatefT_T_ -__TToFC10SwiftForms13FormLabelCell6updatefT_T_ -__TFC10SwiftForms13FormLabelCellD -__TFC10SwiftForms13FormLabelCellCfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TFC10SwiftForms13FormLabelCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms13FormLabelCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TFC10SwiftForms13FormLabelCellCfT5coderCSo7NSCoder_GSqS0__ -__TFC10SwiftForms13FormLabelCellcfT5coderCSo7NSCoder_GSqS0__ -__TToFC10SwiftForms13FormLabelCellcfT5coderCSo7NSCoder_GSqS0__ -__TMaC10SwiftForms13FormLabelCell -_OBJC_METACLASS_$__TtC10SwiftForms13FormLabelCell -__TMnC10SwiftForms13FormLabelCell -__TMLC10SwiftForms13FormLabelCell -__TMfC10SwiftForms13FormLabelCell -__TMRfC10SwiftForms13FormLabelCell -__TMRsC10SwiftForms13FormLabelCell -__TWvdvC10SwiftForms13FormValueCellP33_82F16EA997B7B04DB1F3F41F679BB19017customConstraintsGSQGSaPs9AnyObject___ -__TMC10SwiftForms13FormLabelCell -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormLabelCell.swift -_TMaC10SwiftForms13FormLabelCell -FormLabelCell.swift -get_field_types_FormLabelCell -__TToFC10SwiftForms16FormTextViewCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms16FormTextViewCellg9textFieldCSo10UITextView -__TToZFC10SwiftForms16FormTextViewCell17formRowCellHeightfT_V12CoreGraphics7CGFloat -__TToFC10SwiftForms16FormTextViewCell9configurefT_T_ -__TToFC10SwiftForms16FormTextViewCell6updatefT_T_ -__TToFC10SwiftForms16FormTextViewCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms16FormTextViewCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms16FormTextViewCell17textViewDidChangefCSo10UITextViewT_ -__TToFC10SwiftForms16FormTextViewCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms16FormTextViewCellcfT5coderCSo7NSCoder_GSqS0__ -__TTSfq4gs_gs_d___TZFSSoi2eefTSSSS_Sb -__TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -__TTWSSs9EquatablesZFS_oi2eefTxx_Sb -__TTWSSs8HashablesFS_g9hashValueSi -__TTSf4g_n_n_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer12nativeDeletefTGVs23_NativeDictionaryBufferxq__11idealBucketSi6offsetSi_T_ -__TTSf4s_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer18nativeRemoveObjectfT6forKeyx_GSqq__ -__TTSf4n_s_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -__TMaCSo10UITextView -__T0SqWy.1 -__T0SqWe.2 -__T0s24_VariantDictionaryBufferOWy.3 -__TMLCSo10UITextView -__TWvdvC10SwiftForms16FormTextViewCellP33_872CBDA890CBCF32517E3701A6021DB517customConstraintsGSQGSaPs9AnyObject___ -l_OBJC_LABEL_PROTOCOL_$_UITextViewDelegate -l_OBJC_PROTOCOL_REFERENCE_$_UITextViewDelegate -__TWoFC10SwiftForms16FormTextViewCellgP33_872CBDA890CBCF32517E3701A6021DB517customConstraintsGSQGSaPs9AnyObject___ -__TWoFC10SwiftForms16FormTextViewCellsP33_872CBDA890CBCF32517E3701A6021DB517customConstraintsGSQGSaPs9AnyObject___ -__TWoFC10SwiftForms16FormTextViewCellmP33_872CBDA890CBCF32517E3701A6021DB517customConstraintsGSQGSaPs9AnyObject___ -__TMfC10SwiftForms16FormTextViewCell -__TMRfC10SwiftForms16FormTextViewCell -__TMRsC10SwiftForms16FormTextViewCell -__TMRfCSo10UITextView -__TMRsCSo10UITextView -__TMLGSQGSaPs9AnyObject___ -__TMLGSaPs9AnyObject__ -l_OBJC_LABEL_PROTOCOL_$_UIScrollViewDelegate -l_OBJC_PROTOCOL_REFERENCE_$_UIScrollViewDelegate -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextViewCell.swift -get_field_types_FormTextViewCell -FormTextViewCell.swift -_TMaGSQGSaPs9AnyObject___ -_TMaGSaPs9AnyObject__ -_TMaC10SwiftForms16FormTextViewCell -textViewDidChange -_TTSg5VSS13CharacterViewS_s10Collections___TFEsPs10Collectiong5countwx13IndexDistance -_TTWVSS13CharacterViews10CollectionsFS0_8distancefT4fromwx5Index2towxS1__wx13IndexDistance -_TTSfq4s_s_n___TTSgq5VSS13CharacterViewS_s23_BidirectionalIndexables___TFEsPs23_BidirectionalIndexable8distancefT4fromwx5Index2towxS0__wx13IndexDistance -_TTWVSS13CharacterViews14_IndexableBasesFS0_g8endIndexwx5Index -_TTWVSS13CharacterViews14_IndexableBasesFS0_g10startIndexwx5Index -_TMaCSo10UITextView -_TTSf4n_s_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffers8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSf4s_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer18nativeRemoveObjectfT6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer12nativeDeletefTGVs23_NativeDictionaryBufferxq__11idealBucketSi6offsetSi_T_ -_TTSf4g_n_n_n___TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer12nativeDeletefTGVs23_NativeDictionaryBufferxq__11idealBucketSi6offsetSi_T_ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer5_prevfSiSi -_TTSg5CSo6UIView___TFSp4movefT_x -_TTSg5SS___TFSp4movefT_x -_TTSg5CSo6UIView___TFSp12deinitializefT5countSi_Sv -_TTSf4n_n_d___TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSg5SS_CSo6UIView___TFVs23_NativeDictionaryBufferg40_initializedHashtableEntriesBitMapBufferGSpSu_ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -_TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSf4gs_n_n___TTSg5SSSSs8Hashables_CSo6UIView___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSg5CSo6UIView___TFs26_forceBridgeFromObjectiveCurFTPs9AnyObject_Mx_x -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer20isUniquelyReferencedfT_Sb -_TTSg5CSo7UIImageCSo8NSObjects9Equatable5UIKit___TFsoi2neuRxs9EquatablerFTGSqx_GSqx__Sb -_TTSg5CSo7UIImageCSo8NSObjects9Equatable5UIKit___TFsoi2eeuRxs9EquatablerFTGSqx_GSqx__Sb -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10Dictionarys9subscriptFxGSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer11updateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFVs10Dictionary11removeValuefT6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer11removeValuefT6forKeyx_GSqq__ -_TTSg5SSSSs8Hashables_CSo6UIView___TFOs24_VariantDictionaryBuffer18nativeRemoveObjectfT6forKeyx_GSqq__ -textField.get -_TToFC10SwiftForms16FormTextViewCellg9textFieldCSo10UITextView -_TToFC10SwiftForms16FormTextViewCellg10titleLabelCSo7UILabel -___swift_memcpy1_1 -___swift_memcpy_array1_1 -___swift_memmove_array1_1 -__TwxsO10SwiftForms13FormErrorType -__TwxgO10SwiftForms13FormErrorType -__TwugO10SwiftForms13FormErrorType -__TwupO10SwiftForms13FormErrorType -__TwuiO10SwiftForms13FormErrorType -__TMfO10SwiftForms13FormErrorType -__TMRfO10SwiftForms13FormErrorType -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/FormErrorType.swift -_TMaO10SwiftForms13FormErrorType -FormErrorType.swift -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms -get_field_types_FormErrorType -_TwuiO10SwiftForms13FormErrorType -_TwupO10SwiftForms13FormErrorType -_TwugO10SwiftForms13FormErrorType -_TwxgO10SwiftForms13FormErrorType -_TwxsO10SwiftForms13FormErrorType -__swift_memmove_array1_1 -__swift_memcpy_array1_1 -__swift_memcpy1_1 -_TWaO10SwiftForms13FormErrorTypes9_HashableS_ -_TWaO10SwiftForms13FormErrorTypes5ErrorS_ -_TWaO10SwiftForms13FormErrorTypes8HashableS_ -_TWaO10SwiftForms13FormErrorTypes9EquatableS_ -_globalinit_33_A98A5792941355E0FC6070FE05AD0013_func0 -__TFIZvC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD00136__onceT_iU_FT_T_ -_globalinit_33_A98A5792941355E0FC6070FE05AD0013_func2 -__TToFC10SwiftForms18FormViewControllercfT_S0_ -__TToFC10SwiftForms18FormViewControllercfT5styleOSC16UITableViewStyle_S0_ -__TToFC10SwiftForms18FormViewControllercfT7nibNameGSqSS_6bundleGSqCSo6Bundle__S0_ -__TToFC10SwiftForms18FormViewControllercfT5coderCSo7NSCoder_S0_ -__TToFC10SwiftForms18FormViewController11viewDidLoadfT_T_ -__TToFC10SwiftForms18FormViewController11valueForTagfSSGSqPs9AnyObject__ -__TToFC10SwiftForms18FormViewController8setValuefTPs9AnyObject_6forTagSS_T_ -__TToFC10SwiftForms18FormViewController16numberOfSectionsfT2inCSo11UITableView_Si -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView21numberOfRowsInSectionSi_Si -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView12cellForRowAtV10Foundation9IndexPath_CSo15UITableViewCell -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView23titleForHeaderInSectionSi_GSqSS_ -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView23titleForFooterInSectionSi_GSqSS_ -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView22viewForFooterInSectionSi_GSqCSo6UIView_ -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView22viewForHeaderInSectionSi_GSqCSo6UIView_ -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView22viewForFooterInSectionSi_GSqCSo6UIView__merged -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView24heightForHeaderInSectionSi_V12CoreGraphics7CGFloat -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView24heightForFooterInSectionSi_V12CoreGraphics7CGFloat -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView24heightForHeaderInSectionSi_V12CoreGraphics7CGFloat_merged -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView14heightForRowAtV10Foundation9IndexPath_V12CoreGraphics7CGFloat -__TToFC10SwiftForms18FormViewController9tableViewfTCSo11UITableView14didSelectRowAtV10Foundation9IndexPath_T_ -__TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -__TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffer5indexfT5afterGVs22_NativeDictionaryIndexxq___GS0_xq__ -__TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -__TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -__TTSf4n_n_d___TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -__TTSf4g_d___TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -__T0s32DictionaryIteratorRepresentationOWy.12 -__TZvC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD001320onceDefaultCellClassSi -__TZvC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD001318defaultCellClassesGVs10DictionaryOCS_17FormRowDescriptor7RowTypeMCS_12FormBaseCell_ -__TWvdvC10SwiftForms17FormTextFieldCellP33_149870142910A653EE2CFFFC6D820B4A17customConstraintsGSaPs9AnyObject__ -__TWvdvC10SwiftForms24FormSegmentedControlCellP33_DBE9D27F80989AD1EAE3BA68E841BE3517customConstraintsGSaPs9AnyObject__ -__TWoZFC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD001326defaultCellClassForRowTypefOCS_17FormRowDescriptor7RowTypeMCS_12FormBaseCell -__TWoFC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD001328formRowDescriptorAtIndexPathfV10Foundation9IndexPathCS_17FormRowDescriptor -__TWoFC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD001334formBaseCellClassFromRowDescriptorfCS_17FormRowDescriptorGSQMCS_12FormBaseCell_ -__TMfC10SwiftForms18FormViewController -__TMRfC10SwiftForms18FormViewController -__TMRsC10SwiftForms18FormViewController -__TMLGCs37_HashableTypedNativeDictionaryStorageOC10SwiftForms17FormRowDescriptor7RowTypeMCS0_12FormBaseCell_ -__TMLMC10SwiftForms12FormBaseCell -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormViewController.swift -get_field_types_FormViewController -FormViewController.swift -tableView -formBaseCellClassFromRowDescriptor -defaultCellClassForRowType -formRowDescriptorAtIndexPath -form.get -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs18DictionaryIterator4nextfT_GSqT3keyx5valueq___ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs18DictionaryIterator11_nativeNextfT_GSqT3keyx5valueq___ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffer12assertingGetfGVs22_NativeDictionaryIndexxq__T3keyx5valueq__ -FormTextFieldCell.swift -FormSegmentedControlCell.swift -FormValueCell.swift -_TTSg5SS_Ps9AnyObject____TZFVs22_NativeDictionaryIndexoi2eefTGS_xq__GS_xq___Sb -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFVs10Dictionary12makeIteratorfT_GVs18DictionaryIteratorxq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TFOs24_VariantDictionaryBuffer12makeIteratorfT_GVs18DictionaryIteratorxq__ -_TTSg5SSSSs8Hashables_Ps9AnyObject____TZFVs18DictionaryIterator6_cocoafCs24_CocoaDictionaryIteratorGS_xq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg8endIndexGVs22_NativeDictionaryIndexxq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBufferg10startIndexGVs22_NativeDictionaryIndexxq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFVs10Dictionaryg9subscriptFxGSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer8maybeGetfxGSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer8maybeGetfxGSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer5_findfTx11startBucketSi_T3posGVs22_NativeDictionaryIndexxq__5foundSb_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer6_indexfT5afterSi_Si -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBuffer3keyfT2atSi_x -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBuffer18isInitializedEntryfT2atSi_Sb -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferg6valuesGSpq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferg4keysGSpx_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer7_bucketfxSi -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferg8capacitySi -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferg5countSi -_TFC10SwiftForms18FormViewControllerauP33_A98A5792941355E0FC6070FE05AD001318defaultCellClassesGVs10DictionaryOCS_17FormRowDescriptor7RowTypeMCS_12FormBaseCell_ -_TFC10SwiftForms18FormViewControllerauP33_A98A5792941355E0FC6070FE05AD00136__onceT_ -_TTSg5C10SwiftForms17FormRowDescriptor___TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5C10SwiftForms17FormRowDescriptor___TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -setValue -_TTSg5GVs16IndexingIteratorGSaC10SwiftForms21FormSectionDescriptor__GS_GSaS1___s16IteratorProtocols___TFVs18EnumeratedIterator4nextfT_GSqT6offsetSi7elementwx7Element__ -_TTSg5GSaC10SwiftForms21FormSectionDescriptor_GSaS0__s14_IndexableBases___TTWuRxs14_IndexableBaserGVs16IndexingIteratorx_s16IteratorProtocolsFS1_4nextfT_GSqwx7Element_ -_TTSg5GVs16IndexingIteratorGSaC10SwiftForms17FormRowDescriptor__GS_GSaS1___s16IteratorProtocols___TFVs18EnumeratedIterator4nextfT_GSqT6offsetSi7elementwx7Element__ -_TTSg5GSaC10SwiftForms17FormRowDescriptor_GSaS0__s14_IndexableBases___TTWuRxs14_IndexableBaserGVs16IndexingIteratorx_s16IteratorProtocolsFS1_4nextfT_GSqwx7Element_ -_TZFSSoi2eefTSSSS_Sb -valueForTag -_TTSf4g_d___TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TTSg5GSaTOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell__GSaTS1_MS2___s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSa9formIndexfT5afterRSi_T_ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSag9subscriptFSix -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT15minimumCapacitySi_GS0_xq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBufferCfT8capacitySi_GS0_xq__ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs22_ContiguousArrayBufferg5countSi -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBuffers5countSi -_TTSg5MC10SwiftForms12FormBaseCell___TFSp10initializefT2tox5countSi_T_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType___TFSp10initializefT2tox5countSi_T_ -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TMaGCs37_HashableTypedNativeDictionaryStorageOC10SwiftForms17FormRowDescriptor7RowTypeMCS0_12FormBaseCell_ -_TMaMC10SwiftForms12FormBaseCell -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferCfT_GS_xq__ -_TTSg5GSaTOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell__GSaTS1_MS2___s10Collections___TFEsPs10Collectiong7isEmptySb -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSag8endIndexSi -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFSa9_getCountfT_Si -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs12_ArrayBufferg5countSi -_TTSg5TOC10SwiftForms17FormRowDescriptor7RowTypeMCS_12FormBaseCell____TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSf4n_n_d___TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferCfT8capacitySi7storageCs27_RawNativeDictionaryStorage_GS_xq__ -_TTSgq5Su___TFSp10initializefT2tox5countSi_T_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType_MCS_12FormBaseCell___TFVs23_NativeDictionaryBufferg40_initializedHashtableEntriesBitMapBufferGSpSu_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFes0_Rxs8HashablerVs23_NativeDictionaryBuffer12unsafeAddNewfT3keyx5valueq__T_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer24ensureUniqueNativeBufferfSiT11reallocatedSb15capacityChangedSb_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowType___TFs26_forceBridgeFromObjectiveCurFTPs9AnyObject_Mx_x -_TTSg5MC10SwiftForms12FormBaseCell___TFs26_forceBridgeFromObjectiveCurFTPs9AnyObject_Mx_x -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer20isUniquelyReferencedfT_Sb -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBufferg8asNativeGVs23_NativeDictionaryBufferxq__ -_TTSg5SS_Ps9AnyObject____TFVs23_NativeDictionaryBuffer5indexfT5afterGVs22_NativeDictionaryIndexxq___GS0_xq__ -_TTSg5GVs22_NativeDictionaryIndexSSPs9AnyObject__GS_SSPS0___s9Equatables___TFsoi2neuRxs9EquatablerFTxx_Sb -_TTSg5SS_Ps9AnyObject____TTWu0_rGVs22_NativeDictionaryIndexxq__s9EquatablesZFS0_oi2eefTxx_Sb -_TFCs24_CocoaDictionaryIterator4nextfT_GSqTPs9AnyObject_PS0____ -_TTSfq4n_d_n___TTSgq5GVs9UnmanagedPs9AnyObject_____TFSv4loadurfT14fromByteOffsetSi2asMx_x -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer17nativeUpdateValuefTq_6forKeyx_GSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffers8asNativeGVs23_NativeDictionaryBufferxq__ -_TMaC10SwiftForms18FormViewController -form.materialize -form.set -_TTSg5C10SwiftForms17FormRowDescriptor___TFSag5countSi -numberOfSections -_TTSg5C10SwiftForms21FormSectionDescriptor___TFSag5countSi -viewDidLoad -globalinit_33_A98A5792941355E0FC6070FE05AD0013_func2 -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFVs10DictionaryCft17dictionaryLiteralGSaTxq____GS_xq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFVs10DictionaryCfT13_nativeBufferGVs23_NativeDictionaryBufferxq___GS_xq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TZFes0_Rxs8HashablerVs23_NativeDictionaryBuffer9fromArrayfGSaTxq___GS0_xq__ -_TFIZvC10SwiftForms18FormViewControllerP33_A98A5792941355E0FC6070FE05AD00136__onceT_iU_FT_T_ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFVs10Dictionarys9subscriptFxGSqq__ -_TTSg5OC10SwiftForms17FormRowDescriptor7RowTypeS1_s8HashableS__MCS_12FormBaseCell___TFOs24_VariantDictionaryBuffer11updateValuefTq_6forKeyx_GSqq__ -globalinit_33_A98A5792941355E0FC6070FE05AD0013_func0 -__TToFC10SwiftForms14FormButtonCell9configurefT_T_ -__TToFC10SwiftForms14FormButtonCell6updatefT_T_ -__TToFC10SwiftForms14FormButtonCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms14FormButtonCellcfT5coderCSo7NSCoder_GSqS0__ -__TMfC10SwiftForms14FormButtonCell -__TMRfC10SwiftForms14FormButtonCell -__TMRsC10SwiftForms14FormButtonCell -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormButtonCell.swift -get_field_types_FormButtonCell -FormButtonCell.swift -_TMaC10SwiftForms14FormButtonCell -__TToFC10SwiftForms15FormStepperCellg11stepperViewCSo9UIStepper -__TToFC10SwiftForms15FormStepperCellg10countLabelCSo7UILabel -__TMaCSo9UIStepper -__TToFC10SwiftForms15FormStepperCell9configurefT_T_ -__TToFC10SwiftForms15FormStepperCell6updatefT_T_ -__TToFC10SwiftForms15FormStepperCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms15FormStepperCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms15FormStepperCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms15FormStepperCellcfT5coderCSo7NSCoder_GSqS0__ -__TFFs16_float64ToStringFTSd5debugSb_SSU_FGSpVs5UInt8_SS -__TMLCSo9UIStepper -__TWoFC10SwiftForms15FormStepperCell12valueChangedfCSo8UISwitchT_ -__TMfC10SwiftForms15FormStepperCell -__TMRfC10SwiftForms15FormStepperCell -__TMRsC10SwiftForms15FormStepperCell -__TMRfCSo9UIStepper -__TMRsCSo9UIStepper -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormStepperCell.swift -get_field_types_FormStepperCell -FormStepperCell.swift -_TMaC10SwiftForms15FormStepperCell -_TFFs16_float64ToStringFTSd5debugSb_SSU_FGSpVs5UInt8_SS -_TTSfq4n_d___TZFVs4UTF810_decodeOnefVs6UInt32T6resultGSqS0__6lengthVs5UInt8_ -_TTSgq5GVs16IndexingIteratorGSRVs5UInt8__GS_GSRS0___s16IteratorProtocols___TFVs4UTF86decodeuRxs16IteratorProtocolwx7ElementzVs5UInt8rfRxOs21UnicodeDecodingResult -_TTSgq5GSRVs5UInt8_GSRS__s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSfq4n_s___TTSgq5Vs5UInt8___TFSRg9subscriptFSix -_TTSg5SdSds25LosslessStringConvertibles___TFSSCuRxs25LosslessStringConvertiblerfxSS -_TTSf4n_d___TTSg5SdSds25LosslessStringConvertibles___TFSSCuRxs25LosslessStringConvertiblerfxSS -_TTWSds23CustomStringConvertiblesFS_g11descriptionSS -_TFs16_float64ToStringFTSd5debugSb_SS -_TFSdg4signOs17FloatingPointSign -_TMaCSo9UIStepper -countLabel.get -_TToFC10SwiftForms15FormStepperCellg10countLabelCSo7UILabel -stepperView.get -_TToFC10SwiftForms15FormStepperCellg11stepperViewCSo9UIStepper -__TToFC10SwiftForms16FormSelectorCell6updatefT_T_ -__TToZFC10SwiftForms16FormSelectorCell18formViewControllerfTCS_18FormViewController12didSelectRowCS_12FormBaseCell_T_ -__TToFC10SwiftForms16FormSelectorCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms16FormSelectorCellcfT5coderCSo7NSCoder_GSqS0__ -__TTSg5Ps9AnyObject____TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -__TMaCSo16UIViewController -__TMLCSo16UIViewController -__TMfC10SwiftForms16FormSelectorCell -__TMRfC10SwiftForms16FormSelectorCell -__TMRsC10SwiftForms16FormSelectorCell -__TMLGCs18_HeapBufferStorageVs18_StringBufferIVarsVs6UInt16_ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSelectorCell.swift -get_field_types_FormSelectorCell -FormSelectorCell.swift -_TMaCSo16UIViewController -_TMaC10SwiftForms16FormSelectorCell -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer19_getElementSlowPathfSiPs9AnyObject_ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBuffer20_checkValidSubscriptfSiT_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg10_nonNativePs12_NSArrayCore_ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferg5countSi -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg7_nativeGVs22_ContiguousArrayBufferx_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg9_isNativeSb -_TTSfq4d___TTSgq5Vs18_StringBufferIVars_Vs6UInt16___TZFVs11_HeapBuffer14_elementOffsetfT_Si -_TTSfq4n_n_n_d___TFVs13_StringBufferCfT8capacitySi11initialSizeSi12elementWidthSi_S_ -_TTSgq5Vs18_StringBufferIVars_Vs6UInt16___TFVs11_HeapBuffer9_capacityfT_Si -_TTSfq4n_n_n_d___TTSgq5Vs18_StringBufferIVars_Vs6UInt16___TFVs11_HeapBufferCfTPMPs9AnyObject_xSi_GS_xq__ -_TTSgq5Vs18_StringBufferIVars___TFSp10initializefT2tox5countSi_T_ -_TMaGCs18_HeapBufferStorageVs18_StringBufferIVarsVs6UInt16_ -_TTSg5GVs16IndexingIteratorGSaPs9AnyObject___GS_GSaPS0____s16IteratorProtocols___TFVs18EnumeratedIterator4nextfT_GSqT6offsetSi7elementwx7Element__ -_TTSg5GSaPs9AnyObject__GSaPS___s14_IndexableBases___TTWuRxs14_IndexableBaserGVs16IndexingIteratorx_s16IteratorProtocolsFS1_4nextfT_GSqwx7Element_ -_TTSg5GSaPs9AnyObject__GSaPS___s14_IndexableBases___TFVs16IndexingIterator4nextfT_GSqwx8_Element_ -_TTSg5Ps9AnyObject____TTWurGSax_s14_IndexableBasesFS_g9subscriptFwx5Indexwx8_Element -_TTSg5Ps9AnyObject____TFSag9subscriptFSix -_TTSg5Ps9AnyObject____TFSa15_checkSubscriptfTSi20wasNativeTypeCheckedSb_Vs16_DependenceToken -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer37_checkInoutAndNativeTypeCheckedBoundsfTSi20wasNativeTypeCheckedSb_T_ -_TTSg5Ps9AnyObject____TTWurGSax_s14_IndexableBasesFS_9formIndexfT5afterRwx5Index_T_ -_TTSg5Ps9AnyObject____TFSa9formIndexfT5afterRSi_T_ -_TZFSSoi2pefTRSSSS_T_ -_TTSg5Ps9AnyObject____TFSa11_getElementfTSi20wasNativeTypeCheckedSb22matchingSubscriptCheckVs16_DependenceToken_x -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer10getElementfTSi20wasNativeTypeCheckedSb_x -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferg9subscriptFSix -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBuffer10getElementfSix -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferg19firstElementAddressGSpx_ -_TTSg5Ps9AnyObject____TFSa29_hoistableIsNativeTypeCheckedfT_Sb -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg32arrayPropertyIsNativeTypeCheckedSb -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg20_isNativeTypeCheckedSb -_TTSg5Ps9AnyObject____TTWurGSax_s14_IndexableBasesFS_g8endIndexwx5Index -_TTSg5Ps9AnyObject____TFSag8endIndexSi -_TTSg5Ps9AnyObject____TFSa9_getCountfT_Si -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg5countSi -__TToFC10SwiftForms14FormSwitchCellg10switchViewCSo8UISwitch -__TToFC10SwiftForms14FormSwitchCell9configurefT_T_ -__TToFC10SwiftForms14FormSwitchCell6updatefT_T_ -__TToFC10SwiftForms14FormSwitchCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms14FormSwitchCellcfT5coderCSo7NSCoder_GSqS0__ -__TWoFC10SwiftForms14FormSwitchCell12valueChangedfCSo8UISwitchT_ -__TMfC10SwiftForms14FormSwitchCell -__TMRfC10SwiftForms14FormSwitchCell -__TMRsC10SwiftForms14FormSwitchCell -__TMRfCSo8UISwitch -__TMRsCSo8UISwitch -__TMLCSo8UISwitch -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSwitchCell.swift -get_field_types_FormSwitchCell -FormSwitchCell.swift -_TMaCSo8UISwitch -_TMaC10SwiftForms14FormSwitchCell -switchView.get -_TToFC10SwiftForms14FormSwitchCellg10switchViewCSo8UISwitch -__TToFC10SwiftForms13FormCheckCell9configurefT_T_ -__TToFC10SwiftForms13FormCheckCell6updatefT_T_ -__TToZFC10SwiftForms13FormCheckCell18formViewControllerfTCS_18FormViewController12didSelectRowCS_12FormBaseCell_T_ -__TToFC10SwiftForms13FormCheckCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms13FormCheckCellcfT5coderCSo7NSCoder_GSqS0__ -__TWoFC10SwiftForms13FormCheckCellP33_254C49D6E5637BF0BEB3218F3FC093E75checkfT_T_ -__TMfC10SwiftForms13FormCheckCell -__TMRfC10SwiftForms13FormCheckCell -__TMRsC10SwiftForms13FormCheckCell -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormCheckCell.swift -get_field_types_FormCheckCell -FormCheckCell.swift -_TMaC10SwiftForms13FormCheckCell -check -__TToFC10SwiftForms13FormValueCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms13FormValueCellg10valueLabelCSo7UILabel -__TToFC10SwiftForms13FormValueCell9configurefT_T_ -__TToFC10SwiftForms13FormValueCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms13FormValueCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms13FormValueCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms13FormValueCellcfT5coderCSo7NSCoder_GSqS0__ -__TTSgq5SSSSs20TextOutputStreamables___TFs27_toStringReadOnlyStreamableuRxs20TextOutputStreamablerFxSS -__TTSgq5SiSis23CustomStringConvertibles___TFs26_toStringReadOnlyPrintableuRxs23CustomStringConvertiblerFxSS -__TTSfq4g_d___TFSSCft19stringInterpolationGSaSS__SS -__TTWVSS13CharacterViews14_IndexableBasesFS0_g10startIndexwx5Index -__TTWVSS13CharacterViews14_IndexableBasesFS0_g8endIndexwx5Index -__TTWVSS13CharacterViews10CollectionsFS0_8distancefT4fromwx5Index2towxS1__wx13IndexDistance -__TTSfq4s_s_n___TTSgq5VSS13CharacterViewS_s23_BidirectionalIndexables___TFEsPs23_BidirectionalIndexable8distancefT4fromwx5Index2towxS0__wx13IndexDistance -__TWoFC10SwiftForms13FormValueCellgP33_82F16EA997B7B04DB1F3F41F679BB19017customConstraintsGSQGSaPs9AnyObject___ -__TWoFC10SwiftForms13FormValueCellsP33_82F16EA997B7B04DB1F3F41F679BB19017customConstraintsGSQGSaPs9AnyObject___ -__TWoFC10SwiftForms13FormValueCellmP33_82F16EA997B7B04DB1F3F41F679BB19017customConstraintsGSQGSaPs9AnyObject___ -__TMfC10SwiftForms13FormValueCell -__TMRfC10SwiftForms13FormValueCell -__TMRsC10SwiftForms13FormValueCell -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/base/FormValueCell.swift -get_field_types_FormValueCell -_TMaC10SwiftForms13FormValueCell -_TTSfq4g_d___TFSSCft19stringInterpolationGSaSS__SS -_TTSgq5SiSis23CustomStringConvertibles___TFs26_toStringReadOnlyPrintableuRxs23CustomStringConvertiblerFxSS -_TTSgq5SSSSs20TextOutputStreamables___TFs27_toStringReadOnlyStreamableuRxs20TextOutputStreamablerFxSS -valueLabel.get -_TToFC10SwiftForms13FormValueCellg10valueLabelCSo7UILabel -_TToFC10SwiftForms13FormValueCellg10titleLabelCSo7UILabel -_TTSg5SS___TFCs23_ContiguousArrayStorageD -_TTSg5SS___TFCs23_ContiguousArrayStoraged -_TTSg5SS___TFCs23_ContiguousArrayStorageg15_elementPointerGSpx_ -_TFSSCft19stringInterpolationGSaSS__SS -_TFSSCfT26stringInterpolationSegmentSS_SS -_TFSSCfT26stringInterpolationSegmentSi_SS -__TToFC10SwiftForms24FormSegmentedControlCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms24FormSegmentedControlCellg16segmentedControlCSo18UISegmentedControl -__TMaCSo18UISegmentedControl -__TToFC10SwiftForms24FormSegmentedControlCell9configurefT_T_ -__TToFC10SwiftForms24FormSegmentedControlCell6updatefT_T_ -__TToFC10SwiftForms24FormSegmentedControlCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms24FormSegmentedControlCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms24FormSegmentedControlCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms24FormSegmentedControlCellcfT5coderCSo7NSCoder_GSqS0__ -__TMLCSo18UISegmentedControl -__TWoFC10SwiftForms24FormSegmentedControlCellgP33_DBE9D27F80989AD1EAE3BA68E841BE3517customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms24FormSegmentedControlCellsP33_DBE9D27F80989AD1EAE3BA68E841BE3517customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms24FormSegmentedControlCellmP33_DBE9D27F80989AD1EAE3BA68E841BE3517customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms24FormSegmentedControlCell12valueChangedfCSo18UISegmentedControlT_ -__TWoFC10SwiftForms24FormSegmentedControlCellP33_DBE9D27F80989AD1EAE3BA68E841BE3522updateSegmentedControlfT_T_ -__TMfC10SwiftForms24FormSegmentedControlCell -__TMRfC10SwiftForms24FormSegmentedControlCell -__TMRsC10SwiftForms24FormSegmentedControlCell -__TMRfCSo18UISegmentedControl -__TMRsCSo18UISegmentedControl -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormSegmentedControlCell.swift -get_field_types_FormSegmentedControlCell -_TTSg5GSaPs9AnyObject__GSaPS___s10Collections___TFEsPs10Collectiong7isEmptySb -_TMaC10SwiftForms24FormSegmentedControlCell -updateSegmentedControl -_TFsoi3eeeFTGSqPs9AnyObject__GSqPS____Sb -_TMaCSo18UISegmentedControl -segmentedControl.get -_TToFC10SwiftForms24FormSegmentedControlCellg16segmentedControlCSo18UISegmentedControl -_TToFC10SwiftForms24FormSegmentedControlCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms17FormTextFieldCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms17FormTextFieldCellg9textFieldCSo11UITextField -__TMaCSo11UITextField -__TToFC10SwiftForms17FormTextFieldCell9configurefT_T_ -__TToFC10SwiftForms17FormTextFieldCell6updatefT_T_ -__TToFC10SwiftForms17FormTextFieldCell16constraintsViewsfT_GVs10DictionarySSCSo6UIView_ -__TToFC10SwiftForms17FormTextFieldCell24defaultVisualConstraintsfT_GSaSS_ -__TToFC10SwiftForms17FormTextFieldCell21firstResponderElementfT_GSqCSo11UIResponder_ -__TToZFC10SwiftForms17FormTextFieldCell30formRowCanBecomeFirstResponderfT_Sb -__TToFC10SwiftForms17FormTextFieldCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms17FormTextFieldCellcfT5coderCSo7NSCoder_GSqS0__ -__TMLCSo11UITextField -__TWoFC10SwiftForms17FormTextFieldCellgP33_149870142910A653EE2CFFFC6D820B4A17customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms17FormTextFieldCellsP33_149870142910A653EE2CFFFC6D820B4A17customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms17FormTextFieldCellmP33_149870142910A653EE2CFFFC6D820B4A17customConstraintsGSaPs9AnyObject__ -__TWoFC10SwiftForms17FormTextFieldCell14editingChangedfCSo11UITextFieldT_ -__TMfC10SwiftForms17FormTextFieldCell -__TMRfC10SwiftForms17FormTextFieldCell -__TMRsC10SwiftForms17FormTextFieldCell -__TMRfCSo11UITextField -__TMRsCSo11UITextField -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormTextFieldCell.swift -get_field_types_FormTextFieldCell -editingChanged -_TMaC10SwiftForms17FormTextFieldCell -_TTSg5CSo6UIViewCSo8NSObjects9Equatable5UIKit___TFsoi2eeuRxs9EquatablerFTGSqx_GSqx__Sb -_TMaCSo11UITextField -_TToFC10SwiftForms17FormTextFieldCellg9textFieldCSo11UITextField -_TToFC10SwiftForms17FormTextFieldCellg10titleLabelCSo7UILabel -__TToFC10SwiftForms14FormPickerCell9configurefT_T_ -__TToFC10SwiftForms14FormPickerCell6updatefT_T_ -__TToFC10SwiftForms14FormPickerCell21firstResponderElementfT_GSqCSo11UIResponder_ -__TToZFC10SwiftForms14FormPickerCell18formViewControllerfTCS_18FormViewController12didSelectRowCS_12FormBaseCell_T_ -__TToFC10SwiftForms14FormPickerCell10pickerViewfTCSo12UIPickerView11titleForRowSi12forComponentSi_GSqSS_ -__TToFC10SwiftForms14FormPickerCell10pickerViewfTCSo12UIPickerView12didSelectRowSi11inComponentSi_T_ -__TToFC10SwiftForms14FormPickerCell18numberOfComponentsfT2inCSo12UIPickerView_Si -__TToFC10SwiftForms14FormPickerCell10pickerViewfTCSo12UIPickerView23numberOfRowsInComponentSi_Si -__TToFC10SwiftForms14FormPickerCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms14FormPickerCellcfT5coderCSo7NSCoder_GSqS0__ -__TWvdvC10SwiftForms14FormPickerCellP33_509F42A1F3552FA9D46F9A9EE75C8D9B6pickerCSo12UIPickerView -__TWvdvC10SwiftForms14FormPickerCellP33_509F42A1F3552FA9D46F9A9EE75C8D9B15hiddenTextFieldCSo11UITextField -l_OBJC_LABEL_PROTOCOL_$_UIPickerViewDelegate -l_OBJC_PROTOCOL_REFERENCE_$_UIPickerViewDelegate -l_OBJC_LABEL_PROTOCOL_$_UIPickerViewDataSource -l_OBJC_PROTOCOL_REFERENCE_$_UIPickerViewDataSource -__TMfC10SwiftForms14FormPickerCell -__TMRfC10SwiftForms14FormPickerCell -__TMRsC10SwiftForms14FormPickerCell -__TMRfCSo12UIPickerView -__TMRsCSo12UIPickerView -__TMLCSo12UIPickerView -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormPickerCell.swift -get_field_types_FormPickerCell -FormPickerCell.swift -_TMaCSo12UIPickerView -_TMaC10SwiftForms14FormPickerCell -pickerView -_TTSg5Ps9AnyObject____TFSag5countSi -numberOfComponents -_TTSg5GSaPs9AnyObject__GSaPS___s8Sequences___TFEsPs8Sequence10enumeratedfT_GVs18EnumeratedSequencex_ -__TToFC10SwiftForms29FormOptionsSelectorControllerg8formCellGSqCS_12FormBaseCell_ -__TToFC10SwiftForms29FormOptionsSelectorControllers8formCellGSqCS_12FormBaseCell_ -__TToFC10SwiftForms29FormOptionsSelectorControllercfT_S0_ -__TToFC10SwiftForms29FormOptionsSelectorControllercfT5coderCSo7NSCoder_S0_ -__TToFC10SwiftForms29FormOptionsSelectorController11viewDidLoadfT_T_ -__TToFC10SwiftForms29FormOptionsSelectorController16numberOfSectionsfT2inCSo11UITableView_Si -__TToFC10SwiftForms29FormOptionsSelectorController9tableViewfTCSo11UITableView21numberOfRowsInSectionSi_Si -__TToFC10SwiftForms29FormOptionsSelectorController9tableViewfTCSo11UITableView24heightForHeaderInSectionSi_V12CoreGraphics7CGFloat -__TToFC10SwiftForms29FormOptionsSelectorController9tableViewfTCSo11UITableView12cellForRowAtV10Foundation9IndexPath_CSo15UITableViewCell -__TToFC10SwiftForms29FormOptionsSelectorController9tableViewfTCSo11UITableView14didSelectRowAtV10Foundation9IndexPath_T_ -__TToFC10SwiftForms29FormOptionsSelectorControllercfT5styleOSC16UITableViewStyle_S0_ -__TTSg5Ps9AnyObject____TFSa40_makeUniqueAndReserveCapacityIfNotUniquefT_T_ -__TTSg5Ps9AnyObject____TFSa16_copyToNewBufferfT8oldCountSi_T_ -__TTSf1n_n_cl134_TFFFs25_unimplementedInitializerFT9classNameVs12StaticString8initNameS_4fileS_4lineSu6columnSu_Os5NeverU0_FGSRVs5UInt8_T_U_FGSRS1__T_GSRVs5UInt8____TTSfq1n_cl39_TTRXFo_dGSRVs5UInt8___XFo_dGSRS___iT__XFo_dGSRVs5UInt8____n___TTSgq5T____TFVs12StaticString14withUTF8BufferurfFGSRVs5UInt8_xx -__TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT8newCountSi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -__TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -__TTSf4n_n_d___TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -__TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs14_IgnorePointerPS0___GS2_PS0___s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -__TTSf4s_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withSi10elementsOfqd___T_ -__TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs31_InitializeMemoryFromCollectionGVs15EmptyCollectionPS0____GS2_GS3_PS0____s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -__TTSf4s_d_n_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol23_arrayOutOfPlaceReplaceuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withqd__5countSi_T_ -__TTSf4s_d_n___TTSg5Ps9AnyObject__GVs15EmptyCollectionPS___GS0_PS___s10Collections___TFSa15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zxrfTGVs5RangeSi_4withqd___T_ -__TTSfq4s_s___TFFFs25_unimplementedInitializerFT9classNameVs12StaticString8initNameS_4fileS_4lineSu6columnSu_Os5NeverU0_FGSRVs5UInt8_T_U_FGSRS1__T_ -__T0SqWy.8 -__T0SqWe.9 -__TMaGSaPs9AnyObject__ -__TMaGCs23_ContiguousArrayStoragePs9AnyObject__ -__TMaGSaPs9AnyObject___merged -__TMLGCs23_ContiguousArrayStoragePs9AnyObject__ -__TWoFC10SwiftForms29FormOptionsSelectorControllerCfT7nibNameGSqSS_6bundleGSqCSo6Bundle__S0_ -__TMfC10SwiftForms29FormOptionsSelectorController -__TMRfC10SwiftForms29FormOptionsSelectorController -__TMRsC10SwiftForms29FormOptionsSelectorController -__TMLGSqC10SwiftForms12FormBaseCell_ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/controllers/FormOptionsViewController.swift -get_field_types_FormOptionsSelectorController -FormOptionsViewController.swift -_TMaGSqC10SwiftForms12FormBaseCell_ -_TTSfq4s_s___TFFFs25_unimplementedInitializerFT9classNameVs12StaticString8initNameS_4fileS_4lineSu6columnSu_Os5NeverU0_FGSRVs5UInt8_T_U_FGSRS1__T_ -_TTSg5Ps9AnyObject____TFSa6removefT2atSi_x -_TTSg5Ps9AnyObject____TFSa6appendfxT_ -_TTSg5Ps9AnyObject____TFSa36_reserveCapacityAssumingUniqueBufferfT8oldCountSi_T_ -_TTSg5GSaPs9AnyObject__GSaPS___s10Collections___TFEsPs10Collection5indexfzT5whereFzWx8Iterator7Element_Sb_GSqwx5Index_ -formCell.get -_TTSg5Ps9AnyObject____TFs27_allocateUninitializedArrayurFBwTGSax_Bp_ -_TTSg5Ps9AnyObject____TZFSa13_adoptStoragefTGCs23_ContiguousArrayStoragex_5countSi_TGSax_GSpx__ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferCfT5countSi7storageGCs23_ContiguousArrayStoragex__GS_x_ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBuffer18_initStorageHeaderfT5countSi8capacitySi_T_ -_TTSg5SiSis9Equatables___TFsoi2neuRxs9EquatablerFTxx_Sb -_TTSg5GSaPs9AnyObject__GSaPS___s26RangeReplaceableCollections_GVs15EmptyCollectionPS___GS1_PS___s10Collections___TFesRxs26RangeReplaceableCollectionwx5Indexs10StrideableWxS0_6Stride_s13SignedIntegerrS_15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zWxS5_S6__rfTGVs14CountableRangewxS0__4withqd___T_ -_TTSg5Ps9AnyObject__GVs15EmptyCollectionPS___GS0_PS___s10Collections___TTWurGSax_s26RangeReplaceableCollectionsFS_15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zWxS1_S2__rfTGVs5Rangewx5Index_4withqd___T_ -_TTSg5Ps9AnyObject__GVs15EmptyCollectionPS___GS0_PS___s10Collections___TFSa15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zxrfTGVs5RangeSi_4withqd___T_ -_TTRXFo_oPs9AnyObject__dSbzoPs5Error__XFo_iPS___dSbzoPS0___ -_TFFC10SwiftForms29FormOptionsSelectorController9tableViewFTCSo11UITableView14didSelectRowAtV10Foundation9IndexPath_T_U_FPs9AnyObject_Sb -_TTSf4g_g___TFFC10SwiftForms29FormOptionsSelectorController9tableViewFTCSo11UITableView14didSelectRowAtV10Foundation9IndexPath_T_U_FPs9AnyObject_Sb -_TTSg5Ps9AnyObject____TTWurGSax_s10CollectionsFS_g9subscriptFwx5IndexWx8Iterator7Element_ -_TTSg5Ps9AnyObject____TFSa37_appendElementAssumeUniqueAndCapacityfTSi10newElementx_T_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg19firstElementAddressGSpx_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffers5countSi -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBuffers5countSi -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg8capacitySi -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferg8capacitySi -_TTSf4s_d_n___TTSg5Ps9AnyObject__GVs15EmptyCollectionPS___GS0_PS___s10Collections___TFSa15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zxrfTGVs5RangeSi_4withqd___T_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol23_arrayOutOfPlaceReplaceuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withqd__5countSi_T_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withSi10elementsOfqd___T_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferx__ -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer20isUniquelyReferencedfT_Sb -_TTSg5Ps9AnyObject____TFVs12_ArrayBufferg8endIndexSi -_TTSf4s_d_n_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol23_arrayOutOfPlaceReplaceuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withqd__5countSi_T_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs31_InitializeMemoryFromCollectionGVs15EmptyCollectionPS0____GS2_GS3_PS0____s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g5countSi -_TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs31_InitializeMemoryFromCollectionGVs15EmptyCollectionPS0____GS2_GS3_PS0____s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSg5GVs15EmptyCollectionPs9AnyObject__GS_PS0___s10Collections___TTWuRxs10CollectionrGVs31_InitializeMemoryFromCollectionx_s16_PointerFunctionsFS1_4callfTGSpwx7Element_5countSi_T_ -_TTSg5GVs15EmptyCollectionPs9AnyObject__GS_PS0___s10Collections___TFVs31_InitializeMemoryFromCollection4callfTGSpWx8Iterator7Element__5countSi_T_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpwx7Element__GSpwxS2__ -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBuffer13_copyContentsfT8subRangeGVs5RangeSi_12initializingGSpx__GSpx_ -_TTSf4g_n_n___TTSg5Ps9AnyObject____TFSp10initializefT2tox5countSi_T_ -_TTSg5Ps9AnyObject____TFSp10initializefT4fromGSPx_5countSi_T_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8endIndexSi -_TTSg5Ps9AnyObject____TTWurGVs15EmptyCollectionx_s10CollectionsFS0_g9subscriptFwx5IndexWx8Iterator7Element_ -_TTSg5Ps9AnyObject____TFVs15EmptyCollectiong9subscriptFSix -_TTSg5Ps9AnyObject____TFSp12deinitializefT5countSi_Sv -_TTSg5Ps9AnyObject____TFSp14moveInitializefT4fromGSpx_5countSi_T_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g19firstElementAddressGSpwx7Element_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_33requestUniqueMutableBackingBufferfT15minimumCapacitySi_GSqGVs22_ContiguousArrayBufferwx7Element__ -_TTSf4s_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs15EmptyCollectionPS0___GS2_PS0___s10Collections___TFEsPs20_ArrayBufferProtocol15replaceSubrangeuRd__s10CollectionWd__8Iterator7Element_zwx7ElementrfTGVs5RangeSi_4withSi10elementsOfqd___T_ -_TTSg5Ps9AnyObject____TFSp10moveAssignfT4fromGSpx_5countSi_T_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g20subscriptBaseAddressGSpwx7Element_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocolg20subscriptBaseAddressGSpwx7Element_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_s5countSi -_TTSf4n_n_n_d_n___TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs14_IgnorePointerPS0___GS2_PS0___s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSf4n_n_d___TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -_TMaGCs23_ContiguousArrayStoragePs9AnyObject__ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferCfT_GS_x_ -_TFFC10SwiftForms29FormOptionsSelectorController9tableViewFTCSo11UITableView12cellForRowAtV10Foundation9IndexPath_CSo15UITableViewCellU_FPs9AnyObject_Sb -_TTSf4g_g___TFFC10SwiftForms29FormOptionsSelectorController9tableViewFTCSo11UITableView12cellForRowAtV10Foundation9IndexPath_CSo15UITableViewCellU_FPs9AnyObject_Sb -_TTSg5CSo15UITableViewCellCSo8NSObjects9Equatable5UIKit___TFsoi2eeuRxs9EquatablerFTGSqx_GSqx__Sb -_TMaC10SwiftForms29FormOptionsSelectorController -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT17countForNewBufferSi14minNewCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol35_forceCreateUniqueMutableBufferImplfT14countForBufferSi14minNewCapacitySi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSg5Ps9AnyObject____TFVs22_ContiguousArrayBufferCfT19_uninitializedCountSi15minimumCapacitySi_GS_x_ -_TTSg5Ps9AnyObject____TTWurGVs12_ArrayBufferx_s20_ArrayBufferProtocolsFS0_g8capacitySi -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols___TFEsPs20_ArrayBufferProtocol31_forceCreateUniqueMutableBufferfT8newCountSi16requiredCapacitySi_GVs22_ContiguousArrayBufferwx7Element_ -_TTSf1n_n_cl134_TFFFs25_unimplementedInitializerFT9classNameVs12StaticString8initNameS_4fileS_4lineSu6columnSu_Os5NeverU0_FGSRVs5UInt8_T_U_FGSRS1__T_GSRVs5UInt8____TTSfq1n_cl39_TTRXFo_dGSRVs5UInt8___XFo_dGSRS___iT__XFo_dGSRVs5UInt8____n___TTSgq5T____TFVs12StaticString14withUTF8BufferurfFGSRVs5UInt8_xx -_TTSfq0n_k_k___TFFVs12StaticString14withUTF8BufferurFFGSRVs5UInt8_xxU_FS0_T_ -_TFFFs25_unimplementedInitializerFT9classNameVs12StaticString8initNameS_4fileS_4lineSu6columnSu_Os5NeverU0_FGSRVs5UInt8_T_U_FGSRS1__T_ -_TTSg5Ps9AnyObject____TFSa16_copyToNewBufferfT8oldCountSi_T_ -_TTSg5GVs12_ArrayBufferPs9AnyObject__GS_PS0___s20_ArrayBufferProtocols_GVs14_IgnorePointerPS0___GS2_PS0___s16_PointerFunctions___TFEsPs20_ArrayBufferProtocol22_arrayOutOfPlaceUpdateuRd__s16_PointerFunctionwd__7Elementzwx7ElementrfTRGVs22_ContiguousArrayBufferwxS2__SiSiqd___T_ -_TTSg5Ps9AnyObject____TFSa40_makeUniqueAndReserveCapacityIfNotUniquefT_T_ -_TTSg5Ps9AnyObject____TFVs12_ArrayBuffer30isMutableAndUniquelyReferencedfT_Sb -_TTSfq1n_cl39_TTRXFo_dGSRVs5UInt8___XFo_dGSRS___iT__XFo_dGSRVs5UInt8____n___TTSgq5T____TFVs12StaticString14withUTF8BufferurfFGSRVs5UInt8_xx -_TFFs25_unimplementedInitializerFT9classNameVs12StaticString8initNameS_4fileS_4lineSu6columnSu_Os5NeverU0_FGSRVs5UInt8_T_ -formCell.materialize -formCell.set -_TToFC10SwiftForms29FormOptionsSelectorControllers8formCellGSqCS_12FormBaseCell_ -_TToFC10SwiftForms29FormOptionsSelectorControllerg8formCellGSqCS_12FormBaseCell_ -__TToFC10SwiftForms12FormDateCell9configurefT_T_ -__TToFC10SwiftForms12FormDateCell6updatefT_T_ -__TToZFC10SwiftForms12FormDateCell18formViewControllerfTCS_18FormViewController12didSelectRowCS_12FormBaseCell_T_ -__TToFC10SwiftForms12FormDateCell21firstResponderElementfT_GSqCSo11UIResponder_ -__TToZFC10SwiftForms12FormDateCell30formRowCanBecomeFirstResponderfT_Sb -__TToFC10SwiftForms12FormDateCellcfT5styleOSC20UITableViewCellStyle15reuseIdentifierGSQSS__S0_ -__TToFC10SwiftForms12FormDateCellcfT5coderCSo7NSCoder_GSqS0__ -__TWvdvC10SwiftForms12FormDateCellP33_C023FAD6768D46095D3739AAF2D7822915hiddenTextFieldCSo11UITextField -__TWvdvC10SwiftForms12FormDateCellP33_C023FAD6768D46095D3739AAF2D7822910datePickerCSo12UIDatePicker -__TWvdvC10SwiftForms12FormDateCellP33_C023FAD6768D46095D3739AAF2D7822920defaultDateFormatterCSo13DateFormatter -__TWoFC10SwiftForms12FormDateCell12valueChangedfCSo12UIDatePickerT_ -__TWoFC10SwiftForms12FormDateCellP33_C023FAD6768D46095D3739AAF2D7822916getDateFormatterfT_CSo13DateFormatter -__TMfC10SwiftForms12FormDateCell -__TMRfC10SwiftForms12FormDateCell -__TMRsC10SwiftForms12FormDateCell -__TMRfCSo12UIDatePicker -__TMRsCSo12UIDatePicker -__TMRfCSo13DateFormatter -__TMRsCSo13DateFormatter -__TMLCSo12UIDatePicker -__TMLCSo13DateFormatter -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/cells/FormDateCell.swift -get_field_types_FormDateCell -FormDateCell.swift -_TMaCSo13DateFormatter -_TMaCSo12UIDatePicker -getDateFormatter -_TMaC10SwiftForms12FormDateCell -__TwxsOC10SwiftForms17FormRowDescriptor7RowType -__TwxgOC10SwiftForms17FormRowDescriptor7RowType -__TwugOC10SwiftForms17FormRowDescriptor7RowType -__TwupOC10SwiftForms17FormRowDescriptor7RowType -__TwuiOC10SwiftForms17FormRowDescriptor7RowType -__TwXXVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwdeVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwxxVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwcpVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwcaVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwTkVC10SwiftForms17FormRowDescriptor17CellConfiguration -___swift_memcpy48_4 -__TwtaVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwalVC10SwiftForms17FormRowDescriptor17CellConfiguration -___swift_copy_outline_pointer -__TwXxVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwCcVC10SwiftForms17FormRowDescriptor17CellConfiguration -___swift_memmove_array48_4 -__TwxsVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwxgVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwXXVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwdeVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwxxVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwcpVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwcaVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwTkVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -___swift_memcpy17_4 -__TwtaVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwalVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwXxVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwCcVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -___swift_memmove_array20_4 -__TwXXVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwxxVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwcpVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwcaVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -___swift_memcpy8_4 -__TwtaVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwXxVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwCcVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -___swift_memmove_array8_4 -__TwXXVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor20StepperConfiguration -___swift_memcpy25_8 -__TwalVC10SwiftForms17FormRowDescriptor20StepperConfiguration -___swift_memcpy_array32_8 -___swift_memmove_array32_8 -__TwXXVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwcpVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwcaVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwtaVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwXxVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwCcVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwXXVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwCPVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwprVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwdeVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwxxVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwcpVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwcaVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwTkVC10SwiftForms17FormRowDescriptor16RowConfiguration -___swift_memcpy116_8 -__TwtaVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwalVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwXxVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwCcVC10SwiftForms17FormRowDescriptor16RowConfiguration -___swift_memmove_array120_8 -__TwxsVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwxgVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TwCpVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwxgVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwxgVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwxgVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwprVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwprVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TwprVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TwdeVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TwxxVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TwTkVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TwxsVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TwxsVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TwxsVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TMfC10SwiftForms17FormRowDescriptor -__TMfOC10SwiftForms17FormRowDescriptor7RowType -__TMRfOC10SwiftForms17FormRowDescriptor7RowType -__TMfVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor17CellConfiguration -__TMfVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__TMfVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__TMfVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__TMfVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor17DateConfiguration -__TMfVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TMRfVC10SwiftForms17FormRowDescriptor16RowConfiguration -__TMRfC10SwiftForms17FormRowDescriptor -__TMLGVs10DictionarySSPs9AnyObject__ -__TMLGSqCSo13DateFormatter_ -__TMLGSqFC10SwiftForms17FormRowDescriptorT__ -__TMLFC10SwiftForms17FormRowDescriptorT_ -__TMLGSqPMPs9AnyObject__ -__TMLPMPs9AnyObject_ -__TMLGSqFPs9AnyObject_SS_ -__TMLFPs9AnyObject_SS -__TMLGSqFC10SwiftForms12FormBaseCellGSaSS__ -__TMLFC10SwiftForms12FormBaseCellGSaSS_ -__TMLGSaSS_ -__TMLGSqPs9AnyObject__ -/Volumes/Development/FinalYearProject-MyMind/My Mind/Carthage/Checkouts/SwiftForms/SwiftForms/descriptors/FormRowDescriptor.swift -initialize_metadata_RowConfiguration -FormRowDescriptor.swift -_TMaVC10SwiftForms17FormRowDescriptor16RowConfiguration -get_field_types_RowConfiguration -_TMaGVs10DictionarySSPs9AnyObject__ -_TMaVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TMaVC10SwiftForms17FormRowDescriptor20StepperConfiguration -_TMaVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TMaVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TMaVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwxgVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwxsVC10SwiftForms17FormRowDescriptor16RowConfiguration -__swift_memmove_array120_8 -_TwCcVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwXxVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwalVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwtaVC10SwiftForms17FormRowDescriptor16RowConfiguration -__swift_memcpy116_8 -_TwTkVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwcaVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwcpVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwCpVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwxxVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwdeVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwprVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor16RowConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor16RowConfiguration -initialize_metadata_DateConfiguration -get_field_types_DateConfiguration -_TMaGSqCSo13DateFormatter_ -_TwCcVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwXxVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwtaVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwcaVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwcpVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor17DateConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor17DateConfiguration -initialize_metadata_StepperConfiguration -get_field_types_StepperConfiguration -__swift_memmove_array32_8 -__swift_memcpy_array32_8 -_TwalVC10SwiftForms17FormRowDescriptor20StepperConfiguration -__swift_memcpy25_8 -_TwCpVC10SwiftForms17FormRowDescriptor20StepperConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor20StepperConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor20StepperConfiguration -initialize_metadata_ButtonConfiguration -get_field_types_ButtonConfiguration -_TMaGSqFC10SwiftForms17FormRowDescriptorT__ -_TMaFC10SwiftForms17FormRowDescriptorT_ -__swift_memmove_array8_4 -_TwCcVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwXxVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwtaVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -__swift_memcpy8_4 -_TwcaVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwcpVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwCpVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwxxVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor19ButtonConfiguration -initialize_metadata_SelectionConfiguration -get_field_types_SelectionConfiguration -_TMaGSqFPs9AnyObject_SS_ -_TMaFPs9AnyObject_SS -_TMaGSqPMPs9AnyObject__ -_TMaPMPs9AnyObject_ -__swift_memmove_array20_4 -_TwCcVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwXxVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwalVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwtaVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -__swift_memcpy17_4 -_TwTkVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwcaVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwcpVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwCpVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwxxVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwdeVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor22SelectionConfiguration -initialize_metadata_CellConfiguration -get_field_types_CellConfiguration -_TMaGSqFC10SwiftForms12FormBaseCellGSaSS__ -_TMaFC10SwiftForms12FormBaseCellGSaSS_ -_TMaGSaSS_ -_TwxgVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwxsVC10SwiftForms17FormRowDescriptor17CellConfiguration -__swift_memmove_array48_4 -_TwCcVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwXxVC10SwiftForms17FormRowDescriptor17CellConfiguration -__swift_copy_outline_pointer -_TwalVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwtaVC10SwiftForms17FormRowDescriptor17CellConfiguration -__swift_memcpy48_4 -_TwTkVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwcaVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwcpVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwCpVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwxxVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwdeVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwCPVC10SwiftForms17FormRowDescriptor17CellConfiguration -_TwXXVC10SwiftForms17FormRowDescriptor17CellConfiguration -initialize_metadata_RowType -_TMaOC10SwiftForms17FormRowDescriptor7RowType -get_field_types_RowType -_TwuiOC10SwiftForms17FormRowDescriptor7RowType -_TwupOC10SwiftForms17FormRowDescriptor7RowType -_TwugOC10SwiftForms17FormRowDescriptor7RowType -_TwxgOC10SwiftForms17FormRowDescriptor7RowType -_TwxsOC10SwiftForms17FormRowDescriptor7RowType -get_field_types_FormRowDescriptor -_TMaGSqPs9AnyObject__ -_TWaOC10SwiftForms17FormRowDescriptor7RowTypes9_HashableS_ -_TWaOC10SwiftForms17FormRowDescriptor7RowTypes8HashableS_ -_TWaOC10SwiftForms17FormRowDescriptor7RowTypes9EquatableS_ -_TMaC10SwiftForms17FormRowDescriptor -value.didset -value.willset -configuration.materialize -configuration.set -configuration.get -type.get -tag.get -value.get -userInfo.materialize -userInfo.set -userInfo.get -date.materialize -date.set -date.get -stepper.materialize -stepper.set -stepper.get -button.materialize -button.set -button.get -selection.materialize -selection.set -selection.get -cell.materialize -cell.set -cell.get -dateFormatter.materialize -dateFormatter.set -dateFormatter.get -continuous.materialize -continuous.set -continuous.get -steps.materialize -steps.set -steps.get -minimumValue.materialize -minimumValue.set -minimumValue.get -maximumValue.materialize -maximumValue.set -maximumValue.get -didSelectClosure.materialize -didSelectClosure.set -didSelectClosure.get -allowsMultipleSelection.materialize -allowsMultipleSelection.set -allowsMultipleSelection.get -optionTitleClosure.materialize -optionTitleClosure.set -optionTitleClosure.get -options.materialize -options.set -options.get -controllerClass.materialize -controllerClass.set -controllerClass.get -visualConstraintsClosure.materialize -visualConstraintsClosure.set -visualConstraintsClosure.get -didUpdateClosure.materialize -didUpdateClosure.set -didUpdateClosure.get -willUpdateClosure.materialize -willUpdateClosure.set -willUpdateClosure.get -required.materialize -required.set -required.get -showsInputToolbar.materialize -showsInputToolbar.set -showsInputToolbar.get -placeholder.materialize -placeholder.set -placeholder.get -appearance.materialize -appearance.set -appearance.get -cellClass.materialize -cellClass.set -cellClass.get -/Users/alexanderdavis/Library/Caches/org.carthage.CarthageKit/DerivedData/SwiftForms/1.7/Build/Intermediates/SwiftFormsApplication.build/Release-iphoneos/SwiftForms.build/DerivedSources/SwiftForms_vers.c -__ZL15__ARCLite__loadv -__ZL30add_image_hook_autoreleasepoolPK11mach_headerl -__ZL34__arclite_objc_autoreleasePoolPushv -__ZL33__arclite_objc_autoreleasePoolPopPv -__ZL19patch_lazy_pointersPK11mach_headerP7patch_tm -__ZL42__arclite_NSArray_objectAtIndexedSubscriptP7NSArrayP13objc_selectorj -__ZL53__arclite_NSMutableArray_setObject_atIndexedSubscriptP14NSMutableArrayP13objc_selectorP11objc_objectj -__ZL46__arclite_NSDictionary_objectForKeyedSubscriptP12NSDictionaryP13objc_selectorP11objc_object -__ZL47__arclite_NSOrderedSet_objectAtIndexedSubscriptP12NSOrderedSetP13objc_selectorj -__ZL58__arclite_NSMutableOrderedSet_setObject_atIndexedSubscriptP19NSMutableOrderedSetP13objc_selectorP11objc_objectj -__ZL58__arclite_NSMutableDictionary__setObject_forKeyedSubscriptP19NSMutableDictionaryP13objc_selectorP11objc_objectS4_ -__ZL18add_image_hook_ARCPK11mach_headerl -__ZL36__arclite_object_setInstanceVariableP11objc_objectPKcPv -__ZL24__arclite_object_setIvarP11objc_objectP9objc_ivarS0_ -__ZL21__arclite_object_copyP11objc_objectm -__ZL21__arclite_objc_retainP11objc_object -__ZL26__arclite_objc_retainBlockP11objc_object -__ZL22__arclite_objc_releaseP11objc_object -__ZL26__arclite_objc_autoreleaseP11objc_object -__ZL32__arclite_objc_retainAutoreleaseP11objc_object -__ZL37__arclite_objc_autoreleaseReturnValueP11objc_object -__ZL43__arclite_objc_retainAutoreleaseReturnValueP11objc_object -__ZL44__arclite_objc_retainAutoreleasedReturnValueP11objc_object -__ZL26__arclite_objc_storeStrongPP11objc_objectS0_ -__ZL22add_image_hook_swiftV1PK11mach_headerl -__ZL42__arclite_NSUndoManagerProxy_isKindOfClassP11objc_objectP13objc_selectorP10objc_class -__ZL13replaceMethodP10objc_classP13objc_selectorPFP11objc_objectS4_S2_zEPS6_ -__ZL30__arclite_NSManagedObject_initP11objc_objectP13objc_selector -__ZL41__arclite_NSManagedObject_allocWithEntityP11objc_objectP13objc_selectorS0_ -__ZL36__arclite_NSManagedObject_allocBatchP11objc_objectP13objc_selectorPS0_S0_j -__ZL37__arclite_NSKKMS_fastIndexForKnownKeyP11objc_objectP13objc_selectorS0_ -__ZL28__arclite_NSKKMS_indexForKeyP11objc_objectP13objc_selectorS0_ -__ZL29__arclite_NSKKsD_objectForKeyP11objc_objectP13objc_selectorS0_ -__ZL35__arclite_NSKKsD_removeObjectForKeyP11objc_objectP13objc_selectorS0_ -__ZL33__arclite_NSKKsD_setObject_forKeyP11objc_objectP13objc_selectorS0_S0_ -__ZL41__arclite_NSKKsD_addEntriesFromDictionaryP11objc_objectP13objc_selectorP12NSDictionary -__ZL28__arclite_objc_readClassPairP10objc_classPK15objc_image_info -__ZL32__arclite_objc_allocateClassPairP10objc_classPKcm -__ZL32__arclite_object_getIndexedIvarsP11objc_object -__ZL23__arclite_objc_getClassPKc -__ZL27__arclite_objc_getMetaClassPKc -__ZL31__arclite_objc_getRequiredClassPKc -__ZL26__arclite_objc_lookUpClassPKc -__ZL26__arclite_objc_getProtocolPKc -__ZL23__arclite_class_getNameP10objc_class -__ZL26__arclite_protocol_getNameP8Protocol -__ZL37__arclite_objc_copyClassNamesForImagePKcPj -__ZL17transcribeMethodsP10objc_classP15glue_class_ro_t -__ZL19transcribeProtocolsP10objc_classP15glue_class_ro_t -__ZL20transcribePropertiesP10objc_classP15glue_class_ro_t -__ZL14initialize_impP11objc_objectP13objc_selector -__ZL18allocateMaybeSwiftP18glue_swift_class_tm -__ZL22copySwiftV1MangledNamePKcb -__ZL13demangledNamePKcb -__ZL16scanMangledFieldRPKcS0_S1_Ri -__ZL30arclite_uninitialized_functionv -__ZL12cxxConstructP11objc_object -__ZL20fixStringForCoreDataP11objc_object -_OBJC_METACLASS_$___ARCLite__ -__ZL24OBJC_CLASS_$___ARCLite__ -__ZL31OBJC_METACLASS_RO_$___ARCLite__ -__non_lazy_classes -__ZL27OBJC_CLASS_RO_$___ARCLite__ -__ZL11_class_name -__ZL32OBJC_$_CLASS_METHODS___ARCLite__ -__ZL17_load_method_name -__ZL17_load_method_type -__ZL23NSAutoreleasePool_class -__ZZL30add_image_hook_autoreleasepoolPK11mach_headerlE7patches -__ZGVZL30add_image_hook_autoreleasepoolPK11mach_headerlE7patches -l_OBJC_PROTOCOL_$___ARCLiteIndexedSubscripting__ -l_OBJC_LABEL_PROTOCOL_$___ARCLiteIndexedSubscripting__ -l_OBJC_PROTOCOL_REFERENCE_$___ARCLiteIndexedSubscripting__ -l_OBJC_PROTOCOL_$___ARCLiteKeyedSubscripting__ -l_OBJC_LABEL_PROTOCOL_$___ARCLiteKeyedSubscripting__ -l_OBJC_PROTOCOL_REFERENCE_$___ARCLiteKeyedSubscripting__ -__ZZL18add_image_hook_ARCPK11mach_headerlE7patches -__ZGVZL18add_image_hook_ARCPK11mach_headerlE7patches -__ZL30NSUndoManagerProxy_targetClass -__ZL29original_NSManagedObject_init -__ZL40original_NSManagedObject_allocWithEntity -__ZL35original_NSManagedObject_allocBatch -__ZL25NSMutableDictionary_class -__ZL22NSConstantString_class -__ZL14NSString_class -__ZL36original_NSKKMS_fastIndexForKnownKey -__ZL27original_NSKKMS_indexForKey -__ZL28original_NSKKsD_objectForKey -__ZL34original_NSKKsD_removeObjectForKey -__ZL32original_NSKKsD_setObject_forKey -__ZL40original_NSKKsD_addEntriesFromDictionary -__ZZL22add_image_hook_swiftV1PK11mach_headerlE7patches -__ZGVZL22add_image_hook_swiftV1PK11mach_headerlE7patches -__ZL31original_objc_allocateClassPair -__ZL31original_object_getIndexedIvars -__ZL22original_objc_getClass -__ZL26original_objc_getMetaClass -__ZL30original_objc_getRequiredClass -__ZL25original_objc_lookUpClass -__ZL25original_objc_getProtocol -__ZL22original_class_getName -__ZL25original_protocol_getName -__ZL36original_objc_copyClassNamesForImage -__ZL12demangleLock -__ZL9Demangled -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11 -Wno-trigraphs -fno-exceptions -fno-rtti -mpascal-strings -Os -Wno-missing-field-initializers -Wmissing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -Wno-c++11-extensions -D NDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.Internal.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -miphoneos-version-min=4.3 -g -fno-threadsafe-statics -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -fembed-bitcode=all -iquote /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/arclite_iphoneos-generated-files.hmap -I /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/arclite_iphoneos-own-target-headers.hmap -I /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/arclite_iphoneos-all-target-headers.hmap -iquote /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/arclite_iphoneos-project-headers.hmap -I /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/Symbols/BuiltProducts/include -I /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/DerivedSources/armv7 -I /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/DerivedSources -F/Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/Symbols/BuiltProducts -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.Internal.sdk/System/Library/PrivateFrameworks -Wall -Wextra -Wno-gcc-compat -Wno-error=incomplete-umbrella -Wno-error=incomplete-umbrella -MMD -MT dependencies -MF /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/Objects-normal/armv7/arclite.d --serialize-diagnostics /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/Objects-normal/armv7/arclite.dia -c /Library/Caches/com.apple.xbs/Sources/arclite_iOS/arclite-66/source/arclite.mm -o /Library/Caches/com.apple.xbs/Binaries/arclite_iOS/arclite_iOS-66~479/TempContent/Objects/arclite.build/arclite_iOS.build/Objects-normal/armv7/arclite.o -mlinker-version=278.4 -march=armv7a -/Library/Caches/com.apple.xbs/Sources/arclite_iOS/arclite-66/source/arclite.mm -/Library/Caches/com.apple.xbs/Sources/arclite_iOS/arclite-66 -fixStringForCoreData -cxxConstruct -arclite_uninitialized_function -scanMangledField -isdigit -/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.Internal.sdk/usr/include/ctype.h -__isctype -demangledName -copySwiftV1DemangledName -copySwiftV1MangledName -allocateMaybeSwift -word_align -isSwift -initialize_imp -transcribeProperties -property_list_nth -transcribeProtocols -transcribeMethods -data -method_list_nth -__arclite_objc_copyClassNamesForImage -__arclite_protocol_getName -__arclite_class_getName -__arclite_objc_getProtocol -__arclite_objc_lookUpClass -__arclite_objc_getRequiredClass -__arclite_objc_getMetaClass -__arclite_objc_getClass -__arclite_object_getIndexedIvars -__arclite_objc_allocateClassPair -metaclass -__arclite_objc_readClassPair -transcribeIvars -ivar_list_nth -max -alignment -ro -fastFlags -__arclite_NSKKsD_addEntriesFromDictionary -__arclite_NSKKsD_setObject_forKey -__arclite_NSKKsD_removeObjectForKey -__arclite_NSKKsD_objectForKey -__arclite_NSKKMS_indexForKey -__arclite_NSKKMS_fastIndexForKnownKey -__arclite_NSManagedObject_allocBatch -__arclite_NSManagedObject_allocWithEntity -__arclite_NSManagedObject_init -replaceMethod -__arclite_NSUndoManagerProxy_isKindOfClass -add_image_hook_swiftV1 -patch_t -patch_t -patch_t -patch_t -patch_t -patch_t -patch_t -patch_t -__arclite_objc_storeStrong -__arclite_objc_release -__arclite_objc_retain -__arclite_objc_retainAutoreleasedReturnValue -__arclite_objc_retainAutoreleaseReturnValue -__arclite_objc_autoreleaseReturnValue -__arclite_objc_retainAutorelease -__arclite_objc_autorelease -__arclite_objc_retainBlock -__arclite_object_copy -fixupCopiedReferences -_class_getInstanceStart -alignedInstanceStart -__arclite_class_usesAutomaticRetainRelease -classOrSuperClassesUseARR -__arclite_object_setIvar -isScannedOffset -_ivar_getClass -__arclite_object_setInstanceVariable -add_image_hook_ARC -patch_t -patch_t -patch_t -patch_t -patch_t -patch_t -__arclite_NSMutableDictionary__setObject_forKeyedSubscript -__arclite_NSMutableOrderedSet_setObject_atIndexedSubscript -__arclite_NSOrderedSet_objectAtIndexedSubscript -__arclite_NSDictionary_objectForKeyedSubscript -__arclite_NSMutableArray_setObject_atIndexedSubscript -__arclite_NSArray_objectAtIndexedSubscript -patch_lazy_pointers -__arclite_objc_autoreleasePoolPop -__arclite_objc_autoreleasePoolPush -add_image_hook_autoreleasepool -patch_t -patch_t -__ARCLite__load -install_swiftV1 -install_ARC -install_dict_nil_value -addOrReplaceMethod -keyedGetter -install_subscripting -addMethod -indexedGetter -install_autoreleasepool diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Info.plist b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Info.plist deleted file mode 100755 index 256ef6c..0000000 --- a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleIdentifier - com.apple.xcode.dsym.com.ortulabs.SwiftForms - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - dSYM - CFBundleSignature - ???? - CFBundleShortVersionString - 1.6.2 - CFBundleVersion - 1 - - diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Resources/DWARF/SwiftForms b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Resources/DWARF/SwiftForms deleted file mode 100755 index 3fd6055..0000000 Binary files a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Resources/DWARF/SwiftForms and /dev/null differ diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms-Swift.h b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms-Swift.h deleted file mode 100755 index 556050a..0000000 --- a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms-Swift.h +++ /dev/null @@ -1,380 +0,0 @@ -// Generated by Apple Swift version 3.1 (swiftlang-802.0.51 clang-802.0.41) -#pragma clang diagnostic push - -#if defined(__has_include) && __has_include() -# include -#endif - -#pragma clang diagnostic ignored "-Wauto-import" -#include -#include -#include -#include - -#if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if defined(__has_include) && __has_include() -# include -# elif !defined(__cplusplus) || __cplusplus < 201103L -typedef uint_least16_t char16_t; -typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); -#endif - -#if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) -#endif -#if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class -#endif -#if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif -#endif - -#if defined(__has_attribute) && __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) -#else -# define SWIFT_RUNTIME_NAME(X) -#endif -#if defined(__has_attribute) && __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) -#else -# define SWIFT_COMPILE_NAME(X) -#endif -#if defined(__has_attribute) && __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) -#else -# define SWIFT_METHOD_FAMILY(X) -#endif -#if defined(__has_attribute) && __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) -#else -# define SWIFT_NOESCAPE -#endif -#if defined(__has_attribute) && __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -# define SWIFT_WARN_UNUSED_RESULT -#endif -#if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA -#endif -#if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA -#endif -#if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA -#endif -#if !defined(SWIFT_CLASS) -# if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif -#endif - -#if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -#endif - -#if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) -#endif - -#if !defined(OBJC_DESIGNATED_INITIALIZER) -# if defined(__has_attribute) && __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif -#endif -#if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name) enum _name : _type _name; enum SWIFT_ENUM_EXTRA _name : _type -# if defined(__has_feature) && __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) SWIFT_ENUM(_type, _name) -# endif -#endif -#if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) -#endif -#if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) -#endif -#if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) -#endif -#if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) -#endif -#if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) -#endif -#if defined(__has_feature) && __has_feature(modules) -@import UIKit; -@import CoreGraphics; -@import ObjectiveC; -@import Foundation; -#endif - -#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" -#pragma clang diagnostic ignored "-Wduplicate-method-arg" -@class FormViewController; -@class NSCoder; -@class UIView; -@class UIResponder; -@class UIToolbar; - -SWIFT_CLASS("_TtC10SwiftForms12FormBaseCell") -@interface FormBaseCell : UITableViewCell -@property (nonatomic, weak) FormViewController * _Nullable formViewController; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -- (void)configure; -- (void)update; -- (NSArray * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT; -- (NSDictionary * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT; -- (UIResponder * _Nullable)firstResponderElement SWIFT_WARN_UNUSED_RESULT; -- (UIToolbar * _Nonnull)inputAccesoryView SWIFT_WARN_UNUSED_RESULT; -+ (CGFloat)formRowCellHeight SWIFT_WARN_UNUSED_RESULT; -+ (BOOL)formRowCanBecomeFirstResponder SWIFT_WARN_UNUSED_RESULT; -+ (void)formViewController:(FormViewController * _Nonnull)formViewController didSelectRow:(FormBaseCell * _Nonnull)didSelectRow; -- (void)updateConstraints; -@end - -@class UILabel; - -SWIFT_CLASS("_TtC10SwiftForms13FormTitleCell") -@interface FormTitleCell : FormBaseCell -@property (nonatomic, readonly, strong) UILabel * _Nonnull titleLabel; -- (void)configure; -- (NSDictionary * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT; -- (NSArray * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - - -SWIFT_CLASS("_TtC10SwiftForms14FormButtonCell") -@interface FormButtonCell : FormTitleCell -- (void)configure; -- (void)update; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - - -SWIFT_CLASS("_TtC10SwiftForms13FormCheckCell") -@interface FormCheckCell : FormTitleCell -- (void)configure; -- (void)update; -+ (void)formViewController:(FormViewController * _Nonnull)formViewController didSelectRow:(FormBaseCell * _Nonnull)selectedRow; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - - -SWIFT_CLASS("_TtC10SwiftForms13FormValueCell") -@interface FormValueCell : FormBaseCell -@property (nonatomic, readonly, strong) UILabel * _Nonnull titleLabel; -@property (nonatomic, readonly, strong) UILabel * _Nonnull valueLabel; -- (void)configure; -- (NSDictionary * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT; -- (NSArray * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - - -SWIFT_CLASS("_TtC10SwiftForms12FormDateCell") -@interface FormDateCell : FormValueCell -- (void)configure; -- (void)update; -+ (void)formViewController:(FormViewController * _Nonnull)formViewController didSelectRow:(FormBaseCell * _Nonnull)selectedRow; -- (UIResponder * _Nullable)firstResponderElement SWIFT_WARN_UNUSED_RESULT; -+ (BOOL)formRowCanBecomeFirstResponder SWIFT_WARN_UNUSED_RESULT; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - - -SWIFT_PROTOCOL("_TtP10SwiftForms12FormSelector_") -@protocol FormSelector -@property (nonatomic, strong) FormBaseCell * _Nullable formCell; -@end - -@class NSBundle; -@class UITableView; - -SWIFT_CLASS("_TtC10SwiftForms29FormOptionsSelectorController") -@interface FormOptionsSelectorController : UITableViewController -@property (nonatomic, strong) FormBaseCell * _Nullable formCell; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -- (nonnull instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE; -- (void)viewDidLoad; -- (NSInteger)numberOfSectionsInTableView:(UITableView * _Nonnull)tableView SWIFT_WARN_UNUSED_RESULT; -- (NSInteger)tableView:(UITableView * _Nonnull)tableView numberOfRowsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT; -- (CGFloat)tableView:(UITableView * _Nonnull)tableView heightForHeaderInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT; -- (UITableViewCell * _Nonnull)tableView:(UITableView * _Nonnull)tableView cellForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT; -- (void)tableView:(UITableView * _Nonnull)tableView didSelectRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath; -- (nonnull instancetype)initWithStyle:(UITableViewStyle)style SWIFT_UNAVAILABLE; -@end - -@class UIPickerView; - -SWIFT_CLASS("_TtC10SwiftForms14FormPickerCell") -@interface FormPickerCell : FormValueCell -- (void)configure; -- (void)update; -- (UIResponder * _Nullable)firstResponderElement SWIFT_WARN_UNUSED_RESULT; -+ (void)formViewController:(FormViewController * _Nonnull)formViewController didSelectRow:(FormBaseCell * _Nonnull)selectedRow; -- (NSString * _Nullable)pickerView:(UIPickerView * _Nonnull)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component SWIFT_WARN_UNUSED_RESULT; -- (void)pickerView:(UIPickerView * _Nonnull)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component; -- (NSInteger)numberOfComponentsInPickerView:(UIPickerView * _Nonnull)pickerView SWIFT_WARN_UNUSED_RESULT; -- (NSInteger)pickerView:(UIPickerView * _Nonnull)pickerView numberOfRowsInComponent:(NSInteger)component SWIFT_WARN_UNUSED_RESULT; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - -@class UISegmentedControl; - -SWIFT_CLASS("_TtC10SwiftForms24FormSegmentedControlCell") -@interface FormSegmentedControlCell : FormBaseCell -@property (nonatomic, readonly, strong) UILabel * _Nonnull titleLabel; -@property (nonatomic, readonly, strong) UISegmentedControl * _Nonnull segmentedControl; -- (void)configure; -- (void)update; -- (NSDictionary * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT; -- (NSArray * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - - - -SWIFT_CLASS("_TtC10SwiftForms16FormSelectorCell") -@interface FormSelectorCell : FormValueCell -- (void)update; -+ (void)formViewController:(FormViewController * _Nonnull)formViewController didSelectRow:(FormBaseCell * _Nonnull)selectedRow; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - -@class UISlider; - -SWIFT_CLASS("_TtC10SwiftForms14FormSliderCell") -@interface FormSliderCell : FormTitleCell -@property (nonatomic, readonly, strong) UISlider * _Nonnull sliderView; -- (void)configure; -- (void)update; -- (NSDictionary * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT; -- (NSArray * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - -@class UIStepper; - -SWIFT_CLASS("_TtC10SwiftForms15FormStepperCell") -@interface FormStepperCell : FormTitleCell -@property (nonatomic, readonly, strong) UIStepper * _Nonnull stepperView; -@property (nonatomic, readonly, strong) UILabel * _Nonnull countLabel; -- (void)configure; -- (void)update; -- (NSDictionary * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT; -- (NSArray * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - -@class UISwitch; - -SWIFT_CLASS("_TtC10SwiftForms14FormSwitchCell") -@interface FormSwitchCell : FormTitleCell -@property (nonatomic, readonly, strong) UISwitch * _Nonnull switchView; -- (void)configure; -- (void)update; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - -@class UITextField; - -SWIFT_CLASS("_TtC10SwiftForms17FormTextFieldCell") -@interface FormTextFieldCell : FormBaseCell -@property (nonatomic, readonly, strong) UILabel * _Nonnull titleLabel; -@property (nonatomic, readonly, strong) UITextField * _Nonnull textField; -- (void)configure; -- (void)update; -- (NSDictionary * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT; -- (NSArray * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT; -- (UIResponder * _Nullable)firstResponderElement SWIFT_WARN_UNUSED_RESULT; -+ (BOOL)formRowCanBecomeFirstResponder SWIFT_WARN_UNUSED_RESULT; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - -@class UITextView; - -SWIFT_CLASS("_TtC10SwiftForms16FormTextViewCell") -@interface FormTextViewCell : FormBaseCell -@property (nonatomic, readonly, strong) UILabel * _Nonnull titleLabel; -@property (nonatomic, readonly, strong) UITextView * _Nonnull textField; -+ (CGFloat)formRowCellHeight SWIFT_WARN_UNUSED_RESULT; -- (void)configure; -- (void)update; -- (NSDictionary * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT; -- (NSArray * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT; -- (void)textViewDidChange:(UITextView * _Nonnull)textView; -- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - - - - -SWIFT_CLASS("_TtC10SwiftForms18FormViewController") -@interface FormViewController : UITableViewController -- (nonnull instancetype)init; -- (nonnull instancetype)initWithStyle:(UITableViewStyle)style OBJC_DESIGNATED_INITIALIZER; -- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER; -- (nonnull instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -- (void)viewDidLoad; -- (id _Nullable)valueForTag:(NSString * _Nonnull)tag SWIFT_WARN_UNUSED_RESULT; -- (void)setValue:(id _Nonnull)value forTag:(NSString * _Nonnull)tag; -- (NSInteger)numberOfSectionsInTableView:(UITableView * _Nonnull)tableView SWIFT_WARN_UNUSED_RESULT; -- (NSInteger)tableView:(UITableView * _Nonnull)tableView numberOfRowsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT; -- (UITableViewCell * _Nonnull)tableView:(UITableView * _Nonnull)tableView cellForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT; -- (NSString * _Nullable)tableView:(UITableView * _Nonnull)tableView titleForHeaderInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT; -- (NSString * _Nullable)tableView:(UITableView * _Nonnull)tableView titleForFooterInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT; -- (UIView * _Nullable)tableView:(UITableView * _Nonnull)tableView viewForFooterInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT; -- (UIView * _Nullable)tableView:(UITableView * _Nonnull)tableView viewForHeaderInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT; -- (CGFloat)tableView:(UITableView * _Nonnull)tableView heightForHeaderInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT; -- (CGFloat)tableView:(UITableView * _Nonnull)tableView heightForFooterInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT; -- (CGFloat)tableView:(UITableView * _Nonnull)tableView heightForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT; -- (void)tableView:(UITableView * _Nonnull)tableView didSelectRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath; -@end - -#pragma clang diagnostic pop diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms.h b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms.h deleted file mode 100755 index b14d579..0000000 --- a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// SwiftForms.h -// SwiftForms -// -// Created by Miguel Angel Ortuno Ortuno on 14/5/15. -// Copyright (c) 2015 Miguel Angel Ortuno Ortuno. All rights reserved. -// - -#import - -//! Project version number for SwiftForms. -FOUNDATION_EXPORT double SwiftFormsVersionNumber; - -//! Project version string for SwiftForms. -FOUNDATION_EXPORT const unsigned char SwiftFormsVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Info.plist b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Info.plist deleted file mode 100755 index 7d73415..0000000 Binary files a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Info.plist and /dev/null differ diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftdoc b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftdoc deleted file mode 100755 index 08fe1da..0000000 Binary files a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftdoc and /dev/null differ diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftmodule b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftmodule deleted file mode 100755 index b8e67aa..0000000 Binary files a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftmodule and /dev/null differ diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm64.swiftdoc b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm64.swiftdoc deleted file mode 100755 index bd54c5e..0000000 Binary files a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm64.swiftdoc and /dev/null differ diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm64.swiftmodule b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm64.swiftmodule deleted file mode 100755 index 64f9b0a..0000000 Binary files a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm64.swiftmodule and /dev/null differ diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftdoc b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftdoc deleted file mode 100755 index 307e0e8..0000000 Binary files a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftdoc and /dev/null differ diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftmodule b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftmodule deleted file mode 100755 index 4c6c59a..0000000 Binary files a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftmodule and /dev/null differ diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/x86_64.swiftdoc b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/x86_64.swiftdoc deleted file mode 100755 index eccd049..0000000 Binary files a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/x86_64.swiftdoc and /dev/null differ diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/x86_64.swiftmodule b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/x86_64.swiftmodule deleted file mode 100755 index ccb854f..0000000 Binary files a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/x86_64.swiftmodule and /dev/null differ diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/module.modulemap b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/module.modulemap deleted file mode 100755 index 51d6767..0000000 --- a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/module.modulemap +++ /dev/null @@ -1,10 +0,0 @@ -framework module SwiftForms { - umbrella header "SwiftForms.h" - - export * - module * { export * } -} - -module SwiftForms.Swift { - header "SwiftForms-Swift.h" -} diff --git a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/SwiftForms b/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/SwiftForms deleted file mode 100755 index cf4dc1d..0000000 Binary files a/Old My Mind/Carthage/Build/iOS/SwiftForms.framework/SwiftForms and /dev/null differ diff --git a/Old My Mind/Carthage/Checkouts/SwiftForms/.gitignore b/Old My Mind/Carthage/Checkouts/SwiftForms/.gitignore deleted file mode 100644 index 7469951..0000000 --- a/Old My Mind/Carthage/Checkouts/SwiftForms/.gitignore +++ /dev/null @@ -1,60 +0,0 @@ -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite - -# OS generated files # -###################### -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -ehthumbs.db -Thumbs.db - -# Pods # -######## -Pods/ - -# Xcode # -######### -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -*.xcworkspace -!default.xcworkspace -xcuserdata -profile -*.moved-aside -DerivedData -.idea/ diff --git a/Old My Mind/Carthage/Checkouts/SwiftForms/LICENSE b/Old My Mind/Carthage/Checkouts/SwiftForms/LICENSE deleted file mode 100755 index 03d0bb6..0000000 --- a/Old My Mind/Carthage/Checkouts/SwiftForms/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) -Copyright (c) 2014 Miguel Ángel Ortuño ( ortuman@gmail.com ) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication.xcodeproj/project.pbxproj b/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication.xcodeproj/project.pbxproj deleted file mode 100755 index c394a40..0000000 --- a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication.xcodeproj/project.pbxproj +++ /dev/null @@ -1,622 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0C9D1DF31D2267EE00909941 /* FormOptionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C9D1DF21D2267EE00909941 /* FormOptionsViewController.swift */; }; - 0CB1F6C31C37F9B900CD2A7B /* FormErrorType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB1F6C21C37F9B900CD2A7B /* FormErrorType.swift */; }; - 0CCA33DD1B04FA5A006D9666 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA33DC1B04FA5A006D9666 /* AppDelegate.swift */; }; - 0CCA33DF1B04FA5A006D9666 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA33DE1B04FA5A006D9666 /* ViewController.swift */; }; - 0CCA33E21B04FA5A006D9666 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0CCA33E01B04FA5A006D9666 /* Main.storyboard */; }; - 0CCA33E41B04FA5A006D9666 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0CCA33E31B04FA5A006D9666 /* Images.xcassets */; }; - 0CCA34141B04FAD3006D9666 /* ExampleFormViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA33FC1B04FAD3006D9666 /* ExampleFormViewController.swift */; }; - 0CCA34311B04FBE0006D9666 /* SwiftForms.h in Headers */ = {isa = PBXBuildFile; fileRef = 0CCA34301B04FBE0006D9666 /* SwiftForms.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0CCA34431B04FBE0006D9666 /* SwiftForms.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CCA342C1B04FBDF006D9666 /* SwiftForms.framework */; }; - 0CCA34441B04FBE0006D9666 /* SwiftForms.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0CCA342C1B04FBDF006D9666 /* SwiftForms.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 0CCA34611B0502B5006D9666 /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0CCA34601B0502B5006D9666 /* Launch.storyboard */; }; - 0CCA34781B050525006D9666 /* FormBaseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34641B050525006D9666 /* FormBaseCell.swift */; }; - 0CCA34791B050525006D9666 /* FormTitleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34651B050525006D9666 /* FormTitleCell.swift */; }; - 0CCA347A1B050525006D9666 /* FormValueCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34661B050525006D9666 /* FormValueCell.swift */; }; - 0CCA347B1B050525006D9666 /* FormButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34671B050525006D9666 /* FormButtonCell.swift */; }; - 0CCA347C1B050525006D9666 /* FormCheckCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34681B050525006D9666 /* FormCheckCell.swift */; }; - 0CCA347D1B050525006D9666 /* FormDateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34691B050525006D9666 /* FormDateCell.swift */; }; - 0CCA347E1B050525006D9666 /* FormPickerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346A1B050525006D9666 /* FormPickerCell.swift */; }; - 0CCA347F1B050525006D9666 /* FormSegmentedControlCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346B1B050525006D9666 /* FormSegmentedControlCell.swift */; }; - 0CCA34801B050525006D9666 /* FormSelectorCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346C1B050525006D9666 /* FormSelectorCell.swift */; }; - 0CCA34811B050525006D9666 /* FormSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346D1B050525006D9666 /* FormSwitchCell.swift */; }; - 0CCA34821B050525006D9666 /* FormTextFieldCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346E1B050525006D9666 /* FormTextFieldCell.swift */; }; - 0CCA34831B050525006D9666 /* FormTextViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346F1B050525006D9666 /* FormTextViewCell.swift */; }; - 0CCA34851B050525006D9666 /* FormSelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34721B050525006D9666 /* FormSelector.swift */; }; - 0CCA34861B050525006D9666 /* FormViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34731B050525006D9666 /* FormViewController.swift */; }; - 0CCA34871B050525006D9666 /* FormDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34751B050525006D9666 /* FormDescriptor.swift */; }; - 0CCA34881B050525006D9666 /* FormRowDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34761B050525006D9666 /* FormRowDescriptor.swift */; }; - 0CCA34891B050525006D9666 /* FormSectionDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34771B050525006D9666 /* FormSectionDescriptor.swift */; }; - 0CDBB4F11B10699A00BE6ACF /* FormStepperCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CDBB4F01B10699A00BE6ACF /* FormStepperCell.swift */; }; - 0CDBB4F31B10724600BE6ACF /* FormSliderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CDBB4F21B10724600BE6ACF /* FormSliderCell.swift */; }; - BDD1087A1C925D14000EDEE5 /* FormLabelCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDD108791C925D14000EDEE5 /* FormLabelCell.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 0CCA34411B04FBE0006D9666 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 0CCA33CF1B04FA5A006D9666 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 0CCA342B1B04FBDF006D9666; - remoteInfo = SwiftForms; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 0CCA34481B04FBE0006D9666 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 0CCA34441B04FBE0006D9666 /* SwiftForms.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 0C9D1DF21D2267EE00909941 /* FormOptionsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormOptionsViewController.swift; sourceTree = ""; }; - 0CB1F6C21C37F9B900CD2A7B /* FormErrorType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormErrorType.swift; sourceTree = ""; }; - 0CCA33D71B04FA5A006D9666 /* SwiftFormsApplication.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftFormsApplication.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 0CCA33DB1B04FA5A006D9666 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 0CCA33DC1B04FA5A006D9666 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 0CCA33DE1B04FA5A006D9666 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 0CCA33E11B04FA5A006D9666 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 0CCA33E31B04FA5A006D9666 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 0CCA33FC1B04FAD3006D9666 /* ExampleFormViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleFormViewController.swift; sourceTree = ""; }; - 0CCA342C1B04FBDF006D9666 /* SwiftForms.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftForms.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0CCA342F1B04FBE0006D9666 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 0CCA34301B04FBE0006D9666 /* SwiftForms.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftForms.h; sourceTree = ""; }; - 0CCA343E1B04FBE0006D9666 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 0CCA343F1B04FBE0006D9666 /* SwiftFormsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftFormsTests.swift; sourceTree = ""; }; - 0CCA34601B0502B5006D9666 /* Launch.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Launch.storyboard; sourceTree = ""; }; - 0CCA34641B050525006D9666 /* FormBaseCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormBaseCell.swift; sourceTree = ""; }; - 0CCA34651B050525006D9666 /* FormTitleCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormTitleCell.swift; sourceTree = ""; }; - 0CCA34661B050525006D9666 /* FormValueCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormValueCell.swift; sourceTree = ""; }; - 0CCA34671B050525006D9666 /* FormButtonCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormButtonCell.swift; sourceTree = ""; }; - 0CCA34681B050525006D9666 /* FormCheckCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormCheckCell.swift; sourceTree = ""; }; - 0CCA34691B050525006D9666 /* FormDateCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormDateCell.swift; sourceTree = ""; }; - 0CCA346A1B050525006D9666 /* FormPickerCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormPickerCell.swift; sourceTree = ""; }; - 0CCA346B1B050525006D9666 /* FormSegmentedControlCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSegmentedControlCell.swift; sourceTree = ""; }; - 0CCA346C1B050525006D9666 /* FormSelectorCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSelectorCell.swift; sourceTree = ""; }; - 0CCA346D1B050525006D9666 /* FormSwitchCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSwitchCell.swift; sourceTree = ""; }; - 0CCA346E1B050525006D9666 /* FormTextFieldCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormTextFieldCell.swift; sourceTree = ""; }; - 0CCA346F1B050525006D9666 /* FormTextViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormTextViewCell.swift; sourceTree = ""; }; - 0CCA34721B050525006D9666 /* FormSelector.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSelector.swift; sourceTree = ""; }; - 0CCA34731B050525006D9666 /* FormViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormViewController.swift; sourceTree = ""; }; - 0CCA34751B050525006D9666 /* FormDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormDescriptor.swift; sourceTree = ""; }; - 0CCA34761B050525006D9666 /* FormRowDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormRowDescriptor.swift; sourceTree = ""; }; - 0CCA34771B050525006D9666 /* FormSectionDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSectionDescriptor.swift; sourceTree = ""; }; - 0CDBB4F01B10699A00BE6ACF /* FormStepperCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormStepperCell.swift; sourceTree = ""; }; - 0CDBB4F21B10724600BE6ACF /* FormSliderCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSliderCell.swift; sourceTree = ""; }; - BDD108791C925D14000EDEE5 /* FormLabelCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormLabelCell.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 0CCA33D41B04FA5A006D9666 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0CCA34431B04FBE0006D9666 /* SwiftForms.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0CCA34281B04FBDF006D9666 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 0CCA33CE1B04FA5A006D9666 = { - isa = PBXGroup; - children = ( - 0CCA33D91B04FA5A006D9666 /* SwiftFormsApplication */, - 0CCA342D1B04FBE0006D9666 /* SwiftForms */, - 0CCA343C1B04FBE0006D9666 /* SwiftFormsTests */, - 0CCA33D81B04FA5A006D9666 /* Products */, - ); - sourceTree = ""; - }; - 0CCA33D81B04FA5A006D9666 /* Products */ = { - isa = PBXGroup; - children = ( - 0CCA33D71B04FA5A006D9666 /* SwiftFormsApplication.app */, - 0CCA342C1B04FBDF006D9666 /* SwiftForms.framework */, - ); - name = Products; - sourceTree = ""; - }; - 0CCA33D91B04FA5A006D9666 /* SwiftFormsApplication */ = { - isa = PBXGroup; - children = ( - 0CCA33FC1B04FAD3006D9666 /* ExampleFormViewController.swift */, - 0CCA33DC1B04FA5A006D9666 /* AppDelegate.swift */, - 0CCA33DE1B04FA5A006D9666 /* ViewController.swift */, - 0CCA33E01B04FA5A006D9666 /* Main.storyboard */, - 0CCA33E31B04FA5A006D9666 /* Images.xcassets */, - 0CCA33DA1B04FA5A006D9666 /* Supporting Files */, - 0CCA34601B0502B5006D9666 /* Launch.storyboard */, - ); - path = SwiftFormsApplication; - sourceTree = ""; - }; - 0CCA33DA1B04FA5A006D9666 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 0CCA33DB1B04FA5A006D9666 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 0CCA342D1B04FBE0006D9666 /* SwiftForms */ = { - isa = PBXGroup; - children = ( - 0CCA34621B050525006D9666 /* cells */, - 0CCA34701B050525006D9666 /* controllers */, - 0CCA34741B050525006D9666 /* descriptors */, - 0CB1F6C21C37F9B900CD2A7B /* FormErrorType.swift */, - 0CCA34301B04FBE0006D9666 /* SwiftForms.h */, - 0CCA342E1B04FBE0006D9666 /* Supporting Files */, - ); - path = SwiftForms; - sourceTree = ""; - }; - 0CCA342E1B04FBE0006D9666 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 0CCA342F1B04FBE0006D9666 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 0CCA343C1B04FBE0006D9666 /* SwiftFormsTests */ = { - isa = PBXGroup; - children = ( - 0CCA343F1B04FBE0006D9666 /* SwiftFormsTests.swift */, - 0CCA343D1B04FBE0006D9666 /* Supporting Files */, - ); - path = SwiftFormsTests; - sourceTree = ""; - }; - 0CCA343D1B04FBE0006D9666 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 0CCA343E1B04FBE0006D9666 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 0CCA34621B050525006D9666 /* cells */ = { - isa = PBXGroup; - children = ( - 0CCA34631B050525006D9666 /* base */, - 0CCA34671B050525006D9666 /* FormButtonCell.swift */, - BDD108791C925D14000EDEE5 /* FormLabelCell.swift */, - 0CCA34681B050525006D9666 /* FormCheckCell.swift */, - 0CCA34691B050525006D9666 /* FormDateCell.swift */, - 0CCA346A1B050525006D9666 /* FormPickerCell.swift */, - 0CCA346B1B050525006D9666 /* FormSegmentedControlCell.swift */, - 0CCA346C1B050525006D9666 /* FormSelectorCell.swift */, - 0CCA346D1B050525006D9666 /* FormSwitchCell.swift */, - 0CCA346E1B050525006D9666 /* FormTextFieldCell.swift */, - 0CCA346F1B050525006D9666 /* FormTextViewCell.swift */, - 0CDBB4F01B10699A00BE6ACF /* FormStepperCell.swift */, - 0CDBB4F21B10724600BE6ACF /* FormSliderCell.swift */, - ); - path = cells; - sourceTree = ""; - }; - 0CCA34631B050525006D9666 /* base */ = { - isa = PBXGroup; - children = ( - 0CCA34641B050525006D9666 /* FormBaseCell.swift */, - 0CCA34651B050525006D9666 /* FormTitleCell.swift */, - 0CCA34661B050525006D9666 /* FormValueCell.swift */, - ); - path = base; - sourceTree = ""; - }; - 0CCA34701B050525006D9666 /* controllers */ = { - isa = PBXGroup; - children = ( - 0CCA34721B050525006D9666 /* FormSelector.swift */, - 0CCA34731B050525006D9666 /* FormViewController.swift */, - 0C9D1DF21D2267EE00909941 /* FormOptionsViewController.swift */, - ); - path = controllers; - sourceTree = ""; - }; - 0CCA34741B050525006D9666 /* descriptors */ = { - isa = PBXGroup; - children = ( - 0CCA34751B050525006D9666 /* FormDescriptor.swift */, - 0CCA34761B050525006D9666 /* FormRowDescriptor.swift */, - 0CCA34771B050525006D9666 /* FormSectionDescriptor.swift */, - ); - path = descriptors; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 0CCA34291B04FBDF006D9666 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 0CCA34311B04FBE0006D9666 /* SwiftForms.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 0CCA33D61B04FA5A006D9666 /* SwiftFormsApplication */ = { - isa = PBXNativeTarget; - buildConfigurationList = 0CCA33F61B04FA5A006D9666 /* Build configuration list for PBXNativeTarget "SwiftFormsApplication" */; - buildPhases = ( - 0CCA33D31B04FA5A006D9666 /* Sources */, - 0CCA33D41B04FA5A006D9666 /* Frameworks */, - 0CCA33D51B04FA5A006D9666 /* Resources */, - 0CCA34481B04FBE0006D9666 /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 0CCA34421B04FBE0006D9666 /* PBXTargetDependency */, - ); - name = SwiftFormsApplication; - productName = SwiftFormsApplication; - productReference = 0CCA33D71B04FA5A006D9666 /* SwiftFormsApplication.app */; - productType = "com.apple.product-type.application"; - }; - 0CCA342B1B04FBDF006D9666 /* SwiftForms */ = { - isa = PBXNativeTarget; - buildConfigurationList = 0CCA34451B04FBE0006D9666 /* Build configuration list for PBXNativeTarget "SwiftForms" */; - buildPhases = ( - 0CCA34271B04FBDF006D9666 /* Sources */, - 0CCA34281B04FBDF006D9666 /* Frameworks */, - 0CCA34291B04FBDF006D9666 /* Headers */, - 0CCA342A1B04FBDF006D9666 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SwiftForms; - productName = SwiftForms; - productReference = 0CCA342C1B04FBDF006D9666 /* SwiftForms.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 0CCA33CF1B04FA5A006D9666 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftMigration = 0700; - LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0800; - ORGANIZATIONNAME = "Miguel Angel Ortuno Ortuno"; - TargetAttributes = { - 0CCA33D61B04FA5A006D9666 = { - CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0800; - }; - 0CCA342B1B04FBDF006D9666 = { - CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0800; - }; - }; - }; - buildConfigurationList = 0CCA33D21B04FA5A006D9666 /* Build configuration list for PBXProject "SwiftFormsApplication" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 0CCA33CE1B04FA5A006D9666; - productRefGroup = 0CCA33D81B04FA5A006D9666 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 0CCA33D61B04FA5A006D9666 /* SwiftFormsApplication */, - 0CCA342B1B04FBDF006D9666 /* SwiftForms */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 0CCA33D51B04FA5A006D9666 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0CCA33E21B04FA5A006D9666 /* Main.storyboard in Resources */, - 0CCA34611B0502B5006D9666 /* Launch.storyboard in Resources */, - 0CCA33E41B04FA5A006D9666 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0CCA342A1B04FBDF006D9666 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 0CCA33D31B04FA5A006D9666 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0CCA33DF1B04FA5A006D9666 /* ViewController.swift in Sources */, - 0CCA34141B04FAD3006D9666 /* ExampleFormViewController.swift in Sources */, - 0CCA33DD1B04FA5A006D9666 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0CCA34271B04FBDF006D9666 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0CCA34851B050525006D9666 /* FormSelector.swift in Sources */, - 0CCA34791B050525006D9666 /* FormTitleCell.swift in Sources */, - 0CDBB4F31B10724600BE6ACF /* FormSliderCell.swift in Sources */, - 0CCA34891B050525006D9666 /* FormSectionDescriptor.swift in Sources */, - 0CCA34871B050525006D9666 /* FormDescriptor.swift in Sources */, - 0CCA34781B050525006D9666 /* FormBaseCell.swift in Sources */, - BDD1087A1C925D14000EDEE5 /* FormLabelCell.swift in Sources */, - 0CCA34831B050525006D9666 /* FormTextViewCell.swift in Sources */, - 0CB1F6C31C37F9B900CD2A7B /* FormErrorType.swift in Sources */, - 0CCA34861B050525006D9666 /* FormViewController.swift in Sources */, - 0CCA347B1B050525006D9666 /* FormButtonCell.swift in Sources */, - 0CDBB4F11B10699A00BE6ACF /* FormStepperCell.swift in Sources */, - 0CCA34801B050525006D9666 /* FormSelectorCell.swift in Sources */, - 0CCA34811B050525006D9666 /* FormSwitchCell.swift in Sources */, - 0CCA347C1B050525006D9666 /* FormCheckCell.swift in Sources */, - 0CCA347A1B050525006D9666 /* FormValueCell.swift in Sources */, - 0CCA347F1B050525006D9666 /* FormSegmentedControlCell.swift in Sources */, - 0CCA34821B050525006D9666 /* FormTextFieldCell.swift in Sources */, - 0CCA347E1B050525006D9666 /* FormPickerCell.swift in Sources */, - 0C9D1DF31D2267EE00909941 /* FormOptionsViewController.swift in Sources */, - 0CCA347D1B050525006D9666 /* FormDateCell.swift in Sources */, - 0CCA34881B050525006D9666 /* FormRowDescriptor.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 0CCA34421B04FBE0006D9666 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 0CCA342B1B04FBDF006D9666 /* SwiftForms */; - targetProxy = 0CCA34411B04FBE0006D9666 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 0CCA33E01B04FA5A006D9666 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 0CCA33E11B04FA5A006D9666 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 0CCA33F41B04FA5A006D9666 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 0CCA33F51B04FA5A006D9666 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 0CCA33F71B04FA5A006D9666 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = SwiftFormsApplication/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ortulabs.SwiftFormsApplication; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - 0CCA33F81B04FA5A006D9666 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = SwiftFormsApplication/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ortulabs.SwiftFormsApplication; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; - 0CCA34461B04FBE0006D9666 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = SwiftForms/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.ortulabs.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 0CCA34471B04FBE0006D9666 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = SwiftForms/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.ortulabs.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 0CCA33D21B04FA5A006D9666 /* Build configuration list for PBXProject "SwiftFormsApplication" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0CCA33F41B04FA5A006D9666 /* Debug */, - 0CCA33F51B04FA5A006D9666 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0CCA33F61B04FA5A006D9666 /* Build configuration list for PBXNativeTarget "SwiftFormsApplication" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0CCA33F71B04FA5A006D9666 /* Debug */, - 0CCA33F81B04FA5A006D9666 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0CCA34451B04FBE0006D9666 /* Build configuration list for PBXNativeTarget "SwiftForms" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0CCA34461B04FBE0006D9666 /* Debug */, - 0CCA34471B04FBE0006D9666 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 0CCA33CF1B04FA5A006D9666 /* Project object */; -} diff --git a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication.xcodeproj/xcshareddata/xcschemes/SwiftForms.xcscheme b/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication.xcodeproj/xcshareddata/xcschemes/SwiftForms.xcscheme deleted file mode 100755 index 57f8f84..0000000 --- a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication.xcodeproj/xcshareddata/xcschemes/SwiftForms.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/AppDelegate.swift b/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/AppDelegate.swift deleted file mode 100755 index 3326be9..0000000 --- a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/AppDelegate.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// AppDelegate.swift -// SwiftForms -// -// Created by Miguel Angel Ortuno on 20/08/14. -// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : Any]?) -> Bool { - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - } - - func applicationDidEnterBackground(_ application: UIApplication) { - } - - func applicationWillEnterForeground(_ application: UIApplication) { - } - - func applicationDidBecomeActive(_ application: UIApplication) { - } - - func applicationWillTerminate(_ application: UIApplication) { - } -} - diff --git a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Base.lproj/Main.storyboard b/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Base.lproj/Main.storyboard deleted file mode 100755 index 6fcfd4c..0000000 --- a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Base.lproj/Main.storyboard +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/ExampleFormViewController.swift b/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/ExampleFormViewController.swift deleted file mode 100755 index 4bcd5ea..0000000 --- a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/ExampleFormViewController.swift +++ /dev/null @@ -1,211 +0,0 @@ -// -// ExampleFormViewController.swift -// SwiftForms -//® -// Created by Miguel Angel Ortuno on 20/08/14. -// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit -import SwiftForms - -class ExampleFormViewController: FormViewController { - - struct Static { - static let nameTag = "name" - static let passwordTag = "password" - static let lastNameTag = "lastName" - static let jobTag = "job" - static let emailTag = "email" - static let URLTag = "url" - static let phoneTag = "phone" - static let enabled = "enabled" - static let check = "check" - static let segmented = "segmented" - static let picker = "picker" - static let birthday = "birthday" - static let categories = "categories" - static let button = "button" - static let stepper = "stepper" - static let slider = "slider" - static let textView = "textview" - } - - required init(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - self.loadForm() - } - - override func viewDidLoad() { - super.viewDidLoad() - self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Submit", style: .plain, target: self, action: #selector(ExampleFormViewController.submit(_:))) - } - - // MARK: Actions - - func submit(_: UIBarButtonItem!) { - - let message = self.form.formValues().description - - let alertController = UIAlertController(title: "Form output", message: message, preferredStyle: .alert) - - let cancel = UIAlertAction(title: "OK", style: .cancel) { (action) in - } - - alertController.addAction(cancel) - - self.present(alertController, animated: true, completion: nil) - } - - // MARK: Private interface - - fileprivate func loadForm() { - - let form = FormDescriptor(title: "Example Form") - - let section1 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil) - - var row = FormRowDescriptor(tag: Static.emailTag, type: .email, title: "Email") - row.configuration.cell.appearance = ["textField.placeholder" : "john@gmail.com" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section1.rows.append(row) - - row = FormRowDescriptor(tag: Static.passwordTag, type: .password, title: "Password") - row.configuration.cell.appearance = ["textField.placeholder" : "Enter password" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section1.rows.append(row) - - let section2 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil) - - row = FormRowDescriptor(tag: Static.nameTag, type: .name, title: "First Name") - row.configuration.cell.appearance = ["textField.placeholder" : "e.g. Miguel Ángel" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.lastNameTag, type: .name, title: "Last Name") - row.configuration.cell.appearance = ["textField.placeholder" : "e.g. Ortuño" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.jobTag, type: .text, title: "Job") - row.configuration.cell.appearance = ["textField.placeholder" : "e.g. Entrepreneur" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section2.rows.append(row) - - let section3 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil) - - row = FormRowDescriptor(tag: Static.URLTag, type: .url, title: "URL") - row.configuration.cell.appearance = ["textField.placeholder" : "e.g. gethooksapp.com" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section3.rows.append(row) - - row = FormRowDescriptor(tag: Static.phoneTag, type: .phone, title: "Phone") - row.configuration.cell.appearance = ["textField.placeholder" : "e.g. 0034666777999" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section3.rows.append(row) - - let section4 = FormSectionDescriptor(headerTitle: "An example header title", footerTitle: "An example footer title") - - row = FormRowDescriptor(tag: Static.enabled, type: .booleanSwitch, title: "Enable") - section4.rows.append(row) - - row = FormRowDescriptor(tag: Static.check, type: .booleanCheck, title: "Doable") - section4.rows.append(row) - - row = FormRowDescriptor(tag: Static.segmented, type: .segmentedControl, title: "Priority") - row.configuration.selection.options = ([0, 1, 2, 3] as [Int]) as [AnyObject] - row.configuration.selection.optionTitleClosure = { value in - guard let option = value as? Int else { return "" } - switch option { - case 0: - return "None" - case 1: - return "!" - case 2: - return "!!" - case 3: - return "!!!" - default: - return "" - } - } - - row.configuration.cell.appearance = ["titleLabel.font" : UIFont.boldSystemFont(ofSize: 30.0), "segmentedControl.tintColor" : UIColor.red] - - section4.rows.append(row) - - let section5 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil) - - row = FormRowDescriptor(tag: Static.picker, type: .picker, title: "Gender") - row.configuration.cell.showsInputToolbar = true - row.configuration.selection.options = (["F", "M", "U"] as [String]) as [AnyObject] - row.configuration.selection.optionTitleClosure = { value in - guard let option = value as? String else { return "" } - switch option { - case "F": - return "Female" - case "M": - return "Male" - case "U": - return "I'd rather not to say" - default: - return "" - } - } - - row.value = "M" as AnyObject - - section5.rows.append(row) - - row = FormRowDescriptor(tag: Static.birthday, type: .date, title: "Birthday") - row.configuration.cell.showsInputToolbar = true - section5.rows.append(row) - - row = FormRowDescriptor(tag: Static.categories, type: .multipleSelector, title: "Categories") - row.configuration.selection.options = ([0, 1, 2, 3, 4] as [Int]) as [AnyObject] - row.configuration.selection.allowsMultipleSelection = true - row.configuration.selection.optionTitleClosure = { value in - guard let option = value as? Int else { return "" } - switch option { - case 0: - return "Restaurant" - case 1: - return "Pub" - case 2: - return "Shop" - case 3: - return "Hotel" - case 4: - return "Camping" - default: - return "" - } - } - - section5.rows.append(row) - - let section6 = FormSectionDescriptor(headerTitle: "Stepper & Slider", footerTitle: nil) - - row = FormRowDescriptor(tag: Static.stepper, type: .stepper, title: "Step count") - row.configuration.stepper.maximumValue = 200.0 - row.configuration.stepper.minimumValue = 20.0 - row.configuration.stepper.steps = 2.0 - section6.rows.append(row) - - row = FormRowDescriptor(tag: Static.slider, type: .slider, title: "Slider") - row.configuration.stepper.maximumValue = 200.0 - row.configuration.stepper.minimumValue = 20.0 - row.configuration.stepper.steps = 2.0 - row.value = 0.5 as AnyObject - section6.rows.append(row) - - let section7 = FormSectionDescriptor(headerTitle: "Multiline TextView", footerTitle: nil) - row = FormRowDescriptor(tag: Static.textView, type: .multilineText, title: "Notes") - section7.rows.append(row) - - let section8 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil) - - row = FormRowDescriptor(tag: Static.button, type: .button, title: "Dismiss") - row.configuration.button.didSelectClosure = { _ in - self.view.endEditing(true) - } - section8.rows.append(row) - - form.sections = [section1, section2, section3, section4, section5, section6, section7, section8] - - self.form = form - } -} diff --git a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Images.xcassets/AppIcon.appiconset/Contents.json b/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100755 index 36d2c80..0000000 --- a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Info.plist b/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Info.plist deleted file mode 100755 index 073f648..0000000 --- a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - Launch - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - - - diff --git a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/ViewController.swift b/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/ViewController.swift deleted file mode 100755 index f4efe22..0000000 --- a/Old My Mind/Carthage/Checkouts/SwiftForms/SwiftFormsApplication/ViewController.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// ViewController.swift -// SwiftFormsApplication -// -// Created by Miguel Angel Ortuno Ortuno on 14/5/15. -// Copyright (c) 2015 Miguel Angel Ortuno Ortuno. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } -} - diff --git a/Old My Mind/My Mind.xcodeproj/project.pbxproj b/Old My Mind/My Mind.xcodeproj/project.pbxproj deleted file mode 100755 index 9722856..0000000 --- a/Old My Mind/My Mind.xcodeproj/project.pbxproj +++ /dev/null @@ -1,810 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 152A166A0FC11FBAD96716A2 /* Pods_My_Mind.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93C68F08F6A96A8862C1AC2F /* Pods_My_Mind.framework */; }; - 5F1D73F11E9AA390001ED9FC /* UserViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1D73E91E9AA390001ED9FC /* UserViews.swift */; }; - 5F1D73F31E9AA390001ED9FC /* ForumView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1D73EB1E9AA390001ED9FC /* ForumView.swift */; }; - 5F1D73F41E9AA390001ED9FC /* TabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1D73EC1E9AA390001ED9FC /* TabBarController.swift */; }; - 5F1D73F51E9AA390001ED9FC /* OnBoardingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1D73ED1E9AA390001ED9FC /* OnBoardingController.swift */; }; - 5F1D73F61E9AA390001ED9FC /* WelcomeScreenOne.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1D73EE1E9AA390001ED9FC /* WelcomeScreenOne.swift */; }; - 5F1D73F71E9AA390001ED9FC /* WelcomeScreenTwo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1D73EF1E9AA390001ED9FC /* WelcomeScreenTwo.swift */; }; - 5F1D73F81E9AA390001ED9FC /* WelcomeScreenThree.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1D73F01E9AA390001ED9FC /* WelcomeScreenThree.swift */; }; - 5F387B2C1E9A77F900308C34 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F387B2B1E9A77F900308C34 /* AppDelegate.swift */; }; - 5F387B311E9A77F900308C34 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5F387B2F1E9A77F900308C34 /* Main.storyboard */; }; - 5F387B331E9A77F900308C34 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5F387B321E9A77F900308C34 /* Assets.xcassets */; }; - 5F387B361E9A77F900308C34 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5F387B341E9A77F900308C34 /* LaunchScreen.storyboard */; }; - 5F387B411E9A77FA00308C34 /* My_MindTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F387B401E9A77FA00308C34 /* My_MindTests.swift */; }; - 5F387B4C1E9A77FA00308C34 /* My_MindUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F387B4B1E9A77FA00308C34 /* My_MindUITests.swift */; }; - 5F8BB68D1E9F236200E974F0 /* SwiftForms.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F8BB68C1E9F236200E974F0 /* SwiftForms.framework */; }; - 5FAC04911E9AD1F60034DF77 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5FAC04901E9AD1F60034DF77 /* GoogleService-Info.plist */; }; - 5FAC04931E9AD2110034DF77 /* MainViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FAC04921E9AD2110034DF77 /* MainViews.swift */; }; - 5FAC04951E9ADF4B0034DF77 /* OnlineInterfaces.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FAC04941E9ADF4B0034DF77 /* OnlineInterfaces.swift */; }; - 5FB7C4491E9D1CBC001F76FF /* FormViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FB7C4481E9D1CBC001F76FF /* FormViews.swift */; }; - 9F9B713CD43BCBAED3E243FD /* Pods_My_MindUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5B889C48504658B7AAD00E1 /* Pods_My_MindUITests.framework */; }; - CE88ED407E8DD8526D09D9D6 /* Pods_My_MindTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A806CCC70D68E5C00FEA546B /* Pods_My_MindTests.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 5F387B3D1E9A77FA00308C34 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5F387B201E9A77F900308C34 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 5F387B271E9A77F900308C34; - remoteInfo = "My Mind"; - }; - 5F387B481E9A77FA00308C34 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5F387B201E9A77F900308C34 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 5F387B271E9A77F900308C34; - remoteInfo = "My Mind"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 03237502A99BD1B8640610FB /* Pods-My Mind.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-My Mind.debug.xcconfig"; path = "Pods/Target Support Files/Pods-My Mind/Pods-My Mind.debug.xcconfig"; sourceTree = ""; }; - 14A46FE3E7F911FF9F206D9F /* Pods-My Mind.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-My Mind.release.xcconfig"; path = "Pods/Target Support Files/Pods-My Mind/Pods-My Mind.release.xcconfig"; sourceTree = ""; }; - 24CEC2F2536D3F042ACE49E8 /* Pods-My MindTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-My MindTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.release.xcconfig"; sourceTree = ""; }; - 5F1D73E91E9AA390001ED9FC /* UserViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserViews.swift; sourceTree = ""; }; - 5F1D73EB1E9AA390001ED9FC /* ForumView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ForumView.swift; sourceTree = ""; }; - 5F1D73EC1E9AA390001ED9FC /* TabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = ""; }; - 5F1D73ED1E9AA390001ED9FC /* OnBoardingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnBoardingController.swift; sourceTree = ""; }; - 5F1D73EE1E9AA390001ED9FC /* WelcomeScreenOne.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomeScreenOne.swift; sourceTree = ""; }; - 5F1D73EF1E9AA390001ED9FC /* WelcomeScreenTwo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomeScreenTwo.swift; sourceTree = ""; }; - 5F1D73F01E9AA390001ED9FC /* WelcomeScreenThree.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomeScreenThree.swift; sourceTree = ""; }; - 5F387B281E9A77F900308C34 /* My Mind.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "My Mind.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 5F387B2B1E9A77F900308C34 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 5F387B301E9A77F900308C34 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 5F387B321E9A77F900308C34 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 5F387B351E9A77F900308C34 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 5F387B371E9A77F900308C34 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5F387B3C1E9A77FA00308C34 /* My MindTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "My MindTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 5F387B401E9A77FA00308C34 /* My_MindTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = My_MindTests.swift; sourceTree = ""; }; - 5F387B421E9A77FA00308C34 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5F387B471E9A77FA00308C34 /* My MindUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "My MindUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 5F387B4B1E9A77FA00308C34 /* My_MindUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = My_MindUITests.swift; sourceTree = ""; }; - 5F387B4D1E9A77FA00308C34 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5F8BB68C1E9F236200E974F0 /* SwiftForms.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftForms.framework; path = "../../../../Users/alexanderdavis/Library/Developer/Xcode/DerivedData/My_Mind-coocqdarohmftwesbfhoxeppuecq/Build/Products/Debug-iphoneos/SwiftForms/SwiftForms.framework"; sourceTree = ""; }; - 5FAC048F1E9ACFA10034DF77 /* My Mind.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "My Mind.entitlements"; sourceTree = ""; }; - 5FAC04901E9AD1F60034DF77 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; - 5FAC04921E9AD2110034DF77 /* MainViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViews.swift; sourceTree = ""; }; - 5FAC04941E9ADF4B0034DF77 /* OnlineInterfaces.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnlineInterfaces.swift; sourceTree = ""; }; - 5FB7C4481E9D1CBC001F76FF /* FormViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormViews.swift; sourceTree = ""; }; - 93C68F08F6A96A8862C1AC2F /* Pods_My_Mind.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_My_Mind.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A806CCC70D68E5C00FEA546B /* Pods_My_MindTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_My_MindTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - ABF283DEA18DADABFE6E9651 /* Pods-My MindUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-My MindUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.debug.xcconfig"; sourceTree = ""; }; - ACB04384CBCB9A221EBE6FF4 /* Pods-My MindTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-My MindTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.debug.xcconfig"; sourceTree = ""; }; - B5B889C48504658B7AAD00E1 /* Pods_My_MindUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_My_MindUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E83680762934A4609FB47468 /* Pods-My MindUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-My MindUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.release.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 5F387B251E9A77F900308C34 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 152A166A0FC11FBAD96716A2 /* Pods_My_Mind.framework in Frameworks */, - 5F8BB68D1E9F236200E974F0 /* SwiftForms.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5F387B391E9A77FA00308C34 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CE88ED407E8DD8526D09D9D6 /* Pods_My_MindTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5F387B441E9A77FA00308C34 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9F9B713CD43BCBAED3E243FD /* Pods_My_MindUITests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 5F1D73F91E9AA39D001ED9FC /* OnBoarding Controllers */ = { - isa = PBXGroup; - children = ( - 5F1D73ED1E9AA390001ED9FC /* OnBoardingController.swift */, - 5F1D73EE1E9AA390001ED9FC /* WelcomeScreenOne.swift */, - 5F1D73EF1E9AA390001ED9FC /* WelcomeScreenTwo.swift */, - 5F1D73F01E9AA390001ED9FC /* WelcomeScreenThree.swift */, - ); - name = "OnBoarding Controllers"; - sourceTree = ""; - }; - 5F1D73FA1E9AA3AD001ED9FC /* Main Controllers */ = { - isa = PBXGroup; - children = ( - 5F1D73EB1E9AA390001ED9FC /* ForumView.swift */, - 5F1D73EC1E9AA390001ED9FC /* TabBarController.swift */, - 5FAC04921E9AD2110034DF77 /* MainViews.swift */, - 5FB7C4481E9D1CBC001F76FF /* FormViews.swift */, - ); - name = "Main Controllers"; - sourceTree = ""; - }; - 5F387B1F1E9A77F900308C34 = { - isa = PBXGroup; - children = ( - 5F387B2A1E9A77F900308C34 /* My Mind */, - 5F387B3F1E9A77FA00308C34 /* My MindTests */, - 5F387B4A1E9A77FA00308C34 /* My MindUITests */, - 5F387B291E9A77F900308C34 /* Products */, - 7425378B698F58AB6B65A764 /* Pods */, - D0433EACB48AF6CF532A5819 /* Frameworks */, - ); - sourceTree = ""; - }; - 5F387B291E9A77F900308C34 /* Products */ = { - isa = PBXGroup; - children = ( - 5F387B281E9A77F900308C34 /* My Mind.app */, - 5F387B3C1E9A77FA00308C34 /* My MindTests.xctest */, - 5F387B471E9A77FA00308C34 /* My MindUITests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 5F387B2A1E9A77F900308C34 /* My Mind */ = { - isa = PBXGroup; - children = ( - 5FAC048F1E9ACFA10034DF77 /* My Mind.entitlements */, - 5FAC04901E9AD1F60034DF77 /* GoogleService-Info.plist */, - 5F387B371E9A77F900308C34 /* Info.plist */, - 5F387B2B1E9A77F900308C34 /* AppDelegate.swift */, - 5F1D73E91E9AA390001ED9FC /* UserViews.swift */, - 5FAC04941E9ADF4B0034DF77 /* OnlineInterfaces.swift */, - 5F387B321E9A77F900308C34 /* Assets.xcassets */, - 5F387B341E9A77F900308C34 /* LaunchScreen.storyboard */, - 5F1D73FA1E9AA3AD001ED9FC /* Main Controllers */, - 5F387B2F1E9A77F900308C34 /* Main.storyboard */, - 5F1D73F91E9AA39D001ED9FC /* OnBoarding Controllers */, - ); - path = "My Mind"; - sourceTree = ""; - }; - 5F387B3F1E9A77FA00308C34 /* My MindTests */ = { - isa = PBXGroup; - children = ( - 5F387B401E9A77FA00308C34 /* My_MindTests.swift */, - 5F387B421E9A77FA00308C34 /* Info.plist */, - ); - path = "My MindTests"; - sourceTree = ""; - }; - 5F387B4A1E9A77FA00308C34 /* My MindUITests */ = { - isa = PBXGroup; - children = ( - 5F387B4B1E9A77FA00308C34 /* My_MindUITests.swift */, - 5F387B4D1E9A77FA00308C34 /* Info.plist */, - ); - path = "My MindUITests"; - sourceTree = ""; - }; - 7425378B698F58AB6B65A764 /* Pods */ = { - isa = PBXGroup; - children = ( - 03237502A99BD1B8640610FB /* Pods-My Mind.debug.xcconfig */, - 14A46FE3E7F911FF9F206D9F /* Pods-My Mind.release.xcconfig */, - ACB04384CBCB9A221EBE6FF4 /* Pods-My MindTests.debug.xcconfig */, - 24CEC2F2536D3F042ACE49E8 /* Pods-My MindTests.release.xcconfig */, - ABF283DEA18DADABFE6E9651 /* Pods-My MindUITests.debug.xcconfig */, - E83680762934A4609FB47468 /* Pods-My MindUITests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - D0433EACB48AF6CF532A5819 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 5F8BB68C1E9F236200E974F0 /* SwiftForms.framework */, - 93C68F08F6A96A8862C1AC2F /* Pods_My_Mind.framework */, - A806CCC70D68E5C00FEA546B /* Pods_My_MindTests.framework */, - B5B889C48504658B7AAD00E1 /* Pods_My_MindUITests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 5F387B271E9A77F900308C34 /* My Mind */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5F387B501E9A77FA00308C34 /* Build configuration list for PBXNativeTarget "My Mind" */; - buildPhases = ( - 1527ACBB4520742D6833DFDD /* [CP] Check Pods Manifest.lock */, - 5F387B241E9A77F900308C34 /* Sources */, - 5F387B251E9A77F900308C34 /* Frameworks */, - 5F387B261E9A77F900308C34 /* Resources */, - 43471D3845F376B7B6A61722 /* [CP] Embed Pods Frameworks */, - 0C96D1A6FC50BBF2F94C13C8 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "My Mind"; - productName = "My Mind"; - productReference = 5F387B281E9A77F900308C34 /* My Mind.app */; - productType = "com.apple.product-type.application"; - }; - 5F387B3B1E9A77FA00308C34 /* My MindTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5F387B531E9A77FA00308C34 /* Build configuration list for PBXNativeTarget "My MindTests" */; - buildPhases = ( - 247238A8EA84F82BF46D3FAE /* [CP] Check Pods Manifest.lock */, - 5F387B381E9A77FA00308C34 /* Sources */, - 5F387B391E9A77FA00308C34 /* Frameworks */, - 5F387B3A1E9A77FA00308C34 /* Resources */, - B649BBA2ADA126A145C221ED /* [CP] Embed Pods Frameworks */, - 9C78D3E78C9188955EBE7FE3 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 5F387B3E1E9A77FA00308C34 /* PBXTargetDependency */, - ); - name = "My MindTests"; - productName = "My MindTests"; - productReference = 5F387B3C1E9A77FA00308C34 /* My MindTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 5F387B461E9A77FA00308C34 /* My MindUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5F387B561E9A77FA00308C34 /* Build configuration list for PBXNativeTarget "My MindUITests" */; - buildPhases = ( - BE15E72E75C38FE0DBC03AFB /* [CP] Check Pods Manifest.lock */, - 5F387B431E9A77FA00308C34 /* Sources */, - 5F387B441E9A77FA00308C34 /* Frameworks */, - 5F387B451E9A77FA00308C34 /* Resources */, - F00EC5C8C3737A67F05C83EC /* [CP] Embed Pods Frameworks */, - 9805D1E59AA2B694E996F40B /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 5F387B491E9A77FA00308C34 /* PBXTargetDependency */, - ); - name = "My MindUITests"; - productName = "My MindUITests"; - productReference = 5F387B471E9A77FA00308C34 /* My MindUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 5F387B201E9A77F900308C34 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0830; - ORGANIZATIONNAME = "Alexander Davis"; - TargetAttributes = { - 5F387B271E9A77F900308C34 = { - CreatedOnToolsVersion = 8.3.1; - DevelopmentTeam = 28CC8SCVUN; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.BackgroundModes = { - enabled = 1; - }; - com.apple.DataProtection = { - enabled = 1; - }; - com.apple.Push = { - enabled = 1; - }; - }; - }; - 5F387B3B1E9A77FA00308C34 = { - CreatedOnToolsVersion = 8.3.1; - DevelopmentTeam = 28CC8SCVUN; - ProvisioningStyle = Automatic; - TestTargetID = 5F387B271E9A77F900308C34; - }; - 5F387B461E9A77FA00308C34 = { - CreatedOnToolsVersion = 8.3.1; - DevelopmentTeam = 28CC8SCVUN; - ProvisioningStyle = Automatic; - TestTargetID = 5F387B271E9A77F900308C34; - }; - }; - }; - buildConfigurationList = 5F387B231E9A77F900308C34 /* Build configuration list for PBXProject "My Mind" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 5F387B1F1E9A77F900308C34; - productRefGroup = 5F387B291E9A77F900308C34 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 5F387B271E9A77F900308C34 /* My Mind */, - 5F387B3B1E9A77FA00308C34 /* My MindTests */, - 5F387B461E9A77FA00308C34 /* My MindUITests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 5F387B261E9A77F900308C34 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5F387B361E9A77F900308C34 /* LaunchScreen.storyboard in Resources */, - 5FAC04911E9AD1F60034DF77 /* GoogleService-Info.plist in Resources */, - 5F387B331E9A77F900308C34 /* Assets.xcassets in Resources */, - 5F387B311E9A77F900308C34 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5F387B3A1E9A77FA00308C34 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5F387B451E9A77FA00308C34 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 0C96D1A6FC50BBF2F94C13C8 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 1527ACBB4520742D6833DFDD /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 247238A8EA84F82BF46D3FAE /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 43471D3845F376B7B6A61722 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 9805D1E59AA2B694E996F40B /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 9C78D3E78C9188955EBE7FE3 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - B649BBA2ADA126A145C221ED /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - BE15E72E75C38FE0DBC03AFB /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - F00EC5C8C3737A67F05C83EC /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 5F387B241E9A77F900308C34 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5F1D73F51E9AA390001ED9FC /* OnBoardingController.swift in Sources */, - 5F387B2C1E9A77F900308C34 /* AppDelegate.swift in Sources */, - 5FB7C4491E9D1CBC001F76FF /* FormViews.swift in Sources */, - 5FAC04931E9AD2110034DF77 /* MainViews.swift in Sources */, - 5F1D73F31E9AA390001ED9FC /* ForumView.swift in Sources */, - 5F1D73F61E9AA390001ED9FC /* WelcomeScreenOne.swift in Sources */, - 5F1D73F41E9AA390001ED9FC /* TabBarController.swift in Sources */, - 5F1D73F11E9AA390001ED9FC /* UserViews.swift in Sources */, - 5F1D73F81E9AA390001ED9FC /* WelcomeScreenThree.swift in Sources */, - 5FAC04951E9ADF4B0034DF77 /* OnlineInterfaces.swift in Sources */, - 5F1D73F71E9AA390001ED9FC /* WelcomeScreenTwo.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5F387B381E9A77FA00308C34 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5F387B411E9A77FA00308C34 /* My_MindTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5F387B431E9A77FA00308C34 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5F387B4C1E9A77FA00308C34 /* My_MindUITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 5F387B3E1E9A77FA00308C34 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 5F387B271E9A77F900308C34 /* My Mind */; - targetProxy = 5F387B3D1E9A77FA00308C34 /* PBXContainerItemProxy */; - }; - 5F387B491E9A77FA00308C34 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 5F387B271E9A77F900308C34 /* My Mind */; - targetProxy = 5F387B481E9A77FA00308C34 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 5F387B2F1E9A77F900308C34 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 5F387B301E9A77F900308C34 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 5F387B341E9A77F900308C34 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 5F387B351E9A77F900308C34 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 5F387B4E1E9A77FA00308C34 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 5F387B4F1E9A77FA00308C34 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 5F387B511E9A77FA00308C34 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 03237502A99BD1B8640610FB /* Pods-My Mind.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = "My Mind/My Mind.entitlements"; - DEVELOPMENT_TEAM = 28CC8SCVUN; - INFOPLIST_FILE = "My Mind/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(SRCROOT)/**"; - PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-Mind"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - 5F387B521E9A77FA00308C34 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 14A46FE3E7F911FF9F206D9F /* Pods-My Mind.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = "My Mind/My Mind.entitlements"; - DEVELOPMENT_TEAM = 28CC8SCVUN; - INFOPLIST_FILE = "My Mind/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(SRCROOT)/**"; - PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-Mind"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; - 5F387B541E9A77FA00308C34 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ACB04384CBCB9A221EBE6FF4 /* Pods-My MindTests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = 28CC8SCVUN; - INFOPLIST_FILE = "My MindTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-MindTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/My Mind.app/My Mind"; - }; - name = Debug; - }; - 5F387B551E9A77FA00308C34 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 24CEC2F2536D3F042ACE49E8 /* Pods-My MindTests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = 28CC8SCVUN; - INFOPLIST_FILE = "My MindTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-MindTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/My Mind.app/My Mind"; - }; - name = Release; - }; - 5F387B571E9A77FA00308C34 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ABF283DEA18DADABFE6E9651 /* Pods-My MindUITests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - DEVELOPMENT_TEAM = 28CC8SCVUN; - INFOPLIST_FILE = "My MindUITests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-MindUITests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - TEST_TARGET_NAME = "My Mind"; - }; - name = Debug; - }; - 5F387B581E9A77FA00308C34 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E83680762934A4609FB47468 /* Pods-My MindUITests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - DEVELOPMENT_TEAM = 28CC8SCVUN; - INFOPLIST_FILE = "My MindUITests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-MindUITests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - TEST_TARGET_NAME = "My Mind"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 5F387B231E9A77F900308C34 /* Build configuration list for PBXProject "My Mind" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5F387B4E1E9A77FA00308C34 /* Debug */, - 5F387B4F1E9A77FA00308C34 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5F387B501E9A77FA00308C34 /* Build configuration list for PBXNativeTarget "My Mind" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5F387B511E9A77FA00308C34 /* Debug */, - 5F387B521E9A77FA00308C34 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5F387B531E9A77FA00308C34 /* Build configuration list for PBXNativeTarget "My MindTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5F387B541E9A77FA00308C34 /* Debug */, - 5F387B551E9A77FA00308C34 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5F387B561E9A77FA00308C34 /* Build configuration list for PBXNativeTarget "My MindUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5F387B571E9A77FA00308C34 /* Debug */, - 5F387B581E9A77FA00308C34 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 5F387B201E9A77F900308C34 /* Project object */; -} diff --git a/Old My Mind/My Mind.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Old My Mind/My Mind.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100755 index e3a9677..0000000 --- a/Old My Mind/My Mind.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Old My Mind/My Mind.xcodeproj/project.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/UserInterfaceState.xcuserstate b/Old My Mind/My Mind.xcodeproj/project.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100755 index b3bd347..0000000 Binary files a/Old My Mind/My Mind.xcodeproj/project.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Old My Mind/My Mind.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/My Mind.xcscheme b/Old My Mind/My Mind.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/My Mind.xcscheme deleted file mode 100755 index c00aaa9..0000000 --- a/Old My Mind/My Mind.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/My Mind.xcscheme +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/My Mind.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/xcschememanagement.plist b/Old My Mind/My Mind.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100755 index a35e53e..0000000 --- a/Old My Mind/My Mind.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - SchemeUserState - - My Mind.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 5F387B271E9A77F900308C34 - - primary - - - 5F387B3B1E9A77FA00308C34 - - primary - - - 5F387B461E9A77FA00308C34 - - primary - - - - - diff --git a/Old My Mind/My Mind.xcworkspace/contents.xcworkspacedata b/Old My Mind/My Mind.xcworkspace/contents.xcworkspacedata deleted file mode 100755 index c8f0afd..0000000 --- a/Old My Mind/My Mind.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/Old My Mind/My Mind.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/UserInterfaceState.xcuserstate b/Old My Mind/My Mind.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100755 index b42d068..0000000 Binary files a/Old My Mind/My Mind.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Old My Mind/My Mind.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Old My Mind/My Mind.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100755 index ed9a9b4..0000000 --- a/Old My Mind/My Mind.xcworkspace/xcuserdata/alexanderdavis.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/Old My Mind/My Mind/AppDelegate.swift b/Old My Mind/My Mind/AppDelegate.swift deleted file mode 100755 index 021ed81..0000000 --- a/Old My Mind/My Mind/AppDelegate.swift +++ /dev/null @@ -1,162 +0,0 @@ -// -// AppDelegate.swift -// My Mind -// -// Created by Alexander Davis on 09/04/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import UIKit -import Firebase -import UserNotifications -import NotificationCenter -import FirebaseMessaging -import FirebaseDatabase - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - let gcmMessageIDKey = "gcm.message_id" - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - // Use Firebase library to configure APIs - FIRApp.configure() - FIRDatabase.database().persistenceEnabled = true - - //If User Is Signed In Direct to Main App Section - let currentUser = FIRAuth.auth()?.currentUser - let mainStoryboard = UIStoryboard(name: "Main", bundle: nil) - if currentUser != nil - { - self.window?.rootViewController = mainStoryboard.instantiateViewController(withIdentifier: "MainController") - } - else - { - self.window?.rootViewController = mainStoryboard.instantiateViewController(withIdentifier: "OnBoard") - } - - //Turn On Notifications for App - if #available(iOS 10.0, *) { - // For iOS 10 display notification (sent via APNS) - UNUserNotificationCenter.current().delegate = self - - let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] - UNUserNotificationCenter.current().requestAuthorization( - options: authOptions, - completionHandler: {_, _ in }) - - // For iOS 10 data message (sent via FCM) - FIRMessaging.messaging().remoteMessageDelegate = self as? FIRMessagingDelegate - - } else { - let settings: UIUserNotificationSettings = - UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil) - application.registerUserNotificationSettings(settings) - } - - application.registerForRemoteNotifications() - - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) { - // If you are receiving a notification message while your app is in the background, - // this callback will not be fired till the user taps on the notification launching the application. - // TODO: Handle data of notification - - // Print message ID. - if let messageID = userInfo[gcmMessageIDKey] { - print("Message ID: \(messageID)") - } - - // Print full message. - print(userInfo) - } - - func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], - fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { - // If you are receiving a notification message while your app is in the background, - // this callback will not be fired till the user taps on the notification launching the application. - // TODO: Handle data of notification - - // Print message ID. - if let messageID = userInfo[gcmMessageIDKey] { - print("Message ID: \(messageID)") - } - - // Print full message. - print(userInfo) - - completionHandler(UIBackgroundFetchResult.newData) - } -} - -// [START ios_10_message_handling] -@available(iOS 10, *) -extension AppDelegate : UNUserNotificationCenterDelegate { - - // Receive displayed notifications for iOS 10 devices. - func userNotificationCenter(_ center: UNUserNotificationCenter, - willPresent notification: UNNotification, - withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { - let userInfo = notification.request.content.userInfo - // Print message ID. - if let messageID = userInfo[gcmMessageIDKey] { - print("Message ID: \(messageID)") - } - - // Print full message. - print(userInfo) - - // Change this to your preferred presentation option - completionHandler([]) - } - - func userNotificationCenter(_ center: UNUserNotificationCenter, - didReceive response: UNNotificationResponse, - withCompletionHandler completionHandler: @escaping () -> Void) { - let userInfo = response.notification.request.content.userInfo - // Print message ID. - if let messageID = userInfo[gcmMessageIDKey] { - print("Message ID: \(messageID)") - } - - // Print full message. - print(userInfo) - - completionHandler() - } -} -// [END ios_10_message_handling] -// [START ios_10_data_message_handling] -extension AppDelegate : FIRMessagingDelegate { - // Receive data message on iOS 10 devices while app is in the foreground. - func applicationReceivedRemoteMessage(_ remoteMessage: FIRMessagingRemoteMessage) { - print(remoteMessage.appData) - } -} -// [END ios_10_data_message_handling] - diff --git a/Old My Mind/My Mind/Assets.xcassets/AppIcon.appiconset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100755 index d98c3c4..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "Icon-App-57x57@1x.png", - "scale" : "1x" - }, - { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "Icon-App-57x57@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "50x50", - "idiom" : "ipad", - "filename" : "Icon-Small-50x50@1x.png", - "scale" : "1x" - }, - { - "size" : "50x50", - "idiom" : "ipad", - "filename" : "Icon-Small-50x50@2x.png", - "scale" : "2x" - }, - { - "size" : "72x72", - "idiom" : "ipad", - "filename" : "Icon-App-72x72@1x.png", - "scale" : "1x" - }, - { - "size" : "72x72", - "idiom" : "ipad", - "filename" : "Icon-App-72x72@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/Appointments.imageset/Clock-50 (1).png b/Old My Mind/My Mind/Assets.xcassets/Appointments.imageset/Clock-50 (1).png deleted file mode 100755 index f1f9815..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/Appointments.imageset/Clock-50 (1).png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/Appointments.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/Appointments.imageset/Contents.json deleted file mode 100755 index 9a52731..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/Appointments.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "Clock-50 (1).png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/Back.imageset/Back-50.png b/Old My Mind/My Mind/Assets.xcassets/Back.imageset/Back-50.png deleted file mode 100755 index 8bbd5ac..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/Back.imageset/Back-50.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/Back.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/Back.imageset/Contents.json deleted file mode 100755 index 09843e3..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/Back.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "Back-50.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/Contents.json b/Old My Mind/My Mind/Assets.xcassets/Contents.json deleted file mode 100755 index da4a164..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/Contents.json deleted file mode 100755 index 371a6fd..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "graph150.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "graph300.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "graph450.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph150.png b/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph150.png deleted file mode 100755 index 8768745..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph150.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph300.png b/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph300.png deleted file mode 100755 index f521319..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph300.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph450.png b/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph450.png deleted file mode 100755 index a504e40..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/CustomEvent.imageset/graph450.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Contents.json deleted file mode 100755 index 6a1e4d7..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "Engage50.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "Engage100.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "Engage150.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage100.png b/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage100.png deleted file mode 100755 index 8003ffe..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage100.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage150.png b/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage150.png deleted file mode 100755 index 2ab5485..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage150.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage50.png b/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage50.png deleted file mode 100755 index 5bc1b1a..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/Engage.imageset/Engage50.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/Contents.json deleted file mode 100755 index b909232..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "engage30.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "engage60.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "engage90.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage30.png b/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage30.png deleted file mode 100755 index b0047fe..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage30.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage60.png b/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage60.png deleted file mode 100755 index 27229ce..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage60.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage90.png b/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage90.png deleted file mode 100755 index 4be52b0..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/EngageSmall.imageset/engage90.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/FolderButton.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/FolderButton.imageset/Contents.json deleted file mode 100755 index 0310f86..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/FolderButton.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "button_folder.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/FolderOpenButton.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/FolderOpenButton.imageset/Contents.json deleted file mode 100755 index 4b9d468..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/FolderOpenButton.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "button_folder_open.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/Forum.imageset/Brief-50 (1).png b/Old My Mind/My Mind/Assets.xcassets/Forum.imageset/Brief-50 (1).png deleted file mode 100755 index 503cb19..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/Forum.imageset/Brief-50 (1).png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/Forum.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/Forum.imageset/Contents.json deleted file mode 100755 index 770d22e..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/Forum.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "Brief-50 (1).png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/Contents.json deleted file mode 100755 index 81cee8d..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "money150.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "money300.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "money450.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money150.png b/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money150.png deleted file mode 100755 index b8274a6..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money150.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money300.png b/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money300.png deleted file mode 100755 index 9041f45..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money300.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money450.png b/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money450.png deleted file mode 100755 index 2f04699..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/MonetizationEvent.imageset/money450.png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/Referrals.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/Referrals.imageset/Contents.json deleted file mode 100755 index b196cf0..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/Referrals.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "Create New-50 (1).png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/Referrals.imageset/Create New-50 (1).png b/Old My Mind/My Mind/Assets.xcassets/Referrals.imageset/Create New-50 (1).png deleted file mode 100755 index ed8ac64..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/Referrals.imageset/Create New-50 (1).png and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/first.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/first.imageset/Contents.json deleted file mode 100755 index 33a7451..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/first.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "first.pdf" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/first.imageset/first.pdf b/Old My Mind/My Mind/Assets.xcassets/first.imageset/first.pdf deleted file mode 100755 index 47d911d..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/first.imageset/first.pdf and /dev/null differ diff --git a/Old My Mind/My Mind/Assets.xcassets/iTunesArtwork.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/iTunesArtwork.imageset/Contents.json deleted file mode 100755 index 43003d0..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/iTunesArtwork.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "iTunesArtwork@1x.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "iTunesArtwork@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "iTunesArtwork@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/second.imageset/Contents.json b/Old My Mind/My Mind/Assets.xcassets/second.imageset/Contents.json deleted file mode 100755 index 03bd9c9..0000000 --- a/Old My Mind/My Mind/Assets.xcassets/second.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "second.pdf" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Old My Mind/My Mind/Assets.xcassets/second.imageset/second.pdf b/Old My Mind/My Mind/Assets.xcassets/second.imageset/second.pdf deleted file mode 100755 index 401614e..0000000 Binary files a/Old My Mind/My Mind/Assets.xcassets/second.imageset/second.pdf and /dev/null differ diff --git a/Old My Mind/My Mind/Base.lproj/LaunchScreen.storyboard b/Old My Mind/My Mind/Base.lproj/LaunchScreen.storyboard deleted file mode 100755 index 6f37b7e..0000000 --- a/Old My Mind/My Mind/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/My Mind/Base.lproj/Main.storyboard b/Old My Mind/My Mind/Base.lproj/Main.storyboard deleted file mode 100755 index 663d12f..0000000 --- a/Old My Mind/My Mind/Base.lproj/Main.storyboard +++ /dev/null @@ -1,2062 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/My Mind/FormViews.swift b/Old My Mind/My Mind/FormViews.swift deleted file mode 100755 index a7de230..0000000 --- a/Old My Mind/My Mind/FormViews.swift +++ /dev/null @@ -1,466 +0,0 @@ -// -// FormViews.swift -// My Mind -// -// Created by Alexander Davis on 11/04/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import Foundation -import UIKit -import SwiftForms -import MessageUI -import MapKit - -class ReferralForm: FormViewController, MFMailComposeViewControllerDelegate{ - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - - struct Static { - static let nameTag = "name" - static let passwordTag = "password" - static let lastNameTag = "lastName" - static let addressTag = "address" - static let IDTag = "idnumber" - static let GenderTag = "gender" - static let personalEmailTag = "personalemail" - static let uniEmailTag = "universityemail" - static let CourseTag = "course" - static let phoneTag = "phone" - static let Voicemail = "voicemail" - static let DSATag = "disabledstudent" - static let FacultyTag = "faculty" - static let birthday = "birthday" - static let PastSupportTag = "pastsupport" - static let CurrentSupportTag = "currentsupport" - static let subjectTag = "subject" - static let timescaleTag = "timescale" - static let button = "button" - } - - required init(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - self.loadForm() - } - - override func viewDidLoad() { - super.viewDidLoad() - //self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Submit", style: .plain, target: self, action: #selector(ReferralForm.submit(_:))) - } - - // MARK: Actions - - func submit() { - - let data = self.form.formValues().description - - let alertController = UIAlertController(title: "Form Completed", message: "This form has sucessfully been submitted", preferredStyle: .alert) - - let vc = self.storyboard?.instantiateViewController(withIdentifier: "MainController") - let defaultAction = UIAlertAction(title: "OK", style: .default, handler: { action in SendRef(input: data);self.tabBarController!.tabBar.items?[0].isEnabled = false;self.present(vc!, animated: true, completion: nil);}) - alertController.addAction(defaultAction) - self.present(alertController, animated: true, completion: nil) - } - - // MARK: Private interface - - fileprivate func loadForm() { - - let form = FormDescriptor(title: "Referral Form") - - let section1 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil) - - var row = FormRowDescriptor(tag: Static.button, type: .button, title: "Send Form") - row.configuration.button.didSelectClosure = { _ in - self.view.endEditing(true) - self.submit() - } - section1.rows.append(row) - - let section2 = FormSectionDescriptor(headerTitle: "About Yourself", footerTitle: nil) - - row = FormRowDescriptor(tag: Static.nameTag, type: .name, title: "First Name") - row.configuration.cell.appearance = ["textField.placeholder" : "First Name" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.lastNameTag, type: .name, title: "Last Name") - row.configuration.cell.appearance = ["textField.placeholder" : "Last name" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.IDTag, type: .number, title: "Student ID") - row.configuration.cell.appearance = ["textField.placeholder" : "12345678" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.birthday, type: .date, title: "Date of Birth") - row.configuration.cell.showsInputToolbar = true - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.uniEmailTag, type: .email, title: "University Email") - row.configuration.cell.appearance = ["textField.placeholder" : "john.smith@mail.bcu.ac.uk" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.personalEmailTag, type: .email, title: "Alternative Email") - row.configuration.cell.appearance = ["textField.placeholder" : "john.smith@outlook.com" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.phoneTag, type: .phone, title: "Phone") - row.configuration.cell.appearance = ["textField.placeholder" : "Mobile Number" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.Voicemail, type: .booleanSwitch, title: "Can we leave a voicemail message?") - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.GenderTag, type: .picker, title: "Gender") - row.configuration.cell.showsInputToolbar = true - row.configuration.selection.options = (["F", "M", "O", "U"] as [String]) as [AnyObject] - row.configuration.selection.optionTitleClosure = { value in - guard let option = value as? String else { return "" } - switch option { - case "F": - return "Female" - case "M": - return "Male" - case "O": - return "Other" - case "U": - return "I'd rather not to say" - default: - return "" - } - } - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.addressTag, type: .multilineText, title: "Address") - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.DSATag, type: .booleanSwitch, title: "Are you a disabled student (eligible for DSA)?") - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.CourseTag, type: .text, title: "Course") - row.configuration.cell.appearance = ["textField.placeholder" : "BSc Computer Science (Hons)" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.FacultyTag, type: .picker, title: "Faculty") - row.configuration.cell.showsInputToolbar = true - row.configuration.selection.options = (["CEBE", "HELS", "ADM", "BLSS"] as [String]) as [AnyObject] - row.configuration.selection.optionTitleClosure = { value in - guard let option = value as? String else { return "" } - switch option { - case "CEBE": - return "Computing, Engineering and The Built Environment" - case "HELS": - return "Health, Education and Life Sciences" - case "ADM": - return "Arts, Design and Media" - case "BLSS": - return "Business, Law and Social Sciences" - default: - return "" - } - } - - section2.rows.append(row) - - let section3 = FormSectionDescriptor(headerTitle: "What you would like to talk about.", footerTitle: nil) - row = FormRowDescriptor(tag: Static.subjectTag, type: .multilineText, title: "") - section3.rows.append(row) - - row = FormRowDescriptor(tag: Static.timescaleTag, type: .picker, title: "How long have you been concerned?") - row.configuration.cell.showsInputToolbar = true - row.configuration.selection.options = (["NL", "ST", "QL", "VL"] as [String]) as [AnyObject] - row.configuration.selection.optionTitleClosure = { value in - guard let option = value as? String else { return "" } - switch option { - case "NL": - return "Not Long (within 1 month)" - case "ST": - return "Some Time (1-3 months)" - case "QL": - return "Quite Some Time (3-6 months)" - case "VL": - return "A Long Time (6+ months)" - default: - return "" - } - } - section3.rows.append(row) - - row = FormRowDescriptor(tag: Static.CurrentSupportTag, type: .multipleSelector, title: "Are you currently receiving support?") - row.configuration.cell.showsInputToolbar = true - row.configuration.selection.options = (["No", "CBT", "CPN", "CP", "GP", "MHWA", "Psyi", "Psyo", "SW", "O"] as [String]) as [AnyObject] - row.configuration.selection.optionTitleClosure = { value in - guard let option = value as? String else { return "" } - switch option { - case "No": - return "No" - case "CBT": - return "CBT Practitioner (e.g. Healthy Minds)" - case "CPN": - return "Community Psychiatric Nurse (CPN)" - case "CP": - return "Counsellor/Psychotherapist" - case "GP": - return "GP" - case "MHWA": - return "Mental Health/Wellbeing Adviser" - case "Psyi": - return "Psychiatrist" - case "Psyo": - return "Psychologist" - case "SW": - return "Social Worker" - case "O": - return "Other" - default: - return "" - } - } - - section3.rows.append(row) - - row = FormRowDescriptor(tag: Static.PastSupportTag, type: .multipleSelector, title: "Have you received support in the past?") - row.configuration.cell.showsInputToolbar = true - row.configuration.selection.options = (["No", "CBT", "CPN", "CP", "GP", "MHWA", "Psyi", "Psyo", "SW", "O"] as [String]) as [AnyObject] - row.configuration.selection.optionTitleClosure = { value in - guard let option = value as? String else { return "" } - switch option { - case "No": - return "No" - case "CBT": - return "CBT Practitioner (e.g. Healthy Minds)" - case "CPN": - return "Community Psychiatric Nurse (CPN)" - case "CP": - return "Counsellor/Psychotherapist" - case "GP": - return "GP" - case "MHWA": - return "Mental Health/Wellbeing Adviser" - case "Psyi": - return "Psychiatrist" - case "Psyo": - return "Psychologist" - case "SW": - return "Social Worker" - case "O": - return "Other" - default: - return "" - } - } - - section3.rows.append(row) - - form.sections = [section1, section2, section3] - - self.form = form - } -} - -class ReqAppoint: FormViewController, MFMailComposeViewControllerDelegate{ - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - - struct Static { - static let date = "date" - static let time = "time" - static let location = "location" - static let phoneTag = "phone" - static let adivsor = "advisor" - static let reason = "reason" - static let button = "button" - } - - required init(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - self.loadForm() - } - - override func viewDidLoad() { - super.viewDidLoad() - //self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Submit", style: .plain, target: self, action: #selector(ReferralForm.submit(_:))) - } - - // MARK: Actions - - func submit() { - - let data = self.form.formValues().description - - let alertController = UIAlertController(title: "Request Sent", message: "Your Request Has Been Sent", preferredStyle: .alert) - - let vc = self.storyboard?.instantiateViewController(withIdentifier: "MainController") - let defaultAction = UIAlertAction(title: "OK", style: .default, handler: { action in SendRef(input: data);self.tabBarController!.tabBar.items?[0].isEnabled = false;self.present(vc!, animated: true, completion: nil);}) - alertController.addAction(defaultAction) - self.present(alertController, animated: true, completion: nil) - } - - // MARK: Private interface - - fileprivate func loadForm() { - - let form = FormDescriptor(title: "Referral Form") - - let section1 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil) - - var row = FormRowDescriptor(tag: Static.button, type: .button, title: "Send Form") - row.configuration.button.didSelectClosure = { _ in - self.view.endEditing(true) - self.submit() - } - section1.rows.append(row) - - let section2 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil) - - row = FormRowDescriptor(tag: Static.date, type: .date, title: "Date Requested") - row.configuration.cell.showsInputToolbar = true - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.time, type: .time, title: "Time Requested") - row.configuration.cell.showsInputToolbar = true - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.location, type: .picker, title: "Location") - row.configuration.cell.showsInputToolbar = true - row.configuration.selection.options = (["Centre", "North", "South", "Cons", "Margaret", "Jew","Bour"] as [String]) as [AnyObject] - row.configuration.selection.optionTitleClosure = { value in - guard let option = value as? String else { return "" } - switch option { - case "Centre": - return "City Centre (Curzon Building)" - case "North": - return "City North (Baker Building)" - case "South": - return "City South (Seacole Building)" - case "Cons": - return "The Birmingham Conservatoire" - case "Margaret": - return "Margaret Street" - case "Jew": - return "Victoria Street" - case "Bour": - return "Bournville Campus" - default: - return "" - } - } - - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.phoneTag, type: .phone, title: "Phone") - row.configuration.cell.appearance = ["textField.placeholder" : "Mobile Number" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject] - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.adivsor, type: .picker, title: "Preferred Advisor") - row.configuration.cell.showsInputToolbar = true - row.configuration.selection.options = (["JS", "AD", "TM", "U"] as [String]) as [AnyObject] - row.configuration.selection.optionTitleClosure = { value in - guard let option = value as? String else { return "" } - switch option { - case "JS": - return "John Smith" - case "AD": - return "Alexander Davis" - case "TM": - return "Tim Minchin" - case "U": - return "I Don't Mind" - default: - return "" - } - } - section2.rows.append(row) - - row = FormRowDescriptor(tag: Static.reason, type: .multilineText, title: "Reason for Appointment") - section2.rows.append(row) - - form.sections = [section1, section2] - - self.form = form - } -} - -class ConfAppoint: UIViewController{ - @IBOutlet var ConfirmMap: MKMapView! - override func viewDidLoad() { - let initalLocation = CLLocation(latitude: 52.483358, longitude: -1.883024) - centerMapOnLocation(location: initalLocation) - } - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - - let regionRadius: CLLocationDistance = 1000 - func centerMapOnLocation(location: CLLocation) { - let coordinateRegion = MKCoordinateRegionMakeWithDistance(location.coordinate, - regionRadius * 2.0, regionRadius * 2.0) - ConfirmMap.setRegion(coordinateRegion, animated: true) - } - @IBAction func Confirm(_ sender: UIButton) { - let alertController = UIAlertController(title: "Appointment Confirmed", message: "Your appointment has been confirmed.", preferredStyle: .alert) - - let vc = self.storyboard?.instantiateViewController(withIdentifier: "MainController") - let defaultAction = UIAlertAction(title: "OK", style: .default, handler: { action in self.present(vc!, animated: true, completion: nil);}) - alertController.addAction(defaultAction) - - self.present(alertController, animated: true, completion: nil) - } - @IBAction func RequestAptbtn(_ sender: UIButton) { - let alertController = UIAlertController(title: "New Request Made", message: "A new appointment request has been made for you.", preferredStyle: .alert) - - let vc = self.storyboard?.instantiateViewController(withIdentifier: "MainController") - let defaultAction = UIAlertAction(title: "OK", style: .default, handler: { action in self.present(vc!, animated: true, completion: nil);}) - alertController.addAction(defaultAction) - - self.present(alertController, animated: true, completion: nil) - } -} - -class UpcomingAppoint: UIViewController{ - @IBOutlet var UpcomingMap: MKMapView! - override func viewDidLoad() { - let initalLocation = CLLocation(latitude: 52.483358, longitude: -1.883024) - centerMapOnLocation(location: initalLocation) - } - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - - let regionRadius: CLLocationDistance = 1000 - func centerMapOnLocation(location: CLLocation) { - let coordinateRegion = MKCoordinateRegionMakeWithDistance(location.coordinate, - regionRadius * 2.0, regionRadius * 2.0) - UpcomingMap.setRegion(coordinateRegion, animated: true) - } - @IBAction func Cancelbtn(_ sender: UIButton) { - let alertController = UIAlertController(title: "Appointment Cancelled", message: "Your appointment has been cancelled.", preferredStyle: .alert) - - let vc = self.storyboard?.instantiateViewController(withIdentifier: "MainController") - let defaultAction = UIAlertAction(title: "OK", style: .default, handler: { action in self.present(vc!, animated: true, completion: nil);}) - alertController.addAction(defaultAction) - - self.present(alertController, animated: true, completion: nil) - } -} - -class PastAppoint: UIViewController{ - override func viewDidLoad() { - let initalLocation = CLLocation(latitude: 52.483358, longitude: -1.883024) - centerMapOnLocation(location: initalLocation) - } - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - - @IBOutlet var PastMap: MKMapView! - - let regionRadius: CLLocationDistance = 1000 - func centerMapOnLocation(location: CLLocation) { - let coordinateRegion = MKCoordinateRegionMakeWithDistance(location.coordinate, - regionRadius * 2.0, regionRadius * 2.0) - PastMap.setRegion(coordinateRegion, animated: true) - } - -} diff --git a/Old My Mind/My Mind/ForumView.swift b/Old My Mind/My Mind/ForumView.swift deleted file mode 100755 index 36f62b4..0000000 --- a/Old My Mind/My Mind/ForumView.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// ForumView.swift -// My Mind -// -// Created by Alexander Davis on 31/03/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import Foundation -import UIKit - -class ForumViewController: UIViewController { - - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - - @IBOutlet var webView: UIWebView! - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - let url = URL (string: "https://www.mymindforum.com"); - let requestObj = URLRequest(url: url!); - webView.loadRequest(requestObj); - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - -} - -class ForumSignUpViewController: UIViewController { - - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - - @IBOutlet weak var ForumSignUp: UIWebView! - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - let url = URL (string: "https://www.mymindforum.com/ucp.php?mode=register"); - let requestObj = URLRequest(url: url!); - ForumSignUp.loadRequest(requestObj); - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - -} diff --git a/Old My Mind/My Mind/GoogleService-Info.plist b/Old My Mind/My Mind/GoogleService-Info.plist deleted file mode 100755 index 4c990c3..0000000 --- a/Old My Mind/My Mind/GoogleService-Info.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - AD_UNIT_ID_FOR_BANNER_TEST - ca-app-pub-3940256099942544/2934735716 - AD_UNIT_ID_FOR_INTERSTITIAL_TEST - ca-app-pub-3940256099942544/4411468910 - CLIENT_ID - 324489592582-m87c61qlrroki9t4iuv8kuh7r0il684a.apps.googleusercontent.com - REVERSED_CLIENT_ID - com.googleusercontent.apps.324489592582-m87c61qlrroki9t4iuv8kuh7r0il684a - API_KEY - AIzaSyA22IY1X_-LBclpYnMIKSjgBpzqF3DvnBc - GCM_SENDER_ID - 324489592582 - PLIST_VERSION - 1 - BUNDLE_ID - ADCMNetworks.My-Mind - PROJECT_ID - mymind-9b3b3 - STORAGE_BUCKET - mymind-9b3b3.appspot.com - IS_ADS_ENABLED - - IS_ANALYTICS_ENABLED - - IS_APPINVITE_ENABLED - - IS_GCM_ENABLED - - IS_SIGNIN_ENABLED - - GOOGLE_APP_ID - 1:324489592582:ios:3612a095e492fb09 - DATABASE_URL - https://mymind-9b3b3.firebaseio.com - - \ No newline at end of file diff --git a/Old My Mind/My Mind/Info.plist b/Old My Mind/My Mind/Info.plist deleted file mode 100755 index 4fe1b3d..0000000 --- a/Old My Mind/My Mind/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIBackgroundModes - - fetch - location - remote-notification - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UIStatusBarStyle - UIStatusBarStyleLightContent - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - - - diff --git a/Old My Mind/My Mind/MainViews.swift b/Old My Mind/My Mind/MainViews.swift deleted file mode 100755 index cb7c1cc..0000000 --- a/Old My Mind/My Mind/MainViews.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// MainViews.swift -// My Mind -// -// Created by Alexander Davis on 09/04/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import Foundation -import UIKit -import Firebase -import FirebaseDatabase - -class Referrals: UIViewController{ - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } -} - -class ReferralConf: UIViewController{ - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } -} - -class Appoint: UIViewController{ - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } -} - -class Contact: UIViewController{ - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } -} - -class EmergeContacts: UITableViewController{ - @IBAction func TrustCallBtn(_ sender: UIButton) { - if let url = URL(string: "telprompt://01213010000") - { - UIApplication.shared.open(url, options: [:], completionHandler: nil) - } - } - - @IBAction func FwdThinkingbtn(_ sender: UIButton) { - if let url = URL(string: "telprompt://03003000099") - { - UIApplication.shared.open(url, options: [:], completionHandler: nil) - } - } - - @IBAction func Samaritansbtn(_ sender: UIButton) { - if let url = URL(string: "telprompt://08457909090") - { - UIApplication.shared.open(url, options: [:], completionHandler: nil) - } - } - - @IBAction func Sanebtn(_ sender: UIButton) { - if let url = URL(string: "telprompt://08457678000") - { - UIApplication.shared.open(url, options: [:], completionHandler: nil) - } - } - - @IBAction func Mindbtn(_ sender: UIButton) { - if let url = URL(string: "telprompt://0300123393") - { - UIApplication.shared.open(url, options: [:], completionHandler: nil) - } - } - - @IBAction func Alexsbtn(_ sender: UIButton) { - if let url = URL(string: "telprompt://07871778000") - { - UIApplication.shared.open(url, options: [:], completionHandler: nil) - } - } -} diff --git a/Old My Mind/My Mind/My Mind.entitlements b/Old My Mind/My Mind/My Mind.entitlements deleted file mode 100755 index 6a9ab47..0000000 --- a/Old My Mind/My Mind/My Mind.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - aps-environment - development - com.apple.developer.default-data-protection - NSFileProtectionComplete - - diff --git a/Old My Mind/My Mind/OnBoardingController.swift b/Old My Mind/My Mind/OnBoardingController.swift deleted file mode 100755 index 14a7430..0000000 --- a/Old My Mind/My Mind/OnBoardingController.swift +++ /dev/null @@ -1,83 +0,0 @@ -// -// OnBoardingController.swift -// My Mind -// -// Created by Alexander Davis on 30/03/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import Foundation -import UIKit - -class OnBoardingController : UIPageViewController { - - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - - override func viewDidLoad() { - // Set the dataSource and delegate in code. - // I can't figure out how to do this in the Storyboard! - dataSource = self - delegate = self - // This is the starting point. Start with step zero. - setViewControllers([getPageOne()], direction: .forward, animated: false, completion: nil) - } - - func getPageOne() -> PageOne { - return storyboard!.instantiateViewController(withIdentifier: "WelcomeScreenOne") as! PageOne - } - - func getPageTwo() -> PageTwo { - return storyboard!.instantiateViewController(withIdentifier: "WelcomeScreenTwo") as! PageTwo - } - - func getPageThree() -> PageThree { - return storyboard!.instantiateViewController(withIdentifier: "WelcomeScreenThree") as! PageThree - } - -} - -// MARK: - UIPageViewControllerDataSource methods - -extension OnBoardingController : UIPageViewControllerDataSource { - - func pageViewController(_ pageViewController: UIPageViewController, viewControllerBefore viewController: UIViewController) -> UIViewController? { - if viewController.isKind(of: PageTwo.self) { - // 2 -> 1 - return getPageTwo() - } else if viewController.isKind(of: PageTwo.self) { - // 1 -> 0 - return getPageOne() - } else { - // 0 -> end of the road - return nil - } - } - - func pageViewController(_ pageViewController: UIPageViewController, viewControllerAfter viewController: UIViewController) -> UIViewController? { - if viewController.isKind(of: PageOne.self) { - // 0 -> 1 - return getPageTwo() - } else if viewController.isKind(of: PageTwo.self) { - // 1 -> 2 - return getPageThree() - } else { - // 2 -> end of the road - return nil - } - } - - - // This only gets called once, when setViewControllers is called - func presentationIndex(for pageViewController: UIPageViewController) -> Int { - return 0 - } - -} - -// MARK: - UIPageViewControllerDelegate methods - -extension OnBoardingController : UIPageViewControllerDelegate { - -} diff --git a/Old My Mind/My Mind/OnlineInterfaces.swift b/Old My Mind/My Mind/OnlineInterfaces.swift deleted file mode 100755 index c48c6e5..0000000 --- a/Old My Mind/My Mind/OnlineInterfaces.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Databases.swift -// My Mind -// -// Created by Alexander Davis on 09/04/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import Foundation -import UIKit - -func SendRef(input: String){ - var request = URLRequest(url: URL(string: "https://www.mymindadmin.com/ReferMe.php")!) - request.httpMethod = "GET" - let postString = input - request.httpBody = postString.data(using: .utf8) - let task = URLSession.shared.dataTask(with: request) { data, response, error in - guard let data = data, error == nil else { // check for fundamental networking error - print("error=\(String(describing: error))") - return - } - - if let httpStatus = response as? HTTPURLResponse, httpStatus.statusCode != 200 { // check for http errors - print("statusCode should be 200, but is \(httpStatus.statusCode)") - print("response = \(String(describing: response))") - } - - let responseString = String(data: data, encoding: .utf8) - print("responseString = \(String(describing: responseString))") - } - task.resume() } - diff --git a/Old My Mind/My Mind/TabBarController.swift b/Old My Mind/My Mind/TabBarController.swift deleted file mode 100755 index 5098194..0000000 --- a/Old My Mind/My Mind/TabBarController.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// TabBarController.swift -// My Mind -// -// Created by Alexander Davis on 05/04/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import Foundation -import UIKit - -class MainTabView: UITabBarController{ - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } -} diff --git a/Old My Mind/My Mind/UserViews.swift b/Old My Mind/My Mind/UserViews.swift deleted file mode 100755 index 8101171..0000000 --- a/Old My Mind/My Mind/UserViews.swift +++ /dev/null @@ -1,168 +0,0 @@ -// -// LoginView.swift -// My Mind -// -// Created by Alexander Davis on 31/03/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import Foundation -import UIKit -import Firebase -import FirebaseAuth - -class LoginView: UIViewController { - - @IBOutlet weak var Emailtbx: UITextField! - @IBOutlet weak var Passwordtbx: UITextField! - @IBAction func Loginbtn(_ sender: UIButton) { - if self.Emailtbx.text == "" || self.Passwordtbx.text == "" { - - //Alert to tell the user that there was an error because they didn't fill anything in the textfields because they didn't fill anything in - - let alertController = UIAlertController(title: "Error", message: "Please enter an email and password.", preferredStyle: .alert) - - let defaultAction = UIAlertAction(title: "OK", style: .cancel, handler: nil) - alertController.addAction(defaultAction) - - self.present(alertController, animated: true, completion: nil) - - } else { - - FIRAuth.auth()?.signIn(withEmail: self.Emailtbx.text!, password: self.Passwordtbx.text!) { (user, error) in - - if error == nil { - - //Print into the console if successfully logged in - print("You have successfully logged in") - - //Go to the MainController if the login is sucessful - let alertController = UIAlertController(title: "Welcome", message: "You have successfully logged in", preferredStyle: .alert) - let vc = self.storyboard?.instantiateViewController(withIdentifier: "MainController") - let defaultAction = UIAlertAction(title: "OK", style: .default, handler: { action in self.present(vc!, animated: true, completion: nil);}) - alertController.addAction(defaultAction) - - self.present(alertController, animated: true, completion: nil) - - } else { - - //Tells the user that there is an error and then gets firebase to tell them the error - let alertController = UIAlertController(title: "Error", message: error?.localizedDescription, preferredStyle: .alert) - - let defaultAction = UIAlertAction(title: "OK", style: .cancel, handler: nil) - alertController.addAction(defaultAction) - - self.present(alertController, animated: true, completion: nil) - } - } - } - } - - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - } - -class SignUp : UIViewController { - - @IBOutlet weak var Emailtbx: UITextField! - @IBOutlet weak var Passwordtbx: UITextField! - @IBAction func createAccountbtn(_ sender: UIButton) { - if Emailtbx.text == "" { - let alertController = UIAlertController(title: "Error", message: "Please enter your email and password", preferredStyle: .alert) - - let defaultAction = UIAlertAction(title: "OK", style: .cancel, handler: nil) - alertController.addAction(defaultAction) - - present(alertController, animated: true, completion: nil) - - } else { - FIRAuth.auth()?.createUser(withEmail: Emailtbx.text!, password: Passwordtbx.text!) { (user, error) in - - if error == nil { - let alertController = UIAlertController(title: "Sign Up Complete", message: "You have Successfully Signed Up", preferredStyle: .alert) - let vc = self.storyboard?.instantiateViewController(withIdentifier: "Login") - let defaultAction = UIAlertAction(title: "OK", style: .default, handler: { action in self.present(vc!, animated: true, completion: nil);}) - alertController.addAction(defaultAction) - - self.present(alertController, animated: true, completion: nil) - - } else { - let alertController = UIAlertController(title: "Error", message: error?.localizedDescription, preferredStyle: .alert) - - let defaultAction = UIAlertAction(title: "OK", style: .cancel, handler: nil) - alertController.addAction(defaultAction) - - self.present(alertController, animated: true, completion: nil) - } - } - } - } - - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } -} - -class ForgotPass : UIViewController { - - @IBOutlet weak var Emailtbx: UITextField! - @IBAction func Resetbtn(_ sender: UIButton) { - if self.Emailtbx.text == "" { - let alertController = UIAlertController(title: "Oops!", message: "Please enter an email.", preferredStyle: .alert) - - let defaultAction = UIAlertAction(title: "OK", style: .cancel, handler: nil) - alertController.addAction(defaultAction) - - present(alertController, animated: true, completion: nil) - - } else { - FIRAuth.auth()?.sendPasswordReset(withEmail: self.Emailtbx.text!, completion: { (error) in - - var title = "" - var message = "" - - if error != nil { - title = "Error!" - message = (error?.localizedDescription)! - } else { - title = "Success!" - message = "Password reset email sent." - self.Emailtbx.text = "" - } - - let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) - - let vc = self.storyboard?.instantiateViewController(withIdentifier: "Login") - let defaultAction = UIAlertAction(title: "OK", style: .cancel, handler: { action in self.present(vc!, animated: true, completion: nil);}) - alertController.addAction(defaultAction) - - self.present(alertController, animated: true, completion: nil) - }) - } - } - - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } -} - -class Logout : UIViewController { - - @IBAction func Logoutbtn(_ sender: UIButton) { - if FIRAuth.auth()?.currentUser != nil { - do { - try FIRAuth.auth()?.signOut() - let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "OnBoard") - present(vc, animated: true, completion: nil) - - } catch let error as NSError { - print(error.localizedDescription) - } - } - } - - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } -} diff --git a/Old My Mind/My Mind/WelcomeScreenOne.swift b/Old My Mind/My Mind/WelcomeScreenOne.swift deleted file mode 100755 index ae853e4..0000000 --- a/Old My Mind/My Mind/WelcomeScreenOne.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// WelcomeScreenOne.swift -// My Mind -// -// Created by Alexander Davis on 30/03/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import Foundation -import UIKit - -class PageOne : UIViewController { - - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - -} diff --git a/Old My Mind/My Mind/WelcomeScreenThree.swift b/Old My Mind/My Mind/WelcomeScreenThree.swift deleted file mode 100755 index 502dbfb..0000000 --- a/Old My Mind/My Mind/WelcomeScreenThree.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// WelcomeScreenThree.swift -// My Mind -// -// Created by Alexander Davis on 30/03/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import Foundation -import UIKit - -class PageThree : UIViewController { - - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - -} diff --git a/Old My Mind/My Mind/WelcomeScreenTwo.swift b/Old My Mind/My Mind/WelcomeScreenTwo.swift deleted file mode 100755 index 29edc23..0000000 --- a/Old My Mind/My Mind/WelcomeScreenTwo.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// WelcomeScreenTwo.swift -// My Mind -// -// Created by Alexander Davis on 30/03/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import Foundation -import UIKit - -class PageTwo : UIViewController { - - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - -} diff --git a/Old My Mind/My MindTests/Info.plist b/Old My Mind/My MindTests/Info.plist deleted file mode 100755 index 6c6c23c..0000000 --- a/Old My Mind/My MindTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Old My Mind/My MindTests/My_MindTests.swift b/Old My Mind/My MindTests/My_MindTests.swift deleted file mode 100755 index 2e9941f..0000000 --- a/Old My Mind/My MindTests/My_MindTests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// My_MindTests.swift -// My MindTests -// -// Created by Alexander Davis on 09/04/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import XCTest -@testable import My_Mind - -class My_MindTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/Old My Mind/My MindUITests/Info.plist b/Old My Mind/My MindUITests/Info.plist deleted file mode 100755 index 6c6c23c..0000000 --- a/Old My Mind/My MindUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Old My Mind/My MindUITests/My_MindUITests.swift b/Old My Mind/My MindUITests/My_MindUITests.swift deleted file mode 100755 index 012090d..0000000 --- a/Old My Mind/My MindUITests/My_MindUITests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// My_MindUITests.swift -// My MindUITests -// -// Created by Alexander Davis on 09/04/2017. -// Copyright © 2017 Alexander Davis. All rights reserved. -// - -import XCTest - -class My_MindUITests: XCTestCase { - - override func setUp() { - super.setUp() - - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. - XCUIApplication().launch() - - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // Use recording to get started writing UI tests. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - -} diff --git a/Old My Mind/Podfile b/Old My Mind/Podfile deleted file mode 100755 index f0b09d6..0000000 --- a/Old My Mind/Podfile +++ /dev/null @@ -1,27 +0,0 @@ -# Uncomment the next line to define a global platform for your project -# platform :ios, '9.0' - -target 'My Mind' do - # Comment the next line if you're not using Swift and don't want to use dynamic frameworks - use_frameworks! - - # Pods for My Mind - - target 'My MindTests' do - inherit! :search_paths - # Pods for testing - end - - target 'My MindUITests' do - inherit! :search_paths - # Pods for testing - end - -pod 'Firebase/Core' -pod 'Firebase/Auth' -pod 'Firebase/Messaging' -pod 'Firebase/Database' -pod 'Firebase/Storage' -pod 'SwiftForms' - -end diff --git a/Old My Mind/Podfile.lock b/Old My Mind/Podfile.lock deleted file mode 100755 index 9470a24..0000000 --- a/Old My Mind/Podfile.lock +++ /dev/null @@ -1,78 +0,0 @@ -PODS: - - Firebase/Auth (3.15.0): - - Firebase/Core - - FirebaseAuth (= 3.1.1) - - Firebase/Core (3.15.0): - - FirebaseAnalytics (= 3.7.0) - - FirebaseCore (= 3.5.2) - - Firebase/Database (3.15.0): - - Firebase/Core - - FirebaseDatabase (= 3.1.2) - - Firebase/Messaging (3.15.0): - - Firebase/Core - - FirebaseMessaging (= 1.2.2) - - Firebase/Storage (3.15.0): - - Firebase/Core - - FirebaseStorage (= 1.1.0) - - FirebaseAnalytics (3.7.0): - - FirebaseCore (~> 3.5) - - FirebaseInstanceID (~> 1.0) - - GoogleToolboxForMac/NSData+zlib (~> 2.1) - - FirebaseAuth (3.1.1): - - FirebaseAnalytics (~> 3.7) - - GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1) - - GTMSessionFetcher/Core (~> 1.1) - - FirebaseCore (3.5.2): - - GoogleToolboxForMac/NSData+zlib (~> 2.1) - - FirebaseDatabase (3.1.2): - - FirebaseAnalytics (~> 3.7) - - FirebaseInstanceID (1.0.9) - - FirebaseMessaging (1.2.2): - - FirebaseAnalytics (~> 3.7) - - FirebaseInstanceID (~> 1.0) - - GoogleToolboxForMac/Logger (~> 2.1) - - Protobuf (~> 3.1) - - FirebaseStorage (1.1.0): - - FirebaseAnalytics (~> 3.7) - - GTMSessionFetcher/Core (~> 1.1) - - GoogleToolboxForMac/DebugUtils (2.1.1): - - GoogleToolboxForMac/Defines (= 2.1.1) - - GoogleToolboxForMac/Defines (2.1.1) - - GoogleToolboxForMac/Logger (2.1.1): - - GoogleToolboxForMac/Defines (= 2.1.1) - - GoogleToolboxForMac/NSData+zlib (2.1.1): - - GoogleToolboxForMac/Defines (= 2.1.1) - - GoogleToolboxForMac/NSDictionary+URLArguments (2.1.1): - - GoogleToolboxForMac/DebugUtils (= 2.1.1) - - GoogleToolboxForMac/Defines (= 2.1.1) - - GoogleToolboxForMac/NSString+URLArguments (= 2.1.1) - - GoogleToolboxForMac/NSString+URLArguments (2.1.1) - - GTMSessionFetcher/Core (1.1.9) - - Protobuf (3.2.0) - - SwiftForms (1.7) - -DEPENDENCIES: - - Firebase/Auth - - Firebase/Core - - Firebase/Database - - Firebase/Messaging - - Firebase/Storage - - SwiftForms - -SPEC CHECKSUMS: - Firebase: 2b1cdfba1cda8589f32904a697cc753322bff9d8 - FirebaseAnalytics: 0d1b7d81d5021155be37702a94ba1ec16d45365d - FirebaseAuth: cc8a1824170adbd351edb7f994490a3fb5c18be6 - FirebaseCore: a024587e43778508700af8c6b1209f7c4516ba02 - FirebaseDatabase: 05c96d7b43a7368dc91c07791adb49683e1738d1 - FirebaseInstanceID: 2d0518b1378fe9d685ef40cbdd63d2fdc1125339 - FirebaseMessaging: df8267f378580a24174ce7861233aa11d5c90109 - FirebaseStorage: a5c55b23741a49a72af8f30f95b3bb5ddbeda12d - GoogleToolboxForMac: 8e329f1b599f2512c6b10676d45736bcc2cbbeb0 - GTMSessionFetcher: 5c046c76a1f859bc9c187e918f18e4fc7bb57b5e - Protobuf: 745f59e122e5de98d4d7ef291e264a0eef80f58e - SwiftForms: 3f3dbaa79fe54eb1ccd0aca8d0cd1e38eb00537e - -PODFILE CHECKSUM: dd1734d567f280edf21443a33ce1b6333374b6d2 - -COCOAPODS: 1.2.1 diff --git a/Old My Mind/Pods/FirebaseAuth/CHANGELOG.md b/Old My Mind/Pods/FirebaseAuth/CHANGELOG.md deleted file mode 100755 index a42f7d1..0000000 --- a/Old My Mind/Pods/FirebaseAuth/CHANGELOG.md +++ /dev/null @@ -1,38 +0,0 @@ -# 2017-02-06 -- v3.1.1 -- Allows handling of additional errors when sending OOB action emails. The - server can respond with the following new error messages: - INVALID_MESSAGE_PAYLOAD,INVALID_SENDER and INVALID_RECIPIENT_EMAIL. -- Removes incorrect reference to FIRAuthErrorCodeCredentialTooOld in FIRUser.h. -- Provides additional error information from server if available. - -# 2016-12-13 -- v3.1.0 -- Adds FIRAuth methods that enable the app to follow up with user actions - delivered by email, such as verifying email address or reset password. -- No longer applies the keychain workaround introduced in v3.0.5 on iOS 10.2 - simulator or above since the issue has been fixed. -- Fixes nullability compilation warnings when used in Swift. -- Better reports missing password error. - -# 2016-10-24 -- v3.0.6 -- Switches to depend on open sourced GoogleToolboxForMac and GTMSessionFetcher. -- Improves logging of keychain error when initializing. - -# 2016-09-14 -- v3.0.5 -- Works around a keychain issue in iOS 10 simulator. -- Reports the correct error for invalid email when signing in with email and - password. - -# 2016-07-18 -- v3.0.4 -- Fixes a race condition bug that could crash the app with an exception from - NSURLSession on iOS 9. - -# 2016-06-20 -- v3.0.3 -- Adds documentation for all possible errors returned by each method. -- Improves error handling and messages for a variety of error conditions. -- Whether or not an user is considered anonymous is now consistent with other - platforms. -- A saved signed in user is now siloed between different Firebase projects - within the same app. - -# 2016-05-18 -- v3.0.2 -- Initial public release. diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/FirebaseAuth b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/FirebaseAuth deleted file mode 100755 index 18675e6..0000000 Binary files a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/FirebaseAuth and /dev/null differ diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuth.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuth.h deleted file mode 100755 index 1f2be01..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuth.h +++ /dev/null @@ -1,488 +0,0 @@ -/** @file FIRAuth.h - @brief Firebase Auth SDK - @copyright Copyright 2015 Google Inc. - @remarks Use of this SDK is subject to the Google APIs Terms of Service: - https://developers.google.com/terms/ - */ - -#import - -#import "FIRAuthErrors.h" - -@class FIRApp; -@class FIRAuth; -@class FIRAuthCredential; -@class FIRUser; -@protocol FIRAuthStateListener; - -NS_ASSUME_NONNULL_BEGIN - -/** @typedef FIRAuthStateDidChangeListenerHandle - @brief The type of handle returned by @c FIRAuth.addAuthStateDidChangeListener:. - */ -typedef id FIRAuthStateDidChangeListenerHandle; - -/** @typedef FIRAuthStateDidChangeListenerBlock - @brief The type of block which can be registered as a listener for auth state did change events. - - @param auth The FIRAuth object on which state changes occurred. - @param user Optionally; the current signed in user, if any. - */ -typedef void(^FIRAuthStateDidChangeListenerBlock)(FIRAuth *auth, FIRUser *_Nullable user); - -/** - @brief The name of the @c NSNotificationCenter notification which is posted when the auth state - changes (for example, a new token has been produced, a user signs in or signs out). The - object parameter of the notification is the sender @c FIRAuth instance. - */ -extern NSString *const FIRAuthStateDidChangeNotification; - -/** @typedef FIRAuthResultCallback - @brief The type of block invoked when sign-in related events complete. - - @param user Optionally; the signed in user, if any. - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRAuthResultCallback)(FIRUser *_Nullable user, NSError *_Nullable error); - -/** @typedef FIRProviderQueryCallback - @brief The type of block invoked when a list of identity providers for a given email address is - requested. - - @param providers Optionally; a list of provider identifiers, if any. - @see FIRGoogleAuthProviderID etc. - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRProviderQueryCallback)(NSArray *_Nullable providers, - NSError *_Nullable error); - -/** @typedef FIRSendPasswordResetCallback - @brief The type of block invoked when sending a password reset email. - - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error); - -/** @typedef FIRConfirmPasswordResetCallback - @brief The type of block invoked when performing a password reset. - - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRConfirmPasswordResetCallback)(NSError *_Nullable error); - -/** @typedef FIRVerifyPasswordResetCodeCallback - @brief The type of block invoked when verifying that an out of band code should be used to - perform password reset. - - @param email Optionally; the email address of the user for which the out of band code applies. - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRVerifyPasswordResetCodeCallback)(NSString *_Nullable email, - NSError *_Nullable error); - -/** @typedef FIRApplyActionCodeCallback - @brief The type of block invoked when applying an action code. - - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRApplyActionCodeCallback)(NSError *_Nullable error); - -/** - @brief Keys used to retrieve operation data from a @c FIRActionCodeInfo object by the @c - dataForKey method. - */ -typedef NS_ENUM(NSInteger, FIRActionDataKey) { - /** - * The email address to which the code was sent. - * For FIRActionCodeOperationRecoverEmail, the new email address for the account. - */ - FIRActionCodeEmailKey = 0, - - /** For FIRActionCodeOperationRecoverEmail, the current email address for the account. */ - FIRActionCodeFromEmailKey = 1 -}; - -/** @class FIRActionCodeInfo - @brief Manages information regarding action codes. - */ -@interface FIRActionCodeInfo : NSObject - -/** - @brief Operations which can be performed with action codes. - */ -typedef NS_ENUM(NSInteger, FIRActionCodeOperation) { - /** Action code for unknown operation. */ - FIRActionCodeOperationUnknown = 0, - - /** Action code for password reset operation. */ - FIRActionCodeOperationPasswordReset = 1, - - /** Action code for verify email operation. */ - FIRActionCodeOperationVerifyEmail = 2 -}; - -/** - @brief The operation being performed. - */ -@property(nonatomic, readonly) FIRActionCodeOperation operation; - -/** @fn dataForKey: - @brief The operation being performed. - - @param key The FIRActionDataKey value used to retrieve the operation data. - - @return The operation data pertaining to the provided action code key. - */ -- (NSString *)dataForKey:(FIRActionDataKey)key; - -/** @fn init - @brief please use initWithOperation: instead. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -/** @typedef FIRCheckActionCodeCallBack - @brief The type of block invoked when performing a check action code operation. - - @param info Metadata corresponding to the action code. - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRCheckActionCodeCallBack)(FIRActionCodeInfo *_Nullable info, - NSError *_Nullable error); - -/** @class FIRAuth - @brief Manages authentication for Firebase apps. - @remarks This class is thread-safe. - */ -@interface FIRAuth : NSObject - -/** @fn auth - @brief Gets the auth object for the default Firebase app. - @remarks Thread safe. - */ -+ (nullable FIRAuth *)auth NS_SWIFT_NAME(auth()); - -/** @fn authWithApp: - @brief Gets the auth object for a @c FIRApp. - - @param app The FIRApp for which to retrieve the associated FIRAuth instance. - @return The FIRAuth instance associated with the given FIRApp. - */ -+ (nullable FIRAuth *)authWithApp:(FIRApp *)app; - -/** @property app - @brief Gets the @c FIRApp object that this auth object is connected to. - */ -@property(nonatomic, weak, readonly, nullable) FIRApp *app; - -/** @property currentUser - @brief Synchronously gets the cached current user, or null if there is none. - */ -@property(nonatomic, strong, readonly, nullable) FIRUser *currentUser; - -/** @fn init - @brief Please access auth instances using @c FIRAuth.auth and @c FIRAuth.authForApp:. - */ -- (instancetype)init NS_UNAVAILABLE; - -/** @fn fetchProvidersForEmail:completion: - @brief Fetches the list of IdPs that can be used for signing in with the provided email address. - Useful for an "identifier-first" sign-in flow. - - @param email The email address for which to obtain a list of identity providers. - @param completion Optionally; a block which is invoked when the list of providers for the - specified email address is ready or an error was encountered. Invoked asynchronously on the - main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ -- (void)fetchProvidersForEmail:(NSString *)email - completion:(nullable FIRProviderQueryCallback)completion; - -/** @fn signInWithEmail:password:completion: - @brief Signs in using an email address and password. - - @param email The user's email address. - @param password The user's password. - @param completion Optionally; a block which is invoked when the sign in flow finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - -
    -
  • @c FIRAuthErrorCodeOperationNotAllowed - Indicates that email and password - accounts are not enabled. Enable them in the Auth section of the - Firebase console. -
  • -
  • @c FIRAuthErrorCodeUserDisabled - Indicates the user's account is disabled. -
  • -
  • @c FIRAuthErrorCodeWrongPassword - Indicates the user attempted - sign in with an incorrect password. -
  • -
  • @c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed. -
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ -- (void)signInWithEmail:(NSString *)email - password:(NSString *)password - completion:(nullable FIRAuthResultCallback)completion; - -/** @fn signInWithCredential:completion: - @brief Asynchronously signs in to Firebase with the given 3rd-party credentials (e.g. a Facebook - login Access Token, a Google ID Token/Access Token pair, etc.) - - @param credential The credential supplied by the IdP. - @param completion Optionally; a block which is invoked when the sign in flow finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeInvalidCredential - Indicates the supplied credential is invalid. - This could happen if it has expired or it is malformed. -
  • -
  • @c FIRAuthErrorCodeOperationNotAllowed - Indicates that accounts - with the identity provider represented by the credential are not enabled. - Enable them in the Auth section of the Firebase console. -
  • -
  • @c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email asserted by the credential - (e.g. the email in a Facebook access token) is already in use by an existing account, - that cannot be authenticated with this sign-in method. Call fetchProvidersForEmail for - this user’s email and then prompt them to sign in with any of the sign-in providers - returned. This error will only be thrown if the "One account per email address" - setting is enabled in the Firebase console, under Auth settings. Please note that the - error code raised in this specific situation may not be the same on - Web and Android. -
  • -
  • @c FIRAuthErrorCodeUserDisabled - Indicates the user's account is disabled. -
  • -
  • @c FIRAuthErrorCodeWrongPassword - Indicates the user attempted sign in with an - incorrect password, if credential is of the type EmailPasswordAuthCredential. -
  • -
  • @c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed. -
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ -- (void)signInWithCredential:(FIRAuthCredential *)credential - completion:(nullable FIRAuthResultCallback)completion; - -/** @fn signInAnonymouslyWithCompletion: - @brief Asynchronously creates and becomes an anonymous user. - @param completion Optionally; a block which is invoked when the sign in finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks If there is already an anonymous user signed in, that user will be returned instead. - If there is any other existing user signed in, that user will be signed out. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeOperationNotAllowed - Indicates that anonymous accounts are - not enabled. Enable them in the Auth section of the Firebase console. -
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ -- (void)signInAnonymouslyWithCompletion:(nullable FIRAuthResultCallback)completion; - -/** @fn signInWithCustomToken:completion: - @brief Asynchronously signs in to Firebase with the given Auth token. - - @param token A self-signed custom auth token. - @param completion Optionally; a block which is invoked when the sign in finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeInvalidCustomToken - Indicates a validation error with - the custom token. -
  • -
  • @c FIRAuthErrorCodeCustomTokenMismatch - Indicates the service account and the API key - belong to different projects. -
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ -- (void)signInWithCustomToken:(NSString *)token - completion:(nullable FIRAuthResultCallback)completion; - -/** @fn createUserWithEmail:password:completion: - @brief Creates and, on success, signs in a user with the given email address and password. - - @param email The user's email address. - @param password The user's desired password. - @param completion Optionally; a block which is invoked when the sign up flow finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed. -
  • -
  • @c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email used to attempt sign up - already exists. Call fetchProvidersForEmail to check which sign-in mechanisms the user - used, and prompt the user to sign in with one of those. -
  • -
  • @c FIRAuthErrorCodeOperationNotAllowed - Indicates that email and password accounts - are not enabled. Enable them in the Auth section of the Firebase console. -
  • -
  • @c FIRAuthErrorCodeWeakPassword - Indicates an attempt to set a password that is - considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo - dictionary object will contain more detailed explanation that can be shown to the user. -
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ -- (void)createUserWithEmail:(NSString *)email - password:(NSString *)password - completion:(nullable FIRAuthResultCallback)completion; - -/** @fn confirmPasswordResetWithCode:newPassword:completion: - @brief Resets the password given a code sent to the user outside of the app and a new password - for the user. - - @param newPassword The new password. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeWeakPassword - Indicates an attempt to set a password that is - considered too weak. -
  • -
  • @c FIRAuthErrorCodeOperationNotAllowed - Indicates the administrator disabled sign - in with the specified identity provider. -
  • -
  • @c FIRAuthErrorCodeExpiredActionCode - Indicates the OOB code is expired. -
  • -
  • @c FIRAuthErrorCodeInvalidActionCode - Indicates the OOB code is invalid. -
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ -- (void)confirmPasswordResetWithCode:(NSString *)code - newPassword:(NSString *)newPassword - completion:(FIRConfirmPasswordResetCallback)completion; - -/** @fn checkActionCode:completion: - @brief Checks the validity of an out of band code. - - @param code The out of band code to check validity. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - */ -- (void)checkActionCode:(NSString *)code completion:(FIRCheckActionCodeCallBack)completion; - -/** @fn verifyPasswordResetCode:completion: - @brief Checks the validity of a verify password reset code. - - @param code The password reset code to be verified. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - */ -- (void)verifyPasswordResetCode:(NSString *)code - completion:(FIRVerifyPasswordResetCodeCallback)completion; - -/** @fn applyActionCode:completion: - @brief Applies out of band code. - - @param code The out of band code to be applied. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - - @remarks This method will not work for out of band codes which require an additional parameter, - such as password reset code. - */ -- (void)applyActionCode:(NSString *)code - completion:(FIRApplyActionCodeCallback)completion; - -/** @fn sendPasswordResetWithEmail:completion: - @brief Initiates a password reset for the given email address. - - @param email The email address of the user. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeInvalidRecipientEmail - Indicates an invalid recipient email was - sent in the request. -
  • -
  • @c FIRAuthErrorCodeInvalidSender - Indicates an invalid sender email is set in - the console for this action. -
  • -
  • @c FIRAuthErrorCodeInvalidMessagePayload - Indicates an invalid email template for - sending update email. -
  • -
- */ -- (void)sendPasswordResetWithEmail:(NSString *)email - completion:(nullable FIRSendPasswordResetCallback)completion; - -/** @fn signOut: - @brief Signs out the current user. - - @param error Optionally; if an error occurs, upon return contains an NSError object that - describes the problem; is nil otherwise. - @return @YES when the sign out request was successful. @NO otherwise. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeKeychainError - Indicates an error occurred when accessing the - keychain. The @c NSLocalizedFailureReasonErrorKey field in the @c NSError.userInfo - dictionary will contain more information about the error encountered. -
  • -
- - */ -- (BOOL)signOut:(NSError *_Nullable *_Nullable)error; - -/** @fn addAuthStateDidChangeListener: - @brief Registers a block as an "auth state did change" listener. To be invoked when: - - + The block is registered as a listener, - + The current user changes, or, - + The current user's access token changes. - - @param listener The block to be invoked. The block is always invoked asynchronously on the main - thread, even for it's initial invocation after having been added as a listener. - - @remarks The block is invoked immediately after adding it according to it's standard invocation - semantics, asynchronously on the main thread. Users should pay special attention to - making sure the block does not inadvertently retain objects which should not be retained by - the long-lived block. The block itself will be retained by @c FIRAuth until it is - unregistered or until the @c FIRAuth instance is otherwise deallocated. - - @return A handle useful for manually unregistering the block as a listener. - */ -- (FIRAuthStateDidChangeListenerHandle)addAuthStateDidChangeListener: - (FIRAuthStateDidChangeListenerBlock)listener; - -/** @fn removeAuthStateDidChangeListener: - @brief Unregisters a block as an "auth state did change" listener. - - @param listenerHandle The handle for the listener. - */ -- (void)removeAuthStateDidChangeListener:(FIRAuthStateDidChangeListenerHandle)listenerHandle; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthCredential.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthCredential.h deleted file mode 100755 index f960143..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthCredential.h +++ /dev/null @@ -1,31 +0,0 @@ -/** @file FIRAuthCredential.h - @brief Firebase Auth SDK - @copyright Copyright 2015 Google Inc. - @remarks Use of this SDK is subject to the Google APIs Terms of Service: - https://developers.google.com/terms/ - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/** @class FIRAuthCredential - @brief Represents a credential. - */ -@interface FIRAuthCredential : NSObject - -/** @property provider - @brief Gets the name of the identity provider for the credential. - */ -@property(nonatomic, copy, readonly) NSString *provider; - -/** @fn init - @brief This is an abstract base class. Concrete instances should be created via factory - methods available in the various authentication provider libraries (like the Facebook - provider or the Google provider libraries.) - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthErrors.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthErrors.h deleted file mode 100755 index 3940347..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthErrors.h +++ /dev/null @@ -1,176 +0,0 @@ -/** @file FIRAuthErrors.h - @brief Firebase Auth SDK - @copyright Copyright 2015 Google Inc. - @remarks Use of this SDK is subject to the Google APIs Terms of Service: - https://developers.google.com/terms/ - */ - -#import - -/** @class FIRAuthErrors - @remarks Error Codes common to all API Methods: -
    -
  • @c FIRAuthErrorCodeNetworkError
  • -
  • @c FIRAuthErrorCodeUserNotFound
  • -
  • @c FIRAuthErrorCodeUserTokenExpired
  • -
  • @c FIRAuthErrorCodeTooManyRequests
  • -
  • @c FIRAuthErrorCodeInvalidAPIKey
  • -
  • @c FIRAuthErrorCodeAppNotAuthorized
  • -
  • @c FIRAuthErrorCodeKeychainError
  • -
  • @c FIRAuthErrorCodeInternalError
  • -
- @remarks Common error codes for @c FIRUser operations: -
    -
  • @c FIRAuthErrorCodeInvalidUserToken
  • -
  • @c FIRAuthErrorCodeUserDisabled
  • -
- */ -@interface FIRAuthErrors - -/** - @brief The Firebase Auth error domain. - */ -extern NSString *const FIRAuthErrorDomain; - -/** - @brief The name of the key for the "error_name" string in the NSError userinfo dictionary. - */ -extern NSString *const FIRAuthErrorNameKey; - -/** - @brief Error codes used by Firebase Auth. - */ -typedef NS_ENUM(NSInteger, FIRAuthErrorCode) { - /** Indicates a validation error with the custom token. - */ - FIRAuthErrorCodeInvalidCustomToken = 17000, - - /** Indicates the service account and the API key belong to different projects. - */ - FIRAuthErrorCodeCustomTokenMismatch = 17002, - - /** Indicates the IDP token or requestUri is invalid. - */ - FIRAuthErrorCodeInvalidCredential = 17004, - - /** Indicates the user's account is disabled on the server. - */ - FIRAuthErrorCodeUserDisabled = 17005, - - /** Indicates the administrator disabled sign in with the specified identity provider. - */ - FIRAuthErrorCodeOperationNotAllowed = 17006, - - /** Indicates the email used to attempt a sign up is already in use. - */ - FIRAuthErrorCodeEmailAlreadyInUse = 17007, - - /** Indicates the email is invalid. - */ - FIRAuthErrorCodeInvalidEmail = 17008, - - /** Indicates the user attempted sign in with a wrong password. - */ - FIRAuthErrorCodeWrongPassword = 17009, - - /** Indicates that too many requests were made to a server method. - */ - FIRAuthErrorCodeTooManyRequests = 17010, - - /** Indicates the user account was not found. - */ - FIRAuthErrorCodeUserNotFound = 17011, - - /** Indicates account linking is required. - */ - FIRAuthErrorCodeAccountExistsWithDifferentCredential = 17012, - - /** Same enum as @c FIRAuthErrorCodeAccountExistsWithDifferentCredential , - but with incorrect spelling. Only exists for backwards compatiblity. - */ - FIRAuthErrrorCodeAccountExistsWithDifferentCredential = 17012, - - /** Indicates the user has attemped to change email or password more than 5 minutes after - signing in. - */ - FIRAuthErrorCodeRequiresRecentLogin = 17014, - - /** Indicates an attempt to link a provider to which the account is already linked. - */ - FIRAuthErrorCodeProviderAlreadyLinked = 17015, - - /** Indicates an attempt to unlink a provider that is not linked. - */ - FIRAuthErrorCodeNoSuchProvider = 17016, - - /** Indicates user's saved auth credential is invalid, the user needs to sign in again. - */ - FIRAuthErrorCodeInvalidUserToken = 17017, - - /** Indicates a network error occurred (such as a timeout, interrupted connection, or - unreachable host). These types of errors are often recoverable with a retry. The @c - NSUnderlyingError field in the @c NSError.userInfo dictionary will contain the error - encountered. - */ - FIRAuthErrorCodeNetworkError = 17020, - - /** Indicates the saved token has expired, for example, the user may have changed account - password on another device. The user needs to sign in again on the device that made this - request. - */ - FIRAuthErrorCodeUserTokenExpired = 17021, - - /** Indicates an invalid API key was supplied in the request. - */ - FIRAuthErrorCodeInvalidAPIKey = 17023, - - /** Indicates that an attempt was made to reauthenticate with a user which is not the current - user. - */ - FIRAuthErrorCodeUserMismatch = 17024, - - /** Indicates an attempt to link with a credential that has already been linked with a - different Firebase account - */ - FIRAuthErrorCodeCredentialAlreadyInUse = 17025, - - /** Indicates an attempt to set a password that is considered too weak. - */ - FIRAuthErrorCodeWeakPassword = 17026, - - /** Indicates the App is not authorized to use Firebase Authentication with the - provided API Key. - */ - FIRAuthErrorCodeAppNotAuthorized = 17028, - - /** Indicates the OOB code is expired. - */ - FIRAuthErrorCodeExpiredActionCode = 17029, - - /** Indicates the OOB code is invalid. - */ - FIRAuthErrorCodeInvalidActionCode = 17030, - - /** Indicates that there are invalid parameters in the payload during a "send password reset - * email" attempt. - */ - FIRAuthErrorCodeInvalidMessagePayload = 17031, - - /** Indicates that the sender email is invalid during a "send password reset email" attempt. - */ - FIRAuthErrorCodeInvalidSender = 17032, - - /** Indicates that the recipient email is invalid. - */ - FIRAuthErrorCodeInvalidRecipientEmail = 17033, - - /** Indicates an error occurred while attempting to access the keychain. - */ - FIRAuthErrorCodeKeychainError = 17995, - - /** Indicates an internal error occurred. - */ - FIRAuthErrorCodeInternalError = 17999, -}; - -@end diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIREmailPasswordAuthProvider.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIREmailPasswordAuthProvider.h deleted file mode 100755 index a18d5b4..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIREmailPasswordAuthProvider.h +++ /dev/null @@ -1,40 +0,0 @@ -/** @file FIREmailPasswordAuthProvider.h - @brief Firebase Auth SDK - @copyright Copyright 2016 Google Inc. - @remarks Use of this SDK is subject to the Google APIs Terms of Service: - https://developers.google.com/terms/ - */ - -#import - -@class FIRAuthCredential; - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief A string constant identifying the email & password identity provider. - */ -extern NSString *const FIREmailPasswordAuthProviderID; - -/** @class FIREmailPasswordAuthProvider - @brief A concrete implementation of @c FIRAuthProvider for Email & Password Sign In. - */ -@interface FIREmailPasswordAuthProvider : NSObject - -/** @fn credentialWithEmail:password: - @brief Creates an @c FIRAuthCredential for an email & password sign in. - - @param email The user's email address. - @param password The user's password. - @return A FIRAuthCredential containing the email & password credential. - */ -+ (FIRAuthCredential *)credentialWithEmail:(NSString *)email password:(NSString *)password; - -/** @fn init - @brief This class is not meant to be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h deleted file mode 100755 index ce968d2..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h +++ /dev/null @@ -1,39 +0,0 @@ -/** @file FIRFacebookAuthProvider.h - @brief Firebase Auth SDK - @copyright Copyright 2016 Google Inc. - @remarks Use of this SDK is subject to the Google APIs Terms of Service: - https://developers.google.com/terms/ - */ - -#import - -@class FIRAuthCredential; - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief A string constant identifying the Facebook identity provider. - */ -extern NSString *const FIRFacebookAuthProviderID; - -/** @class FIRFacebookAuthProvider - @brief Utility class for constructing Facebook credentials. - */ -@interface FIRFacebookAuthProvider : NSObject - -/** @fn credentialWithAccessToken: - @brief Creates an @c FIRAuthCredential for a Facebook sign in. - - @param accessToken The Access Token from Facebook. - @return A FIRAuthCredential containing the Facebook credentials. - */ -+ (FIRAuthCredential *)credentialWithAccessToken:(NSString *)accessToken; - -/** @fn init - @brief This class should not be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h deleted file mode 100755 index fcc1491..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h +++ /dev/null @@ -1,39 +0,0 @@ -/** @file FIRGitHubAuthProvider.h - @brief Firebase Auth SDK - @copyright Copyright 2016 Google Inc. - @remarks Use of this SDK is subject to the Google APIs Terms of Service: - https://developers.google.com/terms/ - */ - -#import - -@class FIRAuthCredential; - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief A string constant identifying the GitHub identity provider. - */ -extern NSString *const FIRGitHubAuthProviderID; - -/** @class FIRGitHubAuthProvider - @brief Utility class for constructing GitHub credentials. - */ -@interface FIRGitHubAuthProvider : NSObject - -/** @fn credentialWithToken: - @brief Creates an @c FIRAuthCredential for a GitHub sign in. - - @param token The GitHub OAuth access token. - @return A FIRAuthCredential containing the GitHub credential. - */ -+ (FIRAuthCredential *)credentialWithToken:(NSString *)token; - -/** @fn init - @brief This class is not meant to be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h deleted file mode 100755 index cdd574b..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h +++ /dev/null @@ -1,41 +0,0 @@ -/** @file FIRGoogleAuthProvider.h - @brief Firebase Auth SDK - @copyright Copyright 2016 Google Inc. - @remarks Use of this SDK is subject to the Google APIs Terms of Service: - https://developers.google.com/terms/ - */ - -#import - -@class FIRAuthCredential; - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief A string constant identifying the Google identity provider. - */ -extern NSString *const FIRGoogleAuthProviderID; - -/** @class FIRGoogleAuthProvider - @brief Utility class for constructing Google Sign In credentials. - */ -@interface FIRGoogleAuthProvider : NSObject - -/** @fn credentialWithIDToken:accessToken: - @brief Creates an @c FIRAuthCredential for a Google sign in. - - @param IDToken The ID Token from Google. - @param accessToken The Access Token from Google. - @return A FIRAuthCredential containing the Google credentials. - */ -+ (FIRAuthCredential *)credentialWithIDToken:(NSString *)IDToken - accessToken:(NSString *)accessToken; - -/** @fn init - @brief This class should not be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h deleted file mode 100755 index 6d1e993..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h +++ /dev/null @@ -1,40 +0,0 @@ -/** @file FIRTwitterAuthProvider.h - @brief Firebase Auth SDK - @copyright Copyright 2016 Google Inc. - @remarks Use of this SDK is subject to the Google APIs Terms of Service: - https://developers.google.com/terms/ - */ - -#import - -@class FIRAuthCredential; - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief A string constant identifying the Twitter identity provider. - */ -extern NSString *const FIRTwitterAuthProviderID; - -/** @class FIRTwitterAuthProvider - @brief Utility class for constructing Twitter credentials. - */ -@interface FIRTwitterAuthProvider : NSObject - -/** @fn credentialWithToken:secret: - @brief Creates an @c FIRAuthCredential for a Twitter sign in. - - @param token The Twitter OAuth token. - @param secret The Twitter OAuth secret. - @return A FIRAuthCredential containing the Twitter credential. - */ -+ (FIRAuthCredential *)credentialWithToken:(NSString *)token secret:(NSString *)secret; - -/** @fn init - @brief This class is not meant to be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUser.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUser.h deleted file mode 100755 index a137701..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUser.h +++ /dev/null @@ -1,376 +0,0 @@ -/** @file FIRUser.h - @brief Firebase Auth SDK - @copyright Copyright 2015 Google Inc. - @remarks Use of this SDK is subject to the Google APIs Terms of Service: - https://developers.google.com/terms/ - */ - -#import - -#import "FIRAuth.h" -#import "FIRUserInfo.h" - -@class FIRUserProfileChangeRequest; - -NS_ASSUME_NONNULL_BEGIN - -/** @typedef FIRAuthTokenCallback - @brief The type of block called when a token is ready for use. - @see FIRUser.getTokenWithCompletion: - @see FIRUser.getTokenForcingRefresh:withCompletion: - - @param token Optionally; an access token if the request was successful. - @param error Optionally; the error which occurred - or nil if the request was successful. - - @remarks One of: @c token or @c error will always be non-nil. - */ -typedef void (^FIRAuthTokenCallback)(NSString *_Nullable token, NSError *_Nullable error); - -/** @typedef FIRUserProfileChangeCallback - @brief The type of block called when a user profile change has finished. - - @param error Optionally; the error which occurred - or nil if the request was successful. - */ -typedef void (^FIRUserProfileChangeCallback)(NSError *_Nullable error); - -/** @typedef FIRSendEmailVerificationCallback - @brief The type of block called when a request to send an email verification has finished. - - @param error Optionally; the error which occurred - or nil if the request was successful. - */ -typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error); - -/** @class FIRUser - @brief Represents a user. - @remarks This class is thread-safe. - */ -@interface FIRUser : NSObject - -/** @property anonymous - @brief Indicates the user represents an anonymous user. - */ -@property(nonatomic, readonly, getter=isAnonymous) BOOL anonymous; - -/** @property emailVerified - @brief Indicates the email address associated with this user has been verified. - */ -@property(nonatomic, readonly, getter=isEmailVerified) BOOL emailVerified; - -/** @property refreshToken - @brief A refresh token; useful for obtaining new access tokens independently. - @remarks This property should only be used for advanced scenarios, and is not typically needed. - */ -@property(nonatomic, readonly, nullable) NSString *refreshToken; - -/** @property providerData - @brief Profile data for each identity provider, if any. - @remarks This data is cached on sign-in and updated when linking or unlinking. - */ -@property(nonatomic, readonly, nonnull) NSArray> *providerData; - -/** @fn init - @brief This class should not be instantiated. - @remarks To retrieve the current user, use @c FIRAuth.currentUser. To sign a user - in or out, use the methods on @c FIRAuth. - */ -- (instancetype)init NS_UNAVAILABLE; - -/** @fn updateEmail:completion: - @brief Updates the email address for the user. On success, the cached user profile data is - updated. - @remarks May fail if there is already an account with this email address that was created using - email and password authentication. - - @param email The email address for the user. - @param completion Optionally; the block invoked when the user profile change has finished. - Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeInvalidRecipientEmail - Indicates an invalid recipient email was - sent in the request. -
  • -
  • @c FIRAuthErrorCodeInvalidSender - Indicates an invalid sender email is set in - the console for this action. -
  • -
  • @c FIRAuthErrorCodeInvalidMessagePayload - Indicates an invalid email template for - sending update email. -
  • -
  • @c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email is already in use by another - account. -
  • -
  • @c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed. -
  • -
  • @c FIRAuthErrorCodeRequiresRecentLogin - Updating a user’s email is a security - sensitive operation that requires a recent login from the user. This error indicates - the user has not signed in recently enough. To resolve, reauthenticate the user by - invoking reauthenticateWithCredential:completion: on FIRUser. -
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods. - */ -- (void)updateEmail:(NSString *)email completion:(nullable FIRUserProfileChangeCallback)completion; - -/** @fn updatePassword:completion: - @brief Updates the password for the user. On success, the cached user profile data is updated. - - @param password The new password for the user. - @param completion Optionally; the block invoked when the user profile change has finished. - Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeOperationNotAllowed - Indicates the administrator disabled - sign in with the specified identity provider. -
  • -
  • @c FIRAuthErrorCodeRequiresRecentLogin - Updating a user’s password is a security - sensitive operation that requires a recent login from the user. This error indicates - the user has not signed in recently enough. To resolve, reauthenticate the user by - invoking reauthenticateWithCredential:completion: on FIRUser. -
  • -
  • @c FIRAuthErrorCodeWeakPassword - Indicates an attempt to set a password that is - considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo - dictionary object will contain more detailed explanation that can be shown to the user. -
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods. - */ -- (void)updatePassword:(NSString *)password - completion:(nullable FIRUserProfileChangeCallback)completion; - -/** @fn profileChangeRequest - @brief Creates an object which may be used to change the user's profile data. - - @remarks Set the properties of the returned object, then call - @c FIRUserProfileChangeRequest.commitChangesWithCallback: to perform the updates atomically. - - @return An object which may be used to change the user's profile data atomically. - */ -- (FIRUserProfileChangeRequest *)profileChangeRequest; - -/** @fn reloadWithCompletion: - @brief Reloads the user's profile data from the server. - - @param completion Optionally; the block invoked when the reload has finished. Invoked - asynchronously on the main thread in the future. - - @remarks May fail with a @c FIRAuthErrorCodeRequiresRecentLogin error code. In this case - you should call @c FIRUser.reauthenticateWithCredential:completion: before re-invoking - @c FIRUser.updateEmail:completion:. - - @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ -- (void)reloadWithCompletion:(nullable FIRUserProfileChangeCallback)completion; - -/** @fn reauthenticateWithCredential:completion: - @brief Renews the user's authentication tokens by validating a fresh set of credentials supplied - by the user. - - @param credential A user-supplied credential, which will be validated by the server. This can be - a successful third-party identity provider sign-in, or an email address and password. - @param completion Optionally; the block invoked when the re-authentication operation has - finished. Invoked asynchronously on the main thread in the future. - - @remarks If the user associated with the supplied credential is different from the current user, - or if the validation of the supplied credentials fails; an error is returned and the current - user remains signed in. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeInvalidCredential - Indicates the supplied credential is invalid. - This could happen if it has expired or it is malformed. -
  • -
  • @c FIRAuthErrorCodeOperationNotAllowed - Indicates that accounts with the - identity provider represented by the credential are not enabled. Enable them in the - Auth section of the Firebase console. -
  • -
  • @c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email asserted by the credential - (e.g. the email in a Facebook access token) is already in use by an existing account, - that cannot be authenticated with this method. Call fetchProvidersForEmail for - this user’s email and then prompt them to sign in with any of the sign-in providers - returned. This error will only be thrown if the "One account per email address" - setting is enabled in the Firebase console, under Auth settings. Please note that the - error code raised in this specific situation may not be the same on Web and Android. -
  • -
  • @c FIRAuthErrorCodeUserDisabled - Indicates the user's account is disabled. -
  • -
  • @c FIRAuthErrorCodeWrongPassword - Indicates the user attempted reauthentication with - an incorrect password, if credential is of the type EmailPasswordAuthCredential. -
  • -
  • @c FIRAuthErrorCodeUserMismatch - Indicates that an attempt was made to - reauthenticate with a user which is not the current user. -
  • -
  • @c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
  • -
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ -- (void)reauthenticateWithCredential:(FIRAuthCredential *)credential - completion:(nullable FIRUserProfileChangeCallback)completion; - -/** @fn getTokenWithCompletion: - @brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired. - - @param completion Optionally; the block invoked when the token is available. Invoked - asynchronously on the main thread in the future. - - @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ -- (void)getTokenWithCompletion:(nullable FIRAuthTokenCallback)completion; - -/** @fn getTokenForcingRefresh:completion: - @brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired. - - @param forceRefresh Forces a token refresh. Useful if the token becomes invalid for some reason - other than an expiration. - @param completion Optionally; the block invoked when the token is available. Invoked - asynchronously on the main thread in the future. - - @remarks The authentication token will be refreshed (by making a network request) if it has - expired, or if @c forceRefresh is YES. - - @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ -- (void)getTokenForcingRefresh:(BOOL)forceRefresh - completion:(nullable FIRAuthTokenCallback)completion; - -/** @fn linkWithCredential:completion: - @brief Associates a user account from a third-party identity provider with this user. - - @param credential The credential for the identity provider. - @param completion Optionally; the block invoked when the unlinking is complete, or fails. - Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeProviderAlreadyLinked - Indicates an attempt to link a provider of a - type already linked to this account. -
  • -
  • @c FIRAuthErrorCodeCredentialAlreadyInUse - Indicates an attempt to link with a - credential - that has already been linked with a different Firebase account. -
  • -
  • @c FIRAuthErrorCodeOperationNotAllowed - Indicates that accounts with the identity - provider represented by the credential are not enabled. Enable them in the Auth section - of the Firebase console. -
  • -
- - @remarks This method may also return error codes associated with updateEmail:completion: and - updatePassword:completion: on FIRUser. - - @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods. - */ -- (void)linkWithCredential:(FIRAuthCredential *)credential - completion:(nullable FIRAuthResultCallback)completion; - -/** @fn unlinkFromProvider:completion: - @brief Disassociates a user account from a third-party identity provider with this user. - - @param provider The provider ID of the provider to unlink. - @param completion Optionally; the block invoked when the unlinking is complete, or fails. - Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeNoSuchProvider - Indicates an attempt to unlink a provider - that is not linked to the account. -
  • -
  • @c FIRAuthErrorCodeRequiresRecentLogin - Updating email is a security sensitive - operation that requires a recent login from the user. This error indicates the user - has not signed in recently enough. To resolve, reauthenticate the user by invoking - reauthenticateWithCredential:completion: on FIRUser. -
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods. - */ -- (void)unlinkFromProvider:(NSString *)provider - completion:(nullable FIRAuthResultCallback)completion; - -/** @fn sendEmailVerificationWithCompletion: - @brief Initiates email verification for the user. - - @param completion Optionally; the block invoked when the request to send an email verification - is complete, or fails. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeInvalidRecipientEmail - Indicates an invalid recipient email was - sent in the request. -
  • -
  • @c FIRAuthErrorCodeInvalidSender - Indicates an invalid sender email is set in - the console for this action. -
  • -
  • @c FIRAuthErrorCodeInvalidMessagePayload - Indicates an invalid email template for - sending update email. -
  • -
  • @c FIRAuthErrorCodeUserNotFound - Indicates the user account was not found.
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods. - */ -- (void)sendEmailVerificationWithCompletion:(nullable FIRSendEmailVerificationCallback)completion; - -/** @fn deleteWithCompletion: - @brief Deletes the user account (also signs out the user, if this was the current user). - - @param completion Optionally; the block invoked when the request to delete the account is - complete, or fails. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: -
    -
  • @c FIRAuthErrorCodeRequiresRecentLogin - Updating email is a security sensitive - operation that requires a recent login from the user. This error indicates the user - has not signed in recently enough. To resolve, reauthenticate the user by invoking - reauthenticateWithCredential:completion: on FIRUser. -
  • -
- - @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods. - - */ -- (void)deleteWithCompletion:(nullable FIRUserProfileChangeCallback)completion; - -@end - -/** @class FIRUserProfileChangeRequest - @brief Represents an object capable of updating a user's profile data. - @remarks Properties are marked as being part of a profile update when they are set. Setting a - property value to nil is not the same as leaving the property unassigned. - */ -@interface FIRUserProfileChangeRequest : NSObject - -/** @fn init - @brief Please use @c FIRUser.profileChangeRequest - */ -- (instancetype)init NS_UNAVAILABLE; - -/** @property displayName - @brief The user's display name. - @remarks It is an error to set this property after calling - @c FIRUserProfileChangeRequest.commitChangesWithCallback: - */ -@property(nonatomic, copy, nullable) NSString *displayName; - -/** @property photoURL - @brief The user's photo URL. - @remarks It is an error to set this property after calling - @c FIRUserProfileChangeRequest.commitChangesWithCallback: - */ -@property(nonatomic, copy, nullable) NSURL *photoURL; - -/** @fn commitChangesWithCompletion: - @brief Commits any pending changes. - @remarks This method should only be called once. Once called, property values should not be - changed. - - @param completion Optionally; the block invoked when the user profile change has been applied. - Invoked asynchronously on the main thread in the future. - */ -- (void)commitChangesWithCompletion:(nullable FIRUserProfileChangeCallback)completion; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUserInfo.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUserInfo.h deleted file mode 100755 index 3dfac18..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUserInfo.h +++ /dev/null @@ -1,44 +0,0 @@ -/** @file FIRUserInfo.h - @brief Firebase Auth SDK - @copyright Copyright 2015 Google Inc. - @remarks Use of this SDK is subject to the Google APIs Terms of Service: - https://developers.google.com/terms/ - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Represents user data returned from an identity provider. - */ -@protocol FIRUserInfo - -/** @property providerID - @brief The provider identifier. - */ -@property(nonatomic, copy, readonly) NSString *providerID; - -/** @property uid - @brief The provider's user ID for the user. - */ -@property(nonatomic, copy, readonly) NSString *uid; - -/** @property displayName - @brief The name of the user. - */ -@property(nonatomic, copy, readonly, nullable) NSString *displayName; - -/** @property photoURL - @brief The URL of the user's profile photo. - */ -@property(nonatomic, copy, readonly, nullable) NSURL *photoURL; - -/** @property email - @brief The user's email address. - */ -@property(nonatomic, copy, readonly, nullable) NSString *email; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuth.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuth.h deleted file mode 100755 index 2e0a35c..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuth.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "FIREmailPasswordAuthProvider.h" -#import "FIRFacebookAuthProvider.h" -#import "FIRGitHubAuthProvider.h" -#import "FIRGoogleAuthProvider.h" -#import "FIRTwitterAuthProvider.h" -#import "FIRAuth.h" -#import "FIRAuthCredential.h" -#import "FIRAuthErrors.h" -#import "FIRUser.h" -#import "FIRUserInfo.h" -#import "FirebaseAuthVersion.h" diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h deleted file mode 100755 index 3f29d7b..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h +++ /dev/null @@ -1,18 +0,0 @@ -/*! @file FirebaseAuthVersion.h - @brief Firebase SDK - @copyright Copyright 2016 Google Inc. - @remarks Use of this SDK is subject to the Google APIs Terms of Service: - https://developers.google.com/terms/ - */ - -#import - -/** - Version number for FirebaseAuth. - */ -extern const double FirebaseAuthVersionNumber; - -/** - Version string for FirebaseAuth. - */ -extern const unsigned char *const FirebaseAuthVersionString; diff --git a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Modules/module.modulemap b/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Modules/module.modulemap deleted file mode 100755 index c58f30e..0000000 --- a/Old My Mind/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Modules/module.modulemap +++ /dev/null @@ -1,10 +0,0 @@ -framework module FirebaseAuth { - umbrella header "FirebaseAuth.h" - export * - module * { export *} - link "z" - link framework "CoreGraphics" - link framework "Foundation" - link framework "Security" - link framework "UIKit" -} \ No newline at end of file diff --git a/Old My Mind/Pods/FirebaseAuth/README.md b/Old My Mind/Pods/FirebaseAuth/README.md deleted file mode 100755 index e766949..0000000 --- a/Old My Mind/Pods/FirebaseAuth/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Firebase Auth for iOS - -Firebase Auth enables apps to easily support multiple authentication options -for their end users. - -Please visit [our developer site](https://developers.google.com/) for -integration instructions, documentation, support information, and terms of -service. diff --git a/Old My Mind/Pods/FirebaseInstanceID/CHANGELOG.md b/Old My Mind/Pods/FirebaseInstanceID/CHANGELOG.md deleted file mode 100755 index efedc33..0000000 --- a/Old My Mind/Pods/FirebaseInstanceID/CHANGELOG.md +++ /dev/null @@ -1,33 +0,0 @@ -# 2017-01-31 -- v1.0.9 - -- Removed an error being mistakenly logged to the console. - -# 2016-07-06 -- v1.0.8 - -- Don't store InstanceID plists in Documents folder. - -# 2016-06-19 -- v1.0.7 - -- Fix remote-notifications warning on app submission. - -# 2016-05-16 -- v1.0.6 - -- Fix CocoaPod linter issues for InstanceID pod. - -# 2016-05-13 -- v1.0.5 - -- Fix Authorization errors for InstanceID tokens. - -# 2016-05-11 -- v1.0.4 - -- Reduce wait for InstanceID token during parallel requests. - -# 2016-04-18 -- v1.0.3 - -- Change flag to disable swizzling to *FirebaseAppDelegateProxyEnabled*. -- Fix incessant Keychain errors while accessing InstanceID. -- Fix max retries for fetching IID token. - -# 2016-04-18 -- v1.0.2 - -- Register for remote notifications on iOS8+ in the SDK itself. diff --git a/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/FirebaseInstanceID b/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/FirebaseInstanceID deleted file mode 100755 index 2ebc6e6..0000000 Binary files a/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/FirebaseInstanceID and /dev/null differ diff --git a/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h b/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h deleted file mode 100755 index 5ff8372..0000000 --- a/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h +++ /dev/null @@ -1,245 +0,0 @@ -#import - -/** - * @memberof FIRInstanceID - * - * The scope to be used when fetching/deleting a token for Firebase Messaging. - */ -FOUNDATION_EXPORT NSString * __nonnull const kFIRInstanceIDScopeFirebaseMessaging; - -/** - * Called when the system determines that tokens need to be refreshed. - * This method is also called if Instance ID has been reset in which - * case, tokens and FCM topic subscriptions also need to be refreshed. - * - * Instance ID service will throttle the refresh event across all devices - * to control the rate of token updates on application servers. - */ -FOUNDATION_EXPORT NSString * __nonnull const kFIRInstanceIDTokenRefreshNotification; - -/** - * @related FIRInstanceID - * - * The completion handler invoked when the InstanceID token returns. If - * the call fails we return the appropriate `error code` as described below. - * - * @param token The valid token as returned by InstanceID backend. - * - * @param error The error describing why generating a new token - * failed. See the error codes below for a more detailed - * description. - */ -typedef void(^FIRInstanceIDTokenHandler)( NSString * __nullable token, NSError * __nullable error); - - -/** - * @related FIRInstanceID - * - * The completion handler invoked when the InstanceID `deleteToken` returns. If - * the call fails we return the appropriate `error code` as described below - * - * @param error The error describing why deleting the token failed. - * See the error codes below for a more detailed description. - */ -typedef void(^FIRInstanceIDDeleteTokenHandler)(NSError * __nullable error); - -/** - * @related FIRInstanceID - * - * The completion handler invoked when the app identity is created. If the - * identity wasn't created for some reason we return the appropriate error code. - * - * @param identity A valid identity for the app instance, nil if there was an error - * while creating an identity. - * @param error The error if fetching the identity fails else nil. - */ -typedef void(^FIRInstanceIDHandler)(NSString * __nullable identity, NSError * __nullable error); - -/** - * @related FIRInstanceID - * - * The completion handler invoked when the app identity and all the tokens associated - * with it are deleted. Returns a valid error object in case of failure else nil. - * - * @param error The error if deleting the identity and all the tokens associated with - * it fails else nil. - */ -typedef void(^FIRInstanceIDDeleteHandler)(NSError * __nullable error); - -/** - * @enum FIRInstanceIDError - */ -typedef NS_ENUM(NSUInteger, FIRInstanceIDError) { - // Http related errors. - - /// Unknown error. - FIRInstanceIDErrorUnknown = 0, - - /// Auth Error -- GCM couldn't validate request from this client. - FIRInstanceIDErrorAuthentication = 1, - - /// NoAccess -- InstanceID service cannot be accessed. - FIRInstanceIDErrorNoAccess = 2, - - /// Timeout -- Request to InstanceID backend timed out. - FIRInstanceIDErrorTimeout = 3, - - /// Network -- No network available to reach the servers. - FIRInstanceIDErrorNetwork = 4, - - /// OperationInProgress -- Another similar operation in progress, - /// bailing this one. - FIRInstanceIDErrorOperationInProgress = 5, - - /// InvalidRequest -- Some parameters of the request were invalid. - FIRInstanceIDErrorInvalidRequest = 7, -}; - -/** - * The APNS token type for the app. If the token type is set to `UNKNOWN` - * InstanceID will implicitly try to figure out what the actual token type - * is from the provisioning profile. - */ -typedef NS_ENUM(NSInteger, FIRInstanceIDAPNSTokenType) { - /// Unknown token type. - FIRInstanceIDAPNSTokenTypeUnknown, - /// Sandbox token type. - FIRInstanceIDAPNSTokenTypeSandbox, - /// Production token type. - FIRInstanceIDAPNSTokenTypeProd, -}; - -/** - * Instance ID provides a unique identifier for each app instance and a mechanism - * to authenticate and authorize actions (for example, sending a GCM message). - * - * Instance ID is long lived but, may be reset if the device is not used for - * a long time or the Instance ID service detects a problem. - * If Instance ID is reset, the app will be notified via - * `kFIRInstanceIDTokenRefreshNotification`. - * - * If the Instance ID has become invalid, the app can request a new one and - * send it to the app server. - * To prove ownership of Instance ID and to allow servers to access data or - * services associated with the app, call - * `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`. - */ -@interface FIRInstanceID : NSObject - -/** - * FIRInstanceID. - * - * @return A shared instance of FIRInstanceID. - */ -+ (nonnull instancetype)instanceID NS_SWIFT_NAME(instanceID()); - -/** - * Unavailable. Use +instanceID instead. - */ -- (nonnull instancetype)init __attribute__((unavailable("Use +instanceID instead."))); - -/** - * Set APNS token for the application. This APNS token will be used to register - * with Firebase Messaging using `token` or - * `tokenWithAuthorizedEntity:scope:options:handler`. If the token type is set to - * `FIRInstanceIDAPNSTokenTypeUnknown` InstanceID will read the provisioning profile - * to find out the token type. - * - * @param token The APNS token for the application. - * @param type The APNS token type for the above token. - */ -- (void)setAPNSToken:(nonnull NSData *)token - type:(FIRInstanceIDAPNSTokenType)type; - -#pragma mark - Tokens - -/** - * Returns a Firebase Messaging scoped token for the firebase app. - * - * @return Null Returns null if the device has not yet been registerd with - * Firebase Message else returns a valid token. - */ -- (nullable NSString *)token; - -/** - * Returns a token that authorizes an Entity (example: cloud service) to perform - * an action on behalf of the application identified by Instance ID. - * - * This is similar to an OAuth2 token except, it applies to the - * application instance instead of a user. - * - * This is an asynchronous call. If the token fetching fails for some reason - * we invoke the completion callback with nil `token` and the appropriate - * error. - * - * Note, you can only have one `token` or `deleteToken` call for a given - * authorizedEntity and scope at any point of time. Making another such call with the - * same authorizedEntity and scope before the last one finishes will result in an - * error with code `OperationInProgress`. - * - * @see FIRInstanceID deleteTokenWithAuthorizedEntity:scope:handler: - * - * @param authorizedEntity Entity authorized by the token. - * @param scope Action authorized for authorizedEntity. - * @param options The extra options to be sent with your token request. The - * value for the `apns_token` should be the NSData object - * passed to UIApplication's - * `didRegisterForRemoteNotificationsWithDeviceToken` method. - * All other keys and values in the options dict need to be - * instances of NSString or else they will be discarded. Bundle - * keys starting with 'GCM.' and 'GOOGLE.' are reserved. - * @param handler The callback handler which is invoked when the token is - * successfully fetched. In case of success a valid `token` and - * `nil` error are returned. In case of any error the `token` - * is nil and a valid `error` is returned. The valid error - * codes have been documented above. - */ -- (void)tokenWithAuthorizedEntity:(nonnull NSString *)authorizedEntity - scope:(nonnull NSString *)scope - options:(nullable NSDictionary *)options - handler:(nonnull FIRInstanceIDTokenHandler)handler; - -/** - * Revokes access to a scope (action) for an entity previously - * authorized by `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`. - * - * This is an asynchronous call. Call this on the main thread since InstanceID lib - * is not thread safe. In case token deletion fails for some reason we invoke the - * `handler` callback passed in with the appropriate error code. - * - * Note, you can only have one `token` or `deleteToken` call for a given - * authorizedEntity and scope at a point of time. Making another such call with the - * same authorizedEntity and scope before the last one finishes will result in an error - * with code `OperationInProgress`. - * - * @param authorizedEntity Entity that must no longer have access. - * @param scope Action that entity is no longer authorized to perform. - * @param handler The handler that is invoked once the unsubscribe call ends. - * In case of error an appropriate error object is returned - * else error is nil. - */ -- (void)deleteTokenWithAuthorizedEntity:(nonnull NSString *)authorizedEntity - scope:(nonnull NSString *)scope - handler:(nonnull FIRInstanceIDDeleteTokenHandler)handler; - -#pragma mark - Identity - -/** - * Asynchronously fetch a stable identifier that uniquely identifies the app - * instance. If the identifier has been revoked or has expired, this method will - * return a new identifier. - * - * - * @param handler The handler to invoke once the identifier has been fetched. - * In case of error an appropriate error object is returned else - * a valid identifier is returned and a valid identifier for the - * application instance. - */ -- (void)getIDWithHandler:(nonnull FIRInstanceIDHandler)handler; - -/** - * Resets Instance ID and revokes all tokens. - */ -- (void)deleteIDWithHandler:(nonnull FIRInstanceIDDeleteHandler)handler; - -@end diff --git a/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h b/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h deleted file mode 100755 index 053ec2b..0000000 --- a/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h +++ /dev/null @@ -1 +0,0 @@ -#import "FIRInstanceID.h" diff --git a/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap b/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap deleted file mode 100755 index 267c035..0000000 --- a/Old My Mind/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap +++ /dev/null @@ -1,7 +0,0 @@ -framework module FirebaseInstanceID { - umbrella header "FirebaseInstanceID.h" - export * - module * { export *} - link framework "Foundation" - link framework "UIKit" -} \ No newline at end of file diff --git a/Old My Mind/Pods/FirebaseInstanceID/README.md b/Old My Mind/Pods/FirebaseInstanceID/README.md deleted file mode 100755 index 25fe219..0000000 --- a/Old My Mind/Pods/FirebaseInstanceID/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# InstanceID SDK for iOS - -Instance ID provides a unique ID per instance of your apps and also provides a -mechanism to authenticate and authorize actions, like sending messages via -Firebase Cloud Messaging (FCM). - - -Please visit [our developer -site](https://developers.google.com/instance-id/) for integration instructions, -documentation, support information, and terms of service. diff --git a/Old My Mind/Pods/GTMSessionFetcher/LICENSE b/Old My Mind/Pods/GTMSessionFetcher/LICENSE deleted file mode 100755 index d645695..0000000 --- a/Old My Mind/Pods/GTMSessionFetcher/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Old My Mind/Pods/GTMSessionFetcher/README.md b/Old My Mind/Pods/GTMSessionFetcher/README.md deleted file mode 100755 index 478efde..0000000 --- a/Old My Mind/Pods/GTMSessionFetcher/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Google Toolbox for Mac - Session Fetcher # - -**Project site**
-**Discussion group** - -[![Build Status](https://travis-ci.org/google/gtm-session-fetcher.svg?branch=master)](https://travis-ci.org/google/gtm-session-fetcher) - -`GTMSessionFetcher` makes it easy for Cocoa applications to perform http -operations. The fetcher is implemented as a wrapper on `NSURLSession`, so its -behavior is asynchronous and uses operating-system settings on iOS and Mac OS X. - -Features include: -- Simple to build; only one source/header file pair is required -- Simple to use: takes just two lines of code to fetch a request -- Supports upload and download sessions -- Flexible cookie storage -- Automatic retry on errors, with exponential backoff -- Support for generating multipart MIME upload streams -- Easy, convenient logging of http requests and responses -- Supports plug-in authentication such as with GTMAppAuth -- Easily testable; self-mocking -- Automatic rate limiting when created by the `GTMSessionFetcherService` factory class -- Fully independent of other projects diff --git a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.h b/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.h deleted file mode 100755 index a649cf0..0000000 --- a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.h +++ /dev/null @@ -1,1308 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// GTMSessionFetcher is a wrapper around NSURLSession for http operations. -// -// What does this offer on top of of NSURLSession? -// -// - Block-style callbacks for useful functionality like progress rather -// than delegate methods. -// - Out-of-process uploads and downloads using NSURLSession, including -// management of fetches after relaunch. -// - Integration with GTMAppAuth for invisible management and refresh of -// authorization tokens. -// - Pretty-printed http logging. -// - Cookies handling that does not interfere with or get interfered with -// by WebKit cookies or on Mac by Safari and other apps. -// - Credentials handling for the http operation. -// - Rate-limiting and cookie grouping when fetchers are created with -// GTMSessionFetcherService. -// -// If the bodyData or bodyFileURL property is set, then a POST request is assumed. -// -// Each fetcher is assumed to be for a one-shot fetch request; don't reuse the object -// for a second fetch. -// -// The fetcher will be self-retained as long as a connection is pending. -// -// To keep user activity private, URLs must have an https scheme (unless the property -// allowedInsecureSchemes is set to permit the scheme.) -// -// Callbacks will be released when the fetch completes or is stopped, so there is no need -// to use weak self references in the callback blocks. -// -// Sample usage: -// -// _fetcherService = [[GTMSessionFetcherService alloc] init]; -// -// GTMSessionFetcher *myFetcher = [_fetcherService fetcherWithURLString:myURLString]; -// myFetcher.retryEnabled = YES; -// myFetcher.comment = @"First profile image"; -// -// // Optionally specify a file URL or NSData for the request body to upload. -// myFetcher.bodyData = [postString dataUsingEncoding:NSUTF8StringEncoding]; -// -// [myFetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { -// if (error != nil) { -// // Server status code or network error. -// // -// // If the domain is kGTMSessionFetcherStatusDomain then the error code -// // is a failure status from the server. -// } else { -// // Fetch succeeded. -// } -// }]; -// -// There is also a beginFetch call that takes a pointer and selector for the completion handler; -// a pointer and selector is a better style when the callback is a substantial, separate method. -// -// NOTE: Fetches may retrieve data from the server even though the server -// returned an error, so the criteria for success is a non-nil error. -// The completion handler is called when the server status is >= 300 with an NSError -// having domain kGTMSessionFetcherStatusDomain and code set to the server status. -// -// Status codes are at -// -// -// Background session support: -// -// Out-of-process uploads and downloads may be created by setting the fetcher's -// useBackgroundSession property. Data to be uploaded should be provided via -// the uploadFileURL property; the download destination should be specified with -// the destinationFileURL. NOTE: Background upload files should be in a location -// that will be valid even after the device is restarted, so the file should not -// be uploaded from a system temporary or cache directory. -// -// Background session transfers are slower, and should typically be used only -// for very large downloads or uploads (hundreds of megabytes). -// -// When background sessions are used in iOS apps, the application delegate must -// pass through the parameters from UIApplicationDelegate's -// application:handleEventsForBackgroundURLSession:completionHandler: to the -// fetcher class. -// -// When the application has been relaunched, it may also create a new fetcher -// instance to handle completion of the transfers. -// -// - (void)application:(UIApplication *)application -// handleEventsForBackgroundURLSession:(NSString *)identifier -// completionHandler:(void (^)())completionHandler { -// // Application was re-launched on completing an out-of-process download. -// -// // Pass the URLSession info related to this re-launch to the fetcher class. -// [GTMSessionFetcher application:application -// handleEventsForBackgroundURLSession:identifier -// completionHandler:completionHandler]; -// -// // Get a fetcher related to this re-launch and re-hook up a completionHandler to it. -// GTMSessionFetcher *fetcher = [GTMSessionFetcher fetcherWithSessionIdentifier:identifier]; -// NSURL *destinationFileURL = fetcher.destinationFileURL; -// fetcher.completionHandler = ^(NSData *data, NSError *error) { -// [self downloadCompletedToFile:destinationFileURL error:error]; -// }; -// } -// -// -// Threading and queue support: -// -// Networking always happens on a background thread; there is no advantage to -// changing thread or queue to create or start a fetcher. -// -// Callbacks are run on the main thread; alternatively, the app may set the -// fetcher's callbackQueue to a dispatch queue. -// -// Once the fetcher's beginFetch method has been called, the fetcher's methods and -// properties may be accessed from any thread. -// -// Downloading to disk: -// -// To have downloaded data saved directly to disk, specify a file URL for the -// destinationFileURL property. -// -// HTTP methods and headers: -// -// Alternative HTTP methods, like PUT, and custom headers can be specified by -// creating the fetcher with an appropriate NSMutableURLRequest. -// -// -// Caching: -// -// The fetcher avoids caching. That is best for API requests, but may hurt -// repeat fetches of static data. Apps may enable a persistent disk cache by -// customizing the config: -// -// fetcher.configurationBlock = ^(GTMSessionFetcher *configFetcher, -// NSURLSessionConfiguration *config) { -// config.URLCache = [NSURLCache sharedURLCache]; -// }; -// -// Or use the standard system config to share cookie storage with web views -// and to enable disk caching: -// -// fetcher.configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; -// -// -// Cookies: -// -// There are three supported mechanisms for remembering cookies between fetches. -// -// By default, a standalone GTMSessionFetcher uses a mutable array held -// statically to track cookies for all instantiated fetchers. This avoids -// cookies being set by servers for the application from interfering with -// Safari and WebKit cookie settings, and vice versa. -// The fetcher cookies are lost when the application quits. -// -// To rely instead on WebKit's global NSHTTPCookieStorage, set the fetcher's -// cookieStorage property: -// myFetcher.cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; -// -// To share cookies with other apps, use the method introduced in iOS 9/OS X 10.11: -// myFetcher.cookieStorage = -// [NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier:kMyCompanyContainedID]; -// -// To ignore existing cookies and only have cookies related to the single fetch -// be applied, make a temporary cookie storage object: -// myFetcher.cookieStorage = [[GTMSessionCookieStorage alloc] init]; -// -// Note: cookies set while following redirects will be sent to the server, as -// the redirects are followed by the fetcher. -// -// To completely disable cookies, similar to setting cookieStorageMethod to -// kGTMHTTPFetcherCookieStorageMethodNone, adjust the session configuration -// appropriately in the fetcher or fetcher service: -// fetcher.configurationBlock = ^(GTMSessionFetcher *configFetcher, -// NSURLSessionConfiguration *config) { -// config.HTTPCookieAcceptPolicy = NSHTTPCookieAcceptPolicyNever; -// config.HTTPShouldSetCookies = NO; -// }; -// -// If the fetcher is created from a GTMSessionFetcherService object -// then the cookie storage mechanism is set to use the cookie storage in the -// service object rather than the static storage. Disabling cookies in the -// session configuration set on a service object will disable cookies for all -// fetchers created from that GTMSessionFetcherService object, since the session -// configuration is propagated to the fetcher. -// -// -// Monitoring data transfers. -// -// The fetcher supports a variety of properties for progress monitoring -// progress with callback blocks. -// GTMSessionFetcherSendProgressBlock sendProgressBlock -// GTMSessionFetcherReceivedProgressBlock receivedProgressBlock -// GTMSessionFetcherDownloadProgressBlock downloadProgressBlock -// -// If supplied by the server, the anticipated total download size is available -// as [[myFetcher response] expectedContentLength] (and may be -1 for unknown -// download sizes.) -// -// -// Automatic retrying of fetches -// -// The fetcher can optionally create a timer and reattempt certain kinds of -// fetch failures (status codes 408, request timeout; 502, gateway failure; -// 503, service unavailable; 504, gateway timeout; networking errors -// NSURLErrorTimedOut and NSURLErrorNetworkConnectionLost.) The user may -// set a retry selector to customize the type of errors which will be retried. -// -// Retries are done in an exponential-backoff fashion (that is, after 1 second, -// 2, 4, 8, and so on.) -// -// Enabling automatic retries looks like this: -// myFetcher.retryEnabled = YES; -// -// With retries enabled, the completion callbacks are called only -// when no more retries will be attempted. Calling the fetcher's stopFetching -// method will terminate the retry timer, without the finished or failure -// selectors being invoked. -// -// Optionally, the client may set the maximum retry interval: -// myFetcher.maxRetryInterval = 60.0; // in seconds; default is 60 seconds -// // for downloads, 600 for uploads -// -// Servers should never send a 400 or 500 status for errors that are retryable -// by clients, as those values indicate permanent failures. In nearly all -// cases, the default standard retry behavior is correct for clients, and no -// custom client retry behavior is needed or appropriate. Servers that send -// non-retryable status codes and expect the client to retry the request are -// faulty. -// -// Still, the client may provide a block to determine if a status code or other -// error should be retried. The block returns YES to set the retry timer or NO -// to fail without additional fetch attempts. -// -// The retry method may return the |suggestedWillRetry| argument to get the -// default retry behavior. Server status codes are present in the -// error argument, and have the domain kGTMSessionFetcherStatusDomain. The -// user's method may look something like this: -// -// myFetcher.retryBlock = ^(BOOL suggestedWillRetry, NSError *error, -// GTMSessionFetcherRetryResponse response) { -// // Perhaps examine error.domain and error.code, or fetcher.retryCount -// // -// // Respond with YES to start the retry timer, NO to proceed to the failure -// // callback, or suggestedWillRetry to get default behavior for the -// // current error domain and code values. -// response(suggestedWillRetry); -// }; - - -#import - -#if TARGET_OS_IPHONE -#import -#endif -#if TARGET_OS_WATCH -#import -#endif - -// By default it is stripped from non DEBUG builds. Developers can override -// this in their project settings. -#ifndef STRIP_GTM_FETCH_LOGGING - #if !DEBUG - #define STRIP_GTM_FETCH_LOGGING 1 - #else - #define STRIP_GTM_FETCH_LOGGING 0 - #endif -#endif - -// Logs in debug builds. -#ifndef GTMSESSION_LOG_DEBUG - #if DEBUG - #define GTMSESSION_LOG_DEBUG(...) NSLog(__VA_ARGS__) - #else - #define GTMSESSION_LOG_DEBUG(...) do { } while (0) - #endif -#endif - -// Asserts in debug builds (or logs in debug builds if GTMSESSION_ASSERT_AS_LOG -// or NS_BLOCK_ASSERTIONS are defined.) -#ifndef GTMSESSION_ASSERT_DEBUG - #if DEBUG && !defined(NS_BLOCK_ASSERTIONS) && !GTMSESSION_ASSERT_AS_LOG - #undef GTMSESSION_ASSERT_AS_LOG - #define GTMSESSION_ASSERT_AS_LOG 1 - #endif - - #if DEBUG && !GTMSESSION_ASSERT_AS_LOG - #define GTMSESSION_ASSERT_DEBUG(...) NSAssert(__VA_ARGS__) - #elif DEBUG - #define GTMSESSION_ASSERT_DEBUG(pred, ...) if (!(pred)) { NSLog(__VA_ARGS__); } - #else - #define GTMSESSION_ASSERT_DEBUG(pred, ...) do { } while (0) - #endif -#endif - -// Asserts in debug builds, logs in release builds (or logs in debug builds if -// GTMSESSION_ASSERT_AS_LOG is defined.) -#ifndef GTMSESSION_ASSERT_DEBUG_OR_LOG - #if DEBUG && !GTMSESSION_ASSERT_AS_LOG - #define GTMSESSION_ASSERT_DEBUG_OR_LOG(...) NSAssert(__VA_ARGS__) - #else - #define GTMSESSION_ASSERT_DEBUG_OR_LOG(pred, ...) if (!(pred)) { NSLog(__VA_ARGS__); } - #endif -#endif - -// Macro useful for examining messages from NSURLSession during debugging. -#if 0 -#define GTM_LOG_SESSION_DELEGATE(...) GTMSESSION_LOG_DEBUG(__VA_ARGS__) -#else -#define GTM_LOG_SESSION_DELEGATE(...) -#endif - -#ifndef GTM_NULLABLE - #if __has_feature(nullability) // Available starting in Xcode 6.3 - #define GTM_NULLABLE_TYPE __nullable - #define GTM_NONNULL_TYPE __nonnull - #define GTM_NULLABLE nullable - #define GTM_NONNULL_DECL nonnull // GTM_NONNULL is used by GTMDefines.h - #define GTM_NULL_RESETTABLE null_resettable - - #define GTM_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN - #define GTM_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END - #else - #define GTM_NULLABLE_TYPE - #define GTM_NONNULL_TYPE - #define GTM_NULLABLE - #define GTM_NONNULL_DECL - #define GTM_NULL_RESETTABLE - #define GTM_ASSUME_NONNULL_BEGIN - #define GTM_ASSUME_NONNULL_END - #endif // __has_feature(nullability) -#endif // GTM_NULLABLE - -#if (TARGET_OS_TV \ - || TARGET_OS_WATCH \ - || (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12) \ - || (TARGET_OS_IPHONE && defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0)) -#define GTMSESSION_DEPRECATE_ON_2016_SDKS(_MSG) __attribute__((deprecated("" _MSG))) -#else -#define GTMSESSION_DEPRECATE_ON_2016_SDKS(_MSG) -#endif - -#ifndef GTM_DECLARE_GENERICS - #if __has_feature(objc_generics) - #define GTM_DECLARE_GENERICS 1 - #else - #define GTM_DECLARE_GENERICS 0 - #endif -#endif - -#ifndef GTM_NSArrayOf - #if GTM_DECLARE_GENERICS - #define GTM_NSArrayOf(value) NSArray - #define GTM_NSDictionaryOf(key, value) NSDictionary - #else - #define GTM_NSArrayOf(value) NSArray - #define GTM_NSDictionaryOf(key, value) NSDictionary - #endif // __has_feature(objc_generics) -#endif // GTM_NSArrayOf - -// For iOS, the fetcher can declare itself a background task to allow fetches -// to finish when the app leaves the foreground. -// -// (This is unrelated to providing a background configuration, which allows -// out-of-process uploads and downloads.) -// -// To disallow use of background tasks during fetches, the target should define -// GTM_BACKGROUND_TASK_FETCHING to 0, or alternatively may set the -// skipBackgroundTask property to YES. -#if TARGET_OS_IPHONE && !TARGET_OS_WATCH && !defined(GTM_BACKGROUND_TASK_FETCHING) - #define GTM_BACKGROUND_TASK_FETCHING 1 -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#if (TARGET_OS_TV \ - || TARGET_OS_WATCH \ - || (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \ - || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0)) - #ifndef GTM_USE_SESSION_FETCHER - #define GTM_USE_SESSION_FETCHER 1 - #endif -#endif - -#if !defined(GTMBridgeFetcher) - // These bridge macros should be identical in GTMHTTPFetcher.h and GTMSessionFetcher.h - #if GTM_USE_SESSION_FETCHER - // Macros to new fetcher class. - #define GTMBridgeFetcher GTMSessionFetcher - #define GTMBridgeFetcherService GTMSessionFetcherService - #define GTMBridgeFetcherServiceProtocol GTMSessionFetcherServiceProtocol - #define GTMBridgeAssertValidSelector GTMSessionFetcherAssertValidSelector - #define GTMBridgeCookieStorage GTMSessionCookieStorage - #define GTMBridgeCleanedUserAgentString GTMFetcherCleanedUserAgentString - #define GTMBridgeSystemVersionString GTMFetcherSystemVersionString - #define GTMBridgeApplicationIdentifier GTMFetcherApplicationIdentifier - #define kGTMBridgeFetcherStatusDomain kGTMSessionFetcherStatusDomain - #define kGTMBridgeFetcherStatusBadRequest GTMSessionFetcherStatusBadRequest - #else - // Macros to old fetcher class. - #define GTMBridgeFetcher GTMHTTPFetcher - #define GTMBridgeFetcherService GTMHTTPFetcherService - #define GTMBridgeFetcherServiceProtocol GTMHTTPFetcherServiceProtocol - #define GTMBridgeAssertValidSelector GTMAssertSelectorNilOrImplementedWithArgs - #define GTMBridgeCookieStorage GTMCookieStorage - #define GTMBridgeCleanedUserAgentString GTMCleanedUserAgentString - #define GTMBridgeSystemVersionString GTMSystemVersionString - #define GTMBridgeApplicationIdentifier GTMApplicationIdentifier - #define kGTMBridgeFetcherStatusDomain kGTMHTTPFetcherStatusDomain - #define kGTMBridgeFetcherStatusBadRequest kGTMHTTPFetcherStatusBadRequest - #endif // GTM_USE_SESSION_FETCHER -#endif - -GTM_ASSUME_NONNULL_BEGIN - -// Notifications -// -// Fetch started and stopped, and fetch retry delay started and stopped. -extern NSString *const kGTMSessionFetcherStartedNotification; -extern NSString *const kGTMSessionFetcherStoppedNotification; -extern NSString *const kGTMSessionFetcherRetryDelayStartedNotification; -extern NSString *const kGTMSessionFetcherRetryDelayStoppedNotification; - -// Completion handler notification. This is intended for use by code capturing -// and replaying fetch requests and results for testing. For fetches where -// destinationFileURL or accumulateDataBlock is set for the fetcher, the data -// will be nil for successful fetches. -// -// This notification is posted on the main thread. -extern NSString *const kGTMSessionFetcherCompletionInvokedNotification; -extern NSString *const kGTMSessionFetcherCompletionDataKey; -extern NSString *const kGTMSessionFetcherCompletionErrorKey; - -// Constants for NSErrors created by the fetcher (excluding server status errors, -// and error objects originating in the OS.) -extern NSString *const kGTMSessionFetcherErrorDomain; - -// The fetcher turns server error status values (3XX, 4XX, 5XX) into NSErrors -// with domain kGTMSessionFetcherStatusDomain. -// -// Any server response body data accompanying the status error is added to the -// userInfo dictionary with key kGTMSessionFetcherStatusDataKey. -extern NSString *const kGTMSessionFetcherStatusDomain; -extern NSString *const kGTMSessionFetcherStatusDataKey; - -// When a fetch fails with an error, these keys are included in the error userInfo -// dictionary if retries were attempted. -extern NSString *const kGTMSessionFetcherNumberOfRetriesDoneKey; -extern NSString *const kGTMSessionFetcherElapsedIntervalWithRetriesKey; - -// Background session support requires access to NSUserDefaults. -// If [NSUserDefaults standardUserDefaults] doesn't yield the correct NSUserDefaults for your usage, -// ie for an App Extension, then implement this class/method to return the correct NSUserDefaults. -// https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW6 -@interface GTMSessionFetcherUserDefaultsFactory : NSObject - -+ (NSUserDefaults *)fetcherUserDefaults; - -@end - -#ifdef __cplusplus -} -#endif - -typedef NS_ENUM(NSInteger, GTMSessionFetcherError) { - GTMSessionFetcherErrorDownloadFailed = -1, - GTMSessionFetcherErrorUploadChunkUnavailable = -2, - GTMSessionFetcherErrorBackgroundExpiration = -3, - GTMSessionFetcherErrorBackgroundFetchFailed = -4, - GTMSessionFetcherErrorInsecureRequest = -5, - GTMSessionFetcherErrorTaskCreationFailed = -6, -}; - -typedef NS_ENUM(NSInteger, GTMSessionFetcherStatus) { - // Standard http status codes. - GTMSessionFetcherStatusNotModified = 304, - GTMSessionFetcherStatusBadRequest = 400, - GTMSessionFetcherStatusUnauthorized = 401, - GTMSessionFetcherStatusForbidden = 403, - GTMSessionFetcherStatusPreconditionFailed = 412 -}; - -#ifdef __cplusplus -extern "C" { -#endif - -@class GTMSessionCookieStorage; -@class GTMSessionFetcher; - -// The configuration block is for modifying the NSURLSessionConfiguration only. -// DO NOT change any fetcher properties in the configuration block. -typedef void (^GTMSessionFetcherConfigurationBlock)(GTMSessionFetcher *fetcher, - NSURLSessionConfiguration *configuration); -typedef void (^GTMSessionFetcherSystemCompletionHandler)(void); -typedef void (^GTMSessionFetcherCompletionHandler)(NSData * GTM_NULLABLE_TYPE data, - NSError * GTM_NULLABLE_TYPE error); -typedef void (^GTMSessionFetcherBodyStreamProviderResponse)(NSInputStream *bodyStream); -typedef void (^GTMSessionFetcherBodyStreamProvider)(GTMSessionFetcherBodyStreamProviderResponse response); -typedef void (^GTMSessionFetcherDidReceiveResponseDispositionBlock)(NSURLSessionResponseDisposition disposition); -typedef void (^GTMSessionFetcherDidReceiveResponseBlock)(NSURLResponse *response, - GTMSessionFetcherDidReceiveResponseDispositionBlock dispositionBlock); -typedef void (^GTMSessionFetcherChallengeDispositionBlock)(NSURLSessionAuthChallengeDisposition disposition, - NSURLCredential * GTM_NULLABLE_TYPE credential); -typedef void (^GTMSessionFetcherChallengeBlock)(GTMSessionFetcher *fetcher, - NSURLAuthenticationChallenge *challenge, - GTMSessionFetcherChallengeDispositionBlock dispositionBlock); -typedef void (^GTMSessionFetcherWillRedirectResponse)(NSURLRequest * GTM_NULLABLE_TYPE redirectedRequest); -typedef void (^GTMSessionFetcherWillRedirectBlock)(NSHTTPURLResponse *redirectResponse, - NSURLRequest *redirectRequest, - GTMSessionFetcherWillRedirectResponse response); -typedef void (^GTMSessionFetcherAccumulateDataBlock)(NSData * GTM_NULLABLE_TYPE buffer); -typedef void (^GTMSessionFetcherSimulateByteTransferBlock)(NSData * GTM_NULLABLE_TYPE buffer, - int64_t bytesWritten, - int64_t totalBytesWritten, - int64_t totalBytesExpectedToWrite); -typedef void (^GTMSessionFetcherReceivedProgressBlock)(int64_t bytesWritten, - int64_t totalBytesWritten); -typedef void (^GTMSessionFetcherDownloadProgressBlock)(int64_t bytesWritten, - int64_t totalBytesWritten, - int64_t totalBytesExpectedToWrite); -typedef void (^GTMSessionFetcherSendProgressBlock)(int64_t bytesSent, - int64_t totalBytesSent, - int64_t totalBytesExpectedToSend); -typedef void (^GTMSessionFetcherWillCacheURLResponseResponse)(NSCachedURLResponse * GTM_NULLABLE_TYPE cachedResponse); -typedef void (^GTMSessionFetcherWillCacheURLResponseBlock)(NSCachedURLResponse *proposedResponse, - GTMSessionFetcherWillCacheURLResponseResponse responseBlock); -typedef void (^GTMSessionFetcherRetryResponse)(BOOL shouldRetry); -typedef void (^GTMSessionFetcherRetryBlock)(BOOL suggestedWillRetry, - NSError * GTM_NULLABLE_TYPE error, - GTMSessionFetcherRetryResponse response); - -typedef void (^GTMSessionFetcherTestResponse)(NSHTTPURLResponse * GTM_NULLABLE_TYPE response, - NSData * GTM_NULLABLE_TYPE data, - NSError * GTM_NULLABLE_TYPE error); -typedef void (^GTMSessionFetcherTestBlock)(GTMSessionFetcher *fetcherToTest, - GTMSessionFetcherTestResponse testResponse); - -void GTMSessionFetcherAssertValidSelector(id GTM_NULLABLE_TYPE obj, SEL GTM_NULLABLE_TYPE sel, ...); - -// Utility functions for applications self-identifying to servers via a -// user-agent header - -// The "standard" user agent includes the application identifier, taken from the bundle, -// followed by a space and the system version string. Pass nil to use +mainBundle as the source -// of the bundle identifier. -// -// Applications may use this as a starting point for their own user agent strings, perhaps -// with additional sections appended. Use GTMFetcherCleanedUserAgentString() below to -// clean up any string being added to the user agent. -NSString *GTMFetcherStandardUserAgentString(NSBundle * GTM_NULLABLE_TYPE bundle); - -// Make a generic name and version for the current application, like -// com.example.MyApp/1.2.3 relying on the bundle identifier and the -// CFBundleShortVersionString or CFBundleVersion. -// -// The bundle ID may be overridden as the base identifier string by -// adding to the bundle's Info.plist a "GTMUserAgentID" key. -// -// If no bundle ID or override is available, the process name preceded -// by "proc_" is used. -NSString *GTMFetcherApplicationIdentifier(NSBundle * GTM_NULLABLE_TYPE bundle); - -// Make an identifier like "MacOSX/10.7.1" or "iPod_Touch/4.1 hw/iPod1_1" -NSString *GTMFetcherSystemVersionString(void); - -// Make a parseable user-agent identifier from the given string, replacing whitespace -// and commas with underscores, and removing other characters that may interfere -// with parsing of the full user-agent string. -// -// For example, @"[My App]" would become @"My_App" -NSString *GTMFetcherCleanedUserAgentString(NSString *str); - -// Grab the data from an input stream. Since streams cannot be assumed to be rewindable, -// this may be destructive; the caller can try to rewind the stream (by setting the -// NSStreamFileCurrentOffsetKey property) or can just use the NSData to make a new -// NSInputStream. This function is intended to facilitate testing rather than be used in -// production. -// -// This function operates synchronously on the current thread. Depending on how the -// input stream is implemented, it may be appropriate to dispatch to a different -// queue before calling this function. -// -// Failure is indicated by a returned data value of nil. -NSData * GTM_NULLABLE_TYPE GTMDataFromInputStream(NSInputStream *inputStream, NSError **outError); - -#ifdef __cplusplus -} // extern "C" -#endif - - -#if !GTM_USE_SESSION_FETCHER -@protocol GTMHTTPFetcherServiceProtocol; -#endif - -// This protocol allows abstract references to the fetcher service, primarily for -// fetchers (which may be compiled without the fetcher service class present.) -// -// Apps should not need to use this protocol. -@protocol GTMSessionFetcherServiceProtocol -// This protocol allows us to call into the service without requiring -// GTMSessionFetcherService sources in this project - -@property(atomic, strong) dispatch_queue_t callbackQueue; - -- (BOOL)fetcherShouldBeginFetching:(GTMSessionFetcher *)fetcher; -- (void)fetcherDidCreateSession:(GTMSessionFetcher *)fetcher; -- (void)fetcherDidBeginFetching:(GTMSessionFetcher *)fetcher; -- (void)fetcherDidStop:(GTMSessionFetcher *)fetcher; - -- (GTMSessionFetcher *)fetcherWithRequest:(NSURLRequest *)request; -- (BOOL)isDelayingFetcher:(GTMSessionFetcher *)fetcher; - -@property(atomic, assign) BOOL reuseSession; -- (GTM_NULLABLE NSURLSession *)session; -- (GTM_NULLABLE NSURLSession *)sessionForFetcherCreation; -- (GTM_NULLABLE id)sessionDelegate; -- (GTM_NULLABLE NSDate *)stoppedAllFetchersDate; - -// Methods for compatibility with the old GTMHTTPFetcher. -@property(readonly, strong, GTM_NULLABLE) NSOperationQueue *delegateQueue; - -@end // @protocol GTMSessionFetcherServiceProtocol - -#ifndef GTM_FETCHER_AUTHORIZATION_PROTOCOL -#define GTM_FETCHER_AUTHORIZATION_PROTOCOL 1 -@protocol GTMFetcherAuthorizationProtocol -@required -// This protocol allows us to call the authorizer without requiring its sources -// in this project. -- (void)authorizeRequest:(GTM_NULLABLE NSMutableURLRequest *)request - delegate:(id)delegate - didFinishSelector:(SEL)sel; - -- (void)stopAuthorization; - -- (void)stopAuthorizationForRequest:(NSURLRequest *)request; - -- (BOOL)isAuthorizingRequest:(NSURLRequest *)request; - -- (BOOL)isAuthorizedRequest:(NSURLRequest *)request; - -@property(strong, readonly, GTM_NULLABLE) NSString *userEmail; - -@optional - -// Indicate if authorization may be attempted. Even if this succeeds, -// authorization may fail if the user's permissions have been revoked. -@property(readonly) BOOL canAuthorize; - -// For development only, allow authorization of non-SSL requests, allowing -// transmission of the bearer token unencrypted. -@property(assign) BOOL shouldAuthorizeAllRequests; - -- (void)authorizeRequest:(GTM_NULLABLE NSMutableURLRequest *)request - completionHandler:(void (^)(NSError * GTM_NULLABLE_TYPE error))handler; - -#if GTM_USE_SESSION_FETCHER -@property (weak, GTM_NULLABLE) id fetcherService; -#else -@property (weak, GTM_NULLABLE) id fetcherService; -#endif - -- (BOOL)primeForRefresh; - -@end -#endif // GTM_FETCHER_AUTHORIZATION_PROTOCOL - -#if TARGET_OS_IPHONE -// A protocol for an alternative target for messages from GTMSessionFetcher to UIApplication. -// Set the target using +[GTMSessionFetcher setSubstituteUIApplication:] -@protocol GTMUIApplicationProtocol -- (UIBackgroundTaskIdentifier)beginBackgroundTaskWithName:(nullable NSString *)taskName - expirationHandler:(void(^ __nullable)(void))handler; -- (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier; -@end -#endif - -#pragma mark - - -// GTMSessionFetcher objects are used for async retrieval of an http get or post -// -// See additional comments at the beginning of this file -@interface GTMSessionFetcher : NSObject - -// Create a fetcher -// -// fetcherWithRequest will return an autoreleased fetcher, but if -// the connection is successfully created, the connection should retain the -// fetcher for the life of the connection as well. So the caller doesn't have -// to retain the fetcher explicitly unless they want to be able to cancel it. -+ (instancetype)fetcherWithRequest:(GTM_NULLABLE NSURLRequest *)request; - -// Convenience methods that make a request, like +fetcherWithRequest -+ (instancetype)fetcherWithURL:(NSURL *)requestURL; -+ (instancetype)fetcherWithURLString:(NSString *)requestURLString; - -// Methods for creating fetchers to continue previous fetches. -+ (instancetype)fetcherWithDownloadResumeData:(NSData *)resumeData; -+ (GTM_NULLABLE instancetype)fetcherWithSessionIdentifier:(NSString *)sessionIdentifier; - -// Returns an array of currently active fetchers for background sessions, -// both restarted and newly created ones. -+ (GTM_NSArrayOf(GTMSessionFetcher *) *)fetchersForBackgroundSessions; - -// Designated initializer. -// -// Applications should create fetchers with a "fetcherWith..." method on a fetcher -// service or a class method, not with this initializer. -// -// The configuration should typically be nil. Applications needing to customize -// the configuration may do so by setting the configurationBlock property. -- (instancetype)initWithRequest:(GTM_NULLABLE NSURLRequest *)request - configuration:(GTM_NULLABLE NSURLSessionConfiguration *)configuration; - -// The fetcher's request. This may not be set after beginFetch has been invoked. The request -// may change due to redirects. -@property(strong, GTM_NULLABLE) NSURLRequest *request; - -// Set a header field value on the request. Header field value changes will not -// affect a fetch after the fetch has begun. -- (void)setRequestValue:(GTM_NULLABLE NSString *)value forHTTPHeaderField:(NSString *)field; - -// The fetcher's request (deprecated.) -// -// Exposing a mutable object in the interface was convenient but a bad design decision due -// to thread-safety requirements. Clients should use the request property and -// setRequestValue:forHTTPHeaderField: instead. -@property(atomic, readonly, GTM_NULLABLE) NSMutableURLRequest *mutableRequest - GTMSESSION_DEPRECATE_ON_2016_SDKS("use 'request' or '-setRequestValue:forHTTPHeaderField:'"); - -// Data used for resuming a download task. -@property(atomic, readonly, GTM_NULLABLE) NSData *downloadResumeData; - -// The configuration; this must be set before the fetch begins. If no configuration is -// set or inherited from the fetcher service, then the fetcher uses an ephemeral config. -// -// NOTE: This property should typically be nil. Applications needing to customize -// the configuration should do so by setting the configurationBlock property. -// That allows the fetcher to pick an appropriate base configuration, with the -// application setting only the configuration properties it needs to customize. -@property(atomic, strong, GTM_NULLABLE) NSURLSessionConfiguration *configuration; - -// A block the client may use to customize the configuration used to create the session. -// -// This is called synchronously, either on the thread that begins the fetch or, during a retry, -// on the main thread. The configuration block may be called repeatedly if multiple fetchers are -// created. -// -// The configuration block is for modifying the NSURLSessionConfiguration only. -// DO NOT change any fetcher properties in the configuration block. Fetcher properties -// may be set in the fetcher service prior to fetcher creation, or on the fetcher prior -// to invoking beginFetch. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherConfigurationBlock configurationBlock; - -// A session is created as needed by the fetcher. A fetcher service object -// may maintain sessions for multiple fetches to the same host. -@property(atomic, strong, GTM_NULLABLE) NSURLSession *session; - -// The task in flight. -@property(atomic, readonly, GTM_NULLABLE) NSURLSessionTask *sessionTask; - -// The background session identifier. -@property(atomic, readonly, GTM_NULLABLE) NSString *sessionIdentifier; - -// Indicates a fetcher created to finish a background session task. -@property(atomic, readonly) BOOL wasCreatedFromBackgroundSession; - -// Additional user-supplied data to encode into the session identifier. Since session identifier -// length limits are unspecified, this should be kept small. Key names beginning with an underscore -// are reserved for use by the fetcher. -@property(atomic, strong, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSString *) *sessionUserInfo; - -// The human-readable description to be assigned to the task. -@property(atomic, copy, GTM_NULLABLE) NSString *taskDescription; - -// The priority assigned to the task, if any. Use NSURLSessionTaskPriorityLow, -// NSURLSessionTaskPriorityDefault, or NSURLSessionTaskPriorityHigh. -@property(atomic, assign) float taskPriority; - -// The fetcher encodes information used to resume a session in the session identifier. -// This method, intended for internal use returns the encoded information. The sessionUserInfo -// dictionary is stored as identifier metadata. -- (GTM_NULLABLE GTM_NSDictionaryOf(NSString *, NSString *) *)sessionIdentifierMetadata; - -#if TARGET_OS_IPHONE -// The app should pass to this method the completion handler passed in the app delegate method -// application:handleEventsForBackgroundURLSession:completionHandler: -+ (void)application:(UIApplication *)application - handleEventsForBackgroundURLSession:(NSString *)identifier - completionHandler:(GTMSessionFetcherSystemCompletionHandler)completionHandler; -#endif - -// Indicate that a newly created session should be a background session. -// A new session identifier will be created by the fetcher. -// -// Warning: The only thing background sessions are for is rare download -// of huge, batched files of data. And even just for those, there's a lot -// of pain and hackery needed to get transfers to actually happen reliably -// with background sessions. -// -// Don't try to upload or download in many background sessions, since the system -// will impose an exponentially increasing time penalty to prevent the app from -// getting too much background execution time. -// -// References: -// -// "Moving to Fewer, Larger Transfers" -// https://forums.developer.apple.com/thread/14853 -// -// "NSURLSession’s Resume Rate Limiter" -// https://forums.developer.apple.com/thread/14854 -// -// "Background Session Task state persistence" -// https://forums.developer.apple.com/thread/11554 -// -@property(assign) BOOL useBackgroundSession; - -// Indicates if the fetcher was started using a background session. -@property(atomic, readonly, getter=isUsingBackgroundSession) BOOL usingBackgroundSession; - -// Indicates if uploads should use an upload task. This is always set for file or stream-provider -// bodies, but may be set explicitly for NSData bodies. -@property(atomic, assign) BOOL useUploadTask; - -// Indicates that the fetcher is using a session that may be shared with other fetchers. -@property(atomic, readonly) BOOL canShareSession; - -// By default, the fetcher allows only secure (https) schemes unless this -// property is set, or the GTM_ALLOW_INSECURE_REQUESTS build flag is set. -// -// For example, during debugging when fetching from a development server that lacks SSL support, -// this may be set to @[ @"http" ], or when the fetcher is used to retrieve local files, -// this may be set to @[ @"file" ]. -// -// This should be left as nil for release builds to avoid creating the opportunity for -// leaking private user behavior and data. If a server is providing insecure URLs -// for fetching by the client app, report the problem as server security & privacy bug. -// -// For builds with the iOS 9/OS X 10.11 and later SDKs, this property is required only when -// the app specifies NSAppTransportSecurity/NSAllowsArbitraryLoads in the main bundle's Info.plist. -@property(atomic, copy, GTM_NULLABLE) GTM_NSArrayOf(NSString *) *allowedInsecureSchemes; - -// By default, the fetcher prohibits localhost requests unless this property is set, -// or the GTM_ALLOW_INSECURE_REQUESTS build flag is set. -// -// For localhost requests, the URL scheme is not checked when this property is set. -// -// For builds with the iOS 9/OS X 10.11 and later SDKs, this property is required only when -// the app specifies NSAppTransportSecurity/NSAllowsArbitraryLoads in the main bundle's Info.plist. -@property(atomic, assign) BOOL allowLocalhostRequest; - -// By default, the fetcher requires valid server certs. This may be bypassed -// temporarily for development against a test server with an invalid cert. -@property(atomic, assign) BOOL allowInvalidServerCertificates; - -// Cookie storage object for this fetcher. If nil, the fetcher will use a static cookie -// storage instance shared among fetchers. If this fetcher was created by a fetcher service -// object, it will be set to use the service object's cookie storage. See Cookies section above for -// the full discussion. -// -// Because as of Jan 2014 standalone instances of NSHTTPCookieStorage do not actually -// store any cookies (Radar 15735276) we use our own subclass, GTMSessionCookieStorage, -// to hold cookies in memory. -@property(atomic, strong, GTM_NULLABLE) NSHTTPCookieStorage *cookieStorage; - -// Setting the credential is optional; it is used if the connection receives -// an authentication challenge. -@property(atomic, strong, GTM_NULLABLE) NSURLCredential *credential; - -// Setting the proxy credential is optional; it is used if the connection -// receives an authentication challenge from a proxy. -@property(atomic, strong, GTM_NULLABLE) NSURLCredential *proxyCredential; - -// If body data, body file URL, or body stream provider is not set, then a GET request -// method is assumed. -@property(atomic, strong, GTM_NULLABLE) NSData *bodyData; - -// File to use as the request body. This forces use of an upload task. -@property(atomic, strong, GTM_NULLABLE) NSURL *bodyFileURL; - -// Length of body to send, expected or actual. -@property(atomic, readonly) int64_t bodyLength; - -// The body stream provider may be called repeatedly to provide a body. -// Setting a body stream provider forces use of an upload task. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherBodyStreamProvider bodyStreamProvider; - -// Object to add authorization to the request, if needed. -// -// This may not be changed once beginFetch has been invoked. -@property(atomic, strong, GTM_NULLABLE) id authorizer; - -// The service object that created and monitors this fetcher, if any. -@property(atomic, strong) id service; - -// The host, if any, used to classify this fetcher in the fetcher service. -@property(atomic, copy, GTM_NULLABLE) NSString *serviceHost; - -// The priority, if any, used for starting fetchers in the fetcher service. -// -// Lower values are higher priority; the default is 0, and values may -// be negative or positive. This priority affects only the start order of -// fetchers that are being delayed by a fetcher service when the running fetchers -// exceeds the service's maxRunningFetchersPerHost. A priority of NSIntegerMin will -// exempt this fetcher from delay. -@property(atomic, assign) NSInteger servicePriority; - -// The delegate's optional didReceiveResponse block may be used to inspect or alter -// the session task response. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherDidReceiveResponseBlock didReceiveResponseBlock; - -// The delegate's optional challenge block may be used to inspect or alter -// the session task challenge. -// -// If this block is not set, the fetcher's default behavior for the NSURLSessionTask -// didReceiveChallenge: delegate method is to use the fetcher's respondToChallenge: method -// which relies on the fetcher's credential and proxyCredential properties. -// -// Warning: This may be called repeatedly if the challenge fails. Check -// challenge.previousFailureCount to identify repeated invocations. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherChallengeBlock challengeBlock; - -// The delegate's optional willRedirect block may be used to inspect or alter -// the redirection. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherWillRedirectBlock willRedirectBlock; - -// The optional send progress block reports body bytes uploaded. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherSendProgressBlock sendProgressBlock; - -// The optional accumulate block may be set by clients wishing to accumulate data -// themselves rather than let the fetcher append each buffer to an NSData. -// -// When this is called with nil data (such as on redirect) the client -// should empty its accumulation buffer. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherAccumulateDataBlock accumulateDataBlock; - -// The optional received progress block may be used to monitor data -// received from a data task. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherReceivedProgressBlock receivedProgressBlock; - -// The delegate's optional downloadProgress block may be used to monitor download -// progress in writing to disk. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherDownloadProgressBlock downloadProgressBlock; - -// The delegate's optional willCacheURLResponse block may be used to alter the cached -// NSURLResponse. The user may prevent caching by passing nil to the block's response. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherWillCacheURLResponseBlock willCacheURLResponseBlock; - -// Enable retrying; see comments at the top of this file. Setting -// retryEnabled=YES resets the min and max retry intervals. -@property(atomic, assign, getter=isRetryEnabled) BOOL retryEnabled; - -// Retry block is optional for retries. -// -// If present, this block should call the response block with YES to cause a retry or NO to end the -// fetch. -// See comments at the top of this file. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherRetryBlock retryBlock; - -// Retry intervals must be strictly less than maxRetryInterval, else -// they will be limited to maxRetryInterval and no further retries will -// be attempted. Setting maxRetryInterval to 0.0 will reset it to the -// default value, 60 seconds for downloads and 600 seconds for uploads. -@property(atomic, assign) NSTimeInterval maxRetryInterval; - -// Starting retry interval. Setting minRetryInterval to 0.0 will reset it -// to a random value between 1.0 and 2.0 seconds. Clients should normally not -// set this except for unit testing. -@property(atomic, assign) NSTimeInterval minRetryInterval; - -// Multiplier used to increase the interval between retries, typically 2.0. -// Clients should not need to set this. -@property(atomic, assign) double retryFactor; - -// Number of retries attempted. -@property(atomic, readonly) NSUInteger retryCount; - -// Interval delay to precede next retry. -@property(atomic, readonly) NSTimeInterval nextRetryInterval; - -#if GTM_BACKGROUND_TASK_FETCHING -// Skip use of a UIBackgroundTask, thus requiring fetches to complete when the app is in the -// foreground. -// -// Targets should define GTM_BACKGROUND_TASK_FETCHING to 0 to avoid use of a UIBackgroundTask -// on iOS to allow fetches to complete in the background. This property is available when -// it's not practical to set the preprocessor define. -@property(atomic, assign) BOOL skipBackgroundTask; -#endif // GTM_BACKGROUND_TASK_FETCHING - -// Begin fetching the request -// -// The delegate may optionally implement the callback or pass nil for the selector or handler. -// -// The delegate and all callback blocks are retained between the beginFetch call until after the -// finish callback, or until the fetch is stopped. -// -// An error is passed to the callback for server statuses 300 or -// higher, with the status stored as the error object's code. -// -// finishedSEL has a signature like: -// - (void)fetcher:(GTMSessionFetcher *)fetcher -// finishedWithData:(NSData *)data -// error:(NSError *)error; -// -// If the application has specified a destinationFileURL or an accumulateDataBlock -// for the fetcher, the data parameter passed to the callback will be nil. - -- (void)beginFetchWithDelegate:(GTM_NULLABLE id)delegate - didFinishSelector:(GTM_NULLABLE SEL)finishedSEL; - -- (void)beginFetchWithCompletionHandler:(GTM_NULLABLE GTMSessionFetcherCompletionHandler)handler; - -// Returns YES if this fetcher is in the process of fetching a URL. -@property(atomic, readonly, getter=isFetching) BOOL fetching; - -// Cancel the fetch of the request that's currently in progress. The completion handler -// will not be called. -- (void)stopFetching; - -// A block to be called when the fetch completes. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherCompletionHandler completionHandler; - -// A block to be called if download resume data becomes available. -@property(atomic, strong, GTM_NULLABLE) void (^resumeDataBlock)(NSData *); - -// Return the status code from the server response. -@property(atomic, readonly) NSInteger statusCode; - -// Return the http headers from the response. -@property(atomic, strong, readonly, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSString *) *responseHeaders; - -// The response, once it's been received. -@property(atomic, strong, readonly, GTM_NULLABLE) NSURLResponse *response; - -// Bytes downloaded so far. -@property(atomic, readonly) int64_t downloadedLength; - -// Buffer of currently-downloaded data, if available. -@property(atomic, readonly, strong, GTM_NULLABLE) NSData *downloadedData; - -// Local path to which the downloaded file will be moved. -// -// If a file already exists at the path, it will be overwritten. -// Will create the enclosing folders if they are not present. -@property(atomic, strong, GTM_NULLABLE) NSURL *destinationFileURL; - -// The time this fetcher originally began fetching. This is useful as a time -// barrier for ignoring irrelevant fetch notifications or callbacks. -@property(atomic, strong, readonly, GTM_NULLABLE) NSDate *initialBeginFetchDate; - -// userData is retained solely for the convenience of the client. -@property(atomic, strong, GTM_NULLABLE) id userData; - -// Stored property values are retained solely for the convenience of the client. -@property(atomic, copy, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, id) *properties; - -- (void)setProperty:(GTM_NULLABLE id)obj forKey:(NSString *)key; // Pass nil for obj to remove the property. -- (GTM_NULLABLE id)propertyForKey:(NSString *)key; - -- (void)addPropertiesFromDictionary:(GTM_NSDictionaryOf(NSString *, id) *)dict; - -// Comments are useful for logging, so are strongly recommended for each fetcher. -@property(atomic, copy, GTM_NULLABLE) NSString *comment; - -- (void)setCommentWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2); - -// Log of request and response, if logging is enabled -@property(atomic, copy, GTM_NULLABLE) NSString *log; - -// Callbacks are run on this queue. If none is supplied, the main queue is used. -@property(atomic, strong, GTM_NULL_RESETTABLE) dispatch_queue_t callbackQueue; - -// The queue used internally by the session to invoke its delegate methods in the fetcher. -// -// Application callbacks are always called by the fetcher on the callbackQueue above, -// not on this queue. Apps should generally not change this queue. -// -// The default delegate queue is the main queue. -// -// This value is ignored after the session has been created, so this -// property should be set in the fetcher service rather in the fetcher as it applies -// to a shared session. -@property(atomic, strong, GTM_NULL_RESETTABLE) NSOperationQueue *sessionDelegateQueue; - -// Spin the run loop or sleep the thread, discarding events, until the fetch has completed. -// -// This is only for use in testing or in tools without a user interface. -// -// Note: Synchronous fetches should never be used by shipping apps; they are -// sufficient reason for rejection from the app store. -// -// Returns NO if timed out. -- (BOOL)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds; - -// Test block is optional for testing. -// -// If present, this block will cause the fetcher to skip starting the session, and instead -// use the test block response values when calling the completion handler and delegate code. -// -// Test code can set this on the fetcher or on the fetcher service. For testing libraries -// that use a fetcher without exposing either the fetcher or the fetcher service, the global -// method setGlobalTestBlock: will set the block for all fetchers that do not have a test -// block set. -// -// The test code can pass nil for all response parameters to indicate that the fetch -// should proceed. -// -// Applications can exclude test block support by setting GTM_DISABLE_FETCHER_TEST_BLOCK. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherTestBlock testBlock; - -+ (void)setGlobalTestBlock:(GTM_NULLABLE GTMSessionFetcherTestBlock)block; - -// When using the testBlock, |testBlockAccumulateDataChunkCount| is the desired number of chunks to -// divide the response data into if the client has streaming enabled. The data will be divided up to -// |testBlockAccumulateDataChunkCount| chunks; however, the exact amount may vary depending on the -// size of the response data (e.g. a 1-byte response can only be divided into one chunk). -@property(atomic, readwrite) NSUInteger testBlockAccumulateDataChunkCount; - -#if TARGET_OS_IPHONE -// For testing or to override UIApplication invocations, apps may specify an alternative -// target for messages to UIApplication. -+ (void)setSubstituteUIApplication:(nullable id)substituteUIApplication; -+ (nullable id)substituteUIApplication; -#endif // TARGET_OS_IPHONE - -// Exposed for testing. -+ (GTMSessionCookieStorage *)staticCookieStorage; -+ (BOOL)appAllowsInsecureRequests; - -#if STRIP_GTM_FETCH_LOGGING -// If logging is stripped, provide a stub for the main method -// for controlling logging. -+ (void)setLoggingEnabled:(BOOL)flag; -+ (BOOL)isLoggingEnabled; - -#else - -// These methods let an application log specific body text, such as the text description of a binary -// request or response. The application should set the fetcher to defer response body logging until -// the response has been received and the log response body has been set by the app. For example: -// -// fetcher.logRequestBody = [binaryObject stringDescription]; -// fetcher.deferResponseBodyLogging = YES; -// [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { -// if (error == nil) { -// fetcher.logResponseBody = [[[MyThing alloc] initWithData:data] stringDescription]; -// } -// fetcher.deferResponseBodyLogging = NO; -// }]; - -@property(atomic, copy, GTM_NULLABLE) NSString *logRequestBody; -@property(atomic, assign) BOOL deferResponseBodyLogging; -@property(atomic, copy, GTM_NULLABLE) NSString *logResponseBody; - -// Internal logging support. -@property(atomic, readonly) NSData *loggedStreamData; -@property(atomic, assign) BOOL hasLoggedError; -@property(atomic, strong, GTM_NULLABLE) NSURL *redirectedFromURL; -- (void)appendLoggedStreamData:(NSData *)dataToAdd; -- (void)clearLoggedStreamData; - -#endif // STRIP_GTM_FETCH_LOGGING - -@end - -@interface GTMSessionFetcher (BackwardsCompatibilityOnly) -// Clients using GTMSessionFetcher should set the cookie storage explicitly themselves. -// This method is just for compatibility with the old GTMHTTPFetcher class. -- (void)setCookieStorageMethod:(NSInteger)method; -@end - -// Until we can just instantiate NSHTTPCookieStorage for local use, we'll -// implement all the public methods ourselves. This stores cookies only in -// memory. Additional methods are provided for testing. -// -// iOS 9/OS X 10.11 added +[NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier:] -// which may also be used to create cookie storage. -@interface GTMSessionCookieStorage : NSHTTPCookieStorage - -// Add the array off cookies to the storage, replacing duplicates. -// Also removes expired cookies from the storage. -- (void)setCookies:(GTM_NULLABLE GTM_NSArrayOf(NSHTTPCookie *) *)cookies; - -- (void)removeAllCookies; - -@end - -// Macros to monitor synchronization blocks in debug builds. -// These report problems using GTMSessionCheckDebug. -// -// GTMSessionMonitorSynchronized Start monitoring a top-level-only -// @sync scope. -// GTMSessionMonitorRecursiveSynchronized Start monitoring a top-level or -// recursive @sync scope. -// GTMSessionCheckSynchronized Verify that the current execution -// is inside a @sync scope. -// GTMSessionCheckNotSynchronized Verify that the current execution -// is not inside a @sync scope. -// -// Example usage: -// -// - (void)myExternalMethod { -// @synchronized(self) { -// GTMSessionMonitorSynchronized(self) -// -// - (void)myInternalMethod { -// GTMSessionCheckSynchronized(self); -// -// - (void)callMyCallbacks { -// GTMSessionCheckNotSynchronized(self); -// -// GTMSessionCheckNotSynchronized is available for verifying the code isn't -// in a deadlockable @sync state when posting notifications and invoking -// callbacks. Don't use GTMSessionCheckNotSynchronized immediately before a -// @sync scope; the normal recursiveness check of GTMSessionMonitorSynchronized -// can catch those. - -#ifdef __OBJC__ -#if DEBUG - #define __GTMSessionMonitorSynchronizedVariableInner(varname, counter) \ - varname ## counter - #define __GTMSessionMonitorSynchronizedVariable(varname, counter) \ - __GTMSessionMonitorSynchronizedVariableInner(varname, counter) - - #define GTMSessionMonitorSynchronized(obj) \ - NS_VALID_UNTIL_END_OF_SCOPE id \ - __GTMSessionMonitorSynchronizedVariable(__monitor, __COUNTER__) = \ - [[GTMSessionSyncMonitorInternal alloc] initWithSynchronizationObject:obj \ - allowRecursive:NO \ - functionName:__func__] - - #define GTMSessionMonitorRecursiveSynchronized(obj) \ - NS_VALID_UNTIL_END_OF_SCOPE id \ - __GTMSessionMonitorSynchronizedVariable(__monitor, __COUNTER__) = \ - [[GTMSessionSyncMonitorInternal alloc] initWithSynchronizationObject:obj \ - allowRecursive:YES \ - functionName:__func__] - - #define GTMSessionCheckSynchronized(obj) { \ - GTMSESSION_ASSERT_DEBUG( \ - [GTMSessionSyncMonitorInternal functionsHoldingSynchronizationOnObject:obj], \ - @"GTMSessionCheckSynchronized(" #obj ") failed: not sync'd" \ - @" on " #obj " in %s. Call stack:\n%@", \ - __func__, [NSThread callStackSymbols]); \ - } - - #define GTMSessionCheckNotSynchronized(obj) { \ - GTMSESSION_ASSERT_DEBUG( \ - ![GTMSessionSyncMonitorInternal functionsHoldingSynchronizationOnObject:obj], \ - @"GTMSessionCheckNotSynchronized(" #obj ") failed: was sync'd" \ - @" on " #obj " in %s by %@. Call stack:\n%@", __func__, \ - [GTMSessionSyncMonitorInternal functionsHoldingSynchronizationOnObject:obj], \ - [NSThread callStackSymbols]); \ - } - -// GTMSessionSyncMonitorInternal is a private class that keeps track of the -// beginning and end of synchronized scopes. -// -// This class should not be used directly, but only via the -// GTMSessionMonitorSynchronized macro. -@interface GTMSessionSyncMonitorInternal : NSObject -- (instancetype)initWithSynchronizationObject:(id)object - allowRecursive:(BOOL)allowRecursive - functionName:(const char *)functionName; -// Return the names of the functions that hold sync on the object, or nil if none. -+ (NSArray *)functionsHoldingSynchronizationOnObject:(id)object; -@end - -#else - #define GTMSessionMonitorSynchronized(obj) do { } while (0) - #define GTMSessionMonitorRecursiveSynchronized(obj) do { } while (0) - #define GTMSessionCheckSynchronized(obj) do { } while (0) - #define GTMSessionCheckNotSynchronized(obj) do { } while (0) -#endif // !DEBUG -#endif // __OBJC__ - - -GTM_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.m b/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.m deleted file mode 100755 index e3f52d8..0000000 --- a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.m +++ /dev/null @@ -1,4549 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if !defined(__has_feature) || !__has_feature(objc_arc) -#error "This file requires ARC support." -#endif - -#import "GTMSessionFetcher.h" - -#import - -#ifndef STRIP_GTM_FETCH_LOGGING - #error GTMSessionFetcher headers should have defaulted this if it wasn't already defined. -#endif - -GTM_ASSUME_NONNULL_BEGIN - -NSString *const kGTMSessionFetcherStartedNotification = @"kGTMSessionFetcherStartedNotification"; -NSString *const kGTMSessionFetcherStoppedNotification = @"kGTMSessionFetcherStoppedNotification"; -NSString *const kGTMSessionFetcherRetryDelayStartedNotification = @"kGTMSessionFetcherRetryDelayStartedNotification"; -NSString *const kGTMSessionFetcherRetryDelayStoppedNotification = @"kGTMSessionFetcherRetryDelayStoppedNotification"; - -NSString *const kGTMSessionFetcherCompletionInvokedNotification = @"kGTMSessionFetcherCompletionInvokedNotification"; -NSString *const kGTMSessionFetcherCompletionDataKey = @"data"; -NSString *const kGTMSessionFetcherCompletionErrorKey = @"error"; - -NSString *const kGTMSessionFetcherErrorDomain = @"com.google.GTMSessionFetcher"; -NSString *const kGTMSessionFetcherStatusDomain = @"com.google.HTTPStatus"; -NSString *const kGTMSessionFetcherStatusDataKey = @"data"; // data returned with a kGTMSessionFetcherStatusDomain error - -NSString *const kGTMSessionFetcherNumberOfRetriesDoneKey = @"kGTMSessionFetcherNumberOfRetriesDoneKey"; -NSString *const kGTMSessionFetcherElapsedIntervalWithRetriesKey = @"kGTMSessionFetcherElapsedIntervalWithRetriesKey"; - -static NSString *const kGTMSessionIdentifierPrefix = @"com.google.GTMSessionFetcher"; -static NSString *const kGTMSessionIdentifierDestinationFileURLMetadataKey = @"_destURL"; -static NSString *const kGTMSessionIdentifierBodyFileURLMetadataKey = @"_bodyURL"; - -// The default max retry interview is 10 minutes for uploads (POST/PUT/PATCH), -// 1 minute for downloads. -static const NSTimeInterval kUnsetMaxRetryInterval = -1.0; -static const NSTimeInterval kDefaultMaxDownloadRetryInterval = 60.0; -static const NSTimeInterval kDefaultMaxUploadRetryInterval = 60.0 * 10.; - -#ifdef GTMSESSION_PERSISTED_DESTINATION_KEY -// Projects using unique class names should also define a unique persisted destination key. -static NSString * const kGTMSessionFetcherPersistedDestinationKey = - GTMSESSION_PERSISTED_DESTINATION_KEY; -#else -static NSString * const kGTMSessionFetcherPersistedDestinationKey = - @"com.google.GTMSessionFetcher.downloads"; -#endif - -GTM_ASSUME_NONNULL_END - -// -// GTMSessionFetcher -// - -#if 0 -#define GTM_LOG_BACKGROUND_SESSION(...) GTMSESSION_LOG_DEBUG(__VA_ARGS__) -#else -#define GTM_LOG_BACKGROUND_SESSION(...) -#endif - -#ifndef GTM_TARGET_SUPPORTS_APP_TRANSPORT_SECURITY - #if (TARGET_OS_TV \ - || TARGET_OS_WATCH \ - || (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \ - || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0)) - #define GTM_TARGET_SUPPORTS_APP_TRANSPORT_SECURITY 1 - #endif -#endif - -@interface GTMSessionFetcher () - -@property(atomic, strong, readwrite, GTM_NULLABLE) NSData *downloadedData; -@property(atomic, strong, readwrite, GTM_NULLABLE) NSData *downloadResumeData; - -#if GTM_BACKGROUND_TASK_FETCHING -// Should always be accessed within an @synchranized(self). -@property(assign, nonatomic) UIBackgroundTaskIdentifier backgroundTaskIdentifier; -#endif - -@property(atomic, readwrite, getter=isUsingBackgroundSession) BOOL usingBackgroundSession; - -@end - -#if !GTMSESSION_BUILD_COMBINED_SOURCES -@interface GTMSessionFetcher (GTMSessionFetcherLoggingInternal) -- (void)logFetchWithError:(NSError *)error; -- (void)logNowWithError:(GTM_NULLABLE NSError *)error; -- (NSInputStream *)loggedInputStreamForInputStream:(NSInputStream *)inputStream; -- (GTMSessionFetcherBodyStreamProvider)loggedStreamProviderForStreamProvider: - (GTMSessionFetcherBodyStreamProvider)streamProvider; -@end -#endif // !GTMSESSION_BUILD_COMBINED_SOURCES - -GTM_ASSUME_NONNULL_BEGIN - -static NSTimeInterval InitialMinRetryInterval(void) { - return 1.0 + ((double)(arc4random_uniform(0x0FFFF)) / (double) 0x0FFFF); -} - -static BOOL IsLocalhost(NSString * GTM_NULLABLE_TYPE host) { - // We check if there's host, and then make the comparisons. - if (host == nil) return NO; - return ([host caseInsensitiveCompare:@"localhost"] == NSOrderedSame - || [host isEqual:@"::1"] - || [host isEqual:@"127.0.0.1"]); -} - -static GTMSessionFetcherTestBlock GTM_NULLABLE_TYPE gGlobalTestBlock; - -@implementation GTMSessionFetcher { - NSMutableURLRequest *_request; // after beginFetch, changed only in delegate callbacks - BOOL _useUploadTask; // immutable after beginFetch - NSURL *_bodyFileURL; // immutable after beginFetch - GTMSessionFetcherBodyStreamProvider _bodyStreamProvider; // immutable after beginFetch - NSURLSession *_session; - BOOL _shouldInvalidateSession; // immutable after beginFetch - NSURLSession *_sessionNeedingInvalidation; - NSURLSessionConfiguration *_configuration; - NSURLSessionTask *_sessionTask; - NSString *_taskDescription; - float _taskPriority; - NSURLResponse *_response; - NSString *_sessionIdentifier; - BOOL _wasCreatedFromBackgroundSession; - BOOL _didCreateSessionIdentifier; - NSString *_sessionIdentifierUUID; - BOOL _userRequestedBackgroundSession; - BOOL _usingBackgroundSession; - NSMutableData * GTM_NULLABLE_TYPE _downloadedData; - NSError *_downloadFinishedError; - NSData *_downloadResumeData; // immutable after construction - NSURL *_destinationFileURL; - int64_t _downloadedLength; - NSURLCredential *_credential; // username & password - NSURLCredential *_proxyCredential; // credential supplied to proxy servers - BOOL _isStopNotificationNeeded; // set when start notification has been sent - BOOL _isUsingTestBlock; // set when a test block was provided (remains set when the block is released) - id _userData; // retained, if set by caller - NSMutableDictionary *_properties; // more data retained for caller - dispatch_queue_t _callbackQueue; - dispatch_group_t _callbackGroup; // read-only after creation - NSOperationQueue *_delegateQueue; // immutable after beginFetch - - id _authorizer; // immutable after beginFetch - - // The service object that created and monitors this fetcher, if any. - id _service; // immutable; set by the fetcher service upon creation - NSString *_serviceHost; - NSInteger _servicePriority; // immutable after beginFetch - BOOL _hasStoppedFetching; // counterpart to _initialBeginFetchDate - BOOL _userStoppedFetching; - - BOOL _isRetryEnabled; // user wants auto-retry - NSTimer *_retryTimer; - NSUInteger _retryCount; - NSTimeInterval _maxRetryInterval; // default 60 (download) or 600 (upload) seconds - NSTimeInterval _minRetryInterval; // random between 1 and 2 seconds - NSTimeInterval _retryFactor; // default interval multiplier is 2 - NSTimeInterval _lastRetryInterval; - NSDate *_initialBeginFetchDate; // date that beginFetch was first invoked; immutable after initial beginFetch - NSDate *_initialRequestDate; // date of first request to the target server (ignoring auth) - BOOL _hasAttemptedAuthRefresh; // accessed only in shouldRetryNowForStatus: - - NSString *_comment; // comment for log - NSString *_log; -#if !STRIP_GTM_FETCH_LOGGING - NSMutableData *_loggedStreamData; - NSURL *_redirectedFromURL; - NSString *_logRequestBody; - NSString *_logResponseBody; - BOOL _hasLoggedError; - BOOL _deferResponseBodyLogging; -#endif -} - -#if !GTMSESSION_UNIT_TESTING -+ (void)load { - [self fetchersForBackgroundSessions]; -} -#endif - -+ (instancetype)fetcherWithRequest:(GTM_NULLABLE NSURLRequest *)request { - return [[self alloc] initWithRequest:request configuration:nil]; -} - -+ (instancetype)fetcherWithURL:(NSURL *)requestURL { - return [self fetcherWithRequest:[NSURLRequest requestWithURL:requestURL]]; -} - -+ (instancetype)fetcherWithURLString:(NSString *)requestURLString { - return [self fetcherWithURL:(NSURL *)[NSURL URLWithString:requestURLString]]; -} - -+ (instancetype)fetcherWithDownloadResumeData:(NSData *)resumeData { - GTMSessionFetcher *fetcher = [self fetcherWithRequest:nil]; - fetcher.comment = @"Resuming download"; - fetcher.downloadResumeData = resumeData; - return fetcher; -} - -+ (GTM_NULLABLE instancetype)fetcherWithSessionIdentifier:(NSString *)sessionIdentifier { - GTMSESSION_ASSERT_DEBUG(sessionIdentifier != nil, @"Invalid session identifier"); - NSMapTable *sessionIdentifierToFetcherMap = [self sessionIdentifierToFetcherMap]; - GTMSessionFetcher *fetcher = [sessionIdentifierToFetcherMap objectForKey:sessionIdentifier]; - if (!fetcher && [sessionIdentifier hasPrefix:kGTMSessionIdentifierPrefix]) { - fetcher = [self fetcherWithRequest:nil]; - [fetcher setSessionIdentifier:sessionIdentifier]; - [sessionIdentifierToFetcherMap setObject:fetcher forKey:sessionIdentifier]; - fetcher->_wasCreatedFromBackgroundSession = YES; - [fetcher setCommentWithFormat:@"Resuming %@", - fetcher && fetcher->_sessionIdentifierUUID ? fetcher->_sessionIdentifierUUID : @"?"]; - } - return fetcher; -} - -+ (NSMapTable *)sessionIdentifierToFetcherMap { - // TODO: What if a service is involved in creating the fetcher? Currently, when re-creating - // fetchers, if a service was involved, it is not re-created. Should the service maintain a map? - static NSMapTable *gSessionIdentifierToFetcherMap = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - gSessionIdentifierToFetcherMap = [NSMapTable strongToWeakObjectsMapTable]; - }); - return gSessionIdentifierToFetcherMap; -} - -#if !GTM_ALLOW_INSECURE_REQUESTS -+ (BOOL)appAllowsInsecureRequests { - // If the main bundle Info.plist key NSAppTransportSecurity is present, and it specifies - // NSAllowsArbitraryLoads, then we need to explicitly enforce secure schemes. -#if GTM_TARGET_SUPPORTS_APP_TRANSPORT_SECURITY - static BOOL allowsInsecureRequests; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - NSBundle *mainBundle = [NSBundle mainBundle]; - NSDictionary *appTransportSecurity = - [mainBundle objectForInfoDictionaryKey:@"NSAppTransportSecurity"]; - allowsInsecureRequests = - [[appTransportSecurity objectForKey:@"NSAllowsArbitraryLoads"] boolValue]; - }); - return allowsInsecureRequests; -#else - // For builds targeting iOS 8 or 10.10 and earlier, we want to require fetcher - // security checks. - return YES; -#endif // GTM_TARGET_SUPPORTS_APP_TRANSPORT_SECURITY -} -#else // GTM_ALLOW_INSECURE_REQUESTS -+ (BOOL)appAllowsInsecureRequests { - return YES; -} -#endif // !GTM_ALLOW_INSECURE_REQUESTS - - -- (instancetype)init { - return [self initWithRequest:nil configuration:nil]; -} - -- (instancetype)initWithRequest:(NSURLRequest *)request { - return [self initWithRequest:request configuration:nil]; -} - -- (instancetype)initWithRequest:(GTM_NULLABLE NSURLRequest *)request - configuration:(GTM_NULLABLE NSURLSessionConfiguration *)configuration { - self = [super init]; - if (self) { - if (![NSURLSession class]) { - Class oldFetcherClass = NSClassFromString(@"GTMHTTPFetcher"); - if (oldFetcherClass && request) { - self = [[oldFetcherClass alloc] initWithRequest:(NSURLRequest *)request]; - } else { - self = nil; - } - return self; - } -#if GTM_BACKGROUND_TASK_FETCHING - _backgroundTaskIdentifier = UIBackgroundTaskInvalid; -#endif - _request = [request mutableCopy]; - _configuration = configuration; - - NSData *bodyData = request.HTTPBody; - if (bodyData) { - _bodyLength = (int64_t)bodyData.length; - } else { - _bodyLength = NSURLSessionTransferSizeUnknown; - } - - _callbackQueue = dispatch_get_main_queue(); - _callbackGroup = dispatch_group_create(); - _delegateQueue = [NSOperationQueue mainQueue]; - - _minRetryInterval = InitialMinRetryInterval(); - _maxRetryInterval = kUnsetMaxRetryInterval; - - _taskPriority = -1.0f; // Valid values if set are 0.0...1.0. - - _testBlockAccumulateDataChunkCount = 1; - -#if !STRIP_GTM_FETCH_LOGGING - // Encourage developers to set the comment property or use - // setCommentWithFormat: by providing a default string. - _comment = @"(No fetcher comment set)"; -#endif - } - return self; -} - -- (id)copyWithZone:(NSZone *)zone { - // disallow use of fetchers in a copy property - [self doesNotRecognizeSelector:_cmd]; - return nil; -} - -- (NSString *)description { - NSString *requestStr = self.request.URL.description; - if (requestStr.length == 0) { - if (self.downloadResumeData.length > 0) { - requestStr = @""; - } else if (_wasCreatedFromBackgroundSession) { - requestStr = @""; - } else { - requestStr = @""; - } - } - return [NSString stringWithFormat:@"%@ %p (%@)", [self class], self, requestStr]; -} - -- (void)dealloc { - GTMSESSION_ASSERT_DEBUG(!_isStopNotificationNeeded, - @"unbalanced fetcher notification for %@", _request.URL); - [self forgetSessionIdentifierForFetcherWithoutSyncCheck]; - - // Note: if a session task or a retry timer was pending, then this instance - // would be retained by those so it wouldn't be getting dealloc'd, - // hence we don't need to stopFetch here -} - -#pragma mark - - -// Begin fetching the URL (or begin a retry fetch). The delegate is retained -// for the duration of the fetch connection. - -- (void)beginFetchWithCompletionHandler:(GTM_NULLABLE GTMSessionFetcherCompletionHandler)handler { - GTMSessionCheckNotSynchronized(self); - - _completionHandler = [handler copy]; - - // The user may have called setDelegate: earlier if they want to use other - // delegate-style callbacks during the fetch; otherwise, the delegate is nil, - // which is fine. - [self beginFetchMayDelay:YES mayAuthorize:YES]; -} - -- (GTMSessionFetcherCompletionHandler)completionHandlerWithTarget:(GTM_NULLABLE_TYPE id)target - didFinishSelector:(GTM_NULLABLE_TYPE SEL)finishedSelector { - GTMSessionFetcherAssertValidSelector(target, finishedSelector, @encode(GTMSessionFetcher *), - @encode(NSData *), @encode(NSError *), 0); - GTMSessionFetcherCompletionHandler completionHandler = ^(NSData *data, NSError *error) { - if (target && finishedSelector) { - id selfArg = self; // Placate ARC. - NSMethodSignature *sig = [target methodSignatureForSelector:finishedSelector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; - [invocation setSelector:(SEL)finishedSelector]; - [invocation setTarget:target]; - [invocation setArgument:&selfArg atIndex:2]; - [invocation setArgument:&data atIndex:3]; - [invocation setArgument:&error atIndex:4]; - [invocation invoke]; - } - }; - return completionHandler; -} - -- (void)beginFetchWithDelegate:(GTM_NULLABLE_TYPE id)target - didFinishSelector:(GTM_NULLABLE_TYPE SEL)finishedSelector { - GTMSessionCheckNotSynchronized(self); - - GTMSessionFetcherCompletionHandler handler = [self completionHandlerWithTarget:target - didFinishSelector:finishedSelector]; - [self beginFetchWithCompletionHandler:handler]; -} - -- (void)beginFetchMayDelay:(BOOL)mayDelay - mayAuthorize:(BOOL)mayAuthorize { - // This is the internal entry point for re-starting fetches. - GTMSessionCheckNotSynchronized(self); - - NSMutableURLRequest *fetchRequest = _request; // The request property is now externally immutable. - NSURL *fetchRequestURL = fetchRequest.URL; - NSString *priorSessionIdentifier = self.sessionIdentifier; - - // A utility block for creating error objects when we fail to start the fetch. - NSError *(^beginFailureError)(NSInteger) = ^(NSInteger code){ - NSString *urlString = fetchRequestURL.absoluteString; - NSDictionary *userInfo = @{ - NSURLErrorFailingURLStringErrorKey : (urlString ? urlString : @"(missing URL)") - }; - return [NSError errorWithDomain:kGTMSessionFetcherErrorDomain - code:code - userInfo:userInfo]; - }; - - // Catch delegate queue maxConcurrentOperationCount values other than 1, particularly - // NSOperationQueueDefaultMaxConcurrentOperationCount (-1), to avoid the additional complexity - // of simultaneous or out-of-order delegate callbacks. - GTMSESSION_ASSERT_DEBUG(_delegateQueue.maxConcurrentOperationCount == 1, - @"delegate queue %@ should support one concurrent operation, not %zd", - _delegateQueue.name, _delegateQueue.maxConcurrentOperationCount); - - if (!_initialBeginFetchDate) { - // This ivar is set only here on the initial beginFetch so need not be synchronized. - _initialBeginFetchDate = [[NSDate alloc] init]; - } - - if (self.sessionTask != nil) { - // If cached fetcher returned through fetcherWithSessionIdentifier:, then it's - // already begun, but don't consider this a failure, since the user need not know this. - if (self.sessionIdentifier != nil) { - return; - } - GTMSESSION_ASSERT_DEBUG(NO, @"Fetch object %@ being reused; this should never happen", self); - [self failToBeginFetchWithError:beginFailureError(GTMSessionFetcherErrorDownloadFailed)]; - return; - } - - if (fetchRequestURL == nil && !_downloadResumeData && !priorSessionIdentifier) { - GTMSESSION_ASSERT_DEBUG(NO, @"Beginning a fetch requires a request with a URL"); - [self failToBeginFetchWithError:beginFailureError(GTMSessionFetcherErrorDownloadFailed)]; - return; - } - - // We'll respect the user's request for a background session (unless this is - // an upload fetcher, which does its initial request foreground.) - self.usingBackgroundSession = self.useBackgroundSession && [self canFetchWithBackgroundSession]; - - NSURL *bodyFileURL = self.bodyFileURL; - if (bodyFileURL) { - NSError *fileCheckError; - if (![bodyFileURL checkResourceIsReachableAndReturnError:&fileCheckError]) { - // This assert fires when the file being uploaded no longer exists once - // the fetcher is ready to start the upload. - GTMSESSION_ASSERT_DEBUG_OR_LOG(0, @"Body file is unreachable: %@\n %@", - bodyFileURL.path, fileCheckError); - [self failToBeginFetchWithError:fileCheckError]; - return; - } - } - - NSString *requestScheme = fetchRequestURL.scheme; - BOOL isDataRequest = [requestScheme isEqual:@"data"]; - if (isDataRequest) { - // NSURLSession does not support data URLs in background sessions. -#if DEBUG - if (priorSessionIdentifier || self.sessionIdentifier) { - GTMSESSION_LOG_DEBUG(@"Converting background to foreground session for %@", - fetchRequest); - } -#endif - [self setSessionIdentifierInternal:nil]; - self.useBackgroundSession = NO; - } - -#if GTM_ALLOW_INSECURE_REQUESTS - BOOL shouldCheckSecurity = NO; -#else - BOOL shouldCheckSecurity = (fetchRequestURL != nil - && !isDataRequest - && [[self class] appAllowsInsecureRequests]); -#endif - - if (shouldCheckSecurity) { - // Allow https only for requests, unless overridden by the client. - // - // Non-https requests may too easily be snooped, so we disallow them by default. - // - // file: and data: schemes are usually safe if they are hardcoded in the client or provided - // by a trusted source, but since it's fairly rare to need them, it's safest to make clients - // explicitly whitelist them. - BOOL isSecure = - requestScheme != nil && [requestScheme caseInsensitiveCompare:@"https"] == NSOrderedSame; - if (!isSecure) { - BOOL allowRequest = NO; - NSString *host = fetchRequestURL.host; - - // Check schemes first. A file scheme request may be allowed here, or as a localhost request. - for (NSString *allowedScheme in _allowedInsecureSchemes) { - if (requestScheme != nil && - [requestScheme caseInsensitiveCompare:allowedScheme] == NSOrderedSame) { - allowRequest = YES; - break; - } - } - if (!allowRequest) { - // Check for localhost requests. Security checks only occur for non-https requests, so - // this check won't happen for an https request to localhost. - BOOL isLocalhostRequest = (host.length == 0 && [fetchRequestURL isFileURL]) || IsLocalhost(host); - if (isLocalhostRequest) { - if (self.allowLocalhostRequest) { - allowRequest = YES; - } else { - GTMSESSION_ASSERT_DEBUG(NO, @"Fetch request for localhost but fetcher" - @" allowLocalhostRequest is not set: %@", fetchRequestURL); - } - } else { - GTMSESSION_ASSERT_DEBUG(NO, @"Insecure fetch request has a scheme (%@)" - @" not found in fetcher allowedInsecureSchemes (%@): %@", - requestScheme, _allowedInsecureSchemes ?: @" @[] ", fetchRequestURL); - } - } - - if (!allowRequest) { -#if !DEBUG - NSLog(@"Insecure fetch disallowed for %@", fetchRequestURL.description ?: @"nil request URL"); -#endif - [self failToBeginFetchWithError:beginFailureError(GTMSessionFetcherErrorInsecureRequest)]; - return; - } - } // !isSecure - } // (requestURL != nil) && !isDataRequest - - if (self.cookieStorage == nil) { - self.cookieStorage = [[self class] staticCookieStorage]; - } - - BOOL isRecreatingSession = (self.sessionIdentifier != nil) && (fetchRequest == nil); - - self.canShareSession = !isRecreatingSession && !self.usingBackgroundSession; - - if (!self.session && self.canShareSession) { - self.session = [_service sessionForFetcherCreation]; - // If _session is nil, then the service's session creation semaphore will block - // until this fetcher invokes fetcherDidCreateSession: below, so this *must* invoke - // that method, even if the session fails to be created. - } - - if (!self.session) { - // Create a session. - if (!_configuration) { - if (priorSessionIdentifier || self.usingBackgroundSession) { - NSString *sessionIdentifier = priorSessionIdentifier; - if (!sessionIdentifier) { - sessionIdentifier = [self createSessionIdentifierWithMetadata:nil]; - } - NSMapTable *sessionIdentifierToFetcherMap = [[self class] sessionIdentifierToFetcherMap]; - [sessionIdentifierToFetcherMap setObject:self forKey:self.sessionIdentifier]; - -#if (TARGET_OS_TV \ - || TARGET_OS_WATCH \ - || (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_10) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10) \ - || (TARGET_OS_IPHONE && defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)) - // iOS 8/10.10 builds require the new backgroundSessionConfiguration method name. - _configuration = - [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:sessionIdentifier]; -#elif (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_10) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10) \ - || (TARGET_OS_IPHONE && defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0) - // Do a runtime check to avoid a deprecation warning about using - // +backgroundSessionConfiguration: on iOS 8. - if ([NSURLSessionConfiguration respondsToSelector:@selector(backgroundSessionConfigurationWithIdentifier:)]) { - // Running on iOS 8+/OS X 10.10+. - _configuration = - [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:sessionIdentifier]; - } else { - // Running on iOS 7/OS X 10.9. - _configuration = - [NSURLSessionConfiguration backgroundSessionConfiguration:sessionIdentifier]; - } -#else - // Building with an SDK earlier than iOS 8/OS X 10.10. - _configuration = - [NSURLSessionConfiguration backgroundSessionConfiguration:sessionIdentifier]; -#endif - self.usingBackgroundSession = YES; - self.canShareSession = NO; - } else { - _configuration = [NSURLSessionConfiguration ephemeralSessionConfiguration]; - } -#if !GTM_ALLOW_INSECURE_REQUESTS - _configuration.TLSMinimumSupportedProtocol = kTLSProtocol12; -#endif - } // !_configuration - _configuration.HTTPCookieStorage = self.cookieStorage; - - if (_configurationBlock) { - _configurationBlock(self, _configuration); - } - - id delegate = [_service sessionDelegate]; - if (!delegate || !self.canShareSession) { - delegate = self; - } - self.session = [NSURLSession sessionWithConfiguration:_configuration - delegate:delegate - delegateQueue:self.sessionDelegateQueue]; - GTMSESSION_ASSERT_DEBUG(self.session, @"Couldn't create session"); - - // Tell the service about the session created by this fetcher. This also signals the - // service's semaphore to allow other fetchers to request this session. - [_service fetcherDidCreateSession:self]; - - // If this assertion fires, the client probably tried to use a session identifier that was - // already used. The solution is to make the client use a unique identifier (or better yet let - // the session fetcher assign the identifier). - GTMSESSION_ASSERT_DEBUG(self.session.delegate == delegate, @"Couldn't assign delegate."); - - if (self.session) { - BOOL isUsingSharedDelegate = (delegate != self); - if (!isUsingSharedDelegate) { - _shouldInvalidateSession = YES; - } - } - } - - if (isRecreatingSession) { - _shouldInvalidateSession = YES; - - // Let's make sure there are tasks still running or if not that we get a callback from a - // completed one; otherwise, we assume the tasks failed. - // This is the observed behavior perhaps 25% of the time within the Simulator running 7.0.3 on - // exiting the app after starting an upload and relaunching the app if we manage to relaunch - // after the task has completed, but before the system relaunches us in the background. - [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, - NSArray *downloadTasks) { - if (dataTasks.count == 0 && uploadTasks.count == 0 && downloadTasks.count == 0) { - double const kDelayInSeconds = 1.0; // We should get progress indication or completion soon - dispatch_time_t checkForFeedbackDelay = - dispatch_time(DISPATCH_TIME_NOW, (int64_t)(kDelayInSeconds * NSEC_PER_SEC)); - dispatch_after(checkForFeedbackDelay, dispatch_get_main_queue(), ^{ - if (!self.sessionTask && !fetchRequest) { - // If our task and/or request haven't been restored, then we assume task feedback lost. - [self removePersistedBackgroundSessionFromDefaults]; - NSError *sessionError = - [NSError errorWithDomain:kGTMSessionFetcherErrorDomain - code:GTMSessionFetcherErrorBackgroundFetchFailed - userInfo:nil]; - [self failToBeginFetchWithError:sessionError]; - } - }); - } - }]; - return; - } - - self.downloadedData = nil; - self.downloadedLength = 0; - - if (_servicePriority == NSIntegerMin) { - mayDelay = NO; - } - if (mayDelay && _service) { - BOOL shouldFetchNow = [_service fetcherShouldBeginFetching:self]; - if (!shouldFetchNow) { - // The fetch is deferred, but will happen later. - // - // If this session is held by the fetcher service, clear the session now so that we don't - // assume it's still valid after the fetcher is restarted. - if (self.canShareSession) { - self.session = nil; - } - return; - } - } - - NSString *effectiveHTTPMethod = [fetchRequest valueForHTTPHeaderField:@"X-HTTP-Method-Override"]; - if (effectiveHTTPMethod == nil) { - effectiveHTTPMethod = fetchRequest.HTTPMethod; - } - BOOL isEffectiveHTTPGet = (effectiveHTTPMethod == nil - || [effectiveHTTPMethod isEqual:@"GET"]); - - BOOL needsUploadTask = (self.useUploadTask || self.bodyFileURL || self.bodyStreamProvider); - if (_bodyData || self.bodyStreamProvider || fetchRequest.HTTPBodyStream) { - if (isEffectiveHTTPGet) { - fetchRequest.HTTPMethod = @"POST"; - isEffectiveHTTPGet = NO; - } - - if (_bodyData) { - if (!needsUploadTask) { - fetchRequest.HTTPBody = _bodyData; - } -#if !STRIP_GTM_FETCH_LOGGING - } else if (fetchRequest.HTTPBodyStream) { - if ([self respondsToSelector:@selector(loggedInputStreamForInputStream:)]) { - fetchRequest.HTTPBodyStream = - [self performSelector:@selector(loggedInputStreamForInputStream:) - withObject:fetchRequest.HTTPBodyStream]; - } -#endif - } - } - - // We authorize after setting up the http method and body in the request - // because OAuth 1 may need to sign the request body - if (mayAuthorize && _authorizer && !isDataRequest) { - BOOL isAuthorized = [_authorizer isAuthorizedRequest:fetchRequest]; - if (!isAuthorized) { - // Authorization needed. - // - // If this session is held by the fetcher service, clear the session now so that we don't - // assume it's still valid after authorization completes. - if (self.canShareSession) { - self.session = nil; - } - - // Authorizing the request will recursively call this beginFetch:mayDelay: - // or failToBeginFetchWithError:. - [self authorizeRequest]; - return; - } - } - - // set the default upload or download retry interval, if necessary - if ([self isRetryEnabled] && self.maxRetryInterval <= 0) { - if (isEffectiveHTTPGet || [effectiveHTTPMethod isEqual:@"HEAD"]) { - [self setMaxRetryInterval:kDefaultMaxDownloadRetryInterval]; - } else { - [self setMaxRetryInterval:kDefaultMaxUploadRetryInterval]; - } - } - - // finally, start the connection - NSURLSessionTask *newSessionTask; - BOOL needsDataAccumulator = NO; - if (_downloadResumeData) { - newSessionTask = [_session downloadTaskWithResumeData:_downloadResumeData]; - GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, - @"Failed downloadTaskWithResumeData for %@, resume data %tu bytes", - _session, _downloadResumeData.length); - } else if (_destinationFileURL && !isDataRequest) { - newSessionTask = [_session downloadTaskWithRequest:fetchRequest]; - GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, @"Failed downloadTaskWithRequest for %@, %@", - _session, fetchRequest); - } else if (needsUploadTask) { - if (bodyFileURL) { - newSessionTask = [_session uploadTaskWithRequest:fetchRequest - fromFile:bodyFileURL]; - GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, - @"Failed uploadTaskWithRequest for %@, %@, file %@", - _session, fetchRequest, bodyFileURL.path); - } else if (self.bodyStreamProvider) { - newSessionTask = [_session uploadTaskWithStreamedRequest:fetchRequest]; - GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, - @"Failed uploadTaskWithStreamedRequest for %@, %@", - _session, fetchRequest); - } else { - GTMSESSION_ASSERT_DEBUG_OR_LOG(_bodyData != nil, - @"Upload task needs body data, %@", fetchRequest); - newSessionTask = [_session uploadTaskWithRequest:fetchRequest - fromData:(NSData * GTM_NONNULL_TYPE)_bodyData]; - GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, - @"Failed uploadTaskWithRequest for %@, %@, body data %tu bytes", - _session, fetchRequest, _bodyData.length); - } - needsDataAccumulator = YES; - } else { - newSessionTask = [_session dataTaskWithRequest:fetchRequest]; - needsDataAccumulator = YES; - GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, @"Failed dataTaskWithRequest for %@, %@", - _session, fetchRequest); - } - self.sessionTask = newSessionTask; - - if (!newSessionTask) { - // We shouldn't get here; if we're here, an earlier assertion should have fired to explain - // which session task creation failed. - [self failToBeginFetchWithError:beginFailureError(GTMSessionFetcherErrorTaskCreationFailed)]; - return; - } - - if (needsDataAccumulator && _accumulateDataBlock == nil) { - self.downloadedData = [NSMutableData data]; - } - if (_taskDescription) { - newSessionTask.taskDescription = _taskDescription; - } - if (_taskPriority >= 0) { -#if TARGET_OS_TV || TARGET_OS_WATCH - BOOL hasTaskPriority = YES; -#elif (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_10) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10) \ - || (TARGET_OS_IPHONE && defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0) - BOOL hasTaskPriority = YES; -#else - BOOL hasTaskPriority = [newSessionTask respondsToSelector:@selector(setPriority:)]; -#endif - if (hasTaskPriority) { - newSessionTask.priority = _taskPriority; - } - } - -#if GTM_DISABLE_FETCHER_TEST_BLOCK - GTMSESSION_ASSERT_DEBUG(_testBlock == nil && gGlobalTestBlock == nil, @"test blocks disabled"); - _testBlock = nil; -#else - if (!_testBlock) { - if (gGlobalTestBlock) { - // Note that the test block may pass nil for all of its response parameters, - // indicating that the fetch should actually proceed. This is useful when the - // global test block has been set, and the app is only testing a specific - // fetcher. The block simulation code will then resume the task. - _testBlock = gGlobalTestBlock; - } - } - _isUsingTestBlock = (_testBlock != nil); -#endif // GTM_DISABLE_FETCHER_TEST_BLOCK - -#if GTM_BACKGROUND_TASK_FETCHING - id app = [[self class] fetcherUIApplication]; - // Background tasks seem to interfere with out-of-process uploads and downloads. - if (app && !self.skipBackgroundTask && !self.useBackgroundSession) { - // Tell UIApplication that we want to continue even when the app is in the - // background. -#if DEBUG - NSString *bgTaskName = [NSString stringWithFormat:@"%@-%@", - [self class], fetchRequest.URL.host]; -#else - NSString *bgTaskName = @"GTMSessionFetcher"; -#endif - __block UIBackgroundTaskIdentifier bgTaskID = [app beginBackgroundTaskWithName:bgTaskName - expirationHandler:^{ - // Background task expiration callback - this block is always invoked by - // UIApplication on the main thread. - if (bgTaskID != UIBackgroundTaskInvalid) { - @synchronized(self) { - if (bgTaskID == self.backgroundTaskIdentifier) { - self.backgroundTaskIdentifier = UIBackgroundTaskInvalid; - } - } - [app endBackgroundTask:bgTaskID]; - } - }]; - @synchronized(self) { - self.backgroundTaskIdentifier = bgTaskID; - } - } -#endif - - if (!_initialRequestDate) { - _initialRequestDate = [[NSDate alloc] init]; - } - - // We don't expect to reach here even on retry or auth until a stop notification has been sent - // for the previous task, but we should ensure that we don't unbalance that. - GTMSESSION_ASSERT_DEBUG(!_isStopNotificationNeeded, @"Start notification without a prior stop"); - [self sendStopNotificationIfNeeded]; - - [self addPersistedBackgroundSessionToDefaults]; - - [self setStopNotificationNeeded:YES]; - - [self postNotificationOnMainThreadWithName:kGTMSessionFetcherStartedNotification - userInfo:nil - requireAsync:NO]; - - // The service needs to know our task if it is serving as NSURLSession delegate. - [_service fetcherDidBeginFetching:self]; - - if (_testBlock) { -#if !GTM_DISABLE_FETCHER_TEST_BLOCK - [self simulateFetchForTestBlock]; -#endif - } else { - // We resume the session task after posting the notification since the - // delegate callbacks may happen immediately if the fetch is started off - // the main thread or the session delegate queue is on a background thread, - // and we don't want to post a start notification after a premature finish - // of the session task. - [newSessionTask resume]; - } -} - -NSData * GTM_NULLABLE_TYPE GTMDataFromInputStream(NSInputStream *inputStream, NSError **outError) { - NSMutableData *data = [NSMutableData data]; - - [inputStream open]; - NSInteger numberOfBytesRead = 0; - while ([inputStream hasBytesAvailable]) { - uint8_t buffer[512]; - numberOfBytesRead = [inputStream read:buffer maxLength:sizeof(buffer)]; - if (numberOfBytesRead > 0) { - [data appendBytes:buffer length:(NSUInteger)numberOfBytesRead]; - } else { - break; - } - } - [inputStream close]; - NSError *streamError = inputStream.streamError; - - if (streamError) { - data = nil; - } - if (outError) { - *outError = streamError; - } - return data; -} - -#if !GTM_DISABLE_FETCHER_TEST_BLOCK - -- (void)simulateFetchForTestBlock { - // This is invoked on the same thread as the beginFetch method was. - // - // Callbacks will all occur on the callback queue. - _testBlock(self, ^(NSURLResponse *response, NSData *responseData, NSError *error) { - // Callback from test block. - if (response == nil && responseData == nil && error == nil) { - // Assume the fetcher should execute rather than be tested. - _testBlock = nil; - _isUsingTestBlock = NO; - [_sessionTask resume]; - return; - } - - GTMSessionFetcherBodyStreamProvider bodyStreamProvider = self.bodyStreamProvider; - if (bodyStreamProvider) { - bodyStreamProvider(^(NSInputStream *bodyStream){ - // Read from the input stream into an NSData buffer. We'll drain the stream - // explicitly on a background queue. - [self invokeOnCallbackQueue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0) - afterUserStopped:NO - block:^{ - NSError *streamError; - NSData *streamedData = GTMDataFromInputStream(bodyStream, &streamError); - - dispatch_async(dispatch_get_main_queue(), ^{ - // Continue callbacks on the main thread, since serial behavior - // is more reliable for tests. - [self simulateDataCallbacksForTestBlockWithBodyData:streamedData - response:response - responseData:responseData - error:(error ?: streamError)]; - }); - }]; - }); - } else { - // No input stream; use the supplied data or file URL. - NSURL *bodyFileURL = self.bodyFileURL; - if (bodyFileURL) { - NSError *readError; - _bodyData = [NSData dataWithContentsOfURL:bodyFileURL - options:NSDataReadingMappedIfSafe - error:&readError]; - error = readError; - } - - // No stream provider. - - // In real fetches, nothing happens until the run loop spins, so apps have leeway to - // set callbacks after they call beginFetch. We'll mirror that fetcher behavior by - // delaying callbacks here at least to the next spin of the run loop. That keeps - // immediate, synchronous setting of callback blocks after beginFetch working in tests. - dispatch_async(dispatch_get_main_queue(), ^{ - [self simulateDataCallbacksForTestBlockWithBodyData:_bodyData - response:response - responseData:responseData - error:error]; - }); - } - }); -} - -- (void)simulateByteTransferReportWithDataLength:(int64_t)totalDataLength - block:(GTMSessionFetcherSendProgressBlock)block { - // This utility method simulates transfer progress with up to three callbacks. - // It is used to call back to any of the progress blocks. - int64_t sendReportSize = totalDataLength / 3 + 1; - int64_t totalSent = 0; - while (totalSent < totalDataLength) { - int64_t bytesRemaining = totalDataLength - totalSent; - sendReportSize = MIN(sendReportSize, bytesRemaining); - totalSent += sendReportSize; - [self invokeOnCallbackQueueUnlessStopped:^{ - block(sendReportSize, totalSent, totalDataLength); - }]; - } -} - -- (void)simulateDataCallbacksForTestBlockWithBodyData:(NSData * GTM_NULLABLE_TYPE)bodyData - response:(NSURLResponse *)response - responseData:(NSData *)suppliedData - error:(NSError *)suppliedError { - __block NSData *responseData = suppliedData; - __block NSError *responseError = suppliedError; - - // This method does the test simulation of callbacks once the upload - // and download data are known. - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - // Get copies of ivars we'll access in async invocations. This simulation assumes - // they won't change during fetcher execution. - NSURL *destinationFileURL = _destinationFileURL; - GTMSessionFetcherWillRedirectBlock willRedirectBlock = _willRedirectBlock; - GTMSessionFetcherDidReceiveResponseBlock didReceiveResponseBlock = _didReceiveResponseBlock; - GTMSessionFetcherSendProgressBlock sendProgressBlock = _sendProgressBlock; - GTMSessionFetcherDownloadProgressBlock downloadProgressBlock = _downloadProgressBlock; - GTMSessionFetcherAccumulateDataBlock accumulateDataBlock = _accumulateDataBlock; - GTMSessionFetcherReceivedProgressBlock receivedProgressBlock = _receivedProgressBlock; - GTMSessionFetcherWillCacheURLResponseBlock willCacheURLResponseBlock = - _willCacheURLResponseBlock; - - // Simulate receipt of redirection. - if (willRedirectBlock) { - [self invokeOnCallbackUnsynchronizedQueueAfterUserStopped:YES - block:^{ - willRedirectBlock((NSHTTPURLResponse *)response, _request, - ^(NSURLRequest *redirectRequest) { - // For simulation, we'll assume the app will just continue. - }); - }]; - } - - // If the fetcher has a challenge block, simulate a challenge. - // - // It might be nice to eventually let the user determine which testBlock - // fetches get challenged rather than always executing the supplied - // challenge block. - if (_challengeBlock) { - [self invokeOnCallbackUnsynchronizedQueueAfterUserStopped:YES - block:^{ - if (_challengeBlock) { - NSURL *requestURL = _request.URL; - NSString *host = requestURL.host; - NSURLProtectionSpace *pspace = - [[NSURLProtectionSpace alloc] initWithHost:host - port:requestURL.port.integerValue - protocol:requestURL.scheme - realm:nil - authenticationMethod:NSURLAuthenticationMethodHTTPBasic]; - id unusedSender = - (id)[NSNull null]; - NSURLAuthenticationChallenge *challenge = - [[NSURLAuthenticationChallenge alloc] initWithProtectionSpace:pspace - proposedCredential:nil - previousFailureCount:0 - failureResponse:nil - error:nil - sender:unusedSender]; - _challengeBlock(self, challenge, ^(NSURLSessionAuthChallengeDisposition disposition, - NSURLCredential * GTM_NULLABLE_TYPE credential){ - // We could change the responseData and responseError based on the disposition, - // but it's easier for apps to just supply the expected data and error - // directly to the test block. So this simulation ignores the disposition. - }); - } - }]; - } - - // Simulate receipt of an initial response. - if (response && didReceiveResponseBlock) { - [self invokeOnCallbackUnsynchronizedQueueAfterUserStopped:YES - block:^{ - didReceiveResponseBlock(response, ^(NSURLSessionResponseDisposition desiredDisposition) { - // For simulation, we'll assume the disposition is to continue. - }); - }]; - } - - // Simulate reporting send progress. - if (sendProgressBlock) { - [self simulateByteTransferReportWithDataLength:(int64_t)bodyData.length - block:^(int64_t bytesSent, - int64_t totalBytesSent, - int64_t totalBytesExpectedToSend) { - // This is invoked on the callback queue unless stopped. - sendProgressBlock(bytesSent, totalBytesSent, totalBytesExpectedToSend); - }]; - } - - if (destinationFileURL) { - // Simulate download to file progress. - if (downloadProgressBlock) { - [self simulateByteTransferReportWithDataLength:(int64_t)responseData.length - block:^(int64_t bytesDownloaded, - int64_t totalBytesDownloaded, - int64_t totalBytesExpectedToDownload) { - // This is invoked on the callback queue unless stopped. - downloadProgressBlock(bytesDownloaded, totalBytesDownloaded, - totalBytesExpectedToDownload); - }]; - } - - NSError *writeError; - [responseData writeToURL:destinationFileURL - options:NSDataWritingAtomic - error:&writeError]; - if (writeError) { - // Tell the test code that writing failed. - responseError = writeError; - } - } else { - // Simulate download to NSData progress. - if ((accumulateDataBlock || receivedProgressBlock) && responseData) { - [self simulateByteTransferWithData:responseData - block:^(NSData *data, - int64_t bytesReceived, - int64_t totalBytesReceived, - int64_t totalBytesExpectedToReceive) { - // This is invoked on the callback queue unless stopped. - if (accumulateDataBlock) { - accumulateDataBlock(data); - } - - if (receivedProgressBlock) { - receivedProgressBlock(bytesReceived, totalBytesReceived); - } - }]; - } - - if (!accumulateDataBlock) { - _downloadedData = [responseData mutableCopy]; - } - - if (willCacheURLResponseBlock) { - // Simulate letting the client inspect and alter the cached response. - NSData *cachedData = responseData ?: [[NSData alloc] init]; // Always have non-nil data. - NSCachedURLResponse *cachedResponse = - [[NSCachedURLResponse alloc] initWithResponse:response - data:cachedData]; - [self invokeOnCallbackUnsynchronizedQueueAfterUserStopped:YES - block:^{ - willCacheURLResponseBlock(cachedResponse, ^(NSCachedURLResponse *responseToCache){ - // The app may provide an alternative response, or nil to defeat caching. - }); - }]; - } - } - _response = response; - } // @synchronized(self) - - NSOperationQueue *queue = self.sessionDelegateQueue; - [queue addOperationWithBlock:^{ - // Rather than invoke failToBeginFetchWithError: we want to simulate completion of - // a connection that started and ended, so we'll call down to finishWithError: - NSInteger status = responseError ? responseError.code : 200; - if (status >= 200 && status <= 399) { - [self finishWithError:nil shouldRetry:NO]; - } else { - [self shouldRetryNowForStatus:status - error:responseError - forceAssumeRetry:NO - response:^(BOOL shouldRetry) { - [self finishWithError:responseError shouldRetry:shouldRetry]; - }]; - } - }]; -} - -- (void)simulateByteTransferWithData:(NSData *)responseData - block:(GTMSessionFetcherSimulateByteTransferBlock)transferBlock { - // This utility method simulates transfering data to the client. It divides the data into at most - // "chunkCount" chunks and then passes each chunk along with a progress update to transferBlock. - // This function can be used with accumulateDataBlock or receivedProgressBlock. - - NSUInteger chunkCount = MAX(self.testBlockAccumulateDataChunkCount, (NSUInteger) 1); - NSUInteger totalDataLength = responseData.length; - NSUInteger sendDataSize = totalDataLength / chunkCount + 1; - NSUInteger totalSent = 0; - while (totalSent < totalDataLength) { - NSUInteger bytesRemaining = totalDataLength - totalSent; - sendDataSize = MIN(sendDataSize, bytesRemaining); - NSData *chunkData = [responseData subdataWithRange:NSMakeRange(totalSent, sendDataSize)]; - totalSent += sendDataSize; - [self invokeOnCallbackQueueUnlessStopped:^{ - transferBlock(chunkData, - (int64_t)sendDataSize, - (int64_t)totalSent, - (int64_t)totalDataLength); - }]; - } -} - -#endif // !GTM_DISABLE_FETCHER_TEST_BLOCK - -- (void)setSessionTask:(NSURLSessionTask *)sessionTask { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_sessionTask != sessionTask) { - _sessionTask = sessionTask; - if (_sessionTask) { - // Request could be nil on restoring this fetcher from a background session. - if (!_request) { - _request = [_sessionTask.originalRequest mutableCopy]; - } - } - } - } // @synchronized(self) -} - -- (NSURLSessionTask * GTM_NULLABLE_TYPE)sessionTask { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _sessionTask; - } // @synchronized(self) -} - -+ (NSUserDefaults *)fetcherUserDefaults { - static NSUserDefaults *gFetcherUserDefaults = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - Class fetcherUserDefaultsClass = NSClassFromString(@"GTMSessionFetcherUserDefaultsFactory"); - if (fetcherUserDefaultsClass) { - gFetcherUserDefaults = [fetcherUserDefaultsClass fetcherUserDefaults]; - } else { - gFetcherUserDefaults = [NSUserDefaults standardUserDefaults]; - } - }); - return gFetcherUserDefaults; -} - -- (void)addPersistedBackgroundSessionToDefaults { - NSString *sessionIdentifier = self.sessionIdentifier; - if (!sessionIdentifier) { - return; - } - NSArray *oldBackgroundSessions = [[self class] activePersistedBackgroundSessions]; - if ([oldBackgroundSessions containsObject:_sessionIdentifier]) { - return; - } - NSMutableArray *newBackgroundSessions = - [NSMutableArray arrayWithArray:oldBackgroundSessions]; - [newBackgroundSessions addObject:sessionIdentifier]; - GTM_LOG_BACKGROUND_SESSION(@"Add to background sessions: %@", newBackgroundSessions); - - NSUserDefaults *userDefaults = [[self class] fetcherUserDefaults]; - [userDefaults setObject:newBackgroundSessions - forKey:kGTMSessionFetcherPersistedDestinationKey]; - [userDefaults synchronize]; -} - -- (void)removePersistedBackgroundSessionFromDefaults { - NSString *sessionIdentifier = self.sessionIdentifier; - if (!sessionIdentifier) return; - - NSArray *oldBackgroundSessions = [[self class] activePersistedBackgroundSessions]; - if (!oldBackgroundSessions) { - return; - } - NSMutableArray *newBackgroundSessions = - [NSMutableArray arrayWithArray:oldBackgroundSessions]; - NSUInteger sessionIndex = [newBackgroundSessions indexOfObject:sessionIdentifier]; - if (sessionIndex == NSNotFound) { - return; - } - [newBackgroundSessions removeObjectAtIndex:sessionIndex]; - GTM_LOG_BACKGROUND_SESSION(@"Remove from background sessions: %@", newBackgroundSessions); - - NSUserDefaults *userDefaults = [[self class] fetcherUserDefaults]; - if (newBackgroundSessions.count == 0) { - [userDefaults removeObjectForKey:kGTMSessionFetcherPersistedDestinationKey]; - } else { - [userDefaults setObject:newBackgroundSessions - forKey:kGTMSessionFetcherPersistedDestinationKey]; - } - [userDefaults synchronize]; -} - -+ (GTM_NULLABLE NSArray *)activePersistedBackgroundSessions { - NSUserDefaults *userDefaults = [[self class] fetcherUserDefaults]; - NSArray *oldBackgroundSessions = - [userDefaults arrayForKey:kGTMSessionFetcherPersistedDestinationKey]; - if (oldBackgroundSessions.count == 0) { - return nil; - } - NSMutableArray *activeBackgroundSessions = nil; - NSMapTable *sessionIdentifierToFetcherMap = [self sessionIdentifierToFetcherMap]; - for (NSString *sessionIdentifier in oldBackgroundSessions) { - GTMSessionFetcher *fetcher = [sessionIdentifierToFetcherMap objectForKey:sessionIdentifier]; - if (fetcher) { - if (!activeBackgroundSessions) { - activeBackgroundSessions = [[NSMutableArray alloc] init]; - } - [activeBackgroundSessions addObject:sessionIdentifier]; - } - } - return activeBackgroundSessions; -} - -+ (NSArray *)fetchersForBackgroundSessions { - NSUserDefaults *userDefaults = [[self class] fetcherUserDefaults]; - NSArray *backgroundSessions = - [userDefaults arrayForKey:kGTMSessionFetcherPersistedDestinationKey]; - NSMapTable *sessionIdentifierToFetcherMap = [self sessionIdentifierToFetcherMap]; - NSMutableArray *fetchers = [NSMutableArray array]; - for (NSString *sessionIdentifier in backgroundSessions) { - GTMSessionFetcher *fetcher = [sessionIdentifierToFetcherMap objectForKey:sessionIdentifier]; - if (!fetcher) { - fetcher = [self fetcherWithSessionIdentifier:sessionIdentifier]; - GTMSESSION_ASSERT_DEBUG(fetcher != nil, - @"Unexpected invalid session identifier: %@", sessionIdentifier); - [fetcher beginFetchWithCompletionHandler:nil]; - } - GTM_LOG_BACKGROUND_SESSION(@"%@ restoring session %@ by creating fetcher %@ %p", - [self class], sessionIdentifier, fetcher, fetcher); - if (fetcher != nil) { - [fetchers addObject:fetcher]; - } - } - return fetchers; -} - -#if TARGET_OS_IPHONE -+ (void)application:(UIApplication *)application - handleEventsForBackgroundURLSession:(NSString *)identifier - completionHandler:(GTMSessionFetcherSystemCompletionHandler)completionHandler { - GTMSessionFetcher *fetcher = [self fetcherWithSessionIdentifier:identifier]; - if (fetcher != nil) { - fetcher.systemCompletionHandler = completionHandler; - } else { - GTM_LOG_BACKGROUND_SESSION(@"%@ did not create background session identifier: %@", - [self class], identifier); - } -} -#endif - -- (NSString * GTM_NULLABLE_TYPE)sessionIdentifier { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _sessionIdentifier; - } // @synchronized(self) -} - -- (void)setSessionIdentifier:(NSString *)sessionIdentifier { - GTMSESSION_ASSERT_DEBUG(sessionIdentifier != nil, @"Invalid session identifier"); - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - GTMSESSION_ASSERT_DEBUG(!_session, @"Unable to set session identifier after session created"); - _sessionIdentifier = [sessionIdentifier copy]; - _usingBackgroundSession = YES; - _canShareSession = NO; - [self restoreDefaultStateForSessionIdentifierMetadata]; - } // @synchronized(self) -} - -- (void)setSessionIdentifierInternal:(GTM_NULLABLE NSString *)sessionIdentifier { - // This internal method only does a synchronized set of the session identifier. - // It does not have side effects on the background session, shared session, or - // session identifier metadata. - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _sessionIdentifier = [sessionIdentifier copy]; - } // @synchronized(self) -} - -- (NSDictionary * GTM_NULLABLE_TYPE)sessionUserInfo { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_sessionUserInfo == nil) { - // We'll return the metadata dictionary with internal keys removed. This avoids the user - // re-using the userInfo dictionary later and accidentally including the internal keys. - NSMutableDictionary *metadata = [[self sessionIdentifierMetadataUnsynchronized] mutableCopy]; - NSSet *keysToRemove = [metadata keysOfEntriesPassingTest:^BOOL(id key, id obj, BOOL *stop) { - return [key hasPrefix:@"_"]; - }]; - [metadata removeObjectsForKeys:[keysToRemove allObjects]]; - if (metadata.count > 0) { - _sessionUserInfo = metadata; - } - } - return _sessionUserInfo; - } // @synchronized(self) -} - -- (void)setSessionUserInfo:(NSDictionary * GTM_NULLABLE_TYPE)dictionary { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - GTMSESSION_ASSERT_DEBUG(_sessionIdentifier == nil, @"Too late to assign userInfo"); - _sessionUserInfo = dictionary; - } // @synchronized(self) -} - -- (GTM_NULLABLE NSDictionary *)sessionIdentifierDefaultMetadata { - GTMSessionCheckSynchronized(self); - - NSMutableDictionary *defaultUserInfo = [[NSMutableDictionary alloc] init]; - if (_destinationFileURL) { - defaultUserInfo[kGTMSessionIdentifierDestinationFileURLMetadataKey] = - [_destinationFileURL absoluteString]; - } - if (_bodyFileURL) { - defaultUserInfo[kGTMSessionIdentifierBodyFileURLMetadataKey] = [_bodyFileURL absoluteString]; - } - return (defaultUserInfo.count > 0) ? defaultUserInfo : nil; -} - -- (void)restoreDefaultStateForSessionIdentifierMetadata { - GTMSessionCheckSynchronized(self); - - NSDictionary *metadata = [self sessionIdentifierMetadataUnsynchronized]; - NSString *destinationFileURLString = metadata[kGTMSessionIdentifierDestinationFileURLMetadataKey]; - if (destinationFileURLString) { - _destinationFileURL = [NSURL URLWithString:destinationFileURLString]; - GTM_LOG_BACKGROUND_SESSION(@"Restoring destination file URL: %@", _destinationFileURL); - } - NSString *bodyFileURLString = metadata[kGTMSessionIdentifierBodyFileURLMetadataKey]; - if (bodyFileURLString) { - _bodyFileURL = [NSURL URLWithString:bodyFileURLString]; - GTM_LOG_BACKGROUND_SESSION(@"Restoring body file URL: %@", _bodyFileURL); - } -} - -- (NSDictionary * GTM_NULLABLE_TYPE)sessionIdentifierMetadata { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return [self sessionIdentifierMetadataUnsynchronized]; - } -} - -- (NSDictionary * GTM_NULLABLE_TYPE)sessionIdentifierMetadataUnsynchronized { - GTMSessionCheckSynchronized(self); - - // Session Identifier format: "com.google.__ - if (!_sessionIdentifier) { - return nil; - } - NSScanner *metadataScanner = [NSScanner scannerWithString:_sessionIdentifier]; - [metadataScanner setCharactersToBeSkipped:nil]; - NSString *metadataString; - NSString *uuid; - if ([metadataScanner scanUpToString:@"_" intoString:NULL] && - [metadataScanner scanString:@"_" intoString:NULL] && - [metadataScanner scanUpToString:@"_" intoString:&uuid] && - [metadataScanner scanString:@"_" intoString:NULL] && - [metadataScanner scanUpToString:@"\n" intoString:&metadataString]) { - _sessionIdentifierUUID = uuid; - NSData *metadataData = [metadataString dataUsingEncoding:NSUTF8StringEncoding]; - NSError *error; - NSDictionary *metadataDict = - [NSJSONSerialization JSONObjectWithData:metadataData - options:0 - error:&error]; - GTM_LOG_BACKGROUND_SESSION(@"User Info from session identifier: %@ %@", - metadataDict, error ? error : @""); - return metadataDict; - } - return nil; -} - -- (NSString *)createSessionIdentifierWithMetadata:(NSDictionary * GTM_NULLABLE_TYPE)metadataToInclude { - NSString *result; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - // Session Identifier format: "com.google.__ - GTMSESSION_ASSERT_DEBUG(!_sessionIdentifier, @"Session identifier already created"); - _sessionIdentifierUUID = [[NSUUID UUID] UUIDString]; - _sessionIdentifier = - [NSString stringWithFormat:@"%@_%@", kGTMSessionIdentifierPrefix, _sessionIdentifierUUID]; - // Start with user-supplied keys so they cannot accidentally override the fetcher's keys. - NSMutableDictionary *metadataDict = - [NSMutableDictionary dictionaryWithDictionary:(NSDictionary * GTM_NONNULL_TYPE)_sessionUserInfo]; - - if (metadataToInclude) { - [metadataDict addEntriesFromDictionary:(NSDictionary *)metadataToInclude]; - } - NSDictionary *defaultMetadataDict = [self sessionIdentifierDefaultMetadata]; - if (defaultMetadataDict) { - [metadataDict addEntriesFromDictionary:defaultMetadataDict]; - } - if (metadataDict.count > 0) { - NSData *metadataData = [NSJSONSerialization dataWithJSONObject:metadataDict - options:0 - error:NULL]; - GTMSESSION_ASSERT_DEBUG(metadataData != nil, - @"Session identifier user info failed to convert to JSON"); - if (metadataData.length > 0) { - NSString *metadataString = [[NSString alloc] initWithData:metadataData - encoding:NSUTF8StringEncoding]; - _sessionIdentifier = - [_sessionIdentifier stringByAppendingFormat:@"_%@", metadataString]; - } - } - _didCreateSessionIdentifier = YES; - result = _sessionIdentifier; - } // @synchronized(self) - return result; -} - -- (void)failToBeginFetchWithError:(NSError *)error { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _hasStoppedFetching = YES; - } - - if (error == nil) { - error = [NSError errorWithDomain:kGTMSessionFetcherErrorDomain - code:GTMSessionFetcherErrorDownloadFailed - userInfo:nil]; - } - - [self invokeFetchCallbacksOnCallbackQueueWithData:nil - error:error]; - [self releaseCallbacks]; - - [_service fetcherDidStop:self]; - - self.authorizer = nil; -} - -+ (GTMSessionCookieStorage *)staticCookieStorage { - static GTMSessionCookieStorage *gCookieStorage = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - gCookieStorage = [[GTMSessionCookieStorage alloc] init]; - }); - return gCookieStorage; -} - -#if GTM_BACKGROUND_TASK_FETCHING - -- (void)endBackgroundTask { - // Whenever the connection stops or background execution expires, - // we need to tell UIApplication we're done. - UIBackgroundTaskIdentifier bgTaskID; - @synchronized(self) { - bgTaskID = self.backgroundTaskIdentifier; - if (bgTaskID != UIBackgroundTaskInvalid) { - self.backgroundTaskIdentifier = UIBackgroundTaskInvalid; - } - } - - if (bgTaskID != UIBackgroundTaskInvalid) { - id app = [[self class] fetcherUIApplication]; - [app endBackgroundTask:bgTaskID]; - } -} - -#endif // GTM_BACKGROUND_TASK_FETCHING - -- (void)authorizeRequest { - GTMSessionCheckNotSynchronized(self); - - id authorizer = self.authorizer; - SEL asyncAuthSel = @selector(authorizeRequest:delegate:didFinishSelector:); - if ([authorizer respondsToSelector:asyncAuthSel]) { - SEL callbackSel = @selector(authorizer:request:finishedWithError:); - NSMutableURLRequest *mutableRequest = [self.request mutableCopy]; - [authorizer authorizeRequest:mutableRequest - delegate:self - didFinishSelector:callbackSel]; - } else { - GTMSESSION_ASSERT_DEBUG(authorizer == nil, @"invalid authorizer for fetch"); - - // No authorizing possible, and authorizing happens only after any delay; - // just begin fetching - [self beginFetchMayDelay:NO - mayAuthorize:NO]; - } -} - -- (void)authorizer:(id)auth - request:(NSMutableURLRequest *)authorizedRequest - finishedWithError:(NSError *)error { - GTMSessionCheckNotSynchronized(self); - - if (error != nil) { - // We can't fetch without authorization - [self failToBeginFetchWithError:error]; - } else { - @synchronized(self) { - _request = authorizedRequest; - } - [self beginFetchMayDelay:NO - mayAuthorize:NO]; - } -} - - -- (BOOL)canFetchWithBackgroundSession { - // Subclasses may override. - return YES; -} - -// Returns YES if the fetcher has been started and has not yet stopped. -// -// Fetching includes waiting for authorization or for retry, waiting to be allowed by the -// service object to start the request, and actually fetching the request. -- (BOOL)isFetching { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return [self isFetchingUnsynchronized]; - } -} - -- (BOOL)isFetchingUnsynchronized { - GTMSessionCheckSynchronized(self); - - BOOL hasBegun = (_initialBeginFetchDate != nil); - return hasBegun && !_hasStoppedFetching; -} - -- (NSURLResponse * GTM_NULLABLE_TYPE)response { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSURLResponse *response = [self responseUnsynchronized]; - return response; - } // @synchronized(self) -} - -- (NSURLResponse * GTM_NULLABLE_TYPE)responseUnsynchronized { - GTMSessionCheckSynchronized(self); - - NSURLResponse *response = _sessionTask.response; - if (!response) response = _response; - return response; -} - -- (NSInteger)statusCode { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSInteger statusCode = [self statusCodeUnsynchronized]; - return statusCode; - } // @synchronized(self) -} - -- (NSInteger)statusCodeUnsynchronized { - GTMSessionCheckSynchronized(self); - - NSURLResponse *response = [self responseUnsynchronized]; - NSInteger statusCode; - - if ([response respondsToSelector:@selector(statusCode)]) { - statusCode = [(NSHTTPURLResponse *)response statusCode]; - } else { - // Default to zero, in hopes of hinting "Unknown" (we can't be - // sure that things are OK enough to use 200). - statusCode = 0; - } - return statusCode; -} - -- (NSDictionary * GTM_NULLABLE_TYPE)responseHeaders { - GTMSessionCheckNotSynchronized(self); - - NSURLResponse *response = self.response; - if ([response respondsToSelector:@selector(allHeaderFields)]) { - NSDictionary *headers = [(NSHTTPURLResponse *)response allHeaderFields]; - return headers; - } - return nil; -} - -- (NSDictionary * GTM_NULLABLE_TYPE)responseHeadersUnsynchronized { - GTMSessionCheckSynchronized(self); - - NSURLResponse *response = [self responseUnsynchronized]; - if ([response respondsToSelector:@selector(allHeaderFields)]) { - NSDictionary *headers = [(NSHTTPURLResponse *)response allHeaderFields]; - return headers; - } - return nil; -} - -- (void)releaseCallbacks { - // Avoid releasing blocks in the sync section since objects dealloc'd by - // the blocks being released may call back into the fetcher or fetcher - // service. - dispatch_queue_t NS_VALID_UNTIL_END_OF_SCOPE holdCallbackQueue; - GTMSessionFetcherCompletionHandler NS_VALID_UNTIL_END_OF_SCOPE holdCompletionHandler; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - holdCallbackQueue = _callbackQueue; - holdCompletionHandler = _completionHandler; - - _callbackQueue = nil; - _completionHandler = nil; // Setter overridden in upload. Setter assumed to be used externally. - } - - // Set local callback pointers to nil here rather than let them release at the end of the scope - // to make any problems due to the blocks being released be a bit more obvious in a stack trace. - holdCallbackQueue = nil; - holdCompletionHandler = nil; - - self.configurationBlock = nil; - self.didReceiveResponseBlock = nil; - self.challengeBlock = nil; - self.willRedirectBlock = nil; - self.sendProgressBlock = nil; - self.receivedProgressBlock = nil; - self.downloadProgressBlock = nil; - self.accumulateDataBlock = nil; - self.willCacheURLResponseBlock = nil; - self.retryBlock = nil; - self.testBlock = nil; - self.resumeDataBlock = nil; -} - -- (void)forgetSessionIdentifierForFetcher { - GTMSessionCheckSynchronized(self); - [self forgetSessionIdentifierForFetcherWithoutSyncCheck]; -} - -- (void)forgetSessionIdentifierForFetcherWithoutSyncCheck { - // This should be called inside a @synchronized block (except during dealloc.) - if (_sessionIdentifier) { - NSMapTable *sessionIdentifierToFetcherMap = [[self class] sessionIdentifierToFetcherMap]; - [sessionIdentifierToFetcherMap removeObjectForKey:_sessionIdentifier]; - _sessionIdentifier = nil; - _didCreateSessionIdentifier = NO; - } -} - -// External stop method -- (void)stopFetching { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - // Prevent enqueued callbacks from executing. - _userStoppedFetching = YES; - } // @synchronized(self) - [self stopFetchReleasingCallbacks:YES]; -} - -// Cancel the fetch of the URL that's currently in progress. -// -// If shouldReleaseCallbacks is NO then the fetch will be retried so the callbacks -// need to still be retained. -- (void)stopFetchReleasingCallbacks:(BOOL)shouldReleaseCallbacks { - [self removePersistedBackgroundSessionFromDefaults]; - - id service; - NSMutableURLRequest *request; - - // If the task or the retry timer is all that's retaining the fetcher, - // we want to be sure this instance survives stopping at least long enough for - // the stack to unwind. - __autoreleasing GTMSessionFetcher *holdSelf = self; - - BOOL hasCanceledTask = NO; - - [holdSelf destroyRetryTimer]; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _hasStoppedFetching = YES; - - service = _service; - request = _request; - - if (_sessionTask) { - // In case cancelling the task or session calls this recursively, we want - // to ensure that we'll only release the task and delegate once, - // so first set _sessionTask to nil - // - // This may be called in a callback from the task, so use autorelease to avoid - // releasing the task in its own callback. - __autoreleasing NSURLSessionTask *oldTask = _sessionTask; - if (!_isUsingTestBlock) { - _response = _sessionTask.response; - } - _sessionTask = nil; - - if ([oldTask state] != NSURLSessionTaskStateCompleted) { - // For download tasks, when the fetch is stopped, we may provide resume data that can - // be used to create a new session. - BOOL mayResume = (_resumeDataBlock - && [oldTask respondsToSelector:@selector(cancelByProducingResumeData:)]); - if (!mayResume) { - [oldTask cancel]; - // A side effect of stopping the task is that URLSession:task:didCompleteWithError: - // will be invoked asynchronously on the delegate queue. - } else { - void (^resumeBlock)(NSData *) = _resumeDataBlock; - _resumeDataBlock = nil; - - // Save callbackQueue since releaseCallbacks clears it. - dispatch_queue_t callbackQueue = _callbackQueue; - dispatch_group_enter(_callbackGroup); - [(NSURLSessionDownloadTask *)oldTask cancelByProducingResumeData:^(NSData *resumeData) { - [self invokeOnCallbackQueue:callbackQueue - afterUserStopped:YES - block:^{ - resumeBlock(resumeData); - dispatch_group_leave(_callbackGroup); - }]; - }]; - } - hasCanceledTask = YES; - } - } - - // If the task was canceled, wait until the URLSession:task:didCompleteWithError: to call - // finishTasksAndInvalidate, since calling it immediately tends to crash, see radar 18471901. - if (_session) { - BOOL shouldInvalidate = _shouldInvalidateSession; -#if TARGET_OS_IPHONE - // Don't invalidate if we've got a systemCompletionHandler, since - // URLSessionDidFinishEventsForBackgroundURLSession: won't be called if invalidated. - shouldInvalidate = shouldInvalidate && !self.systemCompletionHandler; -#endif - if (shouldInvalidate) { - __autoreleasing NSURLSession *oldSession = _session; - _session = nil; - - if (!hasCanceledTask) { - [oldSession finishTasksAndInvalidate]; - } else { - _sessionNeedingInvalidation = oldSession; - } - } - } - } // @synchronized(self) - - // send the stopped notification - [self sendStopNotificationIfNeeded]; - - [_authorizer stopAuthorizationForRequest:request]; - - if (shouldReleaseCallbacks) { - [self releaseCallbacks]; - - self.authorizer = nil; - } - - [service fetcherDidStop:self]; - -#if GTM_BACKGROUND_TASK_FETCHING - [self endBackgroundTask]; -#endif -} - -- (void)setStopNotificationNeeded:(BOOL)flag { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _isStopNotificationNeeded = flag; - } // @synchronized(self) -} - -- (void)sendStopNotificationIfNeeded { - BOOL sendNow = NO; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_isStopNotificationNeeded) { - _isStopNotificationNeeded = NO; - sendNow = YES; - } - } // @synchronized(self) - - if (sendNow) { - [self postNotificationOnMainThreadWithName:kGTMSessionFetcherStoppedNotification - userInfo:nil - requireAsync:NO]; - } -} - -- (void)retryFetch { - [self stopFetchReleasingCallbacks:NO]; - - GTMSessionFetcherCompletionHandler completionHandler; - - // A retry will need a configuration with a fresh session identifier. - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_sessionIdentifier && _didCreateSessionIdentifier) { - [self forgetSessionIdentifierForFetcher]; - _configuration = nil; - } - - if (_canShareSession) { - // Force a grab of the current session from the fetcher service in case - // the service's old one has become invalid. - _session = nil; - } - - completionHandler = _completionHandler; - } // @synchronized(self) - - [self beginFetchWithCompletionHandler:completionHandler]; -} - -- (BOOL)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds { - // Uncovered in upload fetcher testing, because the chunk fetcher is being waited on, and gets - // released by the upload code. The uploader just holds onto it with an ivar, and that gets - // nilled in the chunk fetcher callback. - // Used once in while loop just to avoid unused variable compiler warning. - __autoreleasing GTMSessionFetcher *holdSelf = self; - - NSDate *giveUpDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; - - BOOL shouldSpinRunLoop = ([NSThread isMainThread] && - (!self.callbackQueue - || self.callbackQueue == dispatch_get_main_queue())); - BOOL expired = NO; - - // Loop until the callbacks have been called and released, and until - // the connection is no longer pending, until there are no callback dispatches - // in flight, or until the timeout has expired. - int64_t delta = (int64_t)(100 * NSEC_PER_MSEC); // 100 ms - while (1) { - BOOL isTaskInProgress = (holdSelf->_sessionTask - && [_sessionTask state] != NSURLSessionTaskStateCompleted); - BOOL needsToCallCompletion = (_completionHandler != nil); - BOOL isCallbackInProgress = (_callbackGroup - && dispatch_group_wait(_callbackGroup, dispatch_time(DISPATCH_TIME_NOW, delta))); - - if (!isTaskInProgress && !needsToCallCompletion && !isCallbackInProgress) break; - - expired = ([giveUpDate timeIntervalSinceNow] < 0); - if (expired) { - GTMSESSION_LOG_DEBUG(@"GTMSessionFetcher waitForCompletionWithTimeout:%0.1f expired -- " - @"%@%@%@", timeoutInSeconds, - isTaskInProgress ? @"taskInProgress " : @"", - needsToCallCompletion ? @"needsToCallCompletion " : @"", - isCallbackInProgress ? @"isCallbackInProgress" : @""); - break; - } - - // Run the current run loop 1/1000 of a second to give the networking - // code a chance to work - const NSTimeInterval kSpinInterval = 0.001; - if (shouldSpinRunLoop) { - NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:kSpinInterval]; - [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; - } else { - [NSThread sleepForTimeInterval:kSpinInterval]; - } - } - return !expired; -} - -+ (void)setGlobalTestBlock:(GTMSessionFetcherTestBlock GTM_NULLABLE_TYPE)block { -#if GTM_DISABLE_FETCHER_TEST_BLOCK - GTMSESSION_ASSERT_DEBUG(block == nil, @"test blocks disabled"); -#endif - gGlobalTestBlock = [block copy]; -} - -#if TARGET_OS_IPHONE - -static GTM_NULLABLE_TYPE id gSubstituteUIApp; - -+ (void)setSubstituteUIApplication:(nullable id)app { - gSubstituteUIApp = app; -} - -+ (nullable id)substituteUIApplication { - return gSubstituteUIApp; -} - -+ (nullable id)fetcherUIApplication { - id app = gSubstituteUIApp; - if (app) return app; - - // iOS App extensions should not call [UIApplication sharedApplication], even - // if UIApplication responds to it. - - static Class applicationClass = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - BOOL isAppExtension = [[[NSBundle mainBundle] bundlePath] hasSuffix:@".appex"]; - if (!isAppExtension) { - Class cls = NSClassFromString(@"UIApplication"); - if (cls && [cls respondsToSelector:NSSelectorFromString(@"sharedApplication")]) { - applicationClass = cls; - } - } - }); - - if (applicationClass) { - app = (id)[applicationClass sharedApplication]; - } - return app; -} -#endif // TARGET_OS_IPHONE - -#pragma mark NSURLSession Delegate Methods - -// NSURLSession documentation indicates that redirectRequest can be passed to the handler -// but empirically redirectRequest lacks the HTTP body, so passing it will break POSTs. -// Instead, we construct a new request, a copy of the original, with overrides from the -// redirect. - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task -willPerformHTTPRedirection:(NSHTTPURLResponse *)redirectResponse - newRequest:(NSURLRequest *)redirectRequest - completionHandler:(void (^)(NSURLRequest * GTM_NULLABLE_TYPE))handler { - [self setSessionTask:task]; - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ task:%@ willPerformHTTPRedirection:%@ newRequest:%@", - [self class], self, session, task, redirectResponse, redirectRequest); - - if ([self userStoppedFetching]) { - handler(nil); - return; - } - if (redirectRequest && redirectResponse) { - // Copy the original request, including the body. - NSURLRequest *originalRequest = self.request; - NSMutableURLRequest *newRequest = [originalRequest mutableCopy]; - - // Disallow scheme changes (say, from https to http). - NSURL *originalRequestURL = originalRequest.URL; - NSURL *redirectRequestURL = redirectRequest.URL; - - NSString *originalScheme = originalRequestURL.scheme; - NSString *redirectScheme = redirectRequestURL.scheme; - - if (originalScheme != nil - && [originalScheme caseInsensitiveCompare:@"http"] == NSOrderedSame - && redirectScheme != nil - && [redirectScheme caseInsensitiveCompare:@"https"] == NSOrderedSame) { - // Allow the change from http to https. - } else { - // Disallow any other scheme changes. - redirectScheme = originalScheme; - } - // The new requests's URL overrides the original's URL. - NSURLComponents *components = [NSURLComponents componentsWithURL:redirectRequestURL - resolvingAgainstBaseURL:NO]; - components.scheme = redirectScheme; - NSURL *newURL = components.URL; - [newRequest setURL:newURL]; - - // Any headers in the redirect override headers in the original. - NSDictionary *redirectHeaders = redirectRequest.allHTTPHeaderFields; - for (NSString *key in redirectHeaders) { - NSString *value = [redirectHeaders objectForKey:key]; - [newRequest setValue:value forHTTPHeaderField:key]; - } - - redirectRequest = newRequest; - - // Log the response we just received - [self setResponse:redirectResponse]; - [self logNowWithError:nil]; - - GTMSessionFetcherWillRedirectBlock willRedirectBlock = self.willRedirectBlock; - if (willRedirectBlock) { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - [self invokeOnCallbackQueueAfterUserStopped:YES - block:^{ - willRedirectBlock(redirectResponse, redirectRequest, ^(NSURLRequest *clientRequest) { - - // Update the request for future logging. - [self updateMutableRequest:[clientRequest mutableCopy]]; - - handler(clientRequest); - }); - }]; - } // @synchronized(self) - return; - } - // Continues here if the client did not provide a redirect block. - - // Update the request for future logging. - [self updateMutableRequest:[redirectRequest mutableCopy]]; - } - handler(redirectRequest); -} - -- (void)URLSession:(NSURLSession *)session - dataTask:(NSURLSessionDataTask *)dataTask -didReceiveResponse:(NSURLResponse *)response - completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))handler { - [self setSessionTask:dataTask]; - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ dataTask:%@ didReceiveResponse:%@", - [self class], self, session, dataTask, response); - void (^accumulateAndFinish)(NSURLSessionResponseDisposition) = - ^(NSURLSessionResponseDisposition dispositionValue) { - // This method is called when the server has determined that it - // has enough information to create the NSURLResponse - // it can be called multiple times, for example in the case of a - // redirect, so each time we reset the data. - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - BOOL hadPreviousData = _downloadedLength > 0; - - [_downloadedData setLength:0]; - _downloadedLength = 0; - - if (hadPreviousData && (dispositionValue != NSURLSessionResponseCancel)) { - // Tell the accumulate block to discard prior data. - GTMSessionFetcherAccumulateDataBlock accumulateBlock = _accumulateDataBlock; - if (accumulateBlock) { - [self invokeOnCallbackQueueUnlessStopped:^{ - accumulateBlock(nil); - }]; - } - } - } // @synchronized(self) - handler(dispositionValue); - }; - - GTMSessionFetcherDidReceiveResponseBlock receivedResponseBlock; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - receivedResponseBlock = _didReceiveResponseBlock; - if (receivedResponseBlock) { - // We will ultimately need to call back to NSURLSession's handler with the disposition value - // for this delegate method even if the user has stopped the fetcher. - [self invokeOnCallbackQueueAfterUserStopped:YES - block:^{ - receivedResponseBlock(response, ^(NSURLSessionResponseDisposition desiredDisposition) { - accumulateAndFinish(desiredDisposition); - }); - }]; - } - } // @synchronized(self) - - if (receivedResponseBlock == nil) { - accumulateAndFinish(NSURLSessionResponseAllow); - } -} - -- (void)URLSession:(NSURLSession *)session - dataTask:(NSURLSessionDataTask *)dataTask -didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask { - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ dataTask:%@ didBecomeDownloadTask:%@", - [self class], self, session, dataTask, downloadTask); - [self setSessionTask:downloadTask]; -} - - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task -didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge - completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, - NSURLCredential * GTM_NULLABLE_TYPE credential))handler { - [self setSessionTask:task]; - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ task:%@ didReceiveChallenge:%@", - [self class], self, session, task, challenge); - - GTMSessionFetcherChallengeBlock challengeBlock = self.challengeBlock; - if (challengeBlock) { - // The fetcher user has provided custom challenge handling. - // - // We will ultimately need to call back to NSURLSession's handler with the disposition value - // for this delegate method even if the user has stopped the fetcher. - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - [self invokeOnCallbackQueueAfterUserStopped:YES - block:^{ - challengeBlock(self, challenge, handler); - }]; - } - } else { - // No challenge block was provided by the client. - [self respondToChallenge:challenge - completionHandler:handler]; - } -} - -- (void)respondToChallenge:(NSURLAuthenticationChallenge *)challenge - completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, - NSURLCredential * GTM_NULLABLE_TYPE credential))handler { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSInteger previousFailureCount = [challenge previousFailureCount]; - if (previousFailureCount <= 2) { - NSURLProtectionSpace *protectionSpace = [challenge protectionSpace]; - NSString *authenticationMethod = [protectionSpace authenticationMethod]; - if ([authenticationMethod isEqual:NSURLAuthenticationMethodServerTrust]) { - // SSL. - // - // Background sessions seem to require an explicit check of the server trust object - // rather than default handling. - SecTrustRef serverTrust = challenge.protectionSpace.serverTrust; - if (serverTrust == NULL) { - // No server trust information is available. - handler(NSURLSessionAuthChallengePerformDefaultHandling, nil); - } else { - // Server trust information is available. - void (^callback)(SecTrustRef, BOOL) = ^(SecTrustRef trustRef, BOOL allow){ - if (allow) { - NSURLCredential *trustCredential = [NSURLCredential credentialForTrust:trustRef]; - handler(NSURLSessionAuthChallengeUseCredential, trustCredential); - } else { - GTMSESSION_LOG_DEBUG(@"Cancelling authentication challenge for %@", _request.URL); - handler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil); - } - }; - if (_allowInvalidServerCertificates) { - callback(serverTrust, YES); - } else { - [[self class] evaluateServerTrust:serverTrust - forRequest:_request - completionHandler:callback]; - } - } - return; - } - - NSURLCredential *credential = _credential; - - if ([[challenge protectionSpace] isProxy] && _proxyCredential != nil) { - credential = _proxyCredential; - } - - if (credential) { - handler(NSURLSessionAuthChallengeUseCredential, credential); - } else { - // The credential is still nil; tell the OS to use the default handling. This is needed - // for things that can come out of the keychain (proxies, client certificates, etc.). - // - // Note: Looking up a credential with NSURLCredentialStorage's - // defaultCredentialForProtectionSpace: is *not* the same invoking the handler with - // NSURLSessionAuthChallengePerformDefaultHandling. In the case of - // NSURLAuthenticationMethodClientCertificate, you can get nil back from - // NSURLCredentialStorage, while using this code path instead works. - handler(NSURLSessionAuthChallengePerformDefaultHandling, nil); - } - - } else { - // We've failed auth 3 times. The completion handler will be called with code - // NSURLErrorCancelled. - handler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil); - } - } // @synchronized(self) -} - -// Validate the certificate chain. -// -// This may become a public method if it appears to be useful to users. -+ (void)evaluateServerTrust:(SecTrustRef)serverTrust - forRequest:(NSURLRequest *)request - completionHandler:(void (^)(SecTrustRef trustRef, BOOL allow))handler { - // Retain the trust object to avoid a SecTrustEvaluate() crash on iOS 7. - CFRetain(serverTrust); - - // Evaluate the certificate chain. - // - // The delegate queue may be the main thread. Trust evaluation could cause some - // blocking network activity, so we must evaluate async, as documented at - // https://developer.apple.com/library/ios/technotes/tn2232/ - // - // We must also avoid multiple uses of the trust object, per docs: - // "It is not safe to call this function concurrently with any other function that uses - // the same trust management object, or to re-enter this function for the same trust - // management object." - // - // SecTrustEvaluateAsync both does sync execution of Evaluate and calls back on the - // queue passed to it, according to at sources in - // http://www.opensource.apple.com/source/libsecurity_keychain/libsecurity_keychain-55050.9/lib/SecTrust.cpp - // It would require a global serial queue to ensure the evaluate happens only on a - // single thread at a time, so we'll stick with using SecTrustEvaluate on a background - // thread. - dispatch_queue_t evaluateBackgroundQueue = - dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - dispatch_async(evaluateBackgroundQueue, ^{ - // It looks like the implementation of SecTrustEvaluate() on Mac grabs a global lock, - // so it may be redundant for us to also lock, but it's easy to synchronize here - // anyway. - SecTrustResultType trustEval = kSecTrustResultInvalid; - BOOL shouldAllow; - OSStatus trustError; - @synchronized([GTMSessionFetcher class]) { - GTMSessionMonitorSynchronized([GTMSessionFetcher class]); - - trustError = SecTrustEvaluate(serverTrust, &trustEval); - } - if (trustError != errSecSuccess) { - GTMSESSION_LOG_DEBUG(@"Error %d evaluating trust for %@", - (int)trustError, request); - shouldAllow = NO; - } else { - // Having a trust level "unspecified" by the user is the usual result, described at - // https://developer.apple.com/library/mac/qa/qa1360 - if (trustEval == kSecTrustResultUnspecified - || trustEval == kSecTrustResultProceed) { - shouldAllow = YES; - } else { - shouldAllow = NO; - GTMSESSION_LOG_DEBUG(@"Challenge SecTrustResultType %u for %@, properties: %@", - trustEval, request.URL.host, - CFBridgingRelease(SecTrustCopyProperties(serverTrust))); - } - } - handler(serverTrust, shouldAllow); - - CFRelease(serverTrust); - }); -} - -- (void)invokeOnCallbackQueueUnlessStopped:(void (^)(void))block { - [self invokeOnCallbackQueueAfterUserStopped:NO - block:block]; -} - -- (void)invokeOnCallbackQueueAfterUserStopped:(BOOL)afterStopped - block:(void (^)(void))block { - GTMSessionCheckSynchronized(self); - - [self invokeOnCallbackUnsynchronizedQueueAfterUserStopped:afterStopped - block:block]; -} - -- (void)invokeOnCallbackUnsynchronizedQueueAfterUserStopped:(BOOL)afterStopped - block:(void (^)(void))block { - // testBlock simulation code may not be synchronizing when this is invoked. - [self invokeOnCallbackQueue:_callbackQueue - afterUserStopped:afterStopped - block:block]; -} - -- (void)invokeOnCallbackQueue:(dispatch_queue_t)callbackQueue - afterUserStopped:(BOOL)afterStopped - block:(void (^)(void))block { - if (callbackQueue) { - dispatch_group_async(_callbackGroup, callbackQueue, ^{ - if (!afterStopped) { - NSDate *serviceStoppedAllDate = [_service stoppedAllFetchersDate]; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - // Avoid a race between stopFetching and the callback. - if (_userStoppedFetching) { - return; - } - - // Also avoid calling back if the service has stopped all fetchers - // since this one was created. The fetcher may have stopped before - // stopAllFetchers was invoked, so _userStoppedFetching wasn't set, - // but the app still won't expect the callback to fire after - // the service's stopAllFetchers was invoked. - if (serviceStoppedAllDate - && [_initialBeginFetchDate compare:serviceStoppedAllDate] != NSOrderedDescending) { - // stopAllFetchers was called after this fetcher began. - return; - } - } // @synchronized(self) - } - block(); - }); - } -} - -- (void)invokeFetchCallbacksOnCallbackQueueWithData:(GTM_NULLABLE NSData *)data - error:(GTM_NULLABLE NSError *)error { - // Callbacks will be released in the method stopFetchReleasingCallbacks: - GTMSessionFetcherCompletionHandler handler; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - handler = _completionHandler; - - if (handler) { - [self invokeOnCallbackQueueUnlessStopped:^{ - handler(data, error); - - // Post a notification, primarily to allow code to collect responses for - // testing. - // - // The observing code is not likely on the fetcher's callback - // queue, so this posts explicitly to the main queue. - NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; - if (data) { - userInfo[kGTMSessionFetcherCompletionDataKey] = data; - } - if (error) { - userInfo[kGTMSessionFetcherCompletionErrorKey] = error; - } - [self postNotificationOnMainThreadWithName:kGTMSessionFetcherCompletionInvokedNotification - userInfo:userInfo - requireAsync:NO]; - }]; - } - } // @synchronized(self) -} - -- (void)postNotificationOnMainThreadWithName:(NSString *)noteName - userInfo:(GTM_NULLABLE NSDictionary *)userInfo - requireAsync:(BOOL)requireAsync { - dispatch_block_t postBlock = ^{ - [[NSNotificationCenter defaultCenter] postNotificationName:noteName - object:self - userInfo:userInfo]; - }; - - if ([NSThread isMainThread] && !requireAsync) { - // Post synchronously for compatibility with older code using the fetcher. - - // Avoid calling out to other code from inside a sync block to avoid risk - // of a deadlock or of recursive sync. - GTMSessionCheckNotSynchronized(self); - - postBlock(); - } else { - dispatch_async(dispatch_get_main_queue(), postBlock); - } -} - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)uploadTask - needNewBodyStream:(void (^)(NSInputStream * GTM_NULLABLE_TYPE bodyStream))completionHandler { - [self setSessionTask:uploadTask]; - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ task:%@ needNewBodyStream:", - [self class], self, session, uploadTask); - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - GTMSessionFetcherBodyStreamProvider provider = _bodyStreamProvider; -#if !STRIP_GTM_FETCH_LOGGING - if ([self respondsToSelector:@selector(loggedStreamProviderForStreamProvider:)]) { - provider = [self performSelector:@selector(loggedStreamProviderForStreamProvider:) - withObject:provider]; - } -#endif - if (provider) { - [self invokeOnCallbackQueueUnlessStopped:^{ - provider(completionHandler); - }]; - } else { - GTMSESSION_ASSERT_DEBUG(NO, @"NSURLSession expects a stream provider"); - - completionHandler(nil); - } - } // @synchronized(self) -} - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task - didSendBodyData:(int64_t)bytesSent - totalBytesSent:(int64_t)totalBytesSent -totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend { - [self setSessionTask:task]; - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ task:%@ didSendBodyData:%lld" - @" totalBytesSent:%lld totalBytesExpectedToSend:%lld", - [self class], self, session, task, bytesSent, totalBytesSent, - totalBytesExpectedToSend); - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (!_sendProgressBlock) { - return; - } - // We won't hold on to send progress block; it's ok to not send it if the upload finishes. - [self invokeOnCallbackQueueUnlessStopped:^{ - GTMSessionFetcherSendProgressBlock progressBlock; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - progressBlock = _sendProgressBlock; - } - if (progressBlock) { - progressBlock(bytesSent, totalBytesSent, totalBytesExpectedToSend); - } - }]; - } // @synchronized(self) -} - -- (void)URLSession:(NSURLSession *)session - dataTask:(NSURLSessionDataTask *)dataTask - didReceiveData:(NSData *)data { - [self setSessionTask:dataTask]; - NSUInteger bufferLength = data.length; - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ dataTask:%@ didReceiveData:%p (%llu bytes)", - [self class], self, session, dataTask, data, - (unsigned long long)bufferLength); - if (bufferLength == 0) { - // Observed on completing an out-of-process upload. - return; - } - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - GTMSessionFetcherAccumulateDataBlock accumulateBlock = _accumulateDataBlock; - if (accumulateBlock) { - // Let the client accumulate the data. - _downloadedLength += bufferLength; - [self invokeOnCallbackQueueUnlessStopped:^{ - accumulateBlock(data); - }]; - } else if (!_userStoppedFetching) { - // Append to the mutable data buffer unless the fetch has been cancelled. - - // Resumed upload tasks may not yet have a data buffer. - if (_downloadedData == nil) { - // Using NSClassFromString for iOS 6 compatibility. - GTMSESSION_ASSERT_DEBUG( - ![dataTask isKindOfClass:NSClassFromString(@"NSURLSessionDownloadTask")], - @"Resumed download tasks should not receive data bytes"); - _downloadedData = [[NSMutableData alloc] init]; - } - - [_downloadedData appendData:data]; - _downloadedLength = (int64_t)_downloadedData.length; - - // We won't hold on to receivedProgressBlock here; it's ok to not send - // it if the transfer finishes. - if (_receivedProgressBlock) { - [self invokeOnCallbackQueueUnlessStopped:^{ - GTMSessionFetcherReceivedProgressBlock progressBlock; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - progressBlock = _receivedProgressBlock; - } - if (progressBlock) { - progressBlock((int64_t)bufferLength, _downloadedLength); - } - }]; - } - } - } // @synchronized(self) -} - -- (void)URLSession:(NSURLSession *)session - dataTask:(NSURLSessionDataTask *)dataTask - willCacheResponse:(NSCachedURLResponse *)proposedResponse - completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler { - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ dataTask:%@ willCacheResponse:%@ %@", - [self class], self, session, dataTask, - proposedResponse, proposedResponse.response); - GTMSessionFetcherWillCacheURLResponseBlock callback; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - callback = _willCacheURLResponseBlock; - - if (callback) { - [self invokeOnCallbackQueueAfterUserStopped:YES - block:^{ - callback(proposedResponse, completionHandler); - }]; - } - } // @synchronized(self) - if (!callback) { - completionHandler(proposedResponse); - } -} - - -- (void)URLSession:(NSURLSession *)session - downloadTask:(NSURLSessionDownloadTask *)downloadTask - didWriteData:(int64_t)bytesWritten - totalBytesWritten:(int64_t)totalBytesWritten -totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite { - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ downloadTask:%@ didWriteData:%lld" - @" bytesWritten:%lld totalBytesExpectedToWrite:%lld", - [self class], self, session, downloadTask, bytesWritten, - totalBytesWritten, totalBytesExpectedToWrite); - [self setSessionTask:downloadTask]; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if ((totalBytesExpectedToWrite != NSURLSessionTransferSizeUnknown) && - (totalBytesExpectedToWrite < totalBytesWritten)) { - // Have observed cases were bytesWritten == totalBytesExpectedToWrite, - // but totalBytesWritten > totalBytesExpectedToWrite, so setting to unkown in these cases. - totalBytesExpectedToWrite = NSURLSessionTransferSizeUnknown; - } - // We won't hold on to download progress block during the enqueue; - // it's ok to not send it if the upload finishes. - - [self invokeOnCallbackQueueUnlessStopped:^{ - GTMSessionFetcherDownloadProgressBlock progressBlock; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - progressBlock = _downloadProgressBlock; - } - if (progressBlock) { - progressBlock(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); - } - }]; - } // @synchronized(self) -} - -- (void)URLSession:(NSURLSession *)session - downloadTask:(NSURLSessionDownloadTask *)downloadTask - didResumeAtOffset:(int64_t)fileOffset -expectedTotalBytes:(int64_t)expectedTotalBytes { - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ downloadTask:%@ didResumeAtOffset:%lld" - @" expectedTotalBytes:%lld", - [self class], self, session, downloadTask, fileOffset, - expectedTotalBytes); - [self setSessionTask:downloadTask]; -} - -- (void)URLSession:(NSURLSession *)session - downloadTask:(NSURLSessionDownloadTask *)downloadTask -didFinishDownloadingToURL:(NSURL *)downloadLocationURL { - // Download may have relaunched app, so update _sessionTask. - [self setSessionTask:downloadTask]; - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ downloadTask:%@ didFinishDownloadingToURL:%@", - [self class], self, session, downloadTask, downloadLocationURL); - NSNumber *fileSizeNum; - [downloadLocationURL getResourceValue:&fileSizeNum - forKey:NSURLFileSizeKey - error:NULL]; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSURL *destinationURL = _destinationFileURL; - - _downloadedLength = fileSizeNum.longLongValue; - - // Overwrite any previous file at the destination URL. - NSFileManager *fileMgr = [NSFileManager defaultManager]; - NSError *removeError; - if (![fileMgr removeItemAtURL:destinationURL error:&removeError] - && removeError.code != NSFileNoSuchFileError) { - GTMSESSION_LOG_DEBUG(@"Could not remove previous file at %@ due to %@", - downloadLocationURL.path, removeError); - } - - NSInteger statusCode = [self statusCodeUnsynchronized]; - if (statusCode < 200 || statusCode > 399) { - // In OS X 10.11, the response body is written to a file even on a server - // status error. For convenience of the fetcher client, we'll skip saving the - // downloaded body to the destination URL so that clients do not need to know - // to delete the file following fetch errors. A downside of this is that - // the server may have included error details in the response body, and - // abandoning the downloaded file here means that the details from the - // body are not available to the fetcher client. - GTMSESSION_LOG_DEBUG(@"Abandoning download due to status %zd, file %@", - statusCode, downloadLocationURL.path); - } else { - NSError *moveError; - NSURL *destinationFolderURL = [destinationURL URLByDeletingLastPathComponent]; - BOOL didMoveDownload = NO; - if ([fileMgr createDirectoryAtURL:destinationFolderURL - withIntermediateDirectories:YES - attributes:nil - error:&moveError]) { - didMoveDownload = [fileMgr moveItemAtURL:downloadLocationURL - toURL:destinationURL - error:&moveError]; - } - if (!didMoveDownload) { - _downloadFinishedError = moveError; - } - GTM_LOG_BACKGROUND_SESSION(@"%@ %p Moved download from \"%@\" to \"%@\" %@", - [self class], self, - downloadLocationURL.path, destinationURL.path, - error ? error : @""); - } - } // @synchronized(self) -} - -/* Sent as the last message related to a specific task. Error may be - * nil, which implies that no error occurred and this task is complete. - */ -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task -didCompleteWithError:(NSError *)error { - [self setSessionTask:task]; - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ task:%@ didCompleteWithError:%@", - [self class], self, session, task, error); - - NSInteger status = self.statusCode; - BOOL forceAssumeRetry = NO; - BOOL succeeded = NO; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - -#if !GTM_DISABLE_FETCHER_TEST_BLOCK - // The task is never resumed when a testBlock is used. When the session is destroyed, - // we should ignore the callback, since the testBlock support code itself invokes - // shouldRetryNowForStatus: and finishWithError:shouldRetry: - if (_isUsingTestBlock) return; -#endif - - if (error == nil) { - error = _downloadFinishedError; - } - succeeded = (error == nil && status >= 0 && status < 300); - if (succeeded) { - // Succeeded. - _bodyLength = task.countOfBytesSent; - } - } // @synchronized(self) - - if (succeeded) { - [self finishWithError:nil shouldRetry:NO]; - return; - } - // For background redirects, no delegate method is called, so we cannot restore a stripped - // Authorization header, so if a 403 ("Forbidden") was generated due to a missing OAuth 2 header, - // set the current request's URL to the redirected URL, so we in effect restore the Authorization - // header. - if ((status == 403) && self.usingBackgroundSession) { - NSURL *redirectURL = self.response.URL; - NSURLRequest *request = self.request; - if (![request.URL isEqual:redirectURL]) { - NSString *authorizationHeader = [request.allHTTPHeaderFields objectForKey:@"Authorization"]; - if (authorizationHeader != nil) { - NSMutableURLRequest *mutableRequest = [request mutableCopy]; - mutableRequest.URL = redirectURL; - [self updateMutableRequest:mutableRequest]; - // Avoid assuming the session is still valid. - self.session = nil; - forceAssumeRetry = YES; - } - } - } - - // If invalidating the session was deferred in stopFetchReleasingCallbacks: then do it now. - NSURLSession *oldSession = self.sessionNeedingInvalidation; - if (oldSession) { - [self setSessionNeedingInvalidation:NULL]; - [oldSession finishTasksAndInvalidate]; - } - - // Failed. - [self shouldRetryNowForStatus:status - error:error - forceAssumeRetry:forceAssumeRetry - response:^(BOOL shouldRetry) { - [self finishWithError:error shouldRetry:shouldRetry]; - }]; -} - -#if TARGET_OS_IPHONE -- (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session { - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSessionDidFinishEventsForBackgroundURLSession:%@", - [self class], self, session); - [self removePersistedBackgroundSessionFromDefaults]; - - GTMSessionFetcherSystemCompletionHandler handler; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - handler = self.systemCompletionHandler; - self.systemCompletionHandler = nil; - } // @synchronized(self) - if (handler) { - GTM_LOG_BACKGROUND_SESSION(@"%@ %p Calling system completionHandler", [self class], self); - handler(); - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSURLSession *oldSession = _session; - _session = nil; - if (_shouldInvalidateSession) { - [oldSession finishTasksAndInvalidate]; - } - } // @synchronized(self) - } -} -#endif - -- (void)URLSession:(NSURLSession *)session didBecomeInvalidWithError:(GTM_NULLABLE NSError *)error { - // This may happen repeatedly for retries. On authentication callbacks, the retry - // may begin before the prior session sends the didBecomeInvalid delegate message. - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ didBecomeInvalidWithError:%@", - [self class], self, session, error); - if (session == (NSURLSession *)self.session) { - GTM_LOG_SESSION_DELEGATE(@" Unexpected retained invalid session: %@", session); - self.session = nil; - } -} - -- (void)finishWithError:(GTM_NULLABLE NSError *)error shouldRetry:(BOOL)shouldRetry { - [self removePersistedBackgroundSessionFromDefaults]; - - BOOL shouldStopFetching = YES; - NSData *downloadedData = nil; -#if !STRIP_GTM_FETCH_LOGGING - BOOL shouldDeferLogging = NO; -#endif - BOOL shouldBeginRetryTimer = NO; - NSInteger status = [self statusCode]; - NSURL *destinationURL = self.destinationFileURL; - - BOOL fetchSucceeded = (error == nil && status >= 0 && status < 300); - -#if !STRIP_GTM_FETCH_LOGGING - if (!fetchSucceeded) { - if (!shouldDeferLogging && !self.hasLoggedError) { - [self logNowWithError:error]; - self.hasLoggedError = YES; - } - } -#endif // !STRIP_GTM_FETCH_LOGGING - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - -#if !STRIP_GTM_FETCH_LOGGING - shouldDeferLogging = _deferResponseBodyLogging; -#endif - if (fetchSucceeded) { - // Success - if ((_downloadedData.length > 0) && (destinationURL != nil)) { - // Overwrite any previous file at the destination URL. - NSFileManager *fileMgr = [NSFileManager defaultManager]; - [fileMgr removeItemAtURL:destinationURL - error:NULL]; - NSURL *destinationFolderURL = [destinationURL URLByDeletingLastPathComponent]; - BOOL didMoveDownload = NO; - if ([fileMgr createDirectoryAtURL:destinationFolderURL - withIntermediateDirectories:YES - attributes:nil - error:&error]) { - didMoveDownload = [_downloadedData writeToURL:destinationURL - options:NSDataWritingAtomic - error:&error]; - } - if (didMoveDownload) { - _downloadedData = nil; - } else { - _downloadFinishedError = error; - } - } - downloadedData = _downloadedData; - } else { - // Unsuccessful with error or status over 300. Retry or notify the delegate of failure - if (shouldRetry) { - // Retrying. - shouldBeginRetryTimer = YES; - shouldStopFetching = NO; - } else { - if (error == nil) { - // Create an error. - NSDictionary *userInfo = nil; - if (_downloadedData.length > 0) { - userInfo = @{ kGTMSessionFetcherStatusDataKey : _downloadedData }; - } - error = [NSError errorWithDomain:kGTMSessionFetcherStatusDomain - code:status - userInfo:userInfo]; - } else { - // If the error had resume data, and the client supplied a resume block, pass the - // data to the client. - void (^resumeBlock)(NSData *) = _resumeDataBlock; - _resumeDataBlock = nil; - if (resumeBlock) { - NSData *resumeData = [error.userInfo objectForKey:NSURLSessionDownloadTaskResumeData]; - if (resumeData) { - [self invokeOnCallbackQueueAfterUserStopped:YES block:^{ - resumeBlock(resumeData); - }]; - } - } - } - if (_downloadedData.length > 0) { - downloadedData = _downloadedData; - } - // If the error occurred after retries, report the number and duration of the - // retries. This provides a clue to a developer looking at the error description - // that the fetcher did retry before failing with this error. - if (_retryCount > 0) { - NSMutableDictionary *userInfoWithRetries = - [NSMutableDictionary dictionaryWithDictionary:(NSDictionary *)error.userInfo]; - NSTimeInterval timeSinceInitialRequest = -[_initialRequestDate timeIntervalSinceNow]; - [userInfoWithRetries setObject:@(timeSinceInitialRequest) - forKey:kGTMSessionFetcherElapsedIntervalWithRetriesKey]; - [userInfoWithRetries setObject:@(_retryCount) - forKey:kGTMSessionFetcherNumberOfRetriesDoneKey]; - error = [NSError errorWithDomain:(NSString *)error.domain - code:error.code - userInfo:userInfoWithRetries]; - } - } - } - } // @synchronized(self) - - if (shouldBeginRetryTimer) { - [self beginRetryTimer]; - } - - // We want to send the stop notification before calling the delegate's - // callback selector, since the callback selector may release all of - // the fetcher properties that the client is using to track the fetches. - // - // We'll also stop now so that, to any observers watching the notifications, - // it doesn't look like our wait for a retry (which may be long, - // 30 seconds or more) is part of the network activity. - [self sendStopNotificationIfNeeded]; - - if (shouldStopFetching) { - [self invokeFetchCallbacksOnCallbackQueueWithData:downloadedData - error:error]; - // The upload subclass doesn't want to release callbacks until upload chunks have completed. - BOOL shouldRelease = [self shouldReleaseCallbacksUponCompletion]; - [self stopFetchReleasingCallbacks:shouldRelease]; - } - -#if !STRIP_GTM_FETCH_LOGGING - // _hasLoggedError is only set by this method - if (!shouldDeferLogging && !_hasLoggedError) { - [self logNowWithError:error]; - } -#endif -} - -- (BOOL)shouldReleaseCallbacksUponCompletion { - // A subclass can override this to keep callbacks around after the - // connection has finished successfully - return YES; -} - -- (void)logNowWithError:(GTM_NULLABLE NSError *)error { - GTMSessionCheckNotSynchronized(self); - - // If the logging category is available, then log the current request, - // response, data, and error - if ([self respondsToSelector:@selector(logFetchWithError:)]) { - [self performSelector:@selector(logFetchWithError:) withObject:error]; - } -} - -#pragma mark Retries - -- (BOOL)isRetryError:(NSError *)error { - struct RetryRecord { - __unsafe_unretained NSString *const domain; - NSInteger code; - }; - - struct RetryRecord retries[] = { - { kGTMSessionFetcherStatusDomain, 408 }, // request timeout - { kGTMSessionFetcherStatusDomain, 502 }, // failure gatewaying to another server - { kGTMSessionFetcherStatusDomain, 503 }, // service unavailable - { kGTMSessionFetcherStatusDomain, 504 }, // request timeout - { NSURLErrorDomain, NSURLErrorTimedOut }, - { NSURLErrorDomain, NSURLErrorNetworkConnectionLost }, - { nil, 0 } - }; - - // NSError's isEqual always returns false for equal but distinct instances - // of NSError, so we have to compare the domain and code values explicitly - NSString *domain = error.domain; - NSInteger code = error.code; - for (int idx = 0; retries[idx].domain != nil; idx++) { - if (code == retries[idx].code && [domain isEqual:retries[idx].domain]) { - return YES; - } - } - return NO; -} - -// shouldRetryNowForStatus:error: responds with YES if the user has enabled retries -// and the status or error is one that is suitable for retrying. "Suitable" -// means either the isRetryError:'s list contains the status or error, or the -// user's retry block is present and returns YES when called, or the -// authorizer may be able to fix. -- (void)shouldRetryNowForStatus:(NSInteger)status - error:(NSError *)error - forceAssumeRetry:(BOOL)forceAssumeRetry - response:(GTMSessionFetcherRetryResponse)response { - // Determine if a refreshed authorizer may avoid an authorization error - BOOL willRetry = NO; - - // We assume _authorizer is immutable after beginFetch, and _hasAttemptedAuthRefresh is modified - // only in this method, and this method is invoked on the serial delegate queue. - // - // We want to avoid calling the authorizer from inside a sync block. - BOOL isFirstAuthError = (_authorizer != nil - && !_hasAttemptedAuthRefresh - && status == GTMSessionFetcherStatusUnauthorized); // 401 - - BOOL hasPrimed = NO; - if (isFirstAuthError) { - if ([_authorizer respondsToSelector:@selector(primeForRefresh)]) { - hasPrimed = [_authorizer primeForRefresh]; - } - } - - BOOL shouldRetryForAuthRefresh = NO; - if (hasPrimed) { - shouldRetryForAuthRefresh = YES; - _hasAttemptedAuthRefresh = YES; - [self updateRequestValue:nil forHTTPHeaderField:@"Authorization"]; - } - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - BOOL shouldDoRetry = [self isRetryEnabledUnsynchronized]; - if (shouldDoRetry && ![self hasRetryAfterInterval]) { - - // Determine if we're doing exponential backoff retries - shouldDoRetry = [self nextRetryIntervalUnsynchronized] < _maxRetryInterval; - - if (shouldDoRetry) { - // If an explicit max retry interval was set, we expect repeated backoffs to take - // up to roughly twice that for repeated fast failures. If the initial attempt is - // already more than 3 times the max retry interval, then failures have taken a long time - // (such as from network timeouts) so don't retry again to avoid the app becoming - // unexpectedly unresponsive. - if (_maxRetryInterval > 0) { - NSTimeInterval maxAllowedIntervalBeforeRetry = _maxRetryInterval * 3; - NSTimeInterval timeSinceInitialRequest = -[_initialRequestDate timeIntervalSinceNow]; - if (timeSinceInitialRequest > maxAllowedIntervalBeforeRetry) { - shouldDoRetry = NO; - } - } - } - } - BOOL canRetry = shouldRetryForAuthRefresh || forceAssumeRetry || shouldDoRetry; - if (canRetry) { - NSDictionary *userInfo = nil; - if (_downloadedData.length > 0) { - userInfo = @{ kGTMSessionFetcherStatusDataKey : _downloadedData }; - } - NSError *statusError = [NSError errorWithDomain:kGTMSessionFetcherStatusDomain - code:status - userInfo:userInfo]; - if (error == nil) { - error = statusError; - } - willRetry = shouldRetryForAuthRefresh || - forceAssumeRetry || - [self isRetryError:error] || - ((error != statusError) && [self isRetryError:statusError]); - - // If the user has installed a retry callback, consult that. - GTMSessionFetcherRetryBlock retryBlock = _retryBlock; - if (retryBlock) { - [self invokeOnCallbackQueueUnlessStopped:^{ - retryBlock(willRetry, error, response); - }]; - return; - } - } - } // @synchronized(self) - response(willRetry); -} - -- (BOOL)hasRetryAfterInterval { - GTMSessionCheckSynchronized(self); - - NSDictionary *responseHeaders = [self responseHeadersUnsynchronized]; - NSString *retryAfterValue = [responseHeaders valueForKey:@"Retry-After"]; - return (retryAfterValue != nil); -} - -- (NSTimeInterval)retryAfterInterval { - GTMSessionCheckSynchronized(self); - - NSDictionary *responseHeaders = [self responseHeadersUnsynchronized]; - NSString *retryAfterValue = [responseHeaders valueForKey:@"Retry-After"]; - if (retryAfterValue == nil) { - return 0; - } - // Retry-After formatted as HTTP-date | delta-seconds - // Reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html - NSDateFormatter *rfc1123DateFormatter = [[NSDateFormatter alloc] init]; - rfc1123DateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; - rfc1123DateFormatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"]; - rfc1123DateFormatter.dateFormat = @"EEE',' dd MMM yyyy HH':'mm':'ss z"; - NSDate *retryAfterDate = [rfc1123DateFormatter dateFromString:retryAfterValue]; - NSTimeInterval retryAfterInterval = (retryAfterDate != nil) ? - retryAfterDate.timeIntervalSinceNow : retryAfterValue.intValue; - retryAfterInterval = MAX(0, retryAfterInterval); - return retryAfterInterval; -} - -- (void)beginRetryTimer { - if (![NSThread isMainThread]) { - // Defer creating and starting the timer until we're on the main thread to ensure it has - // a run loop. - dispatch_group_async(_callbackGroup, dispatch_get_main_queue(), ^{ - [self beginRetryTimer]; - }); - return; - } - - [self destroyRetryTimer]; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSTimeInterval nextInterval = [self nextRetryIntervalUnsynchronized]; - NSTimeInterval maxInterval = _maxRetryInterval; - NSTimeInterval newInterval = MIN(nextInterval, (maxInterval > 0 ? maxInterval : DBL_MAX)); - NSTimeInterval newIntervalTolerance = (newInterval / 10) > 1.0 ?: 1.0; - - _lastRetryInterval = newInterval; - - _retryTimer = [NSTimer timerWithTimeInterval:newInterval - target:self - selector:@selector(retryTimerFired:) - userInfo:nil - repeats:NO]; - _retryTimer.tolerance = newIntervalTolerance; - [[NSRunLoop mainRunLoop] addTimer:_retryTimer - forMode:NSDefaultRunLoopMode]; - } // @synchronized(self) - - [self postNotificationOnMainThreadWithName:kGTMSessionFetcherRetryDelayStartedNotification - userInfo:nil - requireAsync:NO]; -} - -- (void)retryTimerFired:(NSTimer *)timer { - [self destroyRetryTimer]; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _retryCount++; - } // @synchronized(self) - - NSOperationQueue *queue = self.sessionDelegateQueue; - [queue addOperationWithBlock:^{ - [self retryFetch]; - }]; -} - -- (void)destroyRetryTimer { - BOOL shouldNotify = NO; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_retryTimer) { - [_retryTimer invalidate]; - _retryTimer = nil; - shouldNotify = YES; - } - } - - if (shouldNotify) { - [self postNotificationOnMainThreadWithName:kGTMSessionFetcherRetryDelayStoppedNotification - userInfo:nil - requireAsync:NO]; - } -} - -- (NSUInteger)retryCount { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _retryCount; - } // @synchronized(self) -} - -- (NSTimeInterval)nextRetryInterval { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSTimeInterval interval = [self nextRetryIntervalUnsynchronized]; - return interval; - } // @synchronized(self) -} - -- (NSTimeInterval)nextRetryIntervalUnsynchronized { - GTMSessionCheckSynchronized(self); - - NSInteger statusCode = [self statusCodeUnsynchronized]; - if ((statusCode == 503) && [self hasRetryAfterInterval]) { - NSTimeInterval secs = [self retryAfterInterval]; - return secs; - } - // The next wait interval is the factor (2.0) times the last interval, - // but never less than the minimum interval. - NSTimeInterval secs = _lastRetryInterval * _retryFactor; - if (_maxRetryInterval > 0) { - secs = MIN(secs, _maxRetryInterval); - } - secs = MAX(secs, _minRetryInterval); - - return secs; -} - -- (NSTimer *)retryTimer { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _retryTimer; - } // @synchronized(self) -} - -- (BOOL)isRetryEnabled { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _isRetryEnabled; - } // @synchronized(self) -} - -- (BOOL)isRetryEnabledUnsynchronized { - GTMSessionCheckSynchronized(self); - - return _isRetryEnabled; -} - -- (void)setRetryEnabled:(BOOL)flag { - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (flag && !_isRetryEnabled) { - // We defer initializing these until the user calls setRetryEnabled - // to avoid using the random number generator if it's not needed. - // However, this means min and max intervals for this fetcher are reset - // as a side effect of calling setRetryEnabled. - // - // Make an initial retry interval random between 1.0 and 2.0 seconds - _minRetryInterval = InitialMinRetryInterval(); - _maxRetryInterval = kUnsetMaxRetryInterval; - _retryFactor = 2.0; - _lastRetryInterval = 0.0; - } - _isRetryEnabled = flag; - } // @synchronized(self) -}; - -- (NSTimeInterval)maxRetryInterval { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _maxRetryInterval; - } // @synchronized(self) -} - -- (void)setMaxRetryInterval:(NSTimeInterval)secs { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (secs > 0) { - _maxRetryInterval = secs; - } else { - _maxRetryInterval = kUnsetMaxRetryInterval; - } - } // @synchronized(self) -} - -- (double)minRetryInterval { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _minRetryInterval; - } // @synchronized(self) -} - -- (void)setMinRetryInterval:(NSTimeInterval)secs { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (secs > 0) { - _minRetryInterval = secs; - } else { - // Set min interval to a random value between 1.0 and 2.0 seconds - // so that if multiple clients start retrying at the same time, they'll - // repeat at different times and avoid overloading the server - _minRetryInterval = InitialMinRetryInterval(); - } - } // @synchronized(self) - -} - -#pragma mark iOS System Completion Handlers - -#if TARGET_OS_IPHONE -static NSMutableDictionary *gSystemCompletionHandlers = nil; - -- (GTM_NULLABLE GTMSessionFetcherSystemCompletionHandler)systemCompletionHandler { - return [[self class] systemCompletionHandlerForSessionIdentifier:_sessionIdentifier]; -} - -- (void)setSystemCompletionHandler:(GTM_NULLABLE GTMSessionFetcherSystemCompletionHandler)systemCompletionHandler { - [[self class] setSystemCompletionHandler:systemCompletionHandler - forSessionIdentifier:_sessionIdentifier]; -} - -+ (void)setSystemCompletionHandler:(GTM_NULLABLE GTMSessionFetcherSystemCompletionHandler)systemCompletionHandler - forSessionIdentifier:(NSString *)sessionIdentifier { - if (!sessionIdentifier) { - NSLog(@"%s with nil identifier", __PRETTY_FUNCTION__); - return; - } - - @synchronized([GTMSessionFetcher class]) { - if (gSystemCompletionHandlers == nil && systemCompletionHandler != nil) { - gSystemCompletionHandlers = [[NSMutableDictionary alloc] init]; - } - // Use setValue: to remove the object if completionHandler is nil. - [gSystemCompletionHandlers setValue:systemCompletionHandler - forKey:sessionIdentifier]; - } -} - -+ (GTM_NULLABLE GTMSessionFetcherSystemCompletionHandler)systemCompletionHandlerForSessionIdentifier:(NSString *)sessionIdentifier { - if (!sessionIdentifier) { - return nil; - } - @synchronized([GTMSessionFetcher class]) { - return [gSystemCompletionHandlers objectForKey:sessionIdentifier]; - } -} -#endif // TARGET_OS_IPHONE - -#pragma mark Getters and Setters - -@synthesize downloadResumeData = _downloadResumeData, - configuration = _configuration, - configurationBlock = _configurationBlock, - sessionTask = _sessionTask, - wasCreatedFromBackgroundSession = _wasCreatedFromBackgroundSession, - sessionUserInfo = _sessionUserInfo, - taskDescription = _taskDescription, - taskPriority = _taskPriority, - usingBackgroundSession = _usingBackgroundSession, - canShareSession = _canShareSession, - completionHandler = _completionHandler, - credential = _credential, - proxyCredential = _proxyCredential, - bodyData = _bodyData, - bodyLength = _bodyLength, - service = _service, - serviceHost = _serviceHost, - accumulateDataBlock = _accumulateDataBlock, - receivedProgressBlock = _receivedProgressBlock, - downloadProgressBlock = _downloadProgressBlock, - resumeDataBlock = _resumeDataBlock, - didReceiveResponseBlock = _didReceiveResponseBlock, - challengeBlock = _challengeBlock, - willRedirectBlock = _willRedirectBlock, - sendProgressBlock = _sendProgressBlock, - willCacheURLResponseBlock = _willCacheURLResponseBlock, - retryBlock = _retryBlock, - retryFactor = _retryFactor, - allowedInsecureSchemes = _allowedInsecureSchemes, - allowLocalhostRequest = _allowLocalhostRequest, - allowInvalidServerCertificates = _allowInvalidServerCertificates, - cookieStorage = _cookieStorage, - callbackQueue = _callbackQueue, - initialBeginFetchDate = _initialBeginFetchDate, - testBlock = _testBlock, - testBlockAccumulateDataChunkCount = _testBlockAccumulateDataChunkCount, - comment = _comment, - log = _log; - -#if !STRIP_GTM_FETCH_LOGGING -@synthesize redirectedFromURL = _redirectedFromURL, - logRequestBody = _logRequestBody, - logResponseBody = _logResponseBody, - hasLoggedError = _hasLoggedError; -#endif - -#if GTM_BACKGROUND_TASK_FETCHING -@synthesize backgroundTaskIdentifier = _backgroundTaskIdentifier, - skipBackgroundTask = _skipBackgroundTask; -#endif - -- (GTM_NULLABLE NSURLRequest *)request { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return [_request copy]; - } // @synchronized(self) -} - -- (void)setRequest:(GTM_NULLABLE NSURLRequest *)request { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (![self isFetchingUnsynchronized]) { - _request = [request mutableCopy]; - } else { - GTMSESSION_ASSERT_DEBUG(0, @"request may not be set after beginFetch has been invoked"); - } - } // @synchronized(self) -} - -- (GTM_NULLABLE NSMutableURLRequest *)mutableRequestForTesting { - // Allow tests only to modify the request, useful during retries. - return _request; -} - -- (GTM_NULLABLE NSMutableURLRequest *)mutableRequest { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - GTMSESSION_LOG_DEBUG(@"[GTMSessionFetcher mutableRequest] is deprecated; use -request or" - @" -setRequestValue:forHTTPHeaderField:"); - - return _request; - } // @synchronized(self) -} - -- (void)setMutableRequest:(GTM_NULLABLE NSMutableURLRequest *)request { - GTMSESSION_LOG_DEBUG(@"[GTMSessionFetcher setMutableRequest:] is deprecated; use -request or" - @" -setRequestValue:forHTTPHeaderField:"); - - GTMSESSION_ASSERT_DEBUG(![self isFetching], - @"mutableRequest should not change after beginFetch has been invoked"); - [self updateMutableRequest:request]; -} - -// Internal method for updating the request property such as on redirects. -- (void)updateMutableRequest:(GTM_NULLABLE NSMutableURLRequest *)request { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _request = request; - } // @synchronized(self) -} - -// Set a header field value on the request. Header field value changes will not -// affect a fetch after the fetch has begun. -- (void)setRequestValue:(GTM_NULLABLE NSString *)value forHTTPHeaderField:(NSString *)field { - if (![self isFetching]) { - [self updateRequestValue:value forHTTPHeaderField:field]; - } else { - GTMSESSION_ASSERT_DEBUG(0, @"request may not be set after beginFetch has been invoked"); - } -} - -// Internal method for updating request headers. -- (void)updateRequestValue:(GTM_NULLABLE NSString *)value forHTTPHeaderField:(NSString *)field { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - [_request setValue:value forHTTPHeaderField:field]; - } // @synchronized(self) -} - -- (void)setResponse:(GTM_NULLABLE NSURLResponse *)response { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _response = response; - } // @synchronized(self) -} - -- (int64_t)bodyLength { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_bodyLength == NSURLSessionTransferSizeUnknown) { - if (_bodyData) { - _bodyLength = (int64_t)_bodyData.length; - } else if (_bodyFileURL) { - NSNumber *fileSizeNum = nil; - NSError *fileSizeError = nil; - if ([_bodyFileURL getResourceValue:&fileSizeNum - forKey:NSURLFileSizeKey - error:&fileSizeError]) { - _bodyLength = [fileSizeNum longLongValue]; - } - } - } - return _bodyLength; - } // @synchronized(self) -} - -- (BOOL)useUploadTask { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _useUploadTask; - } // @synchronized(self) -} - -- (void)setUseUploadTask:(BOOL)flag { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (flag != _useUploadTask) { - GTMSESSION_ASSERT_DEBUG(![self isFetchingUnsynchronized], - @"useUploadTask should not change after beginFetch has been invoked"); - _useUploadTask = flag; - } - } // @synchronized(self) -} - -- (GTM_NULLABLE NSURL *)bodyFileURL { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _bodyFileURL; - } // @synchronized(self) -} - -- (void)setBodyFileURL:(GTM_NULLABLE NSURL *)fileURL { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - // The comparison here is a trivial optimization and forgiveness for any client that - // repeatedly sets the property, so it just uses pointer comparison rather than isEqual:. - if (fileURL != _bodyFileURL) { - GTMSESSION_ASSERT_DEBUG(![self isFetchingUnsynchronized], - @"fileURL should not change after beginFetch has been invoked"); - - _bodyFileURL = fileURL; - } - } // @synchronized(self) -} - -- (GTM_NULLABLE GTMSessionFetcherBodyStreamProvider)bodyStreamProvider { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _bodyStreamProvider; - } // @synchronized(self) -} - -- (void)setBodyStreamProvider:(GTM_NULLABLE GTMSessionFetcherBodyStreamProvider)block { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - GTMSESSION_ASSERT_DEBUG(![self isFetchingUnsynchronized], - @"stream provider should not change after beginFetch has been invoked"); - - _bodyStreamProvider = [block copy]; - } // @synchronized(self) -} - -- (GTM_NULLABLE id)authorizer { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _authorizer; - } // @synchronized(self) -} - -- (void)setAuthorizer:(GTM_NULLABLE id)authorizer { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (authorizer != _authorizer) { - if ([self isFetchingUnsynchronized]) { - GTMSESSION_ASSERT_DEBUG(0, @"authorizer should not change after beginFetch has been invoked"); - } else { - _authorizer = authorizer; - } - } - } // @synchronized(self) -} - -- (GTM_NULLABLE NSData *)downloadedData { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _downloadedData; - } // @synchronized(self) -} - -- (void)setDownloadedData:(GTM_NULLABLE NSData *)data { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _downloadedData = [data mutableCopy]; - } // @synchronized(self) -} - -- (int64_t)downloadedLength { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _downloadedLength; - } // @synchronized(self) -} - -- (void)setDownloadedLength:(int64_t)length { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _downloadedLength = length; - } // @synchronized(self) -} - -- (dispatch_queue_t GTM_NONNULL_TYPE)callbackQueue { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _callbackQueue; - } // @synchronized(self) -} - -- (void)setCallbackQueue:(dispatch_queue_t GTM_NULLABLE_TYPE)queue { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _callbackQueue = queue ?: dispatch_get_main_queue(); - } // @synchronized(self) -} - -- (GTM_NULLABLE NSURLSession *)session { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _session; - } // @synchronized(self) -} - -- (NSInteger)servicePriority { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _servicePriority; - } // @synchronized(self) -} - -- (void)setServicePriority:(NSInteger)value { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (value != _servicePriority) { - GTMSESSION_ASSERT_DEBUG(![self isFetchingUnsynchronized], - @"servicePriority should not change after beginFetch has been invoked"); - - _servicePriority = value; - } - } // @synchronized(self) -} - - -- (void)setSession:(GTM_NULLABLE NSURLSession *)session { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _session = session; - } // @synchronized(self) -} - -- (BOOL)canShareSession { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _canShareSession; - } // @synchronized(self) -} - -- (void)setCanShareSession:(BOOL)flag { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _canShareSession = flag; - } // @synchronized(self) -} - -- (BOOL)useBackgroundSession { - // This reflects if the user requested a background session, not necessarily - // if one was created. That is tracked with _usingBackgroundSession. - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _userRequestedBackgroundSession; - } // @synchronized(self) -} - -- (void)setUseBackgroundSession:(BOOL)flag { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (flag != _userRequestedBackgroundSession) { - GTMSESSION_ASSERT_DEBUG(![self isFetchingUnsynchronized], - @"useBackgroundSession should not change after beginFetch has been invoked"); - - _userRequestedBackgroundSession = flag; - } - } // @synchronized(self) -} - -- (BOOL)isUsingBackgroundSession { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _usingBackgroundSession; - } // @synchronized(self) -} - -- (void)setUsingBackgroundSession:(BOOL)flag { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _usingBackgroundSession = flag; - } // @synchronized(self) -} - -- (GTM_NULLABLE NSURLSession *)sessionNeedingInvalidation { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _sessionNeedingInvalidation; - } // @synchronized(self) -} - -- (void)setSessionNeedingInvalidation:(GTM_NULLABLE NSURLSession *)session { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _sessionNeedingInvalidation = session; - } // @synchronized(self) -} - -- (NSOperationQueue * GTM_NONNULL_TYPE)sessionDelegateQueue { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _delegateQueue; - } // @synchronized(self) -} - -- (void)setSessionDelegateQueue:(NSOperationQueue * GTM_NULLABLE_TYPE)queue { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (queue != _delegateQueue) { - if ([self isFetchingUnsynchronized]) { - GTMSESSION_ASSERT_DEBUG(0, @"sessionDelegateQueue should not change after fetch begins"); - } else { - _delegateQueue = queue ?: [NSOperationQueue mainQueue]; - } - } - } // @synchronized(self) -} - -- (BOOL)userStoppedFetching { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _userStoppedFetching; - } // @synchronized(self) -} - -- (GTM_NULLABLE id)userData { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _userData; - } // @synchronized(self) -} - -- (void)setUserData:(GTM_NULLABLE id)theObj { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _userData = theObj; - } // @synchronized(self) -} - -- (GTM_NULLABLE NSURL *)destinationFileURL { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _destinationFileURL; - } // @synchronized(self) -} - -- (void)setDestinationFileURL:(GTM_NULLABLE NSURL *)destinationFileURL { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (((_destinationFileURL == nil) && (destinationFileURL == nil)) || - [_destinationFileURL isEqual:destinationFileURL]) { - return; - } - if (_sessionIdentifier) { - // This is something we don't expect to happen in production. - // However if it ever happen, leave a system log. - NSLog(@"%@: Destination File URL changed from (%@) to (%@) after session identifier has " - @"been created.", - [self class], _destinationFileURL, destinationFileURL); -#if DEBUG - // On both the simulator and devices, the path can change to the download file, but the name - // shouldn't change. Technically, this isn't supported in the fetcher, but the change of - // URL is expected to happen only across development runs through Xcode. - NSString *oldFilename = [_destinationFileURL lastPathComponent]; - NSString *newFilename = [destinationFileURL lastPathComponent]; - #pragma unused(oldFilename) - #pragma unused(newFilename) - GTMSESSION_ASSERT_DEBUG([oldFilename isEqualToString:newFilename], - @"Destination File URL cannot be changed after session identifier has been created"); -#endif - } - _destinationFileURL = destinationFileURL; - } // @synchronized(self) -} - -- (void)setProperties:(GTM_NULLABLE NSDictionary *)dict { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _properties = [dict mutableCopy]; - } // @synchronized(self) -} - -- (GTM_NULLABLE NSDictionary *)properties { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _properties; - } // @synchronized(self) -} - -- (void)setProperty:(GTM_NULLABLE id)obj forKey:(NSString *)key { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_properties == nil && obj != nil) { - _properties = [[NSMutableDictionary alloc] init]; - } - [_properties setValue:obj forKey:key]; - } // @synchronized(self) -} - -- (GTM_NULLABLE id)propertyForKey:(NSString *)key { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return [_properties objectForKey:key]; - } // @synchronized(self) -} - -- (void)addPropertiesFromDictionary:(NSDictionary *)dict { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_properties == nil && dict != nil) { - [self setProperties:[dict mutableCopy]]; - } else { - [_properties addEntriesFromDictionary:dict]; - } - } // @synchronized(self) -} - -- (void)setCommentWithFormat:(id)format, ... { -#if !STRIP_GTM_FETCH_LOGGING - NSString *result = format; - if (format) { - va_list argList; - va_start(argList, format); - - result = [[NSString alloc] initWithFormat:format - arguments:argList]; - va_end(argList); - } - [self setComment:result]; -#endif -} - -#if !STRIP_GTM_FETCH_LOGGING -- (NSData *)loggedStreamData { - return _loggedStreamData; -} - -- (void)appendLoggedStreamData:dataToAdd { - if (!_loggedStreamData) { - _loggedStreamData = [NSMutableData data]; - } - [_loggedStreamData appendData:dataToAdd]; -} - -- (void)clearLoggedStreamData { - _loggedStreamData = nil; -} - -- (void)setDeferResponseBodyLogging:(BOOL)deferResponseBodyLogging { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (deferResponseBodyLogging != _deferResponseBodyLogging) { - _deferResponseBodyLogging = deferResponseBodyLogging; - if (!deferResponseBodyLogging && !self.hasLoggedError) { - [_delegateQueue addOperationWithBlock:^{ - [self logNowWithError:nil]; - }]; - } - } - } // @synchronized(self) -} - -- (BOOL)deferResponseBodyLogging { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _deferResponseBodyLogging; - } // @synchronized(self) -} - -#else -+ (void)setLoggingEnabled:(BOOL)flag { -} - -+ (BOOL)isLoggingEnabled { - return NO; -} -#endif // STRIP_GTM_FETCH_LOGGING - -@end - -@implementation GTMSessionFetcher (BackwardsCompatibilityOnly) - -- (void)setCookieStorageMethod:(NSInteger)method { - // For backwards compatibility with the old fetcher, we'll support the old constants. - // - // Clients using the GTMSessionFetcher class should set the cookie storage explicitly - // themselves. - NSHTTPCookieStorage *storage = nil; - switch(method) { - case 0: // kGTMHTTPFetcherCookieStorageMethodStatic - // nil storage will use [[self class] staticCookieStorage] when the fetch begins. - break; - case 1: // kGTMHTTPFetcherCookieStorageMethodFetchHistory - // Do nothing; use whatever was set by the fetcher service. - return; - case 2: // kGTMHTTPFetcherCookieStorageMethodSystemDefault - storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; - break; - case 3: // kGTMHTTPFetcherCookieStorageMethodNone - // Create temporary storage for this fetcher only. - storage = [[GTMSessionCookieStorage alloc] init]; - break; - default: - GTMSESSION_ASSERT_DEBUG(0, @"Invalid cookie storage method: %d", (int)method); - } - self.cookieStorage = storage; -} - -@end - -@implementation GTMSessionCookieStorage { - NSMutableArray *_cookies; - NSHTTPCookieAcceptPolicy _policy; -} - -- (id)init { - self = [super init]; - if (self != nil) { - _cookies = [[NSMutableArray alloc] init]; - } - return self; -} - -- (GTM_NULLABLE NSArray *)cookies { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return [_cookies copy]; - } // @synchronized(self) -} - -- (void)setCookie:(NSHTTPCookie *)cookie { - if (!cookie) return; - if (_policy == NSHTTPCookieAcceptPolicyNever) return; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - [self internalSetCookie:cookie]; - } // @synchronized(self) -} - -// Note: this should only be called from inside a @synchronized(self) block. -- (void)internalSetCookie:(NSHTTPCookie *)newCookie { - GTMSessionCheckSynchronized(self); - - if (_policy == NSHTTPCookieAcceptPolicyNever) return; - - BOOL isValidCookie = (newCookie.name.length > 0 - && newCookie.domain.length > 0 - && newCookie.path.length > 0); - GTMSESSION_ASSERT_DEBUG(isValidCookie, @"invalid cookie: %@", newCookie); - - if (isValidCookie) { - // Remove the cookie if it's currently in the array. - NSHTTPCookie *oldCookie = [self cookieMatchingCookie:newCookie]; - if (oldCookie) { - [_cookies removeObjectIdenticalTo:oldCookie]; - } - - if (![[self class] hasCookieExpired:newCookie]) { - [_cookies addObject:newCookie]; - } - } -} - -// Add all cookies in the new cookie array to the storage, -// replacing stored cookies as appropriate. -// -// Side effect: removes expired cookies from the storage array. -- (void)setCookies:(GTM_NULLABLE NSArray *)newCookies { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - [self removeExpiredCookies]; - - for (NSHTTPCookie *newCookie in newCookies) { - [self internalSetCookie:newCookie]; - } - } // @synchronized(self) -} - -- (void)setCookies:(NSArray *)cookies forURL:(GTM_NULLABLE NSURL *)URL mainDocumentURL:(GTM_NULLABLE NSURL *)mainDocumentURL { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_policy == NSHTTPCookieAcceptPolicyNever) { - return; - } - - if (_policy == NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain) { - NSString *mainHost = mainDocumentURL.host; - NSString *associatedHost = URL.host; - if (!mainHost || ![associatedHost hasSuffix:mainHost]) { - return; - } - } - } // @synchronized(self) - [self setCookies:cookies]; -} - -- (void)deleteCookie:(NSHTTPCookie *)cookie { - if (!cookie) return; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSHTTPCookie *foundCookie = [self cookieMatchingCookie:cookie]; - if (foundCookie) { - [_cookies removeObjectIdenticalTo:foundCookie]; - } - } // @synchronized(self) -} - -// Retrieve all cookies appropriate for the given URL, considering -// domain, path, cookie name, expiration, security setting. -// Side effect: removed expired cookies from the storage array. -- (GTM_NULLABLE NSArray *)cookiesForURL:(NSURL *)theURL { - NSMutableArray *foundCookies = nil; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - [self removeExpiredCookies]; - - // We'll prepend "." to the desired domain, since we want the - // actual domain "nytimes.com" to still match the cookie domain - // ".nytimes.com" when we check it below with hasSuffix. - NSString *host = theURL.host.lowercaseString; - NSString *path = theURL.path; - NSString *scheme = [theURL scheme]; - - NSString *requestingDomain = nil; - BOOL isLocalhostRetrieval = NO; - - if (IsLocalhost(host)) { - isLocalhostRetrieval = YES; - } else { - if (host.length > 0) { - requestingDomain = [@"." stringByAppendingString:host]; - } - } - - for (NSHTTPCookie *storedCookie in _cookies) { - NSString *cookieDomain = storedCookie.domain.lowercaseString; - NSString *cookiePath = storedCookie.path; - BOOL cookieIsSecure = [storedCookie isSecure]; - - BOOL isDomainOK; - - if (isLocalhostRetrieval) { - // Prior to 10.5.6, the domain stored into NSHTTPCookies for localhost - // is "localhost.local" - isDomainOK = (IsLocalhost(cookieDomain) - || [cookieDomain isEqual:@"localhost.local"]); - } else { - // Ensure we're matching exact domain names. We prepended a dot to the - // requesting domain, so we can also prepend one here if needed before - // checking if the request contains the cookie domain. - if (![cookieDomain hasPrefix:@"."]) { - cookieDomain = [@"." stringByAppendingString:cookieDomain]; - } - isDomainOK = [requestingDomain hasSuffix:cookieDomain]; - } - - BOOL isPathOK = [cookiePath isEqual:@"/"] || [path hasPrefix:cookiePath]; - BOOL isSecureOK = (!cookieIsSecure - || [scheme caseInsensitiveCompare:@"https"] == NSOrderedSame); - - if (isDomainOK && isPathOK && isSecureOK) { - if (foundCookies == nil) { - foundCookies = [NSMutableArray array]; - } - [foundCookies addObject:storedCookie]; - } - } - } // @synchronized(self) - return foundCookies; -} - -// Override methods from the NSHTTPCookieStorage (NSURLSessionTaskAdditions) category. -- (void)storeCookies:(NSArray *)cookies forTask:(NSURLSessionTask *)task { - NSURLRequest *currentRequest = task.currentRequest; - [self setCookies:cookies forURL:currentRequest.URL mainDocumentURL:nil]; -} - -- (void)getCookiesForTask:(NSURLSessionTask *)task - completionHandler:(void (^)(GTM_NSArrayOf(NSHTTPCookie *) *))completionHandler { - if (completionHandler) { - NSURLRequest *currentRequest = task.currentRequest; - NSURL *currentRequestURL = currentRequest.URL; - NSArray *cookies = [self cookiesForURL:currentRequestURL]; - completionHandler(cookies); - } -} - -// Return a cookie from the array with the same name, domain, and path as the -// given cookie, or else return nil if none found. -// -// Both the cookie being tested and all cookies in the storage array should -// be valid (non-nil name, domains, paths). -// -// Note: this should only be called from inside a @synchronized(self) block -- (GTM_NULLABLE NSHTTPCookie *)cookieMatchingCookie:(NSHTTPCookie *)cookie { - GTMSessionCheckSynchronized(self); - - NSString *name = cookie.name; - NSString *domain = cookie.domain; - NSString *path = cookie.path; - - GTMSESSION_ASSERT_DEBUG(name && domain && path, - @"Invalid stored cookie (name:%@ domain:%@ path:%@)", name, domain, path); - - for (NSHTTPCookie *storedCookie in _cookies) { - if ([storedCookie.name isEqual:name] - && [storedCookie.domain isEqual:domain] - && [storedCookie.path isEqual:path]) { - return storedCookie; - } - } - return nil; -} - -// Internal routine to remove any expired cookies from the array, excluding -// cookies with nil expirations. -// -// Note: this should only be called from inside a @synchronized(self) block -- (void)removeExpiredCookies { - GTMSessionCheckSynchronized(self); - - // Count backwards since we're deleting items from the array - for (NSInteger idx = (NSInteger)_cookies.count - 1; idx >= 0; idx--) { - NSHTTPCookie *storedCookie = [_cookies objectAtIndex:(NSUInteger)idx]; - if ([[self class] hasCookieExpired:storedCookie]) { - [_cookies removeObjectAtIndex:(NSUInteger)idx]; - } - } -} - -+ (BOOL)hasCookieExpired:(NSHTTPCookie *)cookie { - NSDate *expiresDate = [cookie expiresDate]; - if (expiresDate == nil) { - // Cookies seem to have a Expires property even when the expiresDate method returns nil. - id expiresVal = [[cookie properties] objectForKey:NSHTTPCookieExpires]; - if ([expiresVal isKindOfClass:[NSDate class]]) { - expiresDate = expiresVal; - } - } - BOOL hasExpired = (expiresDate != nil && [expiresDate timeIntervalSinceNow] < 0); - return hasExpired; -} - -- (void)removeAllCookies { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - [_cookies removeAllObjects]; - } // @synchronized(self) -} - -- (NSHTTPCookieAcceptPolicy)cookieAcceptPolicy { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _policy; - } // @synchronized(self) -} - -- (void)setCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)cookieAcceptPolicy { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _policy = cookieAcceptPolicy; - } // @synchronized(self) -} - -@end - -void GTMSessionFetcherAssertValidSelector(id GTM_NULLABLE_TYPE obj, SEL GTM_NULLABLE_TYPE sel, ...) { - // Verify that the object's selector is implemented with the proper - // number and type of arguments -#if DEBUG - va_list argList; - va_start(argList, sel); - - if (obj && sel) { - // Check that the selector is implemented - if (![obj respondsToSelector:sel]) { - NSLog(@"\"%@\" selector \"%@\" is unimplemented or misnamed", - NSStringFromClass([(id)obj class]), - NSStringFromSelector((SEL)sel)); - NSCAssert(0, @"callback selector unimplemented or misnamed"); - } else { - const char *expectedArgType; - unsigned int argCount = 2; // skip self and _cmd - NSMethodSignature *sig = [obj methodSignatureForSelector:sel]; - - // Check that each expected argument is present and of the correct type - while ((expectedArgType = va_arg(argList, const char*)) != 0) { - - if ([sig numberOfArguments] > argCount) { - const char *foundArgType = [sig getArgumentTypeAtIndex:argCount]; - - if (0 != strncmp(foundArgType, expectedArgType, strlen(expectedArgType))) { - NSLog(@"\"%@\" selector \"%@\" argument %d should be type %s", - NSStringFromClass([(id)obj class]), - NSStringFromSelector((SEL)sel), (argCount - 2), expectedArgType); - NSCAssert(0, @"callback selector argument type mistake"); - } - } - argCount++; - } - - // Check that the proper number of arguments are present in the selector - if (argCount != [sig numberOfArguments]) { - NSLog(@"\"%@\" selector \"%@\" should have %d arguments", - NSStringFromClass([(id)obj class]), - NSStringFromSelector((SEL)sel), (argCount - 2)); - NSCAssert(0, @"callback selector arguments incorrect"); - } - } - } - - va_end(argList); -#endif -} - -NSString *GTMFetcherCleanedUserAgentString(NSString *str) { - // Reference http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html - // and http://www-archive.mozilla.org/build/user-agent-strings.html - - if (str == nil) return @""; - - NSMutableString *result = [NSMutableString stringWithString:str]; - - // Replace spaces and commas with underscores - [result replaceOccurrencesOfString:@" " - withString:@"_" - options:0 - range:NSMakeRange(0, result.length)]; - [result replaceOccurrencesOfString:@"," - withString:@"_" - options:0 - range:NSMakeRange(0, result.length)]; - - // Delete http token separators and remaining whitespace - static NSCharacterSet *charsToDelete = nil; - if (charsToDelete == nil) { - // Make a set of unwanted characters - NSString *const kSeparators = @"()<>@;:\\\"/[]?={}"; - - NSMutableCharacterSet *mutableChars = - [[NSCharacterSet whitespaceAndNewlineCharacterSet] mutableCopy]; - [mutableChars addCharactersInString:kSeparators]; - charsToDelete = [mutableChars copy]; // hang on to an immutable copy - } - - while (1) { - NSRange separatorRange = [result rangeOfCharacterFromSet:charsToDelete]; - if (separatorRange.location == NSNotFound) break; - - [result deleteCharactersInRange:separatorRange]; - }; - - return result; -} - -NSString *GTMFetcherSystemVersionString(void) { - static NSString *sSavedSystemString; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - // The Xcode 8 SDKs finally cleaned up this mess by providing TARGET_OS_OSX - // and TARGET_OS_IOS, but to build with older SDKs, those don't exist and - // instead one has to rely on TARGET_OS_MAC (which is true for iOS, watchOS, - // and tvOS) and TARGET_OS_IPHONE (which is true for iOS, watchOS, tvOS). So - // one has to order these carefully so you pick off the specific things - // first. - // If the code can ever assume Xcode 8 or higher (even when building for - // older OSes), then - // TARGET_OS_MAC -> TARGET_OS_OSX - // TARGET_OS_IPHONE -> TARGET_OS_IOS - // TARGET_IPHONE_SIMULATOR -> TARGET_OS_SIMULATOR -#if TARGET_OS_WATCH - // watchOS - WKInterfaceDevice - - WKInterfaceDevice *currentDevice = [WKInterfaceDevice currentDevice]; - - NSString *rawModel = [currentDevice model]; - NSString *model = GTMFetcherCleanedUserAgentString(rawModel); - - NSString *systemVersion = [currentDevice systemVersion]; - -#if TARGET_OS_SIMULATOR - NSString *hardwareModel = @"sim"; -#else - NSString *hardwareModel; - struct utsname unameRecord; - if (uname(&unameRecord) == 0) { - NSString *machineName = @(unameRecord.machine); - hardwareModel = GTMFetcherCleanedUserAgentString(machineName); - } - if (hardwareModel.length == 0) { - hardwareModel = @"unk"; - } -#endif - - sSavedSystemString = [[NSString alloc] initWithFormat:@"%@/%@ hw/%@", - model, systemVersion, hardwareModel]; - // Example: Apple_Watch/3.0 hw/Watch1_2 -#elif TARGET_OS_TV || TARGET_OS_IPHONE - // iOS and tvOS have UIDevice, use that. - UIDevice *currentDevice = [UIDevice currentDevice]; - - NSString *rawModel = [currentDevice model]; - NSString *model = GTMFetcherCleanedUserAgentString(rawModel); - - NSString *systemVersion = [currentDevice systemVersion]; - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_SIMULATOR - NSString *hardwareModel = @"sim"; -#else - NSString *hardwareModel; - struct utsname unameRecord; - if (uname(&unameRecord) == 0) { - NSString *machineName = @(unameRecord.machine); - hardwareModel = GTMFetcherCleanedUserAgentString(machineName); - } - if (hardwareModel.length == 0) { - hardwareModel = @"unk"; - } -#endif - - sSavedSystemString = [[NSString alloc] initWithFormat:@"%@/%@ hw/%@", - model, systemVersion, hardwareModel]; - // Example: iPod_Touch/2.2 hw/iPod1_1 - // Example: Apple_TV/9.2 hw/AppleTV5,3 -#elif TARGET_OS_MAC - // Mac build - NSProcessInfo *procInfo = [NSProcessInfo processInfo]; -#if !defined(MAC_OS_X_VERSION_10_10) - BOOL hasOperatingSystemVersion = NO; -#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10 - BOOL hasOperatingSystemVersion = - [procInfo respondsToSelector:@selector(operatingSystemVersion)]; -#else - BOOL hasOperatingSystemVersion = YES; -#endif - NSString *versString; - if (hasOperatingSystemVersion) { -#if defined(MAC_OS_X_VERSION_10_10) - // A reference to NSOperatingSystemVersion requires the 10.10 SDK. - NSOperatingSystemVersion version = procInfo.operatingSystemVersion; - versString = [NSString stringWithFormat:@"%zd.%zd.%zd", - version.majorVersion, version.minorVersion, version.patchVersion]; -#else -#pragma unused(procInfo) -#endif - } else { - // With Gestalt inexplicably deprecated in 10.8, we're reduced to reading - // the system plist file. - NSString *const kPath = @"/System/Library/CoreServices/SystemVersion.plist"; - NSDictionary *plist = [NSDictionary dictionaryWithContentsOfFile:kPath]; - versString = [plist objectForKey:@"ProductVersion"]; - if (versString.length == 0) { - versString = @"10.?.?"; - } - } - - sSavedSystemString = [[NSString alloc] initWithFormat:@"MacOSX/%@", versString]; -#elif defined(_SYS_UTSNAME_H) - // Foundation-only build - struct utsname unameRecord; - uname(&unameRecord); - - sSavedSystemString = [NSString stringWithFormat:@"%s/%s", - unameRecord.sysname, unameRecord.release]; // "Darwin/8.11.1" -#else -#error No branch taken for a default user agent -#endif - }); - return sSavedSystemString; -} - -NSString *GTMFetcherStandardUserAgentString(NSBundle * GTM_NULLABLE_TYPE bundle) { - NSString *result = [NSString stringWithFormat:@"%@ %@", - GTMFetcherApplicationIdentifier(bundle), - GTMFetcherSystemVersionString()]; - return result; -} - -NSString *GTMFetcherApplicationIdentifier(NSBundle * GTM_NULLABLE_TYPE bundle) { - @synchronized([GTMSessionFetcher class]) { - static NSMutableDictionary *sAppIDMap = nil; - - // If there's a bundle ID, use that; otherwise, use the process name - if (bundle == nil) { - bundle = [NSBundle mainBundle]; - } - NSString *bundleID = [bundle bundleIdentifier]; - if (bundleID == nil) { - bundleID = @""; - } - - NSString *identifier = [sAppIDMap objectForKey:bundleID]; - if (identifier) return identifier; - - // Apps may add a string to the info.plist to uniquely identify different builds. - identifier = [bundle objectForInfoDictionaryKey:@"GTMUserAgentID"]; - if (identifier.length == 0) { - if (bundleID.length > 0) { - identifier = bundleID; - } else { - // Fall back on the procname, prefixed by "proc" to flag that it's - // autogenerated and perhaps unreliable - NSString *procName = [[NSProcessInfo processInfo] processName]; - identifier = [NSString stringWithFormat:@"proc_%@", procName]; - } - } - - // Clean up whitespace and special characters - identifier = GTMFetcherCleanedUserAgentString(identifier); - - // If there's a version number, append that - NSString *version = [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; - if (version.length == 0) { - version = [bundle objectForInfoDictionaryKey:@"CFBundleVersion"]; - } - - // Clean up whitespace and special characters - version = GTMFetcherCleanedUserAgentString(version); - - // Glue the two together (cleanup done above or else cleanup would strip the - // slash) - if (version.length > 0) { - identifier = [identifier stringByAppendingFormat:@"/%@", version]; - } - - if (sAppIDMap == nil) { - sAppIDMap = [[NSMutableDictionary alloc] init]; - } - [sAppIDMap setObject:identifier forKey:bundleID]; - return identifier; - } -} - -#if DEBUG -@implementation GTMSessionSyncMonitorInternal { - NSValue *_objectKey; // The synchronize target object. - const char *_functionName; // The function containing the monitored sync block. -} - -- (instancetype)initWithSynchronizationObject:(id)object - allowRecursive:(BOOL)allowRecursive - functionName:(const char *)functionName { - self = [super init]; - if (self) { - Class threadKey = [GTMSessionSyncMonitorInternal class]; - _objectKey = [NSValue valueWithNonretainedObject:object]; - _functionName = functionName; - - NSMutableDictionary *threadDict = [NSThread currentThread].threadDictionary; - NSMutableDictionary *counters = threadDict[threadKey]; - if (counters == nil) { - counters = [NSMutableDictionary dictionary]; - threadDict[(id)threadKey] = counters; - } - NSCountedSet *functionNamesCounter = counters[_objectKey]; - NSUInteger numberOfSyncingFunctions = functionNamesCounter.count; - - if (!allowRecursive) { - BOOL isTopLevelSyncScope = (numberOfSyncingFunctions == 0); - NSArray *stack = [NSThread callStackSymbols]; - GTMSESSION_ASSERT_DEBUG(isTopLevelSyncScope, - @"*** Recursive sync on %@ at %s; previous sync at %@\n%@", - [object class], functionName, functionNamesCounter.allObjects, - [stack subarrayWithRange:NSMakeRange(1, stack.count - 1)]); - } - - if (!functionNamesCounter) { - functionNamesCounter = [NSCountedSet set]; - counters[_objectKey] = functionNamesCounter; - } - [functionNamesCounter addObject:@(functionName)]; - } - return self; -} - -- (void)dealloc { - Class threadKey = [GTMSessionSyncMonitorInternal class]; - - NSMutableDictionary *threadDict = [NSThread currentThread].threadDictionary; - NSMutableDictionary *counters = threadDict[threadKey]; - NSCountedSet *functionNamesCounter = counters[_objectKey]; - NSString *functionNameStr = @(_functionName); - NSUInteger numberOfSyncsByThisFunction = [functionNamesCounter countForObject:functionNameStr]; - NSArray *stack = [NSThread callStackSymbols]; - GTMSESSION_ASSERT_DEBUG(numberOfSyncsByThisFunction > 0, @"Sync not found on %@ at %s\n%@", - [_objectKey.nonretainedObjectValue class], _functionName, - [stack subarrayWithRange:NSMakeRange(1, stack.count - 1)]); - [functionNamesCounter removeObject:functionNameStr]; - if (functionNamesCounter.count == 0) { - [counters removeObjectForKey:_objectKey]; - } -} - -+ (NSArray *)functionsHoldingSynchronizationOnObject:(id)object { - Class threadKey = [GTMSessionSyncMonitorInternal class]; - NSValue *localObjectKey = [NSValue valueWithNonretainedObject:object]; - - NSMutableDictionary *threadDict = [NSThread currentThread].threadDictionary; - NSMutableDictionary *counters = threadDict[threadKey]; - NSCountedSet *functionNamesCounter = counters[localObjectKey]; - return functionNamesCounter.count > 0 ? functionNamesCounter.allObjects : nil; -} -@end -#endif // DEBUG -GTM_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.h b/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.h deleted file mode 100755 index bc0a65c..0000000 --- a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "GTMSessionFetcher.h" - -// GTM HTTP Logging -// -// All traffic using GTMSessionFetcher can be easily logged. Call -// -// [GTMSessionFetcher setLoggingEnabled:YES]; -// -// to begin generating log files. -// -// Log files are put into a folder on the desktop called "GTMHTTPDebugLogs" -// unless another directory is specified with +setLoggingDirectory. -// -// In the iPhone simulator, the default logs location is the user's home -// directory in ~/Library/Application Support. On the iPhone device, the -// default logs location is the application's documents directory on the device. -// -// Tip: use the Finder's "Sort By Date" to find the most recent logs. -// -// Each run of an application gets a separate set of log files. An html -// file is generated to simplify browsing the run's http transactions. -// The html file includes javascript links for inline viewing of uploaded -// and downloaded data. -// -// A symlink is created in the logs folder to simplify finding the html file -// for the latest run of the application; the symlink is called -// -// AppName_http_log_newest.html -// -// For better viewing of XML logs, use Camino or Firefox rather than Safari. -// -// Each fetcher may be given a comment to be inserted as a label in the logs, -// such as -// [fetcher setCommentWithFormat:@"retrieve item %@", itemName]; -// -// Projects may define STRIP_GTM_FETCH_LOGGING to remove logging code. - -#if !STRIP_GTM_FETCH_LOGGING - -@interface GTMSessionFetcher (GTMSessionFetcherLogging) - -// Note: the default logs directory is ~/Desktop/GTMHTTPDebugLogs; it will be -// created as needed. If a custom directory is set, the directory should -// already exist. -+ (void)setLoggingDirectory:(NSString *)path; -+ (NSString *)loggingDirectory; - -// client apps can turn logging on and off -+ (void)setLoggingEnabled:(BOOL)isLoggingEnabled; -+ (BOOL)isLoggingEnabled; - -// client apps can turn off logging to a file if they want to only check -// the fetcher's log property -+ (void)setLoggingToFileEnabled:(BOOL)isLoggingToFileEnabled; -+ (BOOL)isLoggingToFileEnabled; - -// client apps can optionally specify process name and date string used in -// log file names -+ (void)setLoggingProcessName:(NSString *)processName; -+ (NSString *)loggingProcessName; - -+ (void)setLoggingDateStamp:(NSString *)dateStamp; -+ (NSString *)loggingDateStamp; - -// client apps can specify the directory for the log for this specific run, -// typically to match the directory used by another fetcher class, like: -// -// [GTMSessionFetcher setLogDirectoryForCurrentRun:[GTMHTTPFetcher logDirectoryForCurrentRun]]; -// -// Setting this overrides the logging directory, process name, and date stamp when writing -// the log file. -+ (void)setLogDirectoryForCurrentRun:(NSString *)logDirectoryForCurrentRun; -+ (NSString *)logDirectoryForCurrentRun; - -// Prunes old log directories that have not been modified since the provided date. -// This will not delete the current run's log directory. -+ (void)deleteLogDirectoriesOlderThanDate:(NSDate *)date; - -// internal; called by fetcher -- (void)logFetchWithError:(NSError *)error; -- (NSInputStream *)loggedInputStreamForInputStream:(NSInputStream *)inputStream; -- (GTMSessionFetcherBodyStreamProvider)loggedStreamProviderForStreamProvider: - (GTMSessionFetcherBodyStreamProvider)streamProvider; - -// internal; accessors useful for viewing logs -+ (NSString *)processNameLogPrefix; -+ (NSString *)symlinkNameSuffix; -+ (NSString *)htmlFileName; - -@end - -#endif // !STRIP_GTM_FETCH_LOGGING diff --git a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.m b/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.m deleted file mode 100755 index 02b46b6..0000000 --- a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.m +++ /dev/null @@ -1,976 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if !defined(__has_feature) || !__has_feature(objc_arc) -#error "This file requires ARC support." -#endif - -#include -#include - -#import "GTMSessionFetcherLogging.h" - -#ifndef STRIP_GTM_FETCH_LOGGING - #error GTMSessionFetcher headers should have defaulted this if it wasn't already defined. -#endif - -#if !STRIP_GTM_FETCH_LOGGING - -// Sensitive credential strings are replaced in logs with _snip_ -// -// Apps that must see the contents of sensitive tokens can set this to 1 -#ifndef SKIP_GTM_FETCH_LOGGING_SNIPPING -#define SKIP_GTM_FETCH_LOGGING_SNIPPING 0 -#endif - -// If GTMReadMonitorInputStream is available, it can be used for -// capturing uploaded streams of data -// -// We locally declare methods of GTMReadMonitorInputStream so we -// do not need to import the header, as some projects may not have it available -#if !GTMSESSION_BUILD_COMBINED_SOURCES -@interface GTMReadMonitorInputStream : NSInputStream - -+ (instancetype)inputStreamWithStream:(NSInputStream *)input; - -@property (assign) id readDelegate; -@property (assign) SEL readSelector; - -@end -#else -@class GTMReadMonitorInputStream; -#endif // !GTMSESSION_BUILD_COMBINED_SOURCES - -@interface GTMSessionFetcher (GTMHTTPFetcherLoggingUtilities) - -+ (NSString *)headersStringForDictionary:(NSDictionary *)dict; -+ (NSString *)snipSubstringOfString:(NSString *)originalStr - betweenStartString:(NSString *)startStr - endString:(NSString *)endStr; -- (void)inputStream:(GTMReadMonitorInputStream *)stream - readIntoBuffer:(void *)buffer - length:(int64_t)length; - -@end - -@implementation GTMSessionFetcher (GTMSessionFetcherLogging) - -// fetchers come and fetchers go, but statics are forever -static BOOL gIsLoggingEnabled = NO; -static BOOL gIsLoggingToFile = YES; -static NSString *gLoggingDirectoryPath = nil; -static NSString *gLogDirectoryForCurrentRun = nil; -static NSString *gLoggingDateStamp = nil; -static NSString *gLoggingProcessName = nil; - -+ (void)setLoggingDirectory:(NSString *)path { - gLoggingDirectoryPath = [path copy]; -} - -+ (NSString *)loggingDirectory { - if (!gLoggingDirectoryPath) { - NSArray *paths = nil; -#if TARGET_IPHONE_SIMULATOR - // default to a directory called GTMHTTPDebugLogs into a sandbox-safe - // directory that a developer can find easily, the application home - paths = @[ NSHomeDirectory() ]; -#elif TARGET_OS_IPHONE - // Neither ~/Desktop nor ~/Home is writable on an actual iOS, watchOS, or tvOS device. - // Put it in ~/Documents. - paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); -#else - // default to a directory called GTMHTTPDebugLogs in the desktop folder - paths = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES); -#endif - - NSString *desktopPath = paths.firstObject; - if (desktopPath) { - NSString *const kGTMLogFolderName = @"GTMHTTPDebugLogs"; - NSString *logsFolderPath = [desktopPath stringByAppendingPathComponent:kGTMLogFolderName]; - - NSFileManager *fileMgr = [NSFileManager defaultManager]; - BOOL isDir; - BOOL doesFolderExist = [fileMgr fileExistsAtPath:logsFolderPath isDirectory:&isDir]; - if (!doesFolderExist) { - // make the directory - doesFolderExist = [fileMgr createDirectoryAtPath:logsFolderPath - withIntermediateDirectories:YES - attributes:nil - error:NULL]; - } - if (doesFolderExist) { - // it's there; store it in the global - gLoggingDirectoryPath = [logsFolderPath copy]; - } - } - } - return gLoggingDirectoryPath; -} - -+ (void)setLogDirectoryForCurrentRun:(NSString *)logDirectoryForCurrentRun { - // Set the path for this run's logs. - gLogDirectoryForCurrentRun = [logDirectoryForCurrentRun copy]; -} - -+ (NSString *)logDirectoryForCurrentRun { - // make a directory for this run's logs, like SyncProto_logs_10-16_01-56-58PM - if (gLogDirectoryForCurrentRun) return gLogDirectoryForCurrentRun; - - NSString *parentDir = [self loggingDirectory]; - NSString *logNamePrefix = [self processNameLogPrefix]; - NSString *dateStamp = [self loggingDateStamp]; - NSString *dirName = [NSString stringWithFormat:@"%@%@", logNamePrefix, dateStamp]; - NSString *logDirectory = [parentDir stringByAppendingPathComponent:dirName]; - - if (gIsLoggingToFile) { - NSFileManager *fileMgr = [NSFileManager defaultManager]; - // Be sure that the first time this app runs, it's not writing to a preexisting folder - static BOOL gShouldReuseFolder = NO; - if (!gShouldReuseFolder) { - gShouldReuseFolder = YES; - NSString *origLogDir = logDirectory; - for (int ctr = 2; ctr < 20; ++ctr) { - if (![fileMgr fileExistsAtPath:logDirectory]) break; - - // append a digit - logDirectory = [origLogDir stringByAppendingFormat:@"_%d", ctr]; - } - } - if (![fileMgr createDirectoryAtPath:logDirectory - withIntermediateDirectories:YES - attributes:nil - error:NULL]) return nil; - } - gLogDirectoryForCurrentRun = logDirectory; - - return gLogDirectoryForCurrentRun; -} - -+ (void)setLoggingEnabled:(BOOL)isLoggingEnabled { - gIsLoggingEnabled = isLoggingEnabled; -} - -+ (BOOL)isLoggingEnabled { - return gIsLoggingEnabled; -} - -+ (void)setLoggingToFileEnabled:(BOOL)isLoggingToFileEnabled { - gIsLoggingToFile = isLoggingToFileEnabled; -} - -+ (BOOL)isLoggingToFileEnabled { - return gIsLoggingToFile; -} - -+ (void)setLoggingProcessName:(NSString *)processName { - gLoggingProcessName = [processName copy]; -} - -+ (NSString *)loggingProcessName { - // get the process name (once per run) replacing spaces with underscores - if (!gLoggingProcessName) { - NSString *procName = [[NSProcessInfo processInfo] processName]; - gLoggingProcessName = [procName stringByReplacingOccurrencesOfString:@" " withString:@"_"]; - } - return gLoggingProcessName; -} - -+ (void)setLoggingDateStamp:(NSString *)dateStamp { - gLoggingDateStamp = [dateStamp copy]; -} - -+ (NSString *)loggingDateStamp { - // We'll pick one date stamp per run, so a run that starts at a later second - // will get a unique results html file - if (!gLoggingDateStamp) { - // produce a string like 08-21_01-41-23PM - - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - [formatter setFormatterBehavior:NSDateFormatterBehavior10_4]; - [formatter setDateFormat:@"M-dd_hh-mm-ssa"]; - - gLoggingDateStamp = [formatter stringFromDate:[NSDate date]]; - } - return gLoggingDateStamp; -} - -+ (NSString *)processNameLogPrefix { - static NSString *gPrefix = nil; - if (!gPrefix) { - NSString *processName = [self loggingProcessName]; - gPrefix = [[NSString alloc] initWithFormat:@"%@_log_", processName]; - } - return gPrefix; -} - -+ (NSString *)symlinkNameSuffix { - return @"_log_newest.html"; -} - -+ (NSString *)htmlFileName { - return @"aperçu_http_log.html"; -} - -+ (void)deleteLogDirectoriesOlderThanDate:(NSDate *)cutoffDate { - NSFileManager *fileMgr = [NSFileManager defaultManager]; - NSURL *parentDir = [NSURL fileURLWithPath:[[self class] loggingDirectory]]; - NSURL *logDirectoryForCurrentRun = - [NSURL fileURLWithPath:[[self class] logDirectoryForCurrentRun]]; - NSError *error; - NSArray *contents = [fileMgr contentsOfDirectoryAtURL:parentDir - includingPropertiesForKeys:@[ NSURLContentModificationDateKey ] - options:0 - error:&error]; - for (NSURL *itemURL in contents) { - if ([itemURL isEqual:logDirectoryForCurrentRun]) continue; - - NSDate *modDate; - if ([itemURL getResourceValue:&modDate - forKey:NSURLContentModificationDateKey - error:&error]) { - if ([modDate compare:cutoffDate] == NSOrderedAscending) { - if (![fileMgr removeItemAtURL:itemURL error:&error]) { - NSLog(@"deleteLogDirectoriesOlderThanDate failed to delete %@: %@", - itemURL.path, error); - } - } - } else { - NSLog(@"deleteLogDirectoriesOlderThanDate failed to get mod date of %@: %@", - itemURL.path, error); - } - } -} - -// formattedStringFromData returns a prettyprinted string for XML or JSON input, -// and a plain string for other input data -- (NSString *)formattedStringFromData:(NSData *)inputData - contentType:(NSString *)contentType - JSON:(NSDictionary **)outJSON { - if (!inputData) return nil; - - // if the content type is JSON and we have the parsing class available, use that - if ([contentType hasPrefix:@"application/json"] && inputData.length > 5) { - // convert from JSON string to NSObjects and back to a formatted string - NSMutableDictionary *obj = [NSJSONSerialization JSONObjectWithData:inputData - options:NSJSONReadingMutableContainers - error:NULL]; - if (obj) { - if (outJSON) *outJSON = obj; - if ([obj isKindOfClass:[NSMutableDictionary class]]) { - // for security and privacy, omit OAuth 2 response access and refresh tokens - if ([obj valueForKey:@"refresh_token"] != nil) { - [obj setObject:@"_snip_" forKey:@"refresh_token"]; - } - if ([obj valueForKey:@"access_token"] != nil) { - [obj setObject:@"_snip_" forKey:@"access_token"]; - } - } - NSData *data = [NSJSONSerialization dataWithJSONObject:obj - options:NSJSONWritingPrettyPrinted - error:NULL]; - if (data) { - NSString *jsonStr = [[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding]; - return jsonStr; - } - } - } - -#if !TARGET_OS_IPHONE && !GTM_SKIP_LOG_XMLFORMAT - // verify that this data starts with the bytes indicating XML - - NSString *const kXMLLintPath = @"/usr/bin/xmllint"; - static BOOL gHasCheckedAvailability = NO; - static BOOL gIsXMLLintAvailable = NO; - - if (!gHasCheckedAvailability) { - gIsXMLLintAvailable = [[NSFileManager defaultManager] fileExistsAtPath:kXMLLintPath]; - gHasCheckedAvailability = YES; - } - if (gIsXMLLintAvailable - && inputData.length > 5 - && strncmp(inputData.bytes, " 0) { - // success - inputData = formattedData; - } - } -#else - // we can't call external tasks on the iPhone; leave the XML unformatted -#endif - - NSString *dataStr = [[NSString alloc] initWithData:inputData - encoding:NSUTF8StringEncoding]; - return dataStr; -} - -// stringFromStreamData creates a string given the supplied data -// -// If NSString can create a UTF-8 string from the data, then that is returned. -// -// Otherwise, this routine tries to find a MIME boundary at the beginning of the data block, and -// uses that to break up the data into parts. Each part will be used to try to make a UTF-8 string. -// For parts that fail, a replacement string showing the part header and <> is supplied -// in place of the binary data. - -- (NSString *)stringFromStreamData:(NSData *)data - contentType:(NSString *)contentType { - - if (!data) return nil; - - // optimistically, see if the whole data block is UTF-8 - NSString *streamDataStr = [self formattedStringFromData:data - contentType:contentType - JSON:NULL]; - if (streamDataStr) return streamDataStr; - - // Munge a buffer by replacing non-ASCII bytes with underscores, and turn that munged buffer an - // NSString. That gives us a string we can use with NSScanner. - NSMutableData *mutableData = [NSMutableData dataWithData:data]; - unsigned char *bytes = (unsigned char *)mutableData.mutableBytes; - - for (unsigned int idx = 0; idx < mutableData.length; ++idx) { - if (bytes[idx] > 0x7F || bytes[idx] == 0) { - bytes[idx] = '_'; - } - } - - NSString *mungedStr = [[NSString alloc] initWithData:mutableData - encoding:NSUTF8StringEncoding]; - if (mungedStr) { - - // scan for the boundary string - NSString *boundary = nil; - NSScanner *scanner = [NSScanner scannerWithString:mungedStr]; - - if ([scanner scanUpToString:@"\r\n" intoString:&boundary] - && [boundary hasPrefix:@"--"]) { - - // we found a boundary string; use it to divide the string into parts - NSArray *mungedParts = [mungedStr componentsSeparatedByString:boundary]; - - // look at each munged part in the original string, and try to convert those into UTF-8 - NSMutableArray *origParts = [NSMutableArray array]; - NSUInteger offset = 0; - for (NSString *mungedPart in mungedParts) { - NSUInteger partSize = mungedPart.length; - NSData *origPartData = [data subdataWithRange:NSMakeRange(offset, partSize)]; - NSString *origPartStr = [[NSString alloc] initWithData:origPartData - encoding:NSUTF8StringEncoding]; - if (origPartStr) { - // we could make this original part into UTF-8; use the string - [origParts addObject:origPartStr]; - } else { - // this part can't be made into UTF-8; scan the header, if we can - NSString *header = nil; - NSScanner *headerScanner = [NSScanner scannerWithString:mungedPart]; - if (![headerScanner scanUpToString:@"\r\n\r\n" intoString:&header]) { - // we couldn't find a header - header = @""; - } - // make a part string with the header and <> - NSString *binStr = [NSString stringWithFormat:@"\r%@\r<<%lu bytes>>\r", - header, (long)(partSize - header.length)]; - [origParts addObject:binStr]; - } - offset += partSize + boundary.length; - } - // rejoin the original parts - streamDataStr = [origParts componentsJoinedByString:boundary]; - } - } - if (!streamDataStr) { - // give up; just make a string showing the uploaded bytes - streamDataStr = [NSString stringWithFormat:@"<<%u bytes>>", (unsigned int)data.length]; - } - return streamDataStr; -} - -// logFetchWithError is called following a successful or failed fetch attempt -// -// This method does all the work for appending to and creating log files - -- (void)logFetchWithError:(NSError *)error { - if (![[self class] isLoggingEnabled]) return; - NSString *logDirectory = [[self class] logDirectoryForCurrentRun]; - if (!logDirectory) return; - NSString *processName = [[self class] loggingProcessName]; - - // TODO: add Javascript to display response data formatted in hex - - // each response's NSData goes into its own xml or txt file, though all responses for this run of - // the app share a main html file. This counter tracks all fetch responses for this app run. - // - // we'll use a local variable since this routine may be reentered while waiting for XML formatting - // to be completed by an external task - static int gResponseCounter = 0; - int responseCounter = ++gResponseCounter; - - NSURLResponse *response = [self response]; - NSDictionary *responseHeaders = [self responseHeaders]; - NSString *responseDataStr = nil; - NSDictionary *responseJSON = nil; - - // if there's response data, decide what kind of file to put it in based on the first bytes of the - // file or on the mime type supplied by the server - NSString *responseMIMEType = [response MIMEType]; - BOOL isResponseImage = NO; - - // file name for an image data file - NSString *responseDataFileName = nil; - - int64_t responseDataLength = self.downloadedLength; - if (responseDataLength > 0) { - NSData *downloadedData = self.downloadedData; - if (downloadedData == nil - && responseDataLength > 0 - && responseDataLength < 20000 - && self.destinationFileURL) { - // There's a download file that's not too big, so get the data to display from the downloaded - // file. - NSURL *destinationURL = self.destinationFileURL; - downloadedData = [NSData dataWithContentsOfURL:destinationURL]; - } - NSString *responseType = [responseHeaders valueForKey:@"Content-Type"]; - responseDataStr = [self formattedStringFromData:downloadedData - contentType:responseType - JSON:&responseJSON]; - NSString *responseDataExtn = nil; - NSData *dataToWrite = nil; - if (responseDataStr) { - // we were able to make a UTF-8 string from the response data - if ([responseMIMEType isEqual:@"application/atom+xml"] - || [responseMIMEType hasSuffix:@"/xml"]) { - responseDataExtn = @"xml"; - dataToWrite = [responseDataStr dataUsingEncoding:NSUTF8StringEncoding]; - } - } else if ([responseMIMEType isEqual:@"image/jpeg"]) { - responseDataExtn = @"jpg"; - dataToWrite = downloadedData; - isResponseImage = YES; - } else if ([responseMIMEType isEqual:@"image/gif"]) { - responseDataExtn = @"gif"; - dataToWrite = downloadedData; - isResponseImage = YES; - } else if ([responseMIMEType isEqual:@"image/png"]) { - responseDataExtn = @"png"; - dataToWrite = downloadedData; - isResponseImage = YES; - } else { - // add more non-text types here - } - // if we have an extension, save the raw data in a file with that extension - if (responseDataExtn && dataToWrite) { - // generate a response file base name like - NSString *responseBaseName = [NSString stringWithFormat:@"fetch_%d_response", responseCounter]; - responseDataFileName = [responseBaseName stringByAppendingPathExtension:responseDataExtn]; - NSString *responseDataFilePath = [logDirectory stringByAppendingPathComponent:responseDataFileName]; - - NSError *downloadedError = nil; - if (gIsLoggingToFile && ![dataToWrite writeToFile:responseDataFilePath - options:0 - error:&downloadedError]) { - NSLog(@"%@ logging write error:%@ (%@)", [self class], downloadedError, responseDataFileName); - } - } - } - // we'll have one main html file per run of the app - NSString *htmlName = [[self class] htmlFileName]; - NSString *htmlPath =[logDirectory stringByAppendingPathComponent:htmlName]; - - // if the html file exists (from logging previous fetches) we don't need - // to re-write the header or the scripts - NSFileManager *fileMgr = [NSFileManager defaultManager]; - BOOL didFileExist = [fileMgr fileExistsAtPath:htmlPath]; - - NSMutableString* outputHTML = [NSMutableString string]; - - // we need a header to say we'll have UTF-8 text - if (!didFileExist) { - [outputHTML appendFormat:@"%@ HTTP fetch log %@", - processName, [[self class] loggingDateStamp]]; - } - // now write the visible html elements - NSString *copyableFileName = [NSString stringWithFormat:@"fetch_%d.txt", responseCounter]; - - NSDate *now = [NSDate date]; - // write the date & time, the comment, and the link to the plain-text (copyable) log - [outputHTML appendFormat:@"%@      ", now]; - - NSString *comment = [self comment]; - if (comment.length > 0) { - [outputHTML appendFormat:@"%@      ", comment]; - } - [outputHTML appendFormat:@"request/response log
", copyableFileName]; - NSTimeInterval elapsed = -self.initialBeginFetchDate.timeIntervalSinceNow; - [outputHTML appendFormat:@"elapsed: %5.3fsec
", elapsed]; - - // write the request URL - NSURLRequest *request = self.request; - NSString *requestMethod = request.HTTPMethod; - NSURL *requestURL = request.URL; - - // Save the request URL for next time in case this redirects. - NSString *redirectedFromURLString = [self.redirectedFromURL absoluteString]; - self.redirectedFromURL = [requestURL copy]; - if (redirectedFromURLString) { - [outputHTML appendFormat:@"redirected from %@
", - redirectedFromURLString]; - } - [outputHTML appendFormat:@"request: %@ %@
\n", requestMethod, requestURL]; - - // write the request headers - NSDictionary *requestHeaders = request.allHTTPHeaderFields; - NSUInteger numberOfRequestHeaders = requestHeaders.count; - if (numberOfRequestHeaders > 0) { - // Indicate if the request is authorized; warn if the request is authorized but non-SSL - NSString *auth = [requestHeaders objectForKey:@"Authorization"]; - NSString *headerDetails = @""; - if (auth) { - BOOL isInsecure = [[requestURL scheme] isEqual:@"http"]; - if (isInsecure) { - // 26A0 = ⚠ - headerDetails = - @"   authorized, non-SSL "; - } else { - headerDetails = @"   authorized"; - } - } - NSString *cookiesHdr = [requestHeaders objectForKey:@"Cookie"]; - if (cookiesHdr) { - headerDetails = [headerDetails stringByAppendingString:@"   cookies"]; - } - NSString *matchHdr = [requestHeaders objectForKey:@"If-Match"]; - if (matchHdr) { - headerDetails = [headerDetails stringByAppendingString:@"   if-match"]; - } - matchHdr = [requestHeaders objectForKey:@"If-None-Match"]; - if (matchHdr) { - headerDetails = [headerDetails stringByAppendingString:@"   if-none-match"]; - } - [outputHTML appendFormat:@"   headers: %d %@
", - (int)numberOfRequestHeaders, headerDetails]; - } else { - [outputHTML appendFormat:@"   headers: none
"]; - } - // write the request post data - NSData *bodyData = nil; - NSData *loggedStreamData = self.loggedStreamData; - if (loggedStreamData) { - bodyData = loggedStreamData; - } else { - bodyData = self.bodyData; - if (bodyData == nil) { - bodyData = self.request.HTTPBody; - } - } - uint64_t bodyDataLength = bodyData.length; - - if (bodyData.length == 0) { - // If the data is in a body upload file URL, read that in if it's not huge. - NSURL *bodyFileURL = self.bodyFileURL; - if (bodyFileURL) { - NSNumber *fileSizeNum = nil; - NSError *fileSizeError = nil; - if ([bodyFileURL getResourceValue:&fileSizeNum - forKey:NSURLFileSizeKey - error:&fileSizeError]) { - bodyDataLength = [fileSizeNum unsignedLongLongValue]; - if (bodyDataLength > 0 && bodyDataLength < 50000) { - bodyData = [NSData dataWithContentsOfURL:bodyFileURL - options:NSDataReadingUncached - error:&fileSizeError]; - } - } - } - } - NSString *bodyDataStr = nil; - NSString *postType = [requestHeaders valueForKey:@"Content-Type"]; - - if (bodyDataLength > 0) { - [outputHTML appendFormat:@"   data: %llu bytes, %@
\n", - bodyDataLength, postType ? postType : @"(no type)"]; - NSString *logRequestBody = self.logRequestBody; - if (logRequestBody) { - bodyDataStr = [logRequestBody copy]; - self.logRequestBody = nil; - } else { - bodyDataStr = [self stringFromStreamData:bodyData - contentType:postType]; - if (bodyDataStr) { - // remove OAuth 2 client secret and refresh token - bodyDataStr = [[self class] snipSubstringOfString:bodyDataStr - betweenStartString:@"client_secret=" - endString:@"&"]; - bodyDataStr = [[self class] snipSubstringOfString:bodyDataStr - betweenStartString:@"refresh_token=" - endString:@"&"]; - // remove ClientLogin password - bodyDataStr = [[self class] snipSubstringOfString:bodyDataStr - betweenStartString:@"&Passwd=" - endString:@"&"]; - } - } - } else { - // no post data - } - // write the response status, MIME type, URL - NSInteger status = [self statusCode]; - if (response) { - NSString *statusString = @""; - if (status != 0) { - if (status == 200 || status == 201) { - statusString = [NSString stringWithFormat:@"%ld", (long)status]; - - // report any JSON-RPC error - if ([responseJSON isKindOfClass:[NSDictionary class]]) { - NSDictionary *jsonError = [responseJSON objectForKey:@"error"]; - if ([jsonError isKindOfClass:[NSDictionary class]]) { - NSString *jsonCode = [[jsonError valueForKey:@"code"] description]; - NSString *jsonMessage = [jsonError valueForKey:@"message"]; - if (jsonCode || jsonMessage) { - // 2691 = ⚑ - NSString *const jsonErrFmt = - @"   JSON error: %@ %@  ⚑"; - statusString = [statusString stringByAppendingFormat:jsonErrFmt, - jsonCode ? jsonCode : @"", - jsonMessage ? jsonMessage : @""]; - } - } - } - } else { - // purple for anything other than 200 or 201 - NSString *flag = status >= 400 ? @" ⚑" : @""; // 2691 = ⚑ - NSString *explanation = [NSHTTPURLResponse localizedStringForStatusCode:status]; - NSString *const statusFormat = @"%ld %@ %@"; - statusString = [NSString stringWithFormat:statusFormat, (long)status, explanation, flag]; - } - } - // show the response URL only if it's different from the request URL - NSString *responseURLStr = @""; - NSURL *responseURL = response.URL; - - if (responseURL && ![responseURL isEqual:request.URL]) { - NSString *const responseURLFormat = - @"response URL: %@
\n"; - responseURLStr = [NSString stringWithFormat:responseURLFormat, [responseURL absoluteString]]; - } - [outputHTML appendFormat:@"response:  status %@
\n%@", - statusString, responseURLStr]; - // Write the response headers - NSUInteger numberOfResponseHeaders = responseHeaders.count; - if (numberOfResponseHeaders > 0) { - // Indicate if the server is setting cookies - NSString *cookiesSet = [responseHeaders valueForKey:@"Set-Cookie"]; - NSString *cookiesStr = - cookiesSet ? @"  sets cookies" : @""; - // Indicate if the server is redirecting - NSString *location = [responseHeaders valueForKey:@"Location"]; - BOOL isRedirect = status >= 300 && status <= 399 && location != nil; - NSString *redirectsStr = - isRedirect ? @"  redirects" : @""; - [outputHTML appendFormat:@"   headers: %d %@ %@
\n", - (int)numberOfResponseHeaders, cookiesStr, redirectsStr]; - } else { - [outputHTML appendString:@"   headers: none
\n"]; - } - } - // error - if (error) { - [outputHTML appendFormat:@"Error: %@
\n", error.description]; - } - // Write the response data - if (responseDataFileName) { - if (isResponseImage) { - // Make a small inline image that links to the full image file - [outputHTML appendFormat:@"   data: %lld bytes, %@
", - responseDataLength, responseMIMEType]; - NSString *const fmt = - @"image\n"; - [outputHTML appendFormat:fmt, responseDataFileName, responseDataFileName]; - } else { - // The response data was XML; link to the xml file - NSString *const fmt = - @"   data: %lld bytes, %@   %@\n"; - [outputHTML appendFormat:fmt, responseDataLength, responseMIMEType, - responseDataFileName, [responseDataFileName pathExtension]]; - } - } else { - // The response data was not an image; just show the length and MIME type - [outputHTML appendFormat:@"   data: %lld bytes, %@\n", - responseDataLength, responseMIMEType ? responseMIMEType : @"(no response type)"]; - } - // Make a single string of the request and response, suitable for copying - // to the clipboard and pasting into a bug report - NSMutableString *copyable = [NSMutableString string]; - if (comment) { - [copyable appendFormat:@"%@\n\n", comment]; - } - [copyable appendFormat:@"%@ elapsed: %5.3fsec\n", now, elapsed]; - if (redirectedFromURLString) { - [copyable appendFormat:@"Redirected from %@\n", redirectedFromURLString]; - } - [copyable appendFormat:@"Request: %@ %@\n", requestMethod, requestURL]; - if (requestHeaders.count > 0) { - [copyable appendFormat:@"Request headers:\n%@\n", - [[self class] headersStringForDictionary:requestHeaders]]; - } - if (bodyDataLength > 0) { - [copyable appendFormat:@"Request body: (%llu bytes)\n", bodyDataLength]; - if (bodyDataStr) { - [copyable appendFormat:@"%@\n", bodyDataStr]; - } - [copyable appendString:@"\n"]; - } - if (response) { - [copyable appendFormat:@"Response: status %d\n", (int) status]; - [copyable appendFormat:@"Response headers:\n%@\n", - [[self class] headersStringForDictionary:responseHeaders]]; - [copyable appendFormat:@"Response body: (%lld bytes)\n", responseDataLength]; - if (responseDataLength > 0) { - NSString *logResponseBody = self.logResponseBody; - if (logResponseBody) { - // The user has provided the response body text. - responseDataStr = [logResponseBody copy]; - self.logResponseBody = nil; - } - if (responseDataStr != nil) { - [copyable appendFormat:@"%@\n", responseDataStr]; - } else { - // Even though it's redundant, we'll put in text to indicate that all the bytes are binary. - if (self.destinationFileURL) { - [copyable appendFormat:@"<<%lld bytes>> to file %@\n", - responseDataLength, self.destinationFileURL.path]; - } else { - [copyable appendFormat:@"<<%lld bytes>>\n", responseDataLength]; - } - } - } - } - if (error) { - [copyable appendFormat:@"Error: %@\n", error]; - } - // Save to log property before adding the separator - self.log = copyable; - - [copyable appendString:@"-----------------------------------------------------------\n"]; - - // Write the copyable version to another file (linked to at the top of the html file, above) - // - // Ideally, something to just copy this to the clipboard like - // Copy here." - // would work everywhere, but it only works in Safari as of 8/2010 - if (gIsLoggingToFile) { - NSString *parentDir = [[self class] loggingDirectory]; - NSString *copyablePath = [logDirectory stringByAppendingPathComponent:copyableFileName]; - NSError *copyableError = nil; - if (![copyable writeToFile:copyablePath - atomically:NO - encoding:NSUTF8StringEncoding - error:©ableError]) { - // Error writing to file - NSLog(@"%@ logging write error:%@ (%@)", [self class], copyableError, copyablePath); - } - [outputHTML appendString:@"

"]; - - // Append the HTML to the main output file - const char* htmlBytes = outputHTML.UTF8String; - NSOutputStream *stream = [NSOutputStream outputStreamToFileAtPath:htmlPath - append:YES]; - [stream open]; - [stream write:(const uint8_t *) htmlBytes maxLength:strlen(htmlBytes)]; - [stream close]; - - // Make a symlink to the latest html - NSString *const symlinkNameSuffix = [[self class] symlinkNameSuffix]; - NSString *symlinkName = [processName stringByAppendingString:symlinkNameSuffix]; - NSString *symlinkPath = [parentDir stringByAppendingPathComponent:symlinkName]; - - [fileMgr removeItemAtPath:symlinkPath error:NULL]; - [fileMgr createSymbolicLinkAtPath:symlinkPath - withDestinationPath:htmlPath - error:NULL]; -#if TARGET_OS_IPHONE - static BOOL gReportedLoggingPath = NO; - if (!gReportedLoggingPath) { - gReportedLoggingPath = YES; - NSLog(@"GTMSessionFetcher logging to \"%@\"", parentDir); - } -#endif - } -} - -- (NSInputStream *)loggedInputStreamForInputStream:(NSInputStream *)inputStream { - if (!inputStream) return nil; - if (![GTMSessionFetcher isLoggingEnabled]) return inputStream; - - [self clearLoggedStreamData]; // Clear any previous data. - Class monitorClass = NSClassFromString(@"GTMReadMonitorInputStream"); - if (!monitorClass) { - NSString const *str = @"<>"; - NSData *stringData = [str dataUsingEncoding:NSUTF8StringEncoding]; - [self appendLoggedStreamData:stringData]; - return inputStream; - } - inputStream = [monitorClass inputStreamWithStream:inputStream]; - - GTMReadMonitorInputStream *readMonitorInputStream = (GTMReadMonitorInputStream *)inputStream; - [readMonitorInputStream setReadDelegate:self]; - SEL readSel = @selector(inputStream:readIntoBuffer:length:); - [readMonitorInputStream setReadSelector:readSel]; - - return inputStream; -} - -- (GTMSessionFetcherBodyStreamProvider)loggedStreamProviderForStreamProvider: - (GTMSessionFetcherBodyStreamProvider)streamProvider { - if (!streamProvider) return nil; - if (![GTMSessionFetcher isLoggingEnabled]) return streamProvider; - - [self clearLoggedStreamData]; // Clear any previous data. - Class monitorClass = NSClassFromString(@"GTMReadMonitorInputStream"); - if (!monitorClass) { - NSString const *str = @"<>"; - NSData *stringData = [str dataUsingEncoding:NSUTF8StringEncoding]; - [self appendLoggedStreamData:stringData]; - return streamProvider; - } - GTMSessionFetcherBodyStreamProvider loggedStreamProvider = - ^(GTMSessionFetcherBodyStreamProviderResponse response) { - streamProvider(^(NSInputStream *bodyStream) { - bodyStream = [self loggedInputStreamForInputStream:bodyStream]; - response(bodyStream); - }); - }; - return loggedStreamProvider; -} - -@end - -@implementation GTMSessionFetcher (GTMSessionFetcherLoggingUtilities) - -- (void)inputStream:(GTMReadMonitorInputStream *)stream - readIntoBuffer:(void *)buffer - length:(int64_t)length { - // append the captured data - NSData *data = [NSData dataWithBytesNoCopy:buffer - length:(NSUInteger)length - freeWhenDone:NO]; - [self appendLoggedStreamData:data]; -} - -#pragma mark Fomatting Utilities - -+ (NSString *)snipSubstringOfString:(NSString *)originalStr - betweenStartString:(NSString *)startStr - endString:(NSString *)endStr { -#if SKIP_GTM_FETCH_LOGGING_SNIPPING - return originalStr; -#else - if (!originalStr) return nil; - - // Find the start string, and replace everything between it - // and the end string (or the end of the original string) with "_snip_" - NSRange startRange = [originalStr rangeOfString:startStr]; - if (startRange.location == NSNotFound) return originalStr; - - // We found the start string - NSUInteger originalLength = originalStr.length; - NSUInteger startOfTarget = NSMaxRange(startRange); - NSRange targetAndRest = NSMakeRange(startOfTarget, originalLength - startOfTarget); - NSRange endRange = [originalStr rangeOfString:endStr - options:0 - range:targetAndRest]; - NSRange replaceRange; - if (endRange.location == NSNotFound) { - // Found no end marker so replace to end of string - replaceRange = targetAndRest; - } else { - // Replace up to the endStr - replaceRange = NSMakeRange(startOfTarget, endRange.location - startOfTarget); - } - NSString *result = [originalStr stringByReplacingCharactersInRange:replaceRange - withString:@"_snip_"]; - return result; -#endif // SKIP_GTM_FETCH_LOGGING_SNIPPING -} - -+ (NSString *)headersStringForDictionary:(NSDictionary *)dict { - // Format the dictionary in http header style, like - // Accept: application/json - // Cache-Control: no-cache - // Content-Type: application/json; charset=utf-8 - // - // Pad the key names, but not beyond 16 chars, since long custom header - // keys just create too much whitespace - NSArray *keys = [dict.allKeys sortedArrayUsingSelector:@selector(compare:)]; - - NSMutableString *str = [NSMutableString string]; - for (NSString *key in keys) { - NSString *value = [dict valueForKey:key]; - if ([key isEqual:@"Authorization"]) { - // Remove OAuth 1 token - value = [[self class] snipSubstringOfString:value - betweenStartString:@"oauth_token=\"" - endString:@"\""]; - - // Remove OAuth 2 bearer token (draft 16, and older form) - value = [[self class] snipSubstringOfString:value - betweenStartString:@"Bearer " - endString:@"\n"]; - value = [[self class] snipSubstringOfString:value - betweenStartString:@"OAuth " - endString:@"\n"]; - - // Remove Google ClientLogin - value = [[self class] snipSubstringOfString:value - betweenStartString:@"GoogleLogin auth=" - endString:@"\n"]; - } - [str appendFormat:@" %@: %@\n", key, value]; - } - return str; -} - -@end - -#endif // !STRIP_GTM_FETCH_LOGGING diff --git a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.h b/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.h deleted file mode 100755 index a696ac7..0000000 --- a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.h +++ /dev/null @@ -1,190 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// For best performance and convenient usage, fetchers should be generated by a common -// GTMSessionFetcherService instance, like -// -// _fetcherService = [[GTMSessionFetcherService alloc] init]; -// GTMSessionFetcher* myFirstFetcher = [_fetcherService fetcherWithRequest:request1]; -// GTMSessionFetcher* mySecondFetcher = [_fetcherService fetcherWithRequest:request2]; - -#import "GTMSessionFetcher.h" - -GTM_ASSUME_NONNULL_BEGIN - -// Notifications. - -// This notification indicates a reusable session has become invalid. It is intended mainly for the -// service's unit tests. -// -// The notification object is the fetcher service. -// The invalid session is provided via the userInfo kGTMSessionFetcherServiceSessionKey key. -extern NSString *const kGTMSessionFetcherServiceSessionBecameInvalidNotification; -extern NSString *const kGTMSessionFetcherServiceSessionKey; - -@interface GTMSessionFetcherService : NSObject - -// Queues of delayed and running fetchers. Each dictionary contains arrays -// of GTMSessionFetcher *fetchers, keyed by NSString *host -@property(atomic, strong, readonly, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSArray *) *delayedFetchersByHost; -@property(atomic, strong, readonly, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSArray *) *runningFetchersByHost; - -// A max value of 0 means no fetchers should be delayed. -// The default limit is 10 simultaneous fetchers targeting each host. -// This does not apply to fetchers whose useBackgroundSession property is YES. Since services are -// not resurrected on an app relaunch, delayed fetchers would effectively be abandoned. -@property(atomic, assign) NSUInteger maxRunningFetchersPerHost; - -// Properties to be applied to each fetcher; see GTMSessionFetcher.h for descriptions -@property(atomic, strong, GTM_NULLABLE) NSURLSessionConfiguration *configuration; -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherConfigurationBlock configurationBlock; -@property(atomic, strong, GTM_NULLABLE) NSHTTPCookieStorage *cookieStorage; -@property(atomic, strong, GTM_NULL_RESETTABLE) dispatch_queue_t callbackQueue; -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherChallengeBlock challengeBlock; -@property(atomic, strong, GTM_NULLABLE) NSURLCredential *credential; -@property(atomic, strong) NSURLCredential *proxyCredential; -@property(atomic, copy, GTM_NULLABLE) GTM_NSArrayOf(NSString *) *allowedInsecureSchemes; -@property(atomic, assign) BOOL allowLocalhostRequest; -@property(atomic, assign) BOOL allowInvalidServerCertificates; -@property(atomic, assign, getter=isRetryEnabled) BOOL retryEnabled; -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherRetryBlock retryBlock; -@property(atomic, assign) NSTimeInterval maxRetryInterval; -@property(atomic, assign) NSTimeInterval minRetryInterval; -@property(atomic, copy, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, id) *properties; - -#if GTM_BACKGROUND_TASK_FETCHING -@property(atomic, assign) BOOL skipBackgroundTask; -#endif - -// A default useragent of GTMFetcherStandardUserAgentString(nil) will be given to each fetcher -// created by this service unless the request already has a user-agent header set. -// This default will be added starting with builds with the SDKs for OS X 10.11 and iOS 9. -// -// To use the configuration's default user agent, set this property to nil. -@property(atomic, copy, GTM_NULLABLE) NSString *userAgent; - -// The authorizer to attach to the created fetchers. If a specific fetcher should -// not authorize its requests, the fetcher's authorizer property may be set to nil -// before the fetch begins. -@property(atomic, strong, GTM_NULLABLE) id authorizer; - -// Delegate queue used by the session when calling back to the fetcher. The default -// is the main queue. Changing this does not affect the queue used to call back to the -// application; that is specified by the callbackQueue property above. -@property(atomic, strong, GTM_NULL_RESETTABLE) NSOperationQueue *sessionDelegateQueue; - -// When enabled, indicates the same session should be used by subsequent fetchers. -// -// This is enabled by default. -@property(atomic, assign) BOOL reuseSession; - -// Sets the delay until an unused session is invalidated. -// The default interval is 60 seconds. -// -// If the interval is set to 0, then any reused session is not invalidated except by -// explicitly invoking -resetSession. Be aware that setting the interval to 0 thus -// causes the session's delegate to be retained until the session is explicitly reset. -@property(atomic, assign) NSTimeInterval unusedSessionTimeout; - -// If shouldReuseSession is enabled, this will force creation of a new session when future -// fetchers begin. -- (void)resetSession; - -// Create a fetcher -// -// These methods will return a fetcher. If successfully created, the connection -// will hold a strong reference to it for the life of the connection as well. -// So the caller doesn't have to hold onto the fetcher explicitly unless they -// want to be able to monitor or cancel it. -- (GTMSessionFetcher *)fetcherWithRequest:(NSURLRequest *)request; -- (GTMSessionFetcher *)fetcherWithURL:(NSURL *)requestURL; -- (GTMSessionFetcher *)fetcherWithURLString:(NSString *)requestURLString; - -// Common method for fetcher creation. -// -// -fetcherWithRequest:fetcherClass: may be overridden to customize creation of -// fetchers. This is the ONLY method in the GTMSessionFetcher library intended to -// be overridden. -- (id)fetcherWithRequest:(NSURLRequest *)request - fetcherClass:(Class)fetcherClass; - -- (BOOL)isDelayingFetcher:(GTMSessionFetcher *)fetcher; - -- (NSUInteger)numberOfFetchers; // running + delayed fetchers -- (NSUInteger)numberOfRunningFetchers; -- (NSUInteger)numberOfDelayedFetchers; - -// Return a list of all running or delayed fetchers. This includes fetchers created -// by the service which have been started and have not yet stopped. -// -// Returns an array of fetcher objects, or nil if none. -- (GTM_NULLABLE GTM_NSArrayOf(GTMSessionFetcher *) *)issuedFetchers; - -// Search for running or delayed fetchers with the specified URL. -// -// Returns an array of fetcher objects found, or nil if none found. -- (GTM_NULLABLE GTM_NSArrayOf(GTMSessionFetcher *) *)issuedFetchersWithRequestURL:(NSURL *)requestURL; - -- (void)stopAllFetchers; - -// Methods for use by the fetcher class only. -- (GTM_NULLABLE NSURLSession *)session; -- (GTM_NULLABLE NSURLSession *)sessionForFetcherCreation; -- (GTM_NULLABLE id)sessionDelegate; -- (GTM_NULLABLE NSDate *)stoppedAllFetchersDate; - -// The testBlock can inspect its fetcher parameter's request property to -// determine which fetcher is being faked. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherTestBlock testBlock; - -@end - -@interface GTMSessionFetcherService (TestingSupport) - -// Convenience method to create a fetcher service for testing. -// -// Fetchers generated by this mock fetcher service will not perform any -// network operation, but will invoke callbacks and provide the supplied data -// or error to the completion handler. -// -// You can make more customized mocks by setting the test block property of the service -// or fetcher; the test block can inspect the fetcher's request or other properties. -// -// See the description of the testBlock property below. -+ (instancetype)mockFetcherServiceWithFakedData:(GTM_NULLABLE NSData *)fakedDataOrNil - fakedError:(GTM_NULLABLE NSError *)fakedErrorOrNil; - -// Spin the run loop and discard events (or, if not on the main thread, just sleep the thread) -// until all running and delayed fetchers have completed. -// -// This is only for use in testing or in tools without a user interface. -// -// Synchronous fetches should never be done by shipping apps; they are -// sufficient reason for rejection from the app store. -// -// Returns NO if timed out. -- (BOOL)waitForCompletionOfAllFetchersWithTimeout:(NSTimeInterval)timeoutInSeconds; - -@end - -@interface GTMSessionFetcherService (BackwardsCompatibilityOnly) - -// Clients using GTMSessionFetcher should set the cookie storage explicitly themselves. -// This method is just for compatibility with the old fetcher. -@property(atomic, assign) NSInteger cookieStorageMethod; - -@end - -GTM_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.m b/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.m deleted file mode 100755 index fc6e6d9..0000000 --- a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.m +++ /dev/null @@ -1,1352 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if !defined(__has_feature) || !__has_feature(objc_arc) -#error "This file requires ARC support." -#endif - -#import "GTMSessionFetcherService.h" - -NSString *const kGTMSessionFetcherServiceSessionBecameInvalidNotification - = @"kGTMSessionFetcherServiceSessionBecameInvalidNotification"; -NSString *const kGTMSessionFetcherServiceSessionKey - = @"kGTMSessionFetcherServiceSessionKey"; - -#if !GTMSESSION_BUILD_COMBINED_SOURCES -@interface GTMSessionFetcher (ServiceMethods) -- (BOOL)beginFetchMayDelay:(BOOL)mayDelay - mayAuthorize:(BOOL)mayAuthorize; -@end -#endif // !GTMSESSION_BUILD_COMBINED_SOURCES - -@interface GTMSessionFetcherService () - -@property(atomic, strong, readwrite) NSDictionary *delayedFetchersByHost; -@property(atomic, strong, readwrite) NSDictionary *runningFetchersByHost; - -@end - -// Since NSURLSession doesn't support a separate delegate per task (!), instances of this -// class serve as a session delegate trampoline. -// -// This class maps a session's tasks to fetchers, and resends delegate messages to the task's -// fetcher. -@interface GTMSessionFetcherSessionDelegateDispatcher : NSObject - -// The session for the tasks in this dispatcher's task-to-fetcher map. -@property(atomic) NSURLSession *session; - -// The timer interval for invalidating a session that has no active tasks. -@property(atomic) NSTimeInterval discardInterval; - -// The current discard timer. -@property(atomic, readonly) NSTimer *discardTimer; - - -- (instancetype)initWithParentService:(GTMSessionFetcherService *)parentService - sessionDiscardInterval:(NSTimeInterval)discardInterval; - -- (void)setFetcher:(GTMSessionFetcher *)fetcher - forTask:(NSURLSessionTask *)task; -- (void)removeFetcher:(GTMSessionFetcher *)fetcher; - -// Before using a session, tells the delegate dispatcher to stop the discard timer. -- (void)startSessionUsage; - -// When abandoning a delegate dispatcher, we want to avoid the session retaining -// the delegate after tasks complete. -- (void)abandon; - -@end - - -@implementation GTMSessionFetcherService { - NSMutableDictionary *_delayedFetchersByHost; - NSMutableDictionary *_runningFetchersByHost; - NSUInteger _maxRunningFetchersPerHost; - - // When this ivar is nil, the service will not reuse sessions. - GTMSessionFetcherSessionDelegateDispatcher *_delegateDispatcher; - - // Fetchers will wait on this if another fetcher is creating the shared NSURLSession. - dispatch_semaphore_t _sessionCreationSemaphore; - - dispatch_queue_t _callbackQueue; - NSOperationQueue *_delegateQueue; - NSHTTPCookieStorage *_cookieStorage; - NSString *_userAgent; - NSTimeInterval _timeout; - - NSURLCredential *_credential; // Username & password. - NSURLCredential *_proxyCredential; // Credential supplied to proxy servers. - - NSInteger _cookieStorageMethod; - - id _authorizer; - - // For waitForCompletionOfAllFetchersWithTimeout: we need to wait on stopped fetchers since - // they've not yet finished invoking their queued callbacks. This array is nil except when - // waiting on fetchers. - NSMutableArray *_stoppedFetchersToWaitFor; - - // For fetchers that enqueued their callbacks before stopAllFetchers was called on the service, - // set a barrier so the callbacks know to bail out. - NSDate *_stoppedAllFetchersDate; -} - -@synthesize maxRunningFetchersPerHost = _maxRunningFetchersPerHost, - configuration = _configuration, - configurationBlock = _configurationBlock, - cookieStorage = _cookieStorage, - userAgent = _userAgent, - challengeBlock = _challengeBlock, - credential = _credential, - proxyCredential = _proxyCredential, - allowedInsecureSchemes = _allowedInsecureSchemes, - allowLocalhostRequest = _allowLocalhostRequest, - allowInvalidServerCertificates = _allowInvalidServerCertificates, - retryEnabled = _retryEnabled, - retryBlock = _retryBlock, - maxRetryInterval = _maxRetryInterval, - minRetryInterval = _minRetryInterval, - properties = _properties, - unusedSessionTimeout = _unusedSessionTimeout, - testBlock = _testBlock; - -#if GTM_BACKGROUND_TASK_FETCHING -@synthesize skipBackgroundTask = _skipBackgroundTask; -#endif - -- (instancetype)init { - self = [super init]; - if (self) { - _delayedFetchersByHost = [[NSMutableDictionary alloc] init]; - _runningFetchersByHost = [[NSMutableDictionary alloc] init]; - _maxRunningFetchersPerHost = 10; - _cookieStorageMethod = -1; - _unusedSessionTimeout = 60.0; - _delegateDispatcher = - [[GTMSessionFetcherSessionDelegateDispatcher alloc] initWithParentService:self - sessionDiscardInterval:_unusedSessionTimeout]; - _callbackQueue = dispatch_get_main_queue(); - - _delegateQueue = [[NSOperationQueue alloc] init]; - _delegateQueue.maxConcurrentOperationCount = 1; - _delegateQueue.name = @"com.google.GTMSessionFetcher.NSURLSessionDelegateQueue"; - - _sessionCreationSemaphore = dispatch_semaphore_create(1); - - // Starting with the SDKs for OS X 10.11/iOS 9, the service has a default useragent. - // Apps can remove this and get the default system "CFNetwork" useragent by setting the - // fetcher service's userAgent property to nil. -#if (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \ - || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0) - _userAgent = GTMFetcherStandardUserAgentString(nil); -#endif - } - return self; -} - -- (void)dealloc { - [self detachAuthorizer]; - [_delegateDispatcher abandon]; -} - -#pragma mark Generate a new fetcher - -// Clients may override this method. Clients should not override any other library methods. -- (id)fetcherWithRequest:(NSURLRequest *)request - fetcherClass:(Class)fetcherClass { - GTMSessionFetcher *fetcher = [[fetcherClass alloc] initWithRequest:request - configuration:self.configuration]; - fetcher.callbackQueue = self.callbackQueue; - fetcher.sessionDelegateQueue = self.sessionDelegateQueue; - fetcher.challengeBlock = self.challengeBlock; - fetcher.credential = self.credential; - fetcher.proxyCredential = self.proxyCredential; - fetcher.authorizer = self.authorizer; - fetcher.cookieStorage = self.cookieStorage; - fetcher.allowedInsecureSchemes = self.allowedInsecureSchemes; - fetcher.allowLocalhostRequest = self.allowLocalhostRequest; - fetcher.allowInvalidServerCertificates = self.allowInvalidServerCertificates; - fetcher.configurationBlock = self.configurationBlock; - fetcher.retryEnabled = self.retryEnabled; - fetcher.retryBlock = self.retryBlock; - fetcher.maxRetryInterval = self.maxRetryInterval; - fetcher.minRetryInterval = self.minRetryInterval; - fetcher.properties = self.properties; - fetcher.service = self; - if (self.cookieStorageMethod >= 0) { - [fetcher setCookieStorageMethod:self.cookieStorageMethod]; - } - -#if GTM_BACKGROUND_TASK_FETCHING - fetcher.skipBackgroundTask = self.skipBackgroundTask; -#endif - - NSString *userAgent = self.userAgent; - if (userAgent.length > 0 - && [request valueForHTTPHeaderField:@"User-Agent"] == nil) { - [fetcher setRequestValue:userAgent - forHTTPHeaderField:@"User-Agent"]; - } - fetcher.testBlock = self.testBlock; - - return fetcher; -} - -- (GTMSessionFetcher *)fetcherWithRequest:(NSURLRequest *)request { - return [self fetcherWithRequest:request - fetcherClass:[GTMSessionFetcher class]]; -} - -- (GTMSessionFetcher *)fetcherWithURL:(NSURL *)requestURL { - return [self fetcherWithRequest:[NSURLRequest requestWithURL:requestURL]]; -} - -- (GTMSessionFetcher *)fetcherWithURLString:(NSString *)requestURLString { - NSURL *url = [NSURL URLWithString:requestURLString]; - return [self fetcherWithURL:url]; -} - -// Returns a session for the fetcher's host, or nil. -- (NSURLSession *)session { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSURLSession *session = _delegateDispatcher.session; - return session; - } -} - -// Returns a session for the fetcher's host, or nil. For shared sessions, this -// waits on a semaphore, blocking other fetchers while the caller creates the -// session if needed. -- (NSURLSession *)sessionForFetcherCreation { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - if (!_delegateDispatcher) { - // This fetcher is creating a non-shared session, so skip the semaphore usage. - return nil; - } - } - - // Wait if another fetcher is currently creating a session; avoid waiting - // inside the @synchronized block, as that can deadlock. - dispatch_semaphore_wait(_sessionCreationSemaphore, DISPATCH_TIME_FOREVER); - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - // Before getting the NSURLSession for task creation, it is - // important to invalidate and nil out the session discard timer; otherwise - // the session can be invalidated between when it is returned to the - // fetcher, and when the fetcher attempts to create its NSURLSessionTask. - [_delegateDispatcher startSessionUsage]; - - NSURLSession *session = _delegateDispatcher.session; - if (session) { - // The calling fetcher will receive a preexisting session, so - // we can allow other fetchers to create a session. - dispatch_semaphore_signal(_sessionCreationSemaphore); - } else { - // No existing session was obtained, so the calling fetcher will create the session; - // it *must* invoke fetcherDidCreateSession: to signal the dispatcher's semaphore after - // the session has been created (or fails to be created) to avoid a hang. - } - return session; - } -} - -- (id)sessionDelegate { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _delegateDispatcher; - } -} - -#pragma mark Queue Management - -- (void)addRunningFetcher:(GTMSessionFetcher *)fetcher - forHost:(NSString *)host { - // Add to the array of running fetchers for this host, creating the array if needed. - NSMutableArray *runningForHost = [_runningFetchersByHost objectForKey:host]; - if (runningForHost == nil) { - runningForHost = [NSMutableArray arrayWithObject:fetcher]; - [_runningFetchersByHost setObject:runningForHost forKey:host]; - } else { - [runningForHost addObject:fetcher]; - } -} - -- (void)addDelayedFetcher:(GTMSessionFetcher *)fetcher - forHost:(NSString *)host { - // Add to the array of delayed fetchers for this host, creating the array if needed. - NSMutableArray *delayedForHost = [_delayedFetchersByHost objectForKey:host]; - if (delayedForHost == nil) { - delayedForHost = [NSMutableArray arrayWithObject:fetcher]; - [_delayedFetchersByHost setObject:delayedForHost forKey:host]; - } else { - [delayedForHost addObject:fetcher]; - } -} - -- (BOOL)isDelayingFetcher:(GTMSessionFetcher *)fetcher { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSString *host = fetcher.request.URL.host; - if (host == nil) { - return NO; - } - NSArray *delayedForHost = [_delayedFetchersByHost objectForKey:host]; - NSUInteger idx = [delayedForHost indexOfObjectIdenticalTo:fetcher]; - BOOL isDelayed = (delayedForHost != nil) && (idx != NSNotFound); - return isDelayed; - } -} - -- (BOOL)fetcherShouldBeginFetching:(GTMSessionFetcher *)fetcher { - // Entry point from the fetcher - NSURL *requestURL = fetcher.request.URL; - NSString *host = requestURL.host; - - // Addresses "file:///path" case where localhost is the implicit host. - if (host.length == 0 && [requestURL isFileURL]) { - host = @"localhost"; - } - - if (host.length == 0) { - // Data URIs legitimately have no host, reject other hostless URLs. - GTMSESSION_ASSERT_DEBUG([[requestURL scheme] isEqual:@"data"], @"%@ lacks host", fetcher); - return YES; - } - - BOOL shouldBeginResult; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSMutableArray *runningForHost = [_runningFetchersByHost objectForKey:host]; - if (runningForHost != nil - && [runningForHost indexOfObjectIdenticalTo:fetcher] != NSNotFound) { - GTMSESSION_ASSERT_DEBUG(NO, @"%@ was already running", fetcher); - return YES; - } - - BOOL shouldRunNow = (fetcher.usingBackgroundSession - || _maxRunningFetchersPerHost == 0 - || _maxRunningFetchersPerHost > - [[self class] numberOfNonBackgroundSessionFetchers:runningForHost]); - if (shouldRunNow) { - [self addRunningFetcher:fetcher forHost:host]; - shouldBeginResult = YES; - } else { - [self addDelayedFetcher:fetcher forHost:host]; - shouldBeginResult = NO; - } - } // @synchronized(self) - - // We'll save the host that serves as the key for this fetcher's array - // to avoid any chance of the underlying request changing, stranding - // the fetcher in the wrong array - fetcher.serviceHost = host; - - return shouldBeginResult; -} - -- (void)startFetcher:(GTMSessionFetcher *)fetcher { - [fetcher beginFetchMayDelay:NO - mayAuthorize:YES]; -} - -// Internal utility. Returns a fetcher's delegate if it's a dispatcher, or nil if the fetcher -// is its own delegate and has no dispatcher. -- (GTMSessionFetcherSessionDelegateDispatcher *)delegateDispatcherForFetcher:(GTMSessionFetcher *)fetcher { - GTMSessionCheckNotSynchronized(self); - - NSURLSession *fetcherSession = fetcher.session; - if (fetcherSession) { - id fetcherDelegate = fetcherSession.delegate; - BOOL hasDispatcher = (fetcherDelegate != nil && fetcherDelegate != fetcher); - if (hasDispatcher) { - GTMSESSION_ASSERT_DEBUG([fetcherDelegate isKindOfClass:[GTMSessionFetcherSessionDelegateDispatcher class]], - @"Fetcher delegate class: %@", [fetcherDelegate class]); - return (GTMSessionFetcherSessionDelegateDispatcher *)fetcherDelegate; - } - } - return nil; -} - -- (void)fetcherDidCreateSession:(GTMSessionFetcher *)fetcher { - if (fetcher.canShareSession) { - NSURLSession *fetcherSession = fetcher.session; - GTMSESSION_ASSERT_DEBUG(fetcherSession != nil, @"Fetcher missing its session: %@", fetcher); - - GTMSessionFetcherSessionDelegateDispatcher *delegateDispatcher = - [self delegateDispatcherForFetcher:fetcher]; - if (delegateDispatcher) { - GTMSESSION_ASSERT_DEBUG(delegateDispatcher.session == nil, - @"Fetcher made an extra session: %@", fetcher); - - // Save this fetcher's session. - delegateDispatcher.session = fetcherSession; - - // Allow other fetchers to request this session now. - dispatch_semaphore_signal(_sessionCreationSemaphore); - } - } -} - -- (void)fetcherDidBeginFetching:(GTMSessionFetcher *)fetcher { - // If this fetcher has a separate delegate with a shared session, then - // this fetcher should be added to the delegate's map of tasks to fetchers. - GTMSessionFetcherSessionDelegateDispatcher *delegateDispatcher = - [self delegateDispatcherForFetcher:fetcher]; - if (delegateDispatcher) { - GTMSESSION_ASSERT_DEBUG(fetcher.canShareSession, - @"Inappropriate shared session: %@", fetcher); - - // There should already be a session, from this or a previous fetcher. - // - // Sanity check that the fetcher's session is the delegate's shared session. - NSURLSession *sharedSession = delegateDispatcher.session; - NSURLSession *fetcherSession = fetcher.session; - GTMSESSION_ASSERT_DEBUG(sharedSession != nil, @"Missing delegate session: %@", fetcher); - GTMSESSION_ASSERT_DEBUG(fetcherSession == sharedSession, - @"Inconsistent session: %@ %@ (shared: %@)", - fetcher, fetcherSession, sharedSession); - - if (sharedSession != nil && fetcherSession == sharedSession) { - NSURLSessionTask *task = fetcher.sessionTask; - GTMSESSION_ASSERT_DEBUG(task != nil, @"Missing session task: %@", fetcher); - - if (task) { - [delegateDispatcher setFetcher:fetcher - forTask:task]; - } - } - } -} - -- (void)stopFetcher:(GTMSessionFetcher *)fetcher { - [fetcher stopFetching]; -} - -- (void)fetcherDidStop:(GTMSessionFetcher *)fetcher { - // Entry point from the fetcher - NSString *host = fetcher.serviceHost; - if (!host) { - // fetcher has been stopped previously - return; - } - - // This removeFetcher: invocation is a fallback; typically, fetchers are removed from the task - // map when the task completes. - GTMSessionFetcherSessionDelegateDispatcher *delegateDispatcher = - [self delegateDispatcherForFetcher:fetcher]; - [delegateDispatcher removeFetcher:fetcher]; - - NSMutableArray *fetchersToStart; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - // If a test is waiting for all fetchers to stop, it needs to wait for this one - // to invoke its callbacks on the callback queue. - [_stoppedFetchersToWaitFor addObject:fetcher]; - - NSMutableArray *runningForHost = [_runningFetchersByHost objectForKey:host]; - [runningForHost removeObject:fetcher]; - - NSMutableArray *delayedForHost = [_delayedFetchersByHost objectForKey:host]; - [delayedForHost removeObject:fetcher]; - - while (delayedForHost.count > 0 - && [[self class] numberOfNonBackgroundSessionFetchers:runningForHost] - < _maxRunningFetchersPerHost) { - // Start another delayed fetcher running, scanning for the minimum - // priority value, defaulting to FIFO for equal priorities - GTMSessionFetcher *nextFetcher = nil; - for (GTMSessionFetcher *delayedFetcher in delayedForHost) { - if (nextFetcher == nil - || delayedFetcher.servicePriority < nextFetcher.servicePriority) { - nextFetcher = delayedFetcher; - } - } - - if (nextFetcher) { - [self addRunningFetcher:nextFetcher forHost:host]; - runningForHost = [_runningFetchersByHost objectForKey:host]; - - [delayedForHost removeObjectIdenticalTo:nextFetcher]; - - if (!fetchersToStart) { - fetchersToStart = [NSMutableArray array]; - } - [fetchersToStart addObject:nextFetcher]; - } - } - - if (runningForHost.count == 0) { - // None left; remove the empty array - [_runningFetchersByHost removeObjectForKey:host]; - } - - if (delayedForHost.count == 0) { - [_delayedFetchersByHost removeObjectForKey:host]; - } - } // @synchronized(self) - - // Start fetchers outside of the synchronized block to avoid a deadlock. - for (GTMSessionFetcher *nextFetcher in fetchersToStart) { - [self startFetcher:nextFetcher]; - } - - // The fetcher is no longer in the running or the delayed array, - // so remove its host and thread properties - fetcher.serviceHost = nil; -} - -- (NSUInteger)numberOfFetchers { - NSUInteger running = [self numberOfRunningFetchers]; - NSUInteger delayed = [self numberOfDelayedFetchers]; - return running + delayed; -} - -- (NSUInteger)numberOfRunningFetchers { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSUInteger sum = 0; - for (NSString *host in _runningFetchersByHost) { - NSArray *fetchers = [_runningFetchersByHost objectForKey:host]; - sum += fetchers.count; - } - return sum; - } -} - -- (NSUInteger)numberOfDelayedFetchers { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSUInteger sum = 0; - for (NSString *host in _delayedFetchersByHost) { - NSArray *fetchers = [_delayedFetchersByHost objectForKey:host]; - sum += fetchers.count; - } - return sum; - } -} - -- (NSArray *)issuedFetchers { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSMutableArray *allFetchers = [NSMutableArray array]; - void (^accumulateFetchers)(id, id, BOOL *) = ^(NSString *host, - NSArray *fetchersForHost, - BOOL *stop) { - [allFetchers addObjectsFromArray:fetchersForHost]; - }; - [_runningFetchersByHost enumerateKeysAndObjectsUsingBlock:accumulateFetchers]; - [_delayedFetchersByHost enumerateKeysAndObjectsUsingBlock:accumulateFetchers]; - - GTMSESSION_ASSERT_DEBUG(allFetchers.count == [NSSet setWithArray:allFetchers].count, - @"Fetcher appears multiple times\n running: %@\n delayed: %@", - _runningFetchersByHost, _delayedFetchersByHost); - - return allFetchers.count > 0 ? allFetchers : nil; - } -} - -- (NSArray *)issuedFetchersWithRequestURL:(NSURL *)requestURL { - NSString *host = requestURL.host; - if (host.length == 0) return nil; - - NSURL *targetURL = [requestURL absoluteURL]; - - NSArray *allFetchers = [self issuedFetchers]; - NSIndexSet *indexes = [allFetchers indexesOfObjectsPassingTest:^BOOL(GTMSessionFetcher *fetcher, - NSUInteger idx, - BOOL *stop) { - NSURL *fetcherURL = [fetcher.request.URL absoluteURL]; - return [fetcherURL isEqual:targetURL]; - }]; - - NSArray *result = nil; - if (indexes.count > 0) { - result = [allFetchers objectsAtIndexes:indexes]; - } - return result; -} - -- (void)stopAllFetchers { - NSArray *delayedFetchersByHost; - NSArray *runningFetchersByHost; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - // Set the time barrier so fetchers know not to call back even if - // the stop calls below occur after the fetchers naturally - // stopped and so were removed from _runningFetchersByHost, - // but while the callbacks were already enqueued before stopAllFetchers - // was invoked. - _stoppedAllFetchersDate = [[NSDate alloc] init]; - - // Remove fetchers from the delayed list to avoid fetcherDidStop: from - // starting more fetchers running as a side effect of stopping one - delayedFetchersByHost = _delayedFetchersByHost.allValues; - [_delayedFetchersByHost removeAllObjects]; - - runningFetchersByHost = _runningFetchersByHost.allValues; - [_runningFetchersByHost removeAllObjects]; - } - - for (NSArray *delayedForHost in delayedFetchersByHost) { - for (GTMSessionFetcher *fetcher in delayedForHost) { - [self stopFetcher:fetcher]; - } - } - - for (NSArray *runningForHost in runningFetchersByHost) { - for (GTMSessionFetcher *fetcher in runningForHost) { - [self stopFetcher:fetcher]; - } - } -} - -- (NSDate *)stoppedAllFetchersDate { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _stoppedAllFetchersDate; - } -} - -#pragma mark Accessors - -- (BOOL)reuseSession { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _delegateDispatcher != nil; - } -} - -- (void)setReuseSession:(BOOL)shouldReuse { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - BOOL wasReusing = (_delegateDispatcher != nil); - if (shouldReuse != wasReusing) { - [self abandonDispatcher]; - if (shouldReuse) { - _delegateDispatcher = - [[GTMSessionFetcherSessionDelegateDispatcher alloc] initWithParentService:self - sessionDiscardInterval:_unusedSessionTimeout]; - } else { - _delegateDispatcher = nil; - } - } - } -} - -- (void)resetSession { - GTMSessionCheckNotSynchronized(self); - dispatch_semaphore_wait(_sessionCreationSemaphore, DISPATCH_TIME_FOREVER); - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - [self resetSessionInternal]; - } - - dispatch_semaphore_signal(_sessionCreationSemaphore); -} - -- (void)resetSessionInternal { - GTMSessionCheckSynchronized(self); - - // The old dispatchers may be retained as delegates of any ongoing sessions by those sessions. - if (_delegateDispatcher) { - [self abandonDispatcher]; - _delegateDispatcher = - [[GTMSessionFetcherSessionDelegateDispatcher alloc] initWithParentService:self - sessionDiscardInterval:_unusedSessionTimeout]; - } -} - -- (void)resetSessionForDispatcherDiscardTimer:(NSTimer *)timer { - GTMSessionCheckNotSynchronized(self); - - dispatch_semaphore_wait(_sessionCreationSemaphore, DISPATCH_TIME_FOREVER); - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_delegateDispatcher.discardTimer == timer) { - // If the delegate dispatcher's current discardTimer is the same object as the timer - // that fired, no fetcher has recently attempted to start using the session by calling - // startSessionUsage, which invalidates and nils out the timer. - [self resetSessionInternal]; - } else { - // A fetcher has invalidated the timer between its triggering and now, potentially - // meaning a fetcher has requested access to the NSURLSession, and may be in the process - // of starting a new task. The dispatcher should not be abandoned, as this can lead - // to a race condition between calling -finishTasksAndInvalidate on the NSURLSession - // and the fetcher attempting to create a new task. - } - } - - dispatch_semaphore_signal(_sessionCreationSemaphore); -} - -- (NSTimeInterval)unusedSessionTimeout { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _unusedSessionTimeout; - } -} - -- (void)setUnusedSessionTimeout:(NSTimeInterval)timeout { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _unusedSessionTimeout = timeout; - _delegateDispatcher.discardInterval = timeout; - } -} - -// This method should be called inside of @synchronized(self) -- (void)abandonDispatcher { - GTMSessionCheckSynchronized(self); - [_delegateDispatcher abandon]; -} - -- (NSDictionary *)runningFetchersByHost { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return [_runningFetchersByHost copy]; - } -} - -- (void)setRunningFetchersByHost:(NSDictionary *)dict { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _runningFetchersByHost = [dict mutableCopy]; - } -} - -- (NSDictionary *)delayedFetchersByHost { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return [_delayedFetchersByHost copy]; - } -} - -- (void)setDelayedFetchersByHost:(NSDictionary *)dict { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _delayedFetchersByHost = [dict mutableCopy]; - } -} - -- (id)authorizer { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _authorizer; - } -} - -- (void)setAuthorizer:(id)obj { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (obj != _authorizer) { - [self detachAuthorizer]; - } - - _authorizer = obj; - } - - // Use the fetcher service for the authorization fetches if the auth - // object supports fetcher services - if ([obj respondsToSelector:@selector(setFetcherService:)]) { -#if GTM_USE_SESSION_FETCHER - [obj setFetcherService:self]; -#else - [obj setFetcherService:(id)self]; -#endif - } -} - -// This should be called inside a @synchronized(self) block except during dealloc. -- (void)detachAuthorizer { - // This method is called by the fetcher service's dealloc and setAuthorizer: - // methods; do not override. - // - // The fetcher service retains the authorizer, and the authorizer has a - // weak pointer to the fetcher service (a non-zeroing pointer for - // compatibility with iOS 4 and Mac OS X 10.5/10.6.) - // - // When this fetcher service no longer uses the authorizer, we want to remove - // the authorizer's dependence on the fetcher service. Authorizers can still - // function without a fetcher service. - if ([_authorizer respondsToSelector:@selector(fetcherService)]) { - id authFetcherService = [_authorizer fetcherService]; - if (authFetcherService == self) { - [_authorizer setFetcherService:nil]; - } - } -} - -- (dispatch_queue_t GTM_NONNULL_TYPE)callbackQueue { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _callbackQueue; - } // @synchronized(self) -} - -- (void)setCallbackQueue:(dispatch_queue_t GTM_NULLABLE_TYPE)queue { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _callbackQueue = queue ?: dispatch_get_main_queue(); - } // @synchronized(self) -} - -- (NSOperationQueue * GTM_NONNULL_TYPE)sessionDelegateQueue { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _delegateQueue; - } // @synchronized(self) -} - -- (void)setSessionDelegateQueue:(NSOperationQueue * GTM_NULLABLE_TYPE)queue { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _delegateQueue = queue ?: [NSOperationQueue mainQueue]; - } // @synchronized(self) -} - -- (NSOperationQueue *)delegateQueue { - // Provided for compatibility with the old fetcher service. The gtm-oauth2 code respects - // any custom delegate queue for calling the app. - return nil; -} - -+ (NSUInteger)numberOfNonBackgroundSessionFetchers:(NSArray *)fetchers { - NSUInteger sum = 0; - for (GTMSessionFetcher *fetcher in fetchers) { - if (!fetcher.usingBackgroundSession) { - ++sum; - } - } - return sum; -} - -@end - -@implementation GTMSessionFetcherService (TestingSupport) - -+ (instancetype)mockFetcherServiceWithFakedData:(NSData *)fakedDataOrNil - fakedError:(NSError *)fakedErrorOrNil { -#if !GTM_DISABLE_FETCHER_TEST_BLOCK - NSURL *url = [NSURL URLWithString:@"http://example.invalid"]; - NSHTTPURLResponse *fakedResponse = - [[NSHTTPURLResponse alloc] initWithURL:url - statusCode:(fakedErrorOrNil ? 500 : 200) - HTTPVersion:@"HTTP/1.1" - headerFields:nil]; - GTMSessionFetcherService *service = [[self alloc] init]; - service.allowedInsecureSchemes = @[ @"http" ]; - service.testBlock = ^(GTMSessionFetcher *fetcherToTest, - GTMSessionFetcherTestResponse testResponse) { - testResponse(fakedResponse, fakedDataOrNil, fakedErrorOrNil); - }; - return service; -#else - GTMSESSION_ASSERT_DEBUG(0, @"Test blocks disabled"); - return nil; -#endif // GTM_DISABLE_FETCHER_TEST_BLOCK -} - -#pragma mark Synchronous Wait for Unit Testing - -- (BOOL)waitForCompletionOfAllFetchersWithTimeout:(NSTimeInterval)timeoutInSeconds { - NSDate *giveUpDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; - _stoppedFetchersToWaitFor = [NSMutableArray array]; - - BOOL shouldSpinRunLoop = [NSThread isMainThread]; - const NSTimeInterval kSpinInterval = 0.001; - BOOL didTimeOut = NO; - while (([self numberOfFetchers] > 0 || _stoppedFetchersToWaitFor.count > 0)) { - didTimeOut = [giveUpDate timeIntervalSinceNow] < 0; - if (didTimeOut) break; - - GTMSessionFetcher *stoppedFetcher = _stoppedFetchersToWaitFor.firstObject; - if (stoppedFetcher) { - [_stoppedFetchersToWaitFor removeObject:stoppedFetcher]; - [stoppedFetcher waitForCompletionWithTimeout:10.0 * kSpinInterval]; - } - - if (shouldSpinRunLoop) { - NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:kSpinInterval]; - [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; - } else { - [NSThread sleepForTimeInterval:kSpinInterval]; - } - } - _stoppedFetchersToWaitFor = nil; - - return !didTimeOut; -} - -@end - -@implementation GTMSessionFetcherService (BackwardsCompatibilityOnly) - -- (NSInteger)cookieStorageMethod { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _cookieStorageMethod; - } -} - -- (void)setCookieStorageMethod:(NSInteger)cookieStorageMethod { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _cookieStorageMethod = cookieStorageMethod; - } -} - -@end - -@implementation GTMSessionFetcherSessionDelegateDispatcher { - __weak GTMSessionFetcherService *_parentService; - NSURLSession *_session; - - // The task map maps NSURLSessionTasks to GTMSessionFetchers - NSMutableDictionary *_taskToFetcherMap; - // The discard timer will invalidate sessions after the session's last task completes. - NSTimer *_discardTimer; - NSTimeInterval _discardInterval; -} - -@synthesize discardInterval = _discardInterval, - session = _session; - -- (instancetype)init { - [self doesNotRecognizeSelector:_cmd]; - return nil; -} - -- (instancetype)initWithParentService:(GTMSessionFetcherService *)parentService - sessionDiscardInterval:(NSTimeInterval)discardInterval { - self = [super init]; - if (self) { - _discardInterval = discardInterval; - _parentService = parentService; - } - return self; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"%@ %p %@ %@", - [self class], self, - _session ?: @"", - _taskToFetcherMap.count > 0 ? _taskToFetcherMap : @""]; -} - -- (NSTimer *)discardTimer { - GTMSessionCheckNotSynchronized(self); - @synchronized(self) { - return _discardTimer; - } -} - -// This method should be called inside of a @synchronized(self) block. -- (void)startDiscardTimer { - GTMSessionCheckSynchronized(self); - [_discardTimer invalidate]; - _discardTimer = nil; - if (_discardInterval > 0) { - _discardTimer = [NSTimer timerWithTimeInterval:_discardInterval - target:self - selector:@selector(discardTimerFired:) - userInfo:nil - repeats:NO]; - [_discardTimer setTolerance:(_discardInterval / 10)]; - [[NSRunLoop mainRunLoop] addTimer:_discardTimer forMode:NSRunLoopCommonModes]; - } -} - -// This method should be called inside of a @synchronized(self) block. -- (void)destroyDiscardTimer { - GTMSessionCheckSynchronized(self); - [_discardTimer invalidate]; - _discardTimer = nil; -} - -- (void)discardTimerFired:(NSTimer *)timer { - GTMSessionFetcherService *service; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - NSUInteger numberOfTasks = _taskToFetcherMap.count; - if (numberOfTasks == 0) { - service = _parentService; - } - } - - // Inform the service that the discard timer has fired, and should check whether the - // service can abandon us. -resetSession cannot be called directly, as there is a - // race condition that must be guarded against with the NSURLSession being returned - // from sessionForFetcherCreation outside other locks. The service can take steps - // to prevent resetting the session if that has occurred. - // - // The service must be called from outside the @synchronized block. - [service resetSessionForDispatcherDiscardTimer:timer]; -} - -- (void)abandon { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - [self destroySessionAndTimer]; - } -} - -- (void)startSessionUsage { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - [self destroyDiscardTimer]; - } -} - -// This method should be called inside of a @synchronized(self) block. -- (void)destroySessionAndTimer { - GTMSessionCheckSynchronized(self); - [self destroyDiscardTimer]; - - // Break any retain cycle from the session holding the delegate. - [_session finishTasksAndInvalidate]; - - // Immediately clear the session so no new task may be issued with it. - // - // The _taskToFetcherMap needs to stay valid until the outstanding tasks finish. - _session = nil; -} - -- (void)setFetcher:(GTMSessionFetcher *)fetcher forTask:(NSURLSessionTask *)task { - GTMSESSION_ASSERT_DEBUG(fetcher != nil, @"missing fetcher"); - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_taskToFetcherMap == nil) { - _taskToFetcherMap = [[NSMutableDictionary alloc] init]; - } - - if (fetcher) { - [_taskToFetcherMap setObject:fetcher forKey:task]; - [self destroyDiscardTimer]; - } - } -} - -- (void)removeFetcher:(GTMSessionFetcher *)fetcher { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - // Typically, a fetcher should be removed when its task invokes - // URLSession:task:didCompleteWithError:. - // - // When fetching with a testBlock, though, the task completed delegate - // method may not be invoked, requiring cleanup here. - NSArray *tasks = [_taskToFetcherMap allKeysForObject:fetcher]; - GTMSESSION_ASSERT_DEBUG(tasks.count <= 1, @"fetcher task not unmapped: %@", tasks); - [_taskToFetcherMap removeObjectsForKeys:tasks]; - - if (_taskToFetcherMap.count == 0) { - [self startDiscardTimer]; - } - } -} - -// This helper method provides synchronized access to the task map for the delegate -// methods below. -- (id)fetcherForTask:(NSURLSessionTask *)task { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return [_taskToFetcherMap objectForKey:task]; - } -} - -- (void)removeTaskFromMap:(NSURLSessionTask *)task { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - [_taskToFetcherMap removeObjectForKey:task]; - } -} - -- (void)setSession:(NSURLSession *)session { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _session = session; - } -} - -- (NSURLSession *)session { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _session; - } -} - -- (NSTimeInterval)discardInterval { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _discardInterval; - } -} - -- (void)setDiscardInterval:(NSTimeInterval)interval { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _discardInterval = interval; - } -} - -// NSURLSessionDelegate protocol methods. - -// - (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session; -// -// TODO(seh): How do we route this to an appropriate fetcher? - - -- (void)URLSession:(NSURLSession *)session didBecomeInvalidWithError:(NSError *)error { - GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ didBecomeInvalidWithError:%@", - [self class], self, session, error); - NSDictionary *localTaskToFetcherMap; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _session = nil; - - localTaskToFetcherMap = [_taskToFetcherMap copy]; - } - - // Any "suspended" tasks may not have received callbacks from NSURLSession when the session - // completes; we'll call them now. - [localTaskToFetcherMap enumerateKeysAndObjectsUsingBlock:^(NSURLSessionTask *task, - GTMSessionFetcher *fetcher, - BOOL *stop) { - if (fetcher.session == session) { - // Our delegate method URLSession:task:didCompleteWithError: will rely on - // _taskToFetcherMap so that should still contain this fetcher. - NSError *canceledError = [NSError errorWithDomain:NSURLErrorDomain - code:NSURLErrorCancelled - userInfo:nil]; - [self URLSession:session task:task didCompleteWithError:canceledError]; - } else { - GTMSESSION_ASSERT_DEBUG(0, @"Unexpected session in fetcher: %@ has %@ (expected %@)", - fetcher, fetcher.session, session); - } - }]; - - // Our tests rely on this notification to know the session discard timer fired. - NSDictionary *userInfo = @{ kGTMSessionFetcherServiceSessionKey : session }; - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc postNotificationName:kGTMSessionFetcherServiceSessionBecameInvalidNotification - object:_parentService - userInfo:userInfo]; -} - - -#pragma mark - NSURLSessionTaskDelegate - -// NSURLSessionTaskDelegate protocol methods. -// -// We won't test here if the fetcher responds to these since we only want this -// class to implement the same delegate methods the fetcher does (so NSURLSession's -// tests for respondsToSelector: will have the same result whether the session -// delegate is the fetcher or this dispatcher.) - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task -willPerformHTTPRedirection:(NSHTTPURLResponse *)response - newRequest:(NSURLRequest *)request - completionHandler:(void (^)(NSURLRequest *))completionHandler { - id fetcher = [self fetcherForTask:task]; - [fetcher URLSession:session - task:task -willPerformHTTPRedirection:response - newRequest:request - completionHandler:completionHandler]; -} - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task -didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge - completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))handler { - id fetcher = [self fetcherForTask:task]; - [fetcher URLSession:session - task:task - didReceiveChallenge:challenge - completionHandler:handler]; -} - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task - needNewBodyStream:(void (^)(NSInputStream *bodyStream))handler { - id fetcher = [self fetcherForTask:task]; - [fetcher URLSession:session - task:task - needNewBodyStream:handler]; -} - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task - didSendBodyData:(int64_t)bytesSent - totalBytesSent:(int64_t)totalBytesSent -totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend { - id fetcher = [self fetcherForTask:task]; - [fetcher URLSession:session - task:task - didSendBodyData:bytesSent - totalBytesSent:totalBytesSent -totalBytesExpectedToSend:totalBytesExpectedToSend]; -} - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task -didCompleteWithError:(NSError *)error { - id fetcher = [self fetcherForTask:task]; - - // This is the usual way tasks are removed from the task map. - [self removeTaskFromMap:task]; - - [fetcher URLSession:session - task:task - didCompleteWithError:error]; -} - -// NSURLSessionDataDelegate protocol methods. - -- (void)URLSession:(NSURLSession *)session - dataTask:(NSURLSessionDataTask *)dataTask -didReceiveResponse:(NSURLResponse *)response - completionHandler:(void (^)(NSURLSessionResponseDisposition))handler { - id fetcher = [self fetcherForTask:dataTask]; - [fetcher URLSession:session - dataTask:dataTask - didReceiveResponse:response - completionHandler:handler]; -} - -- (void)URLSession:(NSURLSession *)session - dataTask:(NSURLSessionDataTask *)dataTask -didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask { - id fetcher = [self fetcherForTask:dataTask]; - GTMSESSION_ASSERT_DEBUG(fetcher != nil, @"Missing fetcher for %@", dataTask); - [self removeTaskFromMap:dataTask]; - if (fetcher) { - GTMSESSION_ASSERT_DEBUG([fetcher isKindOfClass:[GTMSessionFetcher class]], - @"Expecting GTMSessionFetcher"); - [self setFetcher:(GTMSessionFetcher *)fetcher forTask:downloadTask]; - } - - [fetcher URLSession:session - dataTask:dataTask -didBecomeDownloadTask:downloadTask]; -} - -- (void)URLSession:(NSURLSession *)session - dataTask:(NSURLSessionDataTask *)dataTask - didReceiveData:(NSData *)data { - id fetcher = [self fetcherForTask:dataTask]; - [fetcher URLSession:session - dataTask:dataTask - didReceiveData:data]; -} - -- (void)URLSession:(NSURLSession *)session - dataTask:(NSURLSessionDataTask *)dataTask - willCacheResponse:(NSCachedURLResponse *)proposedResponse - completionHandler:(void (^)(NSCachedURLResponse *))handler { - id fetcher = [self fetcherForTask:dataTask]; - [fetcher URLSession:session - dataTask:dataTask - willCacheResponse:proposedResponse - completionHandler:handler]; -} - -// NSURLSessionDownloadDelegate protocol methods. - -- (void)URLSession:(NSURLSession *)session - downloadTask:(NSURLSessionDownloadTask *)downloadTask -didFinishDownloadingToURL:(NSURL *)location { - id fetcher = [self fetcherForTask:downloadTask]; - [fetcher URLSession:session - downloadTask:downloadTask -didFinishDownloadingToURL:location]; -} - -- (void)URLSession:(NSURLSession *)session - downloadTask:(NSURLSessionDownloadTask *)downloadTask - didWriteData:(int64_t)bytesWritten - totalBytesWritten:(int64_t)totalWritten -totalBytesExpectedToWrite:(int64_t)totalExpected { - id fetcher = [self fetcherForTask:downloadTask]; - [fetcher URLSession:session - downloadTask:downloadTask - didWriteData:bytesWritten - totalBytesWritten:totalWritten -totalBytesExpectedToWrite:totalExpected]; -} - -- (void)URLSession:(NSURLSession *)session - downloadTask:(NSURLSessionDownloadTask *)downloadTask - didResumeAtOffset:(int64_t)fileOffset -expectedTotalBytes:(int64_t)expectedTotalBytes { - id fetcher = [self fetcherForTask:downloadTask]; - [fetcher URLSession:session - downloadTask:downloadTask - didResumeAtOffset:fileOffset - expectedTotalBytes:expectedTotalBytes]; -} - -@end diff --git a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.h b/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.h deleted file mode 100755 index 51372f2..0000000 --- a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.h +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// GTMSessionUploadFetcher implements Google's resumable upload protocol. - -// -// This subclass of GTMSessionFetcher simulates the series of fetches -// needed for chunked upload as a single fetch operation. -// -// Protocol document: TBD -// -// To the client, the only fetcher that exists is this class; the subsidiary -// fetchers needed for uploading chunks are not visible (though the most recent -// chunk fetcher may be accessed via the -activeFetcher or -chunkFetcher methods, and -// -responseHeaders and -statusCode reflect results from the most recent chunk -// fetcher.) -// -// Chunk fetchers are discarded as soon as they have completed. -// - -// Note: Unlike the fetcher superclass, the methods of GTMSessionUploadFetcher should -// only be used from the main thread until further work is done to make this subclass -// thread-safe. - -#import "GTMSessionFetcher.h" -#import "GTMSessionFetcherService.h" - -GTM_ASSUME_NONNULL_BEGIN - -// Unless an application knows it needs a smaller chunk size, it should use the standard -// chunk size, which sends the entire file as a single chunk to minimize upload overhead. -extern int64_t const kGTMSessionUploadFetcherStandardChunkSize; - -// When uploading requires data buffer allocations (such as uploading from an NSData or -// an NSFileHandle) this is the maximum buffer size that will be created by the fetcher. -extern int64_t const kGTMSessionUploadFetcherMaximumDemandBufferSize; - -// Notification that the upload location URL was provided by the server. -extern NSString *const kGTMSessionFetcherUploadLocationObtainedNotification; - -// Block to provide data during uploads. -// -// Response data may be allocated with dataWithBytesNoCopy:length:freeWhenDone: for efficiency, -// and released after the response block returns. -// -// Pass nil as the data (and optionally an NSError) for a failure. -typedef void (^GTMSessionUploadFetcherDataProviderResponse)(NSData * GTM_NULLABLE_TYPE data, - NSError * GTM_NULLABLE_TYPE error); -typedef void (^GTMSessionUploadFetcherDataProvider)(int64_t offset, int64_t length, - GTMSessionUploadFetcherDataProviderResponse response); - -@interface GTMSessionUploadFetcher : GTMSessionFetcher - -// Create an upload fetcher specifying either the request or the resume location URL, -// then set an upload data source using one of these: -// -// setUploadFileURL: -// setUploadDataLength:provider: -// setUploadFileHandle: -// setUploadData: - -+ (instancetype)uploadFetcherWithRequest:(NSURLRequest *)request - uploadMIMEType:(NSString *)uploadMIMEType - chunkSize:(int64_t)chunkSize - fetcherService:(GTM_NULLABLE GTMSessionFetcherService *)fetcherServiceOrNil; - -+ (instancetype)uploadFetcherWithLocation:(NSURL * GTM_NULLABLE_TYPE)uploadLocationURL - uploadMIMEType:(NSString *)uploadMIMEType - chunkSize:(int64_t)chunkSize - fetcherService:(GTM_NULLABLE GTMSessionFetcherService *)fetcherServiceOrNil; - -- (void)setUploadDataLength:(int64_t)fullLength - provider:(GTM_NULLABLE GTMSessionUploadFetcherDataProvider)block; - -+ (NSArray *)uploadFetchersForBackgroundSessions; -+ (GTM_NULLABLE instancetype)uploadFetcherForSessionIdentifier:(NSString *)sessionIdentifier; - -- (void)pauseFetching; -- (void)resumeFetching; -- (BOOL)isPaused; - -@property(atomic, strong, GTM_NULLABLE) NSURL *uploadLocationURL; -@property(atomic, strong, GTM_NULLABLE) NSData *uploadData; -@property(atomic, strong, GTM_NULLABLE) NSURL *uploadFileURL; -@property(atomic, strong, GTM_NULLABLE) NSFileHandle *uploadFileHandle; -@property(atomic, copy, readonly, GTM_NULLABLE) GTMSessionUploadFetcherDataProvider uploadDataProvider; -@property(atomic, copy) NSString *uploadMIMEType; -@property(atomic, assign) int64_t chunkSize; -@property(atomic, readonly, assign) int64_t currentOffset; - -// The fetcher for the current data chunk, if any -@property(atomic, strong, GTM_NULLABLE) GTMSessionFetcher *chunkFetcher; - -// The active fetcher is the current chunk fetcher, or the upload fetcher itself -// if no chunk fetcher has yet been created. -@property(atomic, readonly) GTMSessionFetcher *activeFetcher; - -// The last request made by an active fetcher. Useful for testing. -@property(atomic, readonly, GTM_NULLABLE) NSURLRequest *lastChunkRequest; - -// The status code from the most recently-completed fetch. -@property(atomic, assign) NSInteger statusCode; - -// Exposed for testing only. -@property(atomic, readonly, GTM_NULLABLE) dispatch_queue_t delegateCallbackQueue; -@property(atomic, readonly, GTM_NULLABLE) GTMSessionFetcherCompletionHandler delegateCompletionHandler; - -@end - -@interface GTMSessionFetcher (GTMSessionUploadFetcherMethods) - -@property(readonly, GTM_NULLABLE) GTMSessionUploadFetcher *parentUploadFetcher; - -@end - -GTM_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.m b/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.m deleted file mode 100755 index a5ae0dc..0000000 --- a/Old My Mind/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.m +++ /dev/null @@ -1,1804 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if !defined(__has_feature) || !__has_feature(objc_arc) -#error "This file requires ARC support." -#endif - -#import "GTMSessionUploadFetcher.h" - -static NSString *const kGTMSessionIdentifierIsUploadChunkFetcherMetadataKey = @"_upChunk"; -static NSString *const kGTMSessionIdentifierUploadFileURLMetadataKey = @"_upFileURL"; -static NSString *const kGTMSessionIdentifierUploadFileLengthMetadataKey = @"_upFileLen"; -static NSString *const kGTMSessionIdentifierUploadLocationURLMetadataKey = @"_upLocURL"; -static NSString *const kGTMSessionIdentifierUploadMIMETypeMetadataKey = @"_uploadMIME"; -static NSString *const kGTMSessionIdentifierUploadChunkSizeMetadataKey = @"_upChSize"; -static NSString *const kGTMSessionIdentifierUploadCurrentOffsetMetadataKey = @"_upOffset"; - -static NSString *const kGTMSessionHeaderXGoogUploadChunkGranularity = @"X-Goog-Upload-Chunk-Granularity"; -static NSString *const kGTMSessionHeaderXGoogUploadCommand = @"X-Goog-Upload-Command"; -static NSString *const kGTMSessionHeaderXGoogUploadContentLength = @"X-Goog-Upload-Content-Length"; -static NSString *const kGTMSessionHeaderXGoogUploadContentType = @"X-Goog-Upload-Content-Type"; -static NSString *const kGTMSessionHeaderXGoogUploadOffset = @"X-Goog-Upload-Offset"; -static NSString *const kGTMSessionHeaderXGoogUploadProtocol = @"X-Goog-Upload-Protocol"; -static NSString *const kGTMSessionHeaderXGoogUploadSizeReceived = @"X-Goog-Upload-Size-Received"; -static NSString *const kGTMSessionHeaderXGoogUploadStatus = @"X-Goog-Upload-Status"; -static NSString *const kGTMSessionHeaderXGoogUploadURL = @"X-Goog-Upload-URL"; - -// Property of chunk fetchers identifying the parent upload fetcher. Non-retained NSValue. -static NSString *const kGTMSessionUploadFetcherChunkParentKey = @"_uploadFetcherChunkParent"; - -int64_t const kGTMSessionUploadFetcherStandardChunkSize = (int64_t)LLONG_MAX; - -#if TARGET_OS_IPHONE -int64_t const kGTMSessionUploadFetcherMaximumDemandBufferSize = 10 * 1024 * 1024; // 10 MB for iOS, watchOS, tvOS -#else -int64_t const kGTMSessionUploadFetcherMaximumDemandBufferSize = 100 * 1024 * 1024; // 100 MB for macOS -#endif - -typedef NS_ENUM(NSUInteger, GTMSessionUploadFetcherStatus) { - kStatusUnknown, - kStatusActive, - kStatusFinal, - kStatusCancelled, -}; - -NSString *const kGTMSessionFetcherUploadLocationObtainedNotification = - @"kGTMSessionFetcherUploadLocationObtainedNotification"; - -#if !GTMSESSION_BUILD_COMBINED_SOURCES -@interface GTMSessionFetcher (ProtectedMethods) - -// Access to non-public method on the parent fetcher class. -- (void)stopFetchReleasingCallbacks:(BOOL)shouldReleaseCallbacks; -- (void)createSessionIdentifierWithMetadata:(NSDictionary *)metadata; -- (GTMSessionFetcherCompletionHandler)completionHandlerWithTarget:(id)target - didFinishSelector:(SEL)finishedSelector; -- (void)invokeOnCallbackQueue:(dispatch_queue_t)callbackQueue - afterUserStopped:(BOOL)afterStopped - block:(void (^)(void))block; -- (NSTimer *)retryTimer; - -@property(readwrite, strong) NSData *downloadedData; -- (void)releaseCallbacks; - -- (NSInteger)statusCodeUnsynchronized; - -@end -#endif // !GTMSESSION_BUILD_COMBINED_SOURCES - -@interface GTMSessionUploadFetcher () - -// Changing readonly to readwrite. -@property(atomic, strong, readwrite) NSURLRequest *lastChunkRequest; -@property(atomic, readwrite, assign) int64_t currentOffset; - -// Internal properties. -@property(strong, atomic, GTM_NULLABLE) GTMSessionFetcher *fetcherInFlight; // Synchronized on self. - -@property(assign, atomic, getter=isSubdataGenerating) BOOL subdataGenerating; -@property(assign, atomic) BOOL shouldInitiateOffsetQuery; -@property(assign, atomic) int64_t uploadGranularity; - -@end - -@implementation GTMSessionUploadFetcher { - GTMSessionFetcher *_chunkFetcher; - - // We'll call through to the delegate's completion handler. - GTMSessionFetcherCompletionHandler _delegateCompletionHandler; - dispatch_queue_t _delegateCallbackQueue; - - // The initial fetch's body length and bytes actually sent are - // needed for calculating progress during subsequent chunk uploads - int64_t _initialBodyLength; - int64_t _initialBodySent; - - // The upload server address for the chunks of this upload session. - NSURL *_uploadLocationURL; - - // _uploadData, _uploadDataProvider, or _uploadFileHandle may be set, but only one. - NSData *_uploadData; - NSFileHandle *_uploadFileHandle; - GTMSessionUploadFetcherDataProvider _uploadDataProvider; - NSURL *_uploadFileURL; - int64_t _uploadFileLength; - NSString *_uploadMIMEType; - int64_t _chunkSize; - int64_t _uploadGranularity; - BOOL _isPaused; - BOOL _isRestartedUpload; - BOOL _shouldInitiateOffsetQuery; - - // Tied to useBackgroundSession property, since this property is applicable to chunk fetchers. - BOOL _useBackgroundSessionOnChunkFetchers; - - // We keep the latest offset into the upload data just for progress reporting. - int64_t _currentOffset; - - NSDictionary *_recentChunkReponseHeaders; - NSInteger _recentChunkStatusCode; - - // For waiting, we need to know the fetcher in flight, if any, and if subdata generation - // is in progress. - GTMSessionFetcher *_fetcherInFlight; - BOOL _isSubdataGenerating; -} - -+ (void)load { - [self uploadFetchersForBackgroundSessions]; -} - -+ (instancetype)uploadFetcherWithRequest:(NSURLRequest *)request - uploadMIMEType:(NSString *)uploadMIMEType - chunkSize:(int64_t)chunkSize - fetcherService:(GTMSessionFetcherService *)fetcherService { - GTMSessionUploadFetcher *fetcher = [self uploadFetcherWithRequest:request - fetcherService:fetcherService]; - [fetcher setLocationURL:nil - uploadMIMEType:uploadMIMEType - chunkSize:chunkSize]; - return fetcher; -} - -+ (instancetype)uploadFetcherWithLocation:(NSURL * GTM_NULLABLE_TYPE)uploadLocationURL - uploadMIMEType:(NSString *)uploadMIMEType - chunkSize:(int64_t)chunkSize - fetcherService:(GTMSessionFetcherService *)fetcherService { - GTMSessionUploadFetcher *fetcher = [self uploadFetcherWithRequest:nil - fetcherService:fetcherService]; - [fetcher setLocationURL:uploadLocationURL - uploadMIMEType:uploadMIMEType - chunkSize:chunkSize]; - return fetcher; -} - -+ (instancetype)uploadFetcherForSessionIdentifierMetadata:(NSDictionary *)metadata { - GTMSESSION_ASSERT_DEBUG( - [metadata[kGTMSessionIdentifierIsUploadChunkFetcherMetadataKey] boolValue], - @"Session identifier metadata is not for an upload fetcher: %@", metadata); - - NSNumber *uploadFileLengthNum = metadata[kGTMSessionIdentifierUploadFileLengthMetadataKey]; - GTMSESSION_ASSERT_DEBUG(uploadFileLengthNum != nil, - @"Session metadata missing an UploadFileSize"); - if (uploadFileLengthNum == nil) return nil; - - int64_t uploadFileLength = [uploadFileLengthNum longLongValue]; - GTMSESSION_ASSERT_DEBUG(uploadFileLength >= 0, @"Session metadata UploadFileSize is unknown"); - - NSString *uploadFileURLString = metadata[kGTMSessionIdentifierUploadFileURLMetadataKey]; - GTMSESSION_ASSERT_DEBUG(uploadFileURLString, @"Session metadata missing an UploadFileURL"); - if (uploadFileURLString == nil) return nil; - - NSURL *uploadFileURL = [NSURL URLWithString:uploadFileURLString]; - // There used to be a call here to NSURL checkResourceIsReachableAndReturnError: to check for the - // existence of the file (also tried NSFileManager fileExistsAtPath:). We've determined - // empirically that the check can fail at startup even when the upload file does in fact exist. - // For now, we'll go ahead and restore the background upload fetcher. If the file doesn't exist, - // it will fail later. - - NSString *uploadLocationURLString = metadata[kGTMSessionIdentifierUploadLocationURLMetadataKey]; - NSURL *uploadLocationURL = - uploadLocationURLString ? [NSURL URLWithString:uploadLocationURLString] : nil; - - NSString *uploadMIMEType = - metadata[kGTMSessionIdentifierUploadMIMETypeMetadataKey]; - int64_t uploadChunkSize = - [metadata[kGTMSessionIdentifierUploadChunkSizeMetadataKey] longLongValue]; - if (uploadChunkSize <= 0) { - uploadChunkSize = kGTMSessionUploadFetcherStandardChunkSize; - } - int64_t currentOffset = - [metadata[kGTMSessionIdentifierUploadCurrentOffsetMetadataKey] longLongValue]; - GTMSESSION_ASSERT_DEBUG(currentOffset <= uploadFileLength, - @"CurrentOffset (%lld) exceeds UploadFileSize (%lld)", - currentOffset, uploadFileLength); - if (currentOffset > uploadFileLength) return nil; - - GTMSessionUploadFetcher *uploadFetcher = [self uploadFetcherWithLocation:uploadLocationURL - uploadMIMEType:uploadMIMEType - chunkSize:uploadChunkSize - fetcherService:nil]; - // Set the upload file length before setting the upload file URL tries to determine the length. - [uploadFetcher setUploadFileLength:uploadFileLength]; - - uploadFetcher.uploadFileURL = uploadFileURL; - uploadFetcher.sessionUserInfo = metadata; - uploadFetcher.useBackgroundSession = YES; - uploadFetcher.currentOffset = currentOffset; - uploadFetcher.allowedInsecureSchemes = @[ @"http" ]; // Allowed on restored upload fetcher. - return uploadFetcher; -} - -+ (instancetype)uploadFetcherWithRequest:(NSURLRequest *)request - fetcherService:(GTMSessionFetcherService *)fetcherService { - // Internal utility method for instantiating fetchers - GTMSessionUploadFetcher *fetcher; - if ([fetcherService isKindOfClass:[GTMSessionFetcherService class]]) { - fetcher = [fetcherService fetcherWithRequest:request - fetcherClass:self]; - } else { - fetcher = [self fetcherWithRequest:request]; - } - fetcher.useBackgroundSession = YES; - return fetcher; -} - -+ (NSPointerArray *)uploadFetcherPointerArrayForBackgroundSessions { - static NSPointerArray *gUploadFetcherPointerArrayForBackgroundSessions = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - gUploadFetcherPointerArrayForBackgroundSessions = [NSPointerArray weakObjectsPointerArray]; - }); - return gUploadFetcherPointerArrayForBackgroundSessions; -} - -+ (instancetype)uploadFetcherForSessionIdentifier:(NSString *)sessionIdentifier { - GTMSESSION_ASSERT_DEBUG(sessionIdentifier != nil, @"Invalid session identifier"); - NSArray *uploadFetchersForBackgroundSessions = [self uploadFetchersForBackgroundSessions]; - for (GTMSessionUploadFetcher *uploadFetcher in uploadFetchersForBackgroundSessions) { - if ([uploadFetcher.chunkFetcher.sessionIdentifier isEqual:sessionIdentifier]) { - return uploadFetcher; - } - } - return nil; -} - -+ (NSArray *)uploadFetchersForBackgroundSessions { - // Collect the background session upload fetchers that are still in memory. - NSPointerArray *uploadFetcherPointerArray = [self uploadFetcherPointerArrayForBackgroundSessions]; - [uploadFetcherPointerArray compact]; - NSMutableSet *restoredSessionIdentifiers = [[NSMutableSet alloc] init]; - NSMutableArray *uploadFetchers = [[NSMutableArray alloc] init]; - for (GTMSessionUploadFetcher *uploadFetcher in uploadFetcherPointerArray) { - NSString *sessionIdentifier = uploadFetcher.chunkFetcher.sessionIdentifier; - if (sessionIdentifier) { - [restoredSessionIdentifiers addObject:sessionIdentifier]; - [uploadFetchers addObject:uploadFetcher]; - } - } - - // The system may have other ongoing background upload sessions. Restore upload fetchers for those - // too. - NSArray *fetchers = [GTMSessionFetcher fetchersForBackgroundSessions]; - for (GTMSessionFetcher *fetcher in fetchers) { - NSString *sessionIdentifier = fetcher.sessionIdentifier; - if (!sessionIdentifier || [restoredSessionIdentifiers containsObject:sessionIdentifier]) { - continue; - } - NSDictionary *sessionIdentifierMetadata = [fetcher sessionIdentifierMetadata]; - if (sessionIdentifierMetadata == nil) { - continue; - } - if (![sessionIdentifierMetadata[kGTMSessionIdentifierIsUploadChunkFetcherMetadataKey] boolValue]) { - continue; - } - GTMSessionUploadFetcher *uploadFetcher = - [self uploadFetcherForSessionIdentifierMetadata:sessionIdentifierMetadata]; - if (uploadFetcher == nil) { - // Something went wrong with this upload fetcher, so kill the restored chunk fetcher. - [fetcher stopFetching]; - continue; - } - [uploadFetchers addObject:uploadFetcher]; - uploadFetcher->_chunkFetcher = fetcher; - uploadFetcher->_fetcherInFlight = fetcher; - [uploadFetcher attachSendProgressBlockToChunkFetcher:fetcher]; - fetcher.completionHandler = - [fetcher completionHandlerWithTarget:uploadFetcher - didFinishSelector:@selector(chunkFetcher:finishedWithData:error:)]; - - GTMSESSION_LOG_DEBUG(@"%@ restoring upload fetcher %@ for chunk fetcher %@", - [self class], uploadFetcher, fetcher); - } - return uploadFetchers; -} - -- (void)setUploadData:(NSData *)data { - BOOL changed = NO; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_uploadData != data) { - _uploadData = data; - changed = YES; - } - } - if (changed) { - [self setupRequestHeaders]; - } -} - -- (NSData *)uploadData { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _uploadData; - } -} - -- (void)setUploadFileHandle:(NSFileHandle *)fh { - BOOL changed = NO; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_uploadFileHandle != fh) { - _uploadFileHandle = fh; - changed = YES; - } - } - if (changed) { - [self setupRequestHeaders]; - } -} - -- (NSFileHandle *)uploadFileHandle { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _uploadFileHandle; - } -} - -- (void)setUploadFileURL:(NSURL *)uploadURL { - BOOL changed = NO; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_uploadFileURL != uploadURL) { - _uploadFileURL = uploadURL; - changed = YES; - } - } - if (changed) { - [self setupRequestHeaders]; - } -} - -- (NSURL *)uploadFileURL { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _uploadFileURL; - } -} - -- (void)setUploadFileLength:(int64_t)fullLength { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _uploadFileLength = fullLength; - } -} - -- (void)setUploadDataLength:(int64_t)fullLength - provider:(GTMSessionUploadFetcherDataProvider)block { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _uploadDataProvider = [block copy]; - _uploadFileLength = fullLength; - } - [self setupRequestHeaders]; -} - -- (GTMSessionUploadFetcherDataProvider)uploadDataProvider { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _uploadDataProvider; - } -} - - -- (void)setUploadMIMEType:(NSString *)uploadMIMEType { - GTMSESSION_ASSERT_DEBUG(0, @"TODO: disallow setUploadMIMEType by making declaration readonly"); - // (and uploadMIMEType, chunksize, currentOffset) - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _uploadMIMEType = uploadMIMEType; - } -} - -- (NSString *)uploadMIMEType { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _uploadMIMEType; - } -} - -- (void)setChunkSize:(int64_t)chunkSize { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _chunkSize = chunkSize; - } -} - -- (int64_t)chunkSize { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _chunkSize; - } -} - -- (void)setupRequestHeaders { - GTMSessionCheckNotSynchronized(self); - -#if DEBUG - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - int hasData = (_uploadData != nil) ? 1 : 0; - int hasFileHandle = (_uploadFileHandle != nil) ? 1 : 0; - int hasFileURL = (_uploadFileURL != nil) ? 1 : 0; - int hasUploadDataProvider = (_uploadDataProvider != nil) ? 1 : 0; - int numberOfSources = hasData + hasFileHandle + hasFileURL + hasUploadDataProvider; - #pragma unused(numberOfSources) - GTMSESSION_ASSERT_DEBUG(numberOfSources == 1, - @"Need just one upload source (%d)", numberOfSources); - } // @synchronized(self) -#endif - - // Add our custom headers to the initial request indicating the data - // type and total size to be delivered later in the chunk requests. - NSMutableURLRequest *mutableRequest = [self.request mutableCopy]; - - GTMSESSION_ASSERT_DEBUG((mutableRequest == nil) != (_uploadLocationURL == nil), - @"Request and location are mutually exclusive"); - if (!mutableRequest) return; - - NSNumber *lengthNum = @([self fullUploadLength]); - [mutableRequest setValue:@"resumable" - forHTTPHeaderField:kGTMSessionHeaderXGoogUploadProtocol]; - [mutableRequest setValue:@"start" - forHTTPHeaderField:kGTMSessionHeaderXGoogUploadCommand]; - [mutableRequest setValue:_uploadMIMEType - forHTTPHeaderField:kGTMSessionHeaderXGoogUploadContentType]; - [mutableRequest setValue:lengthNum.stringValue - forHTTPHeaderField:kGTMSessionHeaderXGoogUploadContentLength]; - - NSString *method = mutableRequest.HTTPMethod; - if (method == nil || [method caseInsensitiveCompare:@"GET"] == NSOrderedSame) { - [mutableRequest setHTTPMethod:@"POST"]; - } - - // Ensure the user agent header identifies this to the upload server as a - // GTMSessionUploadFetcher client. The /1 can be incremented in the unlikely circumstance - // we need to make a bug fix in the client that the server can recognize. - NSString *const kUserAgentStub = @"(GTMSUF/1)"; - NSString *userAgent = [mutableRequest valueForHTTPHeaderField:@"User-Agent"]; - if (userAgent == nil - || [userAgent rangeOfString:kUserAgentStub].location == NSNotFound) { - if (userAgent.length == 0) { - userAgent = GTMFetcherStandardUserAgentString(nil); - } - userAgent = [userAgent stringByAppendingFormat:@" %@", kUserAgentStub]; - [mutableRequest setValue:userAgent forHTTPHeaderField:@"User-Agent"]; - } - [self setRequest:mutableRequest]; -} - -- (void)setLocationURL:(NSURL * GTM_NULLABLE_TYPE)location - uploadMIMEType:(NSString *)uploadMIMEType - chunkSize:(int64_t)chunkSize { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - GTMSESSION_ASSERT_DEBUG(chunkSize > 0, @"chunk size is zero"); - - // When resuming an upload, set the known upload target URL. - _uploadLocationURL = location; - - _uploadMIMEType = uploadMIMEType; - _chunkSize = chunkSize; - - // Indicate that we've not yet determined the file handle's length - _uploadFileLength = -1; - - // Indicate that we've not yet determined the upload fetcher status - _recentChunkStatusCode = -1; - - // If this is restarting an upload begun by another fetcher, - // the location is specified but the request is nil - _isRestartedUpload = (location != nil); - } // @synchronized(self) -} - -- (int64_t)fullUploadLength { - int64_t result; - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_uploadData) { - result = (int64_t)_uploadData.length; - } else { - if (_uploadFileLength == -1) { - if (_uploadFileHandle) { - // First time through, seek to end to determine file length - _uploadFileLength = (int64_t)[_uploadFileHandle seekToEndOfFile]; - } else if (_uploadDataProvider) { - // _uploadFileLength is set when the _uploadDataProvider is set. - GTMSESSION_ASSERT_DEBUG(_uploadFileLength >= 0, @"No uploadDataProvider length set"); - } else { - NSNumber *filesizeNum; - NSError *valueError; - if ([_uploadFileURL getResourceValue:&filesizeNum - forKey:NSURLFileSizeKey - error:&valueError]) { - _uploadFileLength = filesizeNum.longLongValue; - } else { - GTMSESSION_ASSERT_DEBUG(NO, @"Cannot get file size: %@\n %@", - valueError, _uploadFileURL.path); - _uploadFileLength = 0; - } - } - } - result = _uploadFileLength; - } - } // @synchronized(self) - return result; -} - -// Make a subdata of the upload data. -- (void)generateChunkSubdataWithOffset:(int64_t)offset - length:(int64_t)length - response:(GTMSessionUploadFetcherDataProviderResponse)response { - GTMSessionUploadFetcherDataProvider uploadDataProvider = self.uploadDataProvider; - if (uploadDataProvider) { - uploadDataProvider(offset, length, response); - return; - } - - NSData *uploadData = self.uploadData; - if (uploadData) { - // NSData provided. - NSData *resultData; - if (offset == 0 && length == (int64_t)uploadData.length) { - resultData = uploadData; - } else { - int64_t dataLength = (int64_t)uploadData.length; - // Ensure our range is valid. b/18007814 - if (offset + length > dataLength) { - NSString *errorMessage = [NSString stringWithFormat: - @"Range invalid for upload data. offset: %lld\tlength: %lld\tdataLength: %lld", - offset, length, dataLength]; - GTMSESSION_ASSERT_DEBUG(NO, @"%@", errorMessage); - response(nil, [self uploadChunkUnavailableErrorWithDescription:errorMessage]); - return; - } - NSRange range = NSMakeRange((NSUInteger)offset, (NSUInteger)length); - resultData = [uploadData subdataWithRange:range]; - } - response(resultData, nil); - return; - } - NSURL *uploadFileURL = self.uploadFileURL; - if (uploadFileURL) { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [self generateChunkSubdataFromFileURL:uploadFileURL - offset:offset - length:length - response:response]; - }); - return; - } - GTMSESSION_ASSERT_DEBUG(_uploadFileHandle, @"Unexpectedly missing upload data package"); - NSFileHandle *uploadFileHandle = self.uploadFileHandle; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [self generateChunkSubdataFromFileHandle:uploadFileHandle - offset:offset - length:length - response:response]; - }); -} - -- (void)generateChunkSubdataFromFileHandle:(NSFileHandle *)fileHandle - offset:(int64_t)offset - length:(int64_t)length - response:(GTMSessionUploadFetcherDataProviderResponse)response { - NSData *resultData; - NSError *error; - @try { - [fileHandle seekToFileOffset:(unsigned long long)offset]; - resultData = [fileHandle readDataOfLength:(NSUInteger)length]; - } - @catch (NSException *exception) { - GTMSESSION_ASSERT_DEBUG(NO, @"uploadFileHandle failed to read, %@", exception); - error = [self uploadChunkUnavailableErrorWithDescription:exception.description]; - } - // The response always re-dispatches to the main thread, so we skip doing that here. - response(resultData, error); -} - -- (void)generateChunkSubdataFromFileURL:(NSURL *)fileURL - offset:(int64_t)offset - length:(int64_t)length - response:(GTMSessionUploadFetcherDataProviderResponse)response { - GTMSessionCheckNotSynchronized(self); - - NSData *resultData; - NSError *error; - int64_t fullUploadLength = [self fullUploadLength]; - NSData *mappedData = - [NSData dataWithContentsOfURL:fileURL - options:NSDataReadingMappedAlways + NSDataReadingUncached - error:&error]; - if (!mappedData) { - // We could not create an NSData by memory-mapping the file. -#if TARGET_IPHONE_SIMULATOR - // NSTemporaryDirectory() can differ in the simulator between app restarts, - // yet the contents for the new path remains unchanged, so try the latest temp path. - if ([error.domain isEqual:NSCocoaErrorDomain] && (error.code == NSFileReadNoSuchFileError)) { - NSString *filename = [fileURL lastPathComponent]; - NSString *filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:filename]; - NSURL *newFileURL = [NSURL fileURLWithPath:filePath]; - if (![newFileURL isEqual:fileURL]) { - [self generateChunkSubdataFromFileURL:newFileURL - offset:offset - length:length - response:response]; - return; - } - } -#endif - - // If the file is just too large to create an NSData for, or if for some other reason we can't - // map it, create an NSFileHandle instead to read a subset into an NSData. -#if DEBUG - NSNumber *fileSizeNum; - BOOL hasFileSize = [fileURL getResourceValue:&fileSizeNum forKey:NSURLFileSizeKey error:NULL]; - GTMSESSION_LOG_DEBUG(@"Note: uploadFileURL is falling back to creating upload chunks by reading" - @" an NSFileHandle since uploadFileURL failed to map the upload file," - @" file size %@, %@", - hasFileSize ? fileSizeNum : @"unknown", error); -#endif - - NSFileHandle *fileHandle = [NSFileHandle fileHandleForReadingFromURL:fileURL - error:&error]; - if (fileHandle != nil) { - [self generateChunkSubdataFromFileHandle:fileHandle - offset:offset - length:length - response:response]; - return; - } - GTMSESSION_ASSERT_DEBUG(NO, @"uploadFileURL failed to read, %@", error); - // Fall through with the error. - } else { - // Successfully created an NSData by memory-mapping the file. - if (offset > 0 || length < fullUploadLength) { - NSRange range = NSMakeRange((NSUInteger)offset, (NSUInteger)length); - resultData = [mappedData subdataWithRange:range]; - } else { - resultData = mappedData; - } - } - // The response always re-dispatches to the main thread, so we skip re-dispatching here. - response(resultData, error); -} - -- (NSError *)uploadChunkUnavailableErrorWithDescription:(NSString *)description { - // The description in the userInfo is intended as a clue to programmers, not - // for client code to examine or rely on. - NSDictionary *userInfo = @{ @"description" : description }; - return [NSError errorWithDomain:kGTMSessionFetcherErrorDomain - code:GTMSessionFetcherErrorUploadChunkUnavailable - userInfo:userInfo]; -} - -- (NSError *)prematureFailureErrorWithUserInfo:(NSDictionary *)userInfo { - // An error for if we get an unexpected status from the upload server or - // otherwise cannot continue. This is an issue beyond the upload protocol; - // there's no way the client can do anything useful except give up. - NSError *error = [NSError errorWithDomain:kGTMSessionFetcherStatusDomain - code:501 // Not implemented - userInfo:userInfo]; - return error; -} - -+ (GTMSessionUploadFetcherStatus)uploadStatusFromResponseHeaders:(NSDictionary *)responseHeaders { - NSString *statusString = [responseHeaders objectForKey:kGTMSessionHeaderXGoogUploadStatus]; - if ([statusString isEqual:@"active"]) { - return kStatusActive; - } - if ([statusString isEqual:@"final"]) { - return kStatusFinal; - } - if ([statusString isEqual:@"cancelled"]) { - return kStatusCancelled; - } - return kStatusUnknown; -} - -#pragma mark Method overrides affecting the initial fetch only - -- (void)setCompletionHandler:(GTMSessionFetcherCompletionHandler)handler { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _delegateCompletionHandler = handler; - } -} - -- (void)setDelegateCallbackQueue:(dispatch_queue_t GTM_NULLABLE_TYPE)queue { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _delegateCallbackQueue = queue; - } -} - -- (dispatch_queue_t GTM_NULLABLE_TYPE)delegateCallbackQueue { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _delegateCallbackQueue; - } -} - -- (BOOL)isRestartedUpload { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _isRestartedUpload; - } -} - -- (GTMSessionFetcher * GTM_NULLABLE_TYPE)chunkFetcher { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _chunkFetcher; - } -} - -- (void)setChunkFetcher:(GTMSessionFetcher * GTM_NULLABLE_TYPE)fetcher { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _chunkFetcher = fetcher; - } -} - -- (void)setFetcherInFlight:(GTMSessionFetcher * GTM_NULLABLE_TYPE)fetcher { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _fetcherInFlight = fetcher; - } -} - -- (GTMSessionFetcher * GTM_NULLABLE_TYPE)fetcherInFlight { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _fetcherInFlight; - } -} - -- (void)beginFetchWithCompletionHandler:(GTMSessionFetcherCompletionHandler)handler { - GTMSessionCheckNotSynchronized(self); - - [self setInitialBodyLength:[self bodyLength]]; - - // We'll hold onto the superclass's callback queue so we can invoke the handler - // even after the superclass has released the queue and its callback handler, as - // happens during auth failure. - [self setDelegateCallbackQueue:self.callbackQueue]; - self.completionHandler = handler; - - if ([self isRestartedUpload]) { - // When restarting an upload, we know the destination location for chunk fetches, - // but we need to query to find the initial offset. - if (![self isPaused]) { - [self sendQueryForUploadOffsetWithFetcherProperties:self.properties]; - } - return; - } - // We don't want to call into the client's completion block immediately - // after the finish of the initial connection (the delegate is called only - // when uploading finishes), so we substitute our own completion block to be - // called when the initial connection finishes - GTMSESSION_ASSERT_DEBUG(self.fetcherInFlight == nil, @"unexpected fetcher in flight: %@", - self.fetcherInFlight); - - self.fetcherInFlight = self; - [super beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { - self.fetcherInFlight = nil; - // callback - - BOOL hasTestBlock = (self.testBlock != nil); - if (![self isRestartedUpload] && !hasTestBlock) { - if (error == nil) { - [self beginChunkFetches]; - } else { - if ([self retryTimer] == nil) { - [self invokeFinalCallbackWithData:nil - error:error - shouldInvalidateLocation:YES]; - } - } - } else { - // If there was no initial request, then this fetch is resuming some - // other uploadFetcher's initial request, and the superclass's connection - // is never used, so at this point we call the user's actual completion - // block. - if (!hasTestBlock) { - [self invokeFinalCallbackWithData:data - error:error - shouldInvalidateLocation:YES]; - } else { - // There was a test block, so we won't do chunk fetches, but we simulate obtaining - // the data to be uploaded from the upload data provider block or the file handle, - // and then call back. - [self generateChunkSubdataWithOffset:0 - length:[self fullUploadLength] - response:^(NSData *generateData, NSError *generateError) { - [self invokeFinalCallbackWithData:data - error:error - shouldInvalidateLocation:YES]; - }]; - } - } - }]; -} - -- (void)beginChunkFetches { - GTMSessionCheckNotSynchronized(self); - -#if DEBUG - // The initial response of the resumable upload protocol should have an - // empty body - // - // This assert typically happens because the upload create/edit link URL was - // not supplied with the request, and the server is thus expecting a non- - // resumable request/response. - if (self.downloadedData.length > 0) { - NSData *downloadedData = self.downloadedData; - NSString *str = [[NSString alloc] initWithData:downloadedData - encoding:NSUTF8StringEncoding]; - #pragma unused(str) - GTMSESSION_ASSERT_DEBUG(NO, @"unexpected response data (uploading to the wrong URL?)\n%@", str); - } -#endif - - // We need to get the upload URL from the location header to continue. - NSDictionary *responseHeaders = [self responseHeaders]; - - [self retrieveUploadChunkGranularityFromResponseHeaders:responseHeaders]; - - GTMSessionUploadFetcherStatus uploadStatus = - [[self class] uploadStatusFromResponseHeaders:responseHeaders]; - GTMSESSION_ASSERT_DEBUG(uploadStatus != kStatusUnknown, - @"beginChunkFetches has unexpected upload status for headers %@", responseHeaders); - - BOOL isPrematureStop = (uploadStatus == kStatusFinal) || (uploadStatus == kStatusCancelled); - - NSString *uploadLocationURLStr = [responseHeaders objectForKey:kGTMSessionHeaderXGoogUploadURL]; - BOOL hasUploadLocation = (uploadLocationURLStr.length > 0); - - if (isPrematureStop || !hasUploadLocation) { - GTMSESSION_ASSERT_DEBUG(NO, @"Premature failure: upload-status:\"%@\" location:%@", - [responseHeaders objectForKey:kGTMSessionHeaderXGoogUploadStatus], uploadLocationURLStr); - // We cannot continue since we do not know the location to use - // as our upload destination. - NSDictionary *userInfo = nil; - NSData *downloadedData = self.downloadedData; - if (downloadedData.length > 0) { - userInfo = @{ kGTMSessionFetcherStatusDataKey : downloadedData }; - } - NSError *failureError = [self prematureFailureErrorWithUserInfo:userInfo]; - [self invokeFinalCallbackWithData:nil - error:failureError - shouldInvalidateLocation:YES]; - return; - } - - self.uploadLocationURL = [NSURL URLWithString:uploadLocationURLStr]; - - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc postNotificationName:kGTMSessionFetcherUploadLocationObtainedNotification - object:self]; - - // we've now sent all of the initial post body data, so we need to include - // its size in future progress indicator callbacks - [self setInitialBodySent:[self initialBodyLength]]; - - // just in case the user paused us during the initial fetch... - if (![self isPaused]) { - [self uploadNextChunkWithOffset:0]; - } -} - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task - didSendBodyData:(int64_t)bytesSent - totalBytesSent:(int64_t)totalBytesSent - totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend { - // Overrides the superclass. - [self invokeDelegateWithDidSendBytes:bytesSent - totalBytesSent:totalBytesSent - totalBytesExpectedToSend:totalBytesExpectedToSend + [self fullUploadLength]]; -} - -- (BOOL)shouldReleaseCallbacksUponCompletion { - // Overrides the superclass. - - // We don't want the superclass to release the delegate and callback - // blocks once the initial fetch has finished - // - // This is invoked for only successful completion of the connection; - // an error always will invoke and release the callbacks - return NO; -} - -- (void)invokeFinalCallbackWithData:(NSData *)data - error:(NSError *)error - shouldInvalidateLocation:(BOOL)shouldInvalidateLocation { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (shouldInvalidateLocation) { - _uploadLocationURL = nil; - } - - dispatch_queue_t queue = _delegateCallbackQueue; - GTMSessionFetcherCompletionHandler handler = _delegateCompletionHandler; - if (queue && handler) { - [self invokeOnCallbackQueue:queue - afterUserStopped:NO - block:^{ - handler(data, error); - }]; - } - } // @synchronized(self) - - [self releaseUploadAndBaseCallbacks]; -} - -- (void)releaseUploadAndBaseCallbacks { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _delegateCallbackQueue = nil; - _delegateCompletionHandler = nil; - _uploadDataProvider = nil; - } - - // Release the base class's callbacks, too, if needed. - [self releaseCallbacks]; -} - -- (void)stopFetchReleasingCallbacks:(BOOL)shouldReleaseCallbacks { - GTMSessionCheckNotSynchronized(self); - - // Clear _fetcherInFlight when stopped. Moved from stopFetching, since that's a public method, - // where this method does the work. Fixes issue clearing value when retryBlock included. - GTMSessionFetcher *fetcherInFlight = self.fetcherInFlight; - if (fetcherInFlight == self) { - self.fetcherInFlight = nil; - } - - [super stopFetchReleasingCallbacks:shouldReleaseCallbacks]; - - if (shouldReleaseCallbacks) { - [self releaseUploadAndBaseCallbacks]; - } -} - -#pragma mark Chunk fetching methods - -- (void)uploadNextChunkWithOffset:(int64_t)offset { - // use the properties in each chunk fetcher - NSDictionary *props = [self properties]; - - [self uploadNextChunkWithOffset:offset - fetcherProperties:props]; -} - -- (void)sendQueryForUploadOffsetWithFetcherProperties:(NSDictionary *)props { - GTMSessionFetcher *queryFetcher = [self uploadFetcherWithProperties:props - isQueryFetch:YES]; - queryFetcher.bodyData = [NSData data]; - - NSString *originalComment = self.comment; - [queryFetcher setCommentWithFormat:@"%@ (query offset)", - originalComment ? originalComment : @"upload"]; - - [queryFetcher setRequestValue:@"query" forHTTPHeaderField:kGTMSessionHeaderXGoogUploadCommand]; - - self.fetcherInFlight = queryFetcher; - [queryFetcher beginFetchWithDelegate:self - didFinishSelector:@selector(queryFetcher:finishedWithData:error:)]; -} - -- (void)queryFetcher:(GTMSessionFetcher *)queryFetcher - finishedWithData:(NSData *)data - error:(NSError *)error { - self.fetcherInFlight = nil; - - NSDictionary *responseHeaders = [queryFetcher responseHeaders]; - NSString *sizeReceivedHeader; - - GTMSessionUploadFetcherStatus uploadStatus = - [[self class] uploadStatusFromResponseHeaders:responseHeaders]; - GTMSESSION_ASSERT_DEBUG(uploadStatus != kStatusUnknown || error != nil, - @"query fetcher completion has unexpected upload status for headers %@", responseHeaders); - - if (error == nil) { - sizeReceivedHeader = [responseHeaders objectForKey:kGTMSessionHeaderXGoogUploadSizeReceived]; - - if (uploadStatus == kStatusCancelled || - (uploadStatus == kStatusActive && sizeReceivedHeader == nil)) { - NSDictionary *userInfo = nil; - if (data.length > 0) { - userInfo = @{ kGTMSessionFetcherStatusDataKey : data }; - } - error = [self prematureFailureErrorWithUserInfo:userInfo]; - } - } - - if (error == nil) { - int64_t offset = [sizeReceivedHeader longLongValue]; - int64_t fullUploadLength = [self fullUploadLength]; - if (offset >= fullUploadLength || uploadStatus == kStatusFinal) { - // Handle we're done - [self chunkFetcher:queryFetcher finishedWithData:data error:nil]; - } else { - [self retrieveUploadChunkGranularityFromResponseHeaders:responseHeaders]; - [self uploadNextChunkWithOffset:offset]; - } - } else { - // Handle query error - [self chunkFetcher:queryFetcher finishedWithData:data error:error]; - } -} - -- (void)sendCancelUploadWithFetcherProperties:(NSDictionary *)props { - GTMSessionFetcher *cancelFetcher = [self uploadFetcherWithProperties:props - isQueryFetch:YES]; - cancelFetcher.bodyData = [NSData data]; - - NSString *originalComment = self.comment; - [cancelFetcher setCommentWithFormat:@"%@ (cancel)", - originalComment ? originalComment : @"upload"]; - - [cancelFetcher setRequestValue:@"cancel" forHTTPHeaderField:kGTMSessionHeaderXGoogUploadCommand]; - - self.fetcherInFlight = cancelFetcher; - [cancelFetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { - self.fetcherInFlight = nil; - if (error) { - GTMSESSION_LOG_DEBUG(@"cancelFetcher %@", error); - } - }]; -} - -- (void)uploadNextChunkWithOffset:(int64_t)offset - fetcherProperties:(NSDictionary *)props { - GTMSessionCheckNotSynchronized(self); - - // Example chunk headers: - // X-Goog-Upload-Command: upload, finalize - // X-Goog-Upload-Offset: 0 - // Content-Length: 2000000 - // Content-Type: image/jpeg - // - // {bytes 0-1999999} - - // The chunk upload URL requires no authentication header. - GTMSessionFetcher *chunkFetcher = [self uploadFetcherWithProperties:props - isQueryFetch:NO]; - [self attachSendProgressBlockToChunkFetcher:chunkFetcher]; - - BOOL isUploadingFileURL = (self.uploadFileURL != nil); - - // Upload another chunk, meeting server-required granularity. - int64_t chunkSize = self.chunkSize; - - int64_t fullUploadLength = [self fullUploadLength]; - - BOOL isUploadingFullFile = (offset == 0 && chunkSize >= fullUploadLength); - if (!isUploadingFileURL || !isUploadingFullFile) { - // We're not uploading the entire file and given the file URL. Since we'll be - // allocating a subdata block for a chunk, we need to bound it to something that - // won't blow the process's memory. - if (chunkSize > kGTMSessionUploadFetcherMaximumDemandBufferSize) { - chunkSize = kGTMSessionUploadFetcherMaximumDemandBufferSize; - } - } - - int64_t granularity = self.uploadGranularity; - if (granularity > 0) { - if (chunkSize < granularity) { - chunkSize = granularity; - } else { - chunkSize = chunkSize - (chunkSize % granularity); - } - } - - GTMSESSION_ASSERT_DEBUG(offset < fullUploadLength || fullUploadLength == 0, - @"offset %lld exceeds data length %lld", offset, fullUploadLength); - - if (granularity > 0) { - offset = offset - (offset % granularity); - } - - // If the chunk size is bigger than the remaining data, or else - // it's close enough in size to the remaining data that we'd rather - // avoid having a whole extra http fetch for the leftover bit, then make - // this chunk size exactly match the remaining data size - NSString *command; - int64_t thisChunkSize = chunkSize; - - BOOL isChunkTooBig = (thisChunkSize >= (fullUploadLength - offset)); - BOOL isChunkAlmostBigEnough = (fullUploadLength - offset - 2500 < thisChunkSize); - BOOL isFinalChunk = isChunkTooBig || isChunkAlmostBigEnough; - if (isFinalChunk) { - thisChunkSize = fullUploadLength - offset; - if (thisChunkSize > 0) { - command = @"upload, finalize"; - } else { - command = @"finalize"; - } - } else { - command = @"upload"; - } - NSString *lengthStr = @(thisChunkSize).stringValue; - NSString *offsetStr = @(offset).stringValue; - - [chunkFetcher setRequestValue:command forHTTPHeaderField:kGTMSessionHeaderXGoogUploadCommand]; - [chunkFetcher setRequestValue:lengthStr forHTTPHeaderField:@"Content-Length"]; - [chunkFetcher setRequestValue:offsetStr forHTTPHeaderField:kGTMSessionHeaderXGoogUploadOffset]; - - // Append the range of bytes in this chunk to the fetcher comment. - NSString *baseComment = self.comment; - [chunkFetcher setCommentWithFormat:@"%@ (%lld-%lld)", - baseComment ? baseComment : @"upload", offset, MAX(0, offset + thisChunkSize - 1)]; - - // The chunk size may have changed, so determine again if we're uploading the full file. - isUploadingFullFile = (offset == 0 && thisChunkSize >= fullUploadLength); - if (isUploadingFullFile && isUploadingFileURL) { - // The data is the full upload file URL. - chunkFetcher.bodyFileURL = self.uploadFileURL; - [self beginChunkFetcher:chunkFetcher - offset:offset]; - } else { - // Make an NSData for the subset for this upload chunk. - self.subdataGenerating = YES; - [self generateChunkSubdataWithOffset:offset - length:thisChunkSize - response:^(NSData *chunkData, NSError *chunkError) { - // The subdata methods may leave us on a background thread. - dispatch_async(dispatch_get_main_queue(), ^{ - self.subdataGenerating = NO; - if (chunkData == nil) { - NSError *responseError = chunkError; - if (!responseError) { - responseError = [self uploadChunkUnavailableErrorWithDescription:@"chunkData is nil"]; - } - [self invokeFinalCallbackWithData:nil - error:responseError - shouldInvalidateLocation:YES]; - return; - } - - BOOL didWriteFile = NO; - if (isUploadingFileURL) { - // Make a temporary file with the data subset. - NSString *tempName = - [NSString stringWithFormat:@"GTMUpload_temp_%@", [[NSUUID UUID] UUIDString]]; - NSString *tempPath = [NSTemporaryDirectory() stringByAppendingPathComponent:tempName]; - NSError *writeError; - didWriteFile = [chunkData writeToFile:tempPath - options:NSDataWritingAtomic - error:&writeError]; - if (didWriteFile) { - chunkFetcher.bodyFileURL = [NSURL fileURLWithPath:tempPath]; - } else { - GTMSESSION_LOG_DEBUG(@"writeToFile failed: %@\n%@", writeError, tempPath); - } - } - if (!didWriteFile) { - chunkFetcher.bodyData = [chunkData copy]; - } - [self beginChunkFetcher:chunkFetcher - offset:offset]; - }); - }]; - } -} - -- (void)beginChunkFetcher:(GTMSessionFetcher *)chunkFetcher - offset:(int64_t)offset { - - // Track the current offset for progress reporting - self.currentOffset = offset; - - // Hang on to the fetcher in case we need to cancel it. We set these before beginning the - // chunk fetch so the observers notified of chunk fetches can inspect the upload fetcher to - // match to the chunk. - self.chunkFetcher = chunkFetcher; - self.fetcherInFlight = chunkFetcher; - - // Update the last chunk request, including any request headers. - self.lastChunkRequest = chunkFetcher.request; - - [chunkFetcher beginFetchWithDelegate:self - didFinishSelector:@selector(chunkFetcher:finishedWithData:error:)]; -} - -- (void)attachSendProgressBlockToChunkFetcher:(GTMSessionFetcher *)chunkFetcher { - chunkFetcher.sendProgressBlock = ^(int64_t bytesSent, int64_t totalBytesSent, - int64_t totalBytesExpectedToSend) { - // The total bytes expected include the initial body and the full chunked - // data, independent of how big this fetcher's chunk is. - int64_t initialBodySent = [self bodyLength]; // TODO(grobbins) use [self initialBodySent] - int64_t totalSent = initialBodySent + self.currentOffset + totalBytesSent; - int64_t totalExpected = initialBodySent + [self fullUploadLength]; - - [self invokeDelegateWithDidSendBytes:bytesSent - totalBytesSent:totalSent - totalBytesExpectedToSend:totalExpected]; - }; -} - -- (NSDictionary *)uploadSessionIdentifierMetadata { - NSMutableDictionary *metadata = [NSMutableDictionary dictionary]; - metadata[kGTMSessionIdentifierIsUploadChunkFetcherMetadataKey] = @YES; - GTMSESSION_ASSERT_DEBUG(self.uploadFileURL, - @"Invalid upload fetcher to create session identifier for metadata"); - metadata[kGTMSessionIdentifierUploadFileURLMetadataKey] = [self.uploadFileURL absoluteString]; - metadata[kGTMSessionIdentifierUploadFileLengthMetadataKey] = @([self fullUploadLength]); - - if (self.uploadLocationURL) { - metadata[kGTMSessionIdentifierUploadLocationURLMetadataKey] = - [self.uploadLocationURL absoluteString]; - } - if (self.uploadMIMEType) { - metadata[kGTMSessionIdentifierUploadMIMETypeMetadataKey] = self.uploadMIMEType; - } - metadata[kGTMSessionIdentifierUploadChunkSizeMetadataKey] = @(self.chunkSize); - metadata[kGTMSessionIdentifierUploadCurrentOffsetMetadataKey] = @(self.currentOffset); - return metadata; -} - -- (GTMSessionFetcher *)uploadFetcherWithProperties:(NSDictionary *)properties - isQueryFetch:(BOOL)isQueryFetch { - GTMSessionCheckNotSynchronized(self); - - // Common code to make a request for a query command or for a chunk upload. - NSURL *uploadLocationURL = self.uploadLocationURL; - NSMutableURLRequest *chunkRequest = [NSMutableURLRequest requestWithURL:uploadLocationURL]; - [chunkRequest setHTTPMethod:@"PUT"]; - - // copy the user-agent from the original connection - NSURLRequest *origRequest = self.request; - NSString *userAgent = [origRequest valueForHTTPHeaderField:@"User-Agent"]; - if (userAgent.length > 0) { - [chunkRequest setValue:userAgent forHTTPHeaderField:@"User-Agent"]; - } - // To avoid timeouts when debugging, copy the timeout of the initial fetcher. - NSTimeInterval origTimeout = [origRequest timeoutInterval]; - [chunkRequest setTimeoutInterval:origTimeout]; - - // - // Make a new chunk fetcher. - // - GTMSessionFetcher *chunkFetcher = [GTMSessionFetcher fetcherWithRequest:chunkRequest]; - chunkFetcher.callbackQueue = self.callbackQueue; - chunkFetcher.sessionUserInfo = self.sessionUserInfo; - chunkFetcher.configurationBlock = self.configurationBlock; - chunkFetcher.allowedInsecureSchemes = self.allowedInsecureSchemes; - chunkFetcher.allowLocalhostRequest = self.allowLocalhostRequest; - chunkFetcher.allowInvalidServerCertificates = self.allowInvalidServerCertificates; - chunkFetcher.useUploadTask = !isQueryFetch; - - if (self.uploadFileURL && !isQueryFetch && self.useBackgroundSession) { - [chunkFetcher createSessionIdentifierWithMetadata:[self uploadSessionIdentifierMetadata]]; - } - - // Give the chunk fetcher the same properties as the previous chunk fetcher - chunkFetcher.properties = [properties mutableCopy]; - [chunkFetcher setProperty:[NSValue valueWithNonretainedObject:self] - forKey:kGTMSessionUploadFetcherChunkParentKey]; - - // copy other fetcher settings to the new fetcher - chunkFetcher.retryEnabled = self.retryEnabled; - chunkFetcher.maxRetryInterval = self.maxRetryInterval; - - if ([self isRetryEnabled]) { - // We interpose our own retry method both so we can change the request to ask the server to - // tell us where to resume the chunk. - chunkFetcher.retryBlock = ^(BOOL suggestedWillRetry, NSError *chunkError, - GTMSessionFetcherRetryResponse response){ - void (^finish)(BOOL) = ^(BOOL shouldRetry){ - // We'll retry by sending an offset query. - if (shouldRetry) { - self.shouldInitiateOffsetQuery = !isQueryFetch; - - // We don't know what our actual offset is anymore, but the server will tell us. - self.currentOffset = 0; - } - // We don't actually want to retry this specific fetcher. - response(NO); - }; - - GTMSessionFetcherRetryBlock retryBlock = self.retryBlock; - if (retryBlock) { - // Ask the client, then call the finish block above. - retryBlock(suggestedWillRetry, chunkError, finish); - } else { - finish(suggestedWillRetry); - } - }; - } - - return chunkFetcher; -} - -- (void)chunkFetcher:(GTMSessionFetcher *)chunkFetcher - finishedWithData:(NSData *)data - error:(NSError *)error { - BOOL hasDestroyedOldChunkFetcher = NO; - self.fetcherInFlight = nil; - - NSDictionary *responseHeaders = [chunkFetcher responseHeaders]; - GTMSessionUploadFetcherStatus uploadStatus = - [[self class] uploadStatusFromResponseHeaders:responseHeaders]; - GTMSESSION_ASSERT_DEBUG(uploadStatus != kStatusUnknown - || error != nil - || self.wasCreatedFromBackgroundSession, - @"chunk fetcher completion has kStatusUnknown upload status for headers %@ fetcher %@", - responseHeaders, self); - BOOL isUploadStatusStopped = (uploadStatus == kStatusFinal || uploadStatus == kStatusCancelled); - - // Check if the fetcher was actually querying. If it failed, do not retry, - // as it would enter an infinite retry loop. - NSString *uploadCommand = - chunkFetcher.request.allHTTPHeaderFields[kGTMSessionHeaderXGoogUploadCommand]; - BOOL isQueryFetch = [uploadCommand isEqual:@"query"]; - - int64_t previousContentLength = - [[chunkFetcher.request valueForHTTPHeaderField:@"Content-Length"] longLongValue]; - // The Content-Length header may not be present if the chunk fetcher was recreated from - // a background session. - BOOL hasKnownChunkSize = (previousContentLength > 0); - BOOL needsQuery = (!hasKnownChunkSize && !isUploadStatusStopped); - - if (error || (needsQuery && !isQueryFetch)) { - NSInteger status = error.code; - - // Status 4xx indicates a bad offset in the Google upload protocol. However, do not retry status - // 404 per spec, nor if the upload size appears to have been zero (since the server will just - // keep asking us to retry.) - if (self.shouldInitiateOffsetQuery || - (needsQuery && !isQueryFetch) || - ([error.domain isEqual:kGTMSessionFetcherStatusDomain] && - status >= 400 && status <= 499 && - status != 404 && - uploadStatus == kStatusActive && - previousContentLength > 0)) { - self.shouldInitiateOffsetQuery = NO; - [self destroyChunkFetcher]; - hasDestroyedOldChunkFetcher = YES; - [self sendQueryForUploadOffsetWithFetcherProperties:chunkFetcher.properties]; - } else { - // Some unexpected status has occurred; handle it as we would a regular - // object fetcher failure. - [self invokeFinalCallbackWithData:data - error:error - shouldInvalidateLocation:NO]; - } - } else { - // The chunk has uploaded successfully. - int64_t newOffset = self.currentOffset + previousContentLength; -#if DEBUG - // Verify that if we think all of the uploading data has been sent, the server responded with - // the "final" upload status. - BOOL hasUploadAllData = (newOffset == [self fullUploadLength]); - BOOL isFinalStatus = (uploadStatus == kStatusFinal); - #pragma unused(hasUploadAllData,isFinalStatus) - GTMSESSION_ASSERT_DEBUG(hasUploadAllData == isFinalStatus || !hasKnownChunkSize, - @"uploadStatus:%@ newOffset:%zd (%lld + %zd) fullUploadLength:%lld" - @" chunkFetcher:%@ requestHeaders:%@ responseHeaders:%@", - [responseHeaders objectForKey:kGTMSessionHeaderXGoogUploadStatus], - newOffset, self.currentOffset, previousContentLength, - [self fullUploadLength], - chunkFetcher, chunkFetcher.request.allHTTPHeaderFields, - responseHeaders); -#endif - if (isUploadStatusStopped) { - // This was the last chunk. - if (error == nil && uploadStatus == kStatusCancelled) { - // Report cancelled status as an error. - NSDictionary *userInfo = nil; - if (data.length > 0) { - userInfo = @{ kGTMSessionFetcherStatusDataKey : data }; - } - data = nil; - error = [self prematureFailureErrorWithUserInfo:userInfo]; - } else { - // The upload is in final status. - // - // Take the chunk fetcher's data as the superclass data. - self.downloadedData = data; - self.statusCode = chunkFetcher.statusCode; - } - - // we're done - [self invokeFinalCallbackWithData:data - error:error - shouldInvalidateLocation:YES]; - } else { - // Start the next chunk. - self.currentOffset = newOffset; - - // We want to destroy this chunk fetcher before creating the next one, but - // we want to pass on its properties - NSDictionary *props = [chunkFetcher properties]; - - // We no longer need to be able to cancel this chunkFetcher. Destroy it - // before we create a new chunk fetcher. - [self destroyChunkFetcher]; - hasDestroyedOldChunkFetcher = YES; - - [self uploadNextChunkWithOffset:newOffset - fetcherProperties:props]; - } - } - if (!hasDestroyedOldChunkFetcher) { - [self destroyChunkFetcher]; - } -} - -- (void)destroyChunkFetcher { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_fetcherInFlight == _chunkFetcher) { - _fetcherInFlight = nil; - } - - [_chunkFetcher stopFetching]; - - NSURL *chunkFileURL = _chunkFetcher.bodyFileURL; - BOOL wasTemporaryUploadFile = ![chunkFileURL isEqual:_uploadFileURL]; - if (wasTemporaryUploadFile) { - NSError *error; - [[NSFileManager defaultManager] removeItemAtURL:chunkFileURL - error:&error]; - if (error) { - GTMSESSION_LOG_DEBUG(@"removingItemAtURL failed: %@\n%@", error, chunkFileURL); - } - } - - _recentChunkReponseHeaders = _chunkFetcher.responseHeaders; - - // To avoid retain cycles, remove all properties except the parent identifier. - _chunkFetcher.properties = - @{ kGTMSessionUploadFetcherChunkParentKey : [NSValue valueWithNonretainedObject:self] }; - - _chunkFetcher.retryBlock = nil; - _chunkFetcher.sendProgressBlock = nil; - _chunkFetcher = nil; - } // @synchronized(self) -} - -// This method calculates the proper values to pass to the client's send progress block. -// -// The actual total bytes sent include the initial body sent, plus the -// offset into the batched data prior to the current chunk fetcher - -- (void)invokeDelegateWithDidSendBytes:(int64_t)bytesSent - totalBytesSent:(int64_t)totalBytesSent - totalBytesExpectedToSend:(int64_t)totalBytesExpected { - GTMSessionCheckNotSynchronized(self); - - // Ensure the chunk fetcher survives the callback in case the user pauses the upload process. - __block GTMSessionFetcher *holdFetcher = self.chunkFetcher; - - [self invokeOnCallbackQueue:self.delegateCallbackQueue - afterUserStopped:NO - block:^{ - GTMSessionFetcherSendProgressBlock sendProgressBlock = self.sendProgressBlock; - if (sendProgressBlock) { - sendProgressBlock(bytesSent, totalBytesSent, totalBytesExpected); - } - holdFetcher = nil; - }]; -} - -- (void)retrieveUploadChunkGranularityFromResponseHeaders:(NSDictionary *)responseHeaders { - GTMSessionCheckNotSynchronized(self); - - // Standard granularity for Google uploads is 256K. - NSString *chunkGranularityHeader = - [responseHeaders objectForKey:@"X-Goog-Upload-Chunk-Granularity"]; - self.uploadGranularity = chunkGranularityHeader.longLongValue; -} - -#pragma mark - - -- (BOOL)isPaused { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _isPaused; - } // @synchronized(self) -} - -- (void)pauseFetching { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _isPaused = YES; - } // @synchronized(self) - - // Pausing just means stopping the current chunk from uploading; - // when we resume, we will send a query request to the server to - // figure out what bytes to resume sending. - // - // We won't try to cancel the initial data upload, but rather will check - // for being paused in beginChunkFetches. - [self destroyChunkFetcher]; -} - -- (void)resumeFetching { - BOOL wasPaused; - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - wasPaused = _isPaused; - _isPaused = NO; - } // @synchronized(self) - - if (wasPaused) { - [self sendQueryForUploadOffsetWithFetcherProperties:self.properties]; - } -} - -- (void)stopFetching { - // Overrides the superclass - [self destroyChunkFetcher]; - - // If we think the server is waiting for more data, then tell it there won't be more. - if (self.uploadLocationURL) { - [self sendCancelUploadWithFetcherProperties:[self properties]]; - self.uploadLocationURL = nil; - } - - [super stopFetching]; -} - -#pragma mark - - -// Public properties. -@synthesize currentOffset = _currentOffset, - delegateCompletionHandler = _delegateCompletionHandler, - chunkFetcher = _chunkFetcher, - lastChunkRequest = _lastChunkRequest, - subdataGenerating = _subdataGenerating, - shouldInitiateOffsetQuery = _shouldInitiateOffsetQuery, - uploadGranularity = _uploadGranularity; - -// Internal properties. -@dynamic fetcherInFlight; -@dynamic activeFetcher; -@dynamic statusCode; -@dynamic delegateCallbackQueue; - -+ (void)removePointer:(void *)pointer fromPointerArray:(NSPointerArray *)pointerArray { - for (NSUInteger index = 0, count = pointerArray.count; index < count; ++index) { - void *pointerAtIndex = [pointerArray pointerAtIndex:index]; - if (pointerAtIndex == pointer) { - [pointerArray removePointerAtIndex:index]; - return; - } - } -} - -- (BOOL)useBackgroundSession { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _useBackgroundSessionOnChunkFetchers; - } // @synchronized(self -} - -- (void)setUseBackgroundSession:(BOOL)useBackgroundSession { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_useBackgroundSessionOnChunkFetchers != useBackgroundSession) { - _useBackgroundSessionOnChunkFetchers = useBackgroundSession; - NSPointerArray *uploadFetcherPointerArrayForBackgroundSessions = - [[self class] uploadFetcherPointerArrayForBackgroundSessions]; - if (_useBackgroundSessionOnChunkFetchers) { - [uploadFetcherPointerArrayForBackgroundSessions addPointer:(__bridge void *)self]; - } else { - [[self class] removePointer:(__bridge void *)self - fromPointerArray:uploadFetcherPointerArrayForBackgroundSessions]; - } - } - } // @synchronized(self -} - -- (BOOL)canFetchWithBackgroundSession { - // The initial upload fetcher is always a foreground session; the - // useBackgroundSession property will apply only to chunk fetchers, - // not to queries. - return NO; -} - -- (NSDictionary *)responseHeaders { - GTMSessionCheckNotSynchronized(self); - // Overrides the superclass - - // If asked for the fetcher's response, use the most recent chunk fetcher's response, - // since the original request's response lacks useful information like the actual - // Content-Type. - NSDictionary *dict = self.chunkFetcher.responseHeaders; - if (dict) { - return dict; - } - - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - if (_recentChunkReponseHeaders) { - return _recentChunkReponseHeaders; - } - } // @synchronized(self - - // No chunk fetcher yet completed, so return whatever we have from the initial fetch. - return [super responseHeaders]; -} - -- (NSInteger)statusCodeUnsynchronized { - GTMSessionCheckSynchronized(self); - - if (_recentChunkStatusCode != -1) { - // Overrides the superclass to indicate status appropriate to the initial - // or latest chunk fetch - return _recentChunkStatusCode; - } else { - return [super statusCodeUnsynchronized]; - } -} - - -- (void)setStatusCode:(NSInteger)val { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _recentChunkStatusCode = val; - } -} - -- (int64_t)initialBodyLength { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _initialBodyLength; - } -} - -- (void)setInitialBodyLength:(int64_t)length { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _initialBodyLength = length; - } -} - -- (int64_t)initialBodySent { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _initialBodySent; - } -} - -- (void)setInitialBodySent:(int64_t)length { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _initialBodySent = length; - } -} - -- (NSURL *)uploadLocationURL { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - return _uploadLocationURL; - } -} - -- (void)setUploadLocationURL:(NSURL *)locationURL { - @synchronized(self) { - GTMSessionMonitorSynchronized(self); - - _uploadLocationURL = locationURL; - } -} - -- (GTMSessionFetcher *)activeFetcher { - GTMSessionFetcher *result = self.fetcherInFlight; - if (result) return result; - - return self; -} - -- (BOOL)isFetching { - // If there is an active chunk fetcher, then the upload fetcher is considered - // to still be fetching. - if (self.fetcherInFlight != nil) return YES; - - return [super isFetching]; -} - -- (BOOL)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds { - NSDate *timeoutDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; - - while (self.fetcherInFlight || self.subdataGenerating) { - if ([timeoutDate timeIntervalSinceNow] < 0) return NO; - - if (self.subdataGenerating) { - // Allow time for subdata generation. - NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:0.001]; - [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; - } else { - // Wait for any chunk or query fetchers that still have pending callbacks or - // notifications. - BOOL timedOut; - - if (self.fetcherInFlight == self) { - timedOut = ![super waitForCompletionWithTimeout:timeoutInSeconds]; - } else { - timedOut = ![self.fetcherInFlight waitForCompletionWithTimeout:timeoutInSeconds]; - } - if (timedOut) return NO; - } - } - return YES; -} - -@end - -@implementation GTMSessionFetcher (GTMSessionUploadFetcherMethods) - -- (GTMSessionUploadFetcher *)parentUploadFetcher { - NSValue *property = [self propertyForKey:kGTMSessionUploadFetcherChunkParentKey]; - if (!property) return nil; - - GTMSessionUploadFetcher *uploadFetcher = property.nonretainedObjectValue; - - GTMSESSION_ASSERT_DEBUG([uploadFetcher isKindOfClass:[GTMSessionUploadFetcher class]], - @"Unexpected parent upload fetcher class: %@", [uploadFetcher class]); - return uploadFetcher; -} - -@end diff --git a/Old My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMDebugSelectorValidation.h b/Old My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMDebugSelectorValidation.h deleted file mode 100755 index 2396524..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMDebugSelectorValidation.h +++ /dev/null @@ -1,100 +0,0 @@ -// -// GTMDebugSelectorValidation.h -// -// This file should only be included within an implimation file. In any -// function that takes an object and selector to invoke, you should call: -// -// GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, @encode(arg1type), ..., NULL) -// or -// GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(obj, sel, @encode(returnType), @encode(arg1type), ..., NULL) -// -// This will then validate that the selector is defined and using the right -// type(s), this can help catch errors much earlier then waiting for the -// selector to actually fire (and in the case of error selectors, might never -// really be tested until in the field). -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#if DEBUG - -#import -#import "GTMDefines.h" - -static void GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(id obj, SEL sel, const char *retType, ...) { - - // verify that the object's selector is implemented with the proper - // number and type of arguments - va_list argList; - va_start(argList, retType); - - if (obj && sel) { - // check that the selector is implemented - _GTMDevAssert([obj respondsToSelector:sel], - @"\"%@\" selector \"%@\" is unimplemented or misnamed", - NSStringFromClass([obj class]), - NSStringFromSelector(sel)); - - const char *expectedArgType; - NSUInteger argCount = 2; // skip self and _cmd - NSMethodSignature *sig = [obj methodSignatureForSelector:sel]; - - // check that each expected argument is present and of the correct type - while ((expectedArgType = va_arg(argList, const char*)) != 0) { - - if ([sig numberOfArguments] > argCount) { - const char *foundArgType = [sig getArgumentTypeAtIndex:argCount]; - - _GTMDevAssert(0 == strncmp(foundArgType, expectedArgType, strlen(expectedArgType)), - @"\"%@\" selector \"%@\" argument %u should be type %s", - NSStringFromClass([obj class]), - NSStringFromSelector(sel), - (uint32_t)(argCount - 2), - expectedArgType); - } - argCount++; - } - - // check that the proper number of arguments are present in the selector - _GTMDevAssert(argCount == [sig numberOfArguments], - @"\"%@\" selector \"%@\" should have %u arguments", - NSStringFromClass([obj class]), - NSStringFromSelector(sel), - (uint32_t)(argCount - 2)); - - // if asked, validate the return type - if (retType && (strcmp("gtm_skip_return_test", retType) != 0)) { - const char *foundRetType = [sig methodReturnType]; - _GTMDevAssert(0 == strncmp(foundRetType, retType, strlen(retType)), - @"\"%@\" selector \"%@\" return type should be type %s", - NSStringFromClass([obj class]), - NSStringFromSelector(sel), - retType); - } - } - - va_end(argList); -} - -#define GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, ...) \ - GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments((obj), (sel), "gtm_skip_return_test", __VA_ARGS__) - -#else // DEBUG - -// make it go away if not debug -#define GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(obj, sel, retType, ...) do { } while (0) -#define GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, ...) do { } while (0) - -#endif // DEBUG diff --git a/Old My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMDebugThreadValidation.h b/Old My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMDebugThreadValidation.h deleted file mode 100755 index 3f50f17..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMDebugThreadValidation.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// GTMDebugThreadValidation.h -// -// Copyright 2016 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" -#import - -// GTMCheckCurrentQueue, GTMIsCurrentQueue -// -// GTMCheckCurrentQueue takes a target queue and uses _GTMDevAssert to -// report if that is not the currently executing queue. -// -// GTMIsCurrentQueue takes a target queue and returns true if the target queue -// is the currently executing dispatch queue. This can be passed to another -// assertion call in debug builds; it should never be used in release code. -// -// The dispatch queue must have a label. -#define GTMCheckCurrentQueue(targetQueue) \ - _GTMDevAssert(GTMIsCurrentQueue(targetQueue), \ - @"Current queue is %s (expected %s)", \ - _GTMQueueName(DISPATCH_CURRENT_QUEUE_LABEL), \ - _GTMQueueName(targetQueue)) - -#define GTMIsCurrentQueue(targetQueue) \ - (strcmp(_GTMQueueName(DISPATCH_CURRENT_QUEUE_LABEL), \ - _GTMQueueName(targetQueue)) == 0) - -#define _GTMQueueName(queue) \ - (strlen(dispatch_queue_get_label(queue)) > 0 ? \ - dispatch_queue_get_label(queue) : "unnamed") diff --git a/Old My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMMethodCheck.h b/Old My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMMethodCheck.h deleted file mode 100755 index 9fad81d..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/DebugUtils/GTMMethodCheck.h +++ /dev/null @@ -1,69 +0,0 @@ -// -// GTMMethodCheck.h -// -// Copyright 2006-2016 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import -#import - -/// A macro for enforcing debug time checks to make sure all required methods are linked in -// -// When using categories, it can be very easy to forget to include the -// implementation of a category. -// Let's say you had a class foo that depended on method bar of class baz, and -// method bar was implemented as a member of a category. -// You could add the following code: -// -// GTM_METHOD_CHECK(baz, bar) -// -// and the code would check to make sure baz was implemented just before main -// was called. This works for both dynamic libraries, and executables. -// -// -// This is not compiled into release builds. - -#ifdef DEBUG - -// This is the "magic". -// A) we need a multi layer define here so that the preprocessor expands -// __LINE__ the way we want it. We need __LINE__ so that each of our -// GTM_METHOD_CHECKs generates a unique function name. -#define GTM_METHOD_CHECK(class, method) GTM_METHOD_CHECK_INNER(class, method, __LINE__) -#define GTM_METHOD_CHECK_INNER(class, method, line) \ - GTM_METHOD_CHECK_INNER_INNER(class, method, line) - -// B) define a function that is called at startup to check that |class| has an -// implementation for |method| (either a class method or an instance method). -#define GTM_METHOD_CHECK_INNER_INNER(class, method, line) \ -__attribute__ ((constructor, visibility("hidden"))) \ - static void xxGTMMethodCheckMethod ## class ## line () { \ - @autoreleasepool { \ - if (![class instancesRespondToSelector:@selector(method)] \ - && ![class respondsToSelector:@selector(method)]) { \ - fprintf(stderr, "%s:%d: error: We need method '%s' to be linked in for class '%s'\n", \ - __FILE__, line, #method, #class); \ - exit(EX_SOFTWARE); \ - } \ - } \ -} - -#else // DEBUG - -// Do nothing in release. -#define GTM_METHOD_CHECK(class, method) - -#endif // DEBUG diff --git a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMLogger.h b/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMLogger.h deleted file mode 100755 index 16f0eaf..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMLogger.h +++ /dev/null @@ -1,508 +0,0 @@ -// -// GTMLogger.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Key Abstractions -// ---------------- -// -// This file declares multiple classes and protocols that are used by the -// GTMLogger logging system. The 4 main abstractions used in this file are the -// following: -// -// * logger (GTMLogger) - The main logging class that users interact with. It -// has methods for logging at different levels and uses a log writer, a log -// formatter, and a log filter to get the job done. -// -// * log writer (GTMLogWriter) - Writes a given string to some log file, where -// a "log file" can be a physical file on disk, a POST over HTTP to some URL, -// or even some in-memory structure (e.g., a ring buffer). -// -// * log formatter (GTMLogFormatter) - Given a format string and arguments as -// a va_list, returns a single formatted NSString. A "formatted string" could -// be a string with the date prepended, a string with values in a CSV format, -// or even a string of XML. -// -// * log filter (GTMLogFilter) - Given a formatted log message as an NSString -// and the level at which the message is to be logged, this class will decide -// whether the given message should be logged or not. This is a flexible way -// to filter out messages logged at a certain level, messages that contain -// certain text, or filter nothing out at all. This gives the caller the -// flexibility to dynamically enable debug logging in Release builds. -// -// This file also declares some classes to handle the common log writer, log -// formatter, and log filter cases. Callers can also create their own writers, -// formatters, and filters and they can even build them on top of the ones -// declared here. Keep in mind that your custom writer/formatter/filter may be -// called from multiple threads, so it must be thread-safe. - -#import -#import "GTMDefines.h" - -// Predeclaration of used protocols that are declared later in this file. -@protocol GTMLogWriter, GTMLogFormatter, GTMLogFilter; - -// GTMLogger -// -// GTMLogger is the primary user-facing class for an object-oriented logging -// system. It is built on the concept of log formatters (GTMLogFormatter), log -// writers (GTMLogWriter), and log filters (GTMLogFilter). When a message is -// sent to a GTMLogger to log a message, the message is formatted using the log -// formatter, then the log filter is consulted to see if the message should be -// logged, and if so, the message is sent to the log writer to be written out. -// -// GTMLogger is intended to be a flexible and thread-safe logging solution. Its -// flexibility comes from the fact that GTMLogger instances can be customized -// with user defined formatters, filters, and writers. And these writers, -// filters, and formatters can be combined, stacked, and customized in arbitrary -// ways to suit the needs at hand. For example, multiple writers can be used at -// the same time, and a GTMLogger instance can even be used as another -// GTMLogger's writer. This allows for arbitrarily deep logging trees. -// -// A standard GTMLogger uses a writer that sends messages to standard out, a -// formatter that smacks a timestamp and a few other bits of interesting -// information on the message, and a filter that filters out debug messages from -// release builds. Using the standard log settings, a log message will look like -// the following: -// -// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] foo= -// -// The output contains the date and time of the log message, the name of the -// process followed by its process ID/thread ID, the log level at which the -// message was logged (in the previous example the level was 1: -// kGTMLoggerLevelDebug), and finally, the user-specified log message itself (in -// this case, the log message was @"foo=%@", foo). -// -// Multiple instances of GTMLogger can be created, each configured their own -// way. Though GTMLogger is not a singleton (in the GoF sense), it does provide -// access to a shared (i.e., globally accessible) GTMLogger instance. This makes -// it convenient for all code in a process to use the same GTMLogger instance. -// The shared GTMLogger instance can also be configured in an arbitrary, and -// these configuration changes will affect all code that logs through the shared -// instance. - -// -// Log Levels -// ---------- -// GTMLogger has 3 different log levels: Debug, Info, and Error. GTMLogger -// doesn't take any special action based on the log level; it simply forwards -// this information on to formatters, filters, and writers, each of which may -// optionally take action based on the level. Since log level filtering is -// performed at runtime, log messages are typically not filtered out at compile -// time. The exception to this rule is that calls to the GTMLoggerDebug() macro -// *ARE* filtered out of non-DEBUG builds. This is to be backwards compatible -// with behavior that many developers are currently used to. Note that this -// means that GTMLoggerDebug(@"hi") will be compiled out of Release builds, but -// [[GTMLogger sharedLogger] logDebug:@"hi"] will NOT be compiled out. -// -// Standard loggers are created with the GTMLogLevelFilter log filter, which -// filters out certain log messages based on log level, and some other settings. -// -// In addition to the -logDebug:, -logInfo:, and -logError: methods defined on -// GTMLogger itself, there are also C macros that make usage of the shared -// GTMLogger instance very convenient. These macros are: -// -// GTMLoggerDebug(...) -// GTMLoggerInfo(...) -// GTMLoggerError(...) -// -// Again, a notable feature of these macros is that GTMLogDebug() calls *will be -// compiled out of non-DEBUG builds*. -// -// Standard Loggers -// ---------------- -// GTMLogger has the concept of "standard loggers". A standard logger is simply -// a logger that is pre-configured with some standard/common writer, formatter, -// and filter combination. Standard loggers are created using the creation -// methods beginning with "standard". The alternative to a standard logger is a -// regular logger, which will send messages to stdout, with no special -// formatting, and no filtering. -// -// How do I use GTMLogger? -// ---------------------- -// The typical way you will want to use GTMLogger is to simply use the -// GTMLogger*() macros for logging from code. That way we can easily make -// changes to the GTMLogger class and simply update the macros accordingly. Only -// your application startup code (perhaps, somewhere in main()) should use the -// GTMLogger class directly in order to configure the shared logger, which all -// of the code using the macros will be using. Again, this is just the typical -// situation. -// -// To be complete, there are cases where you may want to use GTMLogger directly, -// or even create separate GTMLogger instances for some reason. That's fine, -// too. -// -// Examples -// -------- -// The following show some common GTMLogger use cases. -// -// 1. You want to log something as simply as possible. Also, this call will only -// appear in debug builds. In non-DEBUG builds it will be completely removed. -// -// GTMLoggerDebug(@"foo = %@", foo); -// -// 2. The previous example is similar to the following. The major difference is -// that the previous call (example 1) will be compiled out of Release builds -// but this statement will not be compiled out. -// -// [[GTMLogger sharedLogger] logDebug:@"foo = %@", foo]; -// -// 3. Send all logging output from the shared logger to a file. We do this by -// creating an NSFileHandle for writing associated with a file, and setting -// that file handle as the logger's writer. -// -// NSFileHandle *f = [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" -// create:YES]; -// [[GTMLogger sharedLogger] setWriter:f]; -// GTMLoggerError(@"hi"); // This will be sent to /tmp/f.log -// -// 4. Create a new GTMLogger that will log to a file. This example differs from -// the previous one because here we create a new GTMLogger that is different -// from the shared logger. -// -// GTMLogger *logger = [GTMLogger standardLoggerWithPath:@"/tmp/temp.log"]; -// [logger logInfo:@"hi temp log file"]; -// -// 5. Create a logger that writes to stdout and does NOT do any formatting to -// the log message. This might be useful, for example, when writing a help -// screen for a command-line tool to standard output. -// -// GTMLogger *logger = [GTMLogger logger]; -// [logger logInfo:@"%@ version 0.1 usage", progName]; -// -// 6. Send log output to stdout AND to a log file. The trick here is that -// NSArrays function as composite log writers, which means when an array is -// set as the log writer, it forwards all logging messages to all of its -// contained GTMLogWriters. -// -// // Create array of GTMLogWriters -// NSArray *writers = [NSArray arrayWithObjects: -// [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" create:YES], -// [NSFileHandle fileHandleWithStandardOutput], nil]; -// -// GTMLogger *logger = [GTMLogger standardLogger]; -// [logger setWriter:writers]; -// [logger logInfo:@"hi"]; // Output goes to stdout and /tmp/f.log -// -// For futher details on log writers, formatters, and filters, see the -// documentation below. -// -// NOTE: GTMLogger is application level logging. By default it does nothing -// with _GTMDevLog/_GTMDevAssert (see GTMDefines.h). An application can choose -// to bridge _GTMDevLog/_GTMDevAssert to GTMLogger by providing macro -// definitions in its prefix header (see GTMDefines.h for how one would do -// that). -// -@interface GTMLogger : NSObject { - @private - id writer_; - id formatter_; - id filter_; -} - -// -// Accessors for the shared logger instance -// - -// Returns a shared/global standard GTMLogger instance. Callers should typically -// use this method to get a GTMLogger instance, unless they explicitly want -// their own instance to configure for their own needs. This is the only method -// that returns a shared instance; all the rest return new GTMLogger instances. -+ (id)sharedLogger; - -// Sets the shared logger instance to |logger|. Future calls to +sharedLogger -// will return |logger| instead. -+ (void)setSharedLogger:(GTMLogger *)logger; - -// -// Creation methods -// - -// Returns a new autoreleased GTMLogger instance that will log to stdout, using -// the GTMLogStandardFormatter, and the GTMLogLevelFilter filter. -+ (id)standardLogger; - -// Same as +standardLogger, but logs to stderr. -+ (id)standardLoggerWithStderr; - -// Same as +standardLogger but levels >= kGTMLoggerLevelError are routed to -// stderr, everything else goes to stdout. -+ (id)standardLoggerWithStdoutAndStderr; - -// Returns a new standard GTMLogger instance with a log writer that will -// write to the file at |path|, and will use the GTMLogStandardFormatter and -// GTMLogLevelFilter classes. If |path| does not exist, it will be created. -+ (id)standardLoggerWithPath:(NSString *)path; - -// Returns an autoreleased GTMLogger instance that will use the specified -// |writer|, |formatter|, and |filter|. -+ (id)loggerWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter; - -// Returns an autoreleased GTMLogger instance that logs to stdout, with the -// basic formatter, and no filter. The returned logger differs from the logger -// returned by +standardLogger because this one does not do any filtering and -// does not do any special log formatting; this is the difference between a -// "regular" logger and a "standard" logger. -+ (id)logger; - -// Designated initializer. This method returns a GTMLogger initialized with the -// specified |writer|, |formatter|, and |filter|. See the setter methods below -// for what values will be used if nil is passed for a parameter. -- (id)initWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter; - -// -// Logging methods -// - -// Logs a message at the debug level (kGTMLoggerLevelDebug). -- (void)logDebug:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); -// Logs a message at the info level (kGTMLoggerLevelInfo). -- (void)logInfo:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); -// Logs a message at the error level (kGTMLoggerLevelError). -- (void)logError:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); -// Logs a message at the assert level (kGTMLoggerLevelAssert). -- (void)logAssert:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); - - -// -// Accessors -// - -// Accessor methods for the log writer. If the log writer is set to nil, -// [NSFileHandle fileHandleWithStandardOutput] is used. -- (id)writer; -- (void)setWriter:(id)writer; - -// Accessor methods for the log formatter. If the log formatter is set to nil, -// GTMLogBasicFormatter is used. This formatter will format log messages in a -// plain printf style. -- (id)formatter; -- (void)setFormatter:(id)formatter; - -// Accessor methods for the log filter. If the log filter is set to nil, -// GTMLogNoFilter is used, which allows all log messages through. -- (id)filter; -- (void)setFilter:(id)filter; - -@end // GTMLogger - - -// Helper functions that are used by the convenience GTMLogger*() macros that -// enable the logging of function names. -@interface GTMLogger (GTMLoggerMacroHelpers) -- (void)logFuncDebug:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -- (void)logFuncInfo:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -- (void)logFuncError:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -- (void)logFuncAssert:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -@end // GTMLoggerMacroHelpers - - -// The convenience macros are only defined if they haven't already been defined. -#ifndef GTMLoggerInfo - -// Convenience macros that log to the shared GTMLogger instance. These macros -// are how users should typically log to GTMLogger. Notice that GTMLoggerDebug() -// calls will be compiled out of non-Debug builds. -#define GTMLoggerDebug(...) \ - [[GTMLogger sharedLogger] logFuncDebug:__func__ msg:__VA_ARGS__] -#define GTMLoggerInfo(...) \ - [[GTMLogger sharedLogger] logFuncInfo:__func__ msg:__VA_ARGS__] -#define GTMLoggerError(...) \ - [[GTMLogger sharedLogger] logFuncError:__func__ msg:__VA_ARGS__] -#define GTMLoggerAssert(...) \ - [[GTMLogger sharedLogger] logFuncAssert:__func__ msg:__VA_ARGS__] - -// If we're not in a debug build, remove the GTMLoggerDebug statements. This -// makes calls to GTMLoggerDebug "compile out" of Release builds -#ifndef DEBUG -#undef GTMLoggerDebug -#define GTMLoggerDebug(...) do {} while(0) -#endif - -#endif // !defined(GTMLoggerInfo) - -// Log levels. -typedef enum { - kGTMLoggerLevelUnknown, - kGTMLoggerLevelDebug, - kGTMLoggerLevelInfo, - kGTMLoggerLevelError, - kGTMLoggerLevelAssert, -} GTMLoggerLevel; - - -// -// Log Writers -// - -// Protocol to be implemented by a GTMLogWriter instance. -@protocol GTMLogWriter -// Writes the given log message to where the log writer is configured to write. -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level; -@end // GTMLogWriter - - -// Simple category on NSFileHandle that makes NSFileHandles valid log writers. -// This is convenient because something like, say, +fileHandleWithStandardError -// now becomes a valid log writer. Log messages are written to the file handle -// with a newline appended. -@interface NSFileHandle (GTMFileHandleLogWriter) -// Opens the file at |path| in append mode, and creates the file with |mode| -// if it didn't previously exist. -+ (id)fileHandleForLoggingAtPath:(NSString *)path mode:(mode_t)mode; -@end // NSFileHandle - - -// This category makes NSArray a GTMLogWriter that can be composed of other -// GTMLogWriters. This is the classic Composite GoF design pattern. When the -// GTMLogWriter -logMessage:level: message is sent to the array, the array -// forwards the message to all of its elements that implement the GTMLogWriter -// protocol. -// -// This is useful in situations where you would like to send log output to -// multiple log writers at the same time. Simply create an NSArray of the log -// writers you wish to use, then set the array as the "writer" for your -// GTMLogger instance. -@interface NSArray (GTMArrayCompositeLogWriter) -@end // GTMArrayCompositeLogWriter - - -// This category adapts the GTMLogger interface so that it can be used as a log -// writer; it's an "adapter" in the GoF Adapter pattern sense. -// -// This is useful when you want to configure a logger to log to a specific -// writer with a specific formatter and/or filter. But you want to also compose -// that with a different log writer that may have its own formatter and/or -// filter. -@interface GTMLogger (GTMLoggerLogWriter) -@end // GTMLoggerLogWriter - - -// -// Log Formatters -// - -// Protocol to be implemented by a GTMLogFormatter instance. -@protocol GTMLogFormatter -// Returns a formatted string using the format specified in |fmt| and the va -// args specified in |args|. -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level NS_FORMAT_FUNCTION(2, 0); -@end // GTMLogFormatter - - -// A basic log formatter that formats a string the same way that NSLog (or -// printf) would. It does not do anything fancy, nor does it add any data of its -// own. -@interface GTMLogBasicFormatter : NSObject - -// Helper method for prettying C99 __func__ and GCC __PRETTY_FUNCTION__ -- (NSString *)prettyNameForFunc:(NSString *)func; - -@end // GTMLogBasicFormatter - - -// A log formatter that formats the log string like the basic formatter, but -// also prepends a timestamp and some basic process info to the message, as -// shown in the following sample output. -// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] log mesage here -@interface GTMLogStandardFormatter : GTMLogBasicFormatter { - @private - NSDateFormatter *dateFormatter_; // yyyy-MM-dd HH:mm:ss.SSS - NSString *pname_; - pid_t pid_; -} -@end // GTMLogStandardFormatter - - -// -// Log Filters -// - -// Protocol to be implemented by a GTMLogFilter instance. -@protocol GTMLogFilter -// Returns YES if |msg| at |level| should be logged; NO otherwise. -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level; -@end // GTMLogFilter - - -// A log filter that filters messages at the kGTMLoggerLevelDebug level out of -// non-debug builds. Messages at the kGTMLoggerLevelInfo level are also filtered -// out of non-debug builds unless GTMVerboseLogging is set in the environment or -// the processes's defaults. Messages at the kGTMLoggerLevelError level are -// never filtered. -@interface GTMLogLevelFilter : NSObject { - @private - BOOL verboseLoggingEnabled_; - NSUserDefaults *userDefaults_; -} -@end // GTMLogLevelFilter - -// A simple log filter that does NOT filter anything out; -// -filterAllowsMessage:level will always return YES. This can be a convenient -// way to enable debug-level logging in release builds (if you so desire). -@interface GTMLogNoFilter : NSObject -@end // GTMLogNoFilter - - -// Base class for custom level filters. Not for direct use, use the minimum -// or maximum level subclasses below. -@interface GTMLogAllowedLevelFilter : NSObject { - @private - NSIndexSet *allowedLevels_; -} -@end - -// A log filter that allows you to set a minimum log level. Messages below this -// level will be filtered. -@interface GTMLogMininumLevelFilter : GTMLogAllowedLevelFilter - -// Designated initializer, logs at levels < |level| will be filtered. -- (id)initWithMinimumLevel:(GTMLoggerLevel)level; - -@end - -// A log filter that allows you to set a maximum log level. Messages whose level -// exceeds this level will be filtered. This is really only useful if you have -// a composite GTMLogger that is sending the other messages elsewhere. -@interface GTMLogMaximumLevelFilter : GTMLogAllowedLevelFilter - -// Designated initializer, logs at levels > |level| will be filtered. -- (id)initWithMaximumLevel:(GTMLoggerLevel)level; - -@end - - -// For subclasses only -@interface GTMLogger (PrivateMethods) - -- (void)logInternalFunc:(const char *)func - format:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level NS_FORMAT_FUNCTION(2, 0); - -@end - diff --git a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMLogger.m b/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMLogger.m deleted file mode 100755 index e6b2ba1..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMLogger.m +++ /dev/null @@ -1,648 +0,0 @@ -// -// GTMLogger.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMLogger.h" -#import -#import -#import -#import - - -#if !defined(__clang__) && (__GNUC__*10+__GNUC_MINOR__ >= 42) -// Some versions of GCC (4.2 and below AFAIK) aren't great about supporting -// -Wmissing-format-attribute -// when the function is anything more complex than foo(NSString *fmt, ...). -// You see the error inside the function when you turn ... into va_args and -// attempt to call another function (like vsprintf for example). -// So we just shut off the warning for this file. We reenable it at the end. -#pragma GCC diagnostic ignored "-Wmissing-format-attribute" -#endif // !__clang__ - -// Reference to the shared GTMLogger instance. This is not a singleton, it's -// just an easy reference to one shared instance. -static GTMLogger *gSharedLogger = nil; - - -@implementation GTMLogger - -// Returns a pointer to the shared logger instance. If none exists, a standard -// logger is created and returned. -+ (id)sharedLogger { - @synchronized(self) { - if (gSharedLogger == nil) { - gSharedLogger = [[self standardLogger] retain]; - } - } - return [[gSharedLogger retain] autorelease]; -} - -+ (void)setSharedLogger:(GTMLogger *)logger { - @synchronized(self) { - [gSharedLogger autorelease]; - gSharedLogger = [logger retain]; - } -} - -+ (id)standardLogger { - // Don't trust NSFileHandle not to throw - @try { - id writer = [NSFileHandle fileHandleWithStandardOutput]; - id fr = [[[GTMLogStandardFormatter alloc] init] - autorelease]; - id filter = [[[GTMLogLevelFilter alloc] init] autorelease]; - return [[[self alloc] initWithWriter:writer - formatter:fr - filter:filter] autorelease]; - } - @catch (id e) { - // Ignored - } - return nil; -} - -+ (id)standardLoggerWithStderr { - // Don't trust NSFileHandle not to throw - @try { - id me = [self standardLogger]; - [me setWriter:[NSFileHandle fileHandleWithStandardError]]; - return me; - } - @catch (id e) { - // Ignored - } - return nil; -} - -+ (id)standardLoggerWithStdoutAndStderr { - // We're going to take advantage of the GTMLogger to GTMLogWriter adaptor - // and create a composite logger that an outer "standard" logger can use - // as a writer. Our inner loggers should apply no formatting since the main - // logger does that and we want the caller to be able to change formatters - // or add writers without knowing the inner structure of our composite. - - // Don't trust NSFileHandle not to throw - @try { - GTMLogBasicFormatter *formatter = [[[GTMLogBasicFormatter alloc] init] - autorelease]; - GTMLogger *stdoutLogger = - [self loggerWithWriter:[NSFileHandle fileHandleWithStandardOutput] - formatter:formatter - filter:[[[GTMLogMaximumLevelFilter alloc] - initWithMaximumLevel:kGTMLoggerLevelInfo] - autorelease]]; - GTMLogger *stderrLogger = - [self loggerWithWriter:[NSFileHandle fileHandleWithStandardError] - formatter:formatter - filter:[[[GTMLogMininumLevelFilter alloc] - initWithMinimumLevel:kGTMLoggerLevelError] - autorelease]]; - GTMLogger *compositeWriter = - [self loggerWithWriter:[NSArray arrayWithObjects: - stdoutLogger, stderrLogger, nil] - formatter:formatter - filter:[[[GTMLogNoFilter alloc] init] autorelease]]; - GTMLogger *outerLogger = [self standardLogger]; - [outerLogger setWriter:compositeWriter]; - return outerLogger; - } - @catch (id e) { - // Ignored - } - return nil; -} - -+ (id)standardLoggerWithPath:(NSString *)path { - @try { - NSFileHandle *fh = [NSFileHandle fileHandleForLoggingAtPath:path mode:0644]; - if (fh == nil) return nil; - id me = [self standardLogger]; - [me setWriter:fh]; - return me; - } - @catch (id e) { - // Ignored - } - return nil; -} - -+ (id)loggerWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter { - return [[[self alloc] initWithWriter:writer - formatter:formatter - filter:filter] autorelease]; -} - -+ (id)logger { - return [[[self alloc] init] autorelease]; -} - -- (id)init { - return [self initWithWriter:nil formatter:nil filter:nil]; -} - -- (id)initWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter { - if ((self = [super init])) { - [self setWriter:writer]; - [self setFormatter:formatter]; - [self setFilter:filter]; - } - return self; -} - -- (void)dealloc { - // Unlikely, but |writer_| may be an NSFileHandle, which can throw - @try { - [formatter_ release]; - [filter_ release]; - [writer_ release]; - } - @catch (id e) { - // Ignored - } - [super dealloc]; -} - -- (id)writer { - return [[writer_ retain] autorelease]; -} - -- (void)setWriter:(id)writer { - @synchronized(self) { - [writer_ autorelease]; - writer_ = nil; - if (writer == nil) { - // Try to use stdout, but don't trust NSFileHandle - @try { - writer_ = [[NSFileHandle fileHandleWithStandardOutput] retain]; - } - @catch (id e) { - // Leave |writer_| nil - } - } else { - writer_ = [writer retain]; - } - } -} - -- (id)formatter { - return [[formatter_ retain] autorelease]; -} - -- (void)setFormatter:(id)formatter { - @synchronized(self) { - [formatter_ autorelease]; - formatter_ = nil; - if (formatter == nil) { - @try { - formatter_ = [[GTMLogBasicFormatter alloc] init]; - } - @catch (id e) { - // Leave |formatter_| nil - } - } else { - formatter_ = [formatter retain]; - } - } -} - -- (id)filter { - return [[filter_ retain] autorelease]; -} - -- (void)setFilter:(id)filter { - @synchronized(self) { - [filter_ autorelease]; - filter_ = nil; - if (filter == nil) { - @try { - filter_ = [[GTMLogNoFilter alloc] init]; - } - @catch (id e) { - // Leave |filter_| nil - } - } else { - filter_ = [filter retain]; - } - } -} - -- (void)logDebug:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelDebug]; - va_end(args); -} - -- (void)logInfo:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelInfo]; - va_end(args); -} - -- (void)logError:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelError]; - va_end(args); -} - -- (void)logAssert:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelAssert]; - va_end(args); -} - -@end // GTMLogger - -@implementation GTMLogger (GTMLoggerMacroHelpers) - -- (void)logFuncDebug:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelDebug]; - va_end(args); -} - -- (void)logFuncInfo:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelInfo]; - va_end(args); -} - -- (void)logFuncError:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelError]; - va_end(args); -} - -- (void)logFuncAssert:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelAssert]; - va_end(args); -} - -@end // GTMLoggerMacroHelpers - -@implementation GTMLogger (PrivateMethods) - -- (void)logInternalFunc:(const char *)func - format:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level { - // Primary point where logging happens, logging should never throw, catch - // everything. - @try { - NSString *fname = func ? [NSString stringWithUTF8String:func] : nil; - NSString *msg = [formatter_ stringForFunc:fname - withFormat:fmt - valist:args - level:level]; - if (msg && [filter_ filterAllowsMessage:msg level:level]) - [writer_ logMessage:msg level:level]; - } - @catch (id e) { - // Ignored - } -} - -@end // PrivateMethods - - -@implementation NSFileHandle (GTMFileHandleLogWriter) - -+ (id)fileHandleForLoggingAtPath:(NSString *)path mode:(mode_t)mode { - int fd = -1; - if (path) { - int flags = O_WRONLY | O_APPEND | O_CREAT; - fd = open([path fileSystemRepresentation], flags, mode); - } - if (fd == -1) return nil; - return [[[self alloc] initWithFileDescriptor:fd - closeOnDealloc:YES] autorelease]; -} - -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - @synchronized(self) { - // Closed pipes should not generate exceptions in our caller. Catch here - // as well [GTMLogger logInternalFunc:...] so that an exception in this - // writer does not prevent other writers from having a chance. - @try { - NSString *line = [NSString stringWithFormat:@"%@\n", msg]; - [self writeData:[line dataUsingEncoding:NSUTF8StringEncoding]]; - } - @catch (id e) { - // Ignored - } - } -} - -@end // GTMFileHandleLogWriter - - -@implementation NSArray (GTMArrayCompositeLogWriter) - -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - @synchronized(self) { - id child = nil; - for (child in self) { - if ([child conformsToProtocol:@protocol(GTMLogWriter)]) - [child logMessage:msg level:level]; - } - } -} - -@end // GTMArrayCompositeLogWriter - - -@implementation GTMLogger (GTMLoggerLogWriter) - -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - switch (level) { - case kGTMLoggerLevelDebug: - [self logDebug:@"%@", msg]; - break; - case kGTMLoggerLevelInfo: - [self logInfo:@"%@", msg]; - break; - case kGTMLoggerLevelError: - [self logError:@"%@", msg]; - break; - case kGTMLoggerLevelAssert: - [self logAssert:@"%@", msg]; - break; - default: - // Ignore the message. - break; - } -} - -@end // GTMLoggerLogWriter - - -@implementation GTMLogBasicFormatter - -- (NSString *)prettyNameForFunc:(NSString *)func { - NSString *name = [func stringByTrimmingCharactersInSet: - [NSCharacterSet whitespaceAndNewlineCharacterSet]]; - NSString *function = @"(unknown)"; - if ([name length]) { - if (// Objective C __func__ and __PRETTY_FUNCTION__ - [name hasPrefix:@"-["] || [name hasPrefix:@"+["] || - // C++ __PRETTY_FUNCTION__ and other preadorned formats - [name hasSuffix:@")"]) { - function = name; - } else { - // Assume C99 __func__ - function = [NSString stringWithFormat:@"%@()", name]; - } - } - return function; -} - -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level { - // Performance note: We may want to do a quick check here to see if |fmt| - // contains a '%', and if not, simply return 'fmt'. - if (!(fmt && args)) return nil; - return [[[NSString alloc] initWithFormat:fmt arguments:args] autorelease]; -} - -@end // GTMLogBasicFormatter - - -@implementation GTMLogStandardFormatter - -- (id)init { - if ((self = [super init])) { - dateFormatter_ = [[NSDateFormatter alloc] init]; - [dateFormatter_ setFormatterBehavior:NSDateFormatterBehavior10_4]; - [dateFormatter_ setDateFormat:@"yyyy-MM-dd HH:mm:ss.SSS"]; - pname_ = [[[NSProcessInfo processInfo] processName] copy]; - pid_ = [[NSProcessInfo processInfo] processIdentifier]; - if (!(dateFormatter_ && pname_)) { - [self release]; - return nil; - } - } - return self; -} - -- (void)dealloc { - [dateFormatter_ release]; - [pname_ release]; - [super dealloc]; -} - -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level { - NSString *tstamp = nil; - @synchronized (dateFormatter_) { - tstamp = [dateFormatter_ stringFromDate:[NSDate date]]; - } - return [NSString stringWithFormat:@"%@ %@[%d/%p] [lvl=%d] %@ %@", - tstamp, pname_, pid_, pthread_self(), - level, [self prettyNameForFunc:func], - // |super| has guard for nil |fmt| and |args| - [super stringForFunc:func withFormat:fmt valist:args level:level]]; -} - -@end // GTMLogStandardFormatter - -static NSString *const kVerboseLoggingKey = @"GTMVerboseLogging"; - -// Check the environment and the user preferences for the GTMVerboseLogging key -// to see if verbose logging has been enabled. The environment variable will -// override the defaults setting, so check the environment first. -// COV_NF_START -static BOOL IsVerboseLoggingEnabled(NSUserDefaults *userDefaults) { - NSString *value = [[[NSProcessInfo processInfo] environment] - objectForKey:kVerboseLoggingKey]; - if (value) { - // Emulate [NSString boolValue] for pre-10.5 - value = [value stringByTrimmingCharactersInSet: - [NSCharacterSet whitespaceAndNewlineCharacterSet]]; - if ([[value uppercaseString] hasPrefix:@"Y"] || - [[value uppercaseString] hasPrefix:@"T"] || - [value intValue]) { - return YES; - } else { - return NO; - } - } - return [userDefaults boolForKey:kVerboseLoggingKey]; -} -// COV_NF_END - -@implementation GTMLogLevelFilter - -- (id)init { - self = [super init]; - if (self) { - // Keep a reference to standardUserDefaults, avoiding a crash if client code calls - // "NSUserDefaults resetStandardUserDefaults" which releases it from memory. We are still - // notified of changes through our instance. Note: resetStandardUserDefaults does not actually - // clear settings: - // https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/index.html#//apple_ref/occ/clm/NSUserDefaults/resetStandardUserDefaults - // and so should only be called in test code if necessary. - userDefaults_ = [[NSUserDefaults standardUserDefaults] retain]; - [userDefaults_ addObserver:self - forKeyPath:kVerboseLoggingKey - options:NSKeyValueObservingOptionNew - context:nil]; - - verboseLoggingEnabled_ = IsVerboseLoggingEnabled(userDefaults_); - } - - return self; -} - -- (void)dealloc { - [userDefaults_ removeObserver:self forKeyPath:kVerboseLoggingKey]; - [userDefaults_ release]; - - [super dealloc]; -} - -// In DEBUG builds, log everything. If we're not in a debug build we'll assume -// that we're in a Release build. -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level { -#if defined(DEBUG) && DEBUG - return YES; -#endif - - BOOL allow = YES; - - switch (level) { - case kGTMLoggerLevelDebug: - allow = NO; - break; - case kGTMLoggerLevelInfo: - allow = verboseLoggingEnabled_; - break; - case kGTMLoggerLevelError: - allow = YES; - break; - case kGTMLoggerLevelAssert: - allow = YES; - break; - default: - allow = YES; - break; - } - - return allow; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath - ofObject:(id)object - change:(NSDictionary *)change - context:(void *)context -{ - if([keyPath isEqual:kVerboseLoggingKey]) { - verboseLoggingEnabled_ = IsVerboseLoggingEnabled(userDefaults_); - } -} - -@end // GTMLogLevelFilter - - -@implementation GTMLogNoFilter - -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level { - return YES; // Allow everything through -} - -@end // GTMLogNoFilter - - -@implementation GTMLogAllowedLevelFilter - -// Private designated initializer -- (id)initWithAllowedLevels:(NSIndexSet *)levels { - self = [super init]; - if (self != nil) { - allowedLevels_ = [levels retain]; - // Cap min/max level - if (!allowedLevels_ || - // NSIndexSet is unsigned so only check the high bound, but need to - // check both first and last index because NSIndexSet appears to allow - // wraparound. - ([allowedLevels_ firstIndex] > kGTMLoggerLevelAssert) || - ([allowedLevels_ lastIndex] > kGTMLoggerLevelAssert)) { - [self release]; - return nil; - } - } - return self; -} - -- (id)init { - // Allow all levels in default init - return [self initWithAllowedLevels:[NSIndexSet indexSetWithIndexesInRange: - NSMakeRange(kGTMLoggerLevelUnknown, - (kGTMLoggerLevelAssert - kGTMLoggerLevelUnknown + 1))]]; -} - -- (void)dealloc { - [allowedLevels_ release]; - [super dealloc]; -} - -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level { - return [allowedLevels_ containsIndex:level]; -} - -@end // GTMLogAllowedLevelFilter - - -@implementation GTMLogMininumLevelFilter - -- (id)initWithMinimumLevel:(GTMLoggerLevel)level { - return [super initWithAllowedLevels:[NSIndexSet indexSetWithIndexesInRange: - NSMakeRange(level, - (kGTMLoggerLevelAssert - level + 1))]]; -} - -@end // GTMLogMininumLevelFilter - - -@implementation GTMLogMaximumLevelFilter - -- (id)initWithMaximumLevel:(GTMLoggerLevel)level { - return [super initWithAllowedLevels:[NSIndexSet indexSetWithIndexesInRange: - NSMakeRange(kGTMLoggerLevelUnknown, level + 1)]]; -} - -@end // GTMLogMaximumLevelFilter - -#if !defined(__clang__) && (__GNUC__*10+__GNUC_MINOR__ >= 42) -// See comment at top of file. -#pragma GCC diagnostic error "-Wmissing-format-attribute" -#endif // !__clang__ diff --git a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSData+zlib.h b/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSData+zlib.h deleted file mode 100755 index dceadc4..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSData+zlib.h +++ /dev/null @@ -1,199 +0,0 @@ -// -// GTMNSData+zlib.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -/// Helpers for dealing w/ zlib inflate/deflate calls. -@interface NSData (GTMZLibAdditions) - -// NOTE: For 64bit, none of these apis handle input sizes >32bits, they will -// return nil when given such data. To handle data of that size you really -// should be streaming it rather then doing it all in memory. - -#pragma mark Gzip Compression - -/// Return an autoreleased NSData w/ the result of gzipping the bytes. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length; -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of gzipping the payload of |data|. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByGzippingData:(NSData *)data __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByGzippingData:(NSData *)data - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of gzipping the bytes using |level| compression level. -// -// |level| can be 1-9, any other values will be clipped to that range. -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of gzipping the payload of |data| using |level| compression level. -+ (NSData *)gtm_dataByGzippingData:(NSData *)data - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByGzippingData:(NSData *)data - compressionLevel:(int)level - error:(NSError **)error; - -#pragma mark Zlib "Stream" Compression - -// NOTE: deflate is *NOT* gzip. deflate is a "zlib" stream. pick which one -// you really want to create. (the inflate api will handle either) - -/// Return an autoreleased NSData w/ the result of deflating the bytes. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of deflating the payload of |data|. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of deflating the bytes using |level| compression level. -// -// |level| can be 1-9, any other values will be clipped to that range. -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of deflating the payload of |data| using |level| compression level. -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data - compressionLevel:(int)level - error:(NSError **)error; - -#pragma mark Uncompress of Gzip or Zlib - -/// Return an autoreleased NSData w/ the result of decompressing the bytes. -// -// The bytes to decompress can be zlib or gzip payloads. -+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes - length:(NSUInteger)length __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of decompressing the payload of |data|. -// -// The data to decompress can be zlib or gzip payloads. -+ (NSData *)gtm_dataByInflatingData:(NSData *)data __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByInflatingData:(NSData *)data - error:(NSError **)error; - -#pragma mark "Raw" Compression Support - -// NOTE: raw deflate is *NOT* gzip or deflate. it does not include a header -// of any form and should only be used within streams here an external crc/etc. -// is done to validate the data. The RawInflate apis can be used on data -// processed like this. - -/// Return an autoreleased NSData w/ the result of *raw* deflating the bytes. -// -// Uses the default compression level. -// *No* header is added to the resulting data. -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of *raw* deflating the payload of |data|. -// -// Uses the default compression level. -// *No* header is added to the resulting data. -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of *raw* deflating the bytes using |level| compression level. -// -// |level| can be 1-9, any other values will be clipped to that range. -// *No* header is added to the resulting data. -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of *raw* deflating the payload of |data| using |level| compression level. -// *No* header is added to the resulting data. -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data - compressionLevel:(int)level - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of *raw* decompressing the bytes. -// -// The data to decompress, it should *not* have any header (zlib nor gzip). -+ (NSData *)gtm_dataByRawInflatingBytes:(const void *)bytes - length:(NSUInteger)length __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawInflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of *raw* decompressing the payload of |data|. -// -// The data to decompress, it should *not* have any header (zlib nor gzip). -+ (NSData *)gtm_dataByRawInflatingData:(NSData *)data __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawInflatingData:(NSData *)data - error:(NSError **)error; - -@end - -FOUNDATION_EXPORT NSString *const GTMNSDataZlibErrorDomain; -FOUNDATION_EXPORT NSString *const GTMNSDataZlibErrorKey; // NSNumber -FOUNDATION_EXPORT NSString *const GTMNSDataZlibRemainingBytesKey; // NSNumber - -typedef NS_ENUM(NSInteger, GTMNSDataZlibError) { - GTMNSDataZlibErrorGreaterThan32BitsToCompress = 1024, - // An internal zlib error. - // GTMNSDataZlibErrorKey will contain the error value. - // NSLocalizedDescriptionKey may contain an error string from zlib. - // Look in zlib.h for list of errors. - GTMNSDataZlibErrorInternal, - // There was left over data in the buffer that was not used. - // GTMNSDataZlibRemainingBytesKey will contain number of remaining bytes. - GTMNSDataZlibErrorDataRemaining -}; diff --git a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSData+zlib.m b/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSData+zlib.m deleted file mode 100755 index bf74b2d..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSData+zlib.m +++ /dev/null @@ -1,531 +0,0 @@ -// -// GTMNSData+zlib.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSData+zlib.h" -#import -#import "GTMDefines.h" - -#define kChunkSize 1024 - -NSString *const GTMNSDataZlibErrorDomain = @"com.google.GTMNSDataZlibErrorDomain"; -NSString *const GTMNSDataZlibErrorKey = @"GTMNSDataZlibErrorKey"; -NSString *const GTMNSDataZlibRemainingBytesKey = @"GTMNSDataZlibRemainingBytesKey"; - -typedef enum { - CompressionModeZlib, - CompressionModeGzip, - CompressionModeRaw, -} CompressionMode; - -@interface NSData (GTMZlibAdditionsPrivate) -+ (NSData *)gtm_dataByCompressingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - mode:(CompressionMode)mode - error:(NSError **)error; -+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes - length:(NSUInteger)length - isRawData:(BOOL)isRawData - error:(NSError **)error; -@end - -@implementation NSData (GTMZlibAdditionsPrivate) - -+ (NSData *)gtm_dataByCompressingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - mode:(CompressionMode)mode - error:(NSError **)error { - if (!bytes || !length) { - return nil; - } - -#if defined(__LP64__) && __LP64__ - // Don't support > 32bit length for 64 bit, see note in header. - if (length > UINT_MAX) { - if (error) { - *error = [NSError errorWithDomain:GTMNSDataZlibErrorDomain - code:GTMNSDataZlibErrorGreaterThan32BitsToCompress - userInfo:nil]; - } - return nil; - } -#endif - - if (level == Z_DEFAULT_COMPRESSION) { - // the default value is actually outside the range, so we have to let it - // through specifically. - } else if (level < Z_BEST_SPEED) { - level = Z_BEST_SPEED; - } else if (level > Z_BEST_COMPRESSION) { - level = Z_BEST_COMPRESSION; - } - - z_stream strm; - bzero(&strm, sizeof(z_stream)); - - int memLevel = 8; // the default - int windowBits = 15; // the default - switch (mode) { - case CompressionModeZlib: - // nothing to do - break; - - case CompressionModeGzip: - windowBits += 16; // enable gzip header instead of zlib header - break; - - case CompressionModeRaw: - windowBits *= -1; // Negative to mean no header. - break; - } - int retCode; - if ((retCode = deflateInit2(&strm, level, Z_DEFLATED, windowBits, - memLevel, Z_DEFAULT_STRATEGY)) != Z_OK) { - // COV_NF_START - no real way to force this in a unittest (we guard all args) - if (error) { - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:retCode] - forKey:GTMNSDataZlibErrorKey]; - *error = [NSError errorWithDomain:GTMNSDataZlibErrorDomain - code:GTMNSDataZlibErrorInternal - userInfo:userInfo]; - } - return nil; - // COV_NF_END - } - - // hint the size at 1/4 the input size - NSMutableData *result = [NSMutableData dataWithCapacity:(length/4)]; - unsigned char output[kChunkSize]; - - // setup the input - strm.avail_in = (unsigned int)length; - strm.next_in = (unsigned char*)bytes; - - // loop to collect the data - do { - // update what we're passing in - strm.avail_out = kChunkSize; - strm.next_out = output; - retCode = deflate(&strm, Z_FINISH); - if ((retCode != Z_OK) && (retCode != Z_STREAM_END)) { - // COV_NF_START - no real way to force this in a unittest - // (in inflate, we can feed bogus/truncated data to test, but an error - // here would be some internal issue w/in zlib, and there isn't any real - // way to test it) - if (error) { - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:retCode] - forKey:GTMNSDataZlibErrorKey]; - *error = [NSError errorWithDomain:GTMNSDataZlibErrorDomain - code:GTMNSDataZlibErrorInternal - userInfo:userInfo]; - } - deflateEnd(&strm); - return nil; - // COV_NF_END - } - // collect what we got - unsigned gotBack = kChunkSize - strm.avail_out; - if (gotBack > 0) { - [result appendBytes:output length:gotBack]; - } - - } while (retCode == Z_OK); - - // if the loop exits, we used all input and the stream ended - _GTMDevAssert(strm.avail_in == 0, - @"thought we finished deflate w/o using all input, %u bytes left", - strm.avail_in); - _GTMDevAssert(retCode == Z_STREAM_END, - @"thought we finished deflate w/o getting a result of stream end, code %d", - retCode); - - // clean up - deflateEnd(&strm); - - return result; -} // gtm_dataByCompressingBytes:length:compressionLevel:useGzip: - -+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes - length:(NSUInteger)length - isRawData:(BOOL)isRawData - error:(NSError **)error { - if (!bytes || !length) { - return nil; - } - -#if defined(__LP64__) && __LP64__ - // Don't support > 32bit length for 64 bit, see note in header. - if (length > UINT_MAX) { - return nil; - } -#endif - - z_stream strm; - bzero(&strm, sizeof(z_stream)); - - // setup the input - strm.avail_in = (unsigned int)length; - strm.next_in = (unsigned char*)bytes; - - int windowBits = 15; // 15 to enable any window size - if (isRawData) { - windowBits *= -1; // make it negative to signal no header. - } else { - windowBits += 32; // and +32 to enable zlib or gzip header detection. - } - - int retCode; - if ((retCode = inflateInit2(&strm, windowBits)) != Z_OK) { - // COV_NF_START - no real way to force this in a unittest (we guard all args) - if (error) { - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:retCode] - forKey:GTMNSDataZlibErrorKey]; - *error = [NSError errorWithDomain:GTMNSDataZlibErrorDomain - code:GTMNSDataZlibErrorInternal - userInfo:userInfo]; - } - return nil; - // COV_NF_END - } - - // hint the size at 4x the input size - NSMutableData *result = [NSMutableData dataWithCapacity:(length*4)]; - unsigned char output[kChunkSize]; - - // loop to collect the data - do { - // update what we're passing in - strm.avail_out = kChunkSize; - strm.next_out = output; - retCode = inflate(&strm, Z_NO_FLUSH); - if ((retCode != Z_OK) && (retCode != Z_STREAM_END)) { - if (error) { - NSMutableDictionary *userInfo = - [NSMutableDictionary dictionaryWithObject:[NSNumber numberWithInt:retCode] - forKey:GTMNSDataZlibErrorKey]; - if (strm.msg) { - NSString *message = [NSString stringWithUTF8String:strm.msg]; - if (message) { - [userInfo setObject:message forKey:NSLocalizedDescriptionKey]; - } - } - *error = [NSError errorWithDomain:GTMNSDataZlibErrorDomain - code:GTMNSDataZlibErrorInternal - userInfo:userInfo]; - } - inflateEnd(&strm); - return nil; - } - // collect what we got - unsigned gotBack = kChunkSize - strm.avail_out; - if (gotBack > 0) { - [result appendBytes:output length:gotBack]; - } - - } while (retCode == Z_OK); - - // make sure there wasn't more data tacked onto the end of a valid compressed - // stream. - if (strm.avail_in != 0) { - if (error) { - NSDictionary *userInfo = - [NSDictionary dictionaryWithObject:[NSNumber numberWithUnsignedInt:strm.avail_in] - forKey:GTMNSDataZlibRemainingBytesKey]; - *error = [NSError errorWithDomain:GTMNSDataZlibErrorDomain - code:GTMNSDataZlibErrorDataRemaining - userInfo:userInfo]; - } - result = nil; - } - // the only way out of the loop was by hitting the end of the stream - _GTMDevAssert(retCode == Z_STREAM_END, - @"thought we finished inflate w/o getting a result of stream end, code %d", - retCode); - - // clean up - inflateEnd(&strm); - - return result; -} // gtm_dataByInflatingBytes:length:windowBits: - -@end - - -@implementation NSData (GTMZLibAdditions) - -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length { - return [self gtm_dataByGzippingBytes:bytes length:length error:NULL]; -} // gtm_dataByGzippingBytes:length: - -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error { - return [self gtm_dataByCompressingBytes:bytes - length:length - compressionLevel:Z_DEFAULT_COMPRESSION - mode:CompressionModeGzip - error:error]; -} // gtm_dataByGzippingBytes:length:error: - -+ (NSData *)gtm_dataByGzippingData:(NSData *)data { - return [self gtm_dataByGzippingData:data error:NULL]; -} // gtm_dataByGzippingData: - -+ (NSData *)gtm_dataByGzippingData:(NSData *)data error:(NSError **)error { - return [self gtm_dataByCompressingBytes:[data bytes] - length:[data length] - compressionLevel:Z_DEFAULT_COMPRESSION - mode:CompressionModeGzip - error:error]; -} // gtm_dataByGzippingData:error: - -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level { - return [self gtm_dataByGzippingBytes:bytes - length:length - compressionLevel:level - error:NULL]; -} // gtm_dataByGzippingBytes:length:level: - -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - error:(NSError **)error{ - return [self gtm_dataByCompressingBytes:bytes - length:length - compressionLevel:level - mode:CompressionModeGzip - error:error]; -} // gtm_dataByGzippingBytes:length:level:error - -+ (NSData *)gtm_dataByGzippingData:(NSData *)data - compressionLevel:(int)level { - return [self gtm_dataByGzippingData:data - compressionLevel:level - error:NULL]; -} // gtm_dataByGzippingData:level: - -+ (NSData *)gtm_dataByGzippingData:(NSData *)data - compressionLevel:(int)level - error:(NSError **)error{ - return [self gtm_dataByCompressingBytes:[data bytes] - length:[data length] - compressionLevel:level - mode:CompressionModeGzip - error:error]; -} // gtm_dataByGzippingData:level:error - -#pragma mark - - -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length { - return [self gtm_dataByDeflatingBytes:bytes - length:length - error:NULL]; -} // gtm_dataByDeflatingBytes:length: - -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error{ - return [self gtm_dataByCompressingBytes:bytes - length:length - compressionLevel:Z_DEFAULT_COMPRESSION - mode:CompressionModeZlib - error:error]; -} // gtm_dataByDeflatingBytes:length:error - -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data { - return [self gtm_dataByDeflatingData:data error:NULL]; -} // gtm_dataByDeflatingData: - -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data error:(NSError **)error { - return [self gtm_dataByCompressingBytes:[data bytes] - length:[data length] - compressionLevel:Z_DEFAULT_COMPRESSION - mode:CompressionModeZlib - error:error]; -} // gtm_dataByDeflatingData: - -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level { - return [self gtm_dataByDeflatingBytes:bytes - length:length - compressionLevel:level - error:NULL]; -} // gtm_dataByDeflatingBytes:length:level: - -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - error:(NSError **)error { - return [self gtm_dataByCompressingBytes:bytes - length:length - compressionLevel:level - mode:CompressionModeZlib - error:error]; -} // gtm_dataByDeflatingBytes:length:level:error: - -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data - compressionLevel:(int)level { - return [self gtm_dataByDeflatingData:data - compressionLevel:level - error:NULL]; -} // gtm_dataByDeflatingData:level: - -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data - compressionLevel:(int)level - error:(NSError **)error { - return [self gtm_dataByCompressingBytes:[data bytes] - length:[data length] - compressionLevel:level - mode:CompressionModeZlib - error:error]; -} // gtm_dataByDeflatingData:level:error: - -#pragma mark - - -+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes - length:(NSUInteger)length { - return [self gtm_dataByInflatingBytes:bytes - length:length - error:NULL]; -} // gtm_dataByInflatingBytes:length: - -+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error { - return [self gtm_dataByInflatingBytes:bytes - length:length - isRawData:NO - error:error]; -} // gtm_dataByInflatingBytes:length:error: - -+ (NSData *)gtm_dataByInflatingData:(NSData *)data { - return [self gtm_dataByInflatingData:data error:NULL]; -} // gtm_dataByInflatingData: - -+ (NSData *)gtm_dataByInflatingData:(NSData *)data - error:(NSError **)error { - return [self gtm_dataByInflatingBytes:[data bytes] - length:[data length] - isRawData:NO - error:error]; -} // gtm_dataByInflatingData: - -#pragma mark - - -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length { - return [self gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:NULL]; -} // gtm_dataByRawDeflatingBytes:length: - -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error { - return [self gtm_dataByCompressingBytes:bytes - length:length - compressionLevel:Z_DEFAULT_COMPRESSION - mode:CompressionModeRaw - error:error]; -} // gtm_dataByRawDeflatingBytes:length:error: - -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data { - return [self gtm_dataByRawDeflatingData:data error:NULL]; -} // gtm_dataByRawDeflatingData: - -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data error:(NSError **)error { - return [self gtm_dataByCompressingBytes:[data bytes] - length:[data length] - compressionLevel:Z_DEFAULT_COMPRESSION - mode:CompressionModeRaw - error:error]; -} // gtm_dataByRawDeflatingData:error: - -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level { - return [self gtm_dataByRawDeflatingBytes:bytes - length:length - compressionLevel:level - error:NULL]; -} // gtm_dataByRawDeflatingBytes:length:compressionLevel: - -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - error:(NSError **)error{ - return [self gtm_dataByCompressingBytes:bytes - length:length - compressionLevel:level - mode:CompressionModeRaw - error:error]; -} // gtm_dataByRawDeflatingBytes:length:compressionLevel:error: - -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data - compressionLevel:(int)level { - return [self gtm_dataByRawDeflatingData:data - compressionLevel:level - error:NULL]; -} // gtm_dataByRawDeflatingData:compressionLevel: - -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data - compressionLevel:(int)level - error:(NSError **)error { - return [self gtm_dataByCompressingBytes:[data bytes] - length:[data length] - compressionLevel:level - mode:CompressionModeRaw - error:error]; -} // gtm_dataByRawDeflatingData:compressionLevel:error: - -+ (NSData *)gtm_dataByRawInflatingBytes:(const void *)bytes - length:(NSUInteger)length { - return [self gtm_dataByInflatingBytes:bytes - length:length - error:NULL]; -} // gtm_dataByRawInflatingBytes:length: - -+ (NSData *)gtm_dataByRawInflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error{ - return [self gtm_dataByInflatingBytes:bytes - length:length - isRawData:YES - error:error]; -} // gtm_dataByRawInflatingBytes:length:error: - -+ (NSData *)gtm_dataByRawInflatingData:(NSData *)data { - return [self gtm_dataByRawInflatingData:data - error:NULL]; -} // gtm_dataByRawInflatingData: - -+ (NSData *)gtm_dataByRawInflatingData:(NSData *)data - error:(NSError **)error { - return [self gtm_dataByInflatingBytes:[data bytes] - length:[data length] - isRawData:YES - error:error]; -} // gtm_dataByRawInflatingData:error: - -@end diff --git a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSDictionary+URLArguments.h b/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSDictionary+URLArguments.h deleted file mode 100755 index b2f0564..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSDictionary+URLArguments.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// GTMNSDictionary+URLArguments.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -/// Utility for building a URL or POST argument string. -@interface NSDictionary (GTMNSDictionaryURLArgumentsAdditions) - -/// Returns a dictionary of the decoded key-value pairs in a http arguments -/// string of the form key1=value1&key2=value2&...&keyN=valueN. -/// Keys and values will be unescaped automatically. -/// Only the first value for a repeated key is returned. -/// -/// NOTE: Apps targeting iOS 8 or OS X 10.10 and later should use -/// NSURLComponents and NSURLQueryItem to create URLs with -/// query arguments instead of using these category methods. -+ (NSDictionary *)gtm_dictionaryWithHttpArgumentsString:(NSString *)argString; - -/// Gets a string representation of the dictionary in the form -/// key1=value1&key2=value2&...&keyN=valueN, suitable for use as either -/// URL arguments (after a '?') or POST body. Keys and values will be escaped -/// automatically, so should be unescaped in the dictionary. -- (NSString *)gtm_httpArgumentsString; - -@end diff --git a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSDictionary+URLArguments.m b/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSDictionary+URLArguments.m deleted file mode 100755 index e9fa766..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSDictionary+URLArguments.m +++ /dev/null @@ -1,77 +0,0 @@ -// -// GTMNSDictionary+URLArguments.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSDictionary+URLArguments.h" -#import "GTMNSString+URLArguments.h" -#import "GTMMethodCheck.h" -#import "GTMDefines.h" - - -// Export a nonsense symbol to suppress a libtool warning when this is linked alone in a static lib. -__attribute__((visibility("default"))) - char GTMNSDictionaryURLArgumentsExportToSuppressLibToolWarning = 0; - - -@implementation NSDictionary (GTMNSDictionaryURLArgumentsAdditions) - -GTM_METHOD_CHECK(NSString, gtm_stringByEscapingForURLArgument); -GTM_METHOD_CHECK(NSString, gtm_stringByUnescapingFromURLArgument); - -+ (NSDictionary *)gtm_dictionaryWithHttpArgumentsString:(NSString *)argString { - NSMutableDictionary* ret = [NSMutableDictionary dictionary]; - NSArray* components = [argString componentsSeparatedByString:@"&"]; - NSString* component; - // Use reverse order so that the first occurrence of a key replaces - // those subsequent. - for (component in [components reverseObjectEnumerator]) { - if ([component length] == 0) - continue; - NSRange pos = [component rangeOfString:@"="]; - NSString *key; - NSString *val; - if (pos.location == NSNotFound) { - key = [component gtm_stringByUnescapingFromURLArgument]; - val = @""; - } else { - key = [[component substringToIndex:pos.location] - gtm_stringByUnescapingFromURLArgument]; - val = [[component substringFromIndex:pos.location + pos.length] - gtm_stringByUnescapingFromURLArgument]; - } - // gtm_stringByUnescapingFromURLArgument returns nil on invalid UTF8 - // and NSMutableDictionary raises an exception when passed nil values. - if (!key) key = @""; - if (!val) val = @""; - [ret setObject:val forKey:key]; - } - return ret; -} - -- (NSString *)gtm_httpArgumentsString { - NSMutableArray* arguments = [NSMutableArray arrayWithCapacity:[self count]]; - NSString* key; - for (key in self) { - [arguments addObject:[NSString stringWithFormat:@"%@=%@", - [key gtm_stringByEscapingForURLArgument], - [[[self objectForKey:key] description] gtm_stringByEscapingForURLArgument]]]; - } - - return [arguments componentsJoinedByString:@"&"]; -} - -@end diff --git a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSString+URLArguments.h b/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSString+URLArguments.h deleted file mode 100755 index b3a3e3e..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSString+URLArguments.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// GTMNSString+URLArguments.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -/// Utilities for encoding and decoding URL arguments. -@interface NSString (GTMNSStringURLArgumentsAdditions) - -/// Returns a string that is escaped properly to be a URL argument. -/// -/// This differs from stringByAddingPercentEscapesUsingEncoding: in that it -/// will escape all the reserved characters (per RFC 3986 -/// ) which -/// stringByAddingPercentEscapesUsingEncoding would leave. -/// -/// This will also escape '%', so this should not be used on a string that has -/// already been escaped unless double-escaping is the desired result. -/// -/// NOTE: Apps targeting iOS 8 or OS X 10.10 and later should use -/// NSURLComponents and NSURLQueryItem to create properly-escaped -/// URLs instead of using these category methods. -- (NSString*)gtm_stringByEscapingForURLArgument; - -/// Returns the unescaped version of a URL argument -/// -/// This has the same behavior as stringByReplacingPercentEscapesUsingEncoding:, -/// except that it will also convert '+' to space. -- (NSString*)gtm_stringByUnescapingFromURLArgument; - -@end diff --git a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSString+URLArguments.m b/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSString+URLArguments.m deleted file mode 100755 index e785c5e..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/Foundation/GTMNSString+URLArguments.m +++ /dev/null @@ -1,48 +0,0 @@ -// -// GTMNSString+URLArguments.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSString+URLArguments.h" - -@implementation NSString (GTMNSStringURLArgumentsAdditions) - -- (NSString *)gtm_stringByEscapingForURLArgument { - // Encode all the reserved characters, per RFC 3986 - // () - CFStringRef escaped = - CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, - (CFStringRef)self, - NULL, - (CFStringRef)@"!*'();:@&=+$,/?%#[]", - kCFStringEncodingUTF8); -#if defined(__has_feature) && __has_feature(objc_arc) - return CFBridgingRelease(escaped); -#else - return [(NSString *)escaped autorelease]; -#endif -} - -- (NSString *)gtm_stringByUnescapingFromURLArgument { - NSMutableString *resultString = [NSMutableString stringWithString:self]; - [resultString replaceOccurrencesOfString:@"+" - withString:@" " - options:NSLiteralSearch - range:NSMakeRange(0, [resultString length])]; - return [resultString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; -} - -@end diff --git a/Old My Mind/Pods/GoogleToolboxForMac/GTMDefines.h b/Old My Mind/Pods/GoogleToolboxForMac/GTMDefines.h deleted file mode 100755 index 8ec88cc..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/GTMDefines.h +++ /dev/null @@ -1,392 +0,0 @@ -// -// GTMDefines.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// ============================================================================ - -#include -#include - -#ifdef __OBJC__ -#include -#endif // __OBJC__ - -#if TARGET_OS_IPHONE -#include -#endif // TARGET_OS_IPHONE - -// ---------------------------------------------------------------------------- -// CPP symbols that can be overridden in a prefix to control how the toolbox -// is compiled. -// ---------------------------------------------------------------------------- - - -// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and -// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT macros you can control what happens -// when a validation fails. If you implement your own validators, you may want -// to control their internals using the same macros for consistency. -#ifndef GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - #define GTM_CONTAINERS_VALIDATION_FAILED_ASSERT 0 -#endif - -// Ensure __has_feature and __has_extension are safe to use. -// See http://clang-analyzer.llvm.org/annotations.html -#ifndef __has_feature // Optional. - #define __has_feature(x) 0 // Compatibility with non-clang compilers. -#endif - -#ifndef __has_extension - #define __has_extension __has_feature // Compatibility with pre-3.0 compilers. -#endif - -// Give ourselves a consistent way to do inlines. Apple's macros even use -// a few different actual definitions, so we're based off of the foundation -// one. -#if !defined(GTM_INLINE) - #if (defined (__GNUC__) && (__GNUC__ == 4)) || defined (__clang__) - #define GTM_INLINE static __inline__ __attribute__((always_inline)) - #else - #define GTM_INLINE static __inline__ - #endif -#endif - -// Give ourselves a consistent way of doing externs that links up nicely -// when mixing objc and objc++ -#if !defined (GTM_EXTERN) - #if defined __cplusplus - #define GTM_EXTERN extern "C" - #define GTM_EXTERN_C_BEGIN extern "C" { - #define GTM_EXTERN_C_END } - #else - #define GTM_EXTERN extern - #define GTM_EXTERN_C_BEGIN - #define GTM_EXTERN_C_END - #endif -#endif - -// Give ourselves a consistent way of exporting things if we have visibility -// set to hidden. -#if !defined (GTM_EXPORT) - #define GTM_EXPORT __attribute__((visibility("default"))) -#endif - -// Give ourselves a consistent way of declaring something as unused. This -// doesn't use __unused because that is only supported in gcc 4.2 and greater. -#if !defined (GTM_UNUSED) -#define GTM_UNUSED(x) ((void)(x)) -#endif - -// _GTMDevLog & _GTMDevAssert -// -// _GTMDevLog & _GTMDevAssert are meant to be a very lightweight shell for -// developer level errors. This implementation simply macros to NSLog/NSAssert. -// It is not intended to be a general logging/reporting system. -// -// Please see http://code.google.com/p/google-toolbox-for-mac/wiki/DevLogNAssert -// for a little more background on the usage of these macros. -// -// _GTMDevLog log some error/problem in debug builds -// _GTMDevAssert assert if condition isn't met w/in a method/function -// in all builds. -// -// To replace this system, just provide different macro definitions in your -// prefix header. Remember, any implementation you provide *must* be thread -// safe since this could be called by anything in what ever situtation it has -// been placed in. -// - -// We only define the simple macros if nothing else has defined this. -#ifndef _GTMDevLog - -#ifdef DEBUG - #define _GTMDevLog(...) NSLog(__VA_ARGS__) -#else - #define _GTMDevLog(...) do { } while (0) -#endif - -#endif // _GTMDevLog - -#ifndef _GTMDevAssert -// we directly invoke the NSAssert handler so we can pass on the varargs -// (NSAssert doesn't have a macro we can use that takes varargs) -#if !defined(NS_BLOCK_ASSERTIONS) - #define _GTMDevAssert(condition, ...) \ - do { \ - if (!(condition)) { \ - [[NSAssertionHandler currentHandler] \ - handleFailureInFunction:(NSString *) \ - [NSString stringWithUTF8String:__PRETTY_FUNCTION__] \ - file:(NSString *)[NSString stringWithUTF8String:__FILE__] \ - lineNumber:__LINE__ \ - description:__VA_ARGS__]; \ - } \ - } while(0) -#else // !defined(NS_BLOCK_ASSERTIONS) - #define _GTMDevAssert(condition, ...) do { } while (0) -#endif // !defined(NS_BLOCK_ASSERTIONS) - -#endif // _GTMDevAssert - -// _GTMCompileAssert -// -// Note: Software for current compilers should just use _Static_assert directly -// instead of this macro. -// -// _GTMCompileAssert is an assert that is meant to fire at compile time if you -// want to check things at compile instead of runtime. For example if you -// want to check that a wchar is 4 bytes instead of 2 you would use -// _GTMCompileAssert(sizeof(wchar_t) == 4, wchar_t_is_4_bytes_on_OS_X) -// Note that the second "arg" is not in quotes, and must be a valid processor -// symbol in it's own right (no spaces, punctuation etc). - -// Wrapping this in an #ifndef allows external groups to define their own -// compile time assert scheme. -#ifndef _GTMCompileAssert - #if __has_feature(c_static_assert) || __has_extension(c_static_assert) - #define _GTMCompileAssert(test, msg) _Static_assert((test), #msg) - #else - // Pre-Xcode 7 support. - // - // We got this technique from here: - // http://unixjunkie.blogspot.com/2007/10/better-compile-time-asserts_29.html - #define _GTMCompileAssertSymbolInner(line, msg) _GTMCOMPILEASSERT ## line ## __ ## msg - #define _GTMCompileAssertSymbol(line, msg) _GTMCompileAssertSymbolInner(line, msg) - #define _GTMCompileAssert(test, msg) \ - typedef char _GTMCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ] - #endif // __has_feature(c_static_assert) || __has_extension(c_static_assert) -#endif // _GTMCompileAssert - -// ---------------------------------------------------------------------------- -// CPP symbols defined based on the project settings so the GTM code has -// simple things to test against w/o scattering the knowledge of project -// setting through all the code. -// ---------------------------------------------------------------------------- - -// Provide a single constant CPP symbol that all of GTM uses for ifdefing -// iPhone code. -#if TARGET_OS_IPHONE // iPhone SDK - // For iPhone specific stuff - #define GTM_IPHONE_SDK 1 - #if TARGET_IPHONE_SIMULATOR - #define GTM_IPHONE_DEVICE 0 - #define GTM_IPHONE_SIMULATOR 1 - #else - #define GTM_IPHONE_DEVICE 1 - #define GTM_IPHONE_SIMULATOR 0 - #endif // TARGET_IPHONE_SIMULATOR - // By default, GTM has provided it's own unittesting support, define this - // to use the support provided by Xcode, especially for the Xcode4 support - // for unittesting. - #ifndef GTM_USING_XCTEST - #define GTM_USING_XCTEST 0 - #endif - #define GTM_MACOS_SDK 0 -#else - // For MacOS specific stuff - #define GTM_MACOS_SDK 1 - #define GTM_IPHONE_SDK 0 - #define GTM_IPHONE_SIMULATOR 0 - #define GTM_IPHONE_DEVICE 0 - #ifndef GTM_USING_XCTEST - #define GTM_USING_XCTEST 0 - #endif -#endif - -// Some of our own availability macros -#if GTM_MACOS_SDK -#define GTM_AVAILABLE_ONLY_ON_IPHONE UNAVAILABLE_ATTRIBUTE -#define GTM_AVAILABLE_ONLY_ON_MACOS -#else -#define GTM_AVAILABLE_ONLY_ON_IPHONE -#define GTM_AVAILABLE_ONLY_ON_MACOS UNAVAILABLE_ATTRIBUTE -#endif - -// GC was dropped by Apple, define the old constant incase anyone still keys -// off of it. -#ifndef GTM_SUPPORT_GC - #define GTM_SUPPORT_GC 0 -#endif - -// Some support for advanced clang static analysis functionality -#ifndef NS_RETURNS_RETAINED - #if __has_feature(attribute_ns_returns_retained) - #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) - #else - #define NS_RETURNS_RETAINED - #endif -#endif - -#ifndef NS_RETURNS_NOT_RETAINED - #if __has_feature(attribute_ns_returns_not_retained) - #define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) - #else - #define NS_RETURNS_NOT_RETAINED - #endif -#endif - -#ifndef CF_RETURNS_RETAINED - #if __has_feature(attribute_cf_returns_retained) - #define CF_RETURNS_RETAINED __attribute__((cf_returns_retained)) - #else - #define CF_RETURNS_RETAINED - #endif -#endif - -#ifndef CF_RETURNS_NOT_RETAINED - #if __has_feature(attribute_cf_returns_not_retained) - #define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained)) - #else - #define CF_RETURNS_NOT_RETAINED - #endif -#endif - -#ifndef NS_CONSUMED - #if __has_feature(attribute_ns_consumed) - #define NS_CONSUMED __attribute__((ns_consumed)) - #else - #define NS_CONSUMED - #endif -#endif - -#ifndef CF_CONSUMED - #if __has_feature(attribute_cf_consumed) - #define CF_CONSUMED __attribute__((cf_consumed)) - #else - #define CF_CONSUMED - #endif -#endif - -#ifndef NS_CONSUMES_SELF - #if __has_feature(attribute_ns_consumes_self) - #define NS_CONSUMES_SELF __attribute__((ns_consumes_self)) - #else - #define NS_CONSUMES_SELF - #endif -#endif - -#ifndef GTM_NONNULL - #if defined(__has_attribute) - #if __has_attribute(nonnull) - #define GTM_NONNULL(x) __attribute__((nonnull x)) - #else - #define GTM_NONNULL(x) - #endif - #else - #define GTM_NONNULL(x) - #endif -#endif - -// Invalidates the initializer from which it's called. -#ifndef GTMInvalidateInitializer - #if __has_feature(objc_arc) - #define GTMInvalidateInitializer() \ - do { \ - [self class]; /* Avoid warning of dead store to |self|. */ \ - _GTMDevAssert(NO, @"Invalid initializer."); \ - return nil; \ - } while (0) - #else - #define GTMInvalidateInitializer() \ - do { \ - [self release]; \ - _GTMDevAssert(NO, @"Invalid initializer."); \ - return nil; \ - } while (0) - #endif -#endif - -#ifndef GTMCFAutorelease - // GTMCFAutorelease returns an id. In contrast, Apple's CFAutorelease returns - // a CFTypeRef. - #if __has_feature(objc_arc) - #define GTMCFAutorelease(x) CFBridgingRelease(x) - #else - #define GTMCFAutorelease(x) ([(id)x autorelease]) - #endif -#endif - -#ifdef __OBJC__ - - -// Macro to allow you to create NSStrings out of other macros. -// #define FOO foo -// NSString *fooString = GTM_NSSTRINGIFY(FOO); -#if !defined (GTM_NSSTRINGIFY) - #define GTM_NSSTRINGIFY_INNER(x) @#x - #define GTM_NSSTRINGIFY(x) GTM_NSSTRINGIFY_INNER(x) -#endif - -// Macro to allow fast enumeration when building for 10.5 or later, and -// reliance on NSEnumerator for 10.4. Remember, NSDictionary w/ FastEnumeration -// does keys, so pick the right thing, nothing is done on the FastEnumeration -// side to be sure you're getting what you wanted. -#ifndef GTM_FOREACH_OBJECT - #if TARGET_OS_IPHONE || !(MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) - #define GTM_FOREACH_ENUMEREE(element, enumeration) \ - for (element in enumeration) - #define GTM_FOREACH_OBJECT(element, collection) \ - for (element in collection) - #define GTM_FOREACH_KEY(element, collection) \ - for (element in collection) - #else - #define GTM_FOREACH_ENUMEREE(element, enumeration) \ - for (NSEnumerator *_ ## element ## _enum = enumeration; \ - (element = [_ ## element ## _enum nextObject]) != nil; ) - #define GTM_FOREACH_OBJECT(element, collection) \ - GTM_FOREACH_ENUMEREE(element, [collection objectEnumerator]) - #define GTM_FOREACH_KEY(element, collection) \ - GTM_FOREACH_ENUMEREE(element, [collection keyEnumerator]) - #endif -#endif - -// ============================================================================ - -// GTM_SEL_STRING is for specifying selector (usually property) names to KVC -// or KVO methods. -// In debug it will generate warnings for undeclared selectors if -// -Wunknown-selector is turned on. -// In release it will have no runtime overhead. -#ifndef GTM_SEL_STRING - #ifdef DEBUG - #define GTM_SEL_STRING(selName) NSStringFromSelector(@selector(selName)) - #else - #define GTM_SEL_STRING(selName) @#selName - #endif // DEBUG -#endif // GTM_SEL_STRING - -#ifndef GTM_WEAK -#if __has_feature(objc_arc_weak) - // With ARC enabled, __weak means a reference that isn't implicitly - // retained. __weak objects are accessed through runtime functions, so - // they are zeroed out, but this requires OS X 10.7+. - // At clang r251041+, ARC-style zeroing weak references even work in - // non-ARC mode. - #define GTM_WEAK __weak - #elif __has_feature(objc_arc) - // ARC, but targeting 10.6 or older, where zeroing weak references don't - // exist. - #define GTM_WEAK __unsafe_unretained - #else - // With manual reference counting, __weak used to be silently ignored. - // clang r251041 gives it the ARC semantics instead. This means they - // now require a deployment target of 10.7, while some clients of GTM - // still target 10.6. In these cases, expand to __unsafe_unretained instead - #define GTM_WEAK - #endif -#endif - -#endif // __OBJC__ diff --git a/Old My Mind/Pods/GoogleToolboxForMac/LICENSE b/Old My Mind/Pods/GoogleToolboxForMac/LICENSE deleted file mode 100755 index d645695..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Old My Mind/Pods/GoogleToolboxForMac/README.md b/Old My Mind/Pods/GoogleToolboxForMac/README.md deleted file mode 100755 index 710560a..0000000 --- a/Old My Mind/Pods/GoogleToolboxForMac/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# GTM: Google Toolbox for Mac # - -**Project site**
-**Discussion group** - -# Google Toolbox for Mac # - -A collection of source from different Google projects that may be of use to -developers working other iOS or OS X projects. - -If you find a problem/bug or want a new feature to be included in the Google -Toolbox for Mac, please join the -[discussion group](http://groups.google.com/group/google-toolbox-for-mac) -or submit an -[issue](https://github.com/google/google-toolbox-for-mac/issues). diff --git a/Old My Mind/Pods/Pods.xcodeproj/project.pbxproj b/Old My Mind/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100755 index 411e70b..0000000 --- a/Old My Mind/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1988 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 024D45EAD952BCB4444DD36B90D151F6 /* FormPickerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B6E296E79BCA827779D8E6F9CB3F190 /* FormPickerCell.swift */; }; - 07340F15BACBA601736DBB2ABF1ABC35 /* GTMSessionFetcherLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 005BAD149CAE0411E771B3DC9253AAFD /* GTMSessionFetcherLogging.m */; }; - 07E80CCB28C6CA73FD888ACF5D35B426 /* GPBProtocolBuffers_RuntimeSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 48CE5181CDD2A58F830561E2DF72F689 /* GPBProtocolBuffers_RuntimeSupport.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0A615FA343EFC2749A9AC58CD06222DD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11C10A31CD5CFA3EFE266394471B152E /* Foundation.framework */; }; - 109EDFD5B317DF6CE8F3B039415BE063 /* FormSegmentedControlCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBF2398C06DB4EB302148F5017FB0A70 /* FormSegmentedControlCell.swift */; }; - 117BFDA80E461941AAF9289A7E47C17F /* SourceContext.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 61610B1461FBD48E686AE170C53D24F3 /* SourceContext.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 127044639D8198CD69AA8B414E6DE564 /* Empty.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = B088AC17873204F41B7FAEAAB3777AEE /* Empty.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 162F73650877177FAB96CC08BE515C97 /* GTMNSDictionary+URLArguments.h in Headers */ = {isa = PBXBuildFile; fileRef = EBB073E16FDED750D19A5F5275CD9F78 /* GTMNSDictionary+URLArguments.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 16987BC32186EC5D8AE0B0DA8B068430 /* Duration.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ACD100ECA82EFCC54D4EBE7075D6B63 /* Duration.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 17E07E319528F0BC1B90B049FFE2B53A /* GPBUnknownFieldSet.m in Sources */ = {isa = PBXBuildFile; fileRef = C9C349C840D8D637522B13A9683A4F7C /* GPBUnknownFieldSet.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 182114F9BD021BF9B90D1064F1EE8078 /* FormSliderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF709BD37EA76BF34B0EDE49ECD9C757 /* FormSliderCell.swift */; }; - 18B41774E2C9E5799868DBB824C4856B /* Protobuf-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 957A616ADE9035A64BDF137BBBE4D457 /* Protobuf-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1913A2D4854E0D82944EDF30BD3C2DF9 /* GPBWellKnownTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = E3C5584F302E83D6AD0C2C89DEA739A8 /* GPBWellKnownTypes.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 1B77ADED7B7A6A54011BC77FF76F9E98 /* Duration.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = ED05A70B55345D832DF12A75E1F06688 /* Duration.pbobjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1C4D75FD322514819D8FF93D1B942862 /* GPBMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = E384C86336CF7AF55DC818CFE92B1B45 /* GPBMessage.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 1ED67707C258751E7888DAC2AB3D8501 /* GTMSessionFetcherLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = C034DF8AD2B97A433EDF47F4DED7D41F /* GTMSessionFetcherLogging.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1F685A430D9C24F582CD73A208405E26 /* GPBDescriptor.m in Sources */ = {isa = PBXBuildFile; fileRef = D0266FF18D453C1DCA0A9CFF49368785 /* GPBDescriptor.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 20CD6F106E739536D0FCD667CEDD9B0B /* Struct.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BBA8B2C0E090FC064ACD0C9BF7F6B8E /* Struct.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 2178346ECC466510267E573D2DA05A48 /* Type.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = C69D3B517B9E1A1DFD3CBF77296CDC6B /* Type.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 22F51351267C7926B8472A4739C6149D /* GPBCodedOutputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DEAE9050E4D77A9A3AA4A62DA6083E /* GPBCodedOutputStream.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 24329FD2053EE3EE0EC2ECAE89C9597D /* GPBArray.h in Headers */ = {isa = PBXBuildFile; fileRef = F45118D1934BE921CAC791D95B2FB865 /* GPBArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2546A1AE4183A88685A1C54208B82A79 /* GPBCodedOutputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = B164E02D45408DC0B945C26903CD7D60 /* GPBCodedOutputStream.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 2833FE87F16C48BFC6132CF836DF1BB2 /* GPBDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = D2C3FF0B1A81F42BE1D1B5FCE932F132 /* GPBDictionary.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 28BD093555CFAA03649E76065D5B9D3B /* GPBUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 06A8361C8DDBC18D6E7CADE99392DE8F /* GPBUtilities.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 29A9BB6473C5C8FDD73427DC7A2BFB5C /* Api.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = A1588B3B027450360D3952A75EC47B91 /* Api.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 2A586CA94B95C18F187B9481CC5D174E /* GPBRootObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 147ABB2E6FD365A61FD677CEAF2E8F74 /* GPBRootObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2BC775181E25F1413776E28F04DC3590 /* GPBDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = D01EBDDD3282EBF13B70C9EFD90A6E12 /* GPBDescriptor.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3120B4E85E62A846C111E21226FA68FD /* FormOptionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5646D89B0F6684909F53350FFD18ED /* FormOptionsViewController.swift */; }; - 37A24FEA7C76DB020654328D24D47CB5 /* Struct.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 943B1B21D11DFCCEAF4C873789DF321F /* Struct.pbobjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 381D829FC541F27B54A385DB76D5CD80 /* Pods-My Mind-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A83F0601B51F9E9854BA089577BFEC1B /* Pods-My Mind-dummy.m */; }; - 3914C6DB6E1BDA33C918104EB1109886 /* GPBRootObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 780F34E46969AD6CE138758FDF376C61 /* GPBRootObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 43EB5608A304AAA6D221B2E5CC0ED6B0 /* GTMNSString+URLArguments.h in Headers */ = {isa = PBXBuildFile; fileRef = 9017D1B659C5197C92D7904B7855E635 /* GTMNSString+URLArguments.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 449E803000B4220314D4D1A3A67DAE4D /* GPBCodedOutputStream_PackagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BA9CDFEE9B267D02FA161450F9823BE /* GPBCodedOutputStream_PackagePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 450E5A090328E7D1BD167496E80DFA1F /* GTMNSDictionary+URLArguments.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CE850B1D1E84D88005926957532A43D /* GTMNSDictionary+URLArguments.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 452482E44B35E05FD248153C353066F3 /* Api.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F1E702B98DC6E52F8E7B32C9657B4A8 /* Api.pbobjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 45D9D52BB37F2C0174098BC95FC29C6D /* GPBUnknownFieldSet_PackagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 02E9E68775A73ADD33F7D5A1141ABA58 /* GPBUnknownFieldSet_PackagePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4F795EC25A85562970A8C42C11C0F8AA /* GPBArray_PackagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 52BC0EAD0840B465CD3DC4E086AC6B40 /* GPBArray_PackagePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 51CE9C78977C3DE2C3C53010BB64A195 /* SwiftForms-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 72FF7237480AB043544FF521E927DBDB /* SwiftForms-dummy.m */; }; - 524BCEB3F5EE3380AB7BA7A97A4EF035 /* FormButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35691A9D94872BA7B7814B3A80CB888A /* FormButtonCell.swift */; }; - 53C0512A3A52D84FC704382ADE329E0E /* FormTitleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59BCC27E1487C8247740ECE881CFB15F /* FormTitleCell.swift */; }; - 54139F61C07D1656D372A590F2E18E74 /* GPBArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 492C48B6BAAD60734C2C72549A54E3B2 /* GPBArray.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 54D9834BE1C2821DB78DB4886512F504 /* FormViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF343C2B737A372FC6C4EA95BC52524 /* FormViewController.swift */; }; - 55F3FD22C344E98947BCA48709713932 /* FormBaseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 337D5E2875C54B8AD638F9BC8F002CC2 /* FormBaseCell.swift */; }; - 56185212DDCB5447D6277E6EECE3647E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11C10A31CD5CFA3EFE266394471B152E /* Foundation.framework */; }; - 577F68D9F8D3E0FC4B893807AEF60F99 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11C10A31CD5CFA3EFE266394471B152E /* Foundation.framework */; }; - 5A8B81B73FD0682B56C9B4C78099A8B4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11C10A31CD5CFA3EFE266394471B152E /* Foundation.framework */; }; - 5E17F9B86A026A94C88328D1080E1A28 /* Timestamp.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = F71C04C844A389D12DE09DA41AFFCF40 /* Timestamp.pbobjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5EB357A6493DEABE284528662FDA1A6C /* GPBCodedInputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 0CF75373489E1B19487F73D2EF0A25FA /* GPBCodedInputStream.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 60670C90F356798288DC25E1D7C5160F /* FormValueCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94408DF648FFAC91131160EC1C22D13E /* FormValueCell.swift */; }; - 63DF1FA22091F25F62D34EEDAB419748 /* Pods-My MindUITests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 005F0C0349D64250FD30859B9EBF2911 /* Pods-My MindUITests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63F4579804EEF3DECBD27D579D4FA196 /* GTMMethodCheck.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C5732F96D612C6CB81E3AA90382C926 /* GTMMethodCheck.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 64F31B70A6E5E6963518A01C285B435F /* GTMSessionFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A53F4959335798A36393362EA972753 /* GTMSessionFetcher.m */; }; - 6805395A1D32670B1BB8E6E09E696677 /* GPBDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A6BF39A42E09B02D486D1A66E925D5C /* GPBDictionary.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 6B4F19D8BD01EAF45CA1FE09294B7E12 /* GTMNSData+zlib.m in Sources */ = {isa = PBXBuildFile; fileRef = CD3BCD7F8B91CB85590BE63491BEE0EB /* GTMNSData+zlib.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 6CF3CD3129A4F11018A4CF2335052CD7 /* FormDateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E35D4F5F0061B56A462CEAB0B2088E5F /* FormDateCell.swift */; }; - 6EA6DFC4473A9B2DB6B8A42EA986BA5B /* GTMSessionFetcher-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 51CD1445C3014F942282DD8DFC0A9038 /* GTMSessionFetcher-dummy.m */; }; - 73FE4B075D8E56128FDF3562EF177B9D /* GPBExtensionRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = FC8B9C8AC51D0D50681265C76680C355 /* GPBExtensionRegistry.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 7D4F8984070F3C74509301DE40A85BEF /* FormSelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDBC4996299464B6583A468025D9F0A3 /* FormSelector.swift */; }; - 82AD4DB81189A3DD75165F4BBAD64E8F /* GPBWireFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D9B0422B059AECD26D3A7756D53763A /* GPBWireFormat.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 8343EDC7E0E2097F5E25AA7A5FB6275F /* Any.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 417594F2986964F91B14DE5190D12223 /* Any.pbobjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 85912A61D7210D831ED2652675DF0277 /* GPBCodedInputStream_PackagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A79ED5832956BF4F7038F8D8BEA03B9 /* GPBCodedInputStream_PackagePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 88413A480AC0E338B86B6AA023D18935 /* FormSectionDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FFD418427CA791B38CC1D2DD8BCE17B /* FormSectionDescriptor.swift */; }; - 8852FD9AFC242520924D98BE9C4E2477 /* GTMSessionFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = DEA980D9F7AA93FA83D103418881DF52 /* GTMSessionFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8B9241E640FE9CF729F2198266F28213 /* GTMLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = CACA6F8A6CDD86DCF1C1867E9DF5C8B4 /* GTMLogger.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 8BEF072C63E1E2DA57DAD9AA8357B70E /* Type.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 78548477CABC4363BABB19C3FCFF6070 /* Type.pbobjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8C2C401C9AE2EB087A23D4228E0FE7FE /* GPBRuntimeTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 663377847C89A49436E2C8BBF9310961 /* GPBRuntimeTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8F173B7B4B5424A1E876BA153F249129 /* Wrappers.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E792BF8123F33FF555ECF478106BA34 /* Wrappers.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 9024F4774BD8DDE03700B223CF7F8164 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11C10A31CD5CFA3EFE266394471B152E /* Foundation.framework */; }; - 909988F417CA29D6D16DE4BA04E3B123 /* GPBMessage_PackagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = D655C91CDBE621AC7B2C8AC308446621 /* GPBMessage_PackagePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 94ACCEE43F78400D1378A3391EB2D194 /* FormSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E54868CDD6882CF3E40477C97763420 /* FormSwitchCell.swift */; }; - 95C69447F517DB81437EDE0003486963 /* GTMSessionFetcherService.m in Sources */ = {isa = PBXBuildFile; fileRef = 426B9B3BBAA2EAB204AB3EACEDBE5A51 /* GTMSessionFetcherService.m */; }; - 9977EAFB893236122E737DBE820394E0 /* GPBCodedInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3FEBD0772AA84E080810E65FCE7F21 /* GPBCodedInputStream.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 9A9948856F1EBE526C5D836F48FEB8C4 /* SourceContext.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 2240E189DEDB0DD6AA6F875980E779E9 /* SourceContext.pbobjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9B83C8182A7F17A6A58744C0F93E74CC /* GPBUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AA7D7ABB94E949FDDFE415F26F7D884 /* GPBUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9C3865AD7A6CAB9956D08730AE09B5FA /* FormTextFieldCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFAFB8529547831A0719762DC59A9AEE /* FormTextFieldCell.swift */; }; - 9D466587AEC6C333B9E68B409B355875 /* GPBUnknownField.h in Headers */ = {isa = PBXBuildFile; fileRef = 057FE3973F5DDE08116EC344A779F457 /* GPBUnknownField.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9D710BD2CF8ED7E278EB1378FEF49019 /* Pods-My MindTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D19F24A5FEC0247AD4F2F2ACEC04EBB /* Pods-My MindTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9DA28C3544749A7DB9AB129BEC773550 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C085E02FF89804F50ADDA04F5A586E94 /* Security.framework */; }; - A61A0EC9BAE71B5B3698A24CF05ACE9C /* GPBExtensionInternals.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EFDE251028D1E0EFE6D83C5AF07C88C /* GPBExtensionInternals.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - A67838AA449C3E6C781748A647354B17 /* GPBMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 0503F7077D47FE925B17B5FF0762CF07 /* GPBMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A8EFFDC0F8CBEACF970A216AC9E3EDA8 /* FormCheckCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5B52C6BC0AA2E3EBB029EF5CF1BD3F2 /* FormCheckCell.swift */; }; - A94ECF904E7BB0BC7752F33C361FE9DF /* FormTextViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20CB50194F8E483D62C6A0505D658652 /* FormTextViewCell.swift */; }; - AA45171138227C6A79316B9158FE9954 /* FormErrorType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07EB28E4E2CF18D02EBC0050E6CC7BFC /* FormErrorType.swift */; }; - AE7DE7E9F8186E3A88D518209F47C1ED /* GPBUnknownField.m in Sources */ = {isa = PBXBuildFile; fileRef = 5808B372399BA62AC528A74303582071 /* GPBUnknownField.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - AEA58521F46996DE24D08B9115B31CD4 /* SwiftForms-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F7BEC6B021D75E802E41CACBD40B714 /* SwiftForms-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B0A91DC4564DD78611E285961F1174AE /* GPBDictionary_PackagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5499833724C56FC929A2EB852334259B /* GPBDictionary_PackagePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B387AF56FC1F701E911D00DA5DAD2AA4 /* Protobuf-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 517E5C5509A69EEADFDCDBB60FF850D2 /* Protobuf-dummy.m */; }; - B6DE1227D16285629B230B51266931E3 /* Wrappers.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 333C538B5D7211BA2C191178EAF756A3 /* Wrappers.pbobjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B77AB77623869E7F457790F3D62C26FE /* FieldMask.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E8D932BDF3B81832F36ECBBDCE4F20 /* FieldMask.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - B96A5E7A8BE90E4EEC25D79771ED87BC /* FormStepperCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58832B6B32C9F4F4E995FCE6A9A44199 /* FormStepperCell.swift */; }; - B9CC3979A606561436D0E604E6CE4B62 /* GPBDescriptor_PackagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 570D85B3C6200AEA4BEA675BC7FD344E /* GPBDescriptor_PackagePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BA6363283865360A58C82FEFE6DC9C8D /* FormRowDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E0580A792F4FA44146B965852D4EF3 /* FormRowDescriptor.swift */; }; - BAB44B1228628294D16B9D539BAB2666 /* GPBExtensionInternals.h in Headers */ = {isa = PBXBuildFile; fileRef = 01F274E88183C84F2B8438E429A7DD2A /* GPBExtensionInternals.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BBC4FE778C649CF03B8655DE21181103 /* GTMLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = BD7996C352B9EB6B4A8D3AAA1B36CDE8 /* GTMLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BD1020BE67E74D585B45C9289E077E85 /* GPBWellKnownTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 78B11983D0ECBC28E9C52876E2CFD0D4 /* GPBWellKnownTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BD41E55F7E05E5AAD8E177BB3B78A74D /* GTMDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = ADDE781DF4F0C92212899862D4780542 /* GTMDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C0C8DBA23FC57BBA2A14D0B2D8777BCE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11C10A31CD5CFA3EFE266394471B152E /* Foundation.framework */; }; - C3A893928F13C441E7AE86306969D3F0 /* Pods-My MindUITests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C6E0ADBB12720758E73C2AA823388341 /* Pods-My MindUITests-dummy.m */; }; - C501E17E9E8501752B99011E17E41412 /* GTMNSData+zlib.h in Headers */ = {isa = PBXBuildFile; fileRef = C6FF70D75D02D56AA873A5E3CCCFA753 /* GTMNSData+zlib.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C72E2C4FE0D21CE24155FA1612EFE106 /* Empty.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F6AD89A533E1D92EAC8B061CF36201D /* Empty.pbobjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CD8FF769F8DE4EBE487A4ADC1E15FA83 /* Timestamp.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 59D7EF173A3FA2427A8E9CC862CC9DA0 /* Timestamp.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - CF226DE9D4FB36ED1233385179E28ADC /* Pods-My MindTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 85A2A3CE914E7C5EAF7DE6D83E28E4FD /* Pods-My MindTests-dummy.m */; }; - D0204CCB31003F4F2FE7C94932213C6B /* GoogleToolboxForMac-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 62CDD215896B42F23BE3142866949CD0 /* GoogleToolboxForMac-dummy.m */; }; - D0736F05B73E9CDBB7A94C3FBCA186A7 /* GPBUnknownField_PackagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = AFAEEE7E21E3165A974245095BAAA076 /* GPBUnknownField_PackagePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D36924036FE75CF805379F026B251DDF /* GPBWireFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 97F24E7CB6220219CED9DA23659078E3 /* GPBWireFormat.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D3F381B45ADFDDE51CA31F1E141236CA /* GTMSessionFetcher-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F3E6CB75073B2053DE8E1F4075737C1 /* GTMSessionFetcher-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D9F9F341B264BFD77391BF58255C8BCB /* GPBUnknownFieldSet.h in Headers */ = {isa = PBXBuildFile; fileRef = FCD4195B885EB8C343478CBDFD5904FF /* GPBUnknownFieldSet.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DA245445596DF7A504F600AC4F311794 /* FormLabelCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE62E5901037C18EA5E51A24F82D9FD0 /* FormLabelCell.swift */; }; - DAB0B8CC07908FFE9BC6452FD4B9E401 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11C10A31CD5CFA3EFE266394471B152E /* Foundation.framework */; }; - DB015C54E1F435B71BFE9859B7B18EB6 /* GPBRootObject_PackagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0001CB9DD3387DFB250421D0D1A901BE /* GPBRootObject_PackagePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DF9559C3822E3C6119BE43E4EDFD7EEE /* GTMSessionFetcherService.h in Headers */ = {isa = PBXBuildFile; fileRef = 9039FAA24EE3E8E9C5FB57B8054F3734 /* GTMSessionFetcherService.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E2E0DC26309DE355A035495DB16D8450 /* FieldMask.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = D0092261164863CFE351B1AFA2020C35 /* FieldMask.pbobjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E5DD1F2EAD52D4CACF51AC8B08CA981D /* GPBUtilities_PackagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6528DBDF62EA884176D5AFF6AEDCF97B /* GPBUtilities_PackagePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EA86CC9D91FA3B64A0A084D6BA5987BB /* FormDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CA9CD616B60BD84EA4C4384844B1E9E /* FormDescriptor.swift */; }; - EB8CE90003139D73977562D1129F077D /* GoogleToolboxForMac-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EEA205599F57D0795527DDF094C2A352 /* GoogleToolboxForMac-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EBAC9656980BA078FE5E3B484EBE61BD /* Pods-My Mind-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 382ADFC4F102ED71CA31280F9D6478B4 /* Pods-My Mind-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EC1707751A2DBCB466E29764EC7ECB86 /* GTMDebugThreadValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 94B831D92EFB367FD4C7F1B82F3D8873 /* GTMDebugThreadValidation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EE3D7A9094F92C691B7CBA93868152B5 /* GTMNSString+URLArguments.m in Sources */ = {isa = PBXBuildFile; fileRef = CE13E4DC0098D7F1EB42333505C25A16 /* GTMNSString+URLArguments.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - EF3B6008967688EC8BC1466FA6740953 /* Any.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8F17B03B2573E7AF5518F4D8F83636 /* Any.pbobjc.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - F09EDD53B94234F5F8DAC4DCD5CD969E /* GTMSessionUploadFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F95B0490F19FD95E1ED6F6843FBF7FA /* GTMSessionUploadFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F4758C648436AC342AFC2FC68A95F5A3 /* GPBBootstrap.h in Headers */ = {isa = PBXBuildFile; fileRef = D9609C8B8C73D1BD7764F804D5B1B1C4 /* GPBBootstrap.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F48CF3B9FE8C456125D9BE1882F7B73D /* GTMDebugSelectorValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 65287AE627674E28D9E32B6B580402D9 /* GTMDebugSelectorValidation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F4E294C07EE32FFCDCF7FF4D71D850BD /* GTMSessionUploadFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = C730FCBDBB6BA86D1859C133EBA68542 /* GTMSessionUploadFetcher.m */; }; - FACCDD3CF8D2C35497AE3133F74BF876 /* GPBExtensionRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CEE4D3B7F93B3949F9D44B5C0DFCD9A /* GPBExtensionRegistry.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FCB20594FDEFB18A9D35D7BB6446E988 /* GPBProtocolBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = B8E2408769D7DA1F4916FFD1DAA16038 /* GPBProtocolBuffers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FEFB6CBB75CD9B988BF859DABD5BEE70 /* FormSelectorCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDAB8E1ED5494ECDB56C6CE4C73B67BE /* FormSelectorCell.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 30BE0DCE99E2A9C66DAA50243300221D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 06EB296E5A1491B6411C791FCCA1A282; - remoteInfo = Protobuf; - }; - 3413B4C2ADBBB826B6E2D9E2CCC6025F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = EAFF5D80C49B29577469EFFBB16812E7; - remoteInfo = SwiftForms; - }; - 46181036AB851BF0F83D74CCCB1182E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = C052BEBFBD0AB5218CC64BA3450F6547; - remoteInfo = GTMSessionFetcher; - }; - 6CBCF5E1D40C7CC7F5D9B3746224378B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6D5CEDECD3D8DC52EA507E0431BDA8A0; - remoteInfo = GoogleToolboxForMac; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0001CB9DD3387DFB250421D0D1A901BE /* GPBRootObject_PackagePrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBRootObject_PackagePrivate.h; path = objectivec/GPBRootObject_PackagePrivate.h; sourceTree = ""; }; - 005BAD149CAE0411E771B3DC9253AAFD /* GTMSessionFetcherLogging.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GTMSessionFetcherLogging.m; path = Source/GTMSessionFetcherLogging.m; sourceTree = ""; }; - 005F0C0349D64250FD30859B9EBF2911 /* Pods-My MindUITests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-My MindUITests-umbrella.h"; sourceTree = ""; }; - 01F274E88183C84F2B8438E429A7DD2A /* GPBExtensionInternals.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBExtensionInternals.h; path = objectivec/GPBExtensionInternals.h; sourceTree = ""; }; - 02CB615131BB5FFE41DDCDCF3C354BF5 /* Pods-My MindTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-My MindTests.debug.xcconfig"; sourceTree = ""; }; - 02E9E68775A73ADD33F7D5A1141ABA58 /* GPBUnknownFieldSet_PackagePrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBUnknownFieldSet_PackagePrivate.h; path = objectivec/GPBUnknownFieldSet_PackagePrivate.h; sourceTree = ""; }; - 0503F7077D47FE925B17B5FF0762CF07 /* GPBMessage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBMessage.h; path = objectivec/GPBMessage.h; sourceTree = ""; }; - 057FE3973F5DDE08116EC344A779F457 /* GPBUnknownField.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBUnknownField.h; path = objectivec/GPBUnknownField.h; sourceTree = ""; }; - 06A8361C8DDBC18D6E7CADE99392DE8F /* GPBUtilities.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBUtilities.m; path = objectivec/GPBUtilities.m; sourceTree = ""; }; - 0779D47026BDE89EC682E7F96F78A450 /* GTMSessionFetcher.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = GTMSessionFetcher.modulemap; sourceTree = ""; }; - 07EB28E4E2CF18D02EBC0050E6CC7BFC /* FormErrorType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormErrorType.swift; path = SwiftForms/FormErrorType.swift; sourceTree = ""; }; - 0ACD100ECA82EFCC54D4EBE7075D6B63 /* Duration.pbobjc.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = Duration.pbobjc.m; path = objectivec/google/protobuf/Duration.pbobjc.m; sourceTree = ""; }; - 0CF75373489E1B19487F73D2EF0A25FA /* GPBCodedInputStream.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBCodedInputStream.h; path = objectivec/GPBCodedInputStream.h; sourceTree = ""; }; - 0D81F0E7A4C32ED895084BB033F6C162 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 0D9B0422B059AECD26D3A7756D53763A /* GPBWireFormat.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBWireFormat.m; path = objectivec/GPBWireFormat.m; sourceTree = ""; }; - 0EC5918C14DEB9EA9039B260AE8F579E /* GTMSessionFetcher.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = GTMSessionFetcher.framework; path = GTMSessionFetcher.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 10BB46A061E205E512E333D49C665F1E /* Protobuf-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Protobuf-prefix.pch"; sourceTree = ""; }; - 11C10A31CD5CFA3EFE266394471B152E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 147ABB2E6FD365A61FD677CEAF2E8F74 /* GPBRootObject.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBRootObject.h; path = objectivec/GPBRootObject.h; sourceTree = ""; }; - 1F11020D632922EB26CA9318FE72686E /* Protobuf.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Protobuf.modulemap; sourceTree = ""; }; - 20CB50194F8E483D62C6A0505D658652 /* FormTextViewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormTextViewCell.swift; path = SwiftForms/cells/FormTextViewCell.swift; sourceTree = ""; }; - 219778C3B2F7912E2457E9103F003691 /* Pods-My MindUITests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-My MindUITests-acknowledgements.markdown"; sourceTree = ""; }; - 2240E189DEDB0DD6AA6F875980E779E9 /* SourceContext.pbobjc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SourceContext.pbobjc.h; path = objectivec/google/protobuf/SourceContext.pbobjc.h; sourceTree = ""; }; - 2AFE69BD6ABDB3ED20C7D2AAE67E633A /* GoogleToolboxForMac.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = GoogleToolboxForMac.framework; path = GoogleToolboxForMac.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2CE850B1D1E84D88005926957532A43D /* GTMNSDictionary+URLArguments.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "GTMNSDictionary+URLArguments.m"; path = "Foundation/GTMNSDictionary+URLArguments.m"; sourceTree = ""; }; - 2E8F17B03B2573E7AF5518F4D8F83636 /* Any.pbobjc.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = Any.pbobjc.m; path = objectivec/google/protobuf/Any.pbobjc.m; sourceTree = ""; }; - 32BB9F8340730A53FE860266AEB550B7 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 333C538B5D7211BA2C191178EAF756A3 /* Wrappers.pbobjc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Wrappers.pbobjc.h; path = objectivec/google/protobuf/Wrappers.pbobjc.h; sourceTree = ""; }; - 337D5E2875C54B8AD638F9BC8F002CC2 /* FormBaseCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormBaseCell.swift; path = SwiftForms/cells/base/FormBaseCell.swift; sourceTree = ""; }; - 35691A9D94872BA7B7814B3A80CB888A /* FormButtonCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormButtonCell.swift; path = SwiftForms/cells/FormButtonCell.swift; sourceTree = ""; }; - 382ADFC4F102ED71CA31280F9D6478B4 /* Pods-My Mind-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-My Mind-umbrella.h"; sourceTree = ""; }; - 3C8C5CCDB3DF06F579005F18477F7211 /* Protobuf.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Protobuf.xcconfig; sourceTree = ""; }; - 3FFD418427CA791B38CC1D2DD8BCE17B /* FormSectionDescriptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormSectionDescriptor.swift; path = SwiftForms/descriptors/FormSectionDescriptor.swift; sourceTree = ""; }; - 417594F2986964F91B14DE5190D12223 /* Any.pbobjc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Any.pbobjc.h; path = objectivec/google/protobuf/Any.pbobjc.h; sourceTree = ""; }; - 426B9B3BBAA2EAB204AB3EACEDBE5A51 /* GTMSessionFetcherService.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GTMSessionFetcherService.m; path = Source/GTMSessionFetcherService.m; sourceTree = ""; }; - 47A47181EA7C6A7471E73BEED79F36EF /* GTMSessionFetcher-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "GTMSessionFetcher-prefix.pch"; sourceTree = ""; }; - 48CDB633DEBAA19DEA03463805D50BD3 /* Pods-My Mind-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-My Mind-frameworks.sh"; sourceTree = ""; }; - 48CE5181CDD2A58F830561E2DF72F689 /* GPBProtocolBuffers_RuntimeSupport.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBProtocolBuffers_RuntimeSupport.h; path = objectivec/GPBProtocolBuffers_RuntimeSupport.h; sourceTree = ""; }; - 492C48B6BAAD60734C2C72549A54E3B2 /* GPBArray.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBArray.m; path = objectivec/GPBArray.m; sourceTree = ""; }; - 49EAFA2594E73D80DFA0B1CF04272B60 /* GTMSessionFetcher.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = GTMSessionFetcher.xcconfig; sourceTree = ""; }; - 4BA9CDFEE9B267D02FA161450F9823BE /* GPBCodedOutputStream_PackagePrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBCodedOutputStream_PackagePrivate.h; path = objectivec/GPBCodedOutputStream_PackagePrivate.h; sourceTree = ""; }; - 4BBA8B2C0E090FC064ACD0C9BF7F6B8E /* Struct.pbobjc.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = Struct.pbobjc.m; path = objectivec/google/protobuf/Struct.pbobjc.m; sourceTree = ""; }; - 4CEE4D3B7F93B3949F9D44B5C0DFCD9A /* GPBExtensionRegistry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBExtensionRegistry.h; path = objectivec/GPBExtensionRegistry.h; sourceTree = ""; }; - 4DF343C2B737A372FC6C4EA95BC52524 /* FormViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormViewController.swift; path = SwiftForms/controllers/FormViewController.swift; sourceTree = ""; }; - 4E54868CDD6882CF3E40477C97763420 /* FormSwitchCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormSwitchCell.swift; path = SwiftForms/cells/FormSwitchCell.swift; sourceTree = ""; }; - 4E792BF8123F33FF555ECF478106BA34 /* Wrappers.pbobjc.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = Wrappers.pbobjc.m; path = objectivec/google/protobuf/Wrappers.pbobjc.m; sourceTree = ""; }; - 517E5C5509A69EEADFDCDBB60FF850D2 /* Protobuf-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Protobuf-dummy.m"; sourceTree = ""; }; - 519D24F0E32B03E8B18B5C7A765205D0 /* Pods-My MindUITests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-My MindUITests.modulemap"; sourceTree = ""; }; - 51CD1445C3014F942282DD8DFC0A9038 /* GTMSessionFetcher-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "GTMSessionFetcher-dummy.m"; sourceTree = ""; }; - 52BC0EAD0840B465CD3DC4E086AC6B40 /* GPBArray_PackagePrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBArray_PackagePrivate.h; path = objectivec/GPBArray_PackagePrivate.h; sourceTree = ""; }; - 5499833724C56FC929A2EB852334259B /* GPBDictionary_PackagePrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBDictionary_PackagePrivate.h; path = objectivec/GPBDictionary_PackagePrivate.h; sourceTree = ""; }; - 570D85B3C6200AEA4BEA675BC7FD344E /* GPBDescriptor_PackagePrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBDescriptor_PackagePrivate.h; path = objectivec/GPBDescriptor_PackagePrivate.h; sourceTree = ""; }; - 57A674BCB1FB326B42CCA50C347BDD67 /* Pods-My Mind-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-My Mind-resources.sh"; sourceTree = ""; }; - 5808B372399BA62AC528A74303582071 /* GPBUnknownField.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBUnknownField.m; path = objectivec/GPBUnknownField.m; sourceTree = ""; }; - 58832B6B32C9F4F4E995FCE6A9A44199 /* FormStepperCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormStepperCell.swift; path = SwiftForms/cells/FormStepperCell.swift; sourceTree = ""; }; - 58DB5F742968C0FC6CCBA13A2413EAEA /* SwiftForms-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftForms-prefix.pch"; sourceTree = ""; }; - 59BCC27E1487C8247740ECE881CFB15F /* FormTitleCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormTitleCell.swift; path = SwiftForms/cells/base/FormTitleCell.swift; sourceTree = ""; }; - 59D7EF173A3FA2427A8E9CC862CC9DA0 /* Timestamp.pbobjc.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = Timestamp.pbobjc.m; path = objectivec/google/protobuf/Timestamp.pbobjc.m; sourceTree = ""; }; - 5A73B3D6D38ABEBF7D53CC0C69B25E85 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5A7E09ACD9CD75749A98A159D1402CFA /* FirebaseAnalytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FirebaseAnalytics.framework; path = Frameworks/FirebaseAnalytics.framework; sourceTree = ""; }; - 5C5732F96D612C6CB81E3AA90382C926 /* GTMMethodCheck.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GTMMethodCheck.h; path = DebugUtils/GTMMethodCheck.h; sourceTree = ""; }; - 61610B1461FBD48E686AE170C53D24F3 /* SourceContext.pbobjc.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SourceContext.pbobjc.m; path = objectivec/google/protobuf/SourceContext.pbobjc.m; sourceTree = ""; }; - 6167942B002D190FC160FDD116E92C94 /* FirebaseInstanceID.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FirebaseInstanceID.framework; path = Frameworks/FirebaseInstanceID.framework; sourceTree = ""; }; - 6272BBB12B9AE952C8FFC8D0479A0064 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 62AE94EA10C85AA910E42862E0EDFC0E /* FirebaseAuth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FirebaseAuth.framework; path = Frameworks/FirebaseAuth.framework; sourceTree = ""; }; - 62CDD215896B42F23BE3142866949CD0 /* GoogleToolboxForMac-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "GoogleToolboxForMac-dummy.m"; sourceTree = ""; }; - 65287AE627674E28D9E32B6B580402D9 /* GTMDebugSelectorValidation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GTMDebugSelectorValidation.h; path = DebugUtils/GTMDebugSelectorValidation.h; sourceTree = ""; }; - 6528DBDF62EA884176D5AFF6AEDCF97B /* GPBUtilities_PackagePrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBUtilities_PackagePrivate.h; path = objectivec/GPBUtilities_PackagePrivate.h; sourceTree = ""; }; - 65DEAE9050E4D77A9A3AA4A62DA6083E /* GPBCodedOutputStream.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBCodedOutputStream.h; path = objectivec/GPBCodedOutputStream.h; sourceTree = ""; }; - 663377847C89A49436E2C8BBF9310961 /* GPBRuntimeTypes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBRuntimeTypes.h; path = objectivec/GPBRuntimeTypes.h; sourceTree = ""; }; - 6A5646D89B0F6684909F53350FFD18ED /* FormOptionsViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormOptionsViewController.swift; path = SwiftForms/controllers/FormOptionsViewController.swift; sourceTree = ""; }; - 6B6E296E79BCA827779D8E6F9CB3F190 /* FormPickerCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormPickerCell.swift; path = SwiftForms/cells/FormPickerCell.swift; sourceTree = ""; }; - 6CA9CD616B60BD84EA4C4384844B1E9E /* FormDescriptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormDescriptor.swift; path = SwiftForms/descriptors/FormDescriptor.swift; sourceTree = ""; }; - 6D14645AA024ADB39D1569A224707071 /* SwiftForms.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = SwiftForms.modulemap; sourceTree = ""; }; - 6EFDE251028D1E0EFE6D83C5AF07C88C /* GPBExtensionInternals.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBExtensionInternals.m; path = objectivec/GPBExtensionInternals.m; sourceTree = ""; }; - 6F95B0490F19FD95E1ED6F6843FBF7FA /* GTMSessionUploadFetcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GTMSessionUploadFetcher.h; path = Source/GTMSessionUploadFetcher.h; sourceTree = ""; }; - 72FF7237480AB043544FF521E927DBDB /* SwiftForms-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftForms-dummy.m"; sourceTree = ""; }; - 7541EC1252B9F9FB3C2E4F699687631F /* SwiftForms.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftForms.xcconfig; sourceTree = ""; }; - 762788A700315098915980CD7F65EAE8 /* Pods-My Mind.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-My Mind.debug.xcconfig"; sourceTree = ""; }; - 780F34E46969AD6CE138758FDF376C61 /* GPBRootObject.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBRootObject.m; path = objectivec/GPBRootObject.m; sourceTree = ""; }; - 78548477CABC4363BABB19C3FCFF6070 /* Type.pbobjc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Type.pbobjc.h; path = objectivec/google/protobuf/Type.pbobjc.h; sourceTree = ""; }; - 78B11983D0ECBC28E9C52876E2CFD0D4 /* GPBWellKnownTypes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBWellKnownTypes.h; path = objectivec/GPBWellKnownTypes.h; sourceTree = ""; }; - 7915FADFEEA349C42C68CCEEAD55D425 /* FirebaseMessaging.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FirebaseMessaging.framework; path = Frameworks/FirebaseMessaging.framework; sourceTree = ""; }; - 7A6BF39A42E09B02D486D1A66E925D5C /* GPBDictionary.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBDictionary.m; path = objectivec/GPBDictionary.m; sourceTree = ""; }; - 7BDA02291F1A362450234B844FAA0007 /* GoogleToolboxForMac-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "GoogleToolboxForMac-prefix.pch"; sourceTree = ""; }; - 7D3FEBD0772AA84E080810E65FCE7F21 /* GPBCodedInputStream.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBCodedInputStream.m; path = objectivec/GPBCodedInputStream.m; sourceTree = ""; }; - 7F1E702B98DC6E52F8E7B32C9657B4A8 /* Api.pbobjc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Api.pbobjc.h; path = objectivec/google/protobuf/Api.pbobjc.h; sourceTree = ""; }; - 7F3E6CB75073B2053DE8E1F4075737C1 /* GTMSessionFetcher-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "GTMSessionFetcher-umbrella.h"; sourceTree = ""; }; - 7F7BEC6B021D75E802E41CACBD40B714 /* SwiftForms-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftForms-umbrella.h"; sourceTree = ""; }; - 7FB3BE45C579118C88B5D150C4A59AA6 /* Pods-My MindUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-My MindUITests.debug.xcconfig"; sourceTree = ""; }; - 7FF37CA4ECE126E2CEBBA2985AA0DC79 /* Pods-My Mind.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-My Mind.release.xcconfig"; sourceTree = ""; }; - 84A998645747A6448A5B8BE9D16E36C7 /* Pods-My MindUITests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-My MindUITests-frameworks.sh"; sourceTree = ""; }; - 84E8D932BDF3B81832F36ECBBDCE4F20 /* FieldMask.pbobjc.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FieldMask.pbobjc.m; path = objectivec/google/protobuf/FieldMask.pbobjc.m; sourceTree = ""; }; - 85A2A3CE914E7C5EAF7DE6D83E28E4FD /* Pods-My MindTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-My MindTests-dummy.m"; sourceTree = ""; }; - 8A13C466B515E92C02180E8381113E79 /* Pods-My MindTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-My MindTests.modulemap"; sourceTree = ""; }; - 8A53F4959335798A36393362EA972753 /* GTMSessionFetcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GTMSessionFetcher.m; path = Source/GTMSessionFetcher.m; sourceTree = ""; }; - 8A79ED5832956BF4F7038F8D8BEA03B9 /* GPBCodedInputStream_PackagePrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBCodedInputStream_PackagePrivate.h; path = objectivec/GPBCodedInputStream_PackagePrivate.h; sourceTree = ""; }; - 8AA7D7ABB94E949FDDFE415F26F7D884 /* GPBUtilities.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBUtilities.h; path = objectivec/GPBUtilities.h; sourceTree = ""; }; - 8D034AFEF324E61D3597F87078B98C9F /* FirebaseStorage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FirebaseStorage.framework; path = Frameworks/FirebaseStorage.framework; sourceTree = ""; }; - 8FE0835AA52B19319E70D5AE2F75779F /* Protobuf.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Protobuf.framework; path = Protobuf.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9017D1B659C5197C92D7904B7855E635 /* GTMNSString+URLArguments.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "GTMNSString+URLArguments.h"; path = "Foundation/GTMNSString+URLArguments.h"; sourceTree = ""; }; - 9039FAA24EE3E8E9C5FB57B8054F3734 /* GTMSessionFetcherService.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GTMSessionFetcherService.h; path = Source/GTMSessionFetcherService.h; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 943B1B21D11DFCCEAF4C873789DF321F /* Struct.pbobjc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Struct.pbobjc.h; path = objectivec/google/protobuf/Struct.pbobjc.h; sourceTree = ""; }; - 94408DF648FFAC91131160EC1C22D13E /* FormValueCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormValueCell.swift; path = SwiftForms/cells/base/FormValueCell.swift; sourceTree = ""; }; - 94B831D92EFB367FD4C7F1B82F3D8873 /* GTMDebugThreadValidation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GTMDebugThreadValidation.h; path = DebugUtils/GTMDebugThreadValidation.h; sourceTree = ""; }; - 957A616ADE9035A64BDF137BBBE4D457 /* Protobuf-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Protobuf-umbrella.h"; sourceTree = ""; }; - 97E0580A792F4FA44146B965852D4EF3 /* FormRowDescriptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormRowDescriptor.swift; path = SwiftForms/descriptors/FormRowDescriptor.swift; sourceTree = ""; }; - 97F24E7CB6220219CED9DA23659078E3 /* GPBWireFormat.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBWireFormat.h; path = objectivec/GPBWireFormat.h; sourceTree = ""; }; - 9BE440486863BCD868B052827A8D72A4 /* FirebaseCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FirebaseCore.framework; path = Frameworks/FirebaseCore.framework; sourceTree = ""; }; - 9C87FE8D5CCFB21AFC63EDC6B246E743 /* FirebaseDatabase.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FirebaseDatabase.framework; path = Frameworks/FirebaseDatabase.framework; sourceTree = ""; }; - 9D19F24A5FEC0247AD4F2F2ACEC04EBB /* Pods-My MindTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-My MindTests-umbrella.h"; sourceTree = ""; }; - 9DBCD93DC7AFE139DA153F5FAE640755 /* Pods-My MindUITests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-My MindUITests-resources.sh"; sourceTree = ""; }; - 9F6AD89A533E1D92EAC8B061CF36201D /* Empty.pbobjc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Empty.pbobjc.h; path = objectivec/google/protobuf/Empty.pbobjc.h; sourceTree = ""; }; - A1588B3B027450360D3952A75EC47B91 /* Api.pbobjc.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = Api.pbobjc.m; path = objectivec/google/protobuf/Api.pbobjc.m; sourceTree = ""; }; - A765202CCD7B7E9B90EFA62AF9E62AF1 /* Pods-My MindTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-My MindTests-acknowledgements.markdown"; sourceTree = ""; }; - A83F0601B51F9E9854BA089577BFEC1B /* Pods-My Mind-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-My Mind-dummy.m"; sourceTree = ""; }; - A925FF45B7472601C1E782FC7F0CF0F0 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - AA1351639EFB7DD9486B7B76F95486BA /* Pods-My MindTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-My MindTests.release.xcconfig"; sourceTree = ""; }; - AB480BB5E0598CDB727667AF57845732 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - ADDE781DF4F0C92212899862D4780542 /* GTMDefines.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = GTMDefines.h; sourceTree = ""; }; - AFAEEE7E21E3165A974245095BAAA076 /* GPBUnknownField_PackagePrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBUnknownField_PackagePrivate.h; path = objectivec/GPBUnknownField_PackagePrivate.h; sourceTree = ""; }; - AFDD6C1F3CD55B82661B2460742CB904 /* SwiftForms.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SwiftForms.framework; path = SwiftForms.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - B088AC17873204F41B7FAEAAB3777AEE /* Empty.pbobjc.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = Empty.pbobjc.m; path = objectivec/google/protobuf/Empty.pbobjc.m; sourceTree = ""; }; - B164E02D45408DC0B945C26903CD7D60 /* GPBCodedOutputStream.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBCodedOutputStream.m; path = objectivec/GPBCodedOutputStream.m; sourceTree = ""; }; - B4F5FB92132CE93F60CBB216D4DD7392 /* Pods-My Mind-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-My Mind-acknowledgements.plist"; sourceTree = ""; }; - B4FFEC78B75AF8EF05F58D59F8C60066 /* GoogleToolboxForMac.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = GoogleToolboxForMac.xcconfig; sourceTree = ""; }; - B8E2408769D7DA1F4916FFD1DAA16038 /* GPBProtocolBuffers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBProtocolBuffers.h; path = objectivec/GPBProtocolBuffers.h; sourceTree = ""; }; - BD7996C352B9EB6B4A8D3AAA1B36CDE8 /* GTMLogger.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GTMLogger.h; path = Foundation/GTMLogger.h; sourceTree = ""; }; - BF709BD37EA76BF34B0EDE49ECD9C757 /* FormSliderCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormSliderCell.swift; path = SwiftForms/cells/FormSliderCell.swift; sourceTree = ""; }; - C034DF8AD2B97A433EDF47F4DED7D41F /* GTMSessionFetcherLogging.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GTMSessionFetcherLogging.h; path = Source/GTMSessionFetcherLogging.h; sourceTree = ""; }; - C085E02FF89804F50ADDA04F5A586E94 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; - C0CCC676ECA9F2D8C013B893E2F4B8EE /* GoogleToolboxForMac.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = GoogleToolboxForMac.modulemap; sourceTree = ""; }; - C54C499A7DC3B1C49F717C2E473F1799 /* Firebase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Firebase.h; path = Core/Sources/Firebase.h; sourceTree = ""; }; - C5B52C6BC0AA2E3EBB029EF5CF1BD3F2 /* FormCheckCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormCheckCell.swift; path = SwiftForms/cells/FormCheckCell.swift; sourceTree = ""; }; - C65F9211134A42FDDAC44302A6128140 /* Pods-My MindUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-My MindUITests.release.xcconfig"; sourceTree = ""; }; - C69D3B517B9E1A1DFD3CBF77296CDC6B /* Type.pbobjc.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = Type.pbobjc.m; path = objectivec/google/protobuf/Type.pbobjc.m; sourceTree = ""; }; - C6E0ADBB12720758E73C2AA823388341 /* Pods-My MindUITests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-My MindUITests-dummy.m"; sourceTree = ""; }; - C6FF70D75D02D56AA873A5E3CCCFA753 /* GTMNSData+zlib.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "GTMNSData+zlib.h"; path = "Foundation/GTMNSData+zlib.h"; sourceTree = ""; }; - C730FCBDBB6BA86D1859C133EBA68542 /* GTMSessionUploadFetcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GTMSessionUploadFetcher.m; path = Source/GTMSessionUploadFetcher.m; sourceTree = ""; }; - C8CA9484F7BE4379712B78E955708D3E /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C9C349C840D8D637522B13A9683A4F7C /* GPBUnknownFieldSet.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBUnknownFieldSet.m; path = objectivec/GPBUnknownFieldSet.m; sourceTree = ""; }; - CACA6F8A6CDD86DCF1C1867E9DF5C8B4 /* GTMLogger.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GTMLogger.m; path = Foundation/GTMLogger.m; sourceTree = ""; }; - CD3BCD7F8B91CB85590BE63491BEE0EB /* GTMNSData+zlib.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "GTMNSData+zlib.m"; path = "Foundation/GTMNSData+zlib.m"; sourceTree = ""; }; - CDAB8E1ED5494ECDB56C6CE4C73B67BE /* FormSelectorCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormSelectorCell.swift; path = SwiftForms/cells/FormSelectorCell.swift; sourceTree = ""; }; - CE13E4DC0098D7F1EB42333505C25A16 /* GTMNSString+URLArguments.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "GTMNSString+URLArguments.m"; path = "Foundation/GTMNSString+URLArguments.m"; sourceTree = ""; }; - D0092261164863CFE351B1AFA2020C35 /* FieldMask.pbobjc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FieldMask.pbobjc.h; path = objectivec/google/protobuf/FieldMask.pbobjc.h; sourceTree = ""; }; - D01EBDDD3282EBF13B70C9EFD90A6E12 /* GPBDescriptor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBDescriptor.h; path = objectivec/GPBDescriptor.h; sourceTree = ""; }; - D0266FF18D453C1DCA0A9CFF49368785 /* GPBDescriptor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBDescriptor.m; path = objectivec/GPBDescriptor.m; sourceTree = ""; }; - D142DB90C8AB3F88BACE17C0E8F41468 /* Pods_My_MindUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_My_MindUITests.framework; path = "Pods-My MindUITests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - D2C3FF0B1A81F42BE1D1B5FCE932F132 /* GPBDictionary.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBDictionary.h; path = objectivec/GPBDictionary.h; sourceTree = ""; }; - D655C91CDBE621AC7B2C8AC308446621 /* GPBMessage_PackagePrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBMessage_PackagePrivate.h; path = objectivec/GPBMessage_PackagePrivate.h; sourceTree = ""; }; - D77477064B3077273FF6BFF8DC304E42 /* Pods-My Mind.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-My Mind.modulemap"; sourceTree = ""; }; - D9609C8B8C73D1BD7764F804D5B1B1C4 /* GPBBootstrap.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBBootstrap.h; path = objectivec/GPBBootstrap.h; sourceTree = ""; }; - DDBC4996299464B6583A468025D9F0A3 /* FormSelector.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormSelector.swift; path = SwiftForms/controllers/FormSelector.swift; sourceTree = ""; }; - DE62E5901037C18EA5E51A24F82D9FD0 /* FormLabelCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormLabelCell.swift; path = SwiftForms/cells/FormLabelCell.swift; sourceTree = ""; }; - DEA980D9F7AA93FA83D103418881DF52 /* GTMSessionFetcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GTMSessionFetcher.h; path = Source/GTMSessionFetcher.h; sourceTree = ""; }; - E35D4F5F0061B56A462CEAB0B2088E5F /* FormDateCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormDateCell.swift; path = SwiftForms/cells/FormDateCell.swift; sourceTree = ""; }; - E384C86336CF7AF55DC818CFE92B1B45 /* GPBMessage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBMessage.m; path = objectivec/GPBMessage.m; sourceTree = ""; }; - E3C5584F302E83D6AD0C2C89DEA739A8 /* GPBWellKnownTypes.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBWellKnownTypes.m; path = objectivec/GPBWellKnownTypes.m; sourceTree = ""; }; - EBB073E16FDED750D19A5F5275CD9F78 /* GTMNSDictionary+URLArguments.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "GTMNSDictionary+URLArguments.h"; path = "Foundation/GTMNSDictionary+URLArguments.h"; sourceTree = ""; }; - EBF2398C06DB4EB302148F5017FB0A70 /* FormSegmentedControlCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormSegmentedControlCell.swift; path = SwiftForms/cells/FormSegmentedControlCell.swift; sourceTree = ""; }; - ED05A70B55345D832DF12A75E1F06688 /* Duration.pbobjc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Duration.pbobjc.h; path = objectivec/google/protobuf/Duration.pbobjc.h; sourceTree = ""; }; - EDEA6E541A4D7A2C5F595B75C90E7570 /* Pods-My MindTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-My MindTests-resources.sh"; sourceTree = ""; }; - EEA205599F57D0795527DDF094C2A352 /* GoogleToolboxForMac-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "GoogleToolboxForMac-umbrella.h"; sourceTree = ""; }; - F00E487CB0595324CFEC002BDC1761D2 /* Pods_My_MindTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_My_MindTests.framework; path = "Pods-My MindTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - F24A7C4D2987073E07C78582294A7D0B /* Pods-My Mind-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-My Mind-acknowledgements.markdown"; sourceTree = ""; }; - F45118D1934BE921CAC791D95B2FB865 /* GPBArray.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBArray.h; path = objectivec/GPBArray.h; sourceTree = ""; }; - F71C04C844A389D12DE09DA41AFFCF40 /* Timestamp.pbobjc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Timestamp.pbobjc.h; path = objectivec/google/protobuf/Timestamp.pbobjc.h; sourceTree = ""; }; - F765F1C3807CE75CF91697E2EC55A17C /* Pods-My MindTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-My MindTests-frameworks.sh"; sourceTree = ""; }; - F77BB25E2D57E7B88812835EDFC5F8E3 /* Pods_My_Mind.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_My_Mind.framework; path = "Pods-My Mind.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - FAF0DDF30B709D6FB5E1A1BCA2CA8E69 /* Pods-My MindUITests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-My MindUITests-acknowledgements.plist"; sourceTree = ""; }; - FC8B9C8AC51D0D50681265C76680C355 /* GPBExtensionRegistry.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPBExtensionRegistry.m; path = objectivec/GPBExtensionRegistry.m; sourceTree = ""; }; - FCD4195B885EB8C343478CBDFD5904FF /* GPBUnknownFieldSet.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPBUnknownFieldSet.h; path = objectivec/GPBUnknownFieldSet.h; sourceTree = ""; }; - FD8F434237C82030172059D2E34236EF /* Pods-My MindTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-My MindTests-acknowledgements.plist"; sourceTree = ""; }; - FFAFB8529547831A0719762DC59A9AEE /* FormTextFieldCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormTextFieldCell.swift; path = SwiftForms/cells/FormTextFieldCell.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 056EBB96213E97E100463CD18FF9683F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C0C8DBA23FC57BBA2A14D0B2D8777BCE /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 275E83AA79278AB82E4640FED0C4F091 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 577F68D9F8D3E0FC4B893807AEF60F99 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6AE88E96161DE195EAAF0A3B6375EA50 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9024F4774BD8DDE03700B223CF7F8164 /* Foundation.framework in Frameworks */, - 9DA28C3544749A7DB9AB129BEC773550 /* Security.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7A0D89FE48DF8F315F45325F323293D4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 56185212DDCB5447D6277E6EECE3647E /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9B4B1BF9BF771B95FCB1431B06BE998B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5A8B81B73FD0682B56C9B4C78099A8B4 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CD316CD7B593ACBFB5E8D70B971972C8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DAB0B8CC07908FFE9BC6452FD4B9E401 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DC55B2115E2CB545BC6BE29379EDEB0B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0A615FA343EFC2749A9AC58CD06222DD /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 0272D8654180D9026C40CDCA5D166E66 /* NSData+zlib */ = { - isa = PBXGroup; - children = ( - C6FF70D75D02D56AA873A5E3CCCFA753 /* GTMNSData+zlib.h */, - CD3BCD7F8B91CB85590BE63491BEE0EB /* GTMNSData+zlib.m */, - ); - name = "NSData+zlib"; - sourceTree = ""; - }; - 0546279067FDF3C54D44CBB345727A2D /* Products */ = { - isa = PBXGroup; - children = ( - 2AFE69BD6ABDB3ED20C7D2AAE67E633A /* GoogleToolboxForMac.framework */, - 0EC5918C14DEB9EA9039B260AE8F579E /* GTMSessionFetcher.framework */, - F77BB25E2D57E7B88812835EDFC5F8E3 /* Pods_My_Mind.framework */, - F00E487CB0595324CFEC002BDC1761D2 /* Pods_My_MindTests.framework */, - D142DB90C8AB3F88BACE17C0E8F41468 /* Pods_My_MindUITests.framework */, - 8FE0835AA52B19319E70D5AE2F75779F /* Protobuf.framework */, - AFDD6C1F3CD55B82661B2460742CB904 /* SwiftForms.framework */, - ); - name = Products; - sourceTree = ""; - }; - 07BDCCC241764A018E128B4DB0A1761D /* Support Files */ = { - isa = PBXGroup; - children = ( - 0779D47026BDE89EC682E7F96F78A450 /* GTMSessionFetcher.modulemap */, - 49EAFA2594E73D80DFA0B1CF04272B60 /* GTMSessionFetcher.xcconfig */, - 51CD1445C3014F942282DD8DFC0A9038 /* GTMSessionFetcher-dummy.m */, - 47A47181EA7C6A7471E73BEED79F36EF /* GTMSessionFetcher-prefix.pch */, - 7F3E6CB75073B2053DE8E1F4075737C1 /* GTMSessionFetcher-umbrella.h */, - 6272BBB12B9AE952C8FFC8D0479A0064 /* Info.plist */, - ); - name = "Support Files"; - path = "../Target Support Files/GTMSessionFetcher"; - sourceTree = ""; - }; - 157420020924301428AAA3D7094318BD /* FirebaseMessaging */ = { - isa = PBXGroup; - children = ( - 36D44028B45C39F8C592422D376A861F /* Frameworks */, - ); - name = FirebaseMessaging; - path = FirebaseMessaging; - sourceTree = ""; - }; - 19FA46D2621A5B4F807D59EACC67097A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 5A7E09ACD9CD75749A98A159D1402CFA /* FirebaseAnalytics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 1AB046291D88454B419B5357B72377CE /* Pods-My Mind */ = { - isa = PBXGroup; - children = ( - C8CA9484F7BE4379712B78E955708D3E /* Info.plist */, - D77477064B3077273FF6BFF8DC304E42 /* Pods-My Mind.modulemap */, - F24A7C4D2987073E07C78582294A7D0B /* Pods-My Mind-acknowledgements.markdown */, - B4F5FB92132CE93F60CBB216D4DD7392 /* Pods-My Mind-acknowledgements.plist */, - A83F0601B51F9E9854BA089577BFEC1B /* Pods-My Mind-dummy.m */, - 48CDB633DEBAA19DEA03463805D50BD3 /* Pods-My Mind-frameworks.sh */, - 57A674BCB1FB326B42CCA50C347BDD67 /* Pods-My Mind-resources.sh */, - 382ADFC4F102ED71CA31280F9D6478B4 /* Pods-My Mind-umbrella.h */, - 762788A700315098915980CD7F65EAE8 /* Pods-My Mind.debug.xcconfig */, - 7FF37CA4ECE126E2CEBBA2985AA0DC79 /* Pods-My Mind.release.xcconfig */, - ); - name = "Pods-My Mind"; - path = "Target Support Files/Pods-My Mind"; - sourceTree = ""; - }; - 1D9D3DC7748BB6D45C201E8576C530F4 /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - 1AB046291D88454B419B5357B72377CE /* Pods-My Mind */, - 5E889E6E5F42BF89DECC4CF05895EA62 /* Pods-My MindTests */, - 35846EFE86A50BCD2705897CC971D539 /* Pods-My MindUITests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - 20E79BC35BD339891479BDCF3210A3E8 /* Core */ = { - isa = PBXGroup; - children = ( - C54C499A7DC3B1C49F717C2E473F1799 /* Firebase.h */, - ); - name = Core; - sourceTree = ""; - }; - 30D5DAFDE791F437C2D90FFA074CDEC7 /* Support Files */ = { - isa = PBXGroup; - children = ( - 32BB9F8340730A53FE860266AEB550B7 /* Info.plist */, - 6D14645AA024ADB39D1569A224707071 /* SwiftForms.modulemap */, - 7541EC1252B9F9FB3C2E4F699687631F /* SwiftForms.xcconfig */, - 72FF7237480AB043544FF521E927DBDB /* SwiftForms-dummy.m */, - 58DB5F742968C0FC6CCBA13A2413EAEA /* SwiftForms-prefix.pch */, - 7F7BEC6B021D75E802E41CACBD40B714 /* SwiftForms-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/SwiftForms"; - sourceTree = ""; - }; - 35846EFE86A50BCD2705897CC971D539 /* Pods-My MindUITests */ = { - isa = PBXGroup; - children = ( - 5A73B3D6D38ABEBF7D53CC0C69B25E85 /* Info.plist */, - 519D24F0E32B03E8B18B5C7A765205D0 /* Pods-My MindUITests.modulemap */, - 219778C3B2F7912E2457E9103F003691 /* Pods-My MindUITests-acknowledgements.markdown */, - FAF0DDF30B709D6FB5E1A1BCA2CA8E69 /* Pods-My MindUITests-acknowledgements.plist */, - C6E0ADBB12720758E73C2AA823388341 /* Pods-My MindUITests-dummy.m */, - 84A998645747A6448A5B8BE9D16E36C7 /* Pods-My MindUITests-frameworks.sh */, - 9DBCD93DC7AFE139DA153F5FAE640755 /* Pods-My MindUITests-resources.sh */, - 005F0C0349D64250FD30859B9EBF2911 /* Pods-My MindUITests-umbrella.h */, - 7FB3BE45C579118C88B5D150C4A59AA6 /* Pods-My MindUITests.debug.xcconfig */, - C65F9211134A42FDDAC44302A6128140 /* Pods-My MindUITests.release.xcconfig */, - ); - name = "Pods-My MindUITests"; - path = "Target Support Files/Pods-My MindUITests"; - sourceTree = ""; - }; - 367864507DA250138E27472E564B80AA /* Support Files */ = { - isa = PBXGroup; - children = ( - C0CCC676ECA9F2D8C013B893E2F4B8EE /* GoogleToolboxForMac.modulemap */, - B4FFEC78B75AF8EF05F58D59F8C60066 /* GoogleToolboxForMac.xcconfig */, - 62CDD215896B42F23BE3142866949CD0 /* GoogleToolboxForMac-dummy.m */, - 7BDA02291F1A362450234B844FAA0007 /* GoogleToolboxForMac-prefix.pch */, - EEA205599F57D0795527DDF094C2A352 /* GoogleToolboxForMac-umbrella.h */, - A925FF45B7472601C1E782FC7F0CF0F0 /* Info.plist */, - ); - name = "Support Files"; - path = "../Target Support Files/GoogleToolboxForMac"; - sourceTree = ""; - }; - 36D44028B45C39F8C592422D376A861F /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7915FADFEEA349C42C68CCEEAD55D425 /* FirebaseMessaging.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 3CADC4CBBF61A8CFC74F3A7BDC43DEEA /* FirebaseAuth */ = { - isa = PBXGroup; - children = ( - C226EABF5611BFDB4912E4C4954B9683 /* Frameworks */, - ); - name = FirebaseAuth; - path = FirebaseAuth; - sourceTree = ""; - }; - 40AA9CE69B97257EC733F07611408639 /* Logger */ = { - isa = PBXGroup; - children = ( - BD7996C352B9EB6B4A8D3AAA1B36CDE8 /* GTMLogger.h */, - CACA6F8A6CDD86DCF1C1867E9DF5C8B4 /* GTMLogger.m */, - ); - name = Logger; - sourceTree = ""; - }; - 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { - isa = PBXGroup; - children = ( - 4F990579C2E52276FD3C28227B49D60B /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - 44C3AA6F8019D02399B364802C32CC11 /* Protobuf */ = { - isa = PBXGroup; - children = ( - 417594F2986964F91B14DE5190D12223 /* Any.pbobjc.h */, - 2E8F17B03B2573E7AF5518F4D8F83636 /* Any.pbobjc.m */, - 7F1E702B98DC6E52F8E7B32C9657B4A8 /* Api.pbobjc.h */, - A1588B3B027450360D3952A75EC47B91 /* Api.pbobjc.m */, - ED05A70B55345D832DF12A75E1F06688 /* Duration.pbobjc.h */, - 0ACD100ECA82EFCC54D4EBE7075D6B63 /* Duration.pbobjc.m */, - 9F6AD89A533E1D92EAC8B061CF36201D /* Empty.pbobjc.h */, - B088AC17873204F41B7FAEAAB3777AEE /* Empty.pbobjc.m */, - D0092261164863CFE351B1AFA2020C35 /* FieldMask.pbobjc.h */, - 84E8D932BDF3B81832F36ECBBDCE4F20 /* FieldMask.pbobjc.m */, - F45118D1934BE921CAC791D95B2FB865 /* GPBArray.h */, - 492C48B6BAAD60734C2C72549A54E3B2 /* GPBArray.m */, - 52BC0EAD0840B465CD3DC4E086AC6B40 /* GPBArray_PackagePrivate.h */, - D9609C8B8C73D1BD7764F804D5B1B1C4 /* GPBBootstrap.h */, - 0CF75373489E1B19487F73D2EF0A25FA /* GPBCodedInputStream.h */, - 7D3FEBD0772AA84E080810E65FCE7F21 /* GPBCodedInputStream.m */, - 8A79ED5832956BF4F7038F8D8BEA03B9 /* GPBCodedInputStream_PackagePrivate.h */, - 65DEAE9050E4D77A9A3AA4A62DA6083E /* GPBCodedOutputStream.h */, - B164E02D45408DC0B945C26903CD7D60 /* GPBCodedOutputStream.m */, - 4BA9CDFEE9B267D02FA161450F9823BE /* GPBCodedOutputStream_PackagePrivate.h */, - D01EBDDD3282EBF13B70C9EFD90A6E12 /* GPBDescriptor.h */, - D0266FF18D453C1DCA0A9CFF49368785 /* GPBDescriptor.m */, - 570D85B3C6200AEA4BEA675BC7FD344E /* GPBDescriptor_PackagePrivate.h */, - D2C3FF0B1A81F42BE1D1B5FCE932F132 /* GPBDictionary.h */, - 7A6BF39A42E09B02D486D1A66E925D5C /* GPBDictionary.m */, - 5499833724C56FC929A2EB852334259B /* GPBDictionary_PackagePrivate.h */, - 01F274E88183C84F2B8438E429A7DD2A /* GPBExtensionInternals.h */, - 6EFDE251028D1E0EFE6D83C5AF07C88C /* GPBExtensionInternals.m */, - 4CEE4D3B7F93B3949F9D44B5C0DFCD9A /* GPBExtensionRegistry.h */, - FC8B9C8AC51D0D50681265C76680C355 /* GPBExtensionRegistry.m */, - 0503F7077D47FE925B17B5FF0762CF07 /* GPBMessage.h */, - E384C86336CF7AF55DC818CFE92B1B45 /* GPBMessage.m */, - D655C91CDBE621AC7B2C8AC308446621 /* GPBMessage_PackagePrivate.h */, - B8E2408769D7DA1F4916FFD1DAA16038 /* GPBProtocolBuffers.h */, - 48CE5181CDD2A58F830561E2DF72F689 /* GPBProtocolBuffers_RuntimeSupport.h */, - 147ABB2E6FD365A61FD677CEAF2E8F74 /* GPBRootObject.h */, - 780F34E46969AD6CE138758FDF376C61 /* GPBRootObject.m */, - 0001CB9DD3387DFB250421D0D1A901BE /* GPBRootObject_PackagePrivate.h */, - 663377847C89A49436E2C8BBF9310961 /* GPBRuntimeTypes.h */, - 057FE3973F5DDE08116EC344A779F457 /* GPBUnknownField.h */, - 5808B372399BA62AC528A74303582071 /* GPBUnknownField.m */, - AFAEEE7E21E3165A974245095BAAA076 /* GPBUnknownField_PackagePrivate.h */, - FCD4195B885EB8C343478CBDFD5904FF /* GPBUnknownFieldSet.h */, - C9C349C840D8D637522B13A9683A4F7C /* GPBUnknownFieldSet.m */, - 02E9E68775A73ADD33F7D5A1141ABA58 /* GPBUnknownFieldSet_PackagePrivate.h */, - 8AA7D7ABB94E949FDDFE415F26F7D884 /* GPBUtilities.h */, - 06A8361C8DDBC18D6E7CADE99392DE8F /* GPBUtilities.m */, - 6528DBDF62EA884176D5AFF6AEDCF97B /* GPBUtilities_PackagePrivate.h */, - 78B11983D0ECBC28E9C52876E2CFD0D4 /* GPBWellKnownTypes.h */, - E3C5584F302E83D6AD0C2C89DEA739A8 /* GPBWellKnownTypes.m */, - 97F24E7CB6220219CED9DA23659078E3 /* GPBWireFormat.h */, - 0D9B0422B059AECD26D3A7756D53763A /* GPBWireFormat.m */, - 2240E189DEDB0DD6AA6F875980E779E9 /* SourceContext.pbobjc.h */, - 61610B1461FBD48E686AE170C53D24F3 /* SourceContext.pbobjc.m */, - 943B1B21D11DFCCEAF4C873789DF321F /* Struct.pbobjc.h */, - 4BBA8B2C0E090FC064ACD0C9BF7F6B8E /* Struct.pbobjc.m */, - F71C04C844A389D12DE09DA41AFFCF40 /* Timestamp.pbobjc.h */, - 59D7EF173A3FA2427A8E9CC862CC9DA0 /* Timestamp.pbobjc.m */, - 78548477CABC4363BABB19C3FCFF6070 /* Type.pbobjc.h */, - C69D3B517B9E1A1DFD3CBF77296CDC6B /* Type.pbobjc.m */, - 333C538B5D7211BA2C191178EAF756A3 /* Wrappers.pbobjc.h */, - 4E792BF8123F33FF555ECF478106BA34 /* Wrappers.pbobjc.m */, - 68DA733E063A653450AD574154E13DD0 /* Support Files */, - ); - name = Protobuf; - path = Protobuf; - sourceTree = ""; - }; - 4E416A37748B5D436D5DE3D0B1883E0D /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9BE440486863BCD868B052827A8D72A4 /* FirebaseCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4F990579C2E52276FD3C28227B49D60B /* iOS */ = { - isa = PBXGroup; - children = ( - 11C10A31CD5CFA3EFE266394471B152E /* Foundation.framework */, - C085E02FF89804F50ADDA04F5A586E94 /* Security.framework */, - ); - name = iOS; - sourceTree = ""; - }; - 5394A34E7604E6A62472B73BD2BC6BE2 /* FirebaseDatabase */ = { - isa = PBXGroup; - children = ( - A7C45A8F7CDCC3D821FC4FA1B5D86FBB /* Frameworks */, - ); - name = FirebaseDatabase; - path = FirebaseDatabase; - sourceTree = ""; - }; - 5E889E6E5F42BF89DECC4CF05895EA62 /* Pods-My MindTests */ = { - isa = PBXGroup; - children = ( - 0D81F0E7A4C32ED895084BB033F6C162 /* Info.plist */, - 8A13C466B515E92C02180E8381113E79 /* Pods-My MindTests.modulemap */, - A765202CCD7B7E9B90EFA62AF9E62AF1 /* Pods-My MindTests-acknowledgements.markdown */, - FD8F434237C82030172059D2E34236EF /* Pods-My MindTests-acknowledgements.plist */, - 85A2A3CE914E7C5EAF7DE6D83E28E4FD /* Pods-My MindTests-dummy.m */, - F765F1C3807CE75CF91697E2EC55A17C /* Pods-My MindTests-frameworks.sh */, - EDEA6E541A4D7A2C5F595B75C90E7570 /* Pods-My MindTests-resources.sh */, - 9D19F24A5FEC0247AD4F2F2ACEC04EBB /* Pods-My MindTests-umbrella.h */, - 02CB615131BB5FFE41DDCDCF3C354BF5 /* Pods-My MindTests.debug.xcconfig */, - AA1351639EFB7DD9486B7B76F95486BA /* Pods-My MindTests.release.xcconfig */, - ); - name = "Pods-My MindTests"; - path = "Target Support Files/Pods-My MindTests"; - sourceTree = ""; - }; - 68DA733E063A653450AD574154E13DD0 /* Support Files */ = { - isa = PBXGroup; - children = ( - AB480BB5E0598CDB727667AF57845732 /* Info.plist */, - 1F11020D632922EB26CA9318FE72686E /* Protobuf.modulemap */, - 3C8C5CCDB3DF06F579005F18477F7211 /* Protobuf.xcconfig */, - 517E5C5509A69EEADFDCDBB60FF850D2 /* Protobuf-dummy.m */, - 10BB46A061E205E512E333D49C665F1E /* Protobuf-prefix.pch */, - 957A616ADE9035A64BDF137BBBE4D457 /* Protobuf-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Protobuf"; - sourceTree = ""; - }; - 68EC4CF15E06CC77EAA0E624B4622F2B /* DebugUtils */ = { - isa = PBXGroup; - children = ( - 65287AE627674E28D9E32B6B580402D9 /* GTMDebugSelectorValidation.h */, - 94B831D92EFB367FD4C7F1B82F3D8873 /* GTMDebugThreadValidation.h */, - 5C5732F96D612C6CB81E3AA90382C926 /* GTMMethodCheck.h */, - ); - name = DebugUtils; - sourceTree = ""; - }; - 7A55BCF60E61B196B597BB0FFFE84191 /* Firebase */ = { - isa = PBXGroup; - children = ( - 20E79BC35BD339891479BDCF3210A3E8 /* Core */, - ); - name = Firebase; - path = Firebase; - sourceTree = ""; - }; - 7DB346D0F39D3F0E887471402A8071AB = { - isa = PBXGroup; - children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, - FF76B15D908EB633A9E056E03AAAD7E4 /* Pods */, - 0546279067FDF3C54D44CBB345727A2D /* Products */, - 1D9D3DC7748BB6D45C201E8576C530F4 /* Targets Support Files */, - ); - sourceTree = ""; - }; - 9A8B2C8B88C5126F24C8F6E42506D236 /* FirebaseStorage */ = { - isa = PBXGroup; - children = ( - AC62067A704F9D45444424AF3142B7AF /* Frameworks */, - ); - name = FirebaseStorage; - path = FirebaseStorage; - sourceTree = ""; - }; - A7C45A8F7CDCC3D821FC4FA1B5D86FBB /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9C87FE8D5CCFB21AFC63EDC6B246E743 /* FirebaseDatabase.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - A8929A0E438839EF15D37F88A9D49C13 /* NSString+URLArguments */ = { - isa = PBXGroup; - children = ( - 9017D1B659C5197C92D7904B7855E635 /* GTMNSString+URLArguments.h */, - CE13E4DC0098D7F1EB42333505C25A16 /* GTMNSString+URLArguments.m */, - ); - name = "NSString+URLArguments"; - sourceTree = ""; - }; - AC62067A704F9D45444424AF3142B7AF /* Frameworks */ = { - isa = PBXGroup; - children = ( - 8D034AFEF324E61D3597F87078B98C9F /* FirebaseStorage.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - B1C2B479A5039ED2C3FD4F130B5DD7A7 /* GTMSessionFetcher */ = { - isa = PBXGroup; - children = ( - D619FEF78B3BC85B54B43F012264B8A2 /* Core */, - 07BDCCC241764A018E128B4DB0A1761D /* Support Files */, - ); - name = GTMSessionFetcher; - path = GTMSessionFetcher; - sourceTree = ""; - }; - C226EABF5611BFDB4912E4C4954B9683 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 62AE94EA10C85AA910E42862E0EDFC0E /* FirebaseAuth.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - C2D009413325B2C88FC682959276021A /* GoogleToolboxForMac */ = { - isa = PBXGroup; - children = ( - 68EC4CF15E06CC77EAA0E624B4622F2B /* DebugUtils */, - CB760C8C0F059909A38E2223CAEAAFDA /* Defines */, - 40AA9CE69B97257EC733F07611408639 /* Logger */, - 0272D8654180D9026C40CDCA5D166E66 /* NSData+zlib */, - CB37B9B57E3AFE27EC47A8DB4559EC0E /* NSDictionary+URLArguments */, - A8929A0E438839EF15D37F88A9D49C13 /* NSString+URLArguments */, - 367864507DA250138E27472E564B80AA /* Support Files */, - ); - name = GoogleToolboxForMac; - path = GoogleToolboxForMac; - sourceTree = ""; - }; - CB37B9B57E3AFE27EC47A8DB4559EC0E /* NSDictionary+URLArguments */ = { - isa = PBXGroup; - children = ( - EBB073E16FDED750D19A5F5275CD9F78 /* GTMNSDictionary+URLArguments.h */, - 2CE850B1D1E84D88005926957532A43D /* GTMNSDictionary+URLArguments.m */, - ); - name = "NSDictionary+URLArguments"; - sourceTree = ""; - }; - CB760C8C0F059909A38E2223CAEAAFDA /* Defines */ = { - isa = PBXGroup; - children = ( - ADDE781DF4F0C92212899862D4780542 /* GTMDefines.h */, - ); - name = Defines; - sourceTree = ""; - }; - CBF08275F36D32C77F913E07C6DBA3C2 /* FirebaseCore */ = { - isa = PBXGroup; - children = ( - 4E416A37748B5D436D5DE3D0B1883E0D /* Frameworks */, - ); - name = FirebaseCore; - path = FirebaseCore; - sourceTree = ""; - }; - D619FEF78B3BC85B54B43F012264B8A2 /* Core */ = { - isa = PBXGroup; - children = ( - DEA980D9F7AA93FA83D103418881DF52 /* GTMSessionFetcher.h */, - 8A53F4959335798A36393362EA972753 /* GTMSessionFetcher.m */, - C034DF8AD2B97A433EDF47F4DED7D41F /* GTMSessionFetcherLogging.h */, - 005BAD149CAE0411E771B3DC9253AAFD /* GTMSessionFetcherLogging.m */, - 9039FAA24EE3E8E9C5FB57B8054F3734 /* GTMSessionFetcherService.h */, - 426B9B3BBAA2EAB204AB3EACEDBE5A51 /* GTMSessionFetcherService.m */, - 6F95B0490F19FD95E1ED6F6843FBF7FA /* GTMSessionUploadFetcher.h */, - C730FCBDBB6BA86D1859C133EBA68542 /* GTMSessionUploadFetcher.m */, - ); - name = Core; - sourceTree = ""; - }; - D99CE50A677E056DD25A050F2B7F4715 /* FirebaseInstanceID */ = { - isa = PBXGroup; - children = ( - E3CB1B26C474B26424A1FB1B047049D2 /* Frameworks */, - ); - name = FirebaseInstanceID; - path = FirebaseInstanceID; - sourceTree = ""; - }; - E159ABA475E1FBA6357B5A4AD76FDBD4 /* FirebaseAnalytics */ = { - isa = PBXGroup; - children = ( - 19FA46D2621A5B4F807D59EACC67097A /* Frameworks */, - ); - name = FirebaseAnalytics; - path = FirebaseAnalytics; - sourceTree = ""; - }; - E3CB1B26C474B26424A1FB1B047049D2 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6167942B002D190FC160FDD116E92C94 /* FirebaseInstanceID.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - F960C3F68713188A50E6F076F9855D82 /* SwiftForms */ = { - isa = PBXGroup; - children = ( - 337D5E2875C54B8AD638F9BC8F002CC2 /* FormBaseCell.swift */, - 35691A9D94872BA7B7814B3A80CB888A /* FormButtonCell.swift */, - C5B52C6BC0AA2E3EBB029EF5CF1BD3F2 /* FormCheckCell.swift */, - E35D4F5F0061B56A462CEAB0B2088E5F /* FormDateCell.swift */, - 6CA9CD616B60BD84EA4C4384844B1E9E /* FormDescriptor.swift */, - 07EB28E4E2CF18D02EBC0050E6CC7BFC /* FormErrorType.swift */, - DE62E5901037C18EA5E51A24F82D9FD0 /* FormLabelCell.swift */, - 6A5646D89B0F6684909F53350FFD18ED /* FormOptionsViewController.swift */, - 6B6E296E79BCA827779D8E6F9CB3F190 /* FormPickerCell.swift */, - 97E0580A792F4FA44146B965852D4EF3 /* FormRowDescriptor.swift */, - 3FFD418427CA791B38CC1D2DD8BCE17B /* FormSectionDescriptor.swift */, - EBF2398C06DB4EB302148F5017FB0A70 /* FormSegmentedControlCell.swift */, - DDBC4996299464B6583A468025D9F0A3 /* FormSelector.swift */, - CDAB8E1ED5494ECDB56C6CE4C73B67BE /* FormSelectorCell.swift */, - BF709BD37EA76BF34B0EDE49ECD9C757 /* FormSliderCell.swift */, - 58832B6B32C9F4F4E995FCE6A9A44199 /* FormStepperCell.swift */, - 4E54868CDD6882CF3E40477C97763420 /* FormSwitchCell.swift */, - FFAFB8529547831A0719762DC59A9AEE /* FormTextFieldCell.swift */, - 20CB50194F8E483D62C6A0505D658652 /* FormTextViewCell.swift */, - 59BCC27E1487C8247740ECE881CFB15F /* FormTitleCell.swift */, - 94408DF648FFAC91131160EC1C22D13E /* FormValueCell.swift */, - 4DF343C2B737A372FC6C4EA95BC52524 /* FormViewController.swift */, - 30D5DAFDE791F437C2D90FFA074CDEC7 /* Support Files */, - ); - name = SwiftForms; - path = SwiftForms; - sourceTree = ""; - }; - FF76B15D908EB633A9E056E03AAAD7E4 /* Pods */ = { - isa = PBXGroup; - children = ( - 7A55BCF60E61B196B597BB0FFFE84191 /* Firebase */, - E159ABA475E1FBA6357B5A4AD76FDBD4 /* FirebaseAnalytics */, - 3CADC4CBBF61A8CFC74F3A7BDC43DEEA /* FirebaseAuth */, - CBF08275F36D32C77F913E07C6DBA3C2 /* FirebaseCore */, - 5394A34E7604E6A62472B73BD2BC6BE2 /* FirebaseDatabase */, - D99CE50A677E056DD25A050F2B7F4715 /* FirebaseInstanceID */, - 157420020924301428AAA3D7094318BD /* FirebaseMessaging */, - 9A8B2C8B88C5126F24C8F6E42506D236 /* FirebaseStorage */, - C2D009413325B2C88FC682959276021A /* GoogleToolboxForMac */, - B1C2B479A5039ED2C3FD4F130B5DD7A7 /* GTMSessionFetcher */, - 44C3AA6F8019D02399B364802C32CC11 /* Protobuf */, - F960C3F68713188A50E6F076F9855D82 /* SwiftForms */, - ); - name = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 0D42D9F6A7D6EB6180387963E4BE5AC2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 8343EDC7E0E2097F5E25AA7A5FB6275F /* Any.pbobjc.h in Headers */, - 452482E44B35E05FD248153C353066F3 /* Api.pbobjc.h in Headers */, - 1B77ADED7B7A6A54011BC77FF76F9E98 /* Duration.pbobjc.h in Headers */, - C72E2C4FE0D21CE24155FA1612EFE106 /* Empty.pbobjc.h in Headers */, - E2E0DC26309DE355A035495DB16D8450 /* FieldMask.pbobjc.h in Headers */, - 24329FD2053EE3EE0EC2ECAE89C9597D /* GPBArray.h in Headers */, - 4F795EC25A85562970A8C42C11C0F8AA /* GPBArray_PackagePrivate.h in Headers */, - F4758C648436AC342AFC2FC68A95F5A3 /* GPBBootstrap.h in Headers */, - 5EB357A6493DEABE284528662FDA1A6C /* GPBCodedInputStream.h in Headers */, - 85912A61D7210D831ED2652675DF0277 /* GPBCodedInputStream_PackagePrivate.h in Headers */, - 22F51351267C7926B8472A4739C6149D /* GPBCodedOutputStream.h in Headers */, - 449E803000B4220314D4D1A3A67DAE4D /* GPBCodedOutputStream_PackagePrivate.h in Headers */, - 2BC775181E25F1413776E28F04DC3590 /* GPBDescriptor.h in Headers */, - B9CC3979A606561436D0E604E6CE4B62 /* GPBDescriptor_PackagePrivate.h in Headers */, - 2833FE87F16C48BFC6132CF836DF1BB2 /* GPBDictionary.h in Headers */, - B0A91DC4564DD78611E285961F1174AE /* GPBDictionary_PackagePrivate.h in Headers */, - BAB44B1228628294D16B9D539BAB2666 /* GPBExtensionInternals.h in Headers */, - FACCDD3CF8D2C35497AE3133F74BF876 /* GPBExtensionRegistry.h in Headers */, - A67838AA449C3E6C781748A647354B17 /* GPBMessage.h in Headers */, - 909988F417CA29D6D16DE4BA04E3B123 /* GPBMessage_PackagePrivate.h in Headers */, - FCB20594FDEFB18A9D35D7BB6446E988 /* GPBProtocolBuffers.h in Headers */, - 07E80CCB28C6CA73FD888ACF5D35B426 /* GPBProtocolBuffers_RuntimeSupport.h in Headers */, - 2A586CA94B95C18F187B9481CC5D174E /* GPBRootObject.h in Headers */, - DB015C54E1F435B71BFE9859B7B18EB6 /* GPBRootObject_PackagePrivate.h in Headers */, - 8C2C401C9AE2EB087A23D4228E0FE7FE /* GPBRuntimeTypes.h in Headers */, - 9D466587AEC6C333B9E68B409B355875 /* GPBUnknownField.h in Headers */, - D0736F05B73E9CDBB7A94C3FBCA186A7 /* GPBUnknownField_PackagePrivate.h in Headers */, - D9F9F341B264BFD77391BF58255C8BCB /* GPBUnknownFieldSet.h in Headers */, - 45D9D52BB37F2C0174098BC95FC29C6D /* GPBUnknownFieldSet_PackagePrivate.h in Headers */, - 9B83C8182A7F17A6A58744C0F93E74CC /* GPBUtilities.h in Headers */, - E5DD1F2EAD52D4CACF51AC8B08CA981D /* GPBUtilities_PackagePrivate.h in Headers */, - BD1020BE67E74D585B45C9289E077E85 /* GPBWellKnownTypes.h in Headers */, - D36924036FE75CF805379F026B251DDF /* GPBWireFormat.h in Headers */, - 18B41774E2C9E5799868DBB824C4856B /* Protobuf-umbrella.h in Headers */, - 9A9948856F1EBE526C5D836F48FEB8C4 /* SourceContext.pbobjc.h in Headers */, - 37A24FEA7C76DB020654328D24D47CB5 /* Struct.pbobjc.h in Headers */, - 5E17F9B86A026A94C88328D1080E1A28 /* Timestamp.pbobjc.h in Headers */, - 8BEF072C63E1E2DA57DAD9AA8357B70E /* Type.pbobjc.h in Headers */, - B6DE1227D16285629B230B51266931E3 /* Wrappers.pbobjc.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 69B4F1C6028C863F9AC90733D9E1B8BA /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 9D710BD2CF8ED7E278EB1378FEF49019 /* Pods-My MindTests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6CF44649CFC440DBDBACECD1B25F5893 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - AEA58521F46996DE24D08B9115B31CD4 /* SwiftForms-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7C9A2748345D25082BA10BC98B8D5807 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - EB8CE90003139D73977562D1129F077D /* GoogleToolboxForMac-umbrella.h in Headers */, - F48CF3B9FE8C456125D9BE1882F7B73D /* GTMDebugSelectorValidation.h in Headers */, - EC1707751A2DBCB466E29764EC7ECB86 /* GTMDebugThreadValidation.h in Headers */, - BD41E55F7E05E5AAD8E177BB3B78A74D /* GTMDefines.h in Headers */, - BBC4FE778C649CF03B8655DE21181103 /* GTMLogger.h in Headers */, - 63F4579804EEF3DECBD27D579D4FA196 /* GTMMethodCheck.h in Headers */, - C501E17E9E8501752B99011E17E41412 /* GTMNSData+zlib.h in Headers */, - 162F73650877177FAB96CC08BE515C97 /* GTMNSDictionary+URLArguments.h in Headers */, - 43EB5608A304AAA6D221B2E5CC0ED6B0 /* GTMNSString+URLArguments.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 82D993B88C10479096F17ADDEAB85D94 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D3F381B45ADFDDE51CA31F1E141236CA /* GTMSessionFetcher-umbrella.h in Headers */, - 8852FD9AFC242520924D98BE9C4E2477 /* GTMSessionFetcher.h in Headers */, - 1ED67707C258751E7888DAC2AB3D8501 /* GTMSessionFetcherLogging.h in Headers */, - DF9559C3822E3C6119BE43E4EDFD7EEE /* GTMSessionFetcherService.h in Headers */, - F09EDD53B94234F5F8DAC4DCD5CD969E /* GTMSessionUploadFetcher.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FC6B2D2A4C507C8A3C6FB50B9DD683A1 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 63DF1FA22091F25F62D34EEDAB419748 /* Pods-My MindUITests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FCFB249485112547A021A3712DFD1F2D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - EBAC9656980BA078FE5E3B484EBE61BD /* Pods-My Mind-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 06EB296E5A1491B6411C791FCCA1A282 /* Protobuf */ = { - isa = PBXNativeTarget; - buildConfigurationList = 3E08D3D474F3305B26415532384A6B21 /* Build configuration list for PBXNativeTarget "Protobuf" */; - buildPhases = ( - 347DA26DC57347AED4EDDC2CF240E2F1 /* Sources */, - DC55B2115E2CB545BC6BE29379EDEB0B /* Frameworks */, - 0D42D9F6A7D6EB6180387963E4BE5AC2 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Protobuf; - productName = Protobuf; - productReference = 8FE0835AA52B19319E70D5AE2F75779F /* Protobuf.framework */; - productType = "com.apple.product-type.framework"; - }; - 262578C358775A1141D26D937F1D31E7 /* Pods-My MindUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 853BF69F1ABD596A3BB19E85D0AEAB38 /* Build configuration list for PBXNativeTarget "Pods-My MindUITests" */; - buildPhases = ( - 98B14CCAA6DCF4EB5D7581949B3957A2 /* Sources */, - 9B4B1BF9BF771B95FCB1431B06BE998B /* Frameworks */, - FC6B2D2A4C507C8A3C6FB50B9DD683A1 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Pods-My MindUITests"; - productName = "Pods-My MindUITests"; - productReference = D142DB90C8AB3F88BACE17C0E8F41468 /* Pods_My_MindUITests.framework */; - productType = "com.apple.product-type.framework"; - }; - 6D5CEDECD3D8DC52EA507E0431BDA8A0 /* GoogleToolboxForMac */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6CA44BD43AA2613869A5BA2839D015BC /* Build configuration list for PBXNativeTarget "GoogleToolboxForMac" */; - buildPhases = ( - 71B2CD65CBC5F51408BC5B1C1889A5F9 /* Sources */, - 056EBB96213E97E100463CD18FF9683F /* Frameworks */, - 7C9A2748345D25082BA10BC98B8D5807 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = GoogleToolboxForMac; - productName = GoogleToolboxForMac; - productReference = 2AFE69BD6ABDB3ED20C7D2AAE67E633A /* GoogleToolboxForMac.framework */; - productType = "com.apple.product-type.framework"; - }; - 8A0B67E54F614415099331CDD9845641 /* Pods-My MindTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 0AACD86C8CCA66B1C08F0B4A436123FE /* Build configuration list for PBXNativeTarget "Pods-My MindTests" */; - buildPhases = ( - ACD98B463808F38711D2B98A8A14540E /* Sources */, - CD316CD7B593ACBFB5E8D70B971972C8 /* Frameworks */, - 69B4F1C6028C863F9AC90733D9E1B8BA /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Pods-My MindTests"; - productName = "Pods-My MindTests"; - productReference = F00E487CB0595324CFEC002BDC1761D2 /* Pods_My_MindTests.framework */; - productType = "com.apple.product-type.framework"; - }; - ACCDC978E904EBF40DAB4A3152DD4181 /* Pods-My Mind */ = { - isa = PBXNativeTarget; - buildConfigurationList = B9D4F373224E7F8555CDF4E83F907F31 /* Build configuration list for PBXNativeTarget "Pods-My Mind" */; - buildPhases = ( - F59F2F42C418DD7C95938860C7DAF31A /* Sources */, - 7A0D89FE48DF8F315F45325F323293D4 /* Frameworks */, - FCFB249485112547A021A3712DFD1F2D /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - FA36EC09F8236D2A8BAACAE11D421886 /* PBXTargetDependency */, - 6C0D2E61EB8A74536594236A76EF3366 /* PBXTargetDependency */, - 1A3E6CF173FEEC31D463B09D6704E042 /* PBXTargetDependency */, - 26968F1117896E2129217B48083731F3 /* PBXTargetDependency */, - ); - name = "Pods-My Mind"; - productName = "Pods-My Mind"; - productReference = F77BB25E2D57E7B88812835EDFC5F8E3 /* Pods_My_Mind.framework */; - productType = "com.apple.product-type.framework"; - }; - C052BEBFBD0AB5218CC64BA3450F6547 /* GTMSessionFetcher */ = { - isa = PBXNativeTarget; - buildConfigurationList = D7CC8559AB6F51830204F1A9CE54BF3E /* Build configuration list for PBXNativeTarget "GTMSessionFetcher" */; - buildPhases = ( - C5A309EC5A80A27DBD420C5176E2122A /* Sources */, - 6AE88E96161DE195EAAF0A3B6375EA50 /* Frameworks */, - 82D993B88C10479096F17ADDEAB85D94 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = GTMSessionFetcher; - productName = GTMSessionFetcher; - productReference = 0EC5918C14DEB9EA9039B260AE8F579E /* GTMSessionFetcher.framework */; - productType = "com.apple.product-type.framework"; - }; - EAFF5D80C49B29577469EFFBB16812E7 /* SwiftForms */ = { - isa = PBXNativeTarget; - buildConfigurationList = F7161A4CD92B5F93C0993930CC3A851C /* Build configuration list for PBXNativeTarget "SwiftForms" */; - buildPhases = ( - 69497B537AE764A02063CD1B56B6515A /* Sources */, - 275E83AA79278AB82E4640FED0C4F091 /* Frameworks */, - 6CF44649CFC440DBDBACECD1B25F5893 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SwiftForms; - productName = SwiftForms; - productReference = AFDD6C1F3CD55B82661B2460742CB904 /* SwiftForms.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0700; - }; - buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 0546279067FDF3C54D44CBB345727A2D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 6D5CEDECD3D8DC52EA507E0431BDA8A0 /* GoogleToolboxForMac */, - C052BEBFBD0AB5218CC64BA3450F6547 /* GTMSessionFetcher */, - ACCDC978E904EBF40DAB4A3152DD4181 /* Pods-My Mind */, - 8A0B67E54F614415099331CDD9845641 /* Pods-My MindTests */, - 262578C358775A1141D26D937F1D31E7 /* Pods-My MindUITests */, - 06EB296E5A1491B6411C791FCCA1A282 /* Protobuf */, - EAFF5D80C49B29577469EFFBB16812E7 /* SwiftForms */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 347DA26DC57347AED4EDDC2CF240E2F1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - EF3B6008967688EC8BC1466FA6740953 /* Any.pbobjc.m in Sources */, - 29A9BB6473C5C8FDD73427DC7A2BFB5C /* Api.pbobjc.m in Sources */, - 16987BC32186EC5D8AE0B0DA8B068430 /* Duration.pbobjc.m in Sources */, - 127044639D8198CD69AA8B414E6DE564 /* Empty.pbobjc.m in Sources */, - B77AB77623869E7F457790F3D62C26FE /* FieldMask.pbobjc.m in Sources */, - 54139F61C07D1656D372A590F2E18E74 /* GPBArray.m in Sources */, - 9977EAFB893236122E737DBE820394E0 /* GPBCodedInputStream.m in Sources */, - 2546A1AE4183A88685A1C54208B82A79 /* GPBCodedOutputStream.m in Sources */, - 1F685A430D9C24F582CD73A208405E26 /* GPBDescriptor.m in Sources */, - 6805395A1D32670B1BB8E6E09E696677 /* GPBDictionary.m in Sources */, - A61A0EC9BAE71B5B3698A24CF05ACE9C /* GPBExtensionInternals.m in Sources */, - 73FE4B075D8E56128FDF3562EF177B9D /* GPBExtensionRegistry.m in Sources */, - 1C4D75FD322514819D8FF93D1B942862 /* GPBMessage.m in Sources */, - 3914C6DB6E1BDA33C918104EB1109886 /* GPBRootObject.m in Sources */, - AE7DE7E9F8186E3A88D518209F47C1ED /* GPBUnknownField.m in Sources */, - 17E07E319528F0BC1B90B049FFE2B53A /* GPBUnknownFieldSet.m in Sources */, - 28BD093555CFAA03649E76065D5B9D3B /* GPBUtilities.m in Sources */, - 1913A2D4854E0D82944EDF30BD3C2DF9 /* GPBWellKnownTypes.m in Sources */, - 82AD4DB81189A3DD75165F4BBAD64E8F /* GPBWireFormat.m in Sources */, - B387AF56FC1F701E911D00DA5DAD2AA4 /* Protobuf-dummy.m in Sources */, - 117BFDA80E461941AAF9289A7E47C17F /* SourceContext.pbobjc.m in Sources */, - 20CD6F106E739536D0FCD667CEDD9B0B /* Struct.pbobjc.m in Sources */, - CD8FF769F8DE4EBE487A4ADC1E15FA83 /* Timestamp.pbobjc.m in Sources */, - 2178346ECC466510267E573D2DA05A48 /* Type.pbobjc.m in Sources */, - 8F173B7B4B5424A1E876BA153F249129 /* Wrappers.pbobjc.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 69497B537AE764A02063CD1B56B6515A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55F3FD22C344E98947BCA48709713932 /* FormBaseCell.swift in Sources */, - 524BCEB3F5EE3380AB7BA7A97A4EF035 /* FormButtonCell.swift in Sources */, - A8EFFDC0F8CBEACF970A216AC9E3EDA8 /* FormCheckCell.swift in Sources */, - 6CF3CD3129A4F11018A4CF2335052CD7 /* FormDateCell.swift in Sources */, - EA86CC9D91FA3B64A0A084D6BA5987BB /* FormDescriptor.swift in Sources */, - AA45171138227C6A79316B9158FE9954 /* FormErrorType.swift in Sources */, - DA245445596DF7A504F600AC4F311794 /* FormLabelCell.swift in Sources */, - 3120B4E85E62A846C111E21226FA68FD /* FormOptionsViewController.swift in Sources */, - 024D45EAD952BCB4444DD36B90D151F6 /* FormPickerCell.swift in Sources */, - BA6363283865360A58C82FEFE6DC9C8D /* FormRowDescriptor.swift in Sources */, - 88413A480AC0E338B86B6AA023D18935 /* FormSectionDescriptor.swift in Sources */, - 109EDFD5B317DF6CE8F3B039415BE063 /* FormSegmentedControlCell.swift in Sources */, - 7D4F8984070F3C74509301DE40A85BEF /* FormSelector.swift in Sources */, - FEFB6CBB75CD9B988BF859DABD5BEE70 /* FormSelectorCell.swift in Sources */, - 182114F9BD021BF9B90D1064F1EE8078 /* FormSliderCell.swift in Sources */, - B96A5E7A8BE90E4EEC25D79771ED87BC /* FormStepperCell.swift in Sources */, - 94ACCEE43F78400D1378A3391EB2D194 /* FormSwitchCell.swift in Sources */, - 9C3865AD7A6CAB9956D08730AE09B5FA /* FormTextFieldCell.swift in Sources */, - A94ECF904E7BB0BC7752F33C361FE9DF /* FormTextViewCell.swift in Sources */, - 53C0512A3A52D84FC704382ADE329E0E /* FormTitleCell.swift in Sources */, - 60670C90F356798288DC25E1D7C5160F /* FormValueCell.swift in Sources */, - 54D9834BE1C2821DB78DB4886512F504 /* FormViewController.swift in Sources */, - 51CE9C78977C3DE2C3C53010BB64A195 /* SwiftForms-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 71B2CD65CBC5F51408BC5B1C1889A5F9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D0204CCB31003F4F2FE7C94932213C6B /* GoogleToolboxForMac-dummy.m in Sources */, - 8B9241E640FE9CF729F2198266F28213 /* GTMLogger.m in Sources */, - 6B4F19D8BD01EAF45CA1FE09294B7E12 /* GTMNSData+zlib.m in Sources */, - 450E5A090328E7D1BD167496E80DFA1F /* GTMNSDictionary+URLArguments.m in Sources */, - EE3D7A9094F92C691B7CBA93868152B5 /* GTMNSString+URLArguments.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 98B14CCAA6DCF4EB5D7581949B3957A2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C3A893928F13C441E7AE86306969D3F0 /* Pods-My MindUITests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - ACD98B463808F38711D2B98A8A14540E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CF226DE9D4FB36ED1233385179E28ADC /* Pods-My MindTests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C5A309EC5A80A27DBD420C5176E2122A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EA6DFC4473A9B2DB6B8A42EA986BA5B /* GTMSessionFetcher-dummy.m in Sources */, - 64F31B70A6E5E6963518A01C285B435F /* GTMSessionFetcher.m in Sources */, - 07340F15BACBA601736DBB2ABF1ABC35 /* GTMSessionFetcherLogging.m in Sources */, - 95C69447F517DB81437EDE0003486963 /* GTMSessionFetcherService.m in Sources */, - F4E294C07EE32FFCDCF7FF4D71D850BD /* GTMSessionUploadFetcher.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F59F2F42C418DD7C95938860C7DAF31A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 381D829FC541F27B54A385DB76D5CD80 /* Pods-My Mind-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1A3E6CF173FEEC31D463B09D6704E042 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Protobuf; - target = 06EB296E5A1491B6411C791FCCA1A282 /* Protobuf */; - targetProxy = 30BE0DCE99E2A9C66DAA50243300221D /* PBXContainerItemProxy */; - }; - 26968F1117896E2129217B48083731F3 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = SwiftForms; - target = EAFF5D80C49B29577469EFFBB16812E7 /* SwiftForms */; - targetProxy = 3413B4C2ADBBB826B6E2D9E2CCC6025F /* PBXContainerItemProxy */; - }; - 6C0D2E61EB8A74536594236A76EF3366 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = GoogleToolboxForMac; - target = 6D5CEDECD3D8DC52EA507E0431BDA8A0 /* GoogleToolboxForMac */; - targetProxy = 6CBCF5E1D40C7CC7F5D9B3746224378B /* PBXContainerItemProxy */; - }; - FA36EC09F8236D2A8BAACAE11D421886 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = GTMSessionFetcher; - target = C052BEBFBD0AB5218CC64BA3450F6547 /* GTMSessionFetcher */; - targetProxy = 46181036AB851BF0F83D74CCCB1182E7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 0D0EA3CC529C6594BB5F7E3B7BB78C95 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = AA1351639EFB7DD9486B7B76F95486BA /* Pods-My MindTests.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-My MindTests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-My MindTests/Pods-My MindTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_My_MindTests; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 163D87BE96A63549B0EACF1CC31A2E90 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - 173EB991F4189BD0521FB9FF314C1A99 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 49EAFA2594E73D80DFA0B1CF04272B60 /* GTMSessionFetcher.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/GTMSessionFetcher/GTMSessionFetcher-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/GTMSessionFetcher/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/GTMSessionFetcher/GTMSessionFetcher.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = GTMSessionFetcher; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 3117358C5FCDB39BB33210CAC1EB2AF0 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 762788A700315098915980CD7F65EAE8 /* Pods-My Mind.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-My Mind/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-My Mind/Pods-My Mind.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_My_Mind; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 55D4564B6FDDE684437CBD8B0D07230D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3C8C5CCDB3DF06F579005F18477F7211 /* Protobuf.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Protobuf/Protobuf-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Protobuf/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Protobuf/Protobuf.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Protobuf; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 599D6C0671BDC29AE3D47E58A2A0B116 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B4FFEC78B75AF8EF05F58D59F8C60066 /* GoogleToolboxForMac.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/GoogleToolboxForMac/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = GoogleToolboxForMac; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 5EC9DDC590E000FC3BF93D2E1B5E2AFB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 49EAFA2594E73D80DFA0B1CF04272B60 /* GTMSessionFetcher.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/GTMSessionFetcher/GTMSessionFetcher-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/GTMSessionFetcher/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/GTMSessionFetcher/GTMSessionFetcher.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = GTMSessionFetcher; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 69550E5EEF90D0A831C06E7CDD5D6DCB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7FF37CA4ECE126E2CEBBA2985AA0DC79 /* Pods-My Mind.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-My Mind/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-My Mind/Pods-My Mind.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_My_Mind; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 707B86CFB21B645E37109F39754D4051 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 78100933D71DEDD55C672526AC7B5D86 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7541EC1252B9F9FB3C2E4F699687631F /* SwiftForms.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/SwiftForms/SwiftForms-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftForms/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/SwiftForms/SwiftForms.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = SwiftForms; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 803DFA8931A6ABBCF4F1E55665A8BD37 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B4FFEC78B75AF8EF05F58D59F8C60066 /* GoogleToolboxForMac.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/GoogleToolboxForMac/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/GoogleToolboxForMac/GoogleToolboxForMac.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = GoogleToolboxForMac; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 9A87871355CF6CB0934E57CA90226101 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 02CB615131BB5FFE41DDCDCF3C354BF5 /* Pods-My MindTests.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-My MindTests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-My MindTests/Pods-My MindTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_My_MindTests; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A798B98E0AA66D47698A2888224C1317 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3C8C5CCDB3DF06F579005F18477F7211 /* Protobuf.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Protobuf/Protobuf-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Protobuf/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Protobuf/Protobuf.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Protobuf; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - B35D6A676B08E6C6F5F556ED067D4142 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7541EC1252B9F9FB3C2E4F699687631F /* SwiftForms.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/SwiftForms/SwiftForms-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftForms/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/SwiftForms/SwiftForms.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = SwiftForms; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - CACF2FD9CA6C6EE5987FB6BE224E9E03 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7FB3BE45C579118C88B5D150C4A59AA6 /* Pods-My MindUITests.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-My MindUITests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-My MindUITests/Pods-My MindUITests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_My_MindUITests; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - DF91123F3C132734D6CB61E37FC3A45A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C65F9211134A42FDDAC44302A6128140 /* Pods-My MindUITests.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-My MindUITests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-My MindUITests/Pods-My MindUITests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_My_MindUITests; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 0AACD86C8CCA66B1C08F0B4A436123FE /* Build configuration list for PBXNativeTarget "Pods-My MindTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9A87871355CF6CB0934E57CA90226101 /* Debug */, - 0D0EA3CC529C6594BB5F7E3B7BB78C95 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 163D87BE96A63549B0EACF1CC31A2E90 /* Debug */, - 707B86CFB21B645E37109F39754D4051 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 3E08D3D474F3305B26415532384A6B21 /* Build configuration list for PBXNativeTarget "Protobuf" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A798B98E0AA66D47698A2888224C1317 /* Debug */, - 55D4564B6FDDE684437CBD8B0D07230D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6CA44BD43AA2613869A5BA2839D015BC /* Build configuration list for PBXNativeTarget "GoogleToolboxForMac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 803DFA8931A6ABBCF4F1E55665A8BD37 /* Debug */, - 599D6C0671BDC29AE3D47E58A2A0B116 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 853BF69F1ABD596A3BB19E85D0AEAB38 /* Build configuration list for PBXNativeTarget "Pods-My MindUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CACF2FD9CA6C6EE5987FB6BE224E9E03 /* Debug */, - DF91123F3C132734D6CB61E37FC3A45A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B9D4F373224E7F8555CDF4E83F907F31 /* Build configuration list for PBXNativeTarget "Pods-My Mind" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 3117358C5FCDB39BB33210CAC1EB2AF0 /* Debug */, - 69550E5EEF90D0A831C06E7CDD5D6DCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D7CC8559AB6F51830204F1A9CE54BF3E /* Build configuration list for PBXNativeTarget "GTMSessionFetcher" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 173EB991F4189BD0521FB9FF314C1A99 /* Debug */, - 5EC9DDC590E000FC3BF93D2E1B5E2AFB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - F7161A4CD92B5F93C0993930CC3A851C /* Build configuration list for PBXNativeTarget "SwiftForms" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B35D6A676B08E6C6F5F556ED067D4142 /* Debug */, - 78100933D71DEDD55C672526AC7B5D86 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; -} diff --git a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/GTMSessionFetcher.xcscheme b/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/GTMSessionFetcher.xcscheme deleted file mode 100755 index d2f461c..0000000 --- a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/GTMSessionFetcher.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/GoogleToolboxForMac.xcscheme b/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/GoogleToolboxForMac.xcscheme deleted file mode 100755 index 1d88b15..0000000 --- a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/GoogleToolboxForMac.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My Mind.xcscheme b/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My Mind.xcscheme deleted file mode 100755 index ee6ae8a..0000000 --- a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My Mind.xcscheme +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My MindTests.xcscheme b/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My MindTests.xcscheme deleted file mode 100755 index 49f70d1..0000000 --- a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My MindTests.xcscheme +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My MindUITests.xcscheme b/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My MindUITests.xcscheme deleted file mode 100755 index 0c10d12..0000000 --- a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Pods-My MindUITests.xcscheme +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Protobuf.xcscheme b/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Protobuf.xcscheme deleted file mode 100755 index ba8487e..0000000 --- a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/Protobuf.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/SwiftForms.xcscheme b/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/SwiftForms.xcscheme deleted file mode 100755 index 920c5d0..0000000 --- a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/SwiftForms.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/xcschememanagement.plist b/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100755 index 68f21f2..0000000 --- a/Old My Mind/Pods/Pods.xcodeproj/xcuserdata/alexanderdavis.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,82 +0,0 @@ - - - - - SchemeUserState - - GTMSessionFetcher.xcscheme - - isShown - - - GoogleToolboxForMac.xcscheme - - isShown - - - Pods-My Mind.xcscheme - - isShown - - - Pods-My MindTests.xcscheme - - isShown - - - Pods-My MindUITests.xcscheme - - isShown - - - Protobuf.xcscheme - - isShown - - - SwiftForms.xcscheme - - isShown - - - - SuppressBuildableAutocreation - - 06EB296E5A1491B6411C791FCCA1A282 - - primary - - - 262578C358775A1141D26D937F1D31E7 - - primary - - - 6D5CEDECD3D8DC52EA507E0431BDA8A0 - - primary - - - 8A0B67E54F614415099331CDD9845641 - - primary - - - ACCDC978E904EBF40DAB4A3152DD4181 - - primary - - - C052BEBFBD0AB5218CC64BA3450F6547 - - primary - - - EAFF5D80C49B29577469EFFBB16812E7 - - primary - - - - - diff --git a/Old My Mind/Pods/Protobuf/LICENSE b/Old My Mind/Pods/Protobuf/LICENSE deleted file mode 100755 index f028c82..0000000 --- a/Old My Mind/Pods/Protobuf/LICENSE +++ /dev/null @@ -1,42 +0,0 @@ -This license applies to all parts of Protocol Buffers except the following: - - - Atomicops support for generic gcc, located in - src/google/protobuf/stubs/atomicops_internals_generic_gcc.h. - This file is copyrighted by Red Hat Inc. - - - Atomicops support for AIX/POWER, located in - src/google/protobuf/stubs/atomicops_internals_power.h. - This file is copyrighted by Bloomberg Finance LP. - -Copyright 2014, Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. diff --git a/Old My Mind/Pods/Protobuf/README.md b/Old My Mind/Pods/Protobuf/README.md deleted file mode 100755 index 2c1bce1..0000000 --- a/Old My Mind/Pods/Protobuf/README.md +++ /dev/null @@ -1,77 +0,0 @@ -Protocol Buffers - Google's data interchange format -=================================================== - -[![Build Status](https://travis-ci.org/google/protobuf.svg?branch=master)](https://travis-ci.org/google/protobuf) [![Build status](https://ci.appveyor.com/api/projects/status/73ctee6ua4w2ruin?svg=true)](https://ci.appveyor.com/project/protobuf/protobuf) [![Build Status](https://grpc-testing.appspot.com/buildStatus/icon?job=protobuf_branch)](https://grpc-testing.appspot.com/job/protobuf_branch) [![Build Status](https://grpc-testing.appspot.com/job/protobuf_branch_32/badge/icon)](https://grpc-testing.appspot.com/job/protobuf_branch_32) [![Build Status](http://ci.bazel.io/buildStatus/icon?job=protobuf)](http://ci.bazel.io/job/protobuf/) - -Copyright 2008 Google Inc. - -https://developers.google.com/protocol-buffers/ - -Overview --------- - -Protocol Buffers (a.k.a., protobuf) are Google's language-neutral, -platform-neutral, extensible mechanism for serializing structured data. You -can find [protobuf's documentation on the Google Developers site](https://developers.google.com/protocol-buffers/). - -This README file contains protobuf installation instructions. To install -protobuf, you need to install the protocol compiler (used to compile .proto -files) and the protobuf runtime for your chosen programming language. - -Protocol Compiler Installation ------------------------------- - -The protocol compiler is written in C++. If you are using C++, please follow -the [C++ Installation Instructions](src/README.md) to install protoc along -with the C++ runtime. - -For non-C++ users, the simplest way to install the protocol compiler is to -download a pre-built binary from our release page: - - [https://github.com/google/protobuf/releases](https://github.com/google/protobuf/releases) - -In the downloads section of each release, you can find pre-built binaries in -zip packages: protoc-$VERSION-$PLATFORM.zip. It contains the protoc binary -as well as a set of standard .proto files distributed along with protobuf. - -If you are looking for an old version that is not available in the release -page, check out the maven repo here: - - [http://repo1.maven.org/maven2/com/google/protobuf/protoc/](http://repo1.maven.org/maven2/com/google/protobuf/protoc/) - -These pre-built binaries are only provided for released versions. If you want -to use the github master version at HEAD, or you need to modify protobuf code, -or you are using C++, it's recommended to build your own protoc binary from -source. - -If you would like to build protoc binary from source, see the [C++ Installation -Instructions](src/README.md). - -Protobuf Runtime Installation ------------------------------ - -Protobuf supports several different programming languages. For each programming -language, you can find instructions in the corresponding source directory about -how to install protobuf runtime for that specific language: - -| Language | Source | -|--------------------------------------|-------------------------------------------------------| -| C++ (include C++ runtime and protoc) | [src](src) | -| Java | [java](java) | -| Python | [python](python) | -| Objective-C | [objectivec](objectivec) | -| C# | [csharp](csharp) | -| JavaNano | [javanano](javanano) | -| JavaScript | [js](js) | -| Ruby | [ruby](ruby) | -| Go | [golang/protobuf](https://github.com/golang/protobuf) | -| PHP | [php](php) | - - -Usage ------ - -The complete documentation for Protocol Buffers is available via the -web at: - - https://developers.google.com/protocol-buffers/ diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBArray.h b/Old My Mind/Pods/Protobuf/objectivec/GPBArray.h deleted file mode 100755 index 781cfb6..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBArray.h +++ /dev/null @@ -1,1967 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2015 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBRuntimeTypes.h" - -NS_ASSUME_NONNULL_BEGIN - -//%PDDM-EXPAND DECLARE_ARRAYS() -// This block of code is generated, do not edit it directly. - -#pragma mark - Int32 - -/** - * Class used for repeated fields of int32_t values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32Array : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBInt32Array. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBInt32Array with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBInt32Array with value in it. - **/ -+ (instancetype)arrayWithValue:(int32_t)value; - -/** - * Creates and initializes a GPBInt32Array with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBInt32Array with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBInt32Array *)array; - -/** - * Creates and initializes a GPBInt32Array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBInt32Array with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBInt32Array. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBInt32Array with a copy of the values. - **/ -- (instancetype)initWithValues:(const int32_t [])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBInt32Array with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBInt32Array *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBInt32Array with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (int32_t)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(int32_t)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const int32_t [])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBInt32Array *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(int32_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int32_t)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - UInt32 - -/** - * Class used for repeated fields of uint32_t values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32Array : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBUInt32Array. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBUInt32Array with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBUInt32Array with value in it. - **/ -+ (instancetype)arrayWithValue:(uint32_t)value; - -/** - * Creates and initializes a GPBUInt32Array with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBUInt32Array with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBUInt32Array *)array; - -/** - * Creates and initializes a GPBUInt32Array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBUInt32Array with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBUInt32Array. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBUInt32Array with a copy of the values. - **/ -- (instancetype)initWithValues:(const uint32_t [])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBUInt32Array with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBUInt32Array *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBUInt32Array with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (uint32_t)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(uint32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(uint32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(uint32_t)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const uint32_t [])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBUInt32Array *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(uint32_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(uint32_t)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - Int64 - -/** - * Class used for repeated fields of int64_t values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64Array : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBInt64Array. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBInt64Array with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBInt64Array with value in it. - **/ -+ (instancetype)arrayWithValue:(int64_t)value; - -/** - * Creates and initializes a GPBInt64Array with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBInt64Array with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBInt64Array *)array; - -/** - * Creates and initializes a GPBInt64Array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBInt64Array with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBInt64Array. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBInt64Array with a copy of the values. - **/ -- (instancetype)initWithValues:(const int64_t [])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBInt64Array with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBInt64Array *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBInt64Array with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (int64_t)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(int64_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int64_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(int64_t)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const int64_t [])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBInt64Array *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(int64_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int64_t)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - UInt64 - -/** - * Class used for repeated fields of uint64_t values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64Array : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBUInt64Array. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBUInt64Array with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBUInt64Array with value in it. - **/ -+ (instancetype)arrayWithValue:(uint64_t)value; - -/** - * Creates and initializes a GPBUInt64Array with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBUInt64Array with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBUInt64Array *)array; - -/** - * Creates and initializes a GPBUInt64Array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBUInt64Array with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBUInt64Array. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBUInt64Array with a copy of the values. - **/ -- (instancetype)initWithValues:(const uint64_t [])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBUInt64Array with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBUInt64Array *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBUInt64Array with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (uint64_t)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(uint64_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(uint64_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(uint64_t)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const uint64_t [])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBUInt64Array *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(uint64_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(uint64_t)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - Float - -/** - * Class used for repeated fields of float values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBFloatArray : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBFloatArray. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBFloatArray with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBFloatArray with value in it. - **/ -+ (instancetype)arrayWithValue:(float)value; - -/** - * Creates and initializes a GPBFloatArray with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBFloatArray with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBFloatArray *)array; - -/** - * Creates and initializes a GPBFloatArray with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBFloatArray with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBFloatArray. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBFloatArray with a copy of the values. - **/ -- (instancetype)initWithValues:(const float [])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBFloatArray with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBFloatArray *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBFloatArray with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (float)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(float value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(float value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(float)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const float [])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBFloatArray *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(float)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(float)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - Double - -/** - * Class used for repeated fields of double values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBDoubleArray : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBDoubleArray. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBDoubleArray with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBDoubleArray with value in it. - **/ -+ (instancetype)arrayWithValue:(double)value; - -/** - * Creates and initializes a GPBDoubleArray with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBDoubleArray with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBDoubleArray *)array; - -/** - * Creates and initializes a GPBDoubleArray with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBDoubleArray with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBDoubleArray. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBDoubleArray with a copy of the values. - **/ -- (instancetype)initWithValues:(const double [])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBDoubleArray with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBDoubleArray *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBDoubleArray with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (double)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(double value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(double value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(double)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const double [])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBDoubleArray *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(double)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(double)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - Bool - -/** - * Class used for repeated fields of BOOL values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolArray : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBBoolArray. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBBoolArray with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBBoolArray with value in it. - **/ -+ (instancetype)arrayWithValue:(BOOL)value; - -/** - * Creates and initializes a GPBBoolArray with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBBoolArray with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBBoolArray *)array; - -/** - * Creates and initializes a GPBBoolArray with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBBoolArray with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBBoolArray. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBBoolArray with a copy of the values. - **/ -- (instancetype)initWithValues:(const BOOL [])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBBoolArray with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBBoolArray *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBBoolArray with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (BOOL)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(BOOL value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(BOOL value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(BOOL)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const BOOL [])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBBoolArray *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(BOOL)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(BOOL)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - Enum - -/** - * This class is used for repeated fields of int32_t values. This performs - * better than boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBEnumArray : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * @return A newly instanced and empty GPBEnumArray. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBEnumArray with the enum validation function - * given. - * - * @param func The enum validation function for the array. - * - * @return A newly instanced GPBEnumArray. - **/ -+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Creates and initializes a GPBEnumArray with the enum validation function - * given and the single raw value given. - * - * @param func The enum validation function for the array. - * @param value The raw value to add to this array. - * - * @return A newly instanced GPBEnumArray. - **/ -+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValue:(int32_t)value; - -/** - * Creates and initializes a GPBEnumArray that adds the elements from the - * given array. - * - * @param array Array containing the values to add to the new array. - * - * @return A newly instanced GPBEnumArray. - **/ -+ (instancetype)arrayWithValueArray:(GPBEnumArray *)array; - -/** - * Creates and initializes a GPBEnumArray with the given enum validation - * function and with the givencapacity. - * - * @param func The enum validation function for the array. - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBEnumArray with a capacity of count. - **/ -+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)count; - -/** - * Initializes the array with the given enum validation function. - * - * @param func The enum validation function for the array. - * - * @return A newly initialized GPBEnumArray with a copy of the values. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param func The enum validation function for the array. - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBEnumArray with a copy of the values. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBEnumArray with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBEnumArray *)array; - -/** - * Initializes the array with the given capacity. - * - * @param func The enum validation function for the array. - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBEnumArray with a capacity of count. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)count; - -// These will return kGPBUnrecognizedEnumeratorValue if the value at index is not a -// valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (int32_t)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -// These methods bypass the validationFunc to provide access to values that were not -// known at the time the binary was compiled. - -/** - * Gets the raw enum value at the given index. - * - * @param index The index of the raw enum value to get. - * - * @return The raw enum value at the given index. - **/ -- (int32_t)rawValueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateRawValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateRawValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(int32_t)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const int32_t [])values count:(NSUInteger)count; - - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(int32_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int32_t)value; - -// These methods bypass the validationFunc to provide setting of values that were not -// known at the time the binary was compiled. - -/** - * Adds a raw enum value to this array. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param value The raw enum value to add to the array. - **/ -- (void)addRawValue:(int32_t)value; - -/** - * Adds raw enum values to this array. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param array Array containing the raw enum values to add to this array. - **/ -- (void)addRawValuesFromArray:(GPBEnumArray *)array; - -/** - * Adds raw enum values to this array. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param values Array containing the raw enum values to add to this array. - * @param count The number of raw values to add. - **/ -- (void)addRawValues:(const int32_t [])values count:(NSUInteger)count; - -/** - * Inserts a raw enum value at the given index. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param value Raw enum value to add. - * @param index The index into which to insert the value. - **/ -- (void)insertRawValue:(int32_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the raw enum value at the given index with the given value. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param index The index for which to replace the value. - * @param value The raw enum value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withRawValue:(int32_t)value; - -// No validation applies to these methods. - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -//%PDDM-EXPAND-END DECLARE_ARRAYS() - -NS_ASSUME_NONNULL_END - -//%PDDM-DEFINE DECLARE_ARRAYS() -//%ARRAY_INTERFACE_SIMPLE(Int32, int32_t) -//%ARRAY_INTERFACE_SIMPLE(UInt32, uint32_t) -//%ARRAY_INTERFACE_SIMPLE(Int64, int64_t) -//%ARRAY_INTERFACE_SIMPLE(UInt64, uint64_t) -//%ARRAY_INTERFACE_SIMPLE(Float, float) -//%ARRAY_INTERFACE_SIMPLE(Double, double) -//%ARRAY_INTERFACE_SIMPLE(Bool, BOOL) -//%ARRAY_INTERFACE_ENUM(Enum, int32_t) - -// -// The common case (everything but Enum) -// - -//%PDDM-DEFINE ARRAY_INTERFACE_SIMPLE(NAME, TYPE) -//%#pragma mark - NAME -//% -//%/** -//% * Class used for repeated fields of ##TYPE## values. This performs better than -//% * boxing into NSNumbers in NSArrays. -//% * -//% * @note This class is not meant to be subclassed. -//% **/ -//%@interface GPB##NAME##Array : NSObject -//% -//%/** The number of elements contained in the array. */ -//%@property(nonatomic, readonly) NSUInteger count; -//% -//%/** -//% * @return A newly instanced and empty GPB##NAME##Array. -//% **/ -//%+ (instancetype)array; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the single element given. -//% * -//% * @param value The value to be placed in the array. -//% * -//% * @return A newly instanced GPB##NAME##Array with value in it. -//% **/ -//%+ (instancetype)arrayWithValue:(TYPE)value; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the contents of the given -//% * array. -//% * -//% * @param array Array with the contents to be put into the new array. -//% * -//% * @return A newly instanced GPB##NAME##Array with the contents of array. -//% **/ -//%+ (instancetype)arrayWithValueArray:(GPB##NAME##Array *)array; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the given capacity. -//% * -//% * @param count The capacity needed for the array. -//% * -//% * @return A newly instanced GPB##NAME##Array with a capacity of count. -//% **/ -//%+ (instancetype)arrayWithCapacity:(NSUInteger)count; -//% -//%/** -//% * @return A newly initialized and empty GPB##NAME##Array. -//% **/ -//%- (instancetype)init NS_DESIGNATED_INITIALIZER; -//% -//%/** -//% * Initializes the array, copying the given values. -//% * -//% * @param values An array with the values to put inside this array. -//% * @param count The number of elements to copy into the array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a copy of the values. -//% **/ -//%- (instancetype)initWithValues:(const TYPE [])values -//% count:(NSUInteger)count; -//% -//%/** -//% * Initializes the array, copying the given values. -//% * -//% * @param array An array with the values to put inside this array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a copy of the values. -//% **/ -//%- (instancetype)initWithValueArray:(GPB##NAME##Array *)array; -//% -//%/** -//% * Initializes the array with the given capacity. -//% * -//% * @param count The capacity needed for the array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a capacity of count. -//% **/ -//%- (instancetype)initWithCapacity:(NSUInteger)count; -//% -//%ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, Basic) -//% -//%ARRAY_MUTABLE_INTERFACE(NAME, TYPE, Basic) -//% -//%@end -//% - -// -// Macros specific to Enums (to tweak their interface). -// - -//%PDDM-DEFINE ARRAY_INTERFACE_ENUM(NAME, TYPE) -//%#pragma mark - NAME -//% -//%/** -//% * This class is used for repeated fields of ##TYPE## values. This performs -//% * better than boxing into NSNumbers in NSArrays. -//% * -//% * @note This class is not meant to be subclassed. -//% **/ -//%@interface GPB##NAME##Array : NSObject -//% -//%/** The number of elements contained in the array. */ -//%@property(nonatomic, readonly) NSUInteger count; -//%/** The validation function to check if the enums are valid. */ -//%@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; -//% -//%/** -//% * @return A newly instanced and empty GPB##NAME##Array. -//% **/ -//%+ (instancetype)array; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the enum validation function -//% * given. -//% * -//% * @param func The enum validation function for the array. -//% * -//% * @return A newly instanced GPB##NAME##Array. -//% **/ -//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the enum validation function -//% * given and the single raw value given. -//% * -//% * @param func The enum validation function for the array. -//% * @param value The raw value to add to this array. -//% * -//% * @return A newly instanced GPB##NAME##Array. -//% **/ -//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% rawValue:(TYPE)value; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array that adds the elements from the -//% * given array. -//% * -//% * @param array Array containing the values to add to the new array. -//% * -//% * @return A newly instanced GPB##NAME##Array. -//% **/ -//%+ (instancetype)arrayWithValueArray:(GPB##NAME##Array *)array; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the given enum validation -//% * function and with the givencapacity. -//% * -//% * @param func The enum validation function for the array. -//% * @param count The capacity needed for the array. -//% * -//% * @return A newly instanced GPB##NAME##Array with a capacity of count. -//% **/ -//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% capacity:(NSUInteger)count; -//% -//%/** -//% * Initializes the array with the given enum validation function. -//% * -//% * @param func The enum validation function for the array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a copy of the values. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% NS_DESIGNATED_INITIALIZER; -//% -//%/** -//% * Initializes the array, copying the given values. -//% * -//% * @param func The enum validation function for the array. -//% * @param values An array with the values to put inside this array. -//% * @param count The number of elements to copy into the array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a copy of the values. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% rawValues:(const TYPE [])values -//% count:(NSUInteger)count; -//% -//%/** -//% * Initializes the array, copying the given values. -//% * -//% * @param array An array with the values to put inside this array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a copy of the values. -//% **/ -//%- (instancetype)initWithValueArray:(GPB##NAME##Array *)array; -//% -//%/** -//% * Initializes the array with the given capacity. -//% * -//% * @param func The enum validation function for the array. -//% * @param count The capacity needed for the array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a capacity of count. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% capacity:(NSUInteger)count; -//% -//%// These will return kGPBUnrecognizedEnumeratorValue if the value at index is not a -//%// valid enumerator as defined by validationFunc. If the actual value is -//%// desired, use "raw" version of the method. -//% -//%ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, NAME) -//% -//%// These methods bypass the validationFunc to provide access to values that were not -//%// known at the time the binary was compiled. -//% -//%/** -//% * Gets the raw enum value at the given index. -//% * -//% * @param index The index of the raw enum value to get. -//% * -//% * @return The raw enum value at the given index. -//% **/ -//%- (TYPE)rawValueAtIndex:(NSUInteger)index; -//% -//%/** -//% * Enumerates the values on this array with the given block. -//% * -//% * @param block The block to enumerate with. -//% * **value**: The current value being enumerated. -//% * **idx**: The index of the current value. -//% * **stop**: A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateRawValuesWithBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; -//% -//%/** -//% * Enumerates the values on this array with the given block. -//% * -//% * @param opts Options to control the enumeration. -//% * @param block The block to enumerate with. -//% * **value**: The current value being enumerated. -//% * **idx**: The index of the current value. -//% * **stop**: A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateRawValuesWithOptions:(NSEnumerationOptions)opts -//% usingBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; -//% -//%// If value is not a valid enumerator as defined by validationFunc, these -//%// methods will assert in debug, and will log in release and assign the value -//%// to the default value. Use the rawValue methods below to assign non enumerator -//%// values. -//% -//%ARRAY_MUTABLE_INTERFACE(NAME, TYPE, NAME) -//% -//%@end -//% - -//%PDDM-DEFINE ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, HELPER_NAME) -//%/** -//% * Gets the value at the given index. -//% * -//% * @param index The index of the value to get. -//% * -//% * @return The value at the given index. -//% **/ -//%- (TYPE)valueAtIndex:(NSUInteger)index; -//% -//%/** -//% * Enumerates the values on this array with the given block. -//% * -//% * @param block The block to enumerate with. -//% * **value**: The current value being enumerated. -//% * **idx**: The index of the current value. -//% * **stop**: A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateValuesWithBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; -//% -//%/** -//% * Enumerates the values on this array with the given block. -//% * -//% * @param opts Options to control the enumeration. -//% * @param block The block to enumerate with. -//% * **value**: The current value being enumerated. -//% * **idx**: The index of the current value. -//% * **stop**: A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts -//% usingBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; - -//%PDDM-DEFINE ARRAY_MUTABLE_INTERFACE(NAME, TYPE, HELPER_NAME) -//%/** -//% * Adds a value to this array. -//% * -//% * @param value The value to add to this array. -//% **/ -//%- (void)addValue:(TYPE)value; -//% -//%/** -//% * Adds values to this array. -//% * -//% * @param values The values to add to this array. -//% * @param count The number of elements to add. -//% **/ -//%- (void)addValues:(const TYPE [])values count:(NSUInteger)count; -//% -//%ARRAY_EXTRA_MUTABLE_METHODS1_##HELPER_NAME(NAME, TYPE) -//%/** -//% * Inserts a value into the given position. -//% * -//% * @param value The value to add to this array. -//% * @param index The index into which to insert the value. -//% **/ -//%- (void)insertValue:(TYPE)value atIndex:(NSUInteger)index; -//% -//%/** -//% * Replaces the value at the given index with the given value. -//% * -//% * @param index The index for which to replace the value. -//% * @param value The value to replace with. -//% **/ -//%- (void)replaceValueAtIndex:(NSUInteger)index withValue:(TYPE)value; -//%ARRAY_EXTRA_MUTABLE_METHODS2_##HELPER_NAME(NAME, TYPE) -//%/** -//% * Removes the value at the given index. -//% * -//% * @param index The index of the value to remove. -//% **/ -//%- (void)removeValueAtIndex:(NSUInteger)index; -//% -//%/** -//% * Removes all the values from this array. -//% **/ -//%- (void)removeAll; -//% -//%/** -//% * Exchanges the values between the given indexes. -//% * -//% * @param idx1 The index of the first element to exchange. -//% * @param idx2 The index of the second element to exchange. -//% **/ -//%- (void)exchangeValueAtIndex:(NSUInteger)idx1 -//% withValueAtIndex:(NSUInteger)idx2; - -// -// These are hooks invoked by the above to do insert as needed. -// - -//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS1_Basic(NAME, TYPE) -//%/** -//% * Adds the values from the given array to this array. -//% * -//% * @param array The array containing the elements to add to this array. -//% **/ -//%- (void)addValuesFromArray:(GPB##NAME##Array *)array; -//% -//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS2_Basic(NAME, TYPE) -// Empty -//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS1_Enum(NAME, TYPE) -// Empty -//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS2_Enum(NAME, TYPE) -//% -//%// These methods bypass the validationFunc to provide setting of values that were not -//%// known at the time the binary was compiled. -//% -//%/** -//% * Adds a raw enum value to this array. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param value The raw enum value to add to the array. -//% **/ -//%- (void)addRawValue:(TYPE)value; -//% -//%/** -//% * Adds raw enum values to this array. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param array Array containing the raw enum values to add to this array. -//% **/ -//%- (void)addRawValuesFromArray:(GPB##NAME##Array *)array; -//% -//%/** -//% * Adds raw enum values to this array. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param values Array containing the raw enum values to add to this array. -//% * @param count The number of raw values to add. -//% **/ -//%- (void)addRawValues:(const TYPE [])values count:(NSUInteger)count; -//% -//%/** -//% * Inserts a raw enum value at the given index. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param value Raw enum value to add. -//% * @param index The index into which to insert the value. -//% **/ -//%- (void)insertRawValue:(TYPE)value atIndex:(NSUInteger)index; -//% -//%/** -//% * Replaces the raw enum value at the given index with the given value. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param index The index for which to replace the value. -//% * @param value The raw enum value to replace with. -//% **/ -//%- (void)replaceValueAtIndex:(NSUInteger)index withRawValue:(TYPE)value; -//% -//%// No validation applies to these methods. -//% diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBArray.m b/Old My Mind/Pods/Protobuf/objectivec/GPBArray.m deleted file mode 100755 index f401631..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBArray.m +++ /dev/null @@ -1,2551 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2015 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBArray_PackagePrivate.h" - -#import "GPBMessage_PackagePrivate.h" - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -// Mutable arrays use an internal buffer that can always hold a multiple of this elements. -#define kChunkSize 16 -#define CapacityFromCount(x) (((x / kChunkSize) + 1) * kChunkSize) - -static BOOL ArrayDefault_IsValidValue(int32_t value) { - // Anything but the bad value marker is allowed. - return (value != kGPBUnrecognizedEnumeratorValue); -} - -//%PDDM-DEFINE VALIDATE_RANGE(INDEX, COUNT) -//% if (INDEX >= COUNT) { -//% [NSException raise:NSRangeException -//% format:@"Index (%lu) beyond bounds (%lu)", -//% (unsigned long)INDEX, (unsigned long)COUNT]; -//% } -//%PDDM-DEFINE MAYBE_GROW_TO_SET_COUNT(NEW_COUNT) -//% if (NEW_COUNT > _capacity) { -//% [self internalResizeToCapacity:CapacityFromCount(NEW_COUNT)]; -//% } -//% _count = NEW_COUNT; -//%PDDM-DEFINE SET_COUNT_AND_MAYBE_SHRINK(NEW_COUNT) -//% _count = NEW_COUNT; -//% if ((NEW_COUNT + (2 * kChunkSize)) < _capacity) { -//% [self internalResizeToCapacity:CapacityFromCount(NEW_COUNT)]; -//% } - -// -// Macros for the common basic cases. -// - -//%PDDM-DEFINE ARRAY_INTERFACE_SIMPLE(NAME, TYPE, FORMAT) -//%#pragma mark - NAME -//% -//%@implementation GPB##NAME##Array { -//% @package -//% TYPE *_values; -//% NSUInteger _count; -//% NSUInteger _capacity; -//%} -//% -//%@synthesize count = _count; -//% -//%+ (instancetype)array { -//% return [[[self alloc] init] autorelease]; -//%} -//% -//%+ (instancetype)arrayWithValue:(TYPE)value { -//% // Cast is needed so the compiler knows what class we are invoking initWithValues: on to get -//% // the type correct. -//% return [[(GPB##NAME##Array*)[self alloc] initWithValues:&value count:1] autorelease]; -//%} -//% -//%+ (instancetype)arrayWithValueArray:(GPB##NAME##Array *)array { -//% return [[(GPB##NAME##Array*)[self alloc] initWithValueArray:array] autorelease]; -//%} -//% -//%+ (instancetype)arrayWithCapacity:(NSUInteger)count { -//% return [[[self alloc] initWithCapacity:count] autorelease]; -//%} -//% -//%- (instancetype)init { -//% self = [super init]; -//% // No work needed; -//% return self; -//%} -//% -//%- (instancetype)initWithValueArray:(GPB##NAME##Array *)array { -//% return [self initWithValues:array->_values count:array->_count]; -//%} -//% -//%- (instancetype)initWithValues:(const TYPE [])values count:(NSUInteger)count { -//% self = [self init]; -//% if (self) { -//% if (count && values) { -//% _values = reallocf(_values, count * sizeof(TYPE)); -//% if (_values != NULL) { -//% _capacity = count; -//% memcpy(_values, values, count * sizeof(TYPE)); -//% _count = count; -//% } else { -//% [self release]; -//% [NSException raise:NSMallocException -//% format:@"Failed to allocate %lu bytes", -//% (unsigned long)(count * sizeof(TYPE))]; -//% } -//% } -//% } -//% return self; -//%} -//% -//%- (instancetype)initWithCapacity:(NSUInteger)count { -//% self = [self initWithValues:NULL count:0]; -//% if (self && count) { -//% [self internalResizeToCapacity:count]; -//% } -//% return self; -//%} -//% -//%- (instancetype)copyWithZone:(NSZone *)zone { -//% return [[GPB##NAME##Array allocWithZone:zone] initWithValues:_values count:_count]; -//%} -//% -//%ARRAY_IMMUTABLE_CORE(NAME, TYPE, , FORMAT) -//% -//%- (TYPE)valueAtIndex:(NSUInteger)index { -//%VALIDATE_RANGE(index, _count) -//% return _values[index]; -//%} -//% -//%ARRAY_MUTABLE_CORE(NAME, TYPE, , FORMAT) -//%@end -//% - -// -// Some core macros used for both the simple types and Enums. -// - -//%PDDM-DEFINE ARRAY_IMMUTABLE_CORE(NAME, TYPE, ACCESSOR_NAME, FORMAT) -//%- (void)dealloc { -//% NSAssert(!_autocreator, -//% @"%@: Autocreator must be cleared before release, autocreator: %@", -//% [self class], _autocreator); -//% free(_values); -//% [super dealloc]; -//%} -//% -//%- (BOOL)isEqual:(id)other { -//% if (self == other) { -//% return YES; -//% } -//% if (![other isKindOfClass:[GPB##NAME##Array class]]) { -//% return NO; -//% } -//% GPB##NAME##Array *otherArray = other; -//% return (_count == otherArray->_count -//% && memcmp(_values, otherArray->_values, (_count * sizeof(TYPE))) == 0); -//%} -//% -//%- (NSUInteger)hash { -//% // Follow NSArray's lead, and use the count as the hash. -//% return _count; -//%} -//% -//%- (NSString *)description { -//% NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> { ", [self class], self]; -//% for (NSUInteger i = 0, count = _count; i < count; ++i) { -//% if (i == 0) { -//% [result appendFormat:@"##FORMAT##", _values[i]]; -//% } else { -//% [result appendFormat:@", ##FORMAT##", _values[i]]; -//% } -//% } -//% [result appendFormat:@" }"]; -//% return result; -//%} -//% -//%- (void)enumerate##ACCESSOR_NAME##ValuesWithBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block { -//% [self enumerate##ACCESSOR_NAME##ValuesWithOptions:(NSEnumerationOptions)0 usingBlock:block]; -//%} -//% -//%- (void)enumerate##ACCESSOR_NAME##ValuesWithOptions:(NSEnumerationOptions)opts -//% ACCESSOR_NAME$S usingBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block { -//% // NSEnumerationConcurrent isn't currently supported (and Apple's docs say that is ok). -//% BOOL stop = NO; -//% if ((opts & NSEnumerationReverse) == 0) { -//% for (NSUInteger i = 0, count = _count; i < count; ++i) { -//% block(_values[i], i, &stop); -//% if (stop) break; -//% } -//% } else if (_count > 0) { -//% for (NSUInteger i = _count; i > 0; --i) { -//% block(_values[i - 1], (i - 1), &stop); -//% if (stop) break; -//% } -//% } -//%} - -//%PDDM-DEFINE MUTATION_HOOK_None() -//%PDDM-DEFINE MUTATION_METHODS(NAME, TYPE, ACCESSOR_NAME, HOOK_1, HOOK_2) -//%- (void)add##ACCESSOR_NAME##Value:(TYPE)value { -//% [self add##ACCESSOR_NAME##Values:&value count:1]; -//%} -//% -//%- (void)add##ACCESSOR_NAME##Values:(const TYPE [])values count:(NSUInteger)count { -//% if (values == NULL || count == 0) return; -//%MUTATION_HOOK_##HOOK_1() NSUInteger initialCount = _count; -//% NSUInteger newCount = initialCount + count; -//%MAYBE_GROW_TO_SET_COUNT(newCount) -//% memcpy(&_values[initialCount], values, count * sizeof(TYPE)); -//% if (_autocreator) { -//% GPBAutocreatedArrayModified(_autocreator, self); -//% } -//%} -//% -//%- (void)insert##ACCESSOR_NAME##Value:(TYPE)value atIndex:(NSUInteger)index { -//%VALIDATE_RANGE(index, _count + 1) -//%MUTATION_HOOK_##HOOK_2() NSUInteger initialCount = _count; -//% NSUInteger newCount = initialCount + 1; -//%MAYBE_GROW_TO_SET_COUNT(newCount) -//% if (index != initialCount) { -//% memmove(&_values[index + 1], &_values[index], (initialCount - index) * sizeof(TYPE)); -//% } -//% _values[index] = value; -//% if (_autocreator) { -//% GPBAutocreatedArrayModified(_autocreator, self); -//% } -//%} -//% -//%- (void)replaceValueAtIndex:(NSUInteger)index with##ACCESSOR_NAME##Value:(TYPE)value { -//%VALIDATE_RANGE(index, _count) -//%MUTATION_HOOK_##HOOK_2() _values[index] = value; -//%} - -//%PDDM-DEFINE ARRAY_MUTABLE_CORE(NAME, TYPE, ACCESSOR_NAME, FORMAT) -//%- (void)internalResizeToCapacity:(NSUInteger)newCapacity { -//% _values = reallocf(_values, newCapacity * sizeof(TYPE)); -//% if (_values == NULL) { -//% _capacity = 0; -//% _count = 0; -//% [NSException raise:NSMallocException -//% format:@"Failed to allocate %lu bytes", -//% (unsigned long)(newCapacity * sizeof(TYPE))]; -//% } -//% _capacity = newCapacity; -//%} -//% -//%MUTATION_METHODS(NAME, TYPE, ACCESSOR_NAME, None, None) -//% -//%- (void)add##ACCESSOR_NAME##ValuesFromArray:(GPB##NAME##Array *)array { -//% [self add##ACCESSOR_NAME##Values:array->_values count:array->_count]; -//%} -//% -//%- (void)removeValueAtIndex:(NSUInteger)index { -//%VALIDATE_RANGE(index, _count) -//% NSUInteger newCount = _count - 1; -//% if (index != newCount) { -//% memmove(&_values[index], &_values[index + 1], (newCount - index) * sizeof(TYPE)); -//% } -//%SET_COUNT_AND_MAYBE_SHRINK(newCount) -//%} -//% -//%- (void)removeAll { -//%SET_COUNT_AND_MAYBE_SHRINK(0) -//%} -//% -//%- (void)exchangeValueAtIndex:(NSUInteger)idx1 -//% withValueAtIndex:(NSUInteger)idx2 { -//%VALIDATE_RANGE(idx1, _count) -//%VALIDATE_RANGE(idx2, _count) -//% TYPE temp = _values[idx1]; -//% _values[idx1] = _values[idx2]; -//% _values[idx2] = temp; -//%} -//% - -//%PDDM-EXPAND ARRAY_INTERFACE_SIMPLE(Int32, int32_t, %d) -// This block of code is generated, do not edit it directly. - -#pragma mark - Int32 - -@implementation GPBInt32Array { - @package - int32_t *_values; - NSUInteger _count; - NSUInteger _capacity; -} - -@synthesize count = _count; - -+ (instancetype)array { - return [[[self alloc] init] autorelease]; -} - -+ (instancetype)arrayWithValue:(int32_t)value { - // Cast is needed so the compiler knows what class we are invoking initWithValues: on to get - // the type correct. - return [[(GPBInt32Array*)[self alloc] initWithValues:&value count:1] autorelease]; -} - -+ (instancetype)arrayWithValueArray:(GPBInt32Array *)array { - return [[(GPBInt32Array*)[self alloc] initWithValueArray:array] autorelease]; -} - -+ (instancetype)arrayWithCapacity:(NSUInteger)count { - return [[[self alloc] initWithCapacity:count] autorelease]; -} - -- (instancetype)init { - self = [super init]; - // No work needed; - return self; -} - -- (instancetype)initWithValueArray:(GPBInt32Array *)array { - return [self initWithValues:array->_values count:array->_count]; -} - -- (instancetype)initWithValues:(const int32_t [])values count:(NSUInteger)count { - self = [self init]; - if (self) { - if (count && values) { - _values = reallocf(_values, count * sizeof(int32_t)); - if (_values != NULL) { - _capacity = count; - memcpy(_values, values, count * sizeof(int32_t)); - _count = count; - } else { - [self release]; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(count * sizeof(int32_t))]; - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)count { - self = [self initWithValues:NULL count:0]; - if (self && count) { - [self internalResizeToCapacity:count]; - } - return self; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt32Array allocWithZone:zone] initWithValues:_values count:_count]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - free(_values); - [super dealloc]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt32Array class]]) { - return NO; - } - GPBInt32Array *otherArray = other; - return (_count == otherArray->_count - && memcmp(_values, otherArray->_values, (_count * sizeof(int32_t))) == 0); -} - -- (NSUInteger)hash { - // Follow NSArray's lead, and use the count as the hash. - return _count; -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> { ", [self class], self]; - for (NSUInteger i = 0, count = _count; i < count; ++i) { - if (i == 0) { - [result appendFormat:@"%d", _values[i]]; - } else { - [result appendFormat:@", %d", _values[i]]; - } - } - [result appendFormat:@" }"]; - return result; -} - -- (void)enumerateValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block { - [self enumerateValuesWithOptions:(NSEnumerationOptions)0 usingBlock:block]; -} - -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block { - // NSEnumerationConcurrent isn't currently supported (and Apple's docs say that is ok). - BOOL stop = NO; - if ((opts & NSEnumerationReverse) == 0) { - for (NSUInteger i = 0, count = _count; i < count; ++i) { - block(_values[i], i, &stop); - if (stop) break; - } - } else if (_count > 0) { - for (NSUInteger i = _count; i > 0; --i) { - block(_values[i - 1], (i - 1), &stop); - if (stop) break; - } - } -} - -- (int32_t)valueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - return _values[index]; -} - -- (void)internalResizeToCapacity:(NSUInteger)newCapacity { - _values = reallocf(_values, newCapacity * sizeof(int32_t)); - if (_values == NULL) { - _capacity = 0; - _count = 0; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(newCapacity * sizeof(int32_t))]; - } - _capacity = newCapacity; -} - -- (void)addValue:(int32_t)value { - [self addValues:&value count:1]; -} - -- (void)addValues:(const int32_t [])values count:(NSUInteger)count { - if (values == NULL || count == 0) return; - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + count; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - memcpy(&_values[initialCount], values, count * sizeof(int32_t)); - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)insertValue:(int32_t)value atIndex:(NSUInteger)index { - if (index >= _count + 1) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count + 1]; - } - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + 1; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - if (index != initialCount) { - memmove(&_values[index + 1], &_values[index], (initialCount - index) * sizeof(int32_t)); - } - _values[index] = value; - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int32_t)value { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - _values[index] = value; -} - -- (void)addValuesFromArray:(GPBInt32Array *)array { - [self addValues:array->_values count:array->_count]; -} - -- (void)removeValueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - NSUInteger newCount = _count - 1; - if (index != newCount) { - memmove(&_values[index], &_values[index + 1], (newCount - index) * sizeof(int32_t)); - } - _count = newCount; - if ((newCount + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } -} - -- (void)removeAll { - _count = 0; - if ((0 + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(0)]; - } -} - -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2 { - if (idx1 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx1, (unsigned long)_count]; - } - if (idx2 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx2, (unsigned long)_count]; - } - int32_t temp = _values[idx1]; - _values[idx1] = _values[idx2]; - _values[idx2] = temp; -} - -@end - -//%PDDM-EXPAND ARRAY_INTERFACE_SIMPLE(UInt32, uint32_t, %u) -// This block of code is generated, do not edit it directly. - -#pragma mark - UInt32 - -@implementation GPBUInt32Array { - @package - uint32_t *_values; - NSUInteger _count; - NSUInteger _capacity; -} - -@synthesize count = _count; - -+ (instancetype)array { - return [[[self alloc] init] autorelease]; -} - -+ (instancetype)arrayWithValue:(uint32_t)value { - // Cast is needed so the compiler knows what class we are invoking initWithValues: on to get - // the type correct. - return [[(GPBUInt32Array*)[self alloc] initWithValues:&value count:1] autorelease]; -} - -+ (instancetype)arrayWithValueArray:(GPBUInt32Array *)array { - return [[(GPBUInt32Array*)[self alloc] initWithValueArray:array] autorelease]; -} - -+ (instancetype)arrayWithCapacity:(NSUInteger)count { - return [[[self alloc] initWithCapacity:count] autorelease]; -} - -- (instancetype)init { - self = [super init]; - // No work needed; - return self; -} - -- (instancetype)initWithValueArray:(GPBUInt32Array *)array { - return [self initWithValues:array->_values count:array->_count]; -} - -- (instancetype)initWithValues:(const uint32_t [])values count:(NSUInteger)count { - self = [self init]; - if (self) { - if (count && values) { - _values = reallocf(_values, count * sizeof(uint32_t)); - if (_values != NULL) { - _capacity = count; - memcpy(_values, values, count * sizeof(uint32_t)); - _count = count; - } else { - [self release]; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(count * sizeof(uint32_t))]; - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)count { - self = [self initWithValues:NULL count:0]; - if (self && count) { - [self internalResizeToCapacity:count]; - } - return self; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt32Array allocWithZone:zone] initWithValues:_values count:_count]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - free(_values); - [super dealloc]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt32Array class]]) { - return NO; - } - GPBUInt32Array *otherArray = other; - return (_count == otherArray->_count - && memcmp(_values, otherArray->_values, (_count * sizeof(uint32_t))) == 0); -} - -- (NSUInteger)hash { - // Follow NSArray's lead, and use the count as the hash. - return _count; -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> { ", [self class], self]; - for (NSUInteger i = 0, count = _count; i < count; ++i) { - if (i == 0) { - [result appendFormat:@"%u", _values[i]]; - } else { - [result appendFormat:@", %u", _values[i]]; - } - } - [result appendFormat:@" }"]; - return result; -} - -- (void)enumerateValuesWithBlock:(void (^)(uint32_t value, NSUInteger idx, BOOL *stop))block { - [self enumerateValuesWithOptions:(NSEnumerationOptions)0 usingBlock:block]; -} - -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(uint32_t value, NSUInteger idx, BOOL *stop))block { - // NSEnumerationConcurrent isn't currently supported (and Apple's docs say that is ok). - BOOL stop = NO; - if ((opts & NSEnumerationReverse) == 0) { - for (NSUInteger i = 0, count = _count; i < count; ++i) { - block(_values[i], i, &stop); - if (stop) break; - } - } else if (_count > 0) { - for (NSUInteger i = _count; i > 0; --i) { - block(_values[i - 1], (i - 1), &stop); - if (stop) break; - } - } -} - -- (uint32_t)valueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - return _values[index]; -} - -- (void)internalResizeToCapacity:(NSUInteger)newCapacity { - _values = reallocf(_values, newCapacity * sizeof(uint32_t)); - if (_values == NULL) { - _capacity = 0; - _count = 0; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(newCapacity * sizeof(uint32_t))]; - } - _capacity = newCapacity; -} - -- (void)addValue:(uint32_t)value { - [self addValues:&value count:1]; -} - -- (void)addValues:(const uint32_t [])values count:(NSUInteger)count { - if (values == NULL || count == 0) return; - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + count; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - memcpy(&_values[initialCount], values, count * sizeof(uint32_t)); - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)insertValue:(uint32_t)value atIndex:(NSUInteger)index { - if (index >= _count + 1) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count + 1]; - } - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + 1; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - if (index != initialCount) { - memmove(&_values[index + 1], &_values[index], (initialCount - index) * sizeof(uint32_t)); - } - _values[index] = value; - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(uint32_t)value { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - _values[index] = value; -} - -- (void)addValuesFromArray:(GPBUInt32Array *)array { - [self addValues:array->_values count:array->_count]; -} - -- (void)removeValueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - NSUInteger newCount = _count - 1; - if (index != newCount) { - memmove(&_values[index], &_values[index + 1], (newCount - index) * sizeof(uint32_t)); - } - _count = newCount; - if ((newCount + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } -} - -- (void)removeAll { - _count = 0; - if ((0 + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(0)]; - } -} - -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2 { - if (idx1 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx1, (unsigned long)_count]; - } - if (idx2 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx2, (unsigned long)_count]; - } - uint32_t temp = _values[idx1]; - _values[idx1] = _values[idx2]; - _values[idx2] = temp; -} - -@end - -//%PDDM-EXPAND ARRAY_INTERFACE_SIMPLE(Int64, int64_t, %lld) -// This block of code is generated, do not edit it directly. - -#pragma mark - Int64 - -@implementation GPBInt64Array { - @package - int64_t *_values; - NSUInteger _count; - NSUInteger _capacity; -} - -@synthesize count = _count; - -+ (instancetype)array { - return [[[self alloc] init] autorelease]; -} - -+ (instancetype)arrayWithValue:(int64_t)value { - // Cast is needed so the compiler knows what class we are invoking initWithValues: on to get - // the type correct. - return [[(GPBInt64Array*)[self alloc] initWithValues:&value count:1] autorelease]; -} - -+ (instancetype)arrayWithValueArray:(GPBInt64Array *)array { - return [[(GPBInt64Array*)[self alloc] initWithValueArray:array] autorelease]; -} - -+ (instancetype)arrayWithCapacity:(NSUInteger)count { - return [[[self alloc] initWithCapacity:count] autorelease]; -} - -- (instancetype)init { - self = [super init]; - // No work needed; - return self; -} - -- (instancetype)initWithValueArray:(GPBInt64Array *)array { - return [self initWithValues:array->_values count:array->_count]; -} - -- (instancetype)initWithValues:(const int64_t [])values count:(NSUInteger)count { - self = [self init]; - if (self) { - if (count && values) { - _values = reallocf(_values, count * sizeof(int64_t)); - if (_values != NULL) { - _capacity = count; - memcpy(_values, values, count * sizeof(int64_t)); - _count = count; - } else { - [self release]; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(count * sizeof(int64_t))]; - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)count { - self = [self initWithValues:NULL count:0]; - if (self && count) { - [self internalResizeToCapacity:count]; - } - return self; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt64Array allocWithZone:zone] initWithValues:_values count:_count]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - free(_values); - [super dealloc]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt64Array class]]) { - return NO; - } - GPBInt64Array *otherArray = other; - return (_count == otherArray->_count - && memcmp(_values, otherArray->_values, (_count * sizeof(int64_t))) == 0); -} - -- (NSUInteger)hash { - // Follow NSArray's lead, and use the count as the hash. - return _count; -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> { ", [self class], self]; - for (NSUInteger i = 0, count = _count; i < count; ++i) { - if (i == 0) { - [result appendFormat:@"%lld", _values[i]]; - } else { - [result appendFormat:@", %lld", _values[i]]; - } - } - [result appendFormat:@" }"]; - return result; -} - -- (void)enumerateValuesWithBlock:(void (^)(int64_t value, NSUInteger idx, BOOL *stop))block { - [self enumerateValuesWithOptions:(NSEnumerationOptions)0 usingBlock:block]; -} - -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int64_t value, NSUInteger idx, BOOL *stop))block { - // NSEnumerationConcurrent isn't currently supported (and Apple's docs say that is ok). - BOOL stop = NO; - if ((opts & NSEnumerationReverse) == 0) { - for (NSUInteger i = 0, count = _count; i < count; ++i) { - block(_values[i], i, &stop); - if (stop) break; - } - } else if (_count > 0) { - for (NSUInteger i = _count; i > 0; --i) { - block(_values[i - 1], (i - 1), &stop); - if (stop) break; - } - } -} - -- (int64_t)valueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - return _values[index]; -} - -- (void)internalResizeToCapacity:(NSUInteger)newCapacity { - _values = reallocf(_values, newCapacity * sizeof(int64_t)); - if (_values == NULL) { - _capacity = 0; - _count = 0; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(newCapacity * sizeof(int64_t))]; - } - _capacity = newCapacity; -} - -- (void)addValue:(int64_t)value { - [self addValues:&value count:1]; -} - -- (void)addValues:(const int64_t [])values count:(NSUInteger)count { - if (values == NULL || count == 0) return; - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + count; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - memcpy(&_values[initialCount], values, count * sizeof(int64_t)); - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)insertValue:(int64_t)value atIndex:(NSUInteger)index { - if (index >= _count + 1) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count + 1]; - } - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + 1; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - if (index != initialCount) { - memmove(&_values[index + 1], &_values[index], (initialCount - index) * sizeof(int64_t)); - } - _values[index] = value; - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int64_t)value { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - _values[index] = value; -} - -- (void)addValuesFromArray:(GPBInt64Array *)array { - [self addValues:array->_values count:array->_count]; -} - -- (void)removeValueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - NSUInteger newCount = _count - 1; - if (index != newCount) { - memmove(&_values[index], &_values[index + 1], (newCount - index) * sizeof(int64_t)); - } - _count = newCount; - if ((newCount + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } -} - -- (void)removeAll { - _count = 0; - if ((0 + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(0)]; - } -} - -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2 { - if (idx1 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx1, (unsigned long)_count]; - } - if (idx2 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx2, (unsigned long)_count]; - } - int64_t temp = _values[idx1]; - _values[idx1] = _values[idx2]; - _values[idx2] = temp; -} - -@end - -//%PDDM-EXPAND ARRAY_INTERFACE_SIMPLE(UInt64, uint64_t, %llu) -// This block of code is generated, do not edit it directly. - -#pragma mark - UInt64 - -@implementation GPBUInt64Array { - @package - uint64_t *_values; - NSUInteger _count; - NSUInteger _capacity; -} - -@synthesize count = _count; - -+ (instancetype)array { - return [[[self alloc] init] autorelease]; -} - -+ (instancetype)arrayWithValue:(uint64_t)value { - // Cast is needed so the compiler knows what class we are invoking initWithValues: on to get - // the type correct. - return [[(GPBUInt64Array*)[self alloc] initWithValues:&value count:1] autorelease]; -} - -+ (instancetype)arrayWithValueArray:(GPBUInt64Array *)array { - return [[(GPBUInt64Array*)[self alloc] initWithValueArray:array] autorelease]; -} - -+ (instancetype)arrayWithCapacity:(NSUInteger)count { - return [[[self alloc] initWithCapacity:count] autorelease]; -} - -- (instancetype)init { - self = [super init]; - // No work needed; - return self; -} - -- (instancetype)initWithValueArray:(GPBUInt64Array *)array { - return [self initWithValues:array->_values count:array->_count]; -} - -- (instancetype)initWithValues:(const uint64_t [])values count:(NSUInteger)count { - self = [self init]; - if (self) { - if (count && values) { - _values = reallocf(_values, count * sizeof(uint64_t)); - if (_values != NULL) { - _capacity = count; - memcpy(_values, values, count * sizeof(uint64_t)); - _count = count; - } else { - [self release]; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(count * sizeof(uint64_t))]; - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)count { - self = [self initWithValues:NULL count:0]; - if (self && count) { - [self internalResizeToCapacity:count]; - } - return self; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt64Array allocWithZone:zone] initWithValues:_values count:_count]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - free(_values); - [super dealloc]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt64Array class]]) { - return NO; - } - GPBUInt64Array *otherArray = other; - return (_count == otherArray->_count - && memcmp(_values, otherArray->_values, (_count * sizeof(uint64_t))) == 0); -} - -- (NSUInteger)hash { - // Follow NSArray's lead, and use the count as the hash. - return _count; -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> { ", [self class], self]; - for (NSUInteger i = 0, count = _count; i < count; ++i) { - if (i == 0) { - [result appendFormat:@"%llu", _values[i]]; - } else { - [result appendFormat:@", %llu", _values[i]]; - } - } - [result appendFormat:@" }"]; - return result; -} - -- (void)enumerateValuesWithBlock:(void (^)(uint64_t value, NSUInteger idx, BOOL *stop))block { - [self enumerateValuesWithOptions:(NSEnumerationOptions)0 usingBlock:block]; -} - -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(uint64_t value, NSUInteger idx, BOOL *stop))block { - // NSEnumerationConcurrent isn't currently supported (and Apple's docs say that is ok). - BOOL stop = NO; - if ((opts & NSEnumerationReverse) == 0) { - for (NSUInteger i = 0, count = _count; i < count; ++i) { - block(_values[i], i, &stop); - if (stop) break; - } - } else if (_count > 0) { - for (NSUInteger i = _count; i > 0; --i) { - block(_values[i - 1], (i - 1), &stop); - if (stop) break; - } - } -} - -- (uint64_t)valueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - return _values[index]; -} - -- (void)internalResizeToCapacity:(NSUInteger)newCapacity { - _values = reallocf(_values, newCapacity * sizeof(uint64_t)); - if (_values == NULL) { - _capacity = 0; - _count = 0; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(newCapacity * sizeof(uint64_t))]; - } - _capacity = newCapacity; -} - -- (void)addValue:(uint64_t)value { - [self addValues:&value count:1]; -} - -- (void)addValues:(const uint64_t [])values count:(NSUInteger)count { - if (values == NULL || count == 0) return; - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + count; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - memcpy(&_values[initialCount], values, count * sizeof(uint64_t)); - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)insertValue:(uint64_t)value atIndex:(NSUInteger)index { - if (index >= _count + 1) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count + 1]; - } - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + 1; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - if (index != initialCount) { - memmove(&_values[index + 1], &_values[index], (initialCount - index) * sizeof(uint64_t)); - } - _values[index] = value; - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(uint64_t)value { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - _values[index] = value; -} - -- (void)addValuesFromArray:(GPBUInt64Array *)array { - [self addValues:array->_values count:array->_count]; -} - -- (void)removeValueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - NSUInteger newCount = _count - 1; - if (index != newCount) { - memmove(&_values[index], &_values[index + 1], (newCount - index) * sizeof(uint64_t)); - } - _count = newCount; - if ((newCount + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } -} - -- (void)removeAll { - _count = 0; - if ((0 + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(0)]; - } -} - -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2 { - if (idx1 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx1, (unsigned long)_count]; - } - if (idx2 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx2, (unsigned long)_count]; - } - uint64_t temp = _values[idx1]; - _values[idx1] = _values[idx2]; - _values[idx2] = temp; -} - -@end - -//%PDDM-EXPAND ARRAY_INTERFACE_SIMPLE(Float, float, %f) -// This block of code is generated, do not edit it directly. - -#pragma mark - Float - -@implementation GPBFloatArray { - @package - float *_values; - NSUInteger _count; - NSUInteger _capacity; -} - -@synthesize count = _count; - -+ (instancetype)array { - return [[[self alloc] init] autorelease]; -} - -+ (instancetype)arrayWithValue:(float)value { - // Cast is needed so the compiler knows what class we are invoking initWithValues: on to get - // the type correct. - return [[(GPBFloatArray*)[self alloc] initWithValues:&value count:1] autorelease]; -} - -+ (instancetype)arrayWithValueArray:(GPBFloatArray *)array { - return [[(GPBFloatArray*)[self alloc] initWithValueArray:array] autorelease]; -} - -+ (instancetype)arrayWithCapacity:(NSUInteger)count { - return [[[self alloc] initWithCapacity:count] autorelease]; -} - -- (instancetype)init { - self = [super init]; - // No work needed; - return self; -} - -- (instancetype)initWithValueArray:(GPBFloatArray *)array { - return [self initWithValues:array->_values count:array->_count]; -} - -- (instancetype)initWithValues:(const float [])values count:(NSUInteger)count { - self = [self init]; - if (self) { - if (count && values) { - _values = reallocf(_values, count * sizeof(float)); - if (_values != NULL) { - _capacity = count; - memcpy(_values, values, count * sizeof(float)); - _count = count; - } else { - [self release]; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(count * sizeof(float))]; - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)count { - self = [self initWithValues:NULL count:0]; - if (self && count) { - [self internalResizeToCapacity:count]; - } - return self; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBFloatArray allocWithZone:zone] initWithValues:_values count:_count]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - free(_values); - [super dealloc]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBFloatArray class]]) { - return NO; - } - GPBFloatArray *otherArray = other; - return (_count == otherArray->_count - && memcmp(_values, otherArray->_values, (_count * sizeof(float))) == 0); -} - -- (NSUInteger)hash { - // Follow NSArray's lead, and use the count as the hash. - return _count; -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> { ", [self class], self]; - for (NSUInteger i = 0, count = _count; i < count; ++i) { - if (i == 0) { - [result appendFormat:@"%f", _values[i]]; - } else { - [result appendFormat:@", %f", _values[i]]; - } - } - [result appendFormat:@" }"]; - return result; -} - -- (void)enumerateValuesWithBlock:(void (^)(float value, NSUInteger idx, BOOL *stop))block { - [self enumerateValuesWithOptions:(NSEnumerationOptions)0 usingBlock:block]; -} - -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(float value, NSUInteger idx, BOOL *stop))block { - // NSEnumerationConcurrent isn't currently supported (and Apple's docs say that is ok). - BOOL stop = NO; - if ((opts & NSEnumerationReverse) == 0) { - for (NSUInteger i = 0, count = _count; i < count; ++i) { - block(_values[i], i, &stop); - if (stop) break; - } - } else if (_count > 0) { - for (NSUInteger i = _count; i > 0; --i) { - block(_values[i - 1], (i - 1), &stop); - if (stop) break; - } - } -} - -- (float)valueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - return _values[index]; -} - -- (void)internalResizeToCapacity:(NSUInteger)newCapacity { - _values = reallocf(_values, newCapacity * sizeof(float)); - if (_values == NULL) { - _capacity = 0; - _count = 0; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(newCapacity * sizeof(float))]; - } - _capacity = newCapacity; -} - -- (void)addValue:(float)value { - [self addValues:&value count:1]; -} - -- (void)addValues:(const float [])values count:(NSUInteger)count { - if (values == NULL || count == 0) return; - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + count; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - memcpy(&_values[initialCount], values, count * sizeof(float)); - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)insertValue:(float)value atIndex:(NSUInteger)index { - if (index >= _count + 1) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count + 1]; - } - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + 1; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - if (index != initialCount) { - memmove(&_values[index + 1], &_values[index], (initialCount - index) * sizeof(float)); - } - _values[index] = value; - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(float)value { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - _values[index] = value; -} - -- (void)addValuesFromArray:(GPBFloatArray *)array { - [self addValues:array->_values count:array->_count]; -} - -- (void)removeValueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - NSUInteger newCount = _count - 1; - if (index != newCount) { - memmove(&_values[index], &_values[index + 1], (newCount - index) * sizeof(float)); - } - _count = newCount; - if ((newCount + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } -} - -- (void)removeAll { - _count = 0; - if ((0 + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(0)]; - } -} - -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2 { - if (idx1 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx1, (unsigned long)_count]; - } - if (idx2 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx2, (unsigned long)_count]; - } - float temp = _values[idx1]; - _values[idx1] = _values[idx2]; - _values[idx2] = temp; -} - -@end - -//%PDDM-EXPAND ARRAY_INTERFACE_SIMPLE(Double, double, %lf) -// This block of code is generated, do not edit it directly. - -#pragma mark - Double - -@implementation GPBDoubleArray { - @package - double *_values; - NSUInteger _count; - NSUInteger _capacity; -} - -@synthesize count = _count; - -+ (instancetype)array { - return [[[self alloc] init] autorelease]; -} - -+ (instancetype)arrayWithValue:(double)value { - // Cast is needed so the compiler knows what class we are invoking initWithValues: on to get - // the type correct. - return [[(GPBDoubleArray*)[self alloc] initWithValues:&value count:1] autorelease]; -} - -+ (instancetype)arrayWithValueArray:(GPBDoubleArray *)array { - return [[(GPBDoubleArray*)[self alloc] initWithValueArray:array] autorelease]; -} - -+ (instancetype)arrayWithCapacity:(NSUInteger)count { - return [[[self alloc] initWithCapacity:count] autorelease]; -} - -- (instancetype)init { - self = [super init]; - // No work needed; - return self; -} - -- (instancetype)initWithValueArray:(GPBDoubleArray *)array { - return [self initWithValues:array->_values count:array->_count]; -} - -- (instancetype)initWithValues:(const double [])values count:(NSUInteger)count { - self = [self init]; - if (self) { - if (count && values) { - _values = reallocf(_values, count * sizeof(double)); - if (_values != NULL) { - _capacity = count; - memcpy(_values, values, count * sizeof(double)); - _count = count; - } else { - [self release]; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(count * sizeof(double))]; - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)count { - self = [self initWithValues:NULL count:0]; - if (self && count) { - [self internalResizeToCapacity:count]; - } - return self; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBDoubleArray allocWithZone:zone] initWithValues:_values count:_count]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - free(_values); - [super dealloc]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBDoubleArray class]]) { - return NO; - } - GPBDoubleArray *otherArray = other; - return (_count == otherArray->_count - && memcmp(_values, otherArray->_values, (_count * sizeof(double))) == 0); -} - -- (NSUInteger)hash { - // Follow NSArray's lead, and use the count as the hash. - return _count; -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> { ", [self class], self]; - for (NSUInteger i = 0, count = _count; i < count; ++i) { - if (i == 0) { - [result appendFormat:@"%lf", _values[i]]; - } else { - [result appendFormat:@", %lf", _values[i]]; - } - } - [result appendFormat:@" }"]; - return result; -} - -- (void)enumerateValuesWithBlock:(void (^)(double value, NSUInteger idx, BOOL *stop))block { - [self enumerateValuesWithOptions:(NSEnumerationOptions)0 usingBlock:block]; -} - -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(double value, NSUInteger idx, BOOL *stop))block { - // NSEnumerationConcurrent isn't currently supported (and Apple's docs say that is ok). - BOOL stop = NO; - if ((opts & NSEnumerationReverse) == 0) { - for (NSUInteger i = 0, count = _count; i < count; ++i) { - block(_values[i], i, &stop); - if (stop) break; - } - } else if (_count > 0) { - for (NSUInteger i = _count; i > 0; --i) { - block(_values[i - 1], (i - 1), &stop); - if (stop) break; - } - } -} - -- (double)valueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - return _values[index]; -} - -- (void)internalResizeToCapacity:(NSUInteger)newCapacity { - _values = reallocf(_values, newCapacity * sizeof(double)); - if (_values == NULL) { - _capacity = 0; - _count = 0; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(newCapacity * sizeof(double))]; - } - _capacity = newCapacity; -} - -- (void)addValue:(double)value { - [self addValues:&value count:1]; -} - -- (void)addValues:(const double [])values count:(NSUInteger)count { - if (values == NULL || count == 0) return; - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + count; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - memcpy(&_values[initialCount], values, count * sizeof(double)); - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)insertValue:(double)value atIndex:(NSUInteger)index { - if (index >= _count + 1) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count + 1]; - } - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + 1; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - if (index != initialCount) { - memmove(&_values[index + 1], &_values[index], (initialCount - index) * sizeof(double)); - } - _values[index] = value; - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(double)value { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - _values[index] = value; -} - -- (void)addValuesFromArray:(GPBDoubleArray *)array { - [self addValues:array->_values count:array->_count]; -} - -- (void)removeValueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - NSUInteger newCount = _count - 1; - if (index != newCount) { - memmove(&_values[index], &_values[index + 1], (newCount - index) * sizeof(double)); - } - _count = newCount; - if ((newCount + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } -} - -- (void)removeAll { - _count = 0; - if ((0 + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(0)]; - } -} - -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2 { - if (idx1 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx1, (unsigned long)_count]; - } - if (idx2 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx2, (unsigned long)_count]; - } - double temp = _values[idx1]; - _values[idx1] = _values[idx2]; - _values[idx2] = temp; -} - -@end - -//%PDDM-EXPAND ARRAY_INTERFACE_SIMPLE(Bool, BOOL, %d) -// This block of code is generated, do not edit it directly. - -#pragma mark - Bool - -@implementation GPBBoolArray { - @package - BOOL *_values; - NSUInteger _count; - NSUInteger _capacity; -} - -@synthesize count = _count; - -+ (instancetype)array { - return [[[self alloc] init] autorelease]; -} - -+ (instancetype)arrayWithValue:(BOOL)value { - // Cast is needed so the compiler knows what class we are invoking initWithValues: on to get - // the type correct. - return [[(GPBBoolArray*)[self alloc] initWithValues:&value count:1] autorelease]; -} - -+ (instancetype)arrayWithValueArray:(GPBBoolArray *)array { - return [[(GPBBoolArray*)[self alloc] initWithValueArray:array] autorelease]; -} - -+ (instancetype)arrayWithCapacity:(NSUInteger)count { - return [[[self alloc] initWithCapacity:count] autorelease]; -} - -- (instancetype)init { - self = [super init]; - // No work needed; - return self; -} - -- (instancetype)initWithValueArray:(GPBBoolArray *)array { - return [self initWithValues:array->_values count:array->_count]; -} - -- (instancetype)initWithValues:(const BOOL [])values count:(NSUInteger)count { - self = [self init]; - if (self) { - if (count && values) { - _values = reallocf(_values, count * sizeof(BOOL)); - if (_values != NULL) { - _capacity = count; - memcpy(_values, values, count * sizeof(BOOL)); - _count = count; - } else { - [self release]; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(count * sizeof(BOOL))]; - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)count { - self = [self initWithValues:NULL count:0]; - if (self && count) { - [self internalResizeToCapacity:count]; - } - return self; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBBoolArray allocWithZone:zone] initWithValues:_values count:_count]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - free(_values); - [super dealloc]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBBoolArray class]]) { - return NO; - } - GPBBoolArray *otherArray = other; - return (_count == otherArray->_count - && memcmp(_values, otherArray->_values, (_count * sizeof(BOOL))) == 0); -} - -- (NSUInteger)hash { - // Follow NSArray's lead, and use the count as the hash. - return _count; -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> { ", [self class], self]; - for (NSUInteger i = 0, count = _count; i < count; ++i) { - if (i == 0) { - [result appendFormat:@"%d", _values[i]]; - } else { - [result appendFormat:@", %d", _values[i]]; - } - } - [result appendFormat:@" }"]; - return result; -} - -- (void)enumerateValuesWithBlock:(void (^)(BOOL value, NSUInteger idx, BOOL *stop))block { - [self enumerateValuesWithOptions:(NSEnumerationOptions)0 usingBlock:block]; -} - -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(BOOL value, NSUInteger idx, BOOL *stop))block { - // NSEnumerationConcurrent isn't currently supported (and Apple's docs say that is ok). - BOOL stop = NO; - if ((opts & NSEnumerationReverse) == 0) { - for (NSUInteger i = 0, count = _count; i < count; ++i) { - block(_values[i], i, &stop); - if (stop) break; - } - } else if (_count > 0) { - for (NSUInteger i = _count; i > 0; --i) { - block(_values[i - 1], (i - 1), &stop); - if (stop) break; - } - } -} - -- (BOOL)valueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - return _values[index]; -} - -- (void)internalResizeToCapacity:(NSUInteger)newCapacity { - _values = reallocf(_values, newCapacity * sizeof(BOOL)); - if (_values == NULL) { - _capacity = 0; - _count = 0; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(newCapacity * sizeof(BOOL))]; - } - _capacity = newCapacity; -} - -- (void)addValue:(BOOL)value { - [self addValues:&value count:1]; -} - -- (void)addValues:(const BOOL [])values count:(NSUInteger)count { - if (values == NULL || count == 0) return; - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + count; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - memcpy(&_values[initialCount], values, count * sizeof(BOOL)); - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)insertValue:(BOOL)value atIndex:(NSUInteger)index { - if (index >= _count + 1) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count + 1]; - } - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + 1; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - if (index != initialCount) { - memmove(&_values[index + 1], &_values[index], (initialCount - index) * sizeof(BOOL)); - } - _values[index] = value; - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(BOOL)value { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - _values[index] = value; -} - -- (void)addValuesFromArray:(GPBBoolArray *)array { - [self addValues:array->_values count:array->_count]; -} - -- (void)removeValueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - NSUInteger newCount = _count - 1; - if (index != newCount) { - memmove(&_values[index], &_values[index + 1], (newCount - index) * sizeof(BOOL)); - } - _count = newCount; - if ((newCount + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } -} - -- (void)removeAll { - _count = 0; - if ((0 + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(0)]; - } -} - -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2 { - if (idx1 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx1, (unsigned long)_count]; - } - if (idx2 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx2, (unsigned long)_count]; - } - BOOL temp = _values[idx1]; - _values[idx1] = _values[idx2]; - _values[idx2] = temp; -} - -@end - -//%PDDM-EXPAND-END (7 expansions) - -#pragma mark - Enum - -@implementation GPBEnumArray { - @package - GPBEnumValidationFunc _validationFunc; - int32_t *_values; - NSUInteger _count; - NSUInteger _capacity; -} - -@synthesize count = _count; -@synthesize validationFunc = _validationFunc; - -+ (instancetype)array { - return [[[self alloc] initWithValidationFunction:NULL] autorelease]; -} - -+ (instancetype)arrayWithValidationFunction:(GPBEnumValidationFunc)func { - return [[[self alloc] initWithValidationFunction:func] autorelease]; -} - -+ (instancetype)arrayWithValidationFunction:(GPBEnumValidationFunc)func - rawValue:(int32_t)value { - return [[[self alloc] initWithValidationFunction:func - rawValues:&value - count:1] autorelease]; -} - -+ (instancetype)arrayWithValueArray:(GPBEnumArray *)array { - return [[(GPBEnumArray*)[self alloc] initWithValueArray:array] autorelease]; -} - -+ (instancetype)arrayWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)count { - return [[[self alloc] initWithValidationFunction:func capacity:count] autorelease]; -} - -- (instancetype)init { - return [self initWithValidationFunction:NULL]; -} - -- (instancetype)initWithValueArray:(GPBEnumArray *)array { - return [self initWithValidationFunction:array->_validationFunc - rawValues:array->_values - count:array->_count]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func { - self = [super init]; - if (self) { - _validationFunc = (func != NULL ? func : ArrayDefault_IsValidValue); - } - return self; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - count:(NSUInteger)count { - self = [self initWithValidationFunction:func]; - if (self) { - if (count && values) { - _values = reallocf(_values, count * sizeof(int32_t)); - if (_values != NULL) { - _capacity = count; - memcpy(_values, values, count * sizeof(int32_t)); - _count = count; - } else { - [self release]; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(count * sizeof(int32_t))]; - } - } - } - return self; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)count { - self = [self initWithValidationFunction:func]; - if (self && count) { - [self internalResizeToCapacity:count]; - } - return self; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBEnumArray allocWithZone:zone] - initWithValidationFunction:_validationFunc - rawValues:_values - count:_count]; -} - -//%PDDM-EXPAND ARRAY_IMMUTABLE_CORE(Enum, int32_t, Raw, %d) -// This block of code is generated, do not edit it directly. - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - free(_values); - [super dealloc]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBEnumArray class]]) { - return NO; - } - GPBEnumArray *otherArray = other; - return (_count == otherArray->_count - && memcmp(_values, otherArray->_values, (_count * sizeof(int32_t))) == 0); -} - -- (NSUInteger)hash { - // Follow NSArray's lead, and use the count as the hash. - return _count; -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> { ", [self class], self]; - for (NSUInteger i = 0, count = _count; i < count; ++i) { - if (i == 0) { - [result appendFormat:@"%d", _values[i]]; - } else { - [result appendFormat:@", %d", _values[i]]; - } - } - [result appendFormat:@" }"]; - return result; -} - -- (void)enumerateRawValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block { - [self enumerateRawValuesWithOptions:(NSEnumerationOptions)0 usingBlock:block]; -} - -- (void)enumerateRawValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block { - // NSEnumerationConcurrent isn't currently supported (and Apple's docs say that is ok). - BOOL stop = NO; - if ((opts & NSEnumerationReverse) == 0) { - for (NSUInteger i = 0, count = _count; i < count; ++i) { - block(_values[i], i, &stop); - if (stop) break; - } - } else if (_count > 0) { - for (NSUInteger i = _count; i > 0; --i) { - block(_values[i - 1], (i - 1), &stop); - if (stop) break; - } - } -} -//%PDDM-EXPAND-END ARRAY_IMMUTABLE_CORE(Enum, int32_t, Raw, %d) - -- (int32_t)valueAtIndex:(NSUInteger)index { -//%PDDM-EXPAND VALIDATE_RANGE(index, _count) -// This block of code is generated, do not edit it directly. - - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } -//%PDDM-EXPAND-END VALIDATE_RANGE(index, _count) - int32_t result = _values[index]; - if (!_validationFunc(result)) { - result = kGPBUnrecognizedEnumeratorValue; - } - return result; -} - -- (int32_t)rawValueAtIndex:(NSUInteger)index { -//%PDDM-EXPAND VALIDATE_RANGE(index, _count) -// This block of code is generated, do not edit it directly. - - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } -//%PDDM-EXPAND-END VALIDATE_RANGE(index, _count) - return _values[index]; -} - -- (void)enumerateValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block { - [self enumerateValuesWithOptions:(NSEnumerationOptions)0 usingBlock:block]; -} - -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block { - // NSEnumerationConcurrent isn't currently supported (and Apple's docs say that is ok). - BOOL stop = NO; - GPBEnumValidationFunc func = _validationFunc; - if ((opts & NSEnumerationReverse) == 0) { - int32_t *scan = _values; - int32_t *end = scan + _count; - for (NSUInteger i = 0; scan < end; ++i, ++scan) { - int32_t value = *scan; - if (!func(value)) { - value = kGPBUnrecognizedEnumeratorValue; - } - block(value, i, &stop); - if (stop) break; - } - } else if (_count > 0) { - int32_t *end = _values; - int32_t *scan = end + (_count - 1); - for (NSUInteger i = (_count - 1); scan >= end; --i, --scan) { - int32_t value = *scan; - if (!func(value)) { - value = kGPBUnrecognizedEnumeratorValue; - } - block(value, i, &stop); - if (stop) break; - } - } -} - -//%PDDM-EXPAND ARRAY_MUTABLE_CORE(Enum, int32_t, Raw, %d) -// This block of code is generated, do not edit it directly. - -- (void)internalResizeToCapacity:(NSUInteger)newCapacity { - _values = reallocf(_values, newCapacity * sizeof(int32_t)); - if (_values == NULL) { - _capacity = 0; - _count = 0; - [NSException raise:NSMallocException - format:@"Failed to allocate %lu bytes", - (unsigned long)(newCapacity * sizeof(int32_t))]; - } - _capacity = newCapacity; -} - -- (void)addRawValue:(int32_t)value { - [self addRawValues:&value count:1]; -} - -- (void)addRawValues:(const int32_t [])values count:(NSUInteger)count { - if (values == NULL || count == 0) return; - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + count; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - memcpy(&_values[initialCount], values, count * sizeof(int32_t)); - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)insertRawValue:(int32_t)value atIndex:(NSUInteger)index { - if (index >= _count + 1) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count + 1]; - } - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + 1; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - if (index != initialCount) { - memmove(&_values[index + 1], &_values[index], (initialCount - index) * sizeof(int32_t)); - } - _values[index] = value; - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)replaceValueAtIndex:(NSUInteger)index withRawValue:(int32_t)value { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - _values[index] = value; -} - -- (void)addRawValuesFromArray:(GPBEnumArray *)array { - [self addRawValues:array->_values count:array->_count]; -} - -- (void)removeValueAtIndex:(NSUInteger)index { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - NSUInteger newCount = _count - 1; - if (index != newCount) { - memmove(&_values[index], &_values[index + 1], (newCount - index) * sizeof(int32_t)); - } - _count = newCount; - if ((newCount + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } -} - -- (void)removeAll { - _count = 0; - if ((0 + (2 * kChunkSize)) < _capacity) { - [self internalResizeToCapacity:CapacityFromCount(0)]; - } -} - -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2 { - if (idx1 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx1, (unsigned long)_count]; - } - if (idx2 >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)idx2, (unsigned long)_count]; - } - int32_t temp = _values[idx1]; - _values[idx1] = _values[idx2]; - _values[idx2] = temp; -} - -//%PDDM-EXPAND MUTATION_METHODS(Enum, int32_t, , EnumValidationList, EnumValidationOne) -// This block of code is generated, do not edit it directly. - -- (void)addValue:(int32_t)value { - [self addValues:&value count:1]; -} - -- (void)addValues:(const int32_t [])values count:(NSUInteger)count { - if (values == NULL || count == 0) return; - GPBEnumValidationFunc func = _validationFunc; - for (NSUInteger i = 0; i < count; ++i) { - if (!func(values[i])) { - [NSException raise:NSInvalidArgumentException - format:@"%@: Attempt to set an unknown enum value (%d)", - [self class], values[i]]; - } - } - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + count; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - memcpy(&_values[initialCount], values, count * sizeof(int32_t)); - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)insertValue:(int32_t)value atIndex:(NSUInteger)index { - if (index >= _count + 1) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count + 1]; - } - if (!_validationFunc(value)) { - [NSException raise:NSInvalidArgumentException - format:@"%@: Attempt to set an unknown enum value (%d)", - [self class], value]; - } - NSUInteger initialCount = _count; - NSUInteger newCount = initialCount + 1; - if (newCount > _capacity) { - [self internalResizeToCapacity:CapacityFromCount(newCount)]; - } - _count = newCount; - if (index != initialCount) { - memmove(&_values[index + 1], &_values[index], (initialCount - index) * sizeof(int32_t)); - } - _values[index] = value; - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int32_t)value { - if (index >= _count) { - [NSException raise:NSRangeException - format:@"Index (%lu) beyond bounds (%lu)", - (unsigned long)index, (unsigned long)_count]; - } - if (!_validationFunc(value)) { - [NSException raise:NSInvalidArgumentException - format:@"%@: Attempt to set an unknown enum value (%d)", - [self class], value]; - } - _values[index] = value; -} -//%PDDM-EXPAND-END (2 expansions) - -//%PDDM-DEFINE MUTATION_HOOK_EnumValidationList() -//% GPBEnumValidationFunc func = _validationFunc; -//% for (NSUInteger i = 0; i < count; ++i) { -//% if (!func(values[i])) { -//% [NSException raise:NSInvalidArgumentException -//% format:@"%@: Attempt to set an unknown enum value (%d)", -//% [self class], values[i]]; -//% } -//% } -//% -//%PDDM-DEFINE MUTATION_HOOK_EnumValidationOne() -//% if (!_validationFunc(value)) { -//% [NSException raise:NSInvalidArgumentException -//% format:@"%@: Attempt to set an unknown enum value (%d)", -//% [self class], value]; -//% } -//% - -@end - -#pragma mark - NSArray Subclass - -@implementation GPBAutocreatedArray { - NSMutableArray *_array; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_array release]; - [super dealloc]; -} - -#pragma mark Required NSArray overrides - -- (NSUInteger)count { - return [_array count]; -} - -- (id)objectAtIndex:(NSUInteger)idx { - return [_array objectAtIndex:idx]; -} - -#pragma mark Required NSMutableArray overrides - -// Only need to call GPBAutocreatedArrayModified() when adding things since -// we only autocreate empty arrays. - -- (void)insertObject:(id)anObject atIndex:(NSUInteger)idx { - if (_array == nil) { - _array = [[NSMutableArray alloc] init]; - } - [_array insertObject:anObject atIndex:idx]; - - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)removeObject:(id)anObject { - [_array removeObject:anObject]; -} - -- (void)removeObjectAtIndex:(NSUInteger)idx { - [_array removeObjectAtIndex:idx]; -} - -- (void)addObject:(id)anObject { - if (_array == nil) { - _array = [[NSMutableArray alloc] init]; - } - [_array addObject:anObject]; - - if (_autocreator) { - GPBAutocreatedArrayModified(_autocreator, self); - } -} - -- (void)removeLastObject { - [_array removeLastObject]; -} - -- (void)replaceObjectAtIndex:(NSUInteger)idx withObject:(id)anObject { - [_array replaceObjectAtIndex:idx withObject:anObject]; -} - -#pragma mark Extra things hooked - -- (id)copyWithZone:(NSZone *)zone { - if (_array == nil) { - return [[NSMutableArray allocWithZone:zone] init]; - } - return [_array copyWithZone:zone]; -} - -- (id)mutableCopyWithZone:(NSZone *)zone { - if (_array == nil) { - return [[NSMutableArray allocWithZone:zone] init]; - } - return [_array mutableCopyWithZone:zone]; -} - -- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state - objects:(id __unsafe_unretained [])buffer - count:(NSUInteger)len { - return [_array countByEnumeratingWithState:state objects:buffer count:len]; -} - -- (void)enumerateObjectsUsingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block { - [_array enumerateObjectsUsingBlock:block]; -} - -- (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block { - [_array enumerateObjectsWithOptions:opts usingBlock:block]; -} - -@end - -#pragma clang diagnostic pop diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBArray_PackagePrivate.h b/Old My Mind/Pods/Protobuf/objectivec/GPBArray_PackagePrivate.h deleted file mode 100755 index 35a4538..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBArray_PackagePrivate.h +++ /dev/null @@ -1,130 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2015 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBArray.h" - -@class GPBMessage; - -//%PDDM-DEFINE DECLARE_ARRAY_EXTRAS() -//%ARRAY_INTERFACE_EXTRAS(Int32, int32_t) -//%ARRAY_INTERFACE_EXTRAS(UInt32, uint32_t) -//%ARRAY_INTERFACE_EXTRAS(Int64, int64_t) -//%ARRAY_INTERFACE_EXTRAS(UInt64, uint64_t) -//%ARRAY_INTERFACE_EXTRAS(Float, float) -//%ARRAY_INTERFACE_EXTRAS(Double, double) -//%ARRAY_INTERFACE_EXTRAS(Bool, BOOL) -//%ARRAY_INTERFACE_EXTRAS(Enum, int32_t) - -//%PDDM-DEFINE ARRAY_INTERFACE_EXTRAS(NAME, TYPE) -//%#pragma mark - NAME -//% -//%@interface GPB##NAME##Array () { -//% @package -//% GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -//%} -//%@end -//% - -//%PDDM-EXPAND DECLARE_ARRAY_EXTRAS() -// This block of code is generated, do not edit it directly. - -#pragma mark - Int32 - -@interface GPBInt32Array () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - UInt32 - -@interface GPBUInt32Array () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Int64 - -@interface GPBInt64Array () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - UInt64 - -@interface GPBUInt64Array () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Float - -@interface GPBFloatArray () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Double - -@interface GPBDoubleArray () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Bool - -@interface GPBBoolArray () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Enum - -@interface GPBEnumArray () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -//%PDDM-EXPAND-END DECLARE_ARRAY_EXTRAS() - -#pragma mark - NSArray Subclass - -@interface GPBAutocreatedArray : NSMutableArray { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBBootstrap.h b/Old My Mind/Pods/Protobuf/objectivec/GPBBootstrap.h deleted file mode 100755 index ed53ae7..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBBootstrap.h +++ /dev/null @@ -1,123 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/** - * The Objective C runtime has complete enough info that most protos don’t end - * up using this, so leaving it on is no cost or very little cost. If you - * happen to see it causing bloat, this is the way to disable it. If you do - * need to disable it, try only disabling it for Release builds as having - * full TextFormat can be useful for debugging. - **/ -#ifndef GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS -#define GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS 0 -#endif - -// Used in the generated code to give sizes to enums. int32_t was chosen based -// on the fact that Protocol Buffers enums are limited to this range. -#if !__has_feature(objc_fixed_enum) - #error All supported Xcode versions should support objc_fixed_enum. -#endif - -// If the headers are imported into Objective-C++, we can run into an issue -// where the defintion of NS_ENUM (really CF_ENUM) changes based on the C++ -// standard that is in effect. If it isn't C++11 or higher, the definition -// doesn't allow us to forward declare. We work around this one case by -// providing a local definition. The default case has to use NS_ENUM for the -// magic that is Swift bridging of enums. -#if (defined(__cplusplus) && __cplusplus && __cplusplus < 201103L) - #define GPB_ENUM(X) enum X : int32_t X; enum X : int32_t -#else - #define GPB_ENUM(X) NS_ENUM(int32_t, X) -#endif - -/** - * GPB_ENUM_FWD_DECLARE is used for forward declaring enums, for example: - * - * ``` - * GPB_ENUM_FWD_DECLARE(Foo_Enum) - * - * @interface BarClass : NSObject - * @property (nonatomic) enum Foo_Enum value; - * - (void)bazMethod:(enum Foo_Enum):value; - * @end - * ``` - **/ -#define GPB_ENUM_FWD_DECLARE(X) enum X : int32_t - -/** - * Based upon CF_INLINE. Forces inlining in non DEBUG builds. - **/ -#if !defined(DEBUG) -#define GPB_INLINE static __inline__ __attribute__((always_inline)) -#else -#define GPB_INLINE static __inline__ -#endif - -/** - * For use in public headers that might need to deal with ARC. - **/ -#ifndef GPB_UNSAFE_UNRETAINED -#if __has_feature(objc_arc) -#define GPB_UNSAFE_UNRETAINED __unsafe_unretained -#else -#define GPB_UNSAFE_UNRETAINED -#endif -#endif - -// If property name starts with init we need to annotate it to get past ARC. -// http://stackoverflow.com/questions/18723226/how-do-i-annotate-an-objective-c-property-with-an-objc-method-family/18723227#18723227 -// -// Meant to be used internally by generated code. -#define GPB_METHOD_FAMILY_NONE __attribute__((objc_method_family(none))) - -// ---------------------------------------------------------------------------- -// These version numbers are all internal to the ObjC Protobuf runtime; they -// are used to ensure compatibility between the generated sources and the -// headers being compiled against and/or the version of sources being run -// against. -// -// They are all #defines so the values are captured into every .o file they -// are used in and to allow comparisons in the preprocessor. - -// Current library runtime version. -// - Gets bumped when the runtime makes changes to the interfaces between the -// generated code and runtime (things added/removed, etc). -#define GOOGLE_PROTOBUF_OBJC_VERSION 30002 - -// Minimum runtime version supported for compiling/running against. -// - Gets changed when support for the older generated code is dropped. -#define GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION 30001 - - -// This is a legacy constant now frozen in time for old generated code. If -// GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION ever gets moved above 30001 then -// this should also change to break code compiled with an old runtime that -// can't be supported any more. -#define GOOGLE_PROTOBUF_OBJC_GEN_VERSION 30001 diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream.h b/Old My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream.h deleted file mode 100755 index fbe5009..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream.h +++ /dev/null @@ -1,253 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -@class GPBMessage; -@class GPBExtensionRegistry; - -NS_ASSUME_NONNULL_BEGIN - -CF_EXTERN_C_BEGIN - -/** - * @c GPBCodedInputStream exception name. Exceptions raised from - * @c GPBCodedInputStream contain an underlying error in the userInfo dictionary - * under the GPBCodedInputStreamUnderlyingErrorKey key. - **/ -extern NSString *const GPBCodedInputStreamException; - -/** The key under which the underlying NSError from the exception is stored. */ -extern NSString *const GPBCodedInputStreamUnderlyingErrorKey; - -/** NSError domain used for @c GPBCodedInputStream errors. */ -extern NSString *const GPBCodedInputStreamErrorDomain; - -/** - * Error code for NSError with @c GPBCodedInputStreamErrorDomain. - **/ -typedef NS_ENUM(NSInteger, GPBCodedInputStreamErrorCode) { - /** The size does not fit in the remaining bytes to be read. */ - GPBCodedInputStreamErrorInvalidSize = -100, - /** Attempted to read beyond the subsection limit. */ - GPBCodedInputStreamErrorSubsectionLimitReached = -101, - /** The requested subsection limit is invalid. */ - GPBCodedInputStreamErrorInvalidSubsectionLimit = -102, - /** Invalid tag read. */ - GPBCodedInputStreamErrorInvalidTag = -103, - /** Invalid UTF-8 character in a string. */ - GPBCodedInputStreamErrorInvalidUTF8 = -104, - /** Invalid VarInt read. */ - GPBCodedInputStreamErrorInvalidVarInt = -105, - /** The maximum recursion depth of messages was exceeded. */ - GPBCodedInputStreamErrorRecursionDepthExceeded = -106, -}; - -CF_EXTERN_C_END - -/** - * Reads and decodes protocol message fields. - * - * The common uses of protocol buffers shouldn't need to use this class. - * @c GPBMessage's provide a @c +parseFromData:error: and - * @c +parseFromData:extensionRegistry:error: method that will decode a - * message for you. - * - * @note Subclassing of @c GPBCodedInputStream is NOT supported. - **/ -@interface GPBCodedInputStream : NSObject - -/** - * Creates a new stream wrapping some data. - * - * @param data The data to wrap inside the stream. - * - * @return A newly instanced GPBCodedInputStream. - **/ -+ (instancetype)streamWithData:(NSData *)data; - -/** - * Initializes a stream wrapping some data. - * - * @param data The data to wrap inside the stream. - * - * @return A newly initialized GPBCodedInputStream. - **/ -- (instancetype)initWithData:(NSData *)data; - -/** - * Attempts to read a field tag, returning zero if we have reached EOF. - * Protocol message parsers use this to read tags, since a protocol message - * may legally end wherever a tag occurs, and zero is not a valid tag number. - * - * @return The field tag, or zero if EOF was reached. - **/ -- (int32_t)readTag; - -/** - * @return A double read from the stream. - **/ -- (double)readDouble; -/** - * @return A float read from the stream. - **/ -- (float)readFloat; -/** - * @return A uint64 read from the stream. - **/ -- (uint64_t)readUInt64; -/** - * @return A uint32 read from the stream. - **/ -- (uint32_t)readUInt32; -/** - * @return An int64 read from the stream. - **/ -- (int64_t)readInt64; -/** - * @return An int32 read from the stream. - **/ -- (int32_t)readInt32; -/** - * @return A fixed64 read from the stream. - **/ -- (uint64_t)readFixed64; -/** - * @return A fixed32 read from the stream. - **/ -- (uint32_t)readFixed32; -/** - * @return An enum read from the stream. - **/ -- (int32_t)readEnum; -/** - * @return A sfixed32 read from the stream. - **/ -- (int32_t)readSFixed32; -/** - * @return A fixed64 read from the stream. - **/ -- (int64_t)readSFixed64; -/** - * @return A sint32 read from the stream. - **/ -- (int32_t)readSInt32; -/** - * @return A sint64 read from the stream. - **/ -- (int64_t)readSInt64; -/** - * @return A boolean read from the stream. - **/ -- (BOOL)readBool; -/** - * @return A string read from the stream. - **/ -- (NSString *)readString; -/** - * @return Data read from the stream. - **/ -- (NSData *)readBytes; - -/** - * Read an embedded message field value from the stream. - * - * @param message The message to set fields on as they are read. - * @param extensionRegistry An optional extension registry to use to lookup - * extensions for message. - **/ -- (void)readMessage:(GPBMessage *)message - extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry; - -/** - * Reads and discards a single field, given its tag value. - * - * @param tag The tag number of the field to skip. - * - * @return NO if the tag is an endgroup tag (in which case nothing is skipped), - * YES in all other cases. - **/ -- (BOOL)skipField:(int32_t)tag; - -/** - * Reads and discards an entire message. This will read either until EOF or - * until an endgroup tag, whichever comes first. - **/ -- (void)skipMessage; - -/** - * Check to see if the logical end of the stream has been reached. - * - * @note This can return NO when there is no more data, but the current parsing - * expected more data. - * - * @return YES if the logical end of the stream has been reached, NO otherwise. - **/ -- (BOOL)isAtEnd; - -/** - * @return The offset into the stream. - **/ -- (size_t)position; - -/** - * Moves the limit to the given byte offset starting at the current location. - * - * @exception GPBCodedInputStreamException If the requested bytes exceeed the - * current limit. - * - * @param byteLimit The number of bytes to move the limit, offset to the current - * location. - * - * @return The limit offset before moving the new limit. - */ -- (size_t)pushLimit:(size_t)byteLimit; - -/** - * Moves the limit back to the offset as it was before calling pushLimit:. - * - * @param oldLimit The number of bytes to move the current limit. Usually this - * is the value returned by the pushLimit: method. - */ -- (void)popLimit:(size_t)oldLimit; - -/** - * Verifies that the last call to -readTag returned the given tag value. This - * is used to verify that a nested group ended with the correct end tag. - * - * @exception NSParseErrorException If the value does not match the last tag. - * - * @param expected The tag that was expected. - **/ -- (void)checkLastTagWas:(int32_t)expected; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream.m b/Old My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream.m deleted file mode 100755 index e8c8989..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream.m +++ /dev/null @@ -1,533 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBCodedInputStream_PackagePrivate.h" - -#import "GPBDictionary_PackagePrivate.h" -#import "GPBMessage_PackagePrivate.h" -#import "GPBUnknownFieldSet_PackagePrivate.h" -#import "GPBUtilities_PackagePrivate.h" -#import "GPBWireFormat.h" - -NSString *const GPBCodedInputStreamException = - GPBNSStringifySymbol(GPBCodedInputStreamException); - -NSString *const GPBCodedInputStreamUnderlyingErrorKey = - GPBNSStringifySymbol(GPBCodedInputStreamUnderlyingErrorKey); - -NSString *const GPBCodedInputStreamErrorDomain = - GPBNSStringifySymbol(GPBCodedInputStreamErrorDomain); - -static const NSUInteger kDefaultRecursionLimit = 64; - -static void RaiseException(NSInteger code, NSString *reason) { - NSDictionary *errorInfo = nil; - if ([reason length]) { - errorInfo = @{ GPBErrorReasonKey: reason }; - } - NSError *error = [NSError errorWithDomain:GPBCodedInputStreamErrorDomain - code:code - userInfo:errorInfo]; - - NSDictionary *exceptionInfo = - @{ GPBCodedInputStreamUnderlyingErrorKey: error }; - [[[NSException alloc] initWithName:GPBCodedInputStreamException - reason:reason - userInfo:exceptionInfo] raise]; -} - -static void CheckSize(GPBCodedInputStreamState *state, size_t size) { - size_t newSize = state->bufferPos + size; - if (newSize > state->bufferSize) { - RaiseException(GPBCodedInputStreamErrorInvalidSize, nil); - } - if (newSize > state->currentLimit) { - // Fast forward to end of currentLimit; - state->bufferPos = state->currentLimit; - RaiseException(GPBCodedInputStreamErrorSubsectionLimitReached, nil); - } -} - -static int8_t ReadRawByte(GPBCodedInputStreamState *state) { - CheckSize(state, sizeof(int8_t)); - return ((int8_t *)state->bytes)[state->bufferPos++]; -} - -static int32_t ReadRawLittleEndian32(GPBCodedInputStreamState *state) { - CheckSize(state, sizeof(int32_t)); - int32_t value = OSReadLittleInt32(state->bytes, state->bufferPos); - state->bufferPos += sizeof(int32_t); - return value; -} - -static int64_t ReadRawLittleEndian64(GPBCodedInputStreamState *state) { - CheckSize(state, sizeof(int64_t)); - int64_t value = OSReadLittleInt64(state->bytes, state->bufferPos); - state->bufferPos += sizeof(int64_t); - return value; -} - -static int32_t ReadRawVarint32(GPBCodedInputStreamState *state) { - int8_t tmp = ReadRawByte(state); - if (tmp >= 0) { - return tmp; - } - int32_t result = tmp & 0x7f; - if ((tmp = ReadRawByte(state)) >= 0) { - result |= tmp << 7; - } else { - result |= (tmp & 0x7f) << 7; - if ((tmp = ReadRawByte(state)) >= 0) { - result |= tmp << 14; - } else { - result |= (tmp & 0x7f) << 14; - if ((tmp = ReadRawByte(state)) >= 0) { - result |= tmp << 21; - } else { - result |= (tmp & 0x7f) << 21; - result |= (tmp = ReadRawByte(state)) << 28; - if (tmp < 0) { - // Discard upper 32 bits. - for (int i = 0; i < 5; i++) { - if (ReadRawByte(state) >= 0) { - return result; - } - } - RaiseException(GPBCodedInputStreamErrorInvalidVarInt, - @"Invalid VarInt32"); - } - } - } - } - return result; -} - -static int64_t ReadRawVarint64(GPBCodedInputStreamState *state) { - int32_t shift = 0; - int64_t result = 0; - while (shift < 64) { - int8_t b = ReadRawByte(state); - result |= (int64_t)(b & 0x7F) << shift; - if ((b & 0x80) == 0) { - return result; - } - shift += 7; - } - RaiseException(GPBCodedInputStreamErrorInvalidVarInt, @"Invalid VarInt64"); - return 0; -} - -static void SkipRawData(GPBCodedInputStreamState *state, size_t size) { - CheckSize(state, size); - state->bufferPos += size; -} - -double GPBCodedInputStreamReadDouble(GPBCodedInputStreamState *state) { - int64_t value = ReadRawLittleEndian64(state); - return GPBConvertInt64ToDouble(value); -} - -float GPBCodedInputStreamReadFloat(GPBCodedInputStreamState *state) { - int32_t value = ReadRawLittleEndian32(state); - return GPBConvertInt32ToFloat(value); -} - -uint64_t GPBCodedInputStreamReadUInt64(GPBCodedInputStreamState *state) { - uint64_t value = ReadRawVarint64(state); - return value; -} - -uint32_t GPBCodedInputStreamReadUInt32(GPBCodedInputStreamState *state) { - uint32_t value = ReadRawVarint32(state); - return value; -} - -int64_t GPBCodedInputStreamReadInt64(GPBCodedInputStreamState *state) { - int64_t value = ReadRawVarint64(state); - return value; -} - -int32_t GPBCodedInputStreamReadInt32(GPBCodedInputStreamState *state) { - int32_t value = ReadRawVarint32(state); - return value; -} - -uint64_t GPBCodedInputStreamReadFixed64(GPBCodedInputStreamState *state) { - uint64_t value = ReadRawLittleEndian64(state); - return value; -} - -uint32_t GPBCodedInputStreamReadFixed32(GPBCodedInputStreamState *state) { - uint32_t value = ReadRawLittleEndian32(state); - return value; -} - -int32_t GPBCodedInputStreamReadEnum(GPBCodedInputStreamState *state) { - int32_t value = ReadRawVarint32(state); - return value; -} - -int32_t GPBCodedInputStreamReadSFixed32(GPBCodedInputStreamState *state) { - int32_t value = ReadRawLittleEndian32(state); - return value; -} - -int64_t GPBCodedInputStreamReadSFixed64(GPBCodedInputStreamState *state) { - int64_t value = ReadRawLittleEndian64(state); - return value; -} - -int32_t GPBCodedInputStreamReadSInt32(GPBCodedInputStreamState *state) { - int32_t value = GPBDecodeZigZag32(ReadRawVarint32(state)); - return value; -} - -int64_t GPBCodedInputStreamReadSInt64(GPBCodedInputStreamState *state) { - int64_t value = GPBDecodeZigZag64(ReadRawVarint64(state)); - return value; -} - -BOOL GPBCodedInputStreamReadBool(GPBCodedInputStreamState *state) { - return ReadRawVarint32(state) != 0; -} - -int32_t GPBCodedInputStreamReadTag(GPBCodedInputStreamState *state) { - if (GPBCodedInputStreamIsAtEnd(state)) { - state->lastTag = 0; - return 0; - } - - state->lastTag = ReadRawVarint32(state); - if (state->lastTag == 0) { - // If we actually read zero, that's not a valid tag. - RaiseException(GPBCodedInputStreamErrorInvalidTag, - @"A zero tag on the wire is invalid."); - } - // Tags have to include a valid wireformat, check that also. - if (!GPBWireFormatIsValidTag(state->lastTag)) { - RaiseException(GPBCodedInputStreamErrorInvalidTag, - @"Invalid wireformat in tag."); - } - return state->lastTag; -} - -NSString *GPBCodedInputStreamReadRetainedString( - GPBCodedInputStreamState *state) { - int32_t size = ReadRawVarint32(state); - NSString *result; - if (size == 0) { - result = @""; - } else { - CheckSize(state, size); - result = [[NSString alloc] initWithBytes:&state->bytes[state->bufferPos] - length:size - encoding:NSUTF8StringEncoding]; - state->bufferPos += size; - if (!result) { -#ifdef DEBUG - // https://developers.google.com/protocol-buffers/docs/proto#scalar - NSLog(@"UTF-8 failure, is some field type 'string' when it should be " - @"'bytes'?"); -#endif - RaiseException(GPBCodedInputStreamErrorInvalidUTF8, nil); - } - } - return result; -} - -NSData *GPBCodedInputStreamReadRetainedBytes(GPBCodedInputStreamState *state) { - int32_t size = ReadRawVarint32(state); - if (size < 0) return nil; - CheckSize(state, size); - NSData *result = [[NSData alloc] initWithBytes:state->bytes + state->bufferPos - length:size]; - state->bufferPos += size; - return result; -} - -NSData *GPBCodedInputStreamReadRetainedBytesNoCopy( - GPBCodedInputStreamState *state) { - int32_t size = ReadRawVarint32(state); - if (size < 0) return nil; - CheckSize(state, size); - // Cast is safe because freeWhenDone is NO. - NSData *result = [[NSData alloc] - initWithBytesNoCopy:(void *)(state->bytes + state->bufferPos) - length:size - freeWhenDone:NO]; - state->bufferPos += size; - return result; -} - -size_t GPBCodedInputStreamPushLimit(GPBCodedInputStreamState *state, - size_t byteLimit) { - byteLimit += state->bufferPos; - size_t oldLimit = state->currentLimit; - if (byteLimit > oldLimit) { - RaiseException(GPBCodedInputStreamErrorInvalidSubsectionLimit, nil); - } - state->currentLimit = byteLimit; - return oldLimit; -} - -void GPBCodedInputStreamPopLimit(GPBCodedInputStreamState *state, - size_t oldLimit) { - state->currentLimit = oldLimit; -} - -size_t GPBCodedInputStreamBytesUntilLimit(GPBCodedInputStreamState *state) { - return state->currentLimit - state->bufferPos; -} - -BOOL GPBCodedInputStreamIsAtEnd(GPBCodedInputStreamState *state) { - return (state->bufferPos == state->bufferSize) || - (state->bufferPos == state->currentLimit); -} - -void GPBCodedInputStreamCheckLastTagWas(GPBCodedInputStreamState *state, - int32_t value) { - if (state->lastTag != value) { - RaiseException(GPBCodedInputStreamErrorInvalidTag, @"Unexpected tag read"); - } -} - -@implementation GPBCodedInputStream - -+ (instancetype)streamWithData:(NSData *)data { - return [[[self alloc] initWithData:data] autorelease]; -} - -- (instancetype)initWithData:(NSData *)data { - if ((self = [super init])) { -#ifdef DEBUG - NSCAssert([self class] == [GPBCodedInputStream class], - @"Subclassing of GPBCodedInputStream is not allowed."); -#endif - buffer_ = [data retain]; - state_.bytes = (const uint8_t *)[data bytes]; - state_.bufferSize = [data length]; - state_.currentLimit = state_.bufferSize; - } - return self; -} - -- (void)dealloc { - [buffer_ release]; - [super dealloc]; -} - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -- (int32_t)readTag { - return GPBCodedInputStreamReadTag(&state_); -} - -- (void)checkLastTagWas:(int32_t)value { - GPBCodedInputStreamCheckLastTagWas(&state_, value); -} - -- (BOOL)skipField:(int32_t)tag { - NSAssert(GPBWireFormatIsValidTag(tag), @"Invalid tag"); - switch (GPBWireFormatGetTagWireType(tag)) { - case GPBWireFormatVarint: - GPBCodedInputStreamReadInt32(&state_); - return YES; - case GPBWireFormatFixed64: - SkipRawData(&state_, sizeof(int64_t)); - return YES; - case GPBWireFormatLengthDelimited: - SkipRawData(&state_, ReadRawVarint32(&state_)); - return YES; - case GPBWireFormatStartGroup: - [self skipMessage]; - GPBCodedInputStreamCheckLastTagWas( - &state_, GPBWireFormatMakeTag(GPBWireFormatGetTagFieldNumber(tag), - GPBWireFormatEndGroup)); - return YES; - case GPBWireFormatEndGroup: - return NO; - case GPBWireFormatFixed32: - SkipRawData(&state_, sizeof(int32_t)); - return YES; - } -} - -- (void)skipMessage { - while (YES) { - int32_t tag = GPBCodedInputStreamReadTag(&state_); - if (tag == 0 || ![self skipField:tag]) { - return; - } - } -} - -- (BOOL)isAtEnd { - return GPBCodedInputStreamIsAtEnd(&state_); -} - -- (size_t)position { - return state_.bufferPos; -} - -- (size_t)pushLimit:(size_t)byteLimit { - return GPBCodedInputStreamPushLimit(&state_, byteLimit); -} - -- (void)popLimit:(size_t)oldLimit { - GPBCodedInputStreamPopLimit(&state_, oldLimit); -} - -- (double)readDouble { - return GPBCodedInputStreamReadDouble(&state_); -} - -- (float)readFloat { - return GPBCodedInputStreamReadFloat(&state_); -} - -- (uint64_t)readUInt64 { - return GPBCodedInputStreamReadUInt64(&state_); -} - -- (int64_t)readInt64 { - return GPBCodedInputStreamReadInt64(&state_); -} - -- (int32_t)readInt32 { - return GPBCodedInputStreamReadInt32(&state_); -} - -- (uint64_t)readFixed64 { - return GPBCodedInputStreamReadFixed64(&state_); -} - -- (uint32_t)readFixed32 { - return GPBCodedInputStreamReadFixed32(&state_); -} - -- (BOOL)readBool { - return GPBCodedInputStreamReadBool(&state_); -} - -- (NSString *)readString { - return [GPBCodedInputStreamReadRetainedString(&state_) autorelease]; -} - -- (void)readGroup:(int32_t)fieldNumber - message:(GPBMessage *)message - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry { - if (state_.recursionDepth >= kDefaultRecursionLimit) { - RaiseException(GPBCodedInputStreamErrorRecursionDepthExceeded, nil); - } - ++state_.recursionDepth; - [message mergeFromCodedInputStream:self extensionRegistry:extensionRegistry]; - GPBCodedInputStreamCheckLastTagWas( - &state_, GPBWireFormatMakeTag(fieldNumber, GPBWireFormatEndGroup)); - --state_.recursionDepth; -} - -- (void)readUnknownGroup:(int32_t)fieldNumber - message:(GPBUnknownFieldSet *)message { - if (state_.recursionDepth >= kDefaultRecursionLimit) { - RaiseException(GPBCodedInputStreamErrorRecursionDepthExceeded, nil); - } - ++state_.recursionDepth; - [message mergeFromCodedInputStream:self]; - GPBCodedInputStreamCheckLastTagWas( - &state_, GPBWireFormatMakeTag(fieldNumber, GPBWireFormatEndGroup)); - --state_.recursionDepth; -} - -- (void)readMessage:(GPBMessage *)message - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry { - int32_t length = ReadRawVarint32(&state_); - if (state_.recursionDepth >= kDefaultRecursionLimit) { - RaiseException(GPBCodedInputStreamErrorRecursionDepthExceeded, nil); - } - size_t oldLimit = GPBCodedInputStreamPushLimit(&state_, length); - ++state_.recursionDepth; - [message mergeFromCodedInputStream:self extensionRegistry:extensionRegistry]; - GPBCodedInputStreamCheckLastTagWas(&state_, 0); - --state_.recursionDepth; - GPBCodedInputStreamPopLimit(&state_, oldLimit); -} - -- (void)readMapEntry:(id)mapDictionary - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry - field:(GPBFieldDescriptor *)field - parentMessage:(GPBMessage *)parentMessage { - int32_t length = ReadRawVarint32(&state_); - if (state_.recursionDepth >= kDefaultRecursionLimit) { - RaiseException(GPBCodedInputStreamErrorRecursionDepthExceeded, nil); - } - size_t oldLimit = GPBCodedInputStreamPushLimit(&state_, length); - ++state_.recursionDepth; - GPBDictionaryReadEntry(mapDictionary, self, extensionRegistry, field, - parentMessage); - GPBCodedInputStreamCheckLastTagWas(&state_, 0); - --state_.recursionDepth; - GPBCodedInputStreamPopLimit(&state_, oldLimit); -} - -- (NSData *)readBytes { - return [GPBCodedInputStreamReadRetainedBytes(&state_) autorelease]; -} - -- (uint32_t)readUInt32 { - return GPBCodedInputStreamReadUInt32(&state_); -} - -- (int32_t)readEnum { - return GPBCodedInputStreamReadEnum(&state_); -} - -- (int32_t)readSFixed32 { - return GPBCodedInputStreamReadSFixed32(&state_); -} - -- (int64_t)readSFixed64 { - return GPBCodedInputStreamReadSFixed64(&state_); -} - -- (int32_t)readSInt32 { - return GPBCodedInputStreamReadSInt32(&state_); -} - -- (int64_t)readSInt64 { - return GPBCodedInputStreamReadSInt64(&state_); -} - -#pragma clang diagnostic pop - -@end diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h b/Old My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h deleted file mode 100755 index 90bd0c9..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedInputStream_PackagePrivate.h +++ /dev/null @@ -1,114 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This header is private to the ProtobolBuffers library and must NOT be -// included by any sources outside this library. The contents of this file are -// subject to change at any time without notice. - -#import "GPBCodedInputStream.h" - -#import - -@class GPBUnknownFieldSet; -@class GPBFieldDescriptor; - -typedef struct GPBCodedInputStreamState { - const uint8_t *bytes; - size_t bufferSize; - size_t bufferPos; - - // For parsing subsections of an input stream you can put a hard limit on - // how much should be read. Normally the limit is the end of the stream, - // but you can adjust it to anywhere, and if you hit it you will be at the - // end of the stream, until you adjust the limit. - size_t currentLimit; - int32_t lastTag; - NSUInteger recursionDepth; -} GPBCodedInputStreamState; - -@interface GPBCodedInputStream () { - @package - struct GPBCodedInputStreamState state_; - NSData *buffer_; -} - -// Group support is deprecated, so we hide this interface from users, but -// support for older data. -- (void)readGroup:(int32_t)fieldNumber - message:(GPBMessage *)message - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry; - -// Reads a group field value from the stream and merges it into the given -// UnknownFieldSet. -- (void)readUnknownGroup:(int32_t)fieldNumber - message:(GPBUnknownFieldSet *)message; - -// Reads a map entry. -- (void)readMapEntry:(id)mapDictionary - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry - field:(GPBFieldDescriptor *)field - parentMessage:(GPBMessage *)parentMessage; -@end - -CF_EXTERN_C_BEGIN - -int32_t GPBCodedInputStreamReadTag(GPBCodedInputStreamState *state); - -double GPBCodedInputStreamReadDouble(GPBCodedInputStreamState *state); -float GPBCodedInputStreamReadFloat(GPBCodedInputStreamState *state); -uint64_t GPBCodedInputStreamReadUInt64(GPBCodedInputStreamState *state); -uint32_t GPBCodedInputStreamReadUInt32(GPBCodedInputStreamState *state); -int64_t GPBCodedInputStreamReadInt64(GPBCodedInputStreamState *state); -int32_t GPBCodedInputStreamReadInt32(GPBCodedInputStreamState *state); -uint64_t GPBCodedInputStreamReadFixed64(GPBCodedInputStreamState *state); -uint32_t GPBCodedInputStreamReadFixed32(GPBCodedInputStreamState *state); -int32_t GPBCodedInputStreamReadEnum(GPBCodedInputStreamState *state); -int32_t GPBCodedInputStreamReadSFixed32(GPBCodedInputStreamState *state); -int64_t GPBCodedInputStreamReadSFixed64(GPBCodedInputStreamState *state); -int32_t GPBCodedInputStreamReadSInt32(GPBCodedInputStreamState *state); -int64_t GPBCodedInputStreamReadSInt64(GPBCodedInputStreamState *state); -BOOL GPBCodedInputStreamReadBool(GPBCodedInputStreamState *state); -NSString *GPBCodedInputStreamReadRetainedString(GPBCodedInputStreamState *state) - __attribute((ns_returns_retained)); -NSData *GPBCodedInputStreamReadRetainedBytes(GPBCodedInputStreamState *state) - __attribute((ns_returns_retained)); -NSData *GPBCodedInputStreamReadRetainedBytesNoCopy( - GPBCodedInputStreamState *state) __attribute((ns_returns_retained)); - -size_t GPBCodedInputStreamPushLimit(GPBCodedInputStreamState *state, - size_t byteLimit); -void GPBCodedInputStreamPopLimit(GPBCodedInputStreamState *state, - size_t oldLimit); -size_t GPBCodedInputStreamBytesUntilLimit(GPBCodedInputStreamState *state); -BOOL GPBCodedInputStreamIsAtEnd(GPBCodedInputStreamState *state); -void GPBCodedInputStreamCheckLastTagWas(GPBCodedInputStreamState *state, - int32_t value); - -CF_EXTERN_C_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream.h b/Old My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream.h deleted file mode 100755 index d6fff3d..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream.h +++ /dev/null @@ -1,739 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBRuntimeTypes.h" -#import "GPBWireFormat.h" - -@class GPBBoolArray; -@class GPBDoubleArray; -@class GPBEnumArray; -@class GPBFloatArray; -@class GPBMessage; -@class GPBInt32Array; -@class GPBInt64Array; -@class GPBUInt32Array; -@class GPBUInt64Array; -@class GPBUnknownFieldSet; - -NS_ASSUME_NONNULL_BEGIN - -/** - * Writes out protocol message fields. - * - * The common uses of protocol buffers shouldn't need to use this class. - * GPBMessage's provide a -data method that will serialize the message for you. - * - * @note Subclassing of GPBCodedOutputStream is NOT supported. - **/ -@interface GPBCodedOutputStream : NSObject - -/** - * Creates a stream to fill in the given data. Data must be sized to fit or - * an error will be raised when out of space. - * - * @param data The data where the stream will be written to. - * - * @return A newly instanced GPBCodedOutputStream. - **/ -+ (instancetype)streamWithData:(NSMutableData *)data; - -/** - * Creates a stream to write into the given NSOutputStream. - * - * @param output The output stream where the stream will be written to. - * - * @return A newly instanced GPBCodedOutputStream. - **/ -+ (instancetype)streamWithOutputStream:(NSOutputStream *)output; - -/** - * Initializes a stream to fill in the given data. Data must be sized to fit - * or an error will be raised when out of space. - * - * @param data The data where the stream will be written to. - * - * @return A newly initialized GPBCodedOutputStream. - **/ -- (instancetype)initWithData:(NSMutableData *)data; - -/** - * Initializes a stream to write into the given @c NSOutputStream. - * - * @param output The output stream where the stream will be written to. - * - * @return A newly initialized GPBCodedOutputStream. - **/ -- (instancetype)initWithOutputStream:(NSOutputStream *)output; - -/** - * Flush any buffered data out. - **/ -- (void)flush; - -/** - * Write the raw byte out. - * - * @param value The value to write out. - **/ -- (void)writeRawByte:(uint8_t)value; - -/** - * Write the tag for the given field number and wire format. - * - * @param fieldNumber The field number. - * @param format The wire format the data for the field will be in. - **/ -- (void)writeTag:(uint32_t)fieldNumber format:(GPBWireFormat)format; - -/** - * Write a 32bit value out in little endian format. - * - * @param value The value to write out. - **/ -- (void)writeRawLittleEndian32:(int32_t)value; -/** - * Write a 64bit value out in little endian format. - * - * @param value The value to write out. - **/ -- (void)writeRawLittleEndian64:(int64_t)value; - -/** - * Write a 32bit value out in varint format. - * - * @param value The value to write out. - **/ -- (void)writeRawVarint32:(int32_t)value; -/** - * Write a 64bit value out in varint format. - * - * @param value The value to write out. - **/ -- (void)writeRawVarint64:(int64_t)value; - -/** - * Write a size_t out as a 32bit varint value. - * - * @note This will truncate 64 bit values to 32. - * - * @param value The value to write out. - **/ -- (void)writeRawVarintSizeTAs32:(size_t)value; - -/** - * Writes the contents of an NSData out. - * - * @param data The data to write out. - **/ -- (void)writeRawData:(NSData *)data; -/** - * Writes out the given data. - * - * @param data The data blob to write out. - * @param offset The offset into the blob to start writing out. - * @param length The number of bytes from the blob to write out. - **/ -- (void)writeRawPtr:(const void *)data - offset:(size_t)offset - length:(size_t)length; - -//%PDDM-EXPAND _WRITE_DECLS() -// This block of code is generated, do not edit it directly. - -/** - * Write a double for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeDouble:(int32_t)fieldNumber value:(double)value; -/** - * Write a packed array of double for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeDoubleArray:(int32_t)fieldNumber - values:(GPBDoubleArray *)values - tag:(uint32_t)tag; -/** - * Write a double without any tag. - * - * @param value The value to write out. - **/ -- (void)writeDoubleNoTag:(double)value; - -/** - * Write a float for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeFloat:(int32_t)fieldNumber value:(float)value; -/** - * Write a packed array of float for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeFloatArray:(int32_t)fieldNumber - values:(GPBFloatArray *)values - tag:(uint32_t)tag; -/** - * Write a float without any tag. - * - * @param value The value to write out. - **/ -- (void)writeFloatNoTag:(float)value; - -/** - * Write a uint64_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeUInt64:(int32_t)fieldNumber value:(uint64_t)value; -/** - * Write a packed array of uint64_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeUInt64Array:(int32_t)fieldNumber - values:(GPBUInt64Array *)values - tag:(uint32_t)tag; -/** - * Write a uint64_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeUInt64NoTag:(uint64_t)value; - -/** - * Write a int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeInt64:(int32_t)fieldNumber value:(int64_t)value; -/** - * Write a packed array of int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeInt64Array:(int32_t)fieldNumber - values:(GPBInt64Array *)values - tag:(uint32_t)tag; -/** - * Write a int64_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeInt64NoTag:(int64_t)value; - -/** - * Write a int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeInt32:(int32_t)fieldNumber value:(int32_t)value; -/** - * Write a packed array of int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeInt32Array:(int32_t)fieldNumber - values:(GPBInt32Array *)values - tag:(uint32_t)tag; -/** - * Write a int32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeInt32NoTag:(int32_t)value; - -/** - * Write a uint32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeUInt32:(int32_t)fieldNumber value:(uint32_t)value; -/** - * Write a packed array of uint32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeUInt32Array:(int32_t)fieldNumber - values:(GPBUInt32Array *)values - tag:(uint32_t)tag; -/** - * Write a uint32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeUInt32NoTag:(uint32_t)value; - -/** - * Write a uint64_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeFixed64:(int32_t)fieldNumber value:(uint64_t)value; -/** - * Write a packed array of uint64_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeFixed64Array:(int32_t)fieldNumber - values:(GPBUInt64Array *)values - tag:(uint32_t)tag; -/** - * Write a uint64_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeFixed64NoTag:(uint64_t)value; - -/** - * Write a uint32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeFixed32:(int32_t)fieldNumber value:(uint32_t)value; -/** - * Write a packed array of uint32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeFixed32Array:(int32_t)fieldNumber - values:(GPBUInt32Array *)values - tag:(uint32_t)tag; -/** - * Write a uint32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeFixed32NoTag:(uint32_t)value; - -/** - * Write a int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeSInt32:(int32_t)fieldNumber value:(int32_t)value; -/** - * Write a packed array of int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeSInt32Array:(int32_t)fieldNumber - values:(GPBInt32Array *)values - tag:(uint32_t)tag; -/** - * Write a int32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeSInt32NoTag:(int32_t)value; - -/** - * Write a int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeSInt64:(int32_t)fieldNumber value:(int64_t)value; -/** - * Write a packed array of int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeSInt64Array:(int32_t)fieldNumber - values:(GPBInt64Array *)values - tag:(uint32_t)tag; -/** - * Write a int64_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeSInt64NoTag:(int64_t)value; - -/** - * Write a int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeSFixed64:(int32_t)fieldNumber value:(int64_t)value; -/** - * Write a packed array of int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeSFixed64Array:(int32_t)fieldNumber - values:(GPBInt64Array *)values - tag:(uint32_t)tag; -/** - * Write a int64_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeSFixed64NoTag:(int64_t)value; - -/** - * Write a int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeSFixed32:(int32_t)fieldNumber value:(int32_t)value; -/** - * Write a packed array of int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeSFixed32Array:(int32_t)fieldNumber - values:(GPBInt32Array *)values - tag:(uint32_t)tag; -/** - * Write a int32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeSFixed32NoTag:(int32_t)value; - -/** - * Write a BOOL for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeBool:(int32_t)fieldNumber value:(BOOL)value; -/** - * Write a packed array of BOOL for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeBoolArray:(int32_t)fieldNumber - values:(GPBBoolArray *)values - tag:(uint32_t)tag; -/** - * Write a BOOL without any tag. - * - * @param value The value to write out. - **/ -- (void)writeBoolNoTag:(BOOL)value; - -/** - * Write a int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeEnum:(int32_t)fieldNumber value:(int32_t)value; -/** - * Write a packed array of int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeEnumArray:(int32_t)fieldNumber - values:(GPBEnumArray *)values - tag:(uint32_t)tag; -/** - * Write a int32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeEnumNoTag:(int32_t)value; - -/** - * Write a NSString for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeString:(int32_t)fieldNumber value:(NSString *)value; -/** - * Write an array of NSString for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - **/ -- (void)writeStringArray:(int32_t)fieldNumber values:(NSArray *)values; -/** - * Write a NSString without any tag. - * - * @param value The value to write out. - **/ -- (void)writeStringNoTag:(NSString *)value; - -/** - * Write a GPBMessage for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeMessage:(int32_t)fieldNumber value:(GPBMessage *)value; -/** - * Write an array of GPBMessage for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - **/ -- (void)writeMessageArray:(int32_t)fieldNumber values:(NSArray *)values; -/** - * Write a GPBMessage without any tag. - * - * @param value The value to write out. - **/ -- (void)writeMessageNoTag:(GPBMessage *)value; - -/** - * Write a NSData for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeBytes:(int32_t)fieldNumber value:(NSData *)value; -/** - * Write an array of NSData for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - **/ -- (void)writeBytesArray:(int32_t)fieldNumber values:(NSArray *)values; -/** - * Write a NSData without any tag. - * - * @param value The value to write out. - **/ -- (void)writeBytesNoTag:(NSData *)value; - -/** - * Write a GPBMessage for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeGroup:(int32_t)fieldNumber - value:(GPBMessage *)value; -/** - * Write an array of GPBMessage for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - **/ -- (void)writeGroupArray:(int32_t)fieldNumber values:(NSArray *)values; -/** - * Write a GPBMessage without any tag (but does write the endGroup tag). - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeGroupNoTag:(int32_t)fieldNumber - value:(GPBMessage *)value; - -/** - * Write a GPBUnknownFieldSet for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeUnknownGroup:(int32_t)fieldNumber - value:(GPBUnknownFieldSet *)value; -/** - * Write an array of GPBUnknownFieldSet for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - **/ -- (void)writeUnknownGroupArray:(int32_t)fieldNumber values:(NSArray *)values; -/** - * Write a GPBUnknownFieldSet without any tag (but does write the endGroup tag). - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeUnknownGroupNoTag:(int32_t)fieldNumber - value:(GPBUnknownFieldSet *)value; - -//%PDDM-EXPAND-END _WRITE_DECLS() - -/** -Write a MessageSet extension field to the stream. For historical reasons, -the wire format differs from normal fields. - -@param fieldNumber The extension field number to write out. -@param value The message from where to get the extension. -*/ -- (void)writeMessageSetExtension:(int32_t)fieldNumber value:(GPBMessage *)value; - -/** -Write an unparsed MessageSet extension field to the stream. For historical -reasons, the wire format differs from normal fields. - -@param fieldNumber The extension field number to write out. -@param value The raw message from where to get the extension. -*/ -- (void)writeRawMessageSetExtension:(int32_t)fieldNumber value:(NSData *)value; - -@end - -NS_ASSUME_NONNULL_END - -// Write methods for types that can be in packed arrays. -//%PDDM-DEFINE _WRITE_PACKABLE_DECLS(NAME, ARRAY_TYPE, TYPE) -//%/** -//% * Write a TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the value. -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME:(int32_t)fieldNumber value:(TYPE)value; -//%/** -//% * Write a packed array of TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the values. -//% * @param values The values to write out. -//% * @param tag The tag assigned to the values. -//% **/ -//%- (void)write##NAME##Array:(int32_t)fieldNumber -//% NAME$S values:(GPB##ARRAY_TYPE##Array *)values -//% NAME$S tag:(uint32_t)tag; -//%/** -//% * Write a TYPE without any tag. -//% * -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME##NoTag:(TYPE)value; -//% -// Write methods for types that aren't in packed arrays. -//%PDDM-DEFINE _WRITE_UNPACKABLE_DECLS(NAME, TYPE) -//%/** -//% * Write a TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the value. -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME:(int32_t)fieldNumber value:(TYPE *)value; -//%/** -//% * Write an array of TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the values. -//% * @param values The values to write out. -//% **/ -//%- (void)write##NAME##Array:(int32_t)fieldNumber values:(NSArray<##TYPE##*> *)values; -//%/** -//% * Write a TYPE without any tag. -//% * -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME##NoTag:(TYPE *)value; -//% -// Special write methods for Groups. -//%PDDM-DEFINE _WRITE_GROUP_DECLS(NAME, TYPE) -//%/** -//% * Write a TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the value. -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME:(int32_t)fieldNumber -//% NAME$S value:(TYPE *)value; -//%/** -//% * Write an array of TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the values. -//% * @param values The values to write out. -//% **/ -//%- (void)write##NAME##Array:(int32_t)fieldNumber values:(NSArray<##TYPE##*> *)values; -//%/** -//% * Write a TYPE without any tag (but does write the endGroup tag). -//% * -//% * @param fieldNumber The field number assigned to the value. -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME##NoTag:(int32_t)fieldNumber -//% NAME$S value:(TYPE *)value; -//% - -// One macro to hide it all up above. -//%PDDM-DEFINE _WRITE_DECLS() -//%_WRITE_PACKABLE_DECLS(Double, Double, double) -//%_WRITE_PACKABLE_DECLS(Float, Float, float) -//%_WRITE_PACKABLE_DECLS(UInt64, UInt64, uint64_t) -//%_WRITE_PACKABLE_DECLS(Int64, Int64, int64_t) -//%_WRITE_PACKABLE_DECLS(Int32, Int32, int32_t) -//%_WRITE_PACKABLE_DECLS(UInt32, UInt32, uint32_t) -//%_WRITE_PACKABLE_DECLS(Fixed64, UInt64, uint64_t) -//%_WRITE_PACKABLE_DECLS(Fixed32, UInt32, uint32_t) -//%_WRITE_PACKABLE_DECLS(SInt32, Int32, int32_t) -//%_WRITE_PACKABLE_DECLS(SInt64, Int64, int64_t) -//%_WRITE_PACKABLE_DECLS(SFixed64, Int64, int64_t) -//%_WRITE_PACKABLE_DECLS(SFixed32, Int32, int32_t) -//%_WRITE_PACKABLE_DECLS(Bool, Bool, BOOL) -//%_WRITE_PACKABLE_DECLS(Enum, Enum, int32_t) -//%_WRITE_UNPACKABLE_DECLS(String, NSString) -//%_WRITE_UNPACKABLE_DECLS(Message, GPBMessage) -//%_WRITE_UNPACKABLE_DECLS(Bytes, NSData) -//%_WRITE_GROUP_DECLS(Group, GPBMessage) -//%_WRITE_GROUP_DECLS(UnknownGroup, GPBUnknownFieldSet) diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream.m b/Old My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream.m deleted file mode 100755 index 7c3ab44..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream.m +++ /dev/null @@ -1,1202 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBCodedOutputStream_PackagePrivate.h" - -#import - -#import "GPBArray.h" -#import "GPBUnknownFieldSet_PackagePrivate.h" -#import "GPBUtilities_PackagePrivate.h" - -// Structure for containing state of a GPBCodedInputStream. Brought out into -// a struct so that we can inline several common functions instead of dealing -// with overhead of ObjC dispatch. -typedef struct GPBOutputBufferState { - uint8_t *bytes; - size_t size; - size_t position; - NSOutputStream *output; -} GPBOutputBufferState; - -@implementation GPBCodedOutputStream { - GPBOutputBufferState state_; - NSMutableData *buffer_; -} - -static const int32_t LITTLE_ENDIAN_32_SIZE = sizeof(uint32_t); -static const int32_t LITTLE_ENDIAN_64_SIZE = sizeof(uint64_t); - -// Internal helper that writes the current buffer to the output. The -// buffer position is reset to its initial value when this returns. -static void GPBRefreshBuffer(GPBOutputBufferState *state) { - if (state->output == nil) { - // We're writing to a single buffer. - [NSException raise:@"OutOfSpace" format:@""]; - } - if (state->position != 0) { - NSInteger written = - [state->output write:state->bytes maxLength:state->position]; - if (written != (NSInteger)state->position) { - [NSException raise:@"WriteFailed" format:@""]; - } - state->position = 0; - } -} - -static void GPBWriteRawByte(GPBOutputBufferState *state, uint8_t value) { - if (state->position == state->size) { - GPBRefreshBuffer(state); - } - state->bytes[state->position++] = value; -} - -static void GPBWriteRawVarint32(GPBOutputBufferState *state, int32_t value) { - while (YES) { - if ((value & ~0x7F) == 0) { - uint8_t val = (uint8_t)value; - GPBWriteRawByte(state, val); - return; - } else { - GPBWriteRawByte(state, (value & 0x7F) | 0x80); - value = GPBLogicalRightShift32(value, 7); - } - } -} - -static void GPBWriteRawVarint64(GPBOutputBufferState *state, int64_t value) { - while (YES) { - if ((value & ~0x7FL) == 0) { - uint8_t val = (uint8_t)value; - GPBWriteRawByte(state, val); - return; - } else { - GPBWriteRawByte(state, ((int32_t)value & 0x7F) | 0x80); - value = GPBLogicalRightShift64(value, 7); - } - } -} - -static void GPBWriteInt32NoTag(GPBOutputBufferState *state, int32_t value) { - if (value >= 0) { - GPBWriteRawVarint32(state, value); - } else { - // Must sign-extend - GPBWriteRawVarint64(state, value); - } -} - -static void GPBWriteUInt32(GPBOutputBufferState *state, int32_t fieldNumber, - uint32_t value) { - GPBWriteTagWithFormat(state, fieldNumber, GPBWireFormatVarint); - GPBWriteRawVarint32(state, value); -} - -static void GPBWriteTagWithFormat(GPBOutputBufferState *state, - uint32_t fieldNumber, GPBWireFormat format) { - GPBWriteRawVarint32(state, GPBWireFormatMakeTag(fieldNumber, format)); -} - -static void GPBWriteRawLittleEndian32(GPBOutputBufferState *state, - int32_t value) { - GPBWriteRawByte(state, (value)&0xFF); - GPBWriteRawByte(state, (value >> 8) & 0xFF); - GPBWriteRawByte(state, (value >> 16) & 0xFF); - GPBWriteRawByte(state, (value >> 24) & 0xFF); -} - -static void GPBWriteRawLittleEndian64(GPBOutputBufferState *state, - int64_t value) { - GPBWriteRawByte(state, (int32_t)(value)&0xFF); - GPBWriteRawByte(state, (int32_t)(value >> 8) & 0xFF); - GPBWriteRawByte(state, (int32_t)(value >> 16) & 0xFF); - GPBWriteRawByte(state, (int32_t)(value >> 24) & 0xFF); - GPBWriteRawByte(state, (int32_t)(value >> 32) & 0xFF); - GPBWriteRawByte(state, (int32_t)(value >> 40) & 0xFF); - GPBWriteRawByte(state, (int32_t)(value >> 48) & 0xFF); - GPBWriteRawByte(state, (int32_t)(value >> 56) & 0xFF); -} - -- (void)dealloc { - [self flush]; - [state_.output close]; - [state_.output release]; - [buffer_ release]; - - [super dealloc]; -} - -- (instancetype)initWithOutputStream:(NSOutputStream *)output { - NSMutableData *data = [NSMutableData dataWithLength:PAGE_SIZE]; - return [self initWithOutputStream:output data:data]; -} - -- (instancetype)initWithData:(NSMutableData *)data { - return [self initWithOutputStream:nil data:data]; -} - -// This initializer isn't exposed, but it is the designated initializer. -// Setting OutputStream and NSData is to control the buffering behavior/size -// of the work, but that is more obvious via the bufferSize: version. -- (instancetype)initWithOutputStream:(NSOutputStream *)output - data:(NSMutableData *)data { - if ((self = [super init])) { - buffer_ = [data retain]; - [output open]; - state_.bytes = [data mutableBytes]; - state_.size = [data length]; - state_.output = [output retain]; - } - return self; -} - -+ (instancetype)streamWithOutputStream:(NSOutputStream *)output { - NSMutableData *data = [NSMutableData dataWithLength:PAGE_SIZE]; - return [[[self alloc] initWithOutputStream:output - data:data] autorelease]; -} - -+ (instancetype)streamWithData:(NSMutableData *)data { - return [[[self alloc] initWithData:data] autorelease]; -} - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -- (void)writeDoubleNoTag:(double)value { - GPBWriteRawLittleEndian64(&state_, GPBConvertDoubleToInt64(value)); -} - -- (void)writeDouble:(int32_t)fieldNumber value:(double)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatFixed64); - GPBWriteRawLittleEndian64(&state_, GPBConvertDoubleToInt64(value)); -} - -- (void)writeFloatNoTag:(float)value { - GPBWriteRawLittleEndian32(&state_, GPBConvertFloatToInt32(value)); -} - -- (void)writeFloat:(int32_t)fieldNumber value:(float)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatFixed32); - GPBWriteRawLittleEndian32(&state_, GPBConvertFloatToInt32(value)); -} - -- (void)writeUInt64NoTag:(uint64_t)value { - GPBWriteRawVarint64(&state_, value); -} - -- (void)writeUInt64:(int32_t)fieldNumber value:(uint64_t)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatVarint); - GPBWriteRawVarint64(&state_, value); -} - -- (void)writeInt64NoTag:(int64_t)value { - GPBWriteRawVarint64(&state_, value); -} - -- (void)writeInt64:(int32_t)fieldNumber value:(int64_t)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatVarint); - GPBWriteRawVarint64(&state_, value); -} - -- (void)writeInt32NoTag:(int32_t)value { - GPBWriteInt32NoTag(&state_, value); -} - -- (void)writeInt32:(int32_t)fieldNumber value:(int32_t)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatVarint); - GPBWriteInt32NoTag(&state_, value); -} - -- (void)writeFixed64NoTag:(uint64_t)value { - GPBWriteRawLittleEndian64(&state_, value); -} - -- (void)writeFixed64:(int32_t)fieldNumber value:(uint64_t)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatFixed64); - GPBWriteRawLittleEndian64(&state_, value); -} - -- (void)writeFixed32NoTag:(uint32_t)value { - GPBWriteRawLittleEndian32(&state_, value); -} - -- (void)writeFixed32:(int32_t)fieldNumber value:(uint32_t)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatFixed32); - GPBWriteRawLittleEndian32(&state_, value); -} - -- (void)writeBoolNoTag:(BOOL)value { - GPBWriteRawByte(&state_, (value ? 1 : 0)); -} - -- (void)writeBool:(int32_t)fieldNumber value:(BOOL)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatVarint); - GPBWriteRawByte(&state_, (value ? 1 : 0)); -} - -- (void)writeStringNoTag:(const NSString *)value { - size_t length = [value lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; - GPBWriteRawVarint32(&state_, (int32_t)length); - if (length == 0) { - return; - } - - const char *quickString = - CFStringGetCStringPtr((CFStringRef)value, kCFStringEncodingUTF8); - - // Fast path: Most strings are short, if the buffer already has space, - // add to it directly. - NSUInteger bufferBytesLeft = state_.size - state_.position; - if (bufferBytesLeft >= length) { - NSUInteger usedBufferLength = 0; - BOOL result; - if (quickString != NULL) { - memcpy(state_.bytes + state_.position, quickString, length); - usedBufferLength = length; - result = YES; - } else { - result = [value getBytes:state_.bytes + state_.position - maxLength:bufferBytesLeft - usedLength:&usedBufferLength - encoding:NSUTF8StringEncoding - options:(NSStringEncodingConversionOptions)0 - range:NSMakeRange(0, [value length]) - remainingRange:NULL]; - } - if (result) { - NSAssert2((usedBufferLength == length), - @"Our UTF8 calc was wrong? %tu vs %zd", usedBufferLength, - length); - state_.position += usedBufferLength; - return; - } - } else if (quickString != NULL) { - [self writeRawPtr:quickString offset:0 length:length]; - } else { - // Slow path: just get it as data and write it out. - NSData *utf8Data = [value dataUsingEncoding:NSUTF8StringEncoding]; - NSAssert2(([utf8Data length] == length), - @"Strings UTF8 length was wrong? %tu vs %zd", [utf8Data length], - length); - [self writeRawData:utf8Data]; - } -} - -- (void)writeString:(int32_t)fieldNumber value:(NSString *)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatLengthDelimited); - [self writeStringNoTag:value]; -} - -- (void)writeGroupNoTag:(int32_t)fieldNumber value:(GPBMessage *)value { - [value writeToCodedOutputStream:self]; - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatEndGroup); -} - -- (void)writeGroup:(int32_t)fieldNumber value:(GPBMessage *)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatStartGroup); - [self writeGroupNoTag:fieldNumber value:value]; -} - -- (void)writeUnknownGroupNoTag:(int32_t)fieldNumber - value:(const GPBUnknownFieldSet *)value { - [value writeToCodedOutputStream:self]; - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatEndGroup); -} - -- (void)writeUnknownGroup:(int32_t)fieldNumber - value:(GPBUnknownFieldSet *)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatStartGroup); - [self writeUnknownGroupNoTag:fieldNumber value:value]; -} - -- (void)writeMessageNoTag:(GPBMessage *)value { - GPBWriteRawVarint32(&state_, (int32_t)[value serializedSize]); - [value writeToCodedOutputStream:self]; -} - -- (void)writeMessage:(int32_t)fieldNumber value:(GPBMessage *)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatLengthDelimited); - [self writeMessageNoTag:value]; -} - -- (void)writeBytesNoTag:(NSData *)value { - GPBWriteRawVarint32(&state_, (int32_t)[value length]); - [self writeRawData:value]; -} - -- (void)writeBytes:(int32_t)fieldNumber value:(NSData *)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatLengthDelimited); - [self writeBytesNoTag:value]; -} - -- (void)writeUInt32NoTag:(uint32_t)value { - GPBWriteRawVarint32(&state_, value); -} - -- (void)writeUInt32:(int32_t)fieldNumber value:(uint32_t)value { - GPBWriteUInt32(&state_, fieldNumber, value); -} - -- (void)writeEnumNoTag:(int32_t)value { - GPBWriteRawVarint32(&state_, value); -} - -- (void)writeEnum:(int32_t)fieldNumber value:(int32_t)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatVarint); - GPBWriteRawVarint32(&state_, value); -} - -- (void)writeSFixed32NoTag:(int32_t)value { - GPBWriteRawLittleEndian32(&state_, value); -} - -- (void)writeSFixed32:(int32_t)fieldNumber value:(int32_t)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatFixed32); - GPBWriteRawLittleEndian32(&state_, value); -} - -- (void)writeSFixed64NoTag:(int64_t)value { - GPBWriteRawLittleEndian64(&state_, value); -} - -- (void)writeSFixed64:(int32_t)fieldNumber value:(int64_t)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatFixed64); - GPBWriteRawLittleEndian64(&state_, value); -} - -- (void)writeSInt32NoTag:(int32_t)value { - GPBWriteRawVarint32(&state_, GPBEncodeZigZag32(value)); -} - -- (void)writeSInt32:(int32_t)fieldNumber value:(int32_t)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatVarint); - GPBWriteRawVarint32(&state_, GPBEncodeZigZag32(value)); -} - -- (void)writeSInt64NoTag:(int64_t)value { - GPBWriteRawVarint64(&state_, GPBEncodeZigZag64(value)); -} - -- (void)writeSInt64:(int32_t)fieldNumber value:(int64_t)value { - GPBWriteTagWithFormat(&state_, fieldNumber, GPBWireFormatVarint); - GPBWriteRawVarint64(&state_, GPBEncodeZigZag64(value)); -} - -//%PDDM-DEFINE WRITE_PACKABLE_DEFNS(NAME, ARRAY_TYPE, TYPE, ACCESSOR_NAME) -//%- (void)write##NAME##Array:(int32_t)fieldNumber -//% NAME$S values:(GPB##ARRAY_TYPE##Array *)values -//% NAME$S tag:(uint32_t)tag { -//% if (tag != 0) { -//% if (values.count == 0) return; -//% __block size_t dataSize = 0; -//% [values enumerate##ACCESSOR_NAME##ValuesWithBlock:^(TYPE value, NSUInteger idx, BOOL *stop) { -//%#pragma unused(idx, stop) -//% dataSize += GPBCompute##NAME##SizeNoTag(value); -//% }]; -//% GPBWriteRawVarint32(&state_, tag); -//% GPBWriteRawVarint32(&state_, (int32_t)dataSize); -//% [values enumerate##ACCESSOR_NAME##ValuesWithBlock:^(TYPE value, NSUInteger idx, BOOL *stop) { -//%#pragma unused(idx, stop) -//% [self write##NAME##NoTag:value]; -//% }]; -//% } else { -//% [values enumerate##ACCESSOR_NAME##ValuesWithBlock:^(TYPE value, NSUInteger idx, BOOL *stop) { -//%#pragma unused(idx, stop) -//% [self write##NAME:fieldNumber value:value]; -//% }]; -//% } -//%} -//% -//%PDDM-DEFINE WRITE_UNPACKABLE_DEFNS(NAME, TYPE) -//%- (void)write##NAME##Array:(int32_t)fieldNumber values:(NSArray *)values { -//% for (TYPE *value in values) { -//% [self write##NAME:fieldNumber value:value]; -//% } -//%} -//% -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Double, Double, double, ) -// This block of code is generated, do not edit it directly. - -- (void)writeDoubleArray:(int32_t)fieldNumber - values:(GPBDoubleArray *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(double value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeDoubleSizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(double value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeDoubleNoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(double value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeDouble:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Float, Float, float, ) -// This block of code is generated, do not edit it directly. - -- (void)writeFloatArray:(int32_t)fieldNumber - values:(GPBFloatArray *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(float value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeFloatSizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(float value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeFloatNoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(float value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeFloat:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(UInt64, UInt64, uint64_t, ) -// This block of code is generated, do not edit it directly. - -- (void)writeUInt64Array:(int32_t)fieldNumber - values:(GPBUInt64Array *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeUInt64SizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeUInt64NoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeUInt64:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Int64, Int64, int64_t, ) -// This block of code is generated, do not edit it directly. - -- (void)writeInt64Array:(int32_t)fieldNumber - values:(GPBInt64Array *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(int64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeInt64SizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(int64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeInt64NoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(int64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeInt64:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Int32, Int32, int32_t, ) -// This block of code is generated, do not edit it directly. - -- (void)writeInt32Array:(int32_t)fieldNumber - values:(GPBInt32Array *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeInt32SizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeInt32NoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeInt32:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(UInt32, UInt32, uint32_t, ) -// This block of code is generated, do not edit it directly. - -- (void)writeUInt32Array:(int32_t)fieldNumber - values:(GPBUInt32Array *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(uint32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeUInt32SizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(uint32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeUInt32NoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(uint32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeUInt32:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Fixed64, UInt64, uint64_t, ) -// This block of code is generated, do not edit it directly. - -- (void)writeFixed64Array:(int32_t)fieldNumber - values:(GPBUInt64Array *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeFixed64SizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeFixed64NoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeFixed64:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Fixed32, UInt32, uint32_t, ) -// This block of code is generated, do not edit it directly. - -- (void)writeFixed32Array:(int32_t)fieldNumber - values:(GPBUInt32Array *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(uint32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeFixed32SizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(uint32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeFixed32NoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(uint32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeFixed32:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(SInt32, Int32, int32_t, ) -// This block of code is generated, do not edit it directly. - -- (void)writeSInt32Array:(int32_t)fieldNumber - values:(GPBInt32Array *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeSInt32SizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeSInt32NoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeSInt32:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(SInt64, Int64, int64_t, ) -// This block of code is generated, do not edit it directly. - -- (void)writeSInt64Array:(int32_t)fieldNumber - values:(GPBInt64Array *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(int64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeSInt64SizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(int64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeSInt64NoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(int64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeSInt64:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(SFixed64, Int64, int64_t, ) -// This block of code is generated, do not edit it directly. - -- (void)writeSFixed64Array:(int32_t)fieldNumber - values:(GPBInt64Array *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(int64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeSFixed64SizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(int64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeSFixed64NoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(int64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeSFixed64:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(SFixed32, Int32, int32_t, ) -// This block of code is generated, do not edit it directly. - -- (void)writeSFixed32Array:(int32_t)fieldNumber - values:(GPBInt32Array *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeSFixed32SizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeSFixed32NoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeSFixed32:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Bool, Bool, BOOL, ) -// This block of code is generated, do not edit it directly. - -- (void)writeBoolArray:(int32_t)fieldNumber - values:(GPBBoolArray *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateValuesWithBlock:^(BOOL value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeBoolSizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateValuesWithBlock:^(BOOL value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeBoolNoTag:value]; - }]; - } else { - [values enumerateValuesWithBlock:^(BOOL value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeBool:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Enum, Enum, int32_t, Raw) -// This block of code is generated, do not edit it directly. - -- (void)writeEnumArray:(int32_t)fieldNumber - values:(GPBEnumArray *)values - tag:(uint32_t)tag { - if (tag != 0) { - if (values.count == 0) return; - __block size_t dataSize = 0; - [values enumerateRawValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - dataSize += GPBComputeEnumSizeNoTag(value); - }]; - GPBWriteRawVarint32(&state_, tag); - GPBWriteRawVarint32(&state_, (int32_t)dataSize); - [values enumerateRawValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeEnumNoTag:value]; - }]; - } else { - [values enumerateRawValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [self writeEnum:fieldNumber value:value]; - }]; - } -} - -//%PDDM-EXPAND WRITE_UNPACKABLE_DEFNS(String, NSString) -// This block of code is generated, do not edit it directly. - -- (void)writeStringArray:(int32_t)fieldNumber values:(NSArray *)values { - for (NSString *value in values) { - [self writeString:fieldNumber value:value]; - } -} - -//%PDDM-EXPAND WRITE_UNPACKABLE_DEFNS(Message, GPBMessage) -// This block of code is generated, do not edit it directly. - -- (void)writeMessageArray:(int32_t)fieldNumber values:(NSArray *)values { - for (GPBMessage *value in values) { - [self writeMessage:fieldNumber value:value]; - } -} - -//%PDDM-EXPAND WRITE_UNPACKABLE_DEFNS(Bytes, NSData) -// This block of code is generated, do not edit it directly. - -- (void)writeBytesArray:(int32_t)fieldNumber values:(NSArray *)values { - for (NSData *value in values) { - [self writeBytes:fieldNumber value:value]; - } -} - -//%PDDM-EXPAND WRITE_UNPACKABLE_DEFNS(Group, GPBMessage) -// This block of code is generated, do not edit it directly. - -- (void)writeGroupArray:(int32_t)fieldNumber values:(NSArray *)values { - for (GPBMessage *value in values) { - [self writeGroup:fieldNumber value:value]; - } -} - -//%PDDM-EXPAND WRITE_UNPACKABLE_DEFNS(UnknownGroup, GPBUnknownFieldSet) -// This block of code is generated, do not edit it directly. - -- (void)writeUnknownGroupArray:(int32_t)fieldNumber values:(NSArray *)values { - for (GPBUnknownFieldSet *value in values) { - [self writeUnknownGroup:fieldNumber value:value]; - } -} - -//%PDDM-EXPAND-END (19 expansions) - -- (void)writeMessageSetExtension:(int32_t)fieldNumber - value:(GPBMessage *)value { - GPBWriteTagWithFormat(&state_, GPBWireFormatMessageSetItem, - GPBWireFormatStartGroup); - GPBWriteUInt32(&state_, GPBWireFormatMessageSetTypeId, fieldNumber); - [self writeMessage:GPBWireFormatMessageSetMessage value:value]; - GPBWriteTagWithFormat(&state_, GPBWireFormatMessageSetItem, - GPBWireFormatEndGroup); -} - -- (void)writeRawMessageSetExtension:(int32_t)fieldNumber value:(NSData *)value { - GPBWriteTagWithFormat(&state_, GPBWireFormatMessageSetItem, - GPBWireFormatStartGroup); - GPBWriteUInt32(&state_, GPBWireFormatMessageSetTypeId, fieldNumber); - [self writeBytes:GPBWireFormatMessageSetMessage value:value]; - GPBWriteTagWithFormat(&state_, GPBWireFormatMessageSetItem, - GPBWireFormatEndGroup); -} - -- (void)flush { - if (state_.output != nil) { - GPBRefreshBuffer(&state_); - } -} - -- (void)writeRawByte:(uint8_t)value { - GPBWriteRawByte(&state_, value); -} - -- (void)writeRawData:(const NSData *)data { - [self writeRawPtr:[data bytes] offset:0 length:[data length]]; -} - -- (void)writeRawPtr:(const void *)value - offset:(size_t)offset - length:(size_t)length { - if (value == nil || length == 0) { - return; - } - - NSUInteger bufferLength = state_.size; - NSUInteger bufferBytesLeft = bufferLength - state_.position; - if (bufferBytesLeft >= length) { - // We have room in the current buffer. - memcpy(state_.bytes + state_.position, ((uint8_t *)value) + offset, length); - state_.position += length; - } else { - // Write extends past current buffer. Fill the rest of this buffer and - // flush. - size_t bytesWritten = bufferBytesLeft; - memcpy(state_.bytes + state_.position, ((uint8_t *)value) + offset, - bytesWritten); - offset += bytesWritten; - length -= bytesWritten; - state_.position = bufferLength; - GPBRefreshBuffer(&state_); - bufferLength = state_.size; - - // Now deal with the rest. - // Since we have an output stream, this is our buffer - // and buffer offset == 0 - if (length <= bufferLength) { - // Fits in new buffer. - memcpy(state_.bytes, ((uint8_t *)value) + offset, length); - state_.position = length; - } else { - // Write is very big. Let's do it all at once. - [state_.output write:((uint8_t *)value) + offset maxLength:length]; - } - } -} - -- (void)writeTag:(uint32_t)fieldNumber format:(GPBWireFormat)format { - GPBWriteTagWithFormat(&state_, fieldNumber, format); -} - -- (void)writeRawVarint32:(int32_t)value { - GPBWriteRawVarint32(&state_, value); -} - -- (void)writeRawVarintSizeTAs32:(size_t)value { - // Note the truncation. - GPBWriteRawVarint32(&state_, (int32_t)value); -} - -- (void)writeRawVarint64:(int64_t)value { - GPBWriteRawVarint64(&state_, value); -} - -- (void)writeRawLittleEndian32:(int32_t)value { - GPBWriteRawLittleEndian32(&state_, value); -} - -- (void)writeRawLittleEndian64:(int64_t)value { - GPBWriteRawLittleEndian64(&state_, value); -} - -#pragma clang diagnostic pop - -@end - -size_t GPBComputeDoubleSizeNoTag(Float64 value) { -#pragma unused(value) - return LITTLE_ENDIAN_64_SIZE; -} - -size_t GPBComputeFloatSizeNoTag(Float32 value) { -#pragma unused(value) - return LITTLE_ENDIAN_32_SIZE; -} - -size_t GPBComputeUInt64SizeNoTag(uint64_t value) { - return GPBComputeRawVarint64Size(value); -} - -size_t GPBComputeInt64SizeNoTag(int64_t value) { - return GPBComputeRawVarint64Size(value); -} - -size_t GPBComputeInt32SizeNoTag(int32_t value) { - if (value >= 0) { - return GPBComputeRawVarint32Size(value); - } else { - // Must sign-extend. - return 10; - } -} - -size_t GPBComputeSizeTSizeAsInt32NoTag(size_t value) { - return GPBComputeInt32SizeNoTag((int32_t)value); -} - -size_t GPBComputeFixed64SizeNoTag(uint64_t value) { -#pragma unused(value) - return LITTLE_ENDIAN_64_SIZE; -} - -size_t GPBComputeFixed32SizeNoTag(uint32_t value) { -#pragma unused(value) - return LITTLE_ENDIAN_32_SIZE; -} - -size_t GPBComputeBoolSizeNoTag(BOOL value) { -#pragma unused(value) - return 1; -} - -size_t GPBComputeStringSizeNoTag(NSString *value) { - NSUInteger length = [value lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; - return GPBComputeRawVarint32SizeForInteger(length) + length; -} - -size_t GPBComputeGroupSizeNoTag(GPBMessage *value) { - return [value serializedSize]; -} - -size_t GPBComputeUnknownGroupSizeNoTag(GPBUnknownFieldSet *value) { - return value.serializedSize; -} - -size_t GPBComputeMessageSizeNoTag(GPBMessage *value) { - size_t size = [value serializedSize]; - return GPBComputeRawVarint32SizeForInteger(size) + size; -} - -size_t GPBComputeBytesSizeNoTag(NSData *value) { - NSUInteger valueLength = [value length]; - return GPBComputeRawVarint32SizeForInteger(valueLength) + valueLength; -} - -size_t GPBComputeUInt32SizeNoTag(int32_t value) { - return GPBComputeRawVarint32Size(value); -} - -size_t GPBComputeEnumSizeNoTag(int32_t value) { - return GPBComputeRawVarint32Size(value); -} - -size_t GPBComputeSFixed32SizeNoTag(int32_t value) { -#pragma unused(value) - return LITTLE_ENDIAN_32_SIZE; -} - -size_t GPBComputeSFixed64SizeNoTag(int64_t value) { -#pragma unused(value) - return LITTLE_ENDIAN_64_SIZE; -} - -size_t GPBComputeSInt32SizeNoTag(int32_t value) { - return GPBComputeRawVarint32Size(GPBEncodeZigZag32(value)); -} - -size_t GPBComputeSInt64SizeNoTag(int64_t value) { - return GPBComputeRawVarint64Size(GPBEncodeZigZag64(value)); -} - -size_t GPBComputeDoubleSize(int32_t fieldNumber, double value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeDoubleSizeNoTag(value); -} - -size_t GPBComputeFloatSize(int32_t fieldNumber, float value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeFloatSizeNoTag(value); -} - -size_t GPBComputeUInt64Size(int32_t fieldNumber, uint64_t value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeUInt64SizeNoTag(value); -} - -size_t GPBComputeInt64Size(int32_t fieldNumber, int64_t value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeInt64SizeNoTag(value); -} - -size_t GPBComputeInt32Size(int32_t fieldNumber, int32_t value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeInt32SizeNoTag(value); -} - -size_t GPBComputeFixed64Size(int32_t fieldNumber, uint64_t value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeFixed64SizeNoTag(value); -} - -size_t GPBComputeFixed32Size(int32_t fieldNumber, uint32_t value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeFixed32SizeNoTag(value); -} - -size_t GPBComputeBoolSize(int32_t fieldNumber, BOOL value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeBoolSizeNoTag(value); -} - -size_t GPBComputeStringSize(int32_t fieldNumber, NSString *value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeStringSizeNoTag(value); -} - -size_t GPBComputeGroupSize(int32_t fieldNumber, GPBMessage *value) { - return GPBComputeTagSize(fieldNumber) * 2 + GPBComputeGroupSizeNoTag(value); -} - -size_t GPBComputeUnknownGroupSize(int32_t fieldNumber, - GPBUnknownFieldSet *value) { - return GPBComputeTagSize(fieldNumber) * 2 + - GPBComputeUnknownGroupSizeNoTag(value); -} - -size_t GPBComputeMessageSize(int32_t fieldNumber, GPBMessage *value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeMessageSizeNoTag(value); -} - -size_t GPBComputeBytesSize(int32_t fieldNumber, NSData *value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeBytesSizeNoTag(value); -} - -size_t GPBComputeUInt32Size(int32_t fieldNumber, uint32_t value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeUInt32SizeNoTag(value); -} - -size_t GPBComputeEnumSize(int32_t fieldNumber, int32_t value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeEnumSizeNoTag(value); -} - -size_t GPBComputeSFixed32Size(int32_t fieldNumber, int32_t value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeSFixed32SizeNoTag(value); -} - -size_t GPBComputeSFixed64Size(int32_t fieldNumber, int64_t value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeSFixed64SizeNoTag(value); -} - -size_t GPBComputeSInt32Size(int32_t fieldNumber, int32_t value) { - return GPBComputeTagSize(fieldNumber) + GPBComputeSInt32SizeNoTag(value); -} - -size_t GPBComputeSInt64Size(int32_t fieldNumber, int64_t value) { - return GPBComputeTagSize(fieldNumber) + - GPBComputeRawVarint64Size(GPBEncodeZigZag64(value)); -} - -size_t GPBComputeMessageSetExtensionSize(int32_t fieldNumber, - GPBMessage *value) { - return GPBComputeTagSize(GPBWireFormatMessageSetItem) * 2 + - GPBComputeUInt32Size(GPBWireFormatMessageSetTypeId, fieldNumber) + - GPBComputeMessageSize(GPBWireFormatMessageSetMessage, value); -} - -size_t GPBComputeRawMessageSetExtensionSize(int32_t fieldNumber, - NSData *value) { - return GPBComputeTagSize(GPBWireFormatMessageSetItem) * 2 + - GPBComputeUInt32Size(GPBWireFormatMessageSetTypeId, fieldNumber) + - GPBComputeBytesSize(GPBWireFormatMessageSetMessage, value); -} - -size_t GPBComputeTagSize(int32_t fieldNumber) { - return GPBComputeRawVarint32Size( - GPBWireFormatMakeTag(fieldNumber, GPBWireFormatVarint)); -} - -size_t GPBComputeWireFormatTagSize(int field_number, GPBDataType dataType) { - size_t result = GPBComputeTagSize(field_number); - if (dataType == GPBDataTypeGroup) { - // Groups have both a start and an end tag. - return result * 2; - } else { - return result; - } -} - -size_t GPBComputeRawVarint32Size(int32_t value) { - // value is treated as unsigned, so it won't be sign-extended if negative. - if ((value & (0xffffffff << 7)) == 0) return 1; - if ((value & (0xffffffff << 14)) == 0) return 2; - if ((value & (0xffffffff << 21)) == 0) return 3; - if ((value & (0xffffffff << 28)) == 0) return 4; - return 5; -} - -size_t GPBComputeRawVarint32SizeForInteger(NSInteger value) { - // Note the truncation. - return GPBComputeRawVarint32Size((int32_t)value); -} - -size_t GPBComputeRawVarint64Size(int64_t value) { - if ((value & (0xffffffffffffffffL << 7)) == 0) return 1; - if ((value & (0xffffffffffffffffL << 14)) == 0) return 2; - if ((value & (0xffffffffffffffffL << 21)) == 0) return 3; - if ((value & (0xffffffffffffffffL << 28)) == 0) return 4; - if ((value & (0xffffffffffffffffL << 35)) == 0) return 5; - if ((value & (0xffffffffffffffffL << 42)) == 0) return 6; - if ((value & (0xffffffffffffffffL << 49)) == 0) return 7; - if ((value & (0xffffffffffffffffL << 56)) == 0) return 8; - if ((value & (0xffffffffffffffffL << 63)) == 0) return 9; - return 10; -} diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream_PackagePrivate.h b/Old My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream_PackagePrivate.h deleted file mode 100755 index 2e7bb4c..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBCodedOutputStream_PackagePrivate.h +++ /dev/null @@ -1,126 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2016 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBCodedOutputStream.h" - -NS_ASSUME_NONNULL_BEGIN - -CF_EXTERN_C_BEGIN - -size_t GPBComputeDoubleSize(int32_t fieldNumber, double value) - __attribute__((const)); -size_t GPBComputeFloatSize(int32_t fieldNumber, float value) - __attribute__((const)); -size_t GPBComputeUInt64Size(int32_t fieldNumber, uint64_t value) - __attribute__((const)); -size_t GPBComputeInt64Size(int32_t fieldNumber, int64_t value) - __attribute__((const)); -size_t GPBComputeInt32Size(int32_t fieldNumber, int32_t value) - __attribute__((const)); -size_t GPBComputeFixed64Size(int32_t fieldNumber, uint64_t value) - __attribute__((const)); -size_t GPBComputeFixed32Size(int32_t fieldNumber, uint32_t value) - __attribute__((const)); -size_t GPBComputeBoolSize(int32_t fieldNumber, BOOL value) - __attribute__((const)); -size_t GPBComputeStringSize(int32_t fieldNumber, NSString *value) - __attribute__((const)); -size_t GPBComputeGroupSize(int32_t fieldNumber, GPBMessage *value) - __attribute__((const)); -size_t GPBComputeUnknownGroupSize(int32_t fieldNumber, - GPBUnknownFieldSet *value) - __attribute__((const)); -size_t GPBComputeMessageSize(int32_t fieldNumber, GPBMessage *value) - __attribute__((const)); -size_t GPBComputeBytesSize(int32_t fieldNumber, NSData *value) - __attribute__((const)); -size_t GPBComputeUInt32Size(int32_t fieldNumber, uint32_t value) - __attribute__((const)); -size_t GPBComputeSFixed32Size(int32_t fieldNumber, int32_t value) - __attribute__((const)); -size_t GPBComputeSFixed64Size(int32_t fieldNumber, int64_t value) - __attribute__((const)); -size_t GPBComputeSInt32Size(int32_t fieldNumber, int32_t value) - __attribute__((const)); -size_t GPBComputeSInt64Size(int32_t fieldNumber, int64_t value) - __attribute__((const)); -size_t GPBComputeTagSize(int32_t fieldNumber) __attribute__((const)); -size_t GPBComputeWireFormatTagSize(int field_number, GPBDataType dataType) - __attribute__((const)); - -size_t GPBComputeDoubleSizeNoTag(double value) __attribute__((const)); -size_t GPBComputeFloatSizeNoTag(float value) __attribute__((const)); -size_t GPBComputeUInt64SizeNoTag(uint64_t value) __attribute__((const)); -size_t GPBComputeInt64SizeNoTag(int64_t value) __attribute__((const)); -size_t GPBComputeInt32SizeNoTag(int32_t value) __attribute__((const)); -size_t GPBComputeFixed64SizeNoTag(uint64_t value) __attribute__((const)); -size_t GPBComputeFixed32SizeNoTag(uint32_t value) __attribute__((const)); -size_t GPBComputeBoolSizeNoTag(BOOL value) __attribute__((const)); -size_t GPBComputeStringSizeNoTag(NSString *value) __attribute__((const)); -size_t GPBComputeGroupSizeNoTag(GPBMessage *value) __attribute__((const)); -size_t GPBComputeUnknownGroupSizeNoTag(GPBUnknownFieldSet *value) - __attribute__((const)); -size_t GPBComputeMessageSizeNoTag(GPBMessage *value) __attribute__((const)); -size_t GPBComputeBytesSizeNoTag(NSData *value) __attribute__((const)); -size_t GPBComputeUInt32SizeNoTag(int32_t value) __attribute__((const)); -size_t GPBComputeEnumSizeNoTag(int32_t value) __attribute__((const)); -size_t GPBComputeSFixed32SizeNoTag(int32_t value) __attribute__((const)); -size_t GPBComputeSFixed64SizeNoTag(int64_t value) __attribute__((const)); -size_t GPBComputeSInt32SizeNoTag(int32_t value) __attribute__((const)); -size_t GPBComputeSInt64SizeNoTag(int64_t value) __attribute__((const)); - -// Note that this will calculate the size of 64 bit values truncated to 32. -size_t GPBComputeSizeTSizeAsInt32NoTag(size_t value) __attribute__((const)); - -size_t GPBComputeRawVarint32Size(int32_t value) __attribute__((const)); -size_t GPBComputeRawVarint64Size(int64_t value) __attribute__((const)); - -// Note that this will calculate the size of 64 bit values truncated to 32. -size_t GPBComputeRawVarint32SizeForInteger(NSInteger value) - __attribute__((const)); - -// Compute the number of bytes that would be needed to encode a -// MessageSet extension to the stream. For historical reasons, -// the wire format differs from normal fields. -size_t GPBComputeMessageSetExtensionSize(int32_t fieldNumber, GPBMessage *value) - __attribute__((const)); - -// Compute the number of bytes that would be needed to encode an -// unparsed MessageSet extension field to the stream. For -// historical reasons, the wire format differs from normal fields. -size_t GPBComputeRawMessageSetExtensionSize(int32_t fieldNumber, NSData *value) - __attribute__((const)); - -size_t GPBComputeEnumSize(int32_t fieldNumber, int32_t value) - __attribute__((const)); - -CF_EXTERN_C_END - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBDescriptor.h b/Old My Mind/Pods/Protobuf/objectivec/GPBDescriptor.h deleted file mode 100755 index 651f4de..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBDescriptor.h +++ /dev/null @@ -1,288 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBRuntimeTypes.h" - -@class GPBEnumDescriptor; -@class GPBFieldDescriptor; -@class GPBFileDescriptor; -@class GPBOneofDescriptor; - -NS_ASSUME_NONNULL_BEGIN - -/** Syntax used in the proto file. */ -typedef NS_ENUM(uint8_t, GPBFileSyntax) { - /** Unknown syntax. */ - GPBFileSyntaxUnknown = 0, - /** Proto2 syntax. */ - GPBFileSyntaxProto2 = 2, - /** Proto3 syntax. */ - GPBFileSyntaxProto3 = 3, -}; - -/** Type of proto field. */ -typedef NS_ENUM(uint8_t, GPBFieldType) { - /** Optional/required field. Only valid for proto2 fields. */ - GPBFieldTypeSingle, - /** Repeated field. */ - GPBFieldTypeRepeated, - /** Map field. */ - GPBFieldTypeMap, -}; - -/** - * Describes a proto message. - **/ -@interface GPBDescriptor : NSObject - -/** Name of the message. */ -@property(nonatomic, readonly, copy) NSString *name; -/** Fields declared in the message. */ -@property(nonatomic, readonly, strong, nullable) NSArray *fields; -/** Oneofs declared in the message. */ -@property(nonatomic, readonly, strong, nullable) NSArray *oneofs; -/** Extension range declared for the message. */ -@property(nonatomic, readonly, nullable) const GPBExtensionRange *extensionRanges; -/** Number of extension ranges declared for the message. */ -@property(nonatomic, readonly) uint32_t extensionRangesCount; -/** Descriptor for the file where the message was defined. */ -@property(nonatomic, readonly, assign) GPBFileDescriptor *file; - -/** Whether the message is in wire format or not. */ -@property(nonatomic, readonly, getter=isWireFormat) BOOL wireFormat; -/** The class of this message. */ -@property(nonatomic, readonly) Class messageClass; -/** Containing message descriptor if this message is nested, or nil otherwise. */ -@property(readonly, nullable) GPBDescriptor *containingType; -/** - * Fully qualified name for this message (package.message). Can be nil if the - * value is unable to be computed. - */ -@property(readonly, nullable) NSString *fullName; - -/** - * Gets the field for the given number. - * - * @param fieldNumber The number for the field to get. - * - * @return The field descriptor for the given number, or nil if not found. - **/ -- (nullable GPBFieldDescriptor *)fieldWithNumber:(uint32_t)fieldNumber; - -/** - * Gets the field for the given name. - * - * @param name The name for the field to get. - * - * @return The field descriptor for the given name, or nil if not found. - **/ -- (nullable GPBFieldDescriptor *)fieldWithName:(NSString *)name; - -/** - * Gets the oneof for the given name. - * - * @param name The name for the oneof to get. - * - * @return The oneof descriptor for the given name, or nil if not found. - **/ -- (nullable GPBOneofDescriptor *)oneofWithName:(NSString *)name; - -@end - -/** - * Describes a proto file. - **/ -@interface GPBFileDescriptor : NSObject - -/** The package declared in the proto file. */ -@property(nonatomic, readonly, copy) NSString *package; -/** The objc prefix declared in the proto file. */ -@property(nonatomic, readonly, copy, nullable) NSString *objcPrefix; -/** The syntax of the proto file. */ -@property(nonatomic, readonly) GPBFileSyntax syntax; - -@end - -/** - * Describes a oneof field. - **/ -@interface GPBOneofDescriptor : NSObject -/** Name of the oneof field. */ -@property(nonatomic, readonly) NSString *name; -/** Fields declared in the oneof. */ -@property(nonatomic, readonly) NSArray *fields; - -/** - * Gets the field for the given number. - * - * @param fieldNumber The number for the field to get. - * - * @return The field descriptor for the given number, or nil if not found. - **/ -- (nullable GPBFieldDescriptor *)fieldWithNumber:(uint32_t)fieldNumber; - -/** - * Gets the field for the given name. - * - * @param name The name for the field to get. - * - * @return The field descriptor for the given name, or nil if not found. - **/ -- (nullable GPBFieldDescriptor *)fieldWithName:(NSString *)name; - -@end - -/** - * Describes a proto field. - **/ -@interface GPBFieldDescriptor : NSObject - -/** Name of the field. */ -@property(nonatomic, readonly, copy) NSString *name; -/** Number associated with the field. */ -@property(nonatomic, readonly) uint32_t number; -/** Data type contained in the field. */ -@property(nonatomic, readonly) GPBDataType dataType; -/** Whether it has a default value or not. */ -@property(nonatomic, readonly) BOOL hasDefaultValue; -/** Default value for the field. */ -@property(nonatomic, readonly) GPBGenericValue defaultValue; -/** Whether this field is required. Only valid for proto2 fields. */ -@property(nonatomic, readonly, getter=isRequired) BOOL required; -/** Whether this field is optional. */ -@property(nonatomic, readonly, getter=isOptional) BOOL optional; -/** Type of field (single, repeated, map). */ -@property(nonatomic, readonly) GPBFieldType fieldType; -/** Type of the key if the field is a map. The value's type is -fieldType. */ -@property(nonatomic, readonly) GPBDataType mapKeyDataType; -/** Whether the field is packable. */ -@property(nonatomic, readonly, getter=isPackable) BOOL packable; - -/** The containing oneof if this field is part of one, nil otherwise. */ -@property(nonatomic, readonly, assign, nullable) GPBOneofDescriptor *containingOneof; - -/** Class of the message if the field is of message type. */ -@property(nonatomic, readonly, assign, nullable) Class msgClass; - -/** Descriptor for the enum if this field is an enum. */ -@property(nonatomic, readonly, strong, nullable) GPBEnumDescriptor *enumDescriptor; - -/** - * Checks whether the given enum raw value is a valid enum value. - * - * @param value The raw enum value to check. - * - * @return YES if value is a valid enum raw value. - **/ -- (BOOL)isValidEnumValue:(int32_t)value; - -/** @return Name for the text format, or nil if not known. */ -- (nullable NSString *)textFormatName; - -@end - -/** - * Describes a proto enum. - **/ -@interface GPBEnumDescriptor : NSObject - -/** Name of the enum. */ -@property(nonatomic, readonly, copy) NSString *name; -/** Function that validates that raw values are valid enum values. */ -@property(nonatomic, readonly) GPBEnumValidationFunc enumVerifier; - -/** - * Returns the enum value name for the given raw enum. - * - * @param number The raw enum value. - * - * @return The name of the enum value passed, or nil if not valid. - **/ -- (nullable NSString *)enumNameForValue:(int32_t)number; - -/** - * Gets the enum raw value for the given enum name. - * - * @param outValue A pointer where the value will be set. - * @param name The enum name for which to get the raw value. - * - * @return YES if a value was copied into the pointer, NO otherwise. - **/ -- (BOOL)getValue:(nullable int32_t *)outValue forEnumName:(NSString *)name; - -/** - * Returns the text format for the given raw enum value. - * - * @param number The raw enum value. - * - * @return The text format name for the raw enum value, or nil if not valid. - **/ -- (nullable NSString *)textFormatNameForValue:(int32_t)number; - -/** - * Gets the enum raw value for the given text format name. - * - * @param outValue A pointer where the value will be set. - * @param textFormatName The text format name for which to get the raw value. - * - * @return YES if a value was copied into the pointer, NO otherwise. - **/ -- (BOOL)getValue:(nullable int32_t *)outValue forEnumTextFormatName:(NSString *)textFormatName; - -@end - -/** - * Describes a proto extension. - **/ -@interface GPBExtensionDescriptor : NSObject -/** Field number under which the extension is stored. */ -@property(nonatomic, readonly) uint32_t fieldNumber; -/** The containing message class, i.e. the class extended by this extension. */ -@property(nonatomic, readonly) Class containingMessageClass; -/** Data type contained in the extension. */ -@property(nonatomic, readonly) GPBDataType dataType; -/** Whether the extension is repeated. */ -@property(nonatomic, readonly, getter=isRepeated) BOOL repeated; -/** Whether the extension is packable. */ -@property(nonatomic, readonly, getter=isPackable) BOOL packable; -/** The class of the message if the extension is of message type. */ -@property(nonatomic, readonly, assign) Class msgClass; -/** The singleton name for the extension. */ -@property(nonatomic, readonly) NSString *singletonName; -/** The enum descriptor if the extension is of enum type. */ -@property(nonatomic, readonly, strong, nullable) GPBEnumDescriptor *enumDescriptor; -/** The default value for the extension. */ -@property(nonatomic, readonly, nullable) id defaultValue; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBDescriptor.m b/Old My Mind/Pods/Protobuf/objectivec/GPBDescriptor.m deleted file mode 100755 index 0753a94..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBDescriptor.m +++ /dev/null @@ -1,1104 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBDescriptor_PackagePrivate.h" - -#import - -#import "GPBUtilities_PackagePrivate.h" -#import "GPBWireFormat.h" -#import "GPBMessage_PackagePrivate.h" - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -// The addresses of these variables are used as keys for objc_getAssociatedObject. -static const char kTextFormatExtraValueKey = 0; -static const char kParentClassNameValueKey = 0; -static const char kClassNameSuffixKey = 0; - -// Utility function to generate selectors on the fly. -static SEL SelFromStrings(const char *prefix, const char *middle, - const char *suffix, BOOL takesArg) { - if (prefix == NULL && suffix == NULL && !takesArg) { - return sel_getUid(middle); - } - const size_t prefixLen = prefix != NULL ? strlen(prefix) : 0; - const size_t middleLen = strlen(middle); - const size_t suffixLen = suffix != NULL ? strlen(suffix) : 0; - size_t totalLen = - prefixLen + middleLen + suffixLen + 1; // include space for null on end. - if (takesArg) { - totalLen += 1; - } - char buffer[totalLen]; - if (prefix != NULL) { - memcpy(buffer, prefix, prefixLen); - memcpy(buffer + prefixLen, middle, middleLen); - buffer[prefixLen] = (char)toupper(buffer[prefixLen]); - } else { - memcpy(buffer, middle, middleLen); - } - if (suffix != NULL) { - memcpy(buffer + prefixLen + middleLen, suffix, suffixLen); - } - if (takesArg) { - buffer[totalLen - 2] = ':'; - } - // Always null terminate it. - buffer[totalLen - 1] = 0; - - SEL result = sel_getUid(buffer); - return result; -} - -static NSArray *NewFieldsArrayForHasIndex(int hasIndex, - NSArray *allMessageFields) - __attribute__((ns_returns_retained)); - -static NSArray *NewFieldsArrayForHasIndex(int hasIndex, - NSArray *allMessageFields) { - NSMutableArray *result = [[NSMutableArray alloc] init]; - for (GPBFieldDescriptor *fieldDesc in allMessageFields) { - if (fieldDesc->description_->hasIndex == hasIndex) { - [result addObject:fieldDesc]; - } - } - return result; -} - -@implementation GPBDescriptor { - Class messageClass_; - GPBFileDescriptor *file_; - BOOL wireFormat_; -} - -@synthesize messageClass = messageClass_; -@synthesize fields = fields_; -@synthesize oneofs = oneofs_; -@synthesize extensionRanges = extensionRanges_; -@synthesize extensionRangesCount = extensionRangesCount_; -@synthesize file = file_; -@synthesize wireFormat = wireFormat_; - -+ (instancetype) - allocDescriptorForClass:(Class)messageClass - rootClass:(Class)rootClass - file:(GPBFileDescriptor *)file - fields:(void *)fieldDescriptions - fieldCount:(uint32_t)fieldCount - storageSize:(uint32_t)storageSize - flags:(GPBDescriptorInitializationFlags)flags { - // The rootClass is no longer used, but it is passed in to ensure it - // was started up during initialization also. - (void)rootClass; - NSMutableArray *fields = nil; - GPBFileSyntax syntax = file.syntax; - BOOL fieldsIncludeDefault = - (flags & GPBDescriptorInitializationFlag_FieldsWithDefault) != 0; - - void *desc; - for (uint32_t i = 0; i < fieldCount; ++i) { - if (fields == nil) { - fields = [[NSMutableArray alloc] initWithCapacity:fieldCount]; - } - // Need correctly typed pointer for array indexing below to work. - if (fieldsIncludeDefault) { - GPBMessageFieldDescriptionWithDefault *fieldDescWithDefault = fieldDescriptions; - desc = &(fieldDescWithDefault[i]); - } else { - GPBMessageFieldDescription *fieldDesc = fieldDescriptions; - desc = &(fieldDesc[i]); - } - GPBFieldDescriptor *fieldDescriptor = - [[GPBFieldDescriptor alloc] initWithFieldDescription:desc - includesDefault:fieldsIncludeDefault - syntax:syntax]; - [fields addObject:fieldDescriptor]; - [fieldDescriptor release]; - } - - BOOL wireFormat = (flags & GPBDescriptorInitializationFlag_WireFormat) != 0; - GPBDescriptor *descriptor = [[self alloc] initWithClass:messageClass - file:file - fields:fields - storageSize:storageSize - wireFormat:wireFormat]; - [fields release]; - return descriptor; -} - -- (instancetype)initWithClass:(Class)messageClass - file:(GPBFileDescriptor *)file - fields:(NSArray *)fields - storageSize:(uint32_t)storageSize - wireFormat:(BOOL)wireFormat { - if ((self = [super init])) { - messageClass_ = messageClass; - file_ = file; - fields_ = [fields retain]; - storageSize_ = storageSize; - wireFormat_ = wireFormat; - } - return self; -} - -- (void)dealloc { - [fields_ release]; - [oneofs_ release]; - [super dealloc]; -} - -- (void)setupOneofs:(const char **)oneofNames - count:(uint32_t)count - firstHasIndex:(int32_t)firstHasIndex { - NSCAssert(firstHasIndex < 0, @"Should always be <0"); - NSMutableArray *oneofs = [[NSMutableArray alloc] initWithCapacity:count]; - for (uint32_t i = 0, hasIndex = firstHasIndex; i < count; ++i, --hasIndex) { - const char *name = oneofNames[i]; - NSArray *fieldsForOneof = NewFieldsArrayForHasIndex(hasIndex, fields_); - NSCAssert(fieldsForOneof.count > 0, - @"No fields for this oneof? (%s:%d)", name, hasIndex); - GPBOneofDescriptor *oneofDescriptor = - [[GPBOneofDescriptor alloc] initWithName:name fields:fieldsForOneof]; - [oneofs addObject:oneofDescriptor]; - [oneofDescriptor release]; - [fieldsForOneof release]; - } - oneofs_ = oneofs; -} - -- (void)setupExtraTextInfo:(const char *)extraTextFormatInfo { - // Extra info is a compile time option, so skip the work if not needed. - if (extraTextFormatInfo) { - NSValue *extraInfoValue = [NSValue valueWithPointer:extraTextFormatInfo]; - for (GPBFieldDescriptor *fieldDescriptor in fields_) { - if (fieldDescriptor->description_->flags & GPBFieldTextFormatNameCustom) { - objc_setAssociatedObject(fieldDescriptor, &kTextFormatExtraValueKey, - extraInfoValue, - OBJC_ASSOCIATION_RETAIN_NONATOMIC); - } - } - } -} - -- (void)setupExtensionRanges:(const GPBExtensionRange *)ranges count:(int32_t)count { - extensionRanges_ = ranges; - extensionRangesCount_ = count; -} - -- (void)setupContainingMessageClassName:(const char *)msgClassName { - // Note: Only fetch the class here, can't send messages to it because - // that could cause cycles back to this class within +initialize if - // two messages have each other in fields (i.e. - they build a graph). - NSAssert(objc_getClass(msgClassName), @"Class %s not defined", msgClassName); - NSValue *parentNameValue = [NSValue valueWithPointer:msgClassName]; - objc_setAssociatedObject(self, &kParentClassNameValueKey, - parentNameValue, - OBJC_ASSOCIATION_RETAIN_NONATOMIC); -} - -- (void)setupMessageClassNameSuffix:(NSString *)suffix { - if (suffix.length) { - objc_setAssociatedObject(self, &kClassNameSuffixKey, - suffix, - OBJC_ASSOCIATION_RETAIN_NONATOMIC); - } -} - -- (NSString *)name { - return NSStringFromClass(messageClass_); -} - -- (GPBDescriptor *)containingType { - NSValue *parentNameValue = - objc_getAssociatedObject(self, &kParentClassNameValueKey); - if (!parentNameValue) { - return nil; - } - const char *parentName = [parentNameValue pointerValue]; - Class parentClass = objc_getClass(parentName); - NSAssert(parentClass, @"Class %s not defined", parentName); - return [parentClass descriptor]; -} - -- (NSString *)fullName { - NSString *className = NSStringFromClass(self.messageClass); - GPBFileDescriptor *file = self.file; - NSString *objcPrefix = file.objcPrefix; - if (objcPrefix && ![className hasPrefix:objcPrefix]) { - NSAssert(0, - @"Class didn't have correct prefix? (%@ - %@)", - className, objcPrefix); - return nil; - } - GPBDescriptor *parent = self.containingType; - - NSString *name = nil; - if (parent) { - NSString *parentClassName = NSStringFromClass(parent.messageClass); - // The generator will add _Class to avoid reserved words, drop it. - NSString *suffix = objc_getAssociatedObject(parent, &kClassNameSuffixKey); - if (suffix) { - if (![parentClassName hasSuffix:suffix]) { - NSAssert(0, - @"ParentMessage class didn't have correct suffix? (%@ - %@)", - className, suffix); - return nil; - } - parentClassName = - [parentClassName substringToIndex:(parentClassName.length - suffix.length)]; - } - NSString *parentPrefix = [parentClassName stringByAppendingString:@"_"]; - if (![className hasPrefix:parentPrefix]) { - NSAssert(0, - @"Class didn't have the correct parent name prefix? (%@ - %@)", - parentPrefix, className); - return nil; - } - name = [className substringFromIndex:parentPrefix.length]; - } else { - name = [className substringFromIndex:objcPrefix.length]; - } - - // The generator will add _Class to avoid reserved words, drop it. - NSString *suffix = objc_getAssociatedObject(self, &kClassNameSuffixKey); - if (suffix) { - if (![name hasSuffix:suffix]) { - NSAssert(0, - @"Message class didn't have correct suffix? (%@ - %@)", - name, suffix); - return nil; - } - name = [name substringToIndex:(name.length - suffix.length)]; - } - - NSString *prefix = (parent != nil ? parent.fullName : file.package); - NSString *result; - if (prefix.length > 0) { - result = [NSString stringWithFormat:@"%@.%@", prefix, name]; - } else { - result = name; - } - return result; -} - -- (id)copyWithZone:(NSZone *)zone { -#pragma unused(zone) - return [self retain]; -} - -- (GPBFieldDescriptor *)fieldWithNumber:(uint32_t)fieldNumber { - for (GPBFieldDescriptor *descriptor in fields_) { - if (GPBFieldNumber(descriptor) == fieldNumber) { - return descriptor; - } - } - return nil; -} - -- (GPBFieldDescriptor *)fieldWithName:(NSString *)name { - for (GPBFieldDescriptor *descriptor in fields_) { - if ([descriptor.name isEqual:name]) { - return descriptor; - } - } - return nil; -} - -- (GPBOneofDescriptor *)oneofWithName:(NSString *)name { - for (GPBOneofDescriptor *descriptor in oneofs_) { - if ([descriptor.name isEqual:name]) { - return descriptor; - } - } - return nil; -} - -@end - -@implementation GPBFileDescriptor { - NSString *package_; - NSString *objcPrefix_; - GPBFileSyntax syntax_; -} - -@synthesize package = package_; -@synthesize objcPrefix = objcPrefix_; -@synthesize syntax = syntax_; - -- (instancetype)initWithPackage:(NSString *)package - objcPrefix:(NSString *)objcPrefix - syntax:(GPBFileSyntax)syntax { - self = [super init]; - if (self) { - package_ = [package copy]; - objcPrefix_ = [objcPrefix copy]; - syntax_ = syntax; - } - return self; -} - -- (instancetype)initWithPackage:(NSString *)package - syntax:(GPBFileSyntax)syntax { - self = [super init]; - if (self) { - package_ = [package copy]; - syntax_ = syntax; - } - return self; -} - -- (void)dealloc { - [package_ release]; - [objcPrefix_ release]; - [super dealloc]; -} - -@end - -@implementation GPBOneofDescriptor - -@synthesize fields = fields_; - -- (instancetype)initWithName:(const char *)name fields:(NSArray *)fields { - self = [super init]; - if (self) { - name_ = name; - fields_ = [fields retain]; - for (GPBFieldDescriptor *fieldDesc in fields) { - fieldDesc->containingOneof_ = self; - } - - caseSel_ = SelFromStrings(NULL, name, "OneOfCase", NO); - } - return self; -} - -- (void)dealloc { - [fields_ release]; - [super dealloc]; -} - -- (NSString *)name { - return @(name_); -} - -- (GPBFieldDescriptor *)fieldWithNumber:(uint32_t)fieldNumber { - for (GPBFieldDescriptor *descriptor in fields_) { - if (GPBFieldNumber(descriptor) == fieldNumber) { - return descriptor; - } - } - return nil; -} - -- (GPBFieldDescriptor *)fieldWithName:(NSString *)name { - for (GPBFieldDescriptor *descriptor in fields_) { - if ([descriptor.name isEqual:name]) { - return descriptor; - } - } - return nil; -} - -@end - -uint32_t GPBFieldTag(GPBFieldDescriptor *self) { - GPBMessageFieldDescription *description = self->description_; - GPBWireFormat format; - if ((description->flags & GPBFieldMapKeyMask) != 0) { - // Maps are repeated messages on the wire. - format = GPBWireFormatForType(GPBDataTypeMessage, NO); - } else { - format = GPBWireFormatForType(description->dataType, - ((description->flags & GPBFieldPacked) != 0)); - } - return GPBWireFormatMakeTag(description->number, format); -} - -uint32_t GPBFieldAlternateTag(GPBFieldDescriptor *self) { - GPBMessageFieldDescription *description = self->description_; - NSCAssert((description->flags & GPBFieldRepeated) != 0, - @"Only valid on repeated fields"); - GPBWireFormat format = - GPBWireFormatForType(description->dataType, - ((description->flags & GPBFieldPacked) == 0)); - return GPBWireFormatMakeTag(description->number, format); -} - -@implementation GPBFieldDescriptor { - GPBGenericValue defaultValue_; - - // Message ivars - Class msgClass_; - - // Enum ivars. - // If protos are generated with GenerateEnumDescriptors on then it will - // be a enumDescriptor, otherwise it will be a enumVerifier. - union { - GPBEnumDescriptor *enumDescriptor_; - GPBEnumValidationFunc enumVerifier_; - } enumHandling_; -} - -@synthesize msgClass = msgClass_; -@synthesize containingOneof = containingOneof_; - -- (instancetype)init { - // Throw an exception if people attempt to not use the designated initializer. - self = [super init]; - if (self != nil) { - [self doesNotRecognizeSelector:_cmd]; - self = nil; - } - return self; -} - -- (instancetype)initWithFieldDescription:(void *)description - includesDefault:(BOOL)includesDefault - syntax:(GPBFileSyntax)syntax { - if ((self = [super init])) { - GPBMessageFieldDescription *coreDesc; - if (includesDefault) { - coreDesc = &(((GPBMessageFieldDescriptionWithDefault *)description)->core); - } else { - coreDesc = description; - } - description_ = coreDesc; - getSel_ = sel_getUid(coreDesc->name); - setSel_ = SelFromStrings("set", coreDesc->name, NULL, YES); - - GPBDataType dataType = coreDesc->dataType; - BOOL isMessage = GPBDataTypeIsMessage(dataType); - BOOL isMapOrArray = GPBFieldIsMapOrArray(self); - - if (isMapOrArray) { - // map<>/repeated fields get a *Count property (inplace of a has*) to - // support checking if there are any entries without triggering - // autocreation. - hasOrCountSel_ = SelFromStrings(NULL, coreDesc->name, "_Count", NO); - } else { - // If there is a positive hasIndex, then: - // - All fields types for proto2 messages get has* selectors. - // - Only message fields for proto3 messages get has* selectors. - // Note: the positive check is to handle oneOfs, we can't check - // containingOneof_ because it isn't set until after initialization. - if ((coreDesc->hasIndex >= 0) && - (coreDesc->hasIndex != GPBNoHasBit) && - ((syntax != GPBFileSyntaxProto3) || isMessage)) { - hasOrCountSel_ = SelFromStrings("has", coreDesc->name, NULL, NO); - setHasSel_ = SelFromStrings("setHas", coreDesc->name, NULL, YES); - } - } - - // Extra type specific data. - if (isMessage) { - const char *className = coreDesc->dataTypeSpecific.className; - // Note: Only fetch the class here, can't send messages to it because - // that could cause cycles back to this class within +initialize if - // two messages have each other in fields (i.e. - they build a graph). - msgClass_ = objc_getClass(className); - NSAssert(msgClass_, @"Class %s not defined", className); - } else if (dataType == GPBDataTypeEnum) { - if ((coreDesc->flags & GPBFieldHasEnumDescriptor) != 0) { - enumHandling_.enumDescriptor_ = - coreDesc->dataTypeSpecific.enumDescFunc(); - } else { - enumHandling_.enumVerifier_ = - coreDesc->dataTypeSpecific.enumVerifier; - } - } - - // Non map<>/repeated fields can have defaults in proto2 syntax. - if (!isMapOrArray && includesDefault) { - defaultValue_ = ((GPBMessageFieldDescriptionWithDefault *)description)->defaultValue; - if (dataType == GPBDataTypeBytes) { - // Data stored as a length prefixed (network byte order) c-string in - // descriptor structure. - const uint8_t *bytes = (const uint8_t *)defaultValue_.valueData; - if (bytes) { - uint32_t length = *((uint32_t *)bytes); - length = ntohl(length); - bytes += sizeof(length); - defaultValue_.valueData = - [[NSData alloc] initWithBytes:bytes length:length]; - } - } - } - } - return self; -} - -- (void)dealloc { - if (description_->dataType == GPBDataTypeBytes && - !(description_->flags & GPBFieldRepeated)) { - [defaultValue_.valueData release]; - } - [super dealloc]; -} - -- (GPBDataType)dataType { - return description_->dataType; -} - -- (BOOL)hasDefaultValue { - return (description_->flags & GPBFieldHasDefaultValue) != 0; -} - -- (uint32_t)number { - return description_->number; -} - -- (NSString *)name { - return @(description_->name); -} - -- (BOOL)isRequired { - return (description_->flags & GPBFieldRequired) != 0; -} - -- (BOOL)isOptional { - return (description_->flags & GPBFieldOptional) != 0; -} - -- (GPBFieldType)fieldType { - GPBFieldFlags flags = description_->flags; - if ((flags & GPBFieldRepeated) != 0) { - return GPBFieldTypeRepeated; - } else if ((flags & GPBFieldMapKeyMask) != 0) { - return GPBFieldTypeMap; - } else { - return GPBFieldTypeSingle; - } -} - -- (GPBDataType)mapKeyDataType { - switch (description_->flags & GPBFieldMapKeyMask) { - case GPBFieldMapKeyInt32: - return GPBDataTypeInt32; - case GPBFieldMapKeyInt64: - return GPBDataTypeInt64; - case GPBFieldMapKeyUInt32: - return GPBDataTypeUInt32; - case GPBFieldMapKeyUInt64: - return GPBDataTypeUInt64; - case GPBFieldMapKeySInt32: - return GPBDataTypeSInt32; - case GPBFieldMapKeySInt64: - return GPBDataTypeSInt64; - case GPBFieldMapKeyFixed32: - return GPBDataTypeFixed32; - case GPBFieldMapKeyFixed64: - return GPBDataTypeFixed64; - case GPBFieldMapKeySFixed32: - return GPBDataTypeSFixed32; - case GPBFieldMapKeySFixed64: - return GPBDataTypeSFixed64; - case GPBFieldMapKeyBool: - return GPBDataTypeBool; - case GPBFieldMapKeyString: - return GPBDataTypeString; - - default: - NSAssert(0, @"Not a map type"); - return GPBDataTypeInt32; // For lack of anything better. - } -} - -- (BOOL)isPackable { - return (description_->flags & GPBFieldPacked) != 0; -} - -- (BOOL)isValidEnumValue:(int32_t)value { - NSAssert(description_->dataType == GPBDataTypeEnum, - @"Field Must be of type GPBDataTypeEnum"); - if (description_->flags & GPBFieldHasEnumDescriptor) { - return enumHandling_.enumDescriptor_.enumVerifier(value); - } else { - return enumHandling_.enumVerifier_(value); - } -} - -- (GPBEnumDescriptor *)enumDescriptor { - if (description_->flags & GPBFieldHasEnumDescriptor) { - return enumHandling_.enumDescriptor_; - } else { - return nil; - } -} - -- (GPBGenericValue)defaultValue { - // Depends on the fact that defaultValue_ is initialized either to "0/nil" or - // to an actual defaultValue in our initializer. - GPBGenericValue value = defaultValue_; - - if (!(description_->flags & GPBFieldRepeated)) { - // We special handle data and strings. If they are nil, we replace them - // with empty string/empty data. - GPBDataType type = description_->dataType; - if (type == GPBDataTypeBytes && value.valueData == nil) { - value.valueData = GPBEmptyNSData(); - } else if (type == GPBDataTypeString && value.valueString == nil) { - value.valueString = @""; - } - } - return value; -} - -- (NSString *)textFormatName { - if ((description_->flags & GPBFieldTextFormatNameCustom) != 0) { - NSValue *extraInfoValue = - objc_getAssociatedObject(self, &kTextFormatExtraValueKey); - // Support can be left out at generation time. - if (!extraInfoValue) { - return nil; - } - const uint8_t *extraTextFormatInfo = [extraInfoValue pointerValue]; - return GPBDecodeTextFormatName(extraTextFormatInfo, GPBFieldNumber(self), - self.name); - } - - // The logic here has to match SetCommonFieldVariables() from - // objectivec_field.cc in the proto compiler. - NSString *name = self.name; - NSUInteger len = [name length]; - - // Remove the "_p" added to reserved names. - if ([name hasSuffix:@"_p"]) { - name = [name substringToIndex:(len - 2)]; - len = [name length]; - } - - // Remove "Array" from the end for repeated fields. - if (((description_->flags & GPBFieldRepeated) != 0) && - [name hasSuffix:@"Array"]) { - name = [name substringToIndex:(len - 5)]; - len = [name length]; - } - - // Groups vs. other fields. - if (description_->dataType == GPBDataTypeGroup) { - // Just capitalize the first letter. - unichar firstChar = [name characterAtIndex:0]; - if (firstChar >= 'a' && firstChar <= 'z') { - NSString *firstCharString = - [NSString stringWithFormat:@"%C", (unichar)(firstChar - 'a' + 'A')]; - NSString *result = - [name stringByReplacingCharactersInRange:NSMakeRange(0, 1) - withString:firstCharString]; - return result; - } - return name; - - } else { - // Undo the CamelCase. - NSMutableString *result = [NSMutableString stringWithCapacity:len]; - for (uint32_t i = 0; i < len; i++) { - unichar c = [name characterAtIndex:i]; - if (c >= 'A' && c <= 'Z') { - if (i > 0) { - [result appendFormat:@"_%C", (unichar)(c - 'A' + 'a')]; - } else { - [result appendFormat:@"%C", c]; - } - } else { - [result appendFormat:@"%C", c]; - } - } - return result; - } -} - -@end - -@implementation GPBEnumDescriptor { - NSString *name_; - // valueNames_ is a single c string with all of the value names appended - // together, each null terminated. -calcValueNameOffsets fills in - // nameOffsets_ with the offsets to allow quicker access to the individual - // names. - const char *valueNames_; - const int32_t *values_; - GPBEnumValidationFunc enumVerifier_; - const uint8_t *extraTextFormatInfo_; - uint32_t *nameOffsets_; - uint32_t valueCount_; -} - -@synthesize name = name_; -@synthesize enumVerifier = enumVerifier_; - -+ (instancetype) - allocDescriptorForName:(NSString *)name - valueNames:(const char *)valueNames - values:(const int32_t *)values - count:(uint32_t)valueCount - enumVerifier:(GPBEnumValidationFunc)enumVerifier { - GPBEnumDescriptor *descriptor = [[self alloc] initWithName:name - valueNames:valueNames - values:values - count:valueCount - enumVerifier:enumVerifier]; - return descriptor; -} - -+ (instancetype) - allocDescriptorForName:(NSString *)name - valueNames:(const char *)valueNames - values:(const int32_t *)values - count:(uint32_t)valueCount - enumVerifier:(GPBEnumValidationFunc)enumVerifier - extraTextFormatInfo:(const char *)extraTextFormatInfo { - // Call the common case. - GPBEnumDescriptor *descriptor = [self allocDescriptorForName:name - valueNames:valueNames - values:values - count:valueCount - enumVerifier:enumVerifier]; - // Set the extra info. - descriptor->extraTextFormatInfo_ = (const uint8_t *)extraTextFormatInfo; - return descriptor; -} - -- (instancetype)initWithName:(NSString *)name - valueNames:(const char *)valueNames - values:(const int32_t *)values - count:(uint32_t)valueCount - enumVerifier:(GPBEnumValidationFunc)enumVerifier { - if ((self = [super init])) { - name_ = [name copy]; - valueNames_ = valueNames; - values_ = values; - valueCount_ = valueCount; - enumVerifier_ = enumVerifier; - } - return self; -} - -- (void)dealloc { - [name_ release]; - if (nameOffsets_) free(nameOffsets_); - [super dealloc]; -} - -- (void)calcValueNameOffsets { - @synchronized(self) { - if (nameOffsets_ != NULL) { - return; - } - uint32_t *offsets = malloc(valueCount_ * sizeof(uint32_t)); - const char *scan = valueNames_; - for (uint32_t i = 0; i < valueCount_; ++i) { - offsets[i] = (uint32_t)(scan - valueNames_); - while (*scan != '\0') ++scan; - ++scan; // Step over the null. - } - nameOffsets_ = offsets; - } -} - -- (NSString *)enumNameForValue:(int32_t)number { - if (nameOffsets_ == NULL) [self calcValueNameOffsets]; - - for (uint32_t i = 0; i < valueCount_; ++i) { - if (values_[i] == number) { - const char *valueName = valueNames_ + nameOffsets_[i]; - NSString *fullName = [NSString stringWithFormat:@"%@_%s", name_, valueName]; - return fullName; - } - } - return nil; -} - -- (BOOL)getValue:(int32_t *)outValue forEnumName:(NSString *)name { - // Must have the prefix. - NSUInteger prefixLen = name_.length + 1; - if ((name.length <= prefixLen) || ![name hasPrefix:name_] || - ([name characterAtIndex:prefixLen - 1] != '_')) { - return NO; - } - - // Skip over the prefix. - const char *nameAsCStr = [name UTF8String]; - nameAsCStr += prefixLen; - - if (nameOffsets_ == NULL) [self calcValueNameOffsets]; - - // Find it. - for (uint32_t i = 0; i < valueCount_; ++i) { - const char *valueName = valueNames_ + nameOffsets_[i]; - if (strcmp(nameAsCStr, valueName) == 0) { - if (outValue) { - *outValue = values_[i]; - } - return YES; - } - } - return NO; -} - -- (BOOL)getValue:(int32_t *)outValue forEnumTextFormatName:(NSString *)textFormatName { - if (nameOffsets_ == NULL) [self calcValueNameOffsets]; - - for (uint32_t i = 0; i < valueCount_; ++i) { - int32_t value = values_[i]; - NSString *valueTextFormatName = [self textFormatNameForValue:value]; - if ([valueTextFormatName isEqual:textFormatName]) { - if (outValue) { - *outValue = value; - } - return YES; - } - } - return NO; -} - -- (NSString *)textFormatNameForValue:(int32_t)number { - if (nameOffsets_ == NULL) [self calcValueNameOffsets]; - - // Find the EnumValue descriptor and its index. - BOOL foundIt = NO; - uint32_t valueDescriptorIndex; - for (valueDescriptorIndex = 0; valueDescriptorIndex < valueCount_; - ++valueDescriptorIndex) { - if (values_[valueDescriptorIndex] == number) { - foundIt = YES; - break; - } - } - - if (!foundIt) { - return nil; - } - - NSString *result = nil; - // Naming adds an underscore between enum name and value name, skip that also. - const char *valueName = valueNames_ + nameOffsets_[valueDescriptorIndex]; - NSString *shortName = @(valueName); - - // See if it is in the map of special format handling. - if (extraTextFormatInfo_) { - result = GPBDecodeTextFormatName(extraTextFormatInfo_, - (int32_t)valueDescriptorIndex, shortName); - } - // Logic here needs to match what objectivec_enum.cc does in the proto - // compiler. - if (result == nil) { - NSUInteger len = [shortName length]; - NSMutableString *worker = [NSMutableString stringWithCapacity:len]; - for (NSUInteger i = 0; i < len; i++) { - unichar c = [shortName characterAtIndex:i]; - if (i > 0 && c >= 'A' && c <= 'Z') { - [worker appendString:@"_"]; - } - [worker appendFormat:@"%c", toupper((char)c)]; - } - result = worker; - } - return result; -} - -@end - -@implementation GPBExtensionDescriptor { - GPBGenericValue defaultValue_; -} - -@synthesize containingMessageClass = containingMessageClass_; - -- (instancetype)initWithExtensionDescription: - (GPBExtensionDescription *)description { - if ((self = [super init])) { - description_ = description; - -#if defined(DEBUG) && DEBUG - const char *className = description->messageOrGroupClassName; - if (className) { - NSAssert(objc_lookUpClass(className) != Nil, - @"Class %s not defined", className); - } -#endif - - if (description->extendedClass) { - Class containingClass = objc_lookUpClass(description->extendedClass); - NSAssert(containingClass, @"Class %s not defined", - description->extendedClass); - containingMessageClass_ = containingClass; - } - - GPBDataType type = description_->dataType; - if (type == GPBDataTypeBytes) { - // Data stored as a length prefixed c-string in descriptor records. - const uint8_t *bytes = - (const uint8_t *)description->defaultValue.valueData; - if (bytes) { - uint32_t length = *((uint32_t *)bytes); - // The length is stored in network byte order. - length = ntohl(length); - bytes += sizeof(length); - defaultValue_.valueData = - [[NSData alloc] initWithBytes:bytes length:length]; - } - } else if (type == GPBDataTypeMessage || type == GPBDataTypeGroup) { - // The default is looked up in -defaultValue instead since extensions - // aren't common, we avoid the hit startup hit and it avoid initialization - // order issues. - } else { - defaultValue_ = description->defaultValue; - } - } - return self; -} - -- (void)dealloc { - if ((description_->dataType == GPBDataTypeBytes) && - !GPBExtensionIsRepeated(description_)) { - [defaultValue_.valueData release]; - } - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { -#pragma unused(zone) - // Immutable. - return [self retain]; -} - -- (NSString *)singletonName { - return @(description_->singletonName); -} - -- (const char *)singletonNameC { - return description_->singletonName; -} - -- (uint32_t)fieldNumber { - return description_->fieldNumber; -} - -- (GPBDataType)dataType { - return description_->dataType; -} - -- (GPBWireFormat)wireType { - return GPBWireFormatForType(description_->dataType, - GPBExtensionIsPacked(description_)); -} - -- (GPBWireFormat)alternateWireType { - NSAssert(GPBExtensionIsRepeated(description_), - @"Only valid on repeated extensions"); - return GPBWireFormatForType(description_->dataType, - !GPBExtensionIsPacked(description_)); -} - -- (BOOL)isRepeated { - return GPBExtensionIsRepeated(description_); -} - -- (BOOL)isMap { - return (description_->options & GPBFieldMapKeyMask) != 0; -} - -- (BOOL)isPackable { - return GPBExtensionIsPacked(description_); -} - -- (Class)msgClass { - return objc_getClass(description_->messageOrGroupClassName); -} - -- (GPBEnumDescriptor *)enumDescriptor { - if (description_->dataType == GPBDataTypeEnum) { - GPBEnumDescriptor *enumDescriptor = description_->enumDescriptorFunc(); - return enumDescriptor; - } - return nil; -} - -- (id)defaultValue { - if (GPBExtensionIsRepeated(description_)) { - return nil; - } - - switch (description_->dataType) { - case GPBDataTypeBool: - return @(defaultValue_.valueBool); - case GPBDataTypeFloat: - return @(defaultValue_.valueFloat); - case GPBDataTypeDouble: - return @(defaultValue_.valueDouble); - case GPBDataTypeInt32: - case GPBDataTypeSInt32: - case GPBDataTypeEnum: - case GPBDataTypeSFixed32: - return @(defaultValue_.valueInt32); - case GPBDataTypeInt64: - case GPBDataTypeSInt64: - case GPBDataTypeSFixed64: - return @(defaultValue_.valueInt64); - case GPBDataTypeUInt32: - case GPBDataTypeFixed32: - return @(defaultValue_.valueUInt32); - case GPBDataTypeUInt64: - case GPBDataTypeFixed64: - return @(defaultValue_.valueUInt64); - case GPBDataTypeBytes: - // Like message fields, the default is zero length data. - return (defaultValue_.valueData ? defaultValue_.valueData - : GPBEmptyNSData()); - case GPBDataTypeString: - // Like message fields, the default is zero length string. - return (defaultValue_.valueString ? defaultValue_.valueString : @""); - case GPBDataTypeGroup: - case GPBDataTypeMessage: - return nil; - } -} - -- (NSComparisonResult)compareByFieldNumber:(GPBExtensionDescriptor *)other { - int32_t selfNumber = description_->fieldNumber; - int32_t otherNumber = other->description_->fieldNumber; - if (selfNumber < otherNumber) { - return NSOrderedAscending; - } else if (selfNumber == otherNumber) { - return NSOrderedSame; - } else { - return NSOrderedDescending; - } -} - -@end - -#pragma clang diagnostic pop diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBDescriptor_PackagePrivate.h b/Old My Mind/Pods/Protobuf/objectivec/GPBDescriptor_PackagePrivate.h deleted file mode 100755 index 9173e7a..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBDescriptor_PackagePrivate.h +++ /dev/null @@ -1,329 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This header is private to the ProtobolBuffers library and must NOT be -// included by any sources outside this library. The contents of this file are -// subject to change at any time without notice. - -#import "GPBDescriptor.h" -#import "GPBWireFormat.h" - -// Describes attributes of the field. -typedef NS_OPTIONS(uint16_t, GPBFieldFlags) { - GPBFieldNone = 0, - // These map to standard protobuf concepts. - GPBFieldRequired = 1 << 0, - GPBFieldRepeated = 1 << 1, - GPBFieldPacked = 1 << 2, - GPBFieldOptional = 1 << 3, - GPBFieldHasDefaultValue = 1 << 4, - - // Indicates the field needs custom handling for the TextFormat name, if not - // set, the name can be derived from the ObjC name. - GPBFieldTextFormatNameCustom = 1 << 6, - // Indicates the field has an enum descriptor. - GPBFieldHasEnumDescriptor = 1 << 7, - - // These are not standard protobuf concepts, they are specific to the - // Objective C runtime. - - // These bits are used to mark the field as a map and what the key - // type is. - GPBFieldMapKeyMask = 0xF << 8, - GPBFieldMapKeyInt32 = 1 << 8, - GPBFieldMapKeyInt64 = 2 << 8, - GPBFieldMapKeyUInt32 = 3 << 8, - GPBFieldMapKeyUInt64 = 4 << 8, - GPBFieldMapKeySInt32 = 5 << 8, - GPBFieldMapKeySInt64 = 6 << 8, - GPBFieldMapKeyFixed32 = 7 << 8, - GPBFieldMapKeyFixed64 = 8 << 8, - GPBFieldMapKeySFixed32 = 9 << 8, - GPBFieldMapKeySFixed64 = 10 << 8, - GPBFieldMapKeyBool = 11 << 8, - GPBFieldMapKeyString = 12 << 8, -}; - -// NOTE: The structures defined here have their members ordered to minimize -// their size. This directly impacts the size of apps since these exist per -// field/extension. - -// Describes a single field in a protobuf as it is represented as an ivar. -typedef struct GPBMessageFieldDescription { - // Name of ivar. - const char *name; - union { - const char *className; // Name for message class. - // For enums only: If EnumDescriptors are compiled in, it will be that, - // otherwise it will be the verifier. - GPBEnumDescriptorFunc enumDescFunc; - GPBEnumValidationFunc enumVerifier; - } dataTypeSpecific; - // The field number for the ivar. - uint32_t number; - // The index (in bits) into _has_storage_. - // >= 0: the bit to use for a value being set. - // = GPBNoHasBit(INT32_MAX): no storage used. - // < 0: in a oneOf, use a full int32 to record the field active. - int32_t hasIndex; - // Offset of the variable into it's structure struct. - uint32_t offset; - // Field flags. Use accessor functions below. - GPBFieldFlags flags; - // Data type of the ivar. - GPBDataType dataType; -} GPBMessageFieldDescription; - -// Fields in messages defined in a 'proto2' syntax file can provide a default -// value. This struct provides the default along with the field info. -typedef struct GPBMessageFieldDescriptionWithDefault { - // Default value for the ivar. - GPBGenericValue defaultValue; - - GPBMessageFieldDescription core; -} GPBMessageFieldDescriptionWithDefault; - -// Describes attributes of the extension. -typedef NS_OPTIONS(uint8_t, GPBExtensionOptions) { - GPBExtensionNone = 0, - // These map to standard protobuf concepts. - GPBExtensionRepeated = 1 << 0, - GPBExtensionPacked = 1 << 1, - GPBExtensionSetWireFormat = 1 << 2, -}; - -// An extension -typedef struct GPBExtensionDescription { - GPBGenericValue defaultValue; - const char *singletonName; - const char *extendedClass; - const char *messageOrGroupClassName; - GPBEnumDescriptorFunc enumDescriptorFunc; - int32_t fieldNumber; - GPBDataType dataType; - GPBExtensionOptions options; -} GPBExtensionDescription; - -typedef NS_OPTIONS(uint32_t, GPBDescriptorInitializationFlags) { - GPBDescriptorInitializationFlag_None = 0, - GPBDescriptorInitializationFlag_FieldsWithDefault = 1 << 0, - GPBDescriptorInitializationFlag_WireFormat = 1 << 1, -}; - -@interface GPBDescriptor () { - @package - NSArray *fields_; - NSArray *oneofs_; - uint32_t storageSize_; -} - -// fieldDescriptions have to be long lived, they are held as raw pointers. -+ (instancetype) - allocDescriptorForClass:(Class)messageClass - rootClass:(Class)rootClass - file:(GPBFileDescriptor *)file - fields:(void *)fieldDescriptions - fieldCount:(uint32_t)fieldCount - storageSize:(uint32_t)storageSize - flags:(GPBDescriptorInitializationFlags)flags; - -- (instancetype)initWithClass:(Class)messageClass - file:(GPBFileDescriptor *)file - fields:(NSArray *)fields - storageSize:(uint32_t)storage - wireFormat:(BOOL)wireFormat; - -// Called right after init to provide extra information to avoid init having -// an explosion of args. These pointers are recorded, so they are expected -// to live for the lifetime of the app. -- (void)setupOneofs:(const char **)oneofNames - count:(uint32_t)count - firstHasIndex:(int32_t)firstHasIndex; -- (void)setupExtraTextInfo:(const char *)extraTextFormatInfo; -- (void)setupExtensionRanges:(const GPBExtensionRange *)ranges count:(int32_t)count; -- (void)setupContainingMessageClassName:(const char *)msgClassName; -- (void)setupMessageClassNameSuffix:(NSString *)suffix; - -@end - -@interface GPBFileDescriptor () -- (instancetype)initWithPackage:(NSString *)package - objcPrefix:(NSString *)objcPrefix - syntax:(GPBFileSyntax)syntax; -- (instancetype)initWithPackage:(NSString *)package - syntax:(GPBFileSyntax)syntax; -@end - -@interface GPBOneofDescriptor () { - @package - const char *name_; - NSArray *fields_; - SEL caseSel_; -} -// name must be long lived. -- (instancetype)initWithName:(const char *)name fields:(NSArray *)fields; -@end - -@interface GPBFieldDescriptor () { - @package - GPBMessageFieldDescription *description_; - GPB_UNSAFE_UNRETAINED GPBOneofDescriptor *containingOneof_; - - SEL getSel_; - SEL setSel_; - SEL hasOrCountSel_; // *Count for map<>/repeated fields, has* otherwise. - SEL setHasSel_; -} - -// Single initializer -// description has to be long lived, it is held as a raw pointer. -- (instancetype)initWithFieldDescription:(void *)description - includesDefault:(BOOL)includesDefault - syntax:(GPBFileSyntax)syntax; -@end - -@interface GPBEnumDescriptor () -// valueNames, values and extraTextFormatInfo have to be long lived, they are -// held as raw pointers. -+ (instancetype) - allocDescriptorForName:(NSString *)name - valueNames:(const char *)valueNames - values:(const int32_t *)values - count:(uint32_t)valueCount - enumVerifier:(GPBEnumValidationFunc)enumVerifier; -+ (instancetype) - allocDescriptorForName:(NSString *)name - valueNames:(const char *)valueNames - values:(const int32_t *)values - count:(uint32_t)valueCount - enumVerifier:(GPBEnumValidationFunc)enumVerifier - extraTextFormatInfo:(const char *)extraTextFormatInfo; - -- (instancetype)initWithName:(NSString *)name - valueNames:(const char *)valueNames - values:(const int32_t *)values - count:(uint32_t)valueCount - enumVerifier:(GPBEnumValidationFunc)enumVerifier; -@end - -@interface GPBExtensionDescriptor () { - @package - GPBExtensionDescription *description_; -} -@property(nonatomic, readonly) GPBWireFormat wireType; - -// For repeated extensions, alternateWireType is the wireType with the opposite -// value for the packable property. i.e. - if the extension was marked packed -// it would be the wire type for unpacked; if the extension was marked unpacked, -// it would be the wire type for packed. -@property(nonatomic, readonly) GPBWireFormat alternateWireType; - -// description has to be long lived, it is held as a raw pointer. -- (instancetype)initWithExtensionDescription: - (GPBExtensionDescription *)description; -- (NSComparisonResult)compareByFieldNumber:(GPBExtensionDescriptor *)other; -@end - -CF_EXTERN_C_BEGIN - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -GPB_INLINE BOOL GPBFieldIsMapOrArray(GPBFieldDescriptor *field) { - return (field->description_->flags & - (GPBFieldRepeated | GPBFieldMapKeyMask)) != 0; -} - -GPB_INLINE GPBDataType GPBGetFieldDataType(GPBFieldDescriptor *field) { - return field->description_->dataType; -} - -GPB_INLINE int32_t GPBFieldHasIndex(GPBFieldDescriptor *field) { - return field->description_->hasIndex; -} - -GPB_INLINE uint32_t GPBFieldNumber(GPBFieldDescriptor *field) { - return field->description_->number; -} - -#pragma clang diagnostic pop - -uint32_t GPBFieldTag(GPBFieldDescriptor *self); - -// For repeated fields, alternateWireType is the wireType with the opposite -// value for the packable property. i.e. - if the field was marked packed it -// would be the wire type for unpacked; if the field was marked unpacked, it -// would be the wire type for packed. -uint32_t GPBFieldAlternateTag(GPBFieldDescriptor *self); - -GPB_INLINE BOOL GPBPreserveUnknownFields(GPBFileSyntax syntax) { - return syntax != GPBFileSyntaxProto3; -} - -GPB_INLINE BOOL GPBHasPreservingUnknownEnumSemantics(GPBFileSyntax syntax) { - return syntax == GPBFileSyntaxProto3; -} - -GPB_INLINE BOOL GPBExtensionIsRepeated(GPBExtensionDescription *description) { - return (description->options & GPBExtensionRepeated) != 0; -} - -GPB_INLINE BOOL GPBExtensionIsPacked(GPBExtensionDescription *description) { - return (description->options & GPBExtensionPacked) != 0; -} - -GPB_INLINE BOOL GPBExtensionIsWireFormat(GPBExtensionDescription *description) { - return (description->options & GPBExtensionSetWireFormat) != 0; -} - -// Helper for compile time assets. -#ifndef GPBInternalCompileAssert - #if __has_feature(c_static_assert) || __has_extension(c_static_assert) - #define GPBInternalCompileAssert(test, msg) _Static_assert((test), #msg) - #else - // Pre-Xcode 7 support. - #define GPBInternalCompileAssertSymbolInner(line, msg) GPBInternalCompileAssert ## line ## __ ## msg - #define GPBInternalCompileAssertSymbol(line, msg) GPBInternalCompileAssertSymbolInner(line, msg) - #define GPBInternalCompileAssert(test, msg) \ - typedef char GPBInternalCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ] - #endif // __has_feature(c_static_assert) || __has_extension(c_static_assert) -#endif // GPBInternalCompileAssert - -// Sanity check that there isn't padding between the field description -// structures with and without a default. -GPBInternalCompileAssert(sizeof(GPBMessageFieldDescriptionWithDefault) == - (sizeof(GPBGenericValue) + - sizeof(GPBMessageFieldDescription)), - DescriptionsWithDefault_different_size_than_expected); - -CF_EXTERN_C_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBDictionary.h b/Old My Mind/Pods/Protobuf/objectivec/GPBDictionary.h deleted file mode 100755 index 4b2b9ff..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBDictionary.h +++ /dev/null @@ -1,8570 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBRuntimeTypes.h" - -// Note on naming: for the classes holding numeric values, a more natural -// naming of the method might be things like "-valueForKey:", -// "-setValue:forKey:"; etc. But those selectors are also defined by Key Value -// Coding (KVC) as categories on NSObject. So "overloading" the selectors with -// other meanings can cause warnings (based on compiler settings), but more -// importantly, some of those selector get called as KVC breaks up keypaths. -// So if those selectors are used, using KVC will compile cleanly, but could -// crash as it invokes those selectors with the wrong types of arguments. - -NS_ASSUME_NONNULL_BEGIN - -//%PDDM-EXPAND DECLARE_DICTIONARIES() -// This block of code is generated, do not edit it directly. - -#pragma mark - UInt32 -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32UInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(uint32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt32UInt32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32UInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(uint32_t key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32UInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32Int32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(uint32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt32Int32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32Int32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(uint32_t key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32Int32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32UInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(uint32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt32UInt64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32UInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(uint32_t key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32UInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32Int64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(uint32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt32Int64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32Int64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(uint32_t key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32Int64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32BoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(uint32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt32BoolDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32BoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(uint32_t key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32BoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32FloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(uint32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt32FloatDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32FloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(uint32_t key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32FloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32DoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(uint32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt32DoubleDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32DoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(uint32_t key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32DoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32EnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly instanced dictionary. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param func The enum validation function for the dictionary. - * @param rawValue The raw enum value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(uint32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt32EnumDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBUInt32EnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(uint32_t key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(uint32_t key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBUInt32EnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(uint32_t)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Object - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32ObjectDictionary<__covariant ObjectType> : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param object The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithObject:(ObjectType)object - forKey:(uint32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param objects The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithObjects:(const ObjectType GPB_UNSAFE_UNRETAINED [])objects - forKeys:(const uint32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt32ObjectDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param objects The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithObjects:(const ObjectType GPB_UNSAFE_UNRETAINED [])objects - forKeys:(const uint32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32ObjectDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Fetches the object stored under the given key. - * - * @param key Key under which the value is stored, if present. - * - * @return The object if found, nil otherwise. - **/ -- (ObjectType)objectForKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **object**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(uint32_t key, ObjectType object, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32ObjectDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param object The value to set. - * @param key The key under which to store the value. - **/ -- (void)setObject:(ObjectType)object forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeObjectForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32UInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(int32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt32UInt32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32UInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(int32_t key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32UInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32Int32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(int32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt32Int32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32Int32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(int32_t key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32Int32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32UInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(int32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt32UInt64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32UInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(int32_t key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32UInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32Int64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(int32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt32Int64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32Int64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(int32_t key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32Int64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32BoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(int32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt32BoolDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32BoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(int32_t key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32BoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32FloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(int32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt32FloatDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32FloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(int32_t key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32FloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32DoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(int32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt32DoubleDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32DoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(int32_t key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32DoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32EnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly instanced dictionary. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param func The enum validation function for the dictionary. - * @param rawValue The raw enum value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(int32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt32EnumDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBInt32EnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(int32_t key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(int32_t key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBInt32EnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(int32_t)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Object - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32ObjectDictionary<__covariant ObjectType> : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param object The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithObject:(ObjectType)object - forKey:(int32_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param objects The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithObjects:(const ObjectType GPB_UNSAFE_UNRETAINED [])objects - forKeys:(const int32_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt32ObjectDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param objects The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithObjects:(const ObjectType GPB_UNSAFE_UNRETAINED [])objects - forKeys:(const int32_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32ObjectDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Fetches the object stored under the given key. - * - * @param key Key under which the value is stored, if present. - * - * @return The object if found, nil otherwise. - **/ -- (ObjectType)objectForKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **object**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(int32_t key, ObjectType object, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32ObjectDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param object The value to set. - * @param key The key under which to store the value. - **/ -- (void)setObject:(ObjectType)object forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeObjectForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64UInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(uint64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt64UInt32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64UInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(uint64_t key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64UInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64Int32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(uint64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt64Int32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64Int32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(uint64_t key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64Int32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64UInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(uint64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt64UInt64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64UInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(uint64_t key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64UInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64Int64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(uint64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt64Int64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64Int64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(uint64_t key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64Int64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64BoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(uint64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt64BoolDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64BoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(uint64_t key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64BoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64FloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(uint64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt64FloatDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64FloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(uint64_t key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64FloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64DoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(uint64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt64DoubleDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64DoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(uint64_t key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64DoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64EnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly instanced dictionary. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param func The enum validation function for the dictionary. - * @param rawValue The raw enum value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(uint64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt64EnumDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBUInt64EnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(uint64_t key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(uint64_t key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBUInt64EnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(uint64_t)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Object - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64ObjectDictionary<__covariant ObjectType> : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param object The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithObject:(ObjectType)object - forKey:(uint64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param objects The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithObjects:(const ObjectType GPB_UNSAFE_UNRETAINED [])objects - forKeys:(const uint64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBUInt64ObjectDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param objects The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithObjects:(const ObjectType GPB_UNSAFE_UNRETAINED [])objects - forKeys:(const uint64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64ObjectDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Fetches the object stored under the given key. - * - * @param key Key under which the value is stored, if present. - * - * @return The object if found, nil otherwise. - **/ -- (ObjectType)objectForKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **object**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(uint64_t key, ObjectType object, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64ObjectDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param object The value to set. - * @param key The key under which to store the value. - **/ -- (void)setObject:(ObjectType)object forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeObjectForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64UInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(int64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt64UInt32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64UInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(int64_t key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64UInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64Int32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(int64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt64Int32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64Int32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(int64_t key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64Int32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64UInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(int64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt64UInt64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64UInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(int64_t key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64UInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64Int64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(int64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt64Int64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64Int64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(int64_t key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64Int64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64BoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(int64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt64BoolDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64BoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(int64_t key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64BoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64FloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(int64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt64FloatDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64FloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(int64_t key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64FloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64DoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(int64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt64DoubleDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64DoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(int64_t key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64DoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64EnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly instanced dictionary. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param func The enum validation function for the dictionary. - * @param rawValue The raw enum value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(int64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt64EnumDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBInt64EnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(int64_t key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(int64_t key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBInt64EnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(int64_t)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Object - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64ObjectDictionary<__covariant ObjectType> : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param object The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithObject:(ObjectType)object - forKey:(int64_t)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param objects The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithObjects:(const ObjectType GPB_UNSAFE_UNRETAINED [])objects - forKeys:(const int64_t [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBInt64ObjectDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param objects The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithObjects:(const ObjectType GPB_UNSAFE_UNRETAINED [])objects - forKeys:(const int64_t [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64ObjectDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Fetches the object stored under the given key. - * - * @param key Key under which the value is stored, if present. - * - * @return The object if found, nil otherwise. - **/ -- (ObjectType)objectForKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **object**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(int64_t key, ObjectType object, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64ObjectDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param object The value to set. - * @param key The key under which to store the value. - **/ -- (void)setObject:(ObjectType)object forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeObjectForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolUInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(BOOL)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBBoolUInt32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolUInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(BOOL key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolUInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(BOOL)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBBoolInt32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(BOOL key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolUInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(BOOL)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBBoolUInt64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolUInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(BOOL key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolUInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(BOOL)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBBoolInt64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(BOOL key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolBoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(BOOL)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBBoolBoolDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolBoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(BOOL key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolBoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolFloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(BOOL)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBBoolFloatDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolFloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(BOOL key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolFloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolDoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(BOOL)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBBoolDoubleDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolDoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(BOOL key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolDoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolEnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly instanced dictionary. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param func The enum validation function for the dictionary. - * @param rawValue The raw enum value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(BOOL)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBBoolEnumDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBBoolEnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(BOOL key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(BOOL key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBBoolEnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(BOOL)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Object - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolObjectDictionary<__covariant ObjectType> : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param object The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithObject:(ObjectType)object - forKey:(BOOL)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param objects The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithObjects:(const ObjectType GPB_UNSAFE_UNRETAINED [])objects - forKeys:(const BOOL [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBBoolObjectDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param objects The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithObjects:(const ObjectType GPB_UNSAFE_UNRETAINED [])objects - forKeys:(const BOOL [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolObjectDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Fetches the object stored under the given key. - * - * @param key Key under which the value is stored, if present. - * - * @return The object if found, nil otherwise. - **/ -- (ObjectType)objectForKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **object**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(BOOL key, ObjectType object, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolObjectDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param object The value to set. - * @param key The key under which to store the value. - **/ -- (void)setObject:(ObjectType)object forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeObjectForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringUInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(NSString *)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBStringUInt32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringUInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(NSString *key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringUInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(NSString *)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBStringInt32Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(NSString *key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringUInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(NSString *)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBStringUInt64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringUInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(NSString *key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringUInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(NSString *)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBStringInt64Dictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(NSString *key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringBoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(NSString *)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBStringBoolDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringBoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(NSString *key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringBoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringFloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(NSString *)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBStringFloatDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringFloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(NSString *key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringFloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringDoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param value The value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(NSString *)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param values The values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBStringDoubleDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringDoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(NSString *key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringDoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringEnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * @return A newly instanced and empty dictionary. - **/ -+ (instancetype)dictionary; - -/** - * Creates and initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly instanced dictionary. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Creates and initializes a dictionary with the single entry given. - * - * @param func The enum validation function for the dictionary. - * @param rawValue The raw enum value to be placed in the dictionary. - * @param key The key under which to store the value. - * - * @return A newly instanced dictionary with the key and value in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(NSString *)key; - -/** - * Creates and initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly instanced dictionary with the keys and values in it. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count; - -/** - * Creates and initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly instanced dictionary with the entries from the given - * dictionary in it. - **/ -+ (instancetype)dictionaryWithDictionary:(GPBStringEnumDictionary *)dictionary; - -/** - * Creates and initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly instanced dictionary with the given capacity. - **/ -+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const NSString * GPB_UNSAFE_UNRETAINED [])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBStringEnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(NSString *key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(NSString *key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBStringEnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(NSString *)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -//%PDDM-EXPAND-END DECLARE_DICTIONARIES() - -NS_ASSUME_NONNULL_END - -//%PDDM-DEFINE DECLARE_DICTIONARIES() -//%DICTIONARY_INTERFACES_FOR_POD_KEY(UInt32, uint32_t) -//%DICTIONARY_INTERFACES_FOR_POD_KEY(Int32, int32_t) -//%DICTIONARY_INTERFACES_FOR_POD_KEY(UInt64, uint64_t) -//%DICTIONARY_INTERFACES_FOR_POD_KEY(Int64, int64_t) -//%DICTIONARY_INTERFACES_FOR_POD_KEY(Bool, BOOL) -//%DICTIONARY_POD_INTERFACES_FOR_KEY(String, NSString, *, OBJECT) -//%PDDM-DEFINE DICTIONARY_INTERFACES_FOR_POD_KEY(KEY_NAME, KEY_TYPE) -//%DICTIONARY_POD_INTERFACES_FOR_KEY(KEY_NAME, KEY_TYPE, , POD) -//%DICTIONARY_POD_KEY_TO_OBJECT_INTERFACE(KEY_NAME, KEY_TYPE, Object, ObjectType) -//%PDDM-DEFINE DICTIONARY_POD_INTERFACES_FOR_KEY(KEY_NAME, KEY_TYPE, KisP, KHELPER) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, UInt32, uint32_t) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Int32, int32_t) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, UInt64, uint64_t) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Int64, int64_t) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Bool, BOOL) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Float, float) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Double, double) -//%DICTIONARY_KEY_TO_ENUM_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Enum, int32_t) -//%PDDM-DEFINE DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE) -//%DICTIONARY_COMMON_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, POD, VALUE_NAME, value) -//%PDDM-DEFINE DICTIONARY_POD_KEY_TO_OBJECT_INTERFACE(KEY_NAME, KEY_TYPE, VALUE_NAME, VALUE_TYPE) -//%DICTIONARY_COMMON_INTERFACE(KEY_NAME, KEY_TYPE, , POD, VALUE_NAME, VALUE_TYPE, OBJECT, Object, object) -//%PDDM-DEFINE VALUE_FOR_KEY_POD(KEY_TYPE, VALUE_TYPE, VNAME) -//%/** -//% * Gets the value for the given key. -//% * -//% * @param value Pointer into which the value will be set, if found. -//% * @param key Key under which the value is stored, if present. -//% * -//% * @return YES if the key was found and the value was copied, NO otherwise. -//% **/ -//%- (BOOL)get##VNAME##:(nullable VALUE_TYPE *)value forKey:(KEY_TYPE)key; -//%PDDM-DEFINE VALUE_FOR_KEY_OBJECT(KEY_TYPE, VALUE_TYPE, VNAME) -//%/** -//% * Fetches the object stored under the given key. -//% * -//% * @param key Key under which the value is stored, if present. -//% * -//% * @return The object if found, nil otherwise. -//% **/ -//%- (VALUE_TYPE)objectForKey:(KEY_TYPE)key; -//%PDDM-DEFINE VALUE_FOR_KEY_Enum(KEY_TYPE, VALUE_TYPE, VNAME) -//%VALUE_FOR_KEY_POD(KEY_TYPE, VALUE_TYPE, VNAME) -//%PDDM-DEFINE ARRAY_ARG_MODIFIERPOD() -// Nothing -//%PDDM-DEFINE ARRAY_ARG_MODIFIEREnum() -// Nothing -//%PDDM-DEFINE ARRAY_ARG_MODIFIEROBJECT() -//%GPB_UNSAFE_UNRETAINED ## -//%PDDM-DEFINE DICTIONARY_CLASS_DECLPOD(KEY_NAME, VALUE_NAME, VALUE_TYPE) -//%GPB##KEY_NAME##VALUE_NAME##Dictionary -//%PDDM-DEFINE DICTIONARY_CLASS_DECLEnum(KEY_NAME, VALUE_NAME, VALUE_TYPE) -//%GPB##KEY_NAME##VALUE_NAME##Dictionary -//%PDDM-DEFINE DICTIONARY_CLASS_DECLOBJECT(KEY_NAME, VALUE_NAME, VALUE_TYPE) -//%GPB##KEY_NAME##VALUE_NAME##Dictionary<__covariant VALUE_TYPE> -//%PDDM-DEFINE DICTIONARY_COMMON_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR) -//%#pragma mark - KEY_NAME -> VALUE_NAME -//% -//%/** -//% * Class used for map fields of <##KEY_TYPE##, ##VALUE_TYPE##> -//% * values. This performs better than boxing into NSNumbers in NSDictionaries. -//% * -//% * @note This class is not meant to be subclassed. -//% **/ -//%@interface DICTIONARY_CLASS_DECL##VHELPER(KEY_NAME, VALUE_NAME, VALUE_TYPE) : NSObject -//% -//%/** Number of entries stored in this dictionary. */ -//%@property(nonatomic, readonly) NSUInteger count; -//% -//%/** -//% * @return A newly instanced and empty dictionary. -//% **/ -//%+ (instancetype)dictionary; -//% -//%/** -//% * Creates and initializes a dictionary with the single entry given. -//% * -//% * @param ##VNAME_VAR The value to be placed in the dictionary. -//% * @param key ##VNAME_VAR$S## The key under which to store the value. -//% * -//% * @return A newly instanced dictionary with the key and value in it. -//% **/ -//%+ (instancetype)dictionaryWith##VNAME##:(VALUE_TYPE)##VNAME_VAR -//% ##VNAME$S## forKey:(KEY_TYPE##KisP$S##KisP)key; -//% -//%/** -//% * Creates and initializes a dictionary with the entries given. -//% * -//% * @param ##VNAME_VAR##s The values to be placed in the dictionary. -//% * @param keys ##VNAME_VAR$S## The keys under which to store the values. -//% * @param count ##VNAME_VAR$S## The number of entries to store in the dictionary. -//% * -//% * @return A newly instanced dictionary with the keys and values in it. -//% **/ -//%+ (instancetype)dictionaryWith##VNAME##s:(const VALUE_TYPE ARRAY_ARG_MODIFIER##VHELPER()[])##VNAME_VAR##s -//% ##VNAME$S## forKeys:(const KEY_TYPE##KisP$S##KisP ARRAY_ARG_MODIFIER##KHELPER()[])keys -//% ##VNAME$S## count:(NSUInteger)count; -//% -//%/** -//% * Creates and initializes a dictionary with the entries from the given. -//% * dictionary. -//% * -//% * @param dictionary Dictionary containing the entries to add to the dictionary. -//% * -//% * @return A newly instanced dictionary with the entries from the given -//% * dictionary in it. -//% **/ -//%+ (instancetype)dictionaryWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary; -//% -//%/** -//% * Creates and initializes a dictionary with the given capacity. -//% * -//% * @param numItems Capacity needed for the dictionary. -//% * -//% * @return A newly instanced dictionary with the given capacity. -//% **/ -//%+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; -//% -//%/** -//% * Initializes this dictionary, copying the given values and keys. -//% * -//% * @param ##VNAME_VAR##s The values to be placed in this dictionary. -//% * @param keys ##VNAME_VAR$S## The keys under which to store the values. -//% * @param count ##VNAME_VAR$S## The number of elements to copy into the dictionary. -//% * -//% * @return A newly initialized dictionary with a copy of the values and keys. -//% **/ -//%- (instancetype)initWith##VNAME##s:(const VALUE_TYPE ARRAY_ARG_MODIFIER##VHELPER()[])##VNAME_VAR##s -//% ##VNAME$S## forKeys:(const KEY_TYPE##KisP$S##KisP ARRAY_ARG_MODIFIER##KHELPER()[])keys -//% ##VNAME$S## count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; -//% -//%/** -//% * Initializes this dictionary, copying the entries from the given dictionary. -//% * -//% * @param dictionary Dictionary containing the entries to add to this dictionary. -//% * -//% * @return A newly initialized dictionary with the entries of the given dictionary. -//% **/ -//%- (instancetype)initWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary; -//% -//%/** -//% * Initializes this dictionary with the requested capacity. -//% * -//% * @param numItems Number of items needed for this dictionary. -//% * -//% * @return A newly initialized dictionary with the requested capacity. -//% **/ -//%- (instancetype)initWithCapacity:(NSUInteger)numItems; -//% -//%DICTIONARY_IMMUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR) -//% -//%/** -//% * Adds the keys and values from another dictionary. -//% * -//% * @param otherDictionary Dictionary containing entries to be added to this -//% * dictionary. -//% **/ -//%- (void)addEntriesFromDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)otherDictionary; -//% -//%DICTIONARY_MUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR) -//% -//%@end -//% - -//%PDDM-DEFINE DICTIONARY_KEY_TO_ENUM_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE) -//%DICTIONARY_KEY_TO_ENUM_INTERFACE2(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, Enum) -//%PDDM-DEFINE DICTIONARY_KEY_TO_ENUM_INTERFACE2(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, VHELPER) -//%#pragma mark - KEY_NAME -> VALUE_NAME -//% -//%/** -//% * Class used for map fields of <##KEY_TYPE##, ##VALUE_TYPE##> -//% * values. This performs better than boxing into NSNumbers in NSDictionaries. -//% * -//% * @note This class is not meant to be subclassed. -//% **/ -//%@interface GPB##KEY_NAME##VALUE_NAME##Dictionary : NSObject -//% -//%/** Number of entries stored in this dictionary. */ -//%@property(nonatomic, readonly) NSUInteger count; -//%/** The validation function to check if the enums are valid. */ -//%@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; -//% -//%/** -//% * @return A newly instanced and empty dictionary. -//% **/ -//%+ (instancetype)dictionary; -//% -//%/** -//% * Creates and initializes a dictionary with the given validation function. -//% * -//% * @param func The enum validation function for the dictionary. -//% * -//% * @return A newly instanced dictionary. -//% **/ -//%+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func; -//% -//%/** -//% * Creates and initializes a dictionary with the single entry given. -//% * -//% * @param func The enum validation function for the dictionary. -//% * @param rawValue The raw enum value to be placed in the dictionary. -//% * @param key The key under which to store the value. -//% * -//% * @return A newly instanced dictionary with the key and value in it. -//% **/ -//%+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% rawValue:(VALUE_TYPE)rawValue -//% forKey:(KEY_TYPE##KisP$S##KisP)key; -//% -//%/** -//% * Creates and initializes a dictionary with the entries given. -//% * -//% * @param func The enum validation function for the dictionary. -//% * @param values The raw enum values values to be placed in the dictionary. -//% * @param keys The keys under which to store the values. -//% * @param count The number of entries to store in the dictionary. -//% * -//% * @return A newly instanced dictionary with the keys and values in it. -//% **/ -//%+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% rawValues:(const VALUE_TYPE ARRAY_ARG_MODIFIER##VHELPER()[])values -//% forKeys:(const KEY_TYPE##KisP$S##KisP ARRAY_ARG_MODIFIER##KHELPER()[])keys -//% count:(NSUInteger)count; -//% -//%/** -//% * Creates and initializes a dictionary with the entries from the given. -//% * dictionary. -//% * -//% * @param dictionary Dictionary containing the entries to add to the dictionary. -//% * -//% * @return A newly instanced dictionary with the entries from the given -//% * dictionary in it. -//% **/ -//%+ (instancetype)dictionaryWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary; -//% -//%/** -//% * Creates and initializes a dictionary with the given capacity. -//% * -//% * @param func The enum validation function for the dictionary. -//% * @param numItems Capacity needed for the dictionary. -//% * -//% * @return A newly instanced dictionary with the given capacity. -//% **/ -//%+ (instancetype)dictionaryWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% capacity:(NSUInteger)numItems; -//% -//%/** -//% * Initializes a dictionary with the given validation function. -//% * -//% * @param func The enum validation function for the dictionary. -//% * -//% * @return A newly initialized dictionary. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; -//% -//%/** -//% * Initializes a dictionary with the entries given. -//% * -//% * @param func The enum validation function for the dictionary. -//% * @param values The raw enum values values to be placed in the dictionary. -//% * @param keys The keys under which to store the values. -//% * @param count The number of entries to store in the dictionary. -//% * -//% * @return A newly initialized dictionary with the keys and values in it. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% rawValues:(const VALUE_TYPE ARRAY_ARG_MODIFIER##VHELPER()[])values -//% forKeys:(const KEY_TYPE##KisP$S##KisP ARRAY_ARG_MODIFIER##KHELPER()[])keys -//% count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; -//% -//%/** -//% * Initializes a dictionary with the entries from the given. -//% * dictionary. -//% * -//% * @param dictionary Dictionary containing the entries to add to the dictionary. -//% * -//% * @return A newly initialized dictionary with the entries from the given -//% * dictionary in it. -//% **/ -//%- (instancetype)initWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary; -//% -//%/** -//% * Initializes a dictionary with the given capacity. -//% * -//% * @param func The enum validation function for the dictionary. -//% * @param numItems Capacity needed for the dictionary. -//% * -//% * @return A newly initialized dictionary with the given capacity. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% capacity:(NSUInteger)numItems; -//% -//%// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -//%// is not a valid enumerator as defined by validationFunc. If the actual value is -//%// desired, use "raw" version of the method. -//% -//%DICTIONARY_IMMUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, Enum, value) -//% -//%/** -//% * Gets the raw enum value for the given key. -//% * -//% * @note This method bypass the validationFunc to enable the access of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param rawValue Pointer into which the value will be set, if found. -//% * @param key Key under which the value is stored, if present. -//% * -//% * @return YES if the key was found and the value was copied, NO otherwise. -//% **/ -//%- (BOOL)getRawValue:(nullable VALUE_TYPE *)rawValue forKey:(KEY_TYPE##KisP$S##KisP)key; -//% -//%/** -//% * Enumerates the keys and values on this dictionary with the given block. -//% * -//% * @note This method bypass the validationFunc to enable the access of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param block The block to enumerate with. -//% * **key**: The key for the current entry. -//% * **rawValue**: The value for the current entry -//% * **stop**: A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateKeysAndRawValuesUsingBlock: -//% (void (^)(KEY_TYPE KisP##key, VALUE_TYPE rawValue, BOOL *stop))block; -//% -//%/** -//% * Adds the keys and raw enum values from another dictionary. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param otherDictionary Dictionary containing entries to be added to this -//% * dictionary. -//% **/ -//%- (void)addRawEntriesFromDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)otherDictionary; -//% -//%// If value is not a valid enumerator as defined by validationFunc, these -//%// methods will assert in debug, and will log in release and assign the value -//%// to the default value. Use the rawValue methods below to assign non enumerator -//%// values. -//% -//%DICTIONARY_MUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, Enum, value) -//% -//%@end -//% - -//%PDDM-DEFINE DICTIONARY_IMMUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR) -//%VALUE_FOR_KEY_##VHELPER(KEY_TYPE##KisP$S##KisP, VALUE_TYPE, VNAME) -//% -//%/** -//% * Enumerates the keys and values on this dictionary with the given block. -//% * -//% * @param block The block to enumerate with. -//% * **key**: ##VNAME_VAR$S## The key for the current entry. -//% * **VNAME_VAR**: The value for the current entry -//% * **stop**: ##VNAME_VAR$S## A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateKeysAnd##VNAME##sUsingBlock: -//% (void (^)(KEY_TYPE KisP##key, VALUE_TYPE VNAME_VAR, BOOL *stop))block; - -//%PDDM-DEFINE DICTIONARY_MUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR) -//%/** -//% * Sets the value for the given key. -//% * -//% * @param ##VNAME_VAR The value to set. -//% * @param key ##VNAME_VAR$S## The key under which to store the value. -//% **/ -//%- (void)set##VNAME##:(VALUE_TYPE)##VNAME_VAR forKey:(KEY_TYPE##KisP$S##KisP)key; -//%DICTIONARY_EXTRA_MUTABLE_METHODS_##VHELPER(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE) -//%/** -//% * Removes the entry for the given key. -//% * -//% * @param aKey Key to be removed from this dictionary. -//% **/ -//%- (void)remove##VNAME##ForKey:(KEY_TYPE##KisP$S##KisP)aKey; -//% -//%/** -//% * Removes all entries in this dictionary. -//% **/ -//%- (void)removeAll; - -//%PDDM-DEFINE DICTIONARY_EXTRA_MUTABLE_METHODS_POD(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE) -// Empty -//%PDDM-DEFINE DICTIONARY_EXTRA_MUTABLE_METHODS_OBJECT(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE) -// Empty -//%PDDM-DEFINE DICTIONARY_EXTRA_MUTABLE_METHODS_Enum(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE) -//% -//%/** -//% * Sets the raw enum value for the given key. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param rawValue The raw enum value to set. -//% * @param key The key under which to store the raw enum value. -//% **/ -//%- (void)setRawValue:(VALUE_TYPE)rawValue forKey:(KEY_TYPE##KisP$S##KisP)key; -//% diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBDictionary.m b/Old My Mind/Pods/Protobuf/objectivec/GPBDictionary.m deleted file mode 100755 index 1c67c68..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBDictionary.m +++ /dev/null @@ -1,13627 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBDictionary_PackagePrivate.h" - -#import "GPBCodedInputStream_PackagePrivate.h" -#import "GPBCodedOutputStream_PackagePrivate.h" -#import "GPBDescriptor_PackagePrivate.h" -#import "GPBMessage_PackagePrivate.h" -#import "GPBUtilities_PackagePrivate.h" - -// ------------------------------ NOTE ------------------------------ -// At the moment, this is all using NSNumbers in NSDictionaries under -// the hood, but it is all hidden so we can come back and optimize -// with direct CFDictionary usage later. The reason that wasn't -// done yet is needing to support 32bit iOS builds. Otherwise -// it would be pretty simple to store all this data in CFDictionaries -// directly. -// ------------------------------------------------------------------ - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -// Used to include code only visible to specific versions of the static -// analyzer. Useful for wrapping code that only exists to silence the analyzer. -// Determine the values you want to use for BEGIN_APPLE_BUILD_VERSION, -// END_APPLE_BUILD_VERSION using: -// xcrun clang -dM -E -x c /dev/null | grep __apple_build_version__ -// Example usage: -// #if GPB_STATIC_ANALYZER_ONLY(5621, 5623) ... #endif -#define GPB_STATIC_ANALYZER_ONLY(BEGIN_APPLE_BUILD_VERSION, END_APPLE_BUILD_VERSION) \ - (defined(__clang_analyzer__) && \ - (__apple_build_version__ >= BEGIN_APPLE_BUILD_VERSION && \ - __apple_build_version__ <= END_APPLE_BUILD_VERSION)) - -enum { - kMapKeyFieldNumber = 1, - kMapValueFieldNumber = 2, -}; - -static BOOL DictDefault_IsValidValue(int32_t value) { - // Anything but the bad value marker is allowed. - return (value != kGPBUnrecognizedEnumeratorValue); -} - -//%PDDM-DEFINE SERIALIZE_SUPPORT_2_TYPE(VALUE_NAME, VALUE_TYPE, GPBDATATYPE_NAME1, GPBDATATYPE_NAME2) -//%static size_t ComputeDict##VALUE_NAME##FieldSize(VALUE_TYPE value, uint32_t fieldNum, GPBDataType dataType) { -//% if (dataType == GPBDataType##GPBDATATYPE_NAME1) { -//% return GPBCompute##GPBDATATYPE_NAME1##Size(fieldNum, value); -//% } else if (dataType == GPBDataType##GPBDATATYPE_NAME2) { -//% return GPBCompute##GPBDATATYPE_NAME2##Size(fieldNum, value); -//% } else { -//% NSCAssert(NO, @"Unexpected type %d", dataType); -//% return 0; -//% } -//%} -//% -//%static void WriteDict##VALUE_NAME##Field(GPBCodedOutputStream *stream, VALUE_TYPE value, uint32_t fieldNum, GPBDataType dataType) { -//% if (dataType == GPBDataType##GPBDATATYPE_NAME1) { -//% [stream write##GPBDATATYPE_NAME1##:fieldNum value:value]; -//% } else if (dataType == GPBDataType##GPBDATATYPE_NAME2) { -//% [stream write##GPBDATATYPE_NAME2##:fieldNum value:value]; -//% } else { -//% NSCAssert(NO, @"Unexpected type %d", dataType); -//% } -//%} -//% -//%PDDM-DEFINE SERIALIZE_SUPPORT_3_TYPE(VALUE_NAME, VALUE_TYPE, GPBDATATYPE_NAME1, GPBDATATYPE_NAME2, GPBDATATYPE_NAME3) -//%static size_t ComputeDict##VALUE_NAME##FieldSize(VALUE_TYPE value, uint32_t fieldNum, GPBDataType dataType) { -//% if (dataType == GPBDataType##GPBDATATYPE_NAME1) { -//% return GPBCompute##GPBDATATYPE_NAME1##Size(fieldNum, value); -//% } else if (dataType == GPBDataType##GPBDATATYPE_NAME2) { -//% return GPBCompute##GPBDATATYPE_NAME2##Size(fieldNum, value); -//% } else if (dataType == GPBDataType##GPBDATATYPE_NAME3) { -//% return GPBCompute##GPBDATATYPE_NAME3##Size(fieldNum, value); -//% } else { -//% NSCAssert(NO, @"Unexpected type %d", dataType); -//% return 0; -//% } -//%} -//% -//%static void WriteDict##VALUE_NAME##Field(GPBCodedOutputStream *stream, VALUE_TYPE value, uint32_t fieldNum, GPBDataType dataType) { -//% if (dataType == GPBDataType##GPBDATATYPE_NAME1) { -//% [stream write##GPBDATATYPE_NAME1##:fieldNum value:value]; -//% } else if (dataType == GPBDataType##GPBDATATYPE_NAME2) { -//% [stream write##GPBDATATYPE_NAME2##:fieldNum value:value]; -//% } else if (dataType == GPBDataType##GPBDATATYPE_NAME3) { -//% [stream write##GPBDATATYPE_NAME3##:fieldNum value:value]; -//% } else { -//% NSCAssert(NO, @"Unexpected type %d", dataType); -//% } -//%} -//% -//%PDDM-DEFINE SIMPLE_SERIALIZE_SUPPORT(VALUE_NAME, VALUE_TYPE, VisP) -//%static size_t ComputeDict##VALUE_NAME##FieldSize(VALUE_TYPE VisP##value, uint32_t fieldNum, GPBDataType dataType) { -//% NSCAssert(dataType == GPBDataType##VALUE_NAME, @"bad type: %d", dataType); -//% #pragma unused(dataType) // For when asserts are off in release. -//% return GPBCompute##VALUE_NAME##Size(fieldNum, value); -//%} -//% -//%static void WriteDict##VALUE_NAME##Field(GPBCodedOutputStream *stream, VALUE_TYPE VisP##value, uint32_t fieldNum, GPBDataType dataType) { -//% NSCAssert(dataType == GPBDataType##VALUE_NAME, @"bad type: %d", dataType); -//% #pragma unused(dataType) // For when asserts are off in release. -//% [stream write##VALUE_NAME##:fieldNum value:value]; -//%} -//% -//%PDDM-DEFINE SERIALIZE_SUPPORT_HELPERS() -//%SERIALIZE_SUPPORT_3_TYPE(Int32, int32_t, Int32, SInt32, SFixed32) -//%SERIALIZE_SUPPORT_2_TYPE(UInt32, uint32_t, UInt32, Fixed32) -//%SERIALIZE_SUPPORT_3_TYPE(Int64, int64_t, Int64, SInt64, SFixed64) -//%SERIALIZE_SUPPORT_2_TYPE(UInt64, uint64_t, UInt64, Fixed64) -//%SIMPLE_SERIALIZE_SUPPORT(Bool, BOOL, ) -//%SIMPLE_SERIALIZE_SUPPORT(Enum, int32_t, ) -//%SIMPLE_SERIALIZE_SUPPORT(Float, float, ) -//%SIMPLE_SERIALIZE_SUPPORT(Double, double, ) -//%SIMPLE_SERIALIZE_SUPPORT(String, NSString, *) -//%SERIALIZE_SUPPORT_3_TYPE(Object, id, Message, String, Bytes) -//%PDDM-EXPAND SERIALIZE_SUPPORT_HELPERS() -// This block of code is generated, do not edit it directly. - -static size_t ComputeDictInt32FieldSize(int32_t value, uint32_t fieldNum, GPBDataType dataType) { - if (dataType == GPBDataTypeInt32) { - return GPBComputeInt32Size(fieldNum, value); - } else if (dataType == GPBDataTypeSInt32) { - return GPBComputeSInt32Size(fieldNum, value); - } else if (dataType == GPBDataTypeSFixed32) { - return GPBComputeSFixed32Size(fieldNum, value); - } else { - NSCAssert(NO, @"Unexpected type %d", dataType); - return 0; - } -} - -static void WriteDictInt32Field(GPBCodedOutputStream *stream, int32_t value, uint32_t fieldNum, GPBDataType dataType) { - if (dataType == GPBDataTypeInt32) { - [stream writeInt32:fieldNum value:value]; - } else if (dataType == GPBDataTypeSInt32) { - [stream writeSInt32:fieldNum value:value]; - } else if (dataType == GPBDataTypeSFixed32) { - [stream writeSFixed32:fieldNum value:value]; - } else { - NSCAssert(NO, @"Unexpected type %d", dataType); - } -} - -static size_t ComputeDictUInt32FieldSize(uint32_t value, uint32_t fieldNum, GPBDataType dataType) { - if (dataType == GPBDataTypeUInt32) { - return GPBComputeUInt32Size(fieldNum, value); - } else if (dataType == GPBDataTypeFixed32) { - return GPBComputeFixed32Size(fieldNum, value); - } else { - NSCAssert(NO, @"Unexpected type %d", dataType); - return 0; - } -} - -static void WriteDictUInt32Field(GPBCodedOutputStream *stream, uint32_t value, uint32_t fieldNum, GPBDataType dataType) { - if (dataType == GPBDataTypeUInt32) { - [stream writeUInt32:fieldNum value:value]; - } else if (dataType == GPBDataTypeFixed32) { - [stream writeFixed32:fieldNum value:value]; - } else { - NSCAssert(NO, @"Unexpected type %d", dataType); - } -} - -static size_t ComputeDictInt64FieldSize(int64_t value, uint32_t fieldNum, GPBDataType dataType) { - if (dataType == GPBDataTypeInt64) { - return GPBComputeInt64Size(fieldNum, value); - } else if (dataType == GPBDataTypeSInt64) { - return GPBComputeSInt64Size(fieldNum, value); - } else if (dataType == GPBDataTypeSFixed64) { - return GPBComputeSFixed64Size(fieldNum, value); - } else { - NSCAssert(NO, @"Unexpected type %d", dataType); - return 0; - } -} - -static void WriteDictInt64Field(GPBCodedOutputStream *stream, int64_t value, uint32_t fieldNum, GPBDataType dataType) { - if (dataType == GPBDataTypeInt64) { - [stream writeInt64:fieldNum value:value]; - } else if (dataType == GPBDataTypeSInt64) { - [stream writeSInt64:fieldNum value:value]; - } else if (dataType == GPBDataTypeSFixed64) { - [stream writeSFixed64:fieldNum value:value]; - } else { - NSCAssert(NO, @"Unexpected type %d", dataType); - } -} - -static size_t ComputeDictUInt64FieldSize(uint64_t value, uint32_t fieldNum, GPBDataType dataType) { - if (dataType == GPBDataTypeUInt64) { - return GPBComputeUInt64Size(fieldNum, value); - } else if (dataType == GPBDataTypeFixed64) { - return GPBComputeFixed64Size(fieldNum, value); - } else { - NSCAssert(NO, @"Unexpected type %d", dataType); - return 0; - } -} - -static void WriteDictUInt64Field(GPBCodedOutputStream *stream, uint64_t value, uint32_t fieldNum, GPBDataType dataType) { - if (dataType == GPBDataTypeUInt64) { - [stream writeUInt64:fieldNum value:value]; - } else if (dataType == GPBDataTypeFixed64) { - [stream writeFixed64:fieldNum value:value]; - } else { - NSCAssert(NO, @"Unexpected type %d", dataType); - } -} - -static size_t ComputeDictBoolFieldSize(BOOL value, uint32_t fieldNum, GPBDataType dataType) { - NSCAssert(dataType == GPBDataTypeBool, @"bad type: %d", dataType); - #pragma unused(dataType) // For when asserts are off in release. - return GPBComputeBoolSize(fieldNum, value); -} - -static void WriteDictBoolField(GPBCodedOutputStream *stream, BOOL value, uint32_t fieldNum, GPBDataType dataType) { - NSCAssert(dataType == GPBDataTypeBool, @"bad type: %d", dataType); - #pragma unused(dataType) // For when asserts are off in release. - [stream writeBool:fieldNum value:value]; -} - -static size_t ComputeDictEnumFieldSize(int32_t value, uint32_t fieldNum, GPBDataType dataType) { - NSCAssert(dataType == GPBDataTypeEnum, @"bad type: %d", dataType); - #pragma unused(dataType) // For when asserts are off in release. - return GPBComputeEnumSize(fieldNum, value); -} - -static void WriteDictEnumField(GPBCodedOutputStream *stream, int32_t value, uint32_t fieldNum, GPBDataType dataType) { - NSCAssert(dataType == GPBDataTypeEnum, @"bad type: %d", dataType); - #pragma unused(dataType) // For when asserts are off in release. - [stream writeEnum:fieldNum value:value]; -} - -static size_t ComputeDictFloatFieldSize(float value, uint32_t fieldNum, GPBDataType dataType) { - NSCAssert(dataType == GPBDataTypeFloat, @"bad type: %d", dataType); - #pragma unused(dataType) // For when asserts are off in release. - return GPBComputeFloatSize(fieldNum, value); -} - -static void WriteDictFloatField(GPBCodedOutputStream *stream, float value, uint32_t fieldNum, GPBDataType dataType) { - NSCAssert(dataType == GPBDataTypeFloat, @"bad type: %d", dataType); - #pragma unused(dataType) // For when asserts are off in release. - [stream writeFloat:fieldNum value:value]; -} - -static size_t ComputeDictDoubleFieldSize(double value, uint32_t fieldNum, GPBDataType dataType) { - NSCAssert(dataType == GPBDataTypeDouble, @"bad type: %d", dataType); - #pragma unused(dataType) // For when asserts are off in release. - return GPBComputeDoubleSize(fieldNum, value); -} - -static void WriteDictDoubleField(GPBCodedOutputStream *stream, double value, uint32_t fieldNum, GPBDataType dataType) { - NSCAssert(dataType == GPBDataTypeDouble, @"bad type: %d", dataType); - #pragma unused(dataType) // For when asserts are off in release. - [stream writeDouble:fieldNum value:value]; -} - -static size_t ComputeDictStringFieldSize(NSString *value, uint32_t fieldNum, GPBDataType dataType) { - NSCAssert(dataType == GPBDataTypeString, @"bad type: %d", dataType); - #pragma unused(dataType) // For when asserts are off in release. - return GPBComputeStringSize(fieldNum, value); -} - -static void WriteDictStringField(GPBCodedOutputStream *stream, NSString *value, uint32_t fieldNum, GPBDataType dataType) { - NSCAssert(dataType == GPBDataTypeString, @"bad type: %d", dataType); - #pragma unused(dataType) // For when asserts are off in release. - [stream writeString:fieldNum value:value]; -} - -static size_t ComputeDictObjectFieldSize(id value, uint32_t fieldNum, GPBDataType dataType) { - if (dataType == GPBDataTypeMessage) { - return GPBComputeMessageSize(fieldNum, value); - } else if (dataType == GPBDataTypeString) { - return GPBComputeStringSize(fieldNum, value); - } else if (dataType == GPBDataTypeBytes) { - return GPBComputeBytesSize(fieldNum, value); - } else { - NSCAssert(NO, @"Unexpected type %d", dataType); - return 0; - } -} - -static void WriteDictObjectField(GPBCodedOutputStream *stream, id value, uint32_t fieldNum, GPBDataType dataType) { - if (dataType == GPBDataTypeMessage) { - [stream writeMessage:fieldNum value:value]; - } else if (dataType == GPBDataTypeString) { - [stream writeString:fieldNum value:value]; - } else if (dataType == GPBDataTypeBytes) { - [stream writeBytes:fieldNum value:value]; - } else { - NSCAssert(NO, @"Unexpected type %d", dataType); - } -} - -//%PDDM-EXPAND-END SERIALIZE_SUPPORT_HELPERS() - -size_t GPBDictionaryComputeSizeInternalHelper(NSDictionary *dict, GPBFieldDescriptor *field) { - GPBDataType mapValueType = GPBGetFieldDataType(field); - __block size_t result = 0; - [dict enumerateKeysAndObjectsUsingBlock:^(NSString *key, id obj, BOOL *stop) { - #pragma unused(stop) - size_t msgSize = GPBComputeStringSize(kMapKeyFieldNumber, key); - msgSize += ComputeDictObjectFieldSize(obj, kMapValueFieldNumber, mapValueType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * dict.count; - return result; -} - -void GPBDictionaryWriteToStreamInternalHelper(GPBCodedOutputStream *outputStream, - NSDictionary *dict, - GPBFieldDescriptor *field) { - NSCAssert(field.mapKeyDataType == GPBDataTypeString, @"Unexpected key type"); - GPBDataType mapValueType = GPBGetFieldDataType(field); - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [dict enumerateKeysAndObjectsUsingBlock:^(NSString *key, id obj, BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = GPBComputeStringSize(kMapKeyFieldNumber, key); - msgSize += ComputeDictObjectFieldSize(obj, kMapValueFieldNumber, mapValueType); - - // Write the size and fields. - [outputStream writeInt32NoTag:(int32_t)msgSize]; - [outputStream writeString:kMapKeyFieldNumber value:key]; - WriteDictObjectField(outputStream, obj, kMapValueFieldNumber, mapValueType); - }]; -} - -BOOL GPBDictionaryIsInitializedInternalHelper(NSDictionary *dict, GPBFieldDescriptor *field) { - NSCAssert(field.mapKeyDataType == GPBDataTypeString, @"Unexpected key type"); - NSCAssert(GPBGetFieldDataType(field) == GPBDataTypeMessage, @"Unexpected value type"); - #pragma unused(field) // For when asserts are off in release. - for (GPBMessage *msg in [dict objectEnumerator]) { - if (!msg.initialized) { - return NO; - } - } - return YES; -} - -// Note: if the type is an object, it the retain pass back to the caller. -static void ReadValue(GPBCodedInputStream *stream, - GPBGenericValue *valueToFill, - GPBDataType type, - GPBExtensionRegistry *registry, - GPBFieldDescriptor *field) { - switch (type) { - case GPBDataTypeBool: - valueToFill->valueBool = GPBCodedInputStreamReadBool(&stream->state_); - break; - case GPBDataTypeFixed32: - valueToFill->valueUInt32 = GPBCodedInputStreamReadFixed32(&stream->state_); - break; - case GPBDataTypeSFixed32: - valueToFill->valueInt32 = GPBCodedInputStreamReadSFixed32(&stream->state_); - break; - case GPBDataTypeFloat: - valueToFill->valueFloat = GPBCodedInputStreamReadFloat(&stream->state_); - break; - case GPBDataTypeFixed64: - valueToFill->valueUInt64 = GPBCodedInputStreamReadFixed64(&stream->state_); - break; - case GPBDataTypeSFixed64: - valueToFill->valueInt64 = GPBCodedInputStreamReadSFixed64(&stream->state_); - break; - case GPBDataTypeDouble: - valueToFill->valueDouble = GPBCodedInputStreamReadDouble(&stream->state_); - break; - case GPBDataTypeInt32: - valueToFill->valueInt32 = GPBCodedInputStreamReadInt32(&stream->state_); - break; - case GPBDataTypeInt64: - valueToFill->valueInt64 = GPBCodedInputStreamReadInt32(&stream->state_); - break; - case GPBDataTypeSInt32: - valueToFill->valueInt32 = GPBCodedInputStreamReadSInt32(&stream->state_); - break; - case GPBDataTypeSInt64: - valueToFill->valueInt64 = GPBCodedInputStreamReadSInt64(&stream->state_); - break; - case GPBDataTypeUInt32: - valueToFill->valueUInt32 = GPBCodedInputStreamReadUInt32(&stream->state_); - break; - case GPBDataTypeUInt64: - valueToFill->valueUInt64 = GPBCodedInputStreamReadUInt64(&stream->state_); - break; - case GPBDataTypeBytes: - [valueToFill->valueData release]; - valueToFill->valueData = GPBCodedInputStreamReadRetainedBytes(&stream->state_); - break; - case GPBDataTypeString: - [valueToFill->valueString release]; - valueToFill->valueString = GPBCodedInputStreamReadRetainedString(&stream->state_); - break; - case GPBDataTypeMessage: { - GPBMessage *message = [[field.msgClass alloc] init]; - [stream readMessage:message extensionRegistry:registry]; - [valueToFill->valueMessage release]; - valueToFill->valueMessage = message; - break; - } - case GPBDataTypeGroup: - NSCAssert(NO, @"Can't happen"); - break; - case GPBDataTypeEnum: - valueToFill->valueEnum = GPBCodedInputStreamReadEnum(&stream->state_); - break; - } -} - -void GPBDictionaryReadEntry(id mapDictionary, - GPBCodedInputStream *stream, - GPBExtensionRegistry *registry, - GPBFieldDescriptor *field, - GPBMessage *parentMessage) { - GPBDataType keyDataType = field.mapKeyDataType; - GPBDataType valueDataType = GPBGetFieldDataType(field); - - GPBGenericValue key; - GPBGenericValue value; - // Zero them (but pick up any enum default for proto2). - key.valueString = value.valueString = nil; - if (valueDataType == GPBDataTypeEnum) { - value = field.defaultValue; - } - - GPBCodedInputStreamState *state = &stream->state_; - uint32_t keyTag = - GPBWireFormatMakeTag(kMapKeyFieldNumber, GPBWireFormatForType(keyDataType, NO)); - uint32_t valueTag = - GPBWireFormatMakeTag(kMapValueFieldNumber, GPBWireFormatForType(valueDataType, NO)); - - BOOL hitError = NO; - while (YES) { - uint32_t tag = GPBCodedInputStreamReadTag(state); - if (tag == keyTag) { - ReadValue(stream, &key, keyDataType, registry, field); - } else if (tag == valueTag) { - ReadValue(stream, &value, valueDataType, registry, field); - } else if (tag == 0) { - // zero signals EOF / limit reached - break; - } else { // Unknown - if (![stream skipField:tag]){ - hitError = YES; - break; - } - } - } - - if (!hitError) { - // Handle the special defaults and/or missing key/value. - if ((keyDataType == GPBDataTypeString) && (key.valueString == nil)) { - key.valueString = [@"" retain]; - } - if (GPBDataTypeIsObject(valueDataType) && value.valueString == nil) { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wswitch-enum" - switch (valueDataType) { - case GPBDataTypeString: - value.valueString = [@"" retain]; - break; - case GPBDataTypeBytes: - value.valueData = [GPBEmptyNSData() retain]; - break; -#if defined(__clang_analyzer__) - case GPBDataTypeGroup: - // Maps can't really have Groups as the value type, but this case is needed - // so the analyzer won't report the posibility of send nil in for the value - // in the NSMutableDictionary case below. -#endif - case GPBDataTypeMessage: { - value.valueMessage = [[field.msgClass alloc] init]; - break; - } - default: - // Nothing - break; - } -#pragma clang diagnostic pop - } - - if ((keyDataType == GPBDataTypeString) && GPBDataTypeIsObject(valueDataType)) { -#if GPB_STATIC_ANALYZER_ONLY(6020053, 7000181) - // Limited to Xcode 6.4 - 7.2, are known to fail here. The upper end can - // be raised as needed for new Xcodes. - // - // This is only needed on a "shallow" analyze; on a "deep" analyze, the - // existing code path gets this correct. In shallow, the analyzer decides - // GPBDataTypeIsObject(valueDataType) is both false and true on a single - // path through this function, allowing nil to be used for the - // setObject:forKey:. - if (value.valueString == nil) { - value.valueString = [@"" retain]; - } -#endif - // mapDictionary is an NSMutableDictionary - [(NSMutableDictionary *)mapDictionary setObject:value.valueString - forKey:key.valueString]; - } else { - if (valueDataType == GPBDataTypeEnum) { - if (GPBHasPreservingUnknownEnumSemantics([parentMessage descriptor].file.syntax) || - [field isValidEnumValue:value.valueEnum]) { - [mapDictionary setGPBGenericValue:&value forGPBGenericValueKey:&key]; - } else { - NSData *data = [mapDictionary serializedDataForUnknownValue:value.valueEnum - forKey:&key - keyDataType:keyDataType]; - [parentMessage addUnknownMapEntry:GPBFieldNumber(field) value:data]; - } - } else { - [mapDictionary setGPBGenericValue:&value forGPBGenericValueKey:&key]; - } - } - } - - if (GPBDataTypeIsObject(keyDataType)) { - [key.valueString release]; - } - if (GPBDataTypeIsObject(valueDataType)) { - [value.valueString release]; - } -} - -// -// Macros for the common basic cases. -// - -//%PDDM-DEFINE DICTIONARY_IMPL_FOR_POD_KEY(KEY_NAME, KEY_TYPE) -//%DICTIONARY_POD_IMPL_FOR_KEY(KEY_NAME, KEY_TYPE, , POD) -//%DICTIONARY_POD_KEY_TO_OBJECT_IMPL(KEY_NAME, KEY_TYPE, Object, id) - -//%PDDM-DEFINE DICTIONARY_POD_IMPL_FOR_KEY(KEY_NAME, KEY_TYPE, KisP, KHELPER) -//%DICTIONARY_KEY_TO_POD_IMPL(KEY_NAME, KEY_TYPE, KisP, UInt32, uint32_t, KHELPER) -//%DICTIONARY_KEY_TO_POD_IMPL(KEY_NAME, KEY_TYPE, KisP, Int32, int32_t, KHELPER) -//%DICTIONARY_KEY_TO_POD_IMPL(KEY_NAME, KEY_TYPE, KisP, UInt64, uint64_t, KHELPER) -//%DICTIONARY_KEY_TO_POD_IMPL(KEY_NAME, KEY_TYPE, KisP, Int64, int64_t, KHELPER) -//%DICTIONARY_KEY_TO_POD_IMPL(KEY_NAME, KEY_TYPE, KisP, Bool, BOOL, KHELPER) -//%DICTIONARY_KEY_TO_POD_IMPL(KEY_NAME, KEY_TYPE, KisP, Float, float, KHELPER) -//%DICTIONARY_KEY_TO_POD_IMPL(KEY_NAME, KEY_TYPE, KisP, Double, double, KHELPER) -//%DICTIONARY_KEY_TO_ENUM_IMPL(KEY_NAME, KEY_TYPE, KisP, Enum, int32_t, KHELPER) - -//%PDDM-DEFINE DICTIONARY_KEY_TO_POD_IMPL(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER) -//%DICTIONARY_COMMON_IMPL(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, POD, VALUE_NAME, value) - -//%PDDM-DEFINE DICTIONARY_POD_KEY_TO_OBJECT_IMPL(KEY_NAME, KEY_TYPE, VALUE_NAME, VALUE_TYPE) -//%DICTIONARY_COMMON_IMPL(KEY_NAME, KEY_TYPE, , VALUE_NAME, VALUE_TYPE, POD, OBJECT, Object, object) - -//%PDDM-DEFINE DICTIONARY_COMMON_IMPL(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, VHELPER, VNAME, VNAME_VAR) -//%#pragma mark - KEY_NAME -> VALUE_NAME -//% -//%@implementation GPB##KEY_NAME##VALUE_NAME##Dictionary { -//% @package -//% NSMutableDictionary *_dictionary; -//%} -//% -//%+ (instancetype)dictionary { -//% return [[[self alloc] initWith##VNAME##s:NULL forKeys:NULL count:0] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWith##VNAME##:(VALUE_TYPE)##VNAME_VAR -//% ##VNAME$S## forKey:(KEY_TYPE##KisP$S##KisP)key { -//% // Cast is needed so the compiler knows what class we are invoking initWith##VNAME##s:forKeys:count: -//% // on to get the type correct. -//% return [[(GPB##KEY_NAME##VALUE_NAME##Dictionary*)[self alloc] initWith##VNAME##s:&##VNAME_VAR -//% KEY_NAME$S VALUE_NAME$S ##VNAME$S## forKeys:&key -//% KEY_NAME$S VALUE_NAME$S ##VNAME$S## count:1] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWith##VNAME##s:(const VALUE_TYPE [])##VNAME_VAR##s -//% ##VNAME$S## forKeys:(const KEY_TYPE##KisP$S##KisP [])keys -//% ##VNAME$S## count:(NSUInteger)count { -//% // Cast is needed so the compiler knows what class we are invoking initWith##VNAME##s:forKeys:count: -//% // on to get the type correct. -//% return [[(GPB##KEY_NAME##VALUE_NAME##Dictionary*)[self alloc] initWith##VNAME##s:##VNAME_VAR##s -//% KEY_NAME$S VALUE_NAME$S forKeys:keys -//% KEY_NAME$S VALUE_NAME$S count:count] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary { -//% // Cast is needed so the compiler knows what class we are invoking initWithDictionary: -//% // on to get the type correct. -//% return [[(GPB##KEY_NAME##VALUE_NAME##Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { -//% return [[[self alloc] initWithCapacity:numItems] autorelease]; -//%} -//% -//%- (instancetype)init { -//% return [self initWith##VNAME##s:NULL forKeys:NULL count:0]; -//%} -//% -//%- (instancetype)initWith##VNAME##s:(const VALUE_TYPE [])##VNAME_VAR##s -//% ##VNAME$S## forKeys:(const KEY_TYPE##KisP$S##KisP [])keys -//% ##VNAME$S## count:(NSUInteger)count { -//% self = [super init]; -//% if (self) { -//% _dictionary = [[NSMutableDictionary alloc] init]; -//% if (count && VNAME_VAR##s && keys) { -//% for (NSUInteger i = 0; i < count; ++i) { -//%DICTIONARY_VALIDATE_VALUE_##VHELPER(VNAME_VAR##s[i], ______)##DICTIONARY_VALIDATE_KEY_##KHELPER(keys[i], ______) [_dictionary setObject:WRAPPED##VHELPER(VNAME_VAR##s[i]) forKey:WRAPPED##KHELPER(keys[i])]; -//% } -//% } -//% } -//% return self; -//%} -//% -//%- (instancetype)initWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary { -//% self = [self initWith##VNAME##s:NULL forKeys:NULL count:0]; -//% if (self) { -//% if (dictionary) { -//% [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; -//% } -//% } -//% return self; -//%} -//% -//%- (instancetype)initWithCapacity:(NSUInteger)numItems { -//% #pragma unused(numItems) -//% return [self initWith##VNAME##s:NULL forKeys:NULL count:0]; -//%} -//% -//%DICTIONARY_IMMUTABLE_CORE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, VHELPER, VNAME, VNAME_VAR, ) -//% -//%VALUE_FOR_KEY_##VHELPER(KEY_TYPE##KisP$S##KisP, VALUE_NAME, VALUE_TYPE, KHELPER) -//% -//%DICTIONARY_MUTABLE_CORE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, VHELPER, VNAME, VNAME_VAR, ) -//% -//%@end -//% - -//%PDDM-DEFINE DICTIONARY_KEY_TO_ENUM_IMPL(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER) -//%DICTIONARY_KEY_TO_ENUM_IMPL2(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, POD) -//%PDDM-DEFINE DICTIONARY_KEY_TO_ENUM_IMPL2(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, VHELPER) -//%#pragma mark - KEY_NAME -> VALUE_NAME -//% -//%@implementation GPB##KEY_NAME##VALUE_NAME##Dictionary { -//% @package -//% NSMutableDictionary *_dictionary; -//% GPBEnumValidationFunc _validationFunc; -//%} -//% -//%@synthesize validationFunc = _validationFunc; -//% -//%+ (instancetype)dictionary { -//% return [[[self alloc] initWithValidationFunction:NULL -//% rawValues:NULL -//% forKeys:NULL -//% count:0] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func { -//% return [[[self alloc] initWithValidationFunction:func -//% rawValues:NULL -//% forKeys:NULL -//% count:0] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func -//% rawValue:(VALUE_TYPE)rawValue -//% forKey:(KEY_TYPE##KisP$S##KisP)key { -//% // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: -//% // on to get the type correct. -//% return [[(GPB##KEY_NAME##VALUE_NAME##Dictionary*)[self alloc] initWithValidationFunction:func -//% KEY_NAME$S VALUE_NAME$S rawValues:&rawValue -//% KEY_NAME$S VALUE_NAME$S forKeys:&key -//% KEY_NAME$S VALUE_NAME$S count:1] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func -//% rawValues:(const VALUE_TYPE [])rawValues -//% forKeys:(const KEY_TYPE##KisP$S##KisP [])keys -//% count:(NSUInteger)count { -//% // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: -//% // on to get the type correct. -//% return [[(GPB##KEY_NAME##VALUE_NAME##Dictionary*)[self alloc] initWithValidationFunction:func -//% KEY_NAME$S VALUE_NAME$S rawValues:rawValues -//% KEY_NAME$S VALUE_NAME$S forKeys:keys -//% KEY_NAME$S VALUE_NAME$S count:count] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary { -//% // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: -//% // on to get the type correct. -//% return [[(GPB##KEY_NAME##VALUE_NAME##Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func -//% capacity:(NSUInteger)numItems { -//% return [[[self alloc] initWithValidationFunction:func capacity:numItems] autorelease]; -//%} -//% -//%- (instancetype)init { -//% return [self initWithValidationFunction:NULL rawValues:NULL forKeys:NULL count:0]; -//%} -//% -//%- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func { -//% return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -//%} -//% -//%- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func -//% rawValues:(const VALUE_TYPE [])rawValues -//% forKeys:(const KEY_TYPE##KisP$S##KisP [])keys -//% count:(NSUInteger)count { -//% self = [super init]; -//% if (self) { -//% _dictionary = [[NSMutableDictionary alloc] init]; -//% _validationFunc = (func != NULL ? func : DictDefault_IsValidValue); -//% if (count && rawValues && keys) { -//% for (NSUInteger i = 0; i < count; ++i) { -//%DICTIONARY_VALIDATE_KEY_##KHELPER(keys[i], ______) [_dictionary setObject:WRAPPED##VHELPER(rawValues[i]) forKey:WRAPPED##KHELPER(keys[i])]; -//% } -//% } -//% } -//% return self; -//%} -//% -//%- (instancetype)initWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary { -//% self = [self initWithValidationFunction:dictionary.validationFunc -//% rawValues:NULL -//% forKeys:NULL -//% count:0]; -//% if (self) { -//% if (dictionary) { -//% [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; -//% } -//% } -//% return self; -//%} -//% -//%- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func -//% capacity:(NSUInteger)numItems { -//% #pragma unused(numItems) -//% return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -//%} -//% -//%DICTIONARY_IMMUTABLE_CORE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, VHELPER, Value, value, Raw) -//% -//%- (BOOL)getEnum:(VALUE_TYPE *)value forKey:(KEY_TYPE##KisP$S##KisP)key { -//% NSNumber *wrapped = [_dictionary objectForKey:WRAPPED##KHELPER(key)]; -//% if (wrapped && value) { -//% VALUE_TYPE result = UNWRAP##VALUE_NAME(wrapped); -//% if (!_validationFunc(result)) { -//% result = kGPBUnrecognizedEnumeratorValue; -//% } -//% *value = result; -//% } -//% return (wrapped != NULL); -//%} -//% -//%- (BOOL)getRawValue:(VALUE_TYPE *)rawValue forKey:(KEY_TYPE##KisP$S##KisP)key { -//% NSNumber *wrapped = [_dictionary objectForKey:WRAPPED##KHELPER(key)]; -//% if (wrapped && rawValue) { -//% *rawValue = UNWRAP##VALUE_NAME(wrapped); -//% } -//% return (wrapped != NULL); -//%} -//% -//%- (void)enumerateKeysAndEnumsUsingBlock: -//% (void (^)(KEY_TYPE KisP##key, VALUE_TYPE value, BOOL *stop))block { -//% GPBEnumValidationFunc func = _validationFunc; -//% [_dictionary enumerateKeysAndObjectsUsingBlock:^(ENUM_TYPE##KHELPER(KEY_TYPE)##aKey, -//% ENUM_TYPE##VHELPER(VALUE_TYPE)##aValue, -//% BOOL *stop) { -//% VALUE_TYPE unwrapped = UNWRAP##VALUE_NAME(aValue); -//% if (!func(unwrapped)) { -//% unwrapped = kGPBUnrecognizedEnumeratorValue; -//% } -//% block(UNWRAP##KEY_NAME(aKey), unwrapped, stop); -//% }]; -//%} -//% -//%DICTIONARY_MUTABLE_CORE2(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, VHELPER, Value, Enum, value, Raw) -//% -//%- (void)setEnum:(VALUE_TYPE)value forKey:(KEY_TYPE##KisP$S##KisP)key { -//%DICTIONARY_VALIDATE_KEY_##KHELPER(key, ) if (!_validationFunc(value)) { -//% [NSException raise:NSInvalidArgumentException -//% format:@"GPB##KEY_NAME##VALUE_NAME##Dictionary: Attempt to set an unknown enum value (%d)", -//% value]; -//% } -//% -//% [_dictionary setObject:WRAPPED##VHELPER(value) forKey:WRAPPED##KHELPER(key)]; -//% if (_autocreator) { -//% GPBAutocreatedDictionaryModified(_autocreator, self); -//% } -//%} -//% -//%@end -//% - -//%PDDM-DEFINE DICTIONARY_IMMUTABLE_CORE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, VHELPER, VNAME, VNAME_VAR, ACCESSOR_NAME) -//%- (void)dealloc { -//% NSAssert(!_autocreator, -//% @"%@: Autocreator must be cleared before release, autocreator: %@", -//% [self class], _autocreator); -//% [_dictionary release]; -//% [super dealloc]; -//%} -//% -//%- (instancetype)copyWithZone:(NSZone *)zone { -//% return [[GPB##KEY_NAME##VALUE_NAME##Dictionary allocWithZone:zone] initWithDictionary:self]; -//%} -//% -//%- (BOOL)isEqual:(id)other { -//% if (self == other) { -//% return YES; -//% } -//% if (![other isKindOfClass:[GPB##KEY_NAME##VALUE_NAME##Dictionary class]]) { -//% return NO; -//% } -//% GPB##KEY_NAME##VALUE_NAME##Dictionary *otherDictionary = other; -//% return [_dictionary isEqual:otherDictionary->_dictionary]; -//%} -//% -//%- (NSUInteger)hash { -//% return _dictionary.count; -//%} -//% -//%- (NSString *)description { -//% return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -//%} -//% -//%- (NSUInteger)count { -//% return _dictionary.count; -//%} -//% -//%- (void)enumerateKeysAnd##ACCESSOR_NAME##VNAME##sUsingBlock: -//% (void (^)(KEY_TYPE KisP##key, VALUE_TYPE VNAME_VAR, BOOL *stop))block { -//% [_dictionary enumerateKeysAndObjectsUsingBlock:^(ENUM_TYPE##KHELPER(KEY_TYPE)##aKey, -//% ENUM_TYPE##VHELPER(VALUE_TYPE)##a##VNAME_VAR$u, -//% BOOL *stop) { -//% block(UNWRAP##KEY_NAME(aKey), UNWRAP##VALUE_NAME(a##VNAME_VAR$u), stop); -//% }]; -//%} -//% -//%EXTRA_METHODS_##VHELPER(KEY_NAME, VALUE_NAME)- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { -//% NSUInteger count = _dictionary.count; -//% if (count == 0) { -//% return 0; -//% } -//% -//% GPBDataType valueDataType = GPBGetFieldDataType(field); -//% GPBDataType keyDataType = field.mapKeyDataType; -//% __block size_t result = 0; -//% [_dictionary enumerateKeysAndObjectsUsingBlock:^(ENUM_TYPE##KHELPER(KEY_TYPE)##aKey, -//% ENUM_TYPE##VHELPER(VALUE_TYPE)##a##VNAME_VAR$u##, -//% BOOL *stop) { -//% #pragma unused(stop) -//% size_t msgSize = ComputeDict##KEY_NAME##FieldSize(UNWRAP##KEY_NAME(aKey), kMapKeyFieldNumber, keyDataType); -//% msgSize += ComputeDict##VALUE_NAME##FieldSize(UNWRAP##VALUE_NAME(a##VNAME_VAR$u), kMapValueFieldNumber, valueDataType); -//% result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; -//% }]; -//% size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); -//% result += tagSize * count; -//% return result; -//%} -//% -//%- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream -//% asField:(GPBFieldDescriptor *)field { -//% GPBDataType valueDataType = GPBGetFieldDataType(field); -//% GPBDataType keyDataType = field.mapKeyDataType; -//% uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); -//% [_dictionary enumerateKeysAndObjectsUsingBlock:^(ENUM_TYPE##KHELPER(KEY_TYPE)##aKey, -//% ENUM_TYPE##VHELPER(VALUE_TYPE)##a##VNAME_VAR$u, -//% BOOL *stop) { -//% #pragma unused(stop) -//% // Write the tag. -//% [outputStream writeInt32NoTag:tag]; -//% // Write the size of the message. -//% size_t msgSize = ComputeDict##KEY_NAME##FieldSize(UNWRAP##KEY_NAME(aKey), kMapKeyFieldNumber, keyDataType); -//% msgSize += ComputeDict##VALUE_NAME##FieldSize(UNWRAP##VALUE_NAME(a##VNAME_VAR$u), kMapValueFieldNumber, valueDataType); -//% [outputStream writeInt32NoTag:(int32_t)msgSize]; -//% // Write the fields. -//% WriteDict##KEY_NAME##Field(outputStream, UNWRAP##KEY_NAME(aKey), kMapKeyFieldNumber, keyDataType); -//% WriteDict##VALUE_NAME##Field(outputStream, UNWRAP##VALUE_NAME(a##VNAME_VAR$u), kMapValueFieldNumber, valueDataType); -//% }]; -//%} -//% -//%SERIAL_DATA_FOR_ENTRY_##VHELPER(KEY_NAME, VALUE_NAME)- (void)setGPBGenericValue:(GPBGenericValue *)value -//% forGPBGenericValueKey:(GPBGenericValue *)key { -//% [_dictionary setObject:WRAPPED##VHELPER(value->##GPBVALUE_##VHELPER(VALUE_NAME)##) forKey:WRAPPED##KHELPER(key->value##KEY_NAME)]; -//%} -//% -//%- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { -//% [self enumerateKeysAnd##ACCESSOR_NAME##VNAME##sUsingBlock:^(KEY_TYPE KisP##key, VALUE_TYPE VNAME_VAR, BOOL *stop) { -//% #pragma unused(stop) -//% block(TEXT_FORMAT_OBJ##KEY_NAME(key), TEXT_FORMAT_OBJ##VALUE_NAME(VNAME_VAR)); -//% }]; -//%} -//%PDDM-DEFINE DICTIONARY_MUTABLE_CORE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, VHELPER, VNAME, VNAME_VAR, ACCESSOR_NAME) -//%DICTIONARY_MUTABLE_CORE2(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, VHELPER, VNAME, VNAME, VNAME_VAR, ACCESSOR_NAME) -//%PDDM-DEFINE DICTIONARY_MUTABLE_CORE2(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, KHELPER, VHELPER, VNAME, VNAME_REMOVE, VNAME_VAR, ACCESSOR_NAME) -//%- (void)add##ACCESSOR_NAME##EntriesFromDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)otherDictionary { -//% if (otherDictionary) { -//% [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; -//% if (_autocreator) { -//% GPBAutocreatedDictionaryModified(_autocreator, self); -//% } -//% } -//%} -//% -//%- (void)set##ACCESSOR_NAME##VNAME##:(VALUE_TYPE)VNAME_VAR forKey:(KEY_TYPE##KisP$S##KisP)key { -//%DICTIONARY_VALIDATE_VALUE_##VHELPER(VNAME_VAR, )##DICTIONARY_VALIDATE_KEY_##KHELPER(key, ) [_dictionary setObject:WRAPPED##VHELPER(VNAME_VAR) forKey:WRAPPED##KHELPER(key)]; -//% if (_autocreator) { -//% GPBAutocreatedDictionaryModified(_autocreator, self); -//% } -//%} -//% -//%- (void)remove##VNAME_REMOVE##ForKey:(KEY_TYPE##KisP$S##KisP)aKey { -//% [_dictionary removeObjectForKey:WRAPPED##KHELPER(aKey)]; -//%} -//% -//%- (void)removeAll { -//% [_dictionary removeAllObjects]; -//%} - -// -// Custom Generation for Bool keys -// - -//%PDDM-DEFINE DICTIONARY_BOOL_KEY_TO_POD_IMPL(VALUE_NAME, VALUE_TYPE) -//%DICTIONARY_BOOL_KEY_TO_VALUE_IMPL(VALUE_NAME, VALUE_TYPE, POD, VALUE_NAME, value) -//%PDDM-DEFINE DICTIONARY_BOOL_KEY_TO_OBJECT_IMPL(VALUE_NAME, VALUE_TYPE) -//%DICTIONARY_BOOL_KEY_TO_VALUE_IMPL(VALUE_NAME, VALUE_TYPE, OBJECT, Object, object) - -//%PDDM-DEFINE DICTIONARY_BOOL_KEY_TO_VALUE_IMPL(VALUE_NAME, VALUE_TYPE, HELPER, VNAME, VNAME_VAR) -//%#pragma mark - Bool -> VALUE_NAME -//% -//%@implementation GPBBool##VALUE_NAME##Dictionary { -//% @package -//% VALUE_TYPE _values[2]; -//%BOOL_DICT_HAS_STORAGE_##HELPER()} -//% -//%+ (instancetype)dictionary { -//% return [[[self alloc] initWith##VNAME##s:NULL forKeys:NULL count:0] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWith##VNAME##:(VALUE_TYPE)VNAME_VAR -//% ##VNAME$S## forKey:(BOOL)key { -//% // Cast is needed so the compiler knows what class we are invoking initWith##VNAME##s:forKeys:count: -//% // on to get the type correct. -//% return [[(GPBBool##VALUE_NAME##Dictionary*)[self alloc] initWith##VNAME##s:&##VNAME_VAR -//% VALUE_NAME$S ##VNAME$S## forKeys:&key -//% VALUE_NAME$S ##VNAME$S## count:1] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWith##VNAME##s:(const VALUE_TYPE [])##VNAME_VAR##s -//% ##VNAME$S## forKeys:(const BOOL [])keys -//% ##VNAME$S## count:(NSUInteger)count { -//% // Cast is needed so the compiler knows what class we are invoking initWith##VNAME##s:forKeys:count: -//% // on to get the type correct. -//% return [[(GPBBool##VALUE_NAME##Dictionary*)[self alloc] initWith##VNAME##s:##VNAME_VAR##s -//% VALUE_NAME$S ##VNAME$S## forKeys:keys -//% VALUE_NAME$S ##VNAME$S## count:count] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWithDictionary:(GPBBool##VALUE_NAME##Dictionary *)dictionary { -//% // Cast is needed so the compiler knows what class we are invoking initWithDictionary: -//% // on to get the type correct. -//% return [[(GPBBool##VALUE_NAME##Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -//%} -//% -//%+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { -//% return [[[self alloc] initWithCapacity:numItems] autorelease]; -//%} -//% -//%- (instancetype)init { -//% return [self initWith##VNAME##s:NULL forKeys:NULL count:0]; -//%} -//% -//%BOOL_DICT_INITS_##HELPER(VALUE_NAME, VALUE_TYPE) -//% -//%- (instancetype)initWithCapacity:(NSUInteger)numItems { -//% #pragma unused(numItems) -//% return [self initWith##VNAME##s:NULL forKeys:NULL count:0]; -//%} -//% -//%BOOL_DICT_DEALLOC##HELPER() -//% -//%- (instancetype)copyWithZone:(NSZone *)zone { -//% return [[GPBBool##VALUE_NAME##Dictionary allocWithZone:zone] initWithDictionary:self]; -//%} -//% -//%- (BOOL)isEqual:(id)other { -//% if (self == other) { -//% return YES; -//% } -//% if (![other isKindOfClass:[GPBBool##VALUE_NAME##Dictionary class]]) { -//% return NO; -//% } -//% GPBBool##VALUE_NAME##Dictionary *otherDictionary = other; -//% if ((BOOL_DICT_W_HAS##HELPER(0, ) != BOOL_DICT_W_HAS##HELPER(0, otherDictionary->)) || -//% (BOOL_DICT_W_HAS##HELPER(1, ) != BOOL_DICT_W_HAS##HELPER(1, otherDictionary->))) { -//% return NO; -//% } -//% if ((BOOL_DICT_W_HAS##HELPER(0, ) && (NEQ_##HELPER(_values[0], otherDictionary->_values[0]))) || -//% (BOOL_DICT_W_HAS##HELPER(1, ) && (NEQ_##HELPER(_values[1], otherDictionary->_values[1])))) { -//% return NO; -//% } -//% return YES; -//%} -//% -//%- (NSUInteger)hash { -//% return (BOOL_DICT_W_HAS##HELPER(0, ) ? 1 : 0) + (BOOL_DICT_W_HAS##HELPER(1, ) ? 1 : 0); -//%} -//% -//%- (NSString *)description { -//% NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> {", [self class], self]; -//% if (BOOL_DICT_W_HAS##HELPER(0, )) { -//% [result appendFormat:@"NO: STR_FORMAT_##HELPER(VALUE_NAME)", _values[0]]; -//% } -//% if (BOOL_DICT_W_HAS##HELPER(1, )) { -//% [result appendFormat:@"YES: STR_FORMAT_##HELPER(VALUE_NAME)", _values[1]]; -//% } -//% [result appendString:@" }"]; -//% return result; -//%} -//% -//%- (NSUInteger)count { -//% return (BOOL_DICT_W_HAS##HELPER(0, ) ? 1 : 0) + (BOOL_DICT_W_HAS##HELPER(1, ) ? 1 : 0); -//%} -//% -//%BOOL_VALUE_FOR_KEY_##HELPER(VALUE_NAME, VALUE_TYPE) -//% -//%BOOL_SET_GPBVALUE_FOR_KEY_##HELPER(VALUE_NAME, VALUE_TYPE, VisP) -//% -//%- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { -//% if (BOOL_DICT_HAS##HELPER(0, )) { -//% block(@"false", TEXT_FORMAT_OBJ##VALUE_NAME(_values[0])); -//% } -//% if (BOOL_DICT_W_HAS##HELPER(1, )) { -//% block(@"true", TEXT_FORMAT_OBJ##VALUE_NAME(_values[1])); -//% } -//%} -//% -//%- (void)enumerateKeysAnd##VNAME##sUsingBlock: -//% (void (^)(BOOL key, VALUE_TYPE VNAME_VAR, BOOL *stop))block { -//% BOOL stop = NO; -//% if (BOOL_DICT_HAS##HELPER(0, )) { -//% block(NO, _values[0], &stop); -//% } -//% if (!stop && BOOL_DICT_W_HAS##HELPER(1, )) { -//% block(YES, _values[1], &stop); -//% } -//%} -//% -//%BOOL_EXTRA_METHODS_##HELPER(Bool, VALUE_NAME)- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { -//% GPBDataType valueDataType = GPBGetFieldDataType(field); -//% NSUInteger count = 0; -//% size_t result = 0; -//% for (int i = 0; i < 2; ++i) { -//% if (BOOL_DICT_HAS##HELPER(i, )) { -//% ++count; -//% size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); -//% msgSize += ComputeDict##VALUE_NAME##FieldSize(_values[i], kMapValueFieldNumber, valueDataType); -//% result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; -//% } -//% } -//% size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); -//% result += tagSize * count; -//% return result; -//%} -//% -//%- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream -//% asField:(GPBFieldDescriptor *)field { -//% GPBDataType valueDataType = GPBGetFieldDataType(field); -//% uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); -//% for (int i = 0; i < 2; ++i) { -//% if (BOOL_DICT_HAS##HELPER(i, )) { -//% // Write the tag. -//% [outputStream writeInt32NoTag:tag]; -//% // Write the size of the message. -//% size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); -//% msgSize += ComputeDict##VALUE_NAME##FieldSize(_values[i], kMapValueFieldNumber, valueDataType); -//% [outputStream writeInt32NoTag:(int32_t)msgSize]; -//% // Write the fields. -//% WriteDictBoolField(outputStream, (i == 1), kMapKeyFieldNumber, GPBDataTypeBool); -//% WriteDict##VALUE_NAME##Field(outputStream, _values[i], kMapValueFieldNumber, valueDataType); -//% } -//% } -//%} -//% -//%BOOL_DICT_MUTATIONS_##HELPER(VALUE_NAME, VALUE_TYPE) -//% -//%@end -//% - - -// -// Helpers for PODs -// - -//%PDDM-DEFINE VALUE_FOR_KEY_POD(KEY_TYPE, VALUE_NAME, VALUE_TYPE, KHELPER) -//%- (BOOL)get##VALUE_NAME##:(nullable VALUE_TYPE *)value forKey:(KEY_TYPE)key { -//% NSNumber *wrapped = [_dictionary objectForKey:WRAPPED##KHELPER(key)]; -//% if (wrapped && value) { -//% *value = UNWRAP##VALUE_NAME(wrapped); -//% } -//% return (wrapped != NULL); -//%} -//%PDDM-DEFINE WRAPPEDPOD(VALUE) -//%@(VALUE) -//%PDDM-DEFINE UNWRAPUInt32(VALUE) -//%[VALUE unsignedIntValue] -//%PDDM-DEFINE UNWRAPInt32(VALUE) -//%[VALUE intValue] -//%PDDM-DEFINE UNWRAPUInt64(VALUE) -//%[VALUE unsignedLongLongValue] -//%PDDM-DEFINE UNWRAPInt64(VALUE) -//%[VALUE longLongValue] -//%PDDM-DEFINE UNWRAPBool(VALUE) -//%[VALUE boolValue] -//%PDDM-DEFINE UNWRAPFloat(VALUE) -//%[VALUE floatValue] -//%PDDM-DEFINE UNWRAPDouble(VALUE) -//%[VALUE doubleValue] -//%PDDM-DEFINE UNWRAPEnum(VALUE) -//%[VALUE intValue] -//%PDDM-DEFINE TEXT_FORMAT_OBJUInt32(VALUE) -//%[NSString stringWithFormat:@"%u", VALUE] -//%PDDM-DEFINE TEXT_FORMAT_OBJInt32(VALUE) -//%[NSString stringWithFormat:@"%d", VALUE] -//%PDDM-DEFINE TEXT_FORMAT_OBJUInt64(VALUE) -//%[NSString stringWithFormat:@"%llu", VALUE] -//%PDDM-DEFINE TEXT_FORMAT_OBJInt64(VALUE) -//%[NSString stringWithFormat:@"%lld", VALUE] -//%PDDM-DEFINE TEXT_FORMAT_OBJBool(VALUE) -//%(VALUE ? @"true" : @"false") -//%PDDM-DEFINE TEXT_FORMAT_OBJFloat(VALUE) -//%[NSString stringWithFormat:@"%.*g", FLT_DIG, VALUE] -//%PDDM-DEFINE TEXT_FORMAT_OBJDouble(VALUE) -//%[NSString stringWithFormat:@"%.*lg", DBL_DIG, VALUE] -//%PDDM-DEFINE TEXT_FORMAT_OBJEnum(VALUE) -//%@(VALUE) -//%PDDM-DEFINE ENUM_TYPEPOD(TYPE) -//%NSNumber * -//%PDDM-DEFINE NEQ_POD(VAL1, VAL2) -//%VAL1 != VAL2 -//%PDDM-DEFINE EXTRA_METHODS_POD(KEY_NAME, VALUE_NAME) -// Empty -//%PDDM-DEFINE BOOL_EXTRA_METHODS_POD(KEY_NAME, VALUE_NAME) -// Empty -//%PDDM-DEFINE SERIAL_DATA_FOR_ENTRY_POD(KEY_NAME, VALUE_NAME) -//%SERIAL_DATA_FOR_ENTRY_POD_##VALUE_NAME(KEY_NAME) -//%PDDM-DEFINE SERIAL_DATA_FOR_ENTRY_POD_UInt32(KEY_NAME) -// Empty -//%PDDM-DEFINE SERIAL_DATA_FOR_ENTRY_POD_Int32(KEY_NAME) -// Empty -//%PDDM-DEFINE SERIAL_DATA_FOR_ENTRY_POD_UInt64(KEY_NAME) -// Empty -//%PDDM-DEFINE SERIAL_DATA_FOR_ENTRY_POD_Int64(KEY_NAME) -// Empty -//%PDDM-DEFINE SERIAL_DATA_FOR_ENTRY_POD_Bool(KEY_NAME) -// Empty -//%PDDM-DEFINE SERIAL_DATA_FOR_ENTRY_POD_Float(KEY_NAME) -// Empty -//%PDDM-DEFINE SERIAL_DATA_FOR_ENTRY_POD_Double(KEY_NAME) -// Empty -//%PDDM-DEFINE SERIAL_DATA_FOR_ENTRY_POD_Enum(KEY_NAME) -//%- (NSData *)serializedDataForUnknownValue:(int32_t)value -//% forKey:(GPBGenericValue *)key -//% keyDataType:(GPBDataType)keyDataType { -//% size_t msgSize = ComputeDict##KEY_NAME##FieldSize(key->value##KEY_NAME, kMapKeyFieldNumber, keyDataType); -//% msgSize += ComputeDictEnumFieldSize(value, kMapValueFieldNumber, GPBDataTypeEnum); -//% NSMutableData *data = [NSMutableData dataWithLength:msgSize]; -//% GPBCodedOutputStream *outputStream = [[GPBCodedOutputStream alloc] initWithData:data]; -//% WriteDict##KEY_NAME##Field(outputStream, key->value##KEY_NAME, kMapKeyFieldNumber, keyDataType); -//% WriteDictEnumField(outputStream, value, kMapValueFieldNumber, GPBDataTypeEnum); -//% [outputStream release]; -//% return data; -//%} -//% -//%PDDM-DEFINE GPBVALUE_POD(VALUE_NAME) -//%value##VALUE_NAME -//%PDDM-DEFINE DICTIONARY_VALIDATE_VALUE_POD(VALUE_NAME, EXTRA_INDENT) -// Empty -//%PDDM-DEFINE DICTIONARY_VALIDATE_KEY_POD(KEY_NAME, EXTRA_INDENT) -// Empty - -//%PDDM-DEFINE BOOL_DICT_HAS_STORAGE_POD() -//% BOOL _valueSet[2]; -//% -//%PDDM-DEFINE BOOL_DICT_INITS_POD(VALUE_NAME, VALUE_TYPE) -//%- (instancetype)initWith##VALUE_NAME##s:(const VALUE_TYPE [])values -//% ##VALUE_NAME$S## forKeys:(const BOOL [])keys -//% ##VALUE_NAME$S## count:(NSUInteger)count { -//% self = [super init]; -//% if (self) { -//% for (NSUInteger i = 0; i < count; ++i) { -//% int idx = keys[i] ? 1 : 0; -//% _values[idx] = values[i]; -//% _valueSet[idx] = YES; -//% } -//% } -//% return self; -//%} -//% -//%- (instancetype)initWithDictionary:(GPBBool##VALUE_NAME##Dictionary *)dictionary { -//% self = [self initWith##VALUE_NAME##s:NULL forKeys:NULL count:0]; -//% if (self) { -//% if (dictionary) { -//% for (int i = 0; i < 2; ++i) { -//% if (dictionary->_valueSet[i]) { -//% _values[i] = dictionary->_values[i]; -//% _valueSet[i] = YES; -//% } -//% } -//% } -//% } -//% return self; -//%} -//%PDDM-DEFINE BOOL_DICT_DEALLOCPOD() -//%#if !defined(NS_BLOCK_ASSERTIONS) -//%- (void)dealloc { -//% NSAssert(!_autocreator, -//% @"%@: Autocreator must be cleared before release, autocreator: %@", -//% [self class], _autocreator); -//% [super dealloc]; -//%} -//%#endif // !defined(NS_BLOCK_ASSERTIONS) -//%PDDM-DEFINE BOOL_DICT_W_HASPOD(IDX, REF) -//%BOOL_DICT_HASPOD(IDX, REF) -//%PDDM-DEFINE BOOL_DICT_HASPOD(IDX, REF) -//%REF##_valueSet[IDX] -//%PDDM-DEFINE BOOL_VALUE_FOR_KEY_POD(VALUE_NAME, VALUE_TYPE) -//%- (BOOL)get##VALUE_NAME##:(VALUE_TYPE *)value forKey:(BOOL)key { -//% int idx = (key ? 1 : 0); -//% if (_valueSet[idx]) { -//% if (value) { -//% *value = _values[idx]; -//% } -//% return YES; -//% } -//% return NO; -//%} -//%PDDM-DEFINE BOOL_SET_GPBVALUE_FOR_KEY_POD(VALUE_NAME, VALUE_TYPE, VisP) -//%- (void)setGPBGenericValue:(GPBGenericValue *)value -//% forGPBGenericValueKey:(GPBGenericValue *)key { -//% int idx = (key->valueBool ? 1 : 0); -//% _values[idx] = value->value##VALUE_NAME; -//% _valueSet[idx] = YES; -//%} -//%PDDM-DEFINE BOOL_DICT_MUTATIONS_POD(VALUE_NAME, VALUE_TYPE) -//%- (void)addEntriesFromDictionary:(GPBBool##VALUE_NAME##Dictionary *)otherDictionary { -//% if (otherDictionary) { -//% for (int i = 0; i < 2; ++i) { -//% if (otherDictionary->_valueSet[i]) { -//% _valueSet[i] = YES; -//% _values[i] = otherDictionary->_values[i]; -//% } -//% } -//% if (_autocreator) { -//% GPBAutocreatedDictionaryModified(_autocreator, self); -//% } -//% } -//%} -//% -//%- (void)set##VALUE_NAME:(VALUE_TYPE)value forKey:(BOOL)key { -//% int idx = (key ? 1 : 0); -//% _values[idx] = value; -//% _valueSet[idx] = YES; -//% if (_autocreator) { -//% GPBAutocreatedDictionaryModified(_autocreator, self); -//% } -//%} -//% -//%- (void)remove##VALUE_NAME##ForKey:(BOOL)aKey { -//% _valueSet[aKey ? 1 : 0] = NO; -//%} -//% -//%- (void)removeAll { -//% _valueSet[0] = NO; -//% _valueSet[1] = NO; -//%} -//%PDDM-DEFINE STR_FORMAT_POD(VALUE_NAME) -//%STR_FORMAT_##VALUE_NAME() -//%PDDM-DEFINE STR_FORMAT_UInt32() -//%%u -//%PDDM-DEFINE STR_FORMAT_Int32() -//%%d -//%PDDM-DEFINE STR_FORMAT_UInt64() -//%%llu -//%PDDM-DEFINE STR_FORMAT_Int64() -//%%lld -//%PDDM-DEFINE STR_FORMAT_Bool() -//%%d -//%PDDM-DEFINE STR_FORMAT_Float() -//%%f -//%PDDM-DEFINE STR_FORMAT_Double() -//%%lf - -// -// Helpers for Objects -// - -//%PDDM-DEFINE VALUE_FOR_KEY_OBJECT(KEY_TYPE, VALUE_NAME, VALUE_TYPE, KHELPER) -//%- (VALUE_TYPE)objectForKey:(KEY_TYPE)key { -//% VALUE_TYPE result = [_dictionary objectForKey:WRAPPED##KHELPER(key)]; -//% return result; -//%} -//%PDDM-DEFINE WRAPPEDOBJECT(VALUE) -//%VALUE -//%PDDM-DEFINE UNWRAPString(VALUE) -//%VALUE -//%PDDM-DEFINE UNWRAPObject(VALUE) -//%VALUE -//%PDDM-DEFINE TEXT_FORMAT_OBJString(VALUE) -//%VALUE -//%PDDM-DEFINE TEXT_FORMAT_OBJObject(VALUE) -//%VALUE -//%PDDM-DEFINE ENUM_TYPEOBJECT(TYPE) -//%ENUM_TYPEOBJECT_##TYPE() -//%PDDM-DEFINE ENUM_TYPEOBJECT_NSString() -//%NSString * -//%PDDM-DEFINE ENUM_TYPEOBJECT_id() -//%id ## -//%PDDM-DEFINE NEQ_OBJECT(VAL1, VAL2) -//%![VAL1 isEqual:VAL2] -//%PDDM-DEFINE EXTRA_METHODS_OBJECT(KEY_NAME, VALUE_NAME) -//%- (BOOL)isInitialized { -//% for (GPBMessage *msg in [_dictionary objectEnumerator]) { -//% if (!msg.initialized) { -//% return NO; -//% } -//% } -//% return YES; -//%} -//% -//%- (instancetype)deepCopyWithZone:(NSZone *)zone { -//% GPB##KEY_NAME##VALUE_NAME##Dictionary *newDict = -//% [[GPB##KEY_NAME##VALUE_NAME##Dictionary alloc] init]; -//% [_dictionary enumerateKeysAndObjectsUsingBlock:^(id aKey, -//% GPBMessage *msg, -//% BOOL *stop) { -//% #pragma unused(stop) -//% GPBMessage *copiedMsg = [msg copyWithZone:zone]; -//% [newDict->_dictionary setObject:copiedMsg forKey:aKey]; -//% [copiedMsg release]; -//% }]; -//% return newDict; -//%} -//% -//% -//%PDDM-DEFINE BOOL_EXTRA_METHODS_OBJECT(KEY_NAME, VALUE_NAME) -//%- (BOOL)isInitialized { -//% if (_values[0] && ![_values[0] isInitialized]) { -//% return NO; -//% } -//% if (_values[1] && ![_values[1] isInitialized]) { -//% return NO; -//% } -//% return YES; -//%} -//% -//%- (instancetype)deepCopyWithZone:(NSZone *)zone { -//% GPB##KEY_NAME##VALUE_NAME##Dictionary *newDict = -//% [[GPB##KEY_NAME##VALUE_NAME##Dictionary alloc] init]; -//% for (int i = 0; i < 2; ++i) { -//% if (_values[i] != nil) { -//% newDict->_values[i] = [_values[i] copyWithZone:zone]; -//% } -//% } -//% return newDict; -//%} -//% -//% -//%PDDM-DEFINE SERIAL_DATA_FOR_ENTRY_OBJECT(KEY_NAME, VALUE_NAME) -// Empty -//%PDDM-DEFINE GPBVALUE_OBJECT(VALUE_NAME) -//%valueString -//%PDDM-DEFINE DICTIONARY_VALIDATE_VALUE_OBJECT(VALUE_NAME, EXTRA_INDENT) -//%##EXTRA_INDENT$S## if (!##VALUE_NAME) { -//%##EXTRA_INDENT$S## [NSException raise:NSInvalidArgumentException -//%##EXTRA_INDENT$S## format:@"Attempting to add nil object to a Dictionary"]; -//%##EXTRA_INDENT$S## } -//% -//%PDDM-DEFINE DICTIONARY_VALIDATE_KEY_OBJECT(KEY_NAME, EXTRA_INDENT) -//%##EXTRA_INDENT$S## if (!##KEY_NAME) { -//%##EXTRA_INDENT$S## [NSException raise:NSInvalidArgumentException -//%##EXTRA_INDENT$S## format:@"Attempting to add nil key to a Dictionary"]; -//%##EXTRA_INDENT$S## } -//% - -//%PDDM-DEFINE BOOL_DICT_HAS_STORAGE_OBJECT() -// Empty -//%PDDM-DEFINE BOOL_DICT_INITS_OBJECT(VALUE_NAME, VALUE_TYPE) -//%- (instancetype)initWithObjects:(const VALUE_TYPE [])objects -//% forKeys:(const BOOL [])keys -//% count:(NSUInteger)count { -//% self = [super init]; -//% if (self) { -//% for (NSUInteger i = 0; i < count; ++i) { -//% if (!objects[i]) { -//% [NSException raise:NSInvalidArgumentException -//% format:@"Attempting to add nil object to a Dictionary"]; -//% } -//% int idx = keys[i] ? 1 : 0; -//% [_values[idx] release]; -//% _values[idx] = (VALUE_TYPE)[objects[i] retain]; -//% } -//% } -//% return self; -//%} -//% -//%- (instancetype)initWithDictionary:(GPBBool##VALUE_NAME##Dictionary *)dictionary { -//% self = [self initWithObjects:NULL forKeys:NULL count:0]; -//% if (self) { -//% if (dictionary) { -//% _values[0] = [dictionary->_values[0] retain]; -//% _values[1] = [dictionary->_values[1] retain]; -//% } -//% } -//% return self; -//%} -//%PDDM-DEFINE BOOL_DICT_DEALLOCOBJECT() -//%- (void)dealloc { -//% NSAssert(!_autocreator, -//% @"%@: Autocreator must be cleared before release, autocreator: %@", -//% [self class], _autocreator); -//% [_values[0] release]; -//% [_values[1] release]; -//% [super dealloc]; -//%} -//%PDDM-DEFINE BOOL_DICT_W_HASOBJECT(IDX, REF) -//%(BOOL_DICT_HASOBJECT(IDX, REF)) -//%PDDM-DEFINE BOOL_DICT_HASOBJECT(IDX, REF) -//%REF##_values[IDX] != nil -//%PDDM-DEFINE BOOL_VALUE_FOR_KEY_OBJECT(VALUE_NAME, VALUE_TYPE) -//%- (VALUE_TYPE)objectForKey:(BOOL)key { -//% return _values[key ? 1 : 0]; -//%} -//%PDDM-DEFINE BOOL_SET_GPBVALUE_FOR_KEY_OBJECT(VALUE_NAME, VALUE_TYPE, VisP) -//%- (void)setGPBGenericValue:(GPBGenericValue *)value -//% forGPBGenericValueKey:(GPBGenericValue *)key { -//% int idx = (key->valueBool ? 1 : 0); -//% [_values[idx] release]; -//% _values[idx] = [value->valueString retain]; -//%} - -//%PDDM-DEFINE BOOL_DICT_MUTATIONS_OBJECT(VALUE_NAME, VALUE_TYPE) -//%- (void)addEntriesFromDictionary:(GPBBool##VALUE_NAME##Dictionary *)otherDictionary { -//% if (otherDictionary) { -//% for (int i = 0; i < 2; ++i) { -//% if (otherDictionary->_values[i] != nil) { -//% [_values[i] release]; -//% _values[i] = [otherDictionary->_values[i] retain]; -//% } -//% } -//% if (_autocreator) { -//% GPBAutocreatedDictionaryModified(_autocreator, self); -//% } -//% } -//%} -//% -//%- (void)setObject:(VALUE_TYPE)object forKey:(BOOL)key { -//% if (!object) { -//% [NSException raise:NSInvalidArgumentException -//% format:@"Attempting to add nil object to a Dictionary"]; -//% } -//% int idx = (key ? 1 : 0); -//% [_values[idx] release]; -//% _values[idx] = [object retain]; -//% if (_autocreator) { -//% GPBAutocreatedDictionaryModified(_autocreator, self); -//% } -//%} -//% -//%- (void)removeObjectForKey:(BOOL)aKey { -//% int idx = (aKey ? 1 : 0); -//% [_values[idx] release]; -//% _values[idx] = nil; -//%} -//% -//%- (void)removeAll { -//% for (int i = 0; i < 2; ++i) { -//% [_values[i] release]; -//% _values[i] = nil; -//% } -//%} -//%PDDM-DEFINE STR_FORMAT_OBJECT(VALUE_NAME) -//%%@ - - -//%PDDM-EXPAND DICTIONARY_IMPL_FOR_POD_KEY(UInt32, uint32_t) -// This block of code is generated, do not edit it directly. - -#pragma mark - UInt32 -> UInt32 - -@implementation GPBUInt32UInt32Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(uint32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32UInt32Dictionary*)[self alloc] initWithUInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32UInt32Dictionary*)[self alloc] initWithUInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt32UInt32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt32UInt32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt32UInt32Dictionary *)dictionary { - self = [self initWithUInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt32UInt32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt32UInt32Dictionary class]]) { - return NO; - } - GPBUInt32UInt32Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(uint32_t key, uint32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedIntValue], [aValue unsignedIntValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt32FieldSize([aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt32FieldSize([aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt32Field(outputStream, [aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - WriteDictUInt32Field(outputStream, [aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueUInt32) forKey:@(key->valueUInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndUInt32sUsingBlock:^(uint32_t key, uint32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%u", key], [NSString stringWithFormat:@"%u", value]); - }]; -} - -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(uint32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped unsignedIntValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt32UInt32Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt32:(uint32_t)value forKey:(uint32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt32ForKey:(uint32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt32 -> Int32 - -@implementation GPBUInt32Int32Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(uint32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32Int32Dictionary*)[self alloc] initWithInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32Int32Dictionary*)[self alloc] initWithInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt32Int32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt32Int32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt32Int32Dictionary *)dictionary { - self = [self initWithInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt32Int32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt32Int32Dictionary class]]) { - return NO; - } - GPBUInt32Int32Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(uint32_t key, int32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedIntValue], [aValue intValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt32FieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt32FieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt32Field(outputStream, [aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - WriteDictInt32Field(outputStream, [aValue intValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueInt32) forKey:@(key->valueUInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndInt32sUsingBlock:^(uint32_t key, int32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%u", key], [NSString stringWithFormat:@"%d", value]); - }]; -} - -- (BOOL)getInt32:(nullable int32_t *)value forKey:(uint32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped intValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt32Int32Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt32:(int32_t)value forKey:(uint32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt32ForKey:(uint32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt32 -> UInt64 - -@implementation GPBUInt32UInt64Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(uint32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32UInt64Dictionary*)[self alloc] initWithUInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32UInt64Dictionary*)[self alloc] initWithUInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt32UInt64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt32UInt64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt32UInt64Dictionary *)dictionary { - self = [self initWithUInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt32UInt64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt32UInt64Dictionary class]]) { - return NO; - } - GPBUInt32UInt64Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(uint32_t key, uint64_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedIntValue], [aValue unsignedLongLongValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt64FieldSize([aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt64FieldSize([aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt32Field(outputStream, [aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - WriteDictUInt64Field(outputStream, [aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueUInt64) forKey:@(key->valueUInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndUInt64sUsingBlock:^(uint32_t key, uint64_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%u", key], [NSString stringWithFormat:@"%llu", value]); - }]; -} - -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(uint32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped unsignedLongLongValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt32UInt64Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt64:(uint64_t)value forKey:(uint32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt64ForKey:(uint32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt32 -> Int64 - -@implementation GPBUInt32Int64Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(uint32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32Int64Dictionary*)[self alloc] initWithInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32Int64Dictionary*)[self alloc] initWithInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt32Int64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt32Int64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt32Int64Dictionary *)dictionary { - self = [self initWithInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt32Int64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt32Int64Dictionary class]]) { - return NO; - } - GPBUInt32Int64Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(uint32_t key, int64_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedIntValue], [aValue longLongValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt64FieldSize([aValue longLongValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt64FieldSize([aValue longLongValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt32Field(outputStream, [aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - WriteDictInt64Field(outputStream, [aValue longLongValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueInt64) forKey:@(key->valueUInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndInt64sUsingBlock:^(uint32_t key, int64_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%u", key], [NSString stringWithFormat:@"%lld", value]); - }]; -} - -- (BOOL)getInt64:(nullable int64_t *)value forKey:(uint32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped longLongValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt32Int64Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt64:(int64_t)value forKey:(uint32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt64ForKey:(uint32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt32 -> Bool - -@implementation GPBUInt32BoolDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithBools:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(uint32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32BoolDictionary*)[self alloc] initWithBools:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32BoolDictionary*)[self alloc] initWithBools:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt32BoolDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt32BoolDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt32BoolDictionary *)dictionary { - self = [self initWithBools:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt32BoolDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt32BoolDictionary class]]) { - return NO; - } - GPBUInt32BoolDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(uint32_t key, BOOL value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedIntValue], [aValue boolValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictBoolFieldSize([aValue boolValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictBoolFieldSize([aValue boolValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt32Field(outputStream, [aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - WriteDictBoolField(outputStream, [aValue boolValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueBool) forKey:@(key->valueUInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndBoolsUsingBlock:^(uint32_t key, BOOL value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%u", key], (value ? @"true" : @"false")); - }]; -} - -- (BOOL)getBool:(nullable BOOL *)value forKey:(uint32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped boolValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt32BoolDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setBool:(BOOL)value forKey:(uint32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeBoolForKey:(uint32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt32 -> Float - -@implementation GPBUInt32FloatDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithFloats:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(uint32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32FloatDictionary*)[self alloc] initWithFloats:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32FloatDictionary*)[self alloc] initWithFloats:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt32FloatDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt32FloatDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithFloats:(const float [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt32FloatDictionary *)dictionary { - self = [self initWithFloats:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt32FloatDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt32FloatDictionary class]]) { - return NO; - } - GPBUInt32FloatDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(uint32_t key, float value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedIntValue], [aValue floatValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictFloatFieldSize([aValue floatValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictFloatFieldSize([aValue floatValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt32Field(outputStream, [aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - WriteDictFloatField(outputStream, [aValue floatValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueFloat) forKey:@(key->valueUInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndFloatsUsingBlock:^(uint32_t key, float value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%u", key], [NSString stringWithFormat:@"%.*g", FLT_DIG, value]); - }]; -} - -- (BOOL)getFloat:(nullable float *)value forKey:(uint32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped floatValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt32FloatDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setFloat:(float)value forKey:(uint32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeFloatForKey:(uint32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt32 -> Double - -@implementation GPBUInt32DoubleDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithDoubles:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(uint32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32DoubleDictionary*)[self alloc] initWithDoubles:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32DoubleDictionary*)[self alloc] initWithDoubles:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt32DoubleDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt32DoubleDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt32DoubleDictionary *)dictionary { - self = [self initWithDoubles:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt32DoubleDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt32DoubleDictionary class]]) { - return NO; - } - GPBUInt32DoubleDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(uint32_t key, double value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedIntValue], [aValue doubleValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictDoubleFieldSize([aValue doubleValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictDoubleFieldSize([aValue doubleValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt32Field(outputStream, [aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - WriteDictDoubleField(outputStream, [aValue doubleValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueDouble) forKey:@(key->valueUInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndDoublesUsingBlock:^(uint32_t key, double value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%u", key], [NSString stringWithFormat:@"%.*lg", DBL_DIG, value]); - }]; -} - -- (BOOL)getDouble:(nullable double *)value forKey:(uint32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped doubleValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt32DoubleDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setDouble:(double)value forKey:(uint32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeDoubleForKey:(uint32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt32 -> Enum - -@implementation GPBUInt32EnumDictionary { - @package - NSMutableDictionary *_dictionary; - GPBEnumValidationFunc _validationFunc; -} - -@synthesize validationFunc = _validationFunc; - -+ (instancetype)dictionary { - return [[[self alloc] initWithValidationFunction:NULL - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func { - return [[[self alloc] initWithValidationFunction:func - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(uint32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32EnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:&rawValue - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])rawValues - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32EnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:rawValues - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt32EnumDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32EnumDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { - return [[[self alloc] initWithValidationFunction:func capacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithValidationFunction:NULL rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func { - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])rawValues - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - _validationFunc = (func != NULL ? func : DictDefault_IsValidValue); - if (count && rawValues && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(rawValues[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt32EnumDictionary *)dictionary { - self = [self initWithValidationFunction:dictionary.validationFunc - rawValues:NULL - forKeys:NULL - count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt32EnumDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt32EnumDictionary class]]) { - return NO; - } - GPBUInt32EnumDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(uint32_t key, int32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedIntValue], [aValue intValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt32Field(outputStream, [aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - WriteDictEnumField(outputStream, [aValue intValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType { - size_t msgSize = ComputeDictUInt32FieldSize(key->valueUInt32, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize(value, kMapValueFieldNumber, GPBDataTypeEnum); - NSMutableData *data = [NSMutableData dataWithLength:msgSize]; - GPBCodedOutputStream *outputStream = [[GPBCodedOutputStream alloc] initWithData:data]; - WriteDictUInt32Field(outputStream, key->valueUInt32, kMapKeyFieldNumber, keyDataType); - WriteDictEnumField(outputStream, value, kMapValueFieldNumber, GPBDataTypeEnum); - [outputStream release]; - return data; -} -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueEnum) forKey:@(key->valueUInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndRawValuesUsingBlock:^(uint32_t key, int32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%u", key], @(value)); - }]; -} - -- (BOOL)getEnum:(int32_t *)value forKey:(uint32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - int32_t result = [wrapped intValue]; - if (!_validationFunc(result)) { - result = kGPBUnrecognizedEnumeratorValue; - } - *value = result; - } - return (wrapped != NULL); -} - -- (BOOL)getRawValue:(int32_t *)rawValue forKey:(uint32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && rawValue) { - *rawValue = [wrapped intValue]; - } - return (wrapped != NULL); -} - -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(uint32_t key, int32_t value, BOOL *stop))block { - GPBEnumValidationFunc func = _validationFunc; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - int32_t unwrapped = [aValue intValue]; - if (!func(unwrapped)) { - unwrapped = kGPBUnrecognizedEnumeratorValue; - } - block([aKey unsignedIntValue], unwrapped, stop); - }]; -} - -- (void)addRawEntriesFromDictionary:(GPBUInt32EnumDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setRawValue:(int32_t)value forKey:(uint32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeEnumForKey:(uint32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -- (void)setEnum:(int32_t)value forKey:(uint32_t)key { - if (!_validationFunc(value)) { - [NSException raise:NSInvalidArgumentException - format:@"GPBUInt32EnumDictionary: Attempt to set an unknown enum value (%d)", - value]; - } - - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -@end - -#pragma mark - UInt32 -> Object - -@implementation GPBUInt32ObjectDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithObjects:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithObject:(id)object - forKey:(uint32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithObjects:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32ObjectDictionary*)[self alloc] initWithObjects:&object - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithObjects:(const id [])objects - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithObjects:forKeys:count: - // on to get the type correct. - return [[(GPBUInt32ObjectDictionary*)[self alloc] initWithObjects:objects - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt32ObjectDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt32ObjectDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithObjects:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithObjects:(const id [])objects - forKeys:(const uint32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && objects && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!objects[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil object to a Dictionary"]; - } - [_dictionary setObject:objects[i] forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt32ObjectDictionary *)dictionary { - self = [self initWithObjects:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithObjects:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt32ObjectDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt32ObjectDictionary class]]) { - return NO; - } - GPBUInt32ObjectDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(uint32_t key, id object, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - block([aKey unsignedIntValue], aObject, stop); - }]; -} - -- (BOOL)isInitialized { - for (GPBMessage *msg in [_dictionary objectEnumerator]) { - if (!msg.initialized) { - return NO; - } - } - return YES; -} - -- (instancetype)deepCopyWithZone:(NSZone *)zone { - GPBUInt32ObjectDictionary *newDict = - [[GPBUInt32ObjectDictionary alloc] init]; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(id aKey, - GPBMessage *msg, - BOOL *stop) { - #pragma unused(stop) - GPBMessage *copiedMsg = [msg copyWithZone:zone]; - [newDict->_dictionary setObject:copiedMsg forKey:aKey]; - [copiedMsg release]; - }]; - return newDict; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictObjectFieldSize(aObject, kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt32FieldSize([aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictObjectFieldSize(aObject, kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt32Field(outputStream, [aKey unsignedIntValue], kMapKeyFieldNumber, keyDataType); - WriteDictObjectField(outputStream, aObject, kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:value->valueString forKey:@(key->valueUInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndObjectsUsingBlock:^(uint32_t key, id object, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%u", key], object); - }]; -} - -- (id)objectForKey:(uint32_t)key { - id result = [_dictionary objectForKey:@(key)]; - return result; -} - -- (void)addEntriesFromDictionary:(GPBUInt32ObjectDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setObject:(id)object forKey:(uint32_t)key { - if (!object) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil object to a Dictionary"]; - } - [_dictionary setObject:object forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeObjectForKey:(uint32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -//%PDDM-EXPAND DICTIONARY_IMPL_FOR_POD_KEY(Int32, int32_t) -// This block of code is generated, do not edit it directly. - -#pragma mark - Int32 -> UInt32 - -@implementation GPBInt32UInt32Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(int32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBInt32UInt32Dictionary*)[self alloc] initWithUInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBInt32UInt32Dictionary*)[self alloc] initWithUInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt32UInt32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt32UInt32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt32UInt32Dictionary *)dictionary { - self = [self initWithUInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt32UInt32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt32UInt32Dictionary class]]) { - return NO; - } - GPBInt32UInt32Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(int32_t key, uint32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey intValue], [aValue unsignedIntValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt32FieldSize([aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt32FieldSize([aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt32Field(outputStream, [aKey intValue], kMapKeyFieldNumber, keyDataType); - WriteDictUInt32Field(outputStream, [aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueUInt32) forKey:@(key->valueInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndUInt32sUsingBlock:^(int32_t key, uint32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%d", key], [NSString stringWithFormat:@"%u", value]); - }]; -} - -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(int32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped unsignedIntValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt32UInt32Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt32:(uint32_t)value forKey:(int32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt32ForKey:(int32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int32 -> Int32 - -@implementation GPBInt32Int32Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(int32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBInt32Int32Dictionary*)[self alloc] initWithInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBInt32Int32Dictionary*)[self alloc] initWithInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt32Int32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt32Int32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt32Int32Dictionary *)dictionary { - self = [self initWithInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt32Int32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt32Int32Dictionary class]]) { - return NO; - } - GPBInt32Int32Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(int32_t key, int32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey intValue], [aValue intValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt32FieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt32FieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt32Field(outputStream, [aKey intValue], kMapKeyFieldNumber, keyDataType); - WriteDictInt32Field(outputStream, [aValue intValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueInt32) forKey:@(key->valueInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndInt32sUsingBlock:^(int32_t key, int32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%d", key], [NSString stringWithFormat:@"%d", value]); - }]; -} - -- (BOOL)getInt32:(nullable int32_t *)value forKey:(int32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped intValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt32Int32Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt32:(int32_t)value forKey:(int32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt32ForKey:(int32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int32 -> UInt64 - -@implementation GPBInt32UInt64Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(int32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBInt32UInt64Dictionary*)[self alloc] initWithUInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBInt32UInt64Dictionary*)[self alloc] initWithUInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt32UInt64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt32UInt64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt32UInt64Dictionary *)dictionary { - self = [self initWithUInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt32UInt64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt32UInt64Dictionary class]]) { - return NO; - } - GPBInt32UInt64Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(int32_t key, uint64_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey intValue], [aValue unsignedLongLongValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt64FieldSize([aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt64FieldSize([aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt32Field(outputStream, [aKey intValue], kMapKeyFieldNumber, keyDataType); - WriteDictUInt64Field(outputStream, [aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueUInt64) forKey:@(key->valueInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndUInt64sUsingBlock:^(int32_t key, uint64_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%d", key], [NSString stringWithFormat:@"%llu", value]); - }]; -} - -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(int32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped unsignedLongLongValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt32UInt64Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt64:(uint64_t)value forKey:(int32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt64ForKey:(int32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int32 -> Int64 - -@implementation GPBInt32Int64Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(int32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBInt32Int64Dictionary*)[self alloc] initWithInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBInt32Int64Dictionary*)[self alloc] initWithInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt32Int64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt32Int64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt32Int64Dictionary *)dictionary { - self = [self initWithInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt32Int64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt32Int64Dictionary class]]) { - return NO; - } - GPBInt32Int64Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(int32_t key, int64_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey intValue], [aValue longLongValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt64FieldSize([aValue longLongValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt64FieldSize([aValue longLongValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt32Field(outputStream, [aKey intValue], kMapKeyFieldNumber, keyDataType); - WriteDictInt64Field(outputStream, [aValue longLongValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueInt64) forKey:@(key->valueInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndInt64sUsingBlock:^(int32_t key, int64_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%d", key], [NSString stringWithFormat:@"%lld", value]); - }]; -} - -- (BOOL)getInt64:(nullable int64_t *)value forKey:(int32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped longLongValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt32Int64Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt64:(int64_t)value forKey:(int32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt64ForKey:(int32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int32 -> Bool - -@implementation GPBInt32BoolDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithBools:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(int32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBInt32BoolDictionary*)[self alloc] initWithBools:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBInt32BoolDictionary*)[self alloc] initWithBools:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt32BoolDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt32BoolDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt32BoolDictionary *)dictionary { - self = [self initWithBools:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt32BoolDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt32BoolDictionary class]]) { - return NO; - } - GPBInt32BoolDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(int32_t key, BOOL value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey intValue], [aValue boolValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictBoolFieldSize([aValue boolValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictBoolFieldSize([aValue boolValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt32Field(outputStream, [aKey intValue], kMapKeyFieldNumber, keyDataType); - WriteDictBoolField(outputStream, [aValue boolValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueBool) forKey:@(key->valueInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndBoolsUsingBlock:^(int32_t key, BOOL value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%d", key], (value ? @"true" : @"false")); - }]; -} - -- (BOOL)getBool:(nullable BOOL *)value forKey:(int32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped boolValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt32BoolDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setBool:(BOOL)value forKey:(int32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeBoolForKey:(int32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int32 -> Float - -@implementation GPBInt32FloatDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithFloats:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(int32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBInt32FloatDictionary*)[self alloc] initWithFloats:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBInt32FloatDictionary*)[self alloc] initWithFloats:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt32FloatDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt32FloatDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithFloats:(const float [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt32FloatDictionary *)dictionary { - self = [self initWithFloats:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt32FloatDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt32FloatDictionary class]]) { - return NO; - } - GPBInt32FloatDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(int32_t key, float value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey intValue], [aValue floatValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictFloatFieldSize([aValue floatValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictFloatFieldSize([aValue floatValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt32Field(outputStream, [aKey intValue], kMapKeyFieldNumber, keyDataType); - WriteDictFloatField(outputStream, [aValue floatValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueFloat) forKey:@(key->valueInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndFloatsUsingBlock:^(int32_t key, float value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%d", key], [NSString stringWithFormat:@"%.*g", FLT_DIG, value]); - }]; -} - -- (BOOL)getFloat:(nullable float *)value forKey:(int32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped floatValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt32FloatDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setFloat:(float)value forKey:(int32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeFloatForKey:(int32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int32 -> Double - -@implementation GPBInt32DoubleDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithDoubles:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(int32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBInt32DoubleDictionary*)[self alloc] initWithDoubles:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBInt32DoubleDictionary*)[self alloc] initWithDoubles:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt32DoubleDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt32DoubleDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt32DoubleDictionary *)dictionary { - self = [self initWithDoubles:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt32DoubleDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt32DoubleDictionary class]]) { - return NO; - } - GPBInt32DoubleDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(int32_t key, double value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey intValue], [aValue doubleValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictDoubleFieldSize([aValue doubleValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictDoubleFieldSize([aValue doubleValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt32Field(outputStream, [aKey intValue], kMapKeyFieldNumber, keyDataType); - WriteDictDoubleField(outputStream, [aValue doubleValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueDouble) forKey:@(key->valueInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndDoublesUsingBlock:^(int32_t key, double value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%d", key], [NSString stringWithFormat:@"%.*lg", DBL_DIG, value]); - }]; -} - -- (BOOL)getDouble:(nullable double *)value forKey:(int32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped doubleValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt32DoubleDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setDouble:(double)value forKey:(int32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeDoubleForKey:(int32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int32 -> Enum - -@implementation GPBInt32EnumDictionary { - @package - NSMutableDictionary *_dictionary; - GPBEnumValidationFunc _validationFunc; -} - -@synthesize validationFunc = _validationFunc; - -+ (instancetype)dictionary { - return [[[self alloc] initWithValidationFunction:NULL - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func { - return [[[self alloc] initWithValidationFunction:func - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(int32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBInt32EnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:&rawValue - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])rawValues - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBInt32EnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:rawValues - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt32EnumDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBInt32EnumDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { - return [[[self alloc] initWithValidationFunction:func capacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithValidationFunction:NULL rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func { - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])rawValues - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - _validationFunc = (func != NULL ? func : DictDefault_IsValidValue); - if (count && rawValues && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(rawValues[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt32EnumDictionary *)dictionary { - self = [self initWithValidationFunction:dictionary.validationFunc - rawValues:NULL - forKeys:NULL - count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt32EnumDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt32EnumDictionary class]]) { - return NO; - } - GPBInt32EnumDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(int32_t key, int32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey intValue], [aValue intValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt32Field(outputStream, [aKey intValue], kMapKeyFieldNumber, keyDataType); - WriteDictEnumField(outputStream, [aValue intValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType { - size_t msgSize = ComputeDictInt32FieldSize(key->valueInt32, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize(value, kMapValueFieldNumber, GPBDataTypeEnum); - NSMutableData *data = [NSMutableData dataWithLength:msgSize]; - GPBCodedOutputStream *outputStream = [[GPBCodedOutputStream alloc] initWithData:data]; - WriteDictInt32Field(outputStream, key->valueInt32, kMapKeyFieldNumber, keyDataType); - WriteDictEnumField(outputStream, value, kMapValueFieldNumber, GPBDataTypeEnum); - [outputStream release]; - return data; -} -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueEnum) forKey:@(key->valueInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndRawValuesUsingBlock:^(int32_t key, int32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%d", key], @(value)); - }]; -} - -- (BOOL)getEnum:(int32_t *)value forKey:(int32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - int32_t result = [wrapped intValue]; - if (!_validationFunc(result)) { - result = kGPBUnrecognizedEnumeratorValue; - } - *value = result; - } - return (wrapped != NULL); -} - -- (BOOL)getRawValue:(int32_t *)rawValue forKey:(int32_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && rawValue) { - *rawValue = [wrapped intValue]; - } - return (wrapped != NULL); -} - -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(int32_t key, int32_t value, BOOL *stop))block { - GPBEnumValidationFunc func = _validationFunc; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - int32_t unwrapped = [aValue intValue]; - if (!func(unwrapped)) { - unwrapped = kGPBUnrecognizedEnumeratorValue; - } - block([aKey intValue], unwrapped, stop); - }]; -} - -- (void)addRawEntriesFromDictionary:(GPBInt32EnumDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setRawValue:(int32_t)value forKey:(int32_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeEnumForKey:(int32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -- (void)setEnum:(int32_t)value forKey:(int32_t)key { - if (!_validationFunc(value)) { - [NSException raise:NSInvalidArgumentException - format:@"GPBInt32EnumDictionary: Attempt to set an unknown enum value (%d)", - value]; - } - - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -@end - -#pragma mark - Int32 -> Object - -@implementation GPBInt32ObjectDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithObjects:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithObject:(id)object - forKey:(int32_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithObjects:forKeys:count: - // on to get the type correct. - return [[(GPBInt32ObjectDictionary*)[self alloc] initWithObjects:&object - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithObjects:(const id [])objects - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithObjects:forKeys:count: - // on to get the type correct. - return [[(GPBInt32ObjectDictionary*)[self alloc] initWithObjects:objects - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt32ObjectDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt32ObjectDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithObjects:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithObjects:(const id [])objects - forKeys:(const int32_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && objects && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!objects[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil object to a Dictionary"]; - } - [_dictionary setObject:objects[i] forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt32ObjectDictionary *)dictionary { - self = [self initWithObjects:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithObjects:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt32ObjectDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt32ObjectDictionary class]]) { - return NO; - } - GPBInt32ObjectDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(int32_t key, id object, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - block([aKey intValue], aObject, stop); - }]; -} - -- (BOOL)isInitialized { - for (GPBMessage *msg in [_dictionary objectEnumerator]) { - if (!msg.initialized) { - return NO; - } - } - return YES; -} - -- (instancetype)deepCopyWithZone:(NSZone *)zone { - GPBInt32ObjectDictionary *newDict = - [[GPBInt32ObjectDictionary alloc] init]; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(id aKey, - GPBMessage *msg, - BOOL *stop) { - #pragma unused(stop) - GPBMessage *copiedMsg = [msg copyWithZone:zone]; - [newDict->_dictionary setObject:copiedMsg forKey:aKey]; - [copiedMsg release]; - }]; - return newDict; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictObjectFieldSize(aObject, kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt32FieldSize([aKey intValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictObjectFieldSize(aObject, kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt32Field(outputStream, [aKey intValue], kMapKeyFieldNumber, keyDataType); - WriteDictObjectField(outputStream, aObject, kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:value->valueString forKey:@(key->valueInt32)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndObjectsUsingBlock:^(int32_t key, id object, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%d", key], object); - }]; -} - -- (id)objectForKey:(int32_t)key { - id result = [_dictionary objectForKey:@(key)]; - return result; -} - -- (void)addEntriesFromDictionary:(GPBInt32ObjectDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setObject:(id)object forKey:(int32_t)key { - if (!object) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil object to a Dictionary"]; - } - [_dictionary setObject:object forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeObjectForKey:(int32_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -//%PDDM-EXPAND DICTIONARY_IMPL_FOR_POD_KEY(UInt64, uint64_t) -// This block of code is generated, do not edit it directly. - -#pragma mark - UInt64 -> UInt32 - -@implementation GPBUInt64UInt32Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(uint64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64UInt32Dictionary*)[self alloc] initWithUInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64UInt32Dictionary*)[self alloc] initWithUInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt64UInt32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt64UInt32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt64UInt32Dictionary *)dictionary { - self = [self initWithUInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt64UInt32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt64UInt32Dictionary class]]) { - return NO; - } - GPBUInt64UInt32Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(uint64_t key, uint32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedLongLongValue], [aValue unsignedIntValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt32FieldSize([aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt32FieldSize([aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt64Field(outputStream, [aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictUInt32Field(outputStream, [aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueUInt32) forKey:@(key->valueUInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndUInt32sUsingBlock:^(uint64_t key, uint32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%llu", key], [NSString stringWithFormat:@"%u", value]); - }]; -} - -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(uint64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped unsignedIntValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt64UInt32Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt32:(uint32_t)value forKey:(uint64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt32ForKey:(uint64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt64 -> Int32 - -@implementation GPBUInt64Int32Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(uint64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64Int32Dictionary*)[self alloc] initWithInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64Int32Dictionary*)[self alloc] initWithInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt64Int32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt64Int32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt64Int32Dictionary *)dictionary { - self = [self initWithInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt64Int32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt64Int32Dictionary class]]) { - return NO; - } - GPBUInt64Int32Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(uint64_t key, int32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedLongLongValue], [aValue intValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt32FieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt32FieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt64Field(outputStream, [aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictInt32Field(outputStream, [aValue intValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueInt32) forKey:@(key->valueUInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndInt32sUsingBlock:^(uint64_t key, int32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%llu", key], [NSString stringWithFormat:@"%d", value]); - }]; -} - -- (BOOL)getInt32:(nullable int32_t *)value forKey:(uint64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped intValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt64Int32Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt32:(int32_t)value forKey:(uint64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt32ForKey:(uint64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt64 -> UInt64 - -@implementation GPBUInt64UInt64Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(uint64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64UInt64Dictionary*)[self alloc] initWithUInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64UInt64Dictionary*)[self alloc] initWithUInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt64UInt64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt64UInt64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt64UInt64Dictionary *)dictionary { - self = [self initWithUInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt64UInt64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt64UInt64Dictionary class]]) { - return NO; - } - GPBUInt64UInt64Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(uint64_t key, uint64_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedLongLongValue], [aValue unsignedLongLongValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt64FieldSize([aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt64FieldSize([aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt64Field(outputStream, [aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictUInt64Field(outputStream, [aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueUInt64) forKey:@(key->valueUInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndUInt64sUsingBlock:^(uint64_t key, uint64_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%llu", key], [NSString stringWithFormat:@"%llu", value]); - }]; -} - -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(uint64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped unsignedLongLongValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt64UInt64Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt64:(uint64_t)value forKey:(uint64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt64ForKey:(uint64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt64 -> Int64 - -@implementation GPBUInt64Int64Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(uint64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64Int64Dictionary*)[self alloc] initWithInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64Int64Dictionary*)[self alloc] initWithInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt64Int64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt64Int64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt64Int64Dictionary *)dictionary { - self = [self initWithInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt64Int64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt64Int64Dictionary class]]) { - return NO; - } - GPBUInt64Int64Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(uint64_t key, int64_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedLongLongValue], [aValue longLongValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt64FieldSize([aValue longLongValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt64FieldSize([aValue longLongValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt64Field(outputStream, [aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictInt64Field(outputStream, [aValue longLongValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueInt64) forKey:@(key->valueUInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndInt64sUsingBlock:^(uint64_t key, int64_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%llu", key], [NSString stringWithFormat:@"%lld", value]); - }]; -} - -- (BOOL)getInt64:(nullable int64_t *)value forKey:(uint64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped longLongValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt64Int64Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt64:(int64_t)value forKey:(uint64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt64ForKey:(uint64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt64 -> Bool - -@implementation GPBUInt64BoolDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithBools:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(uint64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64BoolDictionary*)[self alloc] initWithBools:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64BoolDictionary*)[self alloc] initWithBools:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt64BoolDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt64BoolDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt64BoolDictionary *)dictionary { - self = [self initWithBools:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt64BoolDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt64BoolDictionary class]]) { - return NO; - } - GPBUInt64BoolDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(uint64_t key, BOOL value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedLongLongValue], [aValue boolValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictBoolFieldSize([aValue boolValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictBoolFieldSize([aValue boolValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt64Field(outputStream, [aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictBoolField(outputStream, [aValue boolValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueBool) forKey:@(key->valueUInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndBoolsUsingBlock:^(uint64_t key, BOOL value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%llu", key], (value ? @"true" : @"false")); - }]; -} - -- (BOOL)getBool:(nullable BOOL *)value forKey:(uint64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped boolValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt64BoolDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setBool:(BOOL)value forKey:(uint64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeBoolForKey:(uint64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt64 -> Float - -@implementation GPBUInt64FloatDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithFloats:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(uint64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64FloatDictionary*)[self alloc] initWithFloats:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64FloatDictionary*)[self alloc] initWithFloats:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt64FloatDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt64FloatDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithFloats:(const float [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt64FloatDictionary *)dictionary { - self = [self initWithFloats:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt64FloatDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt64FloatDictionary class]]) { - return NO; - } - GPBUInt64FloatDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(uint64_t key, float value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedLongLongValue], [aValue floatValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictFloatFieldSize([aValue floatValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictFloatFieldSize([aValue floatValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt64Field(outputStream, [aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictFloatField(outputStream, [aValue floatValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueFloat) forKey:@(key->valueUInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndFloatsUsingBlock:^(uint64_t key, float value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%llu", key], [NSString stringWithFormat:@"%.*g", FLT_DIG, value]); - }]; -} - -- (BOOL)getFloat:(nullable float *)value forKey:(uint64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped floatValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt64FloatDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setFloat:(float)value forKey:(uint64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeFloatForKey:(uint64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt64 -> Double - -@implementation GPBUInt64DoubleDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithDoubles:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(uint64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64DoubleDictionary*)[self alloc] initWithDoubles:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64DoubleDictionary*)[self alloc] initWithDoubles:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt64DoubleDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt64DoubleDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt64DoubleDictionary *)dictionary { - self = [self initWithDoubles:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt64DoubleDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt64DoubleDictionary class]]) { - return NO; - } - GPBUInt64DoubleDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(uint64_t key, double value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedLongLongValue], [aValue doubleValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictDoubleFieldSize([aValue doubleValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictDoubleFieldSize([aValue doubleValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt64Field(outputStream, [aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictDoubleField(outputStream, [aValue doubleValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueDouble) forKey:@(key->valueUInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndDoublesUsingBlock:^(uint64_t key, double value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%llu", key], [NSString stringWithFormat:@"%.*lg", DBL_DIG, value]); - }]; -} - -- (BOOL)getDouble:(nullable double *)value forKey:(uint64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped doubleValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBUInt64DoubleDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setDouble:(double)value forKey:(uint64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeDoubleForKey:(uint64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - UInt64 -> Enum - -@implementation GPBUInt64EnumDictionary { - @package - NSMutableDictionary *_dictionary; - GPBEnumValidationFunc _validationFunc; -} - -@synthesize validationFunc = _validationFunc; - -+ (instancetype)dictionary { - return [[[self alloc] initWithValidationFunction:NULL - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func { - return [[[self alloc] initWithValidationFunction:func - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(uint64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64EnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:&rawValue - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])rawValues - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64EnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:rawValues - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt64EnumDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64EnumDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { - return [[[self alloc] initWithValidationFunction:func capacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithValidationFunction:NULL rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func { - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])rawValues - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - _validationFunc = (func != NULL ? func : DictDefault_IsValidValue); - if (count && rawValues && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(rawValues[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt64EnumDictionary *)dictionary { - self = [self initWithValidationFunction:dictionary.validationFunc - rawValues:NULL - forKeys:NULL - count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt64EnumDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt64EnumDictionary class]]) { - return NO; - } - GPBUInt64EnumDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(uint64_t key, int32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey unsignedLongLongValue], [aValue intValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt64Field(outputStream, [aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictEnumField(outputStream, [aValue intValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType { - size_t msgSize = ComputeDictUInt64FieldSize(key->valueUInt64, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize(value, kMapValueFieldNumber, GPBDataTypeEnum); - NSMutableData *data = [NSMutableData dataWithLength:msgSize]; - GPBCodedOutputStream *outputStream = [[GPBCodedOutputStream alloc] initWithData:data]; - WriteDictUInt64Field(outputStream, key->valueUInt64, kMapKeyFieldNumber, keyDataType); - WriteDictEnumField(outputStream, value, kMapValueFieldNumber, GPBDataTypeEnum); - [outputStream release]; - return data; -} -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueEnum) forKey:@(key->valueUInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndRawValuesUsingBlock:^(uint64_t key, int32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%llu", key], @(value)); - }]; -} - -- (BOOL)getEnum:(int32_t *)value forKey:(uint64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - int32_t result = [wrapped intValue]; - if (!_validationFunc(result)) { - result = kGPBUnrecognizedEnumeratorValue; - } - *value = result; - } - return (wrapped != NULL); -} - -- (BOOL)getRawValue:(int32_t *)rawValue forKey:(uint64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && rawValue) { - *rawValue = [wrapped intValue]; - } - return (wrapped != NULL); -} - -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(uint64_t key, int32_t value, BOOL *stop))block { - GPBEnumValidationFunc func = _validationFunc; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - int32_t unwrapped = [aValue intValue]; - if (!func(unwrapped)) { - unwrapped = kGPBUnrecognizedEnumeratorValue; - } - block([aKey unsignedLongLongValue], unwrapped, stop); - }]; -} - -- (void)addRawEntriesFromDictionary:(GPBUInt64EnumDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setRawValue:(int32_t)value forKey:(uint64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeEnumForKey:(uint64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -- (void)setEnum:(int32_t)value forKey:(uint64_t)key { - if (!_validationFunc(value)) { - [NSException raise:NSInvalidArgumentException - format:@"GPBUInt64EnumDictionary: Attempt to set an unknown enum value (%d)", - value]; - } - - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -@end - -#pragma mark - UInt64 -> Object - -@implementation GPBUInt64ObjectDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithObjects:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithObject:(id)object - forKey:(uint64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithObjects:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64ObjectDictionary*)[self alloc] initWithObjects:&object - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithObjects:(const id [])objects - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithObjects:forKeys:count: - // on to get the type correct. - return [[(GPBUInt64ObjectDictionary*)[self alloc] initWithObjects:objects - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBUInt64ObjectDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBUInt64ObjectDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithObjects:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithObjects:(const id [])objects - forKeys:(const uint64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && objects && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!objects[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil object to a Dictionary"]; - } - [_dictionary setObject:objects[i] forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBUInt64ObjectDictionary *)dictionary { - self = [self initWithObjects:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithObjects:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBUInt64ObjectDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBUInt64ObjectDictionary class]]) { - return NO; - } - GPBUInt64ObjectDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(uint64_t key, id object, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - block([aKey unsignedLongLongValue], aObject, stop); - }]; -} - -- (BOOL)isInitialized { - for (GPBMessage *msg in [_dictionary objectEnumerator]) { - if (!msg.initialized) { - return NO; - } - } - return YES; -} - -- (instancetype)deepCopyWithZone:(NSZone *)zone { - GPBUInt64ObjectDictionary *newDict = - [[GPBUInt64ObjectDictionary alloc] init]; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(id aKey, - GPBMessage *msg, - BOOL *stop) { - #pragma unused(stop) - GPBMessage *copiedMsg = [msg copyWithZone:zone]; - [newDict->_dictionary setObject:copiedMsg forKey:aKey]; - [copiedMsg release]; - }]; - return newDict; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictObjectFieldSize(aObject, kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictUInt64FieldSize([aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictObjectFieldSize(aObject, kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictUInt64Field(outputStream, [aKey unsignedLongLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictObjectField(outputStream, aObject, kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:value->valueString forKey:@(key->valueUInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndObjectsUsingBlock:^(uint64_t key, id object, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%llu", key], object); - }]; -} - -- (id)objectForKey:(uint64_t)key { - id result = [_dictionary objectForKey:@(key)]; - return result; -} - -- (void)addEntriesFromDictionary:(GPBUInt64ObjectDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setObject:(id)object forKey:(uint64_t)key { - if (!object) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil object to a Dictionary"]; - } - [_dictionary setObject:object forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeObjectForKey:(uint64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -//%PDDM-EXPAND DICTIONARY_IMPL_FOR_POD_KEY(Int64, int64_t) -// This block of code is generated, do not edit it directly. - -#pragma mark - Int64 -> UInt32 - -@implementation GPBInt64UInt32Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(int64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBInt64UInt32Dictionary*)[self alloc] initWithUInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBInt64UInt32Dictionary*)[self alloc] initWithUInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt64UInt32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt64UInt32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt64UInt32Dictionary *)dictionary { - self = [self initWithUInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt64UInt32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt64UInt32Dictionary class]]) { - return NO; - } - GPBInt64UInt32Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(int64_t key, uint32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey longLongValue], [aValue unsignedIntValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt32FieldSize([aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt32FieldSize([aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt64Field(outputStream, [aKey longLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictUInt32Field(outputStream, [aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueUInt32) forKey:@(key->valueInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndUInt32sUsingBlock:^(int64_t key, uint32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%lld", key], [NSString stringWithFormat:@"%u", value]); - }]; -} - -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(int64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped unsignedIntValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt64UInt32Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt32:(uint32_t)value forKey:(int64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt32ForKey:(int64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int64 -> Int32 - -@implementation GPBInt64Int32Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(int64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBInt64Int32Dictionary*)[self alloc] initWithInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBInt64Int32Dictionary*)[self alloc] initWithInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt64Int32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt64Int32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt64Int32Dictionary *)dictionary { - self = [self initWithInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt64Int32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt64Int32Dictionary class]]) { - return NO; - } - GPBInt64Int32Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(int64_t key, int32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey longLongValue], [aValue intValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt32FieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt32FieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt64Field(outputStream, [aKey longLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictInt32Field(outputStream, [aValue intValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueInt32) forKey:@(key->valueInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndInt32sUsingBlock:^(int64_t key, int32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%lld", key], [NSString stringWithFormat:@"%d", value]); - }]; -} - -- (BOOL)getInt32:(nullable int32_t *)value forKey:(int64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped intValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt64Int32Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt32:(int32_t)value forKey:(int64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt32ForKey:(int64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int64 -> UInt64 - -@implementation GPBInt64UInt64Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(int64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBInt64UInt64Dictionary*)[self alloc] initWithUInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBInt64UInt64Dictionary*)[self alloc] initWithUInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt64UInt64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt64UInt64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt64UInt64Dictionary *)dictionary { - self = [self initWithUInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt64UInt64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt64UInt64Dictionary class]]) { - return NO; - } - GPBInt64UInt64Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(int64_t key, uint64_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey longLongValue], [aValue unsignedLongLongValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt64FieldSize([aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt64FieldSize([aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt64Field(outputStream, [aKey longLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictUInt64Field(outputStream, [aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueUInt64) forKey:@(key->valueInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndUInt64sUsingBlock:^(int64_t key, uint64_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%lld", key], [NSString stringWithFormat:@"%llu", value]); - }]; -} - -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(int64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped unsignedLongLongValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt64UInt64Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt64:(uint64_t)value forKey:(int64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt64ForKey:(int64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int64 -> Int64 - -@implementation GPBInt64Int64Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(int64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBInt64Int64Dictionary*)[self alloc] initWithInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBInt64Int64Dictionary*)[self alloc] initWithInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt64Int64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt64Int64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt64Int64Dictionary *)dictionary { - self = [self initWithInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt64Int64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt64Int64Dictionary class]]) { - return NO; - } - GPBInt64Int64Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(int64_t key, int64_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey longLongValue], [aValue longLongValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt64FieldSize([aValue longLongValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt64FieldSize([aValue longLongValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt64Field(outputStream, [aKey longLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictInt64Field(outputStream, [aValue longLongValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueInt64) forKey:@(key->valueInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndInt64sUsingBlock:^(int64_t key, int64_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%lld", key], [NSString stringWithFormat:@"%lld", value]); - }]; -} - -- (BOOL)getInt64:(nullable int64_t *)value forKey:(int64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped longLongValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt64Int64Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt64:(int64_t)value forKey:(int64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt64ForKey:(int64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int64 -> Bool - -@implementation GPBInt64BoolDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithBools:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(int64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBInt64BoolDictionary*)[self alloc] initWithBools:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBInt64BoolDictionary*)[self alloc] initWithBools:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt64BoolDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt64BoolDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt64BoolDictionary *)dictionary { - self = [self initWithBools:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt64BoolDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt64BoolDictionary class]]) { - return NO; - } - GPBInt64BoolDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(int64_t key, BOOL value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey longLongValue], [aValue boolValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictBoolFieldSize([aValue boolValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictBoolFieldSize([aValue boolValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt64Field(outputStream, [aKey longLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictBoolField(outputStream, [aValue boolValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueBool) forKey:@(key->valueInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndBoolsUsingBlock:^(int64_t key, BOOL value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%lld", key], (value ? @"true" : @"false")); - }]; -} - -- (BOOL)getBool:(nullable BOOL *)value forKey:(int64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped boolValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt64BoolDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setBool:(BOOL)value forKey:(int64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeBoolForKey:(int64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int64 -> Float - -@implementation GPBInt64FloatDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithFloats:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(int64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBInt64FloatDictionary*)[self alloc] initWithFloats:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBInt64FloatDictionary*)[self alloc] initWithFloats:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt64FloatDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt64FloatDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithFloats:(const float [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt64FloatDictionary *)dictionary { - self = [self initWithFloats:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt64FloatDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt64FloatDictionary class]]) { - return NO; - } - GPBInt64FloatDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(int64_t key, float value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey longLongValue], [aValue floatValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictFloatFieldSize([aValue floatValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictFloatFieldSize([aValue floatValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt64Field(outputStream, [aKey longLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictFloatField(outputStream, [aValue floatValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueFloat) forKey:@(key->valueInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndFloatsUsingBlock:^(int64_t key, float value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%lld", key], [NSString stringWithFormat:@"%.*g", FLT_DIG, value]); - }]; -} - -- (BOOL)getFloat:(nullable float *)value forKey:(int64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped floatValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt64FloatDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setFloat:(float)value forKey:(int64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeFloatForKey:(int64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int64 -> Double - -@implementation GPBInt64DoubleDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithDoubles:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(int64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBInt64DoubleDictionary*)[self alloc] initWithDoubles:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBInt64DoubleDictionary*)[self alloc] initWithDoubles:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt64DoubleDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt64DoubleDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(values[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt64DoubleDictionary *)dictionary { - self = [self initWithDoubles:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt64DoubleDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt64DoubleDictionary class]]) { - return NO; - } - GPBInt64DoubleDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(int64_t key, double value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey longLongValue], [aValue doubleValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictDoubleFieldSize([aValue doubleValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictDoubleFieldSize([aValue doubleValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt64Field(outputStream, [aKey longLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictDoubleField(outputStream, [aValue doubleValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueDouble) forKey:@(key->valueInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndDoublesUsingBlock:^(int64_t key, double value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%lld", key], [NSString stringWithFormat:@"%.*lg", DBL_DIG, value]); - }]; -} - -- (BOOL)getDouble:(nullable double *)value forKey:(int64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - *value = [wrapped doubleValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBInt64DoubleDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setDouble:(double)value forKey:(int64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeDoubleForKey:(int64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - Int64 -> Enum - -@implementation GPBInt64EnumDictionary { - @package - NSMutableDictionary *_dictionary; - GPBEnumValidationFunc _validationFunc; -} - -@synthesize validationFunc = _validationFunc; - -+ (instancetype)dictionary { - return [[[self alloc] initWithValidationFunction:NULL - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func { - return [[[self alloc] initWithValidationFunction:func - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(int64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBInt64EnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:&rawValue - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])rawValues - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBInt64EnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:rawValues - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt64EnumDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBInt64EnumDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { - return [[[self alloc] initWithValidationFunction:func capacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithValidationFunction:NULL rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func { - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])rawValues - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - _validationFunc = (func != NULL ? func : DictDefault_IsValidValue); - if (count && rawValues && keys) { - for (NSUInteger i = 0; i < count; ++i) { - [_dictionary setObject:@(rawValues[i]) forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt64EnumDictionary *)dictionary { - self = [self initWithValidationFunction:dictionary.validationFunc - rawValues:NULL - forKeys:NULL - count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt64EnumDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt64EnumDictionary class]]) { - return NO; - } - GPBInt64EnumDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(int64_t key, int32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - block([aKey longLongValue], [aValue intValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt64Field(outputStream, [aKey longLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictEnumField(outputStream, [aValue intValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType { - size_t msgSize = ComputeDictInt64FieldSize(key->valueInt64, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize(value, kMapValueFieldNumber, GPBDataTypeEnum); - NSMutableData *data = [NSMutableData dataWithLength:msgSize]; - GPBCodedOutputStream *outputStream = [[GPBCodedOutputStream alloc] initWithData:data]; - WriteDictInt64Field(outputStream, key->valueInt64, kMapKeyFieldNumber, keyDataType); - WriteDictEnumField(outputStream, value, kMapValueFieldNumber, GPBDataTypeEnum); - [outputStream release]; - return data; -} -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueEnum) forKey:@(key->valueInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndRawValuesUsingBlock:^(int64_t key, int32_t value, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%lld", key], @(value)); - }]; -} - -- (BOOL)getEnum:(int32_t *)value forKey:(int64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && value) { - int32_t result = [wrapped intValue]; - if (!_validationFunc(result)) { - result = kGPBUnrecognizedEnumeratorValue; - } - *value = result; - } - return (wrapped != NULL); -} - -- (BOOL)getRawValue:(int32_t *)rawValue forKey:(int64_t)key { - NSNumber *wrapped = [_dictionary objectForKey:@(key)]; - if (wrapped && rawValue) { - *rawValue = [wrapped intValue]; - } - return (wrapped != NULL); -} - -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(int64_t key, int32_t value, BOOL *stop))block { - GPBEnumValidationFunc func = _validationFunc; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - NSNumber *aValue, - BOOL *stop) { - int32_t unwrapped = [aValue intValue]; - if (!func(unwrapped)) { - unwrapped = kGPBUnrecognizedEnumeratorValue; - } - block([aKey longLongValue], unwrapped, stop); - }]; -} - -- (void)addRawEntriesFromDictionary:(GPBInt64EnumDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setRawValue:(int32_t)value forKey:(int64_t)key { - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeEnumForKey:(int64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -- (void)setEnum:(int32_t)value forKey:(int64_t)key { - if (!_validationFunc(value)) { - [NSException raise:NSInvalidArgumentException - format:@"GPBInt64EnumDictionary: Attempt to set an unknown enum value (%d)", - value]; - } - - [_dictionary setObject:@(value) forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -@end - -#pragma mark - Int64 -> Object - -@implementation GPBInt64ObjectDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithObjects:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithObject:(id)object - forKey:(int64_t)key { - // Cast is needed so the compiler knows what class we are invoking initWithObjects:forKeys:count: - // on to get the type correct. - return [[(GPBInt64ObjectDictionary*)[self alloc] initWithObjects:&object - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithObjects:(const id [])objects - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithObjects:forKeys:count: - // on to get the type correct. - return [[(GPBInt64ObjectDictionary*)[self alloc] initWithObjects:objects - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBInt64ObjectDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBInt64ObjectDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithObjects:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithObjects:(const id [])objects - forKeys:(const int64_t [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && objects && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!objects[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil object to a Dictionary"]; - } - [_dictionary setObject:objects[i] forKey:@(keys[i])]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBInt64ObjectDictionary *)dictionary { - self = [self initWithObjects:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithObjects:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBInt64ObjectDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBInt64ObjectDictionary class]]) { - return NO; - } - GPBInt64ObjectDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(int64_t key, id object, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - block([aKey longLongValue], aObject, stop); - }]; -} - -- (BOOL)isInitialized { - for (GPBMessage *msg in [_dictionary objectEnumerator]) { - if (!msg.initialized) { - return NO; - } - } - return YES; -} - -- (instancetype)deepCopyWithZone:(NSZone *)zone { - GPBInt64ObjectDictionary *newDict = - [[GPBInt64ObjectDictionary alloc] init]; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(id aKey, - GPBMessage *msg, - BOOL *stop) { - #pragma unused(stop) - GPBMessage *copiedMsg = [msg copyWithZone:zone]; - [newDict->_dictionary setObject:copiedMsg forKey:aKey]; - [copiedMsg release]; - }]; - return newDict; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictObjectFieldSize(aObject, kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSNumber *aKey, - id aObject, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictInt64FieldSize([aKey longLongValue], kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictObjectFieldSize(aObject, kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictInt64Field(outputStream, [aKey longLongValue], kMapKeyFieldNumber, keyDataType); - WriteDictObjectField(outputStream, aObject, kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:value->valueString forKey:@(key->valueInt64)]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndObjectsUsingBlock:^(int64_t key, id object, BOOL *stop) { - #pragma unused(stop) - block([NSString stringWithFormat:@"%lld", key], object); - }]; -} - -- (id)objectForKey:(int64_t)key { - id result = [_dictionary objectForKey:@(key)]; - return result; -} - -- (void)addEntriesFromDictionary:(GPBInt64ObjectDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setObject:(id)object forKey:(int64_t)key { - if (!object) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil object to a Dictionary"]; - } - [_dictionary setObject:object forKey:@(key)]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeObjectForKey:(int64_t)aKey { - [_dictionary removeObjectForKey:@(aKey)]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -//%PDDM-EXPAND DICTIONARY_POD_IMPL_FOR_KEY(String, NSString, *, OBJECT) -// This block of code is generated, do not edit it directly. - -#pragma mark - String -> UInt32 - -@implementation GPBStringUInt32Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(NSString *)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBStringUInt32Dictionary*)[self alloc] initWithUInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBStringUInt32Dictionary*)[self alloc] initWithUInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBStringUInt32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBStringUInt32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!keys[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(values[i]) forKey:keys[i]]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBStringUInt32Dictionary *)dictionary { - self = [self initWithUInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBStringUInt32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBStringUInt32Dictionary class]]) { - return NO; - } - GPBStringUInt32Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(NSString *key, uint32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - block(aKey, [aValue unsignedIntValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt32FieldSize([aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt32FieldSize([aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictStringField(outputStream, aKey, kMapKeyFieldNumber, keyDataType); - WriteDictUInt32Field(outputStream, [aValue unsignedIntValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueUInt32) forKey:key->valueString]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndUInt32sUsingBlock:^(NSString *key, uint32_t value, BOOL *stop) { - #pragma unused(stop) - block(key, [NSString stringWithFormat:@"%u", value]); - }]; -} - -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(NSString *)key { - NSNumber *wrapped = [_dictionary objectForKey:key]; - if (wrapped && value) { - *value = [wrapped unsignedIntValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBStringUInt32Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt32:(uint32_t)value forKey:(NSString *)key { - if (!key) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(value) forKey:key]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt32ForKey:(NSString *)aKey { - [_dictionary removeObjectForKey:aKey]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - String -> Int32 - -@implementation GPBStringInt32Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(NSString *)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBStringInt32Dictionary*)[self alloc] initWithInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBStringInt32Dictionary*)[self alloc] initWithInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBStringInt32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBStringInt32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!keys[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(values[i]) forKey:keys[i]]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBStringInt32Dictionary *)dictionary { - self = [self initWithInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBStringInt32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBStringInt32Dictionary class]]) { - return NO; - } - GPBStringInt32Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(NSString *key, int32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - block(aKey, [aValue intValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt32FieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt32FieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictStringField(outputStream, aKey, kMapKeyFieldNumber, keyDataType); - WriteDictInt32Field(outputStream, [aValue intValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueInt32) forKey:key->valueString]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndInt32sUsingBlock:^(NSString *key, int32_t value, BOOL *stop) { - #pragma unused(stop) - block(key, [NSString stringWithFormat:@"%d", value]); - }]; -} - -- (BOOL)getInt32:(nullable int32_t *)value forKey:(NSString *)key { - NSNumber *wrapped = [_dictionary objectForKey:key]; - if (wrapped && value) { - *value = [wrapped intValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBStringInt32Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt32:(int32_t)value forKey:(NSString *)key { - if (!key) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(value) forKey:key]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt32ForKey:(NSString *)aKey { - [_dictionary removeObjectForKey:aKey]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - String -> UInt64 - -@implementation GPBStringUInt64Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(NSString *)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBStringUInt64Dictionary*)[self alloc] initWithUInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBStringUInt64Dictionary*)[self alloc] initWithUInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBStringUInt64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBStringUInt64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!keys[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(values[i]) forKey:keys[i]]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBStringUInt64Dictionary *)dictionary { - self = [self initWithUInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBStringUInt64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBStringUInt64Dictionary class]]) { - return NO; - } - GPBStringUInt64Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(NSString *key, uint64_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - block(aKey, [aValue unsignedLongLongValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt64FieldSize([aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictUInt64FieldSize([aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictStringField(outputStream, aKey, kMapKeyFieldNumber, keyDataType); - WriteDictUInt64Field(outputStream, [aValue unsignedLongLongValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueUInt64) forKey:key->valueString]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndUInt64sUsingBlock:^(NSString *key, uint64_t value, BOOL *stop) { - #pragma unused(stop) - block(key, [NSString stringWithFormat:@"%llu", value]); - }]; -} - -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(NSString *)key { - NSNumber *wrapped = [_dictionary objectForKey:key]; - if (wrapped && value) { - *value = [wrapped unsignedLongLongValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBStringUInt64Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt64:(uint64_t)value forKey:(NSString *)key { - if (!key) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(value) forKey:key]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt64ForKey:(NSString *)aKey { - [_dictionary removeObjectForKey:aKey]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - String -> Int64 - -@implementation GPBStringInt64Dictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(NSString *)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBStringInt64Dictionary*)[self alloc] initWithInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBStringInt64Dictionary*)[self alloc] initWithInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBStringInt64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBStringInt64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!keys[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(values[i]) forKey:keys[i]]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBStringInt64Dictionary *)dictionary { - self = [self initWithInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBStringInt64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBStringInt64Dictionary class]]) { - return NO; - } - GPBStringInt64Dictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(NSString *key, int64_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - block(aKey, [aValue longLongValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt64FieldSize([aValue longLongValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictInt64FieldSize([aValue longLongValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictStringField(outputStream, aKey, kMapKeyFieldNumber, keyDataType); - WriteDictInt64Field(outputStream, [aValue longLongValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueInt64) forKey:key->valueString]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndInt64sUsingBlock:^(NSString *key, int64_t value, BOOL *stop) { - #pragma unused(stop) - block(key, [NSString stringWithFormat:@"%lld", value]); - }]; -} - -- (BOOL)getInt64:(nullable int64_t *)value forKey:(NSString *)key { - NSNumber *wrapped = [_dictionary objectForKey:key]; - if (wrapped && value) { - *value = [wrapped longLongValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBStringInt64Dictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt64:(int64_t)value forKey:(NSString *)key { - if (!key) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(value) forKey:key]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt64ForKey:(NSString *)aKey { - [_dictionary removeObjectForKey:aKey]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - String -> Bool - -@implementation GPBStringBoolDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithBools:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(NSString *)key { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBStringBoolDictionary*)[self alloc] initWithBools:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBStringBoolDictionary*)[self alloc] initWithBools:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBStringBoolDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBStringBoolDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!keys[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(values[i]) forKey:keys[i]]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBStringBoolDictionary *)dictionary { - self = [self initWithBools:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBStringBoolDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBStringBoolDictionary class]]) { - return NO; - } - GPBStringBoolDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(NSString *key, BOOL value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - block(aKey, [aValue boolValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictBoolFieldSize([aValue boolValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictBoolFieldSize([aValue boolValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictStringField(outputStream, aKey, kMapKeyFieldNumber, keyDataType); - WriteDictBoolField(outputStream, [aValue boolValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueBool) forKey:key->valueString]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndBoolsUsingBlock:^(NSString *key, BOOL value, BOOL *stop) { - #pragma unused(stop) - block(key, (value ? @"true" : @"false")); - }]; -} - -- (BOOL)getBool:(nullable BOOL *)value forKey:(NSString *)key { - NSNumber *wrapped = [_dictionary objectForKey:key]; - if (wrapped && value) { - *value = [wrapped boolValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBStringBoolDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setBool:(BOOL)value forKey:(NSString *)key { - if (!key) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(value) forKey:key]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeBoolForKey:(NSString *)aKey { - [_dictionary removeObjectForKey:aKey]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - String -> Float - -@implementation GPBStringFloatDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithFloats:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(NSString *)key { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBStringFloatDictionary*)[self alloc] initWithFloats:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBStringFloatDictionary*)[self alloc] initWithFloats:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBStringFloatDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBStringFloatDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithFloats:(const float [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!keys[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(values[i]) forKey:keys[i]]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBStringFloatDictionary *)dictionary { - self = [self initWithFloats:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBStringFloatDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBStringFloatDictionary class]]) { - return NO; - } - GPBStringFloatDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(NSString *key, float value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - block(aKey, [aValue floatValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictFloatFieldSize([aValue floatValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictFloatFieldSize([aValue floatValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictStringField(outputStream, aKey, kMapKeyFieldNumber, keyDataType); - WriteDictFloatField(outputStream, [aValue floatValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueFloat) forKey:key->valueString]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndFloatsUsingBlock:^(NSString *key, float value, BOOL *stop) { - #pragma unused(stop) - block(key, [NSString stringWithFormat:@"%.*g", FLT_DIG, value]); - }]; -} - -- (BOOL)getFloat:(nullable float *)value forKey:(NSString *)key { - NSNumber *wrapped = [_dictionary objectForKey:key]; - if (wrapped && value) { - *value = [wrapped floatValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBStringFloatDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setFloat:(float)value forKey:(NSString *)key { - if (!key) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(value) forKey:key]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeFloatForKey:(NSString *)aKey { - [_dictionary removeObjectForKey:aKey]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - String -> Double - -@implementation GPBStringDoubleDictionary { - @package - NSMutableDictionary *_dictionary; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithDoubles:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(NSString *)key { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBStringDoubleDictionary*)[self alloc] initWithDoubles:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBStringDoubleDictionary*)[self alloc] initWithDoubles:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBStringDoubleDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBStringDoubleDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - if (count && values && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!keys[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(values[i]) forKey:keys[i]]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBStringDoubleDictionary *)dictionary { - self = [self initWithDoubles:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBStringDoubleDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBStringDoubleDictionary class]]) { - return NO; - } - GPBStringDoubleDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(NSString *key, double value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - block(aKey, [aValue doubleValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictDoubleFieldSize([aValue doubleValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictDoubleFieldSize([aValue doubleValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictStringField(outputStream, aKey, kMapKeyFieldNumber, keyDataType); - WriteDictDoubleField(outputStream, [aValue doubleValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueDouble) forKey:key->valueString]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndDoublesUsingBlock:^(NSString *key, double value, BOOL *stop) { - #pragma unused(stop) - block(key, [NSString stringWithFormat:@"%.*lg", DBL_DIG, value]); - }]; -} - -- (BOOL)getDouble:(nullable double *)value forKey:(NSString *)key { - NSNumber *wrapped = [_dictionary objectForKey:key]; - if (wrapped && value) { - *value = [wrapped doubleValue]; - } - return (wrapped != NULL); -} - -- (void)addEntriesFromDictionary:(GPBStringDoubleDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setDouble:(double)value forKey:(NSString *)key { - if (!key) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(value) forKey:key]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeDoubleForKey:(NSString *)aKey { - [_dictionary removeObjectForKey:aKey]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -@end - -#pragma mark - String -> Enum - -@implementation GPBStringEnumDictionary { - @package - NSMutableDictionary *_dictionary; - GPBEnumValidationFunc _validationFunc; -} - -@synthesize validationFunc = _validationFunc; - -+ (instancetype)dictionary { - return [[[self alloc] initWithValidationFunction:NULL - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func { - return [[[self alloc] initWithValidationFunction:func - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(NSString *)key { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBStringEnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:&rawValue - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])rawValues - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBStringEnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:rawValues - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBStringEnumDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBStringEnumDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { - return [[[self alloc] initWithValidationFunction:func capacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithValidationFunction:NULL rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func { - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])rawValues - forKeys:(const NSString * [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] init]; - _validationFunc = (func != NULL ? func : DictDefault_IsValidValue); - if (count && rawValues && keys) { - for (NSUInteger i = 0; i < count; ++i) { - if (!keys[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(rawValues[i]) forKey:keys[i]]; - } - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBStringEnumDictionary *)dictionary { - self = [self initWithValidationFunction:dictionary.validationFunc - rawValues:NULL - forKeys:NULL - count:0]; - if (self) { - if (dictionary) { - [_dictionary addEntriesFromDictionary:dictionary->_dictionary]; - } - } - return self; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBStringEnumDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBStringEnumDictionary class]]) { - return NO; - } - GPBStringEnumDictionary *otherDictionary = other; - return [_dictionary isEqual:otherDictionary->_dictionary]; -} - -- (NSUInteger)hash { - return _dictionary.count; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p> { %@ }", [self class], self, _dictionary]; -} - -- (NSUInteger)count { - return _dictionary.count; -} - -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(NSString *key, int32_t value, BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - block(aKey, [aValue intValue], stop); - }]; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - NSUInteger count = _dictionary.count; - if (count == 0) { - return 0; - } - - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - __block size_t result = 0; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - }]; - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - GPBDataType keyDataType = field.mapKeyDataType; - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - #pragma unused(stop) - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictStringFieldSize(aKey, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize([aValue intValue], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictStringField(outputStream, aKey, kMapKeyFieldNumber, keyDataType); - WriteDictEnumField(outputStream, [aValue intValue], kMapValueFieldNumber, valueDataType); - }]; -} - -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType { - size_t msgSize = ComputeDictStringFieldSize(key->valueString, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize(value, kMapValueFieldNumber, GPBDataTypeEnum); - NSMutableData *data = [NSMutableData dataWithLength:msgSize]; - GPBCodedOutputStream *outputStream = [[GPBCodedOutputStream alloc] initWithData:data]; - WriteDictStringField(outputStream, key->valueString, kMapKeyFieldNumber, keyDataType); - WriteDictEnumField(outputStream, value, kMapValueFieldNumber, GPBDataTypeEnum); - [outputStream release]; - return data; -} -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - [_dictionary setObject:@(value->valueEnum) forKey:key->valueString]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - [self enumerateKeysAndRawValuesUsingBlock:^(NSString *key, int32_t value, BOOL *stop) { - #pragma unused(stop) - block(key, @(value)); - }]; -} - -- (BOOL)getEnum:(int32_t *)value forKey:(NSString *)key { - NSNumber *wrapped = [_dictionary objectForKey:key]; - if (wrapped && value) { - int32_t result = [wrapped intValue]; - if (!_validationFunc(result)) { - result = kGPBUnrecognizedEnumeratorValue; - } - *value = result; - } - return (wrapped != NULL); -} - -- (BOOL)getRawValue:(int32_t *)rawValue forKey:(NSString *)key { - NSNumber *wrapped = [_dictionary objectForKey:key]; - if (wrapped && rawValue) { - *rawValue = [wrapped intValue]; - } - return (wrapped != NULL); -} - -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(NSString *key, int32_t value, BOOL *stop))block { - GPBEnumValidationFunc func = _validationFunc; - [_dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *aKey, - NSNumber *aValue, - BOOL *stop) { - int32_t unwrapped = [aValue intValue]; - if (!func(unwrapped)) { - unwrapped = kGPBUnrecognizedEnumeratorValue; - } - block(aKey, unwrapped, stop); - }]; -} - -- (void)addRawEntriesFromDictionary:(GPBStringEnumDictionary *)otherDictionary { - if (otherDictionary) { - [_dictionary addEntriesFromDictionary:otherDictionary->_dictionary]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setRawValue:(int32_t)value forKey:(NSString *)key { - if (!key) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - [_dictionary setObject:@(value) forKey:key]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeEnumForKey:(NSString *)aKey { - [_dictionary removeObjectForKey:aKey]; -} - -- (void)removeAll { - [_dictionary removeAllObjects]; -} - -- (void)setEnum:(int32_t)value forKey:(NSString *)key { - if (!key) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil key to a Dictionary"]; - } - if (!_validationFunc(value)) { - [NSException raise:NSInvalidArgumentException - format:@"GPBStringEnumDictionary: Attempt to set an unknown enum value (%d)", - value]; - } - - [_dictionary setObject:@(value) forKey:key]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -@end - -//%PDDM-EXPAND-END (5 expansions) - - -//%PDDM-EXPAND DICTIONARY_BOOL_KEY_TO_POD_IMPL(UInt32, uint32_t) -// This block of code is generated, do not edit it directly. - -#pragma mark - Bool -> UInt32 - -@implementation GPBBoolUInt32Dictionary { - @package - uint32_t _values[2]; - BOOL _valueSet[2]; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32:(uint32_t)value - forKey:(BOOL)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBBoolUInt32Dictionary*)[self alloc] initWithUInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt32s:(const uint32_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBBoolUInt32Dictionary*)[self alloc] initWithUInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBBoolUInt32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBBoolUInt32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt32s:(const uint32_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - for (NSUInteger i = 0; i < count; ++i) { - int idx = keys[i] ? 1 : 0; - _values[idx] = values[i]; - _valueSet[idx] = YES; - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBBoolUInt32Dictionary *)dictionary { - self = [self initWithUInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - for (int i = 0; i < 2; ++i) { - if (dictionary->_valueSet[i]) { - _values[i] = dictionary->_values[i]; - _valueSet[i] = YES; - } - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt32s:NULL forKeys:NULL count:0]; -} - -#if !defined(NS_BLOCK_ASSERTIONS) -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [super dealloc]; -} -#endif // !defined(NS_BLOCK_ASSERTIONS) - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBBoolUInt32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBBoolUInt32Dictionary class]]) { - return NO; - } - GPBBoolUInt32Dictionary *otherDictionary = other; - if ((_valueSet[0] != otherDictionary->_valueSet[0]) || - (_valueSet[1] != otherDictionary->_valueSet[1])) { - return NO; - } - if ((_valueSet[0] && (_values[0] != otherDictionary->_values[0])) || - (_valueSet[1] && (_values[1] != otherDictionary->_values[1]))) { - return NO; - } - return YES; -} - -- (NSUInteger)hash { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> {", [self class], self]; - if (_valueSet[0]) { - [result appendFormat:@"NO: %u", _values[0]]; - } - if (_valueSet[1]) { - [result appendFormat:@"YES: %u", _values[1]]; - } - [result appendString:@" }"]; - return result; -} - -- (NSUInteger)count { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (BOOL)getUInt32:(uint32_t *)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - if (_valueSet[idx]) { - if (value) { - *value = _values[idx]; - } - return YES; - } - return NO; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - int idx = (key->valueBool ? 1 : 0); - _values[idx] = value->valueUInt32; - _valueSet[idx] = YES; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - if (_valueSet[0]) { - block(@"false", [NSString stringWithFormat:@"%u", _values[0]]); - } - if (_valueSet[1]) { - block(@"true", [NSString stringWithFormat:@"%u", _values[1]]); - } -} - -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(BOOL key, uint32_t value, BOOL *stop))block { - BOOL stop = NO; - if (_valueSet[0]) { - block(NO, _values[0], &stop); - } - if (!stop && _valueSet[1]) { - block(YES, _values[1], &stop); - } -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - NSUInteger count = 0; - size_t result = 0; - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - ++count; - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictUInt32FieldSize(_values[i], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - } - } - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictUInt32FieldSize(_values[i], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictBoolField(outputStream, (i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - WriteDictUInt32Field(outputStream, _values[i], kMapValueFieldNumber, valueDataType); - } - } -} - -- (void)addEntriesFromDictionary:(GPBBoolUInt32Dictionary *)otherDictionary { - if (otherDictionary) { - for (int i = 0; i < 2; ++i) { - if (otherDictionary->_valueSet[i]) { - _valueSet[i] = YES; - _values[i] = otherDictionary->_values[i]; - } - } - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt32:(uint32_t)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - _values[idx] = value; - _valueSet[idx] = YES; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt32ForKey:(BOOL)aKey { - _valueSet[aKey ? 1 : 0] = NO; -} - -- (void)removeAll { - _valueSet[0] = NO; - _valueSet[1] = NO; -} - -@end - -//%PDDM-EXPAND DICTIONARY_BOOL_KEY_TO_POD_IMPL(Int32, int32_t) -// This block of code is generated, do not edit it directly. - -#pragma mark - Bool -> Int32 - -@implementation GPBBoolInt32Dictionary { - @package - int32_t _values[2]; - BOOL _valueSet[2]; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt32s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt32:(int32_t)value - forKey:(BOOL)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBBoolInt32Dictionary*)[self alloc] initWithInt32s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt32s:(const int32_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt32s:forKeys:count: - // on to get the type correct. - return [[(GPBBoolInt32Dictionary*)[self alloc] initWithInt32s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBBoolInt32Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBBoolInt32Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt32s:(const int32_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - for (NSUInteger i = 0; i < count; ++i) { - int idx = keys[i] ? 1 : 0; - _values[idx] = values[i]; - _valueSet[idx] = YES; - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBBoolInt32Dictionary *)dictionary { - self = [self initWithInt32s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - for (int i = 0; i < 2; ++i) { - if (dictionary->_valueSet[i]) { - _values[i] = dictionary->_values[i]; - _valueSet[i] = YES; - } - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt32s:NULL forKeys:NULL count:0]; -} - -#if !defined(NS_BLOCK_ASSERTIONS) -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [super dealloc]; -} -#endif // !defined(NS_BLOCK_ASSERTIONS) - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBBoolInt32Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBBoolInt32Dictionary class]]) { - return NO; - } - GPBBoolInt32Dictionary *otherDictionary = other; - if ((_valueSet[0] != otherDictionary->_valueSet[0]) || - (_valueSet[1] != otherDictionary->_valueSet[1])) { - return NO; - } - if ((_valueSet[0] && (_values[0] != otherDictionary->_values[0])) || - (_valueSet[1] && (_values[1] != otherDictionary->_values[1]))) { - return NO; - } - return YES; -} - -- (NSUInteger)hash { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> {", [self class], self]; - if (_valueSet[0]) { - [result appendFormat:@"NO: %d", _values[0]]; - } - if (_valueSet[1]) { - [result appendFormat:@"YES: %d", _values[1]]; - } - [result appendString:@" }"]; - return result; -} - -- (NSUInteger)count { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (BOOL)getInt32:(int32_t *)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - if (_valueSet[idx]) { - if (value) { - *value = _values[idx]; - } - return YES; - } - return NO; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - int idx = (key->valueBool ? 1 : 0); - _values[idx] = value->valueInt32; - _valueSet[idx] = YES; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - if (_valueSet[0]) { - block(@"false", [NSString stringWithFormat:@"%d", _values[0]]); - } - if (_valueSet[1]) { - block(@"true", [NSString stringWithFormat:@"%d", _values[1]]); - } -} - -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(BOOL key, int32_t value, BOOL *stop))block { - BOOL stop = NO; - if (_valueSet[0]) { - block(NO, _values[0], &stop); - } - if (!stop && _valueSet[1]) { - block(YES, _values[1], &stop); - } -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - NSUInteger count = 0; - size_t result = 0; - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - ++count; - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictInt32FieldSize(_values[i], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - } - } - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictInt32FieldSize(_values[i], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictBoolField(outputStream, (i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - WriteDictInt32Field(outputStream, _values[i], kMapValueFieldNumber, valueDataType); - } - } -} - -- (void)addEntriesFromDictionary:(GPBBoolInt32Dictionary *)otherDictionary { - if (otherDictionary) { - for (int i = 0; i < 2; ++i) { - if (otherDictionary->_valueSet[i]) { - _valueSet[i] = YES; - _values[i] = otherDictionary->_values[i]; - } - } - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt32:(int32_t)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - _values[idx] = value; - _valueSet[idx] = YES; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt32ForKey:(BOOL)aKey { - _valueSet[aKey ? 1 : 0] = NO; -} - -- (void)removeAll { - _valueSet[0] = NO; - _valueSet[1] = NO; -} - -@end - -//%PDDM-EXPAND DICTIONARY_BOOL_KEY_TO_POD_IMPL(UInt64, uint64_t) -// This block of code is generated, do not edit it directly. - -#pragma mark - Bool -> UInt64 - -@implementation GPBBoolUInt64Dictionary { - @package - uint64_t _values[2]; - BOOL _valueSet[2]; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithUInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64:(uint64_t)value - forKey:(BOOL)key { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBBoolUInt64Dictionary*)[self alloc] initWithUInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithUInt64s:(const uint64_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithUInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBBoolUInt64Dictionary*)[self alloc] initWithUInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBBoolUInt64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBBoolUInt64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithUInt64s:(const uint64_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - for (NSUInteger i = 0; i < count; ++i) { - int idx = keys[i] ? 1 : 0; - _values[idx] = values[i]; - _valueSet[idx] = YES; - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBBoolUInt64Dictionary *)dictionary { - self = [self initWithUInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - for (int i = 0; i < 2; ++i) { - if (dictionary->_valueSet[i]) { - _values[i] = dictionary->_values[i]; - _valueSet[i] = YES; - } - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithUInt64s:NULL forKeys:NULL count:0]; -} - -#if !defined(NS_BLOCK_ASSERTIONS) -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [super dealloc]; -} -#endif // !defined(NS_BLOCK_ASSERTIONS) - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBBoolUInt64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBBoolUInt64Dictionary class]]) { - return NO; - } - GPBBoolUInt64Dictionary *otherDictionary = other; - if ((_valueSet[0] != otherDictionary->_valueSet[0]) || - (_valueSet[1] != otherDictionary->_valueSet[1])) { - return NO; - } - if ((_valueSet[0] && (_values[0] != otherDictionary->_values[0])) || - (_valueSet[1] && (_values[1] != otherDictionary->_values[1]))) { - return NO; - } - return YES; -} - -- (NSUInteger)hash { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> {", [self class], self]; - if (_valueSet[0]) { - [result appendFormat:@"NO: %llu", _values[0]]; - } - if (_valueSet[1]) { - [result appendFormat:@"YES: %llu", _values[1]]; - } - [result appendString:@" }"]; - return result; -} - -- (NSUInteger)count { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (BOOL)getUInt64:(uint64_t *)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - if (_valueSet[idx]) { - if (value) { - *value = _values[idx]; - } - return YES; - } - return NO; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - int idx = (key->valueBool ? 1 : 0); - _values[idx] = value->valueUInt64; - _valueSet[idx] = YES; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - if (_valueSet[0]) { - block(@"false", [NSString stringWithFormat:@"%llu", _values[0]]); - } - if (_valueSet[1]) { - block(@"true", [NSString stringWithFormat:@"%llu", _values[1]]); - } -} - -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(BOOL key, uint64_t value, BOOL *stop))block { - BOOL stop = NO; - if (_valueSet[0]) { - block(NO, _values[0], &stop); - } - if (!stop && _valueSet[1]) { - block(YES, _values[1], &stop); - } -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - NSUInteger count = 0; - size_t result = 0; - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - ++count; - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictUInt64FieldSize(_values[i], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - } - } - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictUInt64FieldSize(_values[i], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictBoolField(outputStream, (i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - WriteDictUInt64Field(outputStream, _values[i], kMapValueFieldNumber, valueDataType); - } - } -} - -- (void)addEntriesFromDictionary:(GPBBoolUInt64Dictionary *)otherDictionary { - if (otherDictionary) { - for (int i = 0; i < 2; ++i) { - if (otherDictionary->_valueSet[i]) { - _valueSet[i] = YES; - _values[i] = otherDictionary->_values[i]; - } - } - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setUInt64:(uint64_t)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - _values[idx] = value; - _valueSet[idx] = YES; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeUInt64ForKey:(BOOL)aKey { - _valueSet[aKey ? 1 : 0] = NO; -} - -- (void)removeAll { - _valueSet[0] = NO; - _valueSet[1] = NO; -} - -@end - -//%PDDM-EXPAND DICTIONARY_BOOL_KEY_TO_POD_IMPL(Int64, int64_t) -// This block of code is generated, do not edit it directly. - -#pragma mark - Bool -> Int64 - -@implementation GPBBoolInt64Dictionary { - @package - int64_t _values[2]; - BOOL _valueSet[2]; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithInt64s:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithInt64:(int64_t)value - forKey:(BOOL)key { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBBoolInt64Dictionary*)[self alloc] initWithInt64s:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithInt64s:(const int64_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithInt64s:forKeys:count: - // on to get the type correct. - return [[(GPBBoolInt64Dictionary*)[self alloc] initWithInt64s:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBBoolInt64Dictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBBoolInt64Dictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithInt64s:(const int64_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - for (NSUInteger i = 0; i < count; ++i) { - int idx = keys[i] ? 1 : 0; - _values[idx] = values[i]; - _valueSet[idx] = YES; - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBBoolInt64Dictionary *)dictionary { - self = [self initWithInt64s:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - for (int i = 0; i < 2; ++i) { - if (dictionary->_valueSet[i]) { - _values[i] = dictionary->_values[i]; - _valueSet[i] = YES; - } - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithInt64s:NULL forKeys:NULL count:0]; -} - -#if !defined(NS_BLOCK_ASSERTIONS) -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [super dealloc]; -} -#endif // !defined(NS_BLOCK_ASSERTIONS) - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBBoolInt64Dictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBBoolInt64Dictionary class]]) { - return NO; - } - GPBBoolInt64Dictionary *otherDictionary = other; - if ((_valueSet[0] != otherDictionary->_valueSet[0]) || - (_valueSet[1] != otherDictionary->_valueSet[1])) { - return NO; - } - if ((_valueSet[0] && (_values[0] != otherDictionary->_values[0])) || - (_valueSet[1] && (_values[1] != otherDictionary->_values[1]))) { - return NO; - } - return YES; -} - -- (NSUInteger)hash { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> {", [self class], self]; - if (_valueSet[0]) { - [result appendFormat:@"NO: %lld", _values[0]]; - } - if (_valueSet[1]) { - [result appendFormat:@"YES: %lld", _values[1]]; - } - [result appendString:@" }"]; - return result; -} - -- (NSUInteger)count { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (BOOL)getInt64:(int64_t *)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - if (_valueSet[idx]) { - if (value) { - *value = _values[idx]; - } - return YES; - } - return NO; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - int idx = (key->valueBool ? 1 : 0); - _values[idx] = value->valueInt64; - _valueSet[idx] = YES; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - if (_valueSet[0]) { - block(@"false", [NSString stringWithFormat:@"%lld", _values[0]]); - } - if (_valueSet[1]) { - block(@"true", [NSString stringWithFormat:@"%lld", _values[1]]); - } -} - -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(BOOL key, int64_t value, BOOL *stop))block { - BOOL stop = NO; - if (_valueSet[0]) { - block(NO, _values[0], &stop); - } - if (!stop && _valueSet[1]) { - block(YES, _values[1], &stop); - } -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - NSUInteger count = 0; - size_t result = 0; - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - ++count; - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictInt64FieldSize(_values[i], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - } - } - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictInt64FieldSize(_values[i], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictBoolField(outputStream, (i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - WriteDictInt64Field(outputStream, _values[i], kMapValueFieldNumber, valueDataType); - } - } -} - -- (void)addEntriesFromDictionary:(GPBBoolInt64Dictionary *)otherDictionary { - if (otherDictionary) { - for (int i = 0; i < 2; ++i) { - if (otherDictionary->_valueSet[i]) { - _valueSet[i] = YES; - _values[i] = otherDictionary->_values[i]; - } - } - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setInt64:(int64_t)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - _values[idx] = value; - _valueSet[idx] = YES; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeInt64ForKey:(BOOL)aKey { - _valueSet[aKey ? 1 : 0] = NO; -} - -- (void)removeAll { - _valueSet[0] = NO; - _valueSet[1] = NO; -} - -@end - -//%PDDM-EXPAND DICTIONARY_BOOL_KEY_TO_POD_IMPL(Bool, BOOL) -// This block of code is generated, do not edit it directly. - -#pragma mark - Bool -> Bool - -@implementation GPBBoolBoolDictionary { - @package - BOOL _values[2]; - BOOL _valueSet[2]; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithBools:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithBool:(BOOL)value - forKey:(BOOL)key { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBBoolBoolDictionary*)[self alloc] initWithBools:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithBools:(const BOOL [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithBools:forKeys:count: - // on to get the type correct. - return [[(GPBBoolBoolDictionary*)[self alloc] initWithBools:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBBoolBoolDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBBoolBoolDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithBools:(const BOOL [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - for (NSUInteger i = 0; i < count; ++i) { - int idx = keys[i] ? 1 : 0; - _values[idx] = values[i]; - _valueSet[idx] = YES; - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBBoolBoolDictionary *)dictionary { - self = [self initWithBools:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - for (int i = 0; i < 2; ++i) { - if (dictionary->_valueSet[i]) { - _values[i] = dictionary->_values[i]; - _valueSet[i] = YES; - } - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithBools:NULL forKeys:NULL count:0]; -} - -#if !defined(NS_BLOCK_ASSERTIONS) -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [super dealloc]; -} -#endif // !defined(NS_BLOCK_ASSERTIONS) - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBBoolBoolDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBBoolBoolDictionary class]]) { - return NO; - } - GPBBoolBoolDictionary *otherDictionary = other; - if ((_valueSet[0] != otherDictionary->_valueSet[0]) || - (_valueSet[1] != otherDictionary->_valueSet[1])) { - return NO; - } - if ((_valueSet[0] && (_values[0] != otherDictionary->_values[0])) || - (_valueSet[1] && (_values[1] != otherDictionary->_values[1]))) { - return NO; - } - return YES; -} - -- (NSUInteger)hash { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> {", [self class], self]; - if (_valueSet[0]) { - [result appendFormat:@"NO: %d", _values[0]]; - } - if (_valueSet[1]) { - [result appendFormat:@"YES: %d", _values[1]]; - } - [result appendString:@" }"]; - return result; -} - -- (NSUInteger)count { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (BOOL)getBool:(BOOL *)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - if (_valueSet[idx]) { - if (value) { - *value = _values[idx]; - } - return YES; - } - return NO; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - int idx = (key->valueBool ? 1 : 0); - _values[idx] = value->valueBool; - _valueSet[idx] = YES; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - if (_valueSet[0]) { - block(@"false", (_values[0] ? @"true" : @"false")); - } - if (_valueSet[1]) { - block(@"true", (_values[1] ? @"true" : @"false")); - } -} - -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(BOOL key, BOOL value, BOOL *stop))block { - BOOL stop = NO; - if (_valueSet[0]) { - block(NO, _values[0], &stop); - } - if (!stop && _valueSet[1]) { - block(YES, _values[1], &stop); - } -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - NSUInteger count = 0; - size_t result = 0; - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - ++count; - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictBoolFieldSize(_values[i], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - } - } - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictBoolFieldSize(_values[i], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictBoolField(outputStream, (i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - WriteDictBoolField(outputStream, _values[i], kMapValueFieldNumber, valueDataType); - } - } -} - -- (void)addEntriesFromDictionary:(GPBBoolBoolDictionary *)otherDictionary { - if (otherDictionary) { - for (int i = 0; i < 2; ++i) { - if (otherDictionary->_valueSet[i]) { - _valueSet[i] = YES; - _values[i] = otherDictionary->_values[i]; - } - } - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setBool:(BOOL)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - _values[idx] = value; - _valueSet[idx] = YES; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeBoolForKey:(BOOL)aKey { - _valueSet[aKey ? 1 : 0] = NO; -} - -- (void)removeAll { - _valueSet[0] = NO; - _valueSet[1] = NO; -} - -@end - -//%PDDM-EXPAND DICTIONARY_BOOL_KEY_TO_POD_IMPL(Float, float) -// This block of code is generated, do not edit it directly. - -#pragma mark - Bool -> Float - -@implementation GPBBoolFloatDictionary { - @package - float _values[2]; - BOOL _valueSet[2]; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithFloats:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithFloat:(float)value - forKey:(BOOL)key { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBBoolFloatDictionary*)[self alloc] initWithFloats:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithFloats:(const float [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithFloats:forKeys:count: - // on to get the type correct. - return [[(GPBBoolFloatDictionary*)[self alloc] initWithFloats:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBBoolFloatDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBBoolFloatDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithFloats:(const float [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - for (NSUInteger i = 0; i < count; ++i) { - int idx = keys[i] ? 1 : 0; - _values[idx] = values[i]; - _valueSet[idx] = YES; - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBBoolFloatDictionary *)dictionary { - self = [self initWithFloats:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - for (int i = 0; i < 2; ++i) { - if (dictionary->_valueSet[i]) { - _values[i] = dictionary->_values[i]; - _valueSet[i] = YES; - } - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithFloats:NULL forKeys:NULL count:0]; -} - -#if !defined(NS_BLOCK_ASSERTIONS) -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [super dealloc]; -} -#endif // !defined(NS_BLOCK_ASSERTIONS) - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBBoolFloatDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBBoolFloatDictionary class]]) { - return NO; - } - GPBBoolFloatDictionary *otherDictionary = other; - if ((_valueSet[0] != otherDictionary->_valueSet[0]) || - (_valueSet[1] != otherDictionary->_valueSet[1])) { - return NO; - } - if ((_valueSet[0] && (_values[0] != otherDictionary->_values[0])) || - (_valueSet[1] && (_values[1] != otherDictionary->_values[1]))) { - return NO; - } - return YES; -} - -- (NSUInteger)hash { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> {", [self class], self]; - if (_valueSet[0]) { - [result appendFormat:@"NO: %f", _values[0]]; - } - if (_valueSet[1]) { - [result appendFormat:@"YES: %f", _values[1]]; - } - [result appendString:@" }"]; - return result; -} - -- (NSUInteger)count { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (BOOL)getFloat:(float *)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - if (_valueSet[idx]) { - if (value) { - *value = _values[idx]; - } - return YES; - } - return NO; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - int idx = (key->valueBool ? 1 : 0); - _values[idx] = value->valueFloat; - _valueSet[idx] = YES; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - if (_valueSet[0]) { - block(@"false", [NSString stringWithFormat:@"%.*g", FLT_DIG, _values[0]]); - } - if (_valueSet[1]) { - block(@"true", [NSString stringWithFormat:@"%.*g", FLT_DIG, _values[1]]); - } -} - -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(BOOL key, float value, BOOL *stop))block { - BOOL stop = NO; - if (_valueSet[0]) { - block(NO, _values[0], &stop); - } - if (!stop && _valueSet[1]) { - block(YES, _values[1], &stop); - } -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - NSUInteger count = 0; - size_t result = 0; - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - ++count; - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictFloatFieldSize(_values[i], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - } - } - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictFloatFieldSize(_values[i], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictBoolField(outputStream, (i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - WriteDictFloatField(outputStream, _values[i], kMapValueFieldNumber, valueDataType); - } - } -} - -- (void)addEntriesFromDictionary:(GPBBoolFloatDictionary *)otherDictionary { - if (otherDictionary) { - for (int i = 0; i < 2; ++i) { - if (otherDictionary->_valueSet[i]) { - _valueSet[i] = YES; - _values[i] = otherDictionary->_values[i]; - } - } - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setFloat:(float)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - _values[idx] = value; - _valueSet[idx] = YES; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeFloatForKey:(BOOL)aKey { - _valueSet[aKey ? 1 : 0] = NO; -} - -- (void)removeAll { - _valueSet[0] = NO; - _valueSet[1] = NO; -} - -@end - -//%PDDM-EXPAND DICTIONARY_BOOL_KEY_TO_POD_IMPL(Double, double) -// This block of code is generated, do not edit it directly. - -#pragma mark - Bool -> Double - -@implementation GPBBoolDoubleDictionary { - @package - double _values[2]; - BOOL _valueSet[2]; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithDoubles:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithDouble:(double)value - forKey:(BOOL)key { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBBoolDoubleDictionary*)[self alloc] initWithDoubles:&value - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithDoubles:(const double [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithDoubles:forKeys:count: - // on to get the type correct. - return [[(GPBBoolDoubleDictionary*)[self alloc] initWithDoubles:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBBoolDoubleDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBBoolDoubleDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithDoubles:(const double [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - for (NSUInteger i = 0; i < count; ++i) { - int idx = keys[i] ? 1 : 0; - _values[idx] = values[i]; - _valueSet[idx] = YES; - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBBoolDoubleDictionary *)dictionary { - self = [self initWithDoubles:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - for (int i = 0; i < 2; ++i) { - if (dictionary->_valueSet[i]) { - _values[i] = dictionary->_values[i]; - _valueSet[i] = YES; - } - } - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithDoubles:NULL forKeys:NULL count:0]; -} - -#if !defined(NS_BLOCK_ASSERTIONS) -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [super dealloc]; -} -#endif // !defined(NS_BLOCK_ASSERTIONS) - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBBoolDoubleDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBBoolDoubleDictionary class]]) { - return NO; - } - GPBBoolDoubleDictionary *otherDictionary = other; - if ((_valueSet[0] != otherDictionary->_valueSet[0]) || - (_valueSet[1] != otherDictionary->_valueSet[1])) { - return NO; - } - if ((_valueSet[0] && (_values[0] != otherDictionary->_values[0])) || - (_valueSet[1] && (_values[1] != otherDictionary->_values[1]))) { - return NO; - } - return YES; -} - -- (NSUInteger)hash { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> {", [self class], self]; - if (_valueSet[0]) { - [result appendFormat:@"NO: %lf", _values[0]]; - } - if (_valueSet[1]) { - [result appendFormat:@"YES: %lf", _values[1]]; - } - [result appendString:@" }"]; - return result; -} - -- (NSUInteger)count { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (BOOL)getDouble:(double *)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - if (_valueSet[idx]) { - if (value) { - *value = _values[idx]; - } - return YES; - } - return NO; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - int idx = (key->valueBool ? 1 : 0); - _values[idx] = value->valueDouble; - _valueSet[idx] = YES; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - if (_valueSet[0]) { - block(@"false", [NSString stringWithFormat:@"%.*lg", DBL_DIG, _values[0]]); - } - if (_valueSet[1]) { - block(@"true", [NSString stringWithFormat:@"%.*lg", DBL_DIG, _values[1]]); - } -} - -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(BOOL key, double value, BOOL *stop))block { - BOOL stop = NO; - if (_valueSet[0]) { - block(NO, _values[0], &stop); - } - if (!stop && _valueSet[1]) { - block(YES, _values[1], &stop); - } -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - NSUInteger count = 0; - size_t result = 0; - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - ++count; - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictDoubleFieldSize(_values[i], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - } - } - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictDoubleFieldSize(_values[i], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictBoolField(outputStream, (i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - WriteDictDoubleField(outputStream, _values[i], kMapValueFieldNumber, valueDataType); - } - } -} - -- (void)addEntriesFromDictionary:(GPBBoolDoubleDictionary *)otherDictionary { - if (otherDictionary) { - for (int i = 0; i < 2; ++i) { - if (otherDictionary->_valueSet[i]) { - _valueSet[i] = YES; - _values[i] = otherDictionary->_values[i]; - } - } - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setDouble:(double)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - _values[idx] = value; - _valueSet[idx] = YES; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeDoubleForKey:(BOOL)aKey { - _valueSet[aKey ? 1 : 0] = NO; -} - -- (void)removeAll { - _valueSet[0] = NO; - _valueSet[1] = NO; -} - -@end - -//%PDDM-EXPAND DICTIONARY_BOOL_KEY_TO_OBJECT_IMPL(Object, id) -// This block of code is generated, do not edit it directly. - -#pragma mark - Bool -> Object - -@implementation GPBBoolObjectDictionary { - @package - id _values[2]; -} - -+ (instancetype)dictionary { - return [[[self alloc] initWithObjects:NULL forKeys:NULL count:0] autorelease]; -} - -+ (instancetype)dictionaryWithObject:(id)object - forKey:(BOOL)key { - // Cast is needed so the compiler knows what class we are invoking initWithObjects:forKeys:count: - // on to get the type correct. - return [[(GPBBoolObjectDictionary*)[self alloc] initWithObjects:&object - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithObjects:(const id [])objects - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithObjects:forKeys:count: - // on to get the type correct. - return [[(GPBBoolObjectDictionary*)[self alloc] initWithObjects:objects - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBBoolObjectDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithDictionary: - // on to get the type correct. - return [[(GPBBoolObjectDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithCapacity:(NSUInteger)numItems { - return [[[self alloc] initWithCapacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithObjects:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithObjects:(const id [])objects - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - for (NSUInteger i = 0; i < count; ++i) { - if (!objects[i]) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil object to a Dictionary"]; - } - int idx = keys[i] ? 1 : 0; - [_values[idx] release]; - _values[idx] = (id)[objects[i] retain]; - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBBoolObjectDictionary *)dictionary { - self = [self initWithObjects:NULL forKeys:NULL count:0]; - if (self) { - if (dictionary) { - _values[0] = [dictionary->_values[0] retain]; - _values[1] = [dictionary->_values[1] retain]; - } - } - return self; -} - -- (instancetype)initWithCapacity:(NSUInteger)numItems { - #pragma unused(numItems) - return [self initWithObjects:NULL forKeys:NULL count:0]; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_values[0] release]; - [_values[1] release]; - [super dealloc]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBBoolObjectDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBBoolObjectDictionary class]]) { - return NO; - } - GPBBoolObjectDictionary *otherDictionary = other; - if (((_values[0] != nil) != (otherDictionary->_values[0] != nil)) || - ((_values[1] != nil) != (otherDictionary->_values[1] != nil))) { - return NO; - } - if (((_values[0] != nil) && (![_values[0] isEqual:otherDictionary->_values[0]])) || - ((_values[1] != nil) && (![_values[1] isEqual:otherDictionary->_values[1]]))) { - return NO; - } - return YES; -} - -- (NSUInteger)hash { - return ((_values[0] != nil) ? 1 : 0) + ((_values[1] != nil) ? 1 : 0); -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> {", [self class], self]; - if ((_values[0] != nil)) { - [result appendFormat:@"NO: %@", _values[0]]; - } - if ((_values[1] != nil)) { - [result appendFormat:@"YES: %@", _values[1]]; - } - [result appendString:@" }"]; - return result; -} - -- (NSUInteger)count { - return ((_values[0] != nil) ? 1 : 0) + ((_values[1] != nil) ? 1 : 0); -} - -- (id)objectForKey:(BOOL)key { - return _values[key ? 1 : 0]; -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - int idx = (key->valueBool ? 1 : 0); - [_values[idx] release]; - _values[idx] = [value->valueString retain]; -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - if (_values[0] != nil) { - block(@"false", _values[0]); - } - if ((_values[1] != nil)) { - block(@"true", _values[1]); - } -} - -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(BOOL key, id object, BOOL *stop))block { - BOOL stop = NO; - if (_values[0] != nil) { - block(NO, _values[0], &stop); - } - if (!stop && (_values[1] != nil)) { - block(YES, _values[1], &stop); - } -} - -- (BOOL)isInitialized { - if (_values[0] && ![_values[0] isInitialized]) { - return NO; - } - if (_values[1] && ![_values[1] isInitialized]) { - return NO; - } - return YES; -} - -- (instancetype)deepCopyWithZone:(NSZone *)zone { - GPBBoolObjectDictionary *newDict = - [[GPBBoolObjectDictionary alloc] init]; - for (int i = 0; i < 2; ++i) { - if (_values[i] != nil) { - newDict->_values[i] = [_values[i] copyWithZone:zone]; - } - } - return newDict; -} - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - NSUInteger count = 0; - size_t result = 0; - for (int i = 0; i < 2; ++i) { - if (_values[i] != nil) { - ++count; - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictObjectFieldSize(_values[i], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - } - } - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - for (int i = 0; i < 2; ++i) { - if (_values[i] != nil) { - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictObjectFieldSize(_values[i], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictBoolField(outputStream, (i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - WriteDictObjectField(outputStream, _values[i], kMapValueFieldNumber, valueDataType); - } - } -} - -- (void)addEntriesFromDictionary:(GPBBoolObjectDictionary *)otherDictionary { - if (otherDictionary) { - for (int i = 0; i < 2; ++i) { - if (otherDictionary->_values[i] != nil) { - [_values[i] release]; - _values[i] = [otherDictionary->_values[i] retain]; - } - } - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setObject:(id)object forKey:(BOOL)key { - if (!object) { - [NSException raise:NSInvalidArgumentException - format:@"Attempting to add nil object to a Dictionary"]; - } - int idx = (key ? 1 : 0); - [_values[idx] release]; - _values[idx] = [object retain]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeObjectForKey:(BOOL)aKey { - int idx = (aKey ? 1 : 0); - [_values[idx] release]; - _values[idx] = nil; -} - -- (void)removeAll { - for (int i = 0; i < 2; ++i) { - [_values[i] release]; - _values[i] = nil; - } -} - -@end - -//%PDDM-EXPAND-END (8 expansions) - -#pragma mark - Bool -> Enum - -@implementation GPBBoolEnumDictionary { - @package - GPBEnumValidationFunc _validationFunc; - int32_t _values[2]; - BOOL _valueSet[2]; -} - -@synthesize validationFunc = _validationFunc; - -+ (instancetype)dictionary { - return [[[self alloc] initWithValidationFunction:NULL - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func { - return [[[self alloc] initWithValidationFunction:func - rawValues:NULL - forKeys:NULL - count:0] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValue:(int32_t)rawValue - forKey:(BOOL)key { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBBoolEnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:&rawValue - forKeys:&key - count:1] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])values - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBBoolEnumDictionary*)[self alloc] initWithValidationFunction:func - rawValues:values - forKeys:keys - count:count] autorelease]; -} - -+ (instancetype)dictionaryWithDictionary:(GPBBoolEnumDictionary *)dictionary { - // Cast is needed so the compiler knows what class we are invoking initWithValues:forKeys:count: - // on to get the type correct. - return [[(GPBBoolEnumDictionary*)[self alloc] initWithDictionary:dictionary] autorelease]; -} - -+ (instancetype)dictionaryWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { - return [[[self alloc] initWithValidationFunction:func capacity:numItems] autorelease]; -} - -- (instancetype)init { - return [self initWithValidationFunction:NULL rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func { - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - rawValues:(const int32_t [])rawValues - forKeys:(const BOOL [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _validationFunc = (func != NULL ? func : DictDefault_IsValidValue); - for (NSUInteger i = 0; i < count; ++i) { - int idx = keys[i] ? 1 : 0; - _values[idx] = rawValues[i]; - _valueSet[idx] = YES; - } - } - return self; -} - -- (instancetype)initWithDictionary:(GPBBoolEnumDictionary *)dictionary { - self = [self initWithValidationFunction:dictionary.validationFunc - rawValues:NULL - forKeys:NULL - count:0]; - if (self) { - if (dictionary) { - for (int i = 0; i < 2; ++i) { - if (dictionary->_valueSet[i]) { - _values[i] = dictionary->_values[i]; - _valueSet[i] = YES; - } - } - } - } - return self; -} - -- (instancetype)initWithValidationFunction:(GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems { -#pragma unused(numItems) - return [self initWithValidationFunction:func rawValues:NULL forKeys:NULL count:0]; -} - -#if !defined(NS_BLOCK_ASSERTIONS) -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [super dealloc]; -} -#endif // !defined(NS_BLOCK_ASSERTIONS) - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[GPBBoolEnumDictionary allocWithZone:zone] initWithDictionary:self]; -} - -- (BOOL)isEqual:(id)other { - if (self == other) { - return YES; - } - if (![other isKindOfClass:[GPBBoolEnumDictionary class]]) { - return NO; - } - GPBBoolEnumDictionary *otherDictionary = other; - if ((_valueSet[0] != otherDictionary->_valueSet[0]) || - (_valueSet[1] != otherDictionary->_valueSet[1])) { - return NO; - } - if ((_valueSet[0] && (_values[0] != otherDictionary->_values[0])) || - (_valueSet[1] && (_values[1] != otherDictionary->_values[1]))) { - return NO; - } - return YES; -} - -- (NSUInteger)hash { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (NSString *)description { - NSMutableString *result = [NSMutableString stringWithFormat:@"<%@ %p> {", [self class], self]; - if (_valueSet[0]) { - [result appendFormat:@"NO: %d", _values[0]]; - } - if (_valueSet[1]) { - [result appendFormat:@"YES: %d", _values[1]]; - } - [result appendString:@" }"]; - return result; -} - -- (NSUInteger)count { - return (_valueSet[0] ? 1 : 0) + (_valueSet[1] ? 1 : 0); -} - -- (BOOL)getEnum:(int32_t*)value forKey:(BOOL)key { - int idx = (key ? 1 : 0); - if (_valueSet[idx]) { - if (value) { - int32_t result = _values[idx]; - if (!_validationFunc(result)) { - result = kGPBUnrecognizedEnumeratorValue; - } - *value = result; - } - return YES; - } - return NO; -} - -- (BOOL)getRawValue:(int32_t*)rawValue forKey:(BOOL)key { - int idx = (key ? 1 : 0); - if (_valueSet[idx]) { - if (rawValue) { - *rawValue = _values[idx]; - } - return YES; - } - return NO; -} - -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(BOOL key, int32_t value, BOOL *stop))block { - BOOL stop = NO; - if (_valueSet[0]) { - block(NO, _values[0], &stop); - } - if (!stop && _valueSet[1]) { - block(YES, _values[1], &stop); - } -} - -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(BOOL key, int32_t rawValue, BOOL *stop))block { - BOOL stop = NO; - GPBEnumValidationFunc func = _validationFunc; - int32_t validatedValue; - if (_valueSet[0]) { - validatedValue = _values[0]; - if (!func(validatedValue)) { - validatedValue = kGPBUnrecognizedEnumeratorValue; - } - block(NO, validatedValue, &stop); - } - if (!stop && _valueSet[1]) { - validatedValue = _values[1]; - if (!func(validatedValue)) { - validatedValue = kGPBUnrecognizedEnumeratorValue; - } - block(YES, validatedValue, &stop); - } -} - -//%PDDM-EXPAND SERIAL_DATA_FOR_ENTRY_POD_Enum(Bool) -// This block of code is generated, do not edit it directly. - -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType { - size_t msgSize = ComputeDictBoolFieldSize(key->valueBool, kMapKeyFieldNumber, keyDataType); - msgSize += ComputeDictEnumFieldSize(value, kMapValueFieldNumber, GPBDataTypeEnum); - NSMutableData *data = [NSMutableData dataWithLength:msgSize]; - GPBCodedOutputStream *outputStream = [[GPBCodedOutputStream alloc] initWithData:data]; - WriteDictBoolField(outputStream, key->valueBool, kMapKeyFieldNumber, keyDataType); - WriteDictEnumField(outputStream, value, kMapValueFieldNumber, GPBDataTypeEnum); - [outputStream release]; - return data; -} - -//%PDDM-EXPAND-END SERIAL_DATA_FOR_ENTRY_POD_Enum(Bool) - -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - NSUInteger count = 0; - size_t result = 0; - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - ++count; - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictInt32FieldSize(_values[i], kMapValueFieldNumber, valueDataType); - result += GPBComputeRawVarint32SizeForInteger(msgSize) + msgSize; - } - } - size_t tagSize = GPBComputeWireFormatTagSize(GPBFieldNumber(field), GPBDataTypeMessage); - result += tagSize * count; - return result; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field { - GPBDataType valueDataType = GPBGetFieldDataType(field); - uint32_t tag = GPBWireFormatMakeTag(GPBFieldNumber(field), GPBWireFormatLengthDelimited); - for (int i = 0; i < 2; ++i) { - if (_valueSet[i]) { - // Write the tag. - [outputStream writeInt32NoTag:tag]; - // Write the size of the message. - size_t msgSize = ComputeDictBoolFieldSize((i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - msgSize += ComputeDictInt32FieldSize(_values[i], kMapValueFieldNumber, valueDataType); - [outputStream writeInt32NoTag:(int32_t)msgSize]; - // Write the fields. - WriteDictBoolField(outputStream, (i == 1), kMapKeyFieldNumber, GPBDataTypeBool); - WriteDictInt32Field(outputStream, _values[i], kMapValueFieldNumber, valueDataType); - } - } -} - -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block { - if (_valueSet[0]) { - block(@"false", @(_values[0])); - } - if (_valueSet[1]) { - block(@"true", @(_values[1])); - } -} - -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key { - int idx = (key->valueBool ? 1 : 0); - _values[idx] = value->valueInt32; - _valueSet[idx] = YES; -} - -- (void)addRawEntriesFromDictionary:(GPBBoolEnumDictionary *)otherDictionary { - if (otherDictionary) { - for (int i = 0; i < 2; ++i) { - if (otherDictionary->_valueSet[i]) { - _valueSet[i] = YES; - _values[i] = otherDictionary->_values[i]; - } - } - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } - } -} - -- (void)setEnum:(int32_t)value forKey:(BOOL)key { - if (!_validationFunc(value)) { - [NSException raise:NSInvalidArgumentException - format:@"GPBBoolEnumDictionary: Attempt to set an unknown enum value (%d)", - value]; - } - int idx = (key ? 1 : 0); - _values[idx] = value; - _valueSet[idx] = YES; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)setRawValue:(int32_t)rawValue forKey:(BOOL)key { - int idx = (key ? 1 : 0); - _values[idx] = rawValue; - _valueSet[idx] = YES; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeEnumForKey:(BOOL)aKey { - _valueSet[aKey ? 1 : 0] = NO; -} - -- (void)removeAll { - _valueSet[0] = NO; - _valueSet[1] = NO; -} - -@end - -#pragma mark - NSDictionary Subclass - -@implementation GPBAutocreatedDictionary { - NSMutableDictionary *_dictionary; -} - -- (void)dealloc { - NSAssert(!_autocreator, - @"%@: Autocreator must be cleared before release, autocreator: %@", - [self class], _autocreator); - [_dictionary release]; - [super dealloc]; -} - -#pragma mark Required NSDictionary overrides - -- (instancetype)initWithObjects:(const id [])objects - forKeys:(const id [])keys - count:(NSUInteger)count { - self = [super init]; - if (self) { - _dictionary = [[NSMutableDictionary alloc] initWithObjects:objects - forKeys:keys - count:count]; - } - return self; -} - -- (NSUInteger)count { - return [_dictionary count]; -} - -- (id)objectForKey:(id)aKey { - return [_dictionary objectForKey:aKey]; -} - -- (NSEnumerator *)keyEnumerator { - if (_dictionary == nil) { - _dictionary = [[NSMutableDictionary alloc] init]; - } - return [_dictionary keyEnumerator]; -} - -#pragma mark Required NSMutableDictionary overrides - -// Only need to call GPBAutocreatedDictionaryModified() when adding things -// since we only autocreate empty dictionaries. - -- (void)setObject:(id)anObject forKey:(id)aKey { - if (_dictionary == nil) { - _dictionary = [[NSMutableDictionary alloc] init]; - } - [_dictionary setObject:anObject forKey:aKey]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)removeObjectForKey:(id)aKey { - [_dictionary removeObjectForKey:aKey]; -} - -#pragma mark Extra things hooked - -- (id)copyWithZone:(NSZone *)zone { - if (_dictionary == nil) { - return [[NSMutableDictionary allocWithZone:zone] init]; - } - return [_dictionary copyWithZone:zone]; -} - -- (id)mutableCopyWithZone:(NSZone *)zone { - if (_dictionary == nil) { - return [[NSMutableDictionary allocWithZone:zone] init]; - } - return [_dictionary mutableCopyWithZone:zone]; -} - -// Not really needed, but subscripting is likely common enough it doesn't hurt -// to ensure it goes directly to the real NSMutableDictionary. -- (id)objectForKeyedSubscript:(id)key { - return [_dictionary objectForKeyedSubscript:key]; -} - -// Not really needed, but subscripting is likely common enough it doesn't hurt -// to ensure it goes directly to the real NSMutableDictionary. -- (void)setObject:(id)obj forKeyedSubscript:(id)key { - if (_dictionary == nil) { - _dictionary = [[NSMutableDictionary alloc] init]; - } - [_dictionary setObject:obj forKeyedSubscript:key]; - if (_autocreator) { - GPBAutocreatedDictionaryModified(_autocreator, self); - } -} - -- (void)enumerateKeysAndObjectsUsingBlock:(void (^)(id key, - id obj, - BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsUsingBlock:block]; -} - -- (void)enumerateKeysAndObjectsWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(id key, - id obj, - BOOL *stop))block { - [_dictionary enumerateKeysAndObjectsWithOptions:opts usingBlock:block]; -} - -@end - -#pragma clang diagnostic pop diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBDictionary_PackagePrivate.h b/Old My Mind/Pods/Protobuf/objectivec/GPBDictionary_PackagePrivate.h deleted file mode 100755 index 7b921e8..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBDictionary_PackagePrivate.h +++ /dev/null @@ -1,488 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBDictionary.h" - -@class GPBCodedInputStream; -@class GPBCodedOutputStream; -@class GPBExtensionRegistry; -@class GPBFieldDescriptor; - -@protocol GPBDictionaryInternalsProtocol -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field; -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field; -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key; -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block; -@end - -//%PDDM-DEFINE DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(KEY_NAME) -//%DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Object, Object) -//%PDDM-DEFINE DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt32, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int32, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt64, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int64, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Bool, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Float, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Double, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Enum, Enum) - -//%PDDM-DEFINE DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, VALUE_NAME, HELPER) -//%@interface GPB##KEY_NAME##VALUE_NAME##Dictionary () { -//% @package -//% GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -//%} -//%EXTRA_DICTIONARY_PRIVATE_INTERFACES_##HELPER()@end -//% - -//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Basic() -// Empty -//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Object() -//%- (BOOL)isInitialized; -//%- (instancetype)deepCopyWithZone:(NSZone *)zone -//% __attribute__((ns_returns_retained)); -//% -//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Enum() -//%- (NSData *)serializedDataForUnknownValue:(int32_t)value -//% forKey:(GPBGenericValue *)key -//% keyDataType:(GPBDataType)keyDataType; -//% - -//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt32) -// This block of code is generated, do not edit it directly. - -@interface GPBUInt32UInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32Int32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32UInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32Int64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32BoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32FloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32DoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32EnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -@interface GPBUInt32ObjectDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (BOOL)isInitialized; -- (instancetype)deepCopyWithZone:(NSZone *)zone - __attribute__((ns_returns_retained)); -@end - -//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int32) -// This block of code is generated, do not edit it directly. - -@interface GPBInt32UInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32Int32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32UInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32Int64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32BoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32FloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32DoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32EnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -@interface GPBInt32ObjectDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (BOOL)isInitialized; -- (instancetype)deepCopyWithZone:(NSZone *)zone - __attribute__((ns_returns_retained)); -@end - -//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt64) -// This block of code is generated, do not edit it directly. - -@interface GPBUInt64UInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64Int32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64UInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64Int64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64BoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64FloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64DoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64EnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -@interface GPBUInt64ObjectDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (BOOL)isInitialized; -- (instancetype)deepCopyWithZone:(NSZone *)zone - __attribute__((ns_returns_retained)); -@end - -//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int64) -// This block of code is generated, do not edit it directly. - -@interface GPBInt64UInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64Int32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64UInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64Int64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64BoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64FloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64DoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64EnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -@interface GPBInt64ObjectDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (BOOL)isInitialized; -- (instancetype)deepCopyWithZone:(NSZone *)zone - __attribute__((ns_returns_retained)); -@end - -//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Bool) -// This block of code is generated, do not edit it directly. - -@interface GPBBoolUInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolUInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolBoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolFloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolDoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolEnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -@interface GPBBoolObjectDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (BOOL)isInitialized; -- (instancetype)deepCopyWithZone:(NSZone *)zone - __attribute__((ns_returns_retained)); -@end - -//%PDDM-EXPAND DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(String) -// This block of code is generated, do not edit it directly. - -@interface GPBStringUInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringUInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringBoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringFloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringDoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringEnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -//%PDDM-EXPAND-END (6 expansions) - -#pragma mark - NSDictionary Subclass - -@interface GPBAutocreatedDictionary : NSMutableDictionary { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Helpers - -CF_EXTERN_C_BEGIN - -// Helper to compute size when an NSDictionary is used for the map instead -// of a custom type. -size_t GPBDictionaryComputeSizeInternalHelper(NSDictionary *dict, - GPBFieldDescriptor *field); - -// Helper to write out when an NSDictionary is used for the map instead -// of a custom type. -void GPBDictionaryWriteToStreamInternalHelper( - GPBCodedOutputStream *outputStream, NSDictionary *dict, - GPBFieldDescriptor *field); - -// Helper to check message initialization when an NSDictionary is used for -// the map instead of a custom type. -BOOL GPBDictionaryIsInitializedInternalHelper(NSDictionary *dict, - GPBFieldDescriptor *field); - -// Helper to read a map instead. -void GPBDictionaryReadEntry(id mapDictionary, GPBCodedInputStream *stream, - GPBExtensionRegistry *registry, - GPBFieldDescriptor *field, - GPBMessage *parentMessage); - -CF_EXTERN_C_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionInternals.h b/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionInternals.h deleted file mode 100755 index 2b980ae..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionInternals.h +++ /dev/null @@ -1,50 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBDescriptor.h" - -@class GPBCodedInputStream; -@class GPBCodedOutputStream; -@class GPBExtensionRegistry; - -void GPBExtensionMergeFromInputStream(GPBExtensionDescriptor *extension, - BOOL isPackedOnStream, - GPBCodedInputStream *input, - GPBExtensionRegistry *extensionRegistry, - GPBMessage *message); - -size_t GPBComputeExtensionSerializedSizeIncludingTag( - GPBExtensionDescriptor *extension, id value); - -void GPBWriteExtensionValueToOutputStream(GPBExtensionDescriptor *extension, - id value, - GPBCodedOutputStream *output); diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionInternals.m b/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionInternals.m deleted file mode 100755 index 290c82a..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionInternals.m +++ /dev/null @@ -1,391 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBExtensionInternals.h" - -#import - -#import "GPBCodedInputStream_PackagePrivate.h" -#import "GPBCodedOutputStream_PackagePrivate.h" -#import "GPBDescriptor_PackagePrivate.h" -#import "GPBMessage_PackagePrivate.h" -#import "GPBUtilities_PackagePrivate.h" - -static id NewSingleValueFromInputStream(GPBExtensionDescriptor *extension, - GPBCodedInputStream *input, - GPBExtensionRegistry *extensionRegistry, - GPBMessage *existingValue) - __attribute__((ns_returns_retained)); - -GPB_INLINE size_t DataTypeSize(GPBDataType dataType) { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wswitch-enum" - switch (dataType) { - case GPBDataTypeBool: - return 1; - case GPBDataTypeFixed32: - case GPBDataTypeSFixed32: - case GPBDataTypeFloat: - return 4; - case GPBDataTypeFixed64: - case GPBDataTypeSFixed64: - case GPBDataTypeDouble: - return 8; - default: - return 0; - } -#pragma clang diagnostic pop -} - -static size_t ComputePBSerializedSizeNoTagOfObject(GPBDataType dataType, id object) { -#define FIELD_CASE(TYPE, ACCESSOR) \ - case GPBDataType##TYPE: \ - return GPBCompute##TYPE##SizeNoTag([(NSNumber *)object ACCESSOR]); -#define FIELD_CASE2(TYPE) \ - case GPBDataType##TYPE: \ - return GPBCompute##TYPE##SizeNoTag(object); - switch (dataType) { - FIELD_CASE(Bool, boolValue) - FIELD_CASE(Float, floatValue) - FIELD_CASE(Double, doubleValue) - FIELD_CASE(Int32, intValue) - FIELD_CASE(SFixed32, intValue) - FIELD_CASE(SInt32, intValue) - FIELD_CASE(Enum, intValue) - FIELD_CASE(Int64, longLongValue) - FIELD_CASE(SInt64, longLongValue) - FIELD_CASE(SFixed64, longLongValue) - FIELD_CASE(UInt32, unsignedIntValue) - FIELD_CASE(Fixed32, unsignedIntValue) - FIELD_CASE(UInt64, unsignedLongLongValue) - FIELD_CASE(Fixed64, unsignedLongLongValue) - FIELD_CASE2(Bytes) - FIELD_CASE2(String) - FIELD_CASE2(Message) - FIELD_CASE2(Group) - } -#undef FIELD_CASE -#undef FIELD_CASE2 -} - -static size_t ComputeSerializedSizeIncludingTagOfObject( - GPBExtensionDescription *description, id object) { -#define FIELD_CASE(TYPE, ACCESSOR) \ - case GPBDataType##TYPE: \ - return GPBCompute##TYPE##Size(description->fieldNumber, \ - [(NSNumber *)object ACCESSOR]); -#define FIELD_CASE2(TYPE) \ - case GPBDataType##TYPE: \ - return GPBCompute##TYPE##Size(description->fieldNumber, object); - switch (description->dataType) { - FIELD_CASE(Bool, boolValue) - FIELD_CASE(Float, floatValue) - FIELD_CASE(Double, doubleValue) - FIELD_CASE(Int32, intValue) - FIELD_CASE(SFixed32, intValue) - FIELD_CASE(SInt32, intValue) - FIELD_CASE(Enum, intValue) - FIELD_CASE(Int64, longLongValue) - FIELD_CASE(SInt64, longLongValue) - FIELD_CASE(SFixed64, longLongValue) - FIELD_CASE(UInt32, unsignedIntValue) - FIELD_CASE(Fixed32, unsignedIntValue) - FIELD_CASE(UInt64, unsignedLongLongValue) - FIELD_CASE(Fixed64, unsignedLongLongValue) - FIELD_CASE2(Bytes) - FIELD_CASE2(String) - FIELD_CASE2(Group) - case GPBDataTypeMessage: - if (GPBExtensionIsWireFormat(description)) { - return GPBComputeMessageSetExtensionSize(description->fieldNumber, - object); - } else { - return GPBComputeMessageSize(description->fieldNumber, object); - } - } -#undef FIELD_CASE -#undef FIELD_CASE2 -} - -static size_t ComputeSerializedSizeIncludingTagOfArray( - GPBExtensionDescription *description, NSArray *values) { - if (GPBExtensionIsPacked(description)) { - size_t size = 0; - size_t typeSize = DataTypeSize(description->dataType); - if (typeSize != 0) { - size = values.count * typeSize; - } else { - for (id value in values) { - size += - ComputePBSerializedSizeNoTagOfObject(description->dataType, value); - } - } - return size + GPBComputeTagSize(description->fieldNumber) + - GPBComputeRawVarint32SizeForInteger(size); - } else { - size_t size = 0; - for (id value in values) { - size += ComputeSerializedSizeIncludingTagOfObject(description, value); - } - return size; - } -} - -static void WriteObjectIncludingTagToCodedOutputStream( - id object, GPBExtensionDescription *description, - GPBCodedOutputStream *output) { -#define FIELD_CASE(TYPE, ACCESSOR) \ - case GPBDataType##TYPE: \ - [output write##TYPE:description->fieldNumber \ - value:[(NSNumber *)object ACCESSOR]]; \ - return; -#define FIELD_CASE2(TYPE) \ - case GPBDataType##TYPE: \ - [output write##TYPE:description->fieldNumber value:object]; \ - return; - switch (description->dataType) { - FIELD_CASE(Bool, boolValue) - FIELD_CASE(Float, floatValue) - FIELD_CASE(Double, doubleValue) - FIELD_CASE(Int32, intValue) - FIELD_CASE(SFixed32, intValue) - FIELD_CASE(SInt32, intValue) - FIELD_CASE(Enum, intValue) - FIELD_CASE(Int64, longLongValue) - FIELD_CASE(SInt64, longLongValue) - FIELD_CASE(SFixed64, longLongValue) - FIELD_CASE(UInt32, unsignedIntValue) - FIELD_CASE(Fixed32, unsignedIntValue) - FIELD_CASE(UInt64, unsignedLongLongValue) - FIELD_CASE(Fixed64, unsignedLongLongValue) - FIELD_CASE2(Bytes) - FIELD_CASE2(String) - FIELD_CASE2(Group) - case GPBDataTypeMessage: - if (GPBExtensionIsWireFormat(description)) { - [output writeMessageSetExtension:description->fieldNumber value:object]; - } else { - [output writeMessage:description->fieldNumber value:object]; - } - return; - } -#undef FIELD_CASE -#undef FIELD_CASE2 -} - -static void WriteObjectNoTagToCodedOutputStream( - id object, GPBExtensionDescription *description, - GPBCodedOutputStream *output) { -#define FIELD_CASE(TYPE, ACCESSOR) \ - case GPBDataType##TYPE: \ - [output write##TYPE##NoTag:[(NSNumber *)object ACCESSOR]]; \ - return; -#define FIELD_CASE2(TYPE) \ - case GPBDataType##TYPE: \ - [output write##TYPE##NoTag:object]; \ - return; - switch (description->dataType) { - FIELD_CASE(Bool, boolValue) - FIELD_CASE(Float, floatValue) - FIELD_CASE(Double, doubleValue) - FIELD_CASE(Int32, intValue) - FIELD_CASE(SFixed32, intValue) - FIELD_CASE(SInt32, intValue) - FIELD_CASE(Enum, intValue) - FIELD_CASE(Int64, longLongValue) - FIELD_CASE(SInt64, longLongValue) - FIELD_CASE(SFixed64, longLongValue) - FIELD_CASE(UInt32, unsignedIntValue) - FIELD_CASE(Fixed32, unsignedIntValue) - FIELD_CASE(UInt64, unsignedLongLongValue) - FIELD_CASE(Fixed64, unsignedLongLongValue) - FIELD_CASE2(Bytes) - FIELD_CASE2(String) - FIELD_CASE2(Message) - case GPBDataTypeGroup: - [output writeGroupNoTag:description->fieldNumber value:object]; - return; - } -#undef FIELD_CASE -#undef FIELD_CASE2 -} - -static void WriteArrayIncludingTagsToCodedOutputStream( - NSArray *values, GPBExtensionDescription *description, - GPBCodedOutputStream *output) { - if (GPBExtensionIsPacked(description)) { - [output writeTag:description->fieldNumber - format:GPBWireFormatLengthDelimited]; - size_t dataSize = 0; - size_t typeSize = DataTypeSize(description->dataType); - if (typeSize != 0) { - dataSize = values.count * typeSize; - } else { - for (id value in values) { - dataSize += - ComputePBSerializedSizeNoTagOfObject(description->dataType, value); - } - } - [output writeRawVarintSizeTAs32:dataSize]; - for (id value in values) { - WriteObjectNoTagToCodedOutputStream(value, description, output); - } - } else { - for (id value in values) { - WriteObjectIncludingTagToCodedOutputStream(value, description, output); - } - } -} - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -void GPBExtensionMergeFromInputStream(GPBExtensionDescriptor *extension, - BOOL isPackedOnStream, - GPBCodedInputStream *input, - GPBExtensionRegistry *extensionRegistry, - GPBMessage *message) { - GPBExtensionDescription *description = extension->description_; - GPBCodedInputStreamState *state = &input->state_; - if (isPackedOnStream) { - NSCAssert(GPBExtensionIsRepeated(description), - @"How was it packed if it isn't repeated?"); - int32_t length = GPBCodedInputStreamReadInt32(state); - size_t limit = GPBCodedInputStreamPushLimit(state, length); - while (GPBCodedInputStreamBytesUntilLimit(state) > 0) { - id value = NewSingleValueFromInputStream(extension, - input, - extensionRegistry, - nil); - [message addExtension:extension value:value]; - [value release]; - } - GPBCodedInputStreamPopLimit(state, limit); - } else { - id existingValue = nil; - BOOL isRepeated = GPBExtensionIsRepeated(description); - if (!isRepeated && GPBDataTypeIsMessage(description->dataType)) { - existingValue = [message getExistingExtension:extension]; - } - id value = NewSingleValueFromInputStream(extension, - input, - extensionRegistry, - existingValue); - if (isRepeated) { - [message addExtension:extension value:value]; - } else { - [message setExtension:extension value:value]; - } - [value release]; - } -} - -void GPBWriteExtensionValueToOutputStream(GPBExtensionDescriptor *extension, - id value, - GPBCodedOutputStream *output) { - GPBExtensionDescription *description = extension->description_; - if (GPBExtensionIsRepeated(description)) { - WriteArrayIncludingTagsToCodedOutputStream(value, description, output); - } else { - WriteObjectIncludingTagToCodedOutputStream(value, description, output); - } -} - -size_t GPBComputeExtensionSerializedSizeIncludingTag( - GPBExtensionDescriptor *extension, id value) { - GPBExtensionDescription *description = extension->description_; - if (GPBExtensionIsRepeated(description)) { - return ComputeSerializedSizeIncludingTagOfArray(description, value); - } else { - return ComputeSerializedSizeIncludingTagOfObject(description, value); - } -} - -// Note that this returns a retained value intentionally. -static id NewSingleValueFromInputStream(GPBExtensionDescriptor *extension, - GPBCodedInputStream *input, - GPBExtensionRegistry *extensionRegistry, - GPBMessage *existingValue) { - GPBExtensionDescription *description = extension->description_; - GPBCodedInputStreamState *state = &input->state_; - switch (description->dataType) { - case GPBDataTypeBool: return [[NSNumber alloc] initWithBool:GPBCodedInputStreamReadBool(state)]; - case GPBDataTypeFixed32: return [[NSNumber alloc] initWithUnsignedInt:GPBCodedInputStreamReadFixed32(state)]; - case GPBDataTypeSFixed32: return [[NSNumber alloc] initWithInt:GPBCodedInputStreamReadSFixed32(state)]; - case GPBDataTypeFloat: return [[NSNumber alloc] initWithFloat:GPBCodedInputStreamReadFloat(state)]; - case GPBDataTypeFixed64: return [[NSNumber alloc] initWithUnsignedLongLong:GPBCodedInputStreamReadFixed64(state)]; - case GPBDataTypeSFixed64: return [[NSNumber alloc] initWithLongLong:GPBCodedInputStreamReadSFixed64(state)]; - case GPBDataTypeDouble: return [[NSNumber alloc] initWithDouble:GPBCodedInputStreamReadDouble(state)]; - case GPBDataTypeInt32: return [[NSNumber alloc] initWithInt:GPBCodedInputStreamReadInt32(state)]; - case GPBDataTypeInt64: return [[NSNumber alloc] initWithLongLong:GPBCodedInputStreamReadInt64(state)]; - case GPBDataTypeSInt32: return [[NSNumber alloc] initWithInt:GPBCodedInputStreamReadSInt32(state)]; - case GPBDataTypeSInt64: return [[NSNumber alloc] initWithLongLong:GPBCodedInputStreamReadSInt64(state)]; - case GPBDataTypeUInt32: return [[NSNumber alloc] initWithUnsignedInt:GPBCodedInputStreamReadUInt32(state)]; - case GPBDataTypeUInt64: return [[NSNumber alloc] initWithUnsignedLongLong:GPBCodedInputStreamReadUInt64(state)]; - case GPBDataTypeBytes: return GPBCodedInputStreamReadRetainedBytes(state); - case GPBDataTypeString: return GPBCodedInputStreamReadRetainedString(state); - case GPBDataTypeEnum: return [[NSNumber alloc] initWithInt:GPBCodedInputStreamReadEnum(state)]; - case GPBDataTypeGroup: - case GPBDataTypeMessage: { - GPBMessage *message; - if (existingValue) { - message = [existingValue retain]; - } else { - GPBDescriptor *decriptor = [extension.msgClass descriptor]; - message = [[decriptor.messageClass alloc] init]; - } - - if (description->dataType == GPBDataTypeGroup) { - [input readGroup:description->fieldNumber - message:message - extensionRegistry:extensionRegistry]; - } else { - // description->dataType == GPBDataTypeMessage - if (GPBExtensionIsWireFormat(description)) { - // For MessageSet fields the message length will have already been - // read. - [message mergeFromCodedInputStream:input - extensionRegistry:extensionRegistry]; - } else { - [input readMessage:message extensionRegistry:extensionRegistry]; - } - } - - return message; - } - } - - return nil; -} - -#pragma clang diagnostic pop diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionRegistry.h b/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionRegistry.h deleted file mode 100755 index d79632d..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionRegistry.h +++ /dev/null @@ -1,87 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -@class GPBDescriptor; -@class GPBExtensionDescriptor; - -NS_ASSUME_NONNULL_BEGIN - -/** - * A table of known extensions, searchable by name or field number. When - * parsing a protocol message that might have extensions, you must provide a - * GPBExtensionRegistry in which you have registered any extensions that you - * want to be able to parse. Otherwise, those extensions will just be treated - * like unknown fields. - * - * The *Root classes provide `+extensionRegistry` for the extensions defined - * in a given file *and* all files it imports. You can also create a - * GPBExtensionRegistry, and merge those registries to handle parsing - * extensions defined from non overlapping files. - * - * ``` - * GPBExtensionRegistry *registry = [[MyProtoFileRoot extensionRegistry] copy]; - * [registry addExtension:[OtherMessage neededExtension]]; // Not in MyProtoFile - * NSError *parseError; - * MyMessage *msg = [MyMessage parseData:data extensionRegistry:registry error:&parseError]; - * ``` - **/ -@interface GPBExtensionRegistry : NSObject - -/** - * Adds the given GPBExtensionDescriptor to this registry. - * - * @param extension The extension description to add. - **/ -- (void)addExtension:(GPBExtensionDescriptor *)extension; - -/** - * Adds all the extensions from another registry to this registry. - * - * @param registry The registry to merge into this registry. - **/ -- (void)addExtensions:(GPBExtensionRegistry *)registry; - -/** - * Looks for the extension registered for the given field number on a given - * GPBDescriptor. - * - * @param descriptor The descriptor to look for a registered extension on. - * @param fieldNumber The field number of the extension to look for. - * - * @return The registered GPBExtensionDescriptor or nil if none was found. - **/ -- (nullable GPBExtensionDescriptor *)extensionForDescriptor:(GPBDescriptor *)descriptor - fieldNumber:(NSInteger)fieldNumber; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionRegistry.m b/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionRegistry.m deleted file mode 100755 index 65534b6..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBExtensionRegistry.m +++ /dev/null @@ -1,131 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBExtensionRegistry.h" - -#import "GPBBootstrap.h" -#import "GPBDescriptor.h" - -@implementation GPBExtensionRegistry { - NSMutableDictionary *mutableClassMap_; -} - -- (instancetype)init { - if ((self = [super init])) { - mutableClassMap_ = [[NSMutableDictionary alloc] init]; - } - return self; -} - -- (void)dealloc { - [mutableClassMap_ release]; - [super dealloc]; -} - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -- (instancetype)copyWithZone:(NSZone *)zone { - GPBExtensionRegistry *result = [[[self class] allocWithZone:zone] init]; - if (result && mutableClassMap_.count) { - [result->mutableClassMap_ addEntriesFromDictionary:mutableClassMap_]; - } - return result; -} - -- (CFMutableDictionaryRef)extensionMapForContainingMessageClass: - (Class)containingMessageClass { - CFMutableDictionaryRef extensionMap = (CFMutableDictionaryRef) - [mutableClassMap_ objectForKey:containingMessageClass]; - if (extensionMap == nil) { - // Use a custom dictionary here because the keys are numbers and conversion - // back and forth from NSNumber isn't worth the cost. - extensionMap = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, NULL, - &kCFTypeDictionaryValueCallBacks); - [mutableClassMap_ setObject:(id)extensionMap - forKey:(id)containingMessageClass]; - } - return extensionMap; -} - -- (void)addExtension:(GPBExtensionDescriptor *)extension { - if (extension == nil) { - return; - } - - Class containingMessageClass = extension.containingMessageClass; - CFMutableDictionaryRef extensionMap = - [self extensionMapForContainingMessageClass:containingMessageClass]; - ssize_t key = extension.fieldNumber; - CFDictionarySetValue(extensionMap, (const void *)key, extension); -} - -- (GPBExtensionDescriptor *)extensionForDescriptor:(GPBDescriptor *)descriptor - fieldNumber:(NSInteger)fieldNumber { - Class messageClass = descriptor.messageClass; - CFMutableDictionaryRef extensionMap = (CFMutableDictionaryRef) - [mutableClassMap_ objectForKey:messageClass]; - ssize_t key = fieldNumber; - GPBExtensionDescriptor *result = - (extensionMap - ? CFDictionaryGetValue(extensionMap, (const void *)key) - : nil); - return result; -} - -static void CopyKeyValue(const void *key, const void *value, void *context) { - CFMutableDictionaryRef extensionMap = (CFMutableDictionaryRef)context; - CFDictionarySetValue(extensionMap, key, value); -} - -- (void)addExtensions:(GPBExtensionRegistry *)registry { - if (registry == nil) { - // In the case where there are no extensions just ignore. - return; - } - NSMutableDictionary *otherClassMap = registry->mutableClassMap_; - [otherClassMap enumerateKeysAndObjectsUsingBlock:^(id key, id value, BOOL * stop) { -#pragma unused(stop) - Class containingMessageClass = key; - CFMutableDictionaryRef otherExtensionMap = (CFMutableDictionaryRef)value; - - CFMutableDictionaryRef extensionMap = - [self extensionMapForContainingMessageClass:containingMessageClass]; - - CFDictionaryApplyFunction(otherExtensionMap, CopyKeyValue, extensionMap); - }]; -} - -#pragma clang diagnostic pop - -@end diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBMessage.h b/Old My Mind/Pods/Protobuf/objectivec/GPBMessage.h deleted file mode 100755 index c07ec88..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBMessage.h +++ /dev/null @@ -1,456 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBBootstrap.h" - -@class GPBDescriptor; -@class GPBCodedInputStream; -@class GPBCodedOutputStream; -@class GPBExtensionDescriptor; -@class GPBExtensionRegistry; -@class GPBFieldDescriptor; -@class GPBUnknownFieldSet; - -NS_ASSUME_NONNULL_BEGIN - -CF_EXTERN_C_BEGIN - -/** NSError domain used for errors. */ -extern NSString *const GPBMessageErrorDomain; - -/** Error codes for NSErrors originated in GPBMessage. */ -typedef NS_ENUM(NSInteger, GPBMessageErrorCode) { - /** Uncategorized error. */ - GPBMessageErrorCodeOther = -100, - /** Message couldn't be serialized because it is missing required fields. */ - GPBMessageErrorCodeMissingRequiredField = -101, -}; - -/** - * Key under which the GPBMessage error's reason is stored inside the userInfo - * dictionary. - **/ -extern NSString *const GPBErrorReasonKey; - -CF_EXTERN_C_END - -/** - * Base class that each generated message subclasses from. - * - * @note While the class support NSSecureCoding, if the message has any - * extensions, they will end up reloaded in @c unknownFields as there is - * no way for the @c NSCoding plumbing to pass through a - * @c GPBExtensionRegistry. To support extensions, instead of passing the - * calls off to the Message, simple store the result of @c data, and then - * when loading, fetch the data and use - * @c +parseFromData:extensionRegistry:error: to provide an extension - * registry. - **/ -@interface GPBMessage : NSObject - -// If you add an instance method/property to this class that may conflict with -// fields declared in protos, you need to update objective_helpers.cc. The main -// cases are methods that take no arguments, or setFoo:/hasFoo: type methods. - -/** - * The set of unknown fields for this message. - * - * Only messages from proto files declared with "proto2" syntax support unknown - * fields. For "proto3" syntax, any unknown fields found while parsing are - * dropped. - **/ -@property(nonatomic, copy, nullable) GPBUnknownFieldSet *unknownFields; - -/** - * Whether the message, along with all submessages, have the required fields - * set. This is only applicable for files declared with "proto2" syntax, as - * there are no required fields for "proto3" syntax. - **/ -@property(nonatomic, readonly, getter=isInitialized) BOOL initialized; - -/** - * @return An autoreleased message with the default values set. - **/ -+ (instancetype)message; - -/** - * Creates a new instance by parsing the provided data. This method should be - * sent to the generated message class that the data should be interpreted as. - * If there is an error the method returns nil and the error is returned in - * errorPtr (when provided). - * - * @note In DEBUG builds, the parsed message is checked to be sure all required - * fields were provided, and the parse will fail if some are missing. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param data The data to parse. - * @param errorPtr An optional error pointer to fill in with a failure reason if - * the data can not be parsed. - * - * @return A new instance of the generated class. - **/ -+ (nullable instancetype)parseFromData:(NSData *)data error:(NSError **)errorPtr; - -/** - * Creates a new instance by parsing the data. This method should be sent to - * the generated message class that the data should be interpreted as. If - * there is an error the method returns nil and the error is returned in - * errorPtr (when provided). - * - * @note In DEBUG builds, the parsed message is checked to be sure all required - * fields were provided, and the parse will fail if some are missing. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param data The data to parse. - * @param extensionRegistry The extension registry to use to look up extensions. - * @param errorPtr An optional error pointer to fill in with a failure - * reason if the data can not be parsed. - * - * @return A new instance of the generated class. - **/ -+ (nullable instancetype)parseFromData:(NSData *)data - extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr; - -/** - * Creates a new instance by parsing the data from the given input stream. This - * method should be sent to the generated message class that the data should - * be interpreted as. If there is an error the method returns nil and the error - * is returned in errorPtr (when provided). - * - * @note In DEBUG builds, the parsed message is checked to be sure all required - * fields were provided, and the parse will fail if some are missing. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param input The stream to read data from. - * @param extensionRegistry The extension registry to use to look up extensions. - * @param errorPtr An optional error pointer to fill in with a failure - * reason if the data can not be parsed. - * - * @return A new instance of the generated class. - **/ -+ (nullable instancetype)parseFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry: - (nullable GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr; - -/** - * Creates a new instance by parsing the data from the given input stream. This - * method should be sent to the generated message class that the data should - * be interpreted as. If there is an error the method returns nil and the error - * is returned in errorPtr (when provided). - * - * @note Unlike the parseFrom... methods, this never checks to see if all of - * the required fields are set. So this method can be used to reload - * messages that may not be complete. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param input The stream to read data from. - * @param extensionRegistry The extension registry to use to look up extensions. - * @param errorPtr An optional error pointer to fill in with a failure - * reason if the data can not be parsed. - * - * @return A new instance of the generated class. - **/ -+ (nullable instancetype)parseDelimitedFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry: - (nullable GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr; - -/** - * Initializes an instance by parsing the data. This method should be sent to - * the generated message class that the data should be interpreted as. If - * there is an error the method returns nil and the error is returned in - * errorPtr (when provided). - * - * @note In DEBUG builds, the parsed message is checked to be sure all required - * fields were provided, and the parse will fail if some are missing. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param data The data to parse. - * @param errorPtr An optional error pointer to fill in with a failure reason if - * the data can not be parsed. - * - * @return An initialized instance of the generated class. - **/ -- (nullable instancetype)initWithData:(NSData *)data error:(NSError **)errorPtr; - -/** - * Initializes an instance by parsing the data. This method should be sent to - * the generated message class that the data should be interpreted as. If - * there is an error the method returns nil and the error is returned in - * errorPtr (when provided). - * - * @note In DEBUG builds, the parsed message is checked to be sure all required - * fields were provided, and the parse will fail if some are missing. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param data The data to parse. - * @param extensionRegistry The extension registry to use to look up extensions. - * @param errorPtr An optional error pointer to fill in with a failure - * reason if the data can not be parsed. - * - * @return An initialized instance of the generated class. - **/ -- (nullable instancetype)initWithData:(NSData *)data - extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr; - -/** - * Initializes an instance by parsing the data from the given input stream. This - * method should be sent to the generated message class that the data should - * be interpreted as. If there is an error the method returns nil and the error - * is returned in errorPtr (when provided). - * - * @note Unlike the parseFrom... methods, this never checks to see if all of - * the required fields are set. So this method can be used to reload - * messages that may not be complete. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param input The stream to read data from. - * @param extensionRegistry The extension registry to use to look up extensions. - * @param errorPtr An optional error pointer to fill in with a failure - * reason if the data can not be parsed. - * - * @return An initialized instance of the generated class. - **/ -- (nullable instancetype)initWithCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry: - (nullable GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr; - -/** - * Parses the given data as this message's class, and merges those values into - * this message. - * - * @param data The binary representation of the message to merge. - * @param extensionRegistry The extension registry to use to look up extensions. - * - * @exception GPBCodedInputStreamException Exception thrown when parsing was - * unsuccessful. - **/ -- (void)mergeFromData:(NSData *)data - extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry; - -/** - * Merges the fields from another message (of the same type) into this - * message. - * - * @param other Message to merge into this message. - **/ -- (void)mergeFrom:(GPBMessage *)other; - -/** - * Writes out the message to the given coded output stream. - * - * @param output The coded output stream into which to write the message. - **/ -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)output; - -/** - * Writes out the message to the given output stream. - * - * @param output The output stream into which to write the message. - **/ -- (void)writeToOutputStream:(NSOutputStream *)output; - -/** - * Writes out a varint for the message size followed by the the message to - * the given output stream. - * - * @param output The coded output stream into which to write the message. - **/ -- (void)writeDelimitedToCodedOutputStream:(GPBCodedOutputStream *)output; - -/** - * Writes out a varint for the message size followed by the the message to - * the given output stream. - * - * @param output The output stream into which to write the message. - **/ -- (void)writeDelimitedToOutputStream:(NSOutputStream *)output; - -/** - * Serializes the message to an NSData. - * - * If there is an error while generating the data, nil is returned. - * - * @note This value is not cached, so if you are using it repeatedly, cache - * it yourself. - * - * @note In DEBUG ONLY, the message is also checked for all required field, - * if one is missing, nil will be returned. - * - * @return The binary representation of the message. - **/ -- (nullable NSData *)data; - -/** - * Serializes a varint with the message size followed by the message data, - * returning that as an NSData. - * - * @note This value is not cached, so if you are using it repeatedly, it is - * recommended to keep a local copy. - * - * @return The binary representation of the size along with the message. - **/ -- (NSData *)delimitedData; - -/** - * Calculates the size of the object if it were serialized. - * - * This is not a cached value. If you are following a pattern like this: - * - * ``` - * size_t size = [aMsg serializedSize]; - * NSMutableData *foo = [NSMutableData dataWithCapacity:size + sizeof(size)]; - * [foo writeSize:size]; - * [foo appendData:[aMsg data]]; - * ``` - * - * you would be better doing: - * - * ``` - * NSData *data = [aMsg data]; - * NSUInteger size = [aMsg length]; - * NSMutableData *foo = [NSMutableData dataWithCapacity:size + sizeof(size)]; - * [foo writeSize:size]; - * [foo appendData:data]; - * ``` - * - * @return The size of the message in it's binary representation. - **/ -- (size_t)serializedSize; - -/** - * @return The descriptor for the message class. - **/ -+ (GPBDescriptor *)descriptor; - -/** - * Return the descriptor for the message. - **/ -- (GPBDescriptor *)descriptor; - -/** - * @return An array with the extension descriptors that are currently set on the - * message. - **/ -- (NSArray *)extensionsCurrentlySet; - -/** - * Checks whether there is an extension set on the message which matches the - * given extension descriptor. - * - * @param extension Extension descriptor to check if it's set on the message. - * - * @return Whether the extension is currently set on the message. - **/ -- (BOOL)hasExtension:(GPBExtensionDescriptor *)extension; - -/* - * Fetches the given extension's value for this message. - * - * Extensions use boxed values (NSNumbers) for PODs and NSMutableArrays for - * repeated fields. If the extension is a Message one will be auto created for - * you and returned similar to fields. - * - * @param extension The extension descriptor of the extension to fetch. - * - * @return The extension matching the given descriptor, or nil if none found. - **/ -- (nullable id)getExtension:(GPBExtensionDescriptor *)extension; - -/** - * Sets the given extension's value for this message. This only applies for - * single field extensions (i.e. - not repeated fields). - * - * Extensions use boxed values (NSNumbers). - * - * @param extension The extension descriptor under which to set the value. - * @param value The value to be set as the extension. - **/ -- (void)setExtension:(GPBExtensionDescriptor *)extension - value:(nullable id)value; - -/** - * Adds the given value to the extension for this message. This only applies - * to repeated field extensions. If the field is a repeated POD type, the value - * should be an NSNumber. - * - * @param extension The extension descriptor under which to add the value. - * @param value The value to be added to the repeated extension. - **/ -- (void)addExtension:(GPBExtensionDescriptor *)extension value:(id)value; - -/** - * Replaces the value at the given index with the given value for the extension - * on this message. This only applies to repeated field extensions. If the field - * is a repeated POD type, the value is should be an NSNumber. - * - * @param extension The extension descriptor under which to replace the value. - * @param index The index of the extension to be replaced. - * @param value The value to be replaced in the repeated extension. - **/ -- (void)setExtension:(GPBExtensionDescriptor *)extension - index:(NSUInteger)index - value:(id)value; - -/** - * Clears the given extension for this message. - * - * @param extension The extension descriptor to be cleared from this message. - **/ -- (void)clearExtension:(GPBExtensionDescriptor *)extension; - -/** - * Resets all of the fields of this message to their default values. - **/ -- (void)clear; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBMessage.m b/Old My Mind/Pods/Protobuf/objectivec/GPBMessage.m deleted file mode 100755 index 9660f1e..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBMessage.m +++ /dev/null @@ -1,3234 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBMessage_PackagePrivate.h" - -#import -#import - -#import "GPBArray_PackagePrivate.h" -#import "GPBCodedInputStream_PackagePrivate.h" -#import "GPBCodedOutputStream_PackagePrivate.h" -#import "GPBDescriptor_PackagePrivate.h" -#import "GPBDictionary_PackagePrivate.h" -#import "GPBExtensionInternals.h" -#import "GPBExtensionRegistry.h" -#import "GPBRootObject_PackagePrivate.h" -#import "GPBUnknownFieldSet_PackagePrivate.h" -#import "GPBUtilities_PackagePrivate.h" - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -NSString *const GPBMessageErrorDomain = - GPBNSStringifySymbol(GPBMessageErrorDomain); - -NSString *const GPBErrorReasonKey = @"Reason"; - -static NSString *const kGPBDataCoderKey = @"GPBData"; - -// -// PLEASE REMEMBER: -// -// This is the base class for *all* messages generated, so any selector defined, -// *public* or *private* could end up colliding with a proto message field. So -// avoid using selectors that could match a property, use C functions to hide -// them, etc. -// - -@interface GPBMessage () { - @package - GPBUnknownFieldSet *unknownFields_; - NSMutableDictionary *extensionMap_; - NSMutableDictionary *autocreatedExtensionMap_; - - // If the object was autocreated, we remember the creator so that if we get - // mutated, we can inform the creator to make our field visible. - GPBMessage *autocreator_; - GPBFieldDescriptor *autocreatorField_; - GPBExtensionDescriptor *autocreatorExtension_; -} -@end - -static id CreateArrayForField(GPBFieldDescriptor *field, - GPBMessage *autocreator) - __attribute__((ns_returns_retained)); -static id GetOrCreateArrayIvarWithField(GPBMessage *self, - GPBFieldDescriptor *field, - GPBFileSyntax syntax); -static id GetArrayIvarWithField(GPBMessage *self, GPBFieldDescriptor *field); -static id CreateMapForField(GPBFieldDescriptor *field, - GPBMessage *autocreator) - __attribute__((ns_returns_retained)); -static id GetOrCreateMapIvarWithField(GPBMessage *self, - GPBFieldDescriptor *field, - GPBFileSyntax syntax); -static id GetMapIvarWithField(GPBMessage *self, GPBFieldDescriptor *field); -static NSMutableDictionary *CloneExtensionMap(NSDictionary *extensionMap, - NSZone *zone) - __attribute__((ns_returns_retained)); - -#ifdef DEBUG -static NSError *MessageError(NSInteger code, NSDictionary *userInfo) { - return [NSError errorWithDomain:GPBMessageErrorDomain - code:code - userInfo:userInfo]; -} -#endif - -static NSError *ErrorFromException(NSException *exception) { - NSError *error = nil; - - if ([exception.name isEqual:GPBCodedInputStreamException]) { - NSDictionary *exceptionInfo = exception.userInfo; - error = exceptionInfo[GPBCodedInputStreamUnderlyingErrorKey]; - } - - if (!error) { - NSString *reason = exception.reason; - NSDictionary *userInfo = nil; - if ([reason length]) { - userInfo = @{ GPBErrorReasonKey : reason }; - } - - error = [NSError errorWithDomain:GPBMessageErrorDomain - code:GPBMessageErrorCodeOther - userInfo:userInfo]; - } - return error; -} - -static void CheckExtension(GPBMessage *self, - GPBExtensionDescriptor *extension) { - if ([self class] != extension.containingMessageClass) { - [NSException - raise:NSInvalidArgumentException - format:@"Extension %@ used on wrong class (%@ instead of %@)", - extension.singletonName, - [self class], extension.containingMessageClass]; - } -} - -static NSMutableDictionary *CloneExtensionMap(NSDictionary *extensionMap, - NSZone *zone) { - if (extensionMap.count == 0) { - return nil; - } - NSMutableDictionary *result = [[NSMutableDictionary allocWithZone:zone] - initWithCapacity:extensionMap.count]; - - for (GPBExtensionDescriptor *extension in extensionMap) { - id value = [extensionMap objectForKey:extension]; - BOOL isMessageExtension = GPBExtensionIsMessage(extension); - - if (extension.repeated) { - if (isMessageExtension) { - NSMutableArray *list = - [[NSMutableArray alloc] initWithCapacity:[value count]]; - for (GPBMessage *listValue in value) { - GPBMessage *copiedValue = [listValue copyWithZone:zone]; - [list addObject:copiedValue]; - [copiedValue release]; - } - [result setObject:list forKey:extension]; - [list release]; - } else { - NSMutableArray *copiedValue = [value mutableCopyWithZone:zone]; - [result setObject:copiedValue forKey:extension]; - [copiedValue release]; - } - } else { - if (isMessageExtension) { - GPBMessage *copiedValue = [value copyWithZone:zone]; - [result setObject:copiedValue forKey:extension]; - [copiedValue release]; - } else { - [result setObject:value forKey:extension]; - } - } - } - - return result; -} - -static id CreateArrayForField(GPBFieldDescriptor *field, - GPBMessage *autocreator) { - id result; - GPBDataType fieldDataType = GPBGetFieldDataType(field); - switch (fieldDataType) { - case GPBDataTypeBool: - result = [[GPBBoolArray alloc] init]; - break; - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - result = [[GPBUInt32Array alloc] init]; - break; - case GPBDataTypeInt32: - case GPBDataTypeSFixed32: - case GPBDataTypeSInt32: - result = [[GPBInt32Array alloc] init]; - break; - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - result = [[GPBUInt64Array alloc] init]; - break; - case GPBDataTypeInt64: - case GPBDataTypeSFixed64: - case GPBDataTypeSInt64: - result = [[GPBInt64Array alloc] init]; - break; - case GPBDataTypeFloat: - result = [[GPBFloatArray alloc] init]; - break; - case GPBDataTypeDouble: - result = [[GPBDoubleArray alloc] init]; - break; - - case GPBDataTypeEnum: - result = [[GPBEnumArray alloc] - initWithValidationFunction:field.enumDescriptor.enumVerifier]; - break; - - case GPBDataTypeBytes: - case GPBDataTypeGroup: - case GPBDataTypeMessage: - case GPBDataTypeString: - if (autocreator) { - result = [[GPBAutocreatedArray alloc] init]; - } else { - result = [[NSMutableArray alloc] init]; - } - break; - } - - if (autocreator) { - if (GPBDataTypeIsObject(fieldDataType)) { - GPBAutocreatedArray *autoArray = result; - autoArray->_autocreator = autocreator; - } else { - GPBInt32Array *gpbArray = result; - gpbArray->_autocreator = autocreator; - } - } - - return result; -} - -static id CreateMapForField(GPBFieldDescriptor *field, - GPBMessage *autocreator) { - id result; - GPBDataType keyDataType = field.mapKeyDataType; - GPBDataType valueDataType = GPBGetFieldDataType(field); - switch (keyDataType) { - case GPBDataTypeBool: - switch (valueDataType) { - case GPBDataTypeBool: - result = [[GPBBoolBoolDictionary alloc] init]; - break; - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - result = [[GPBBoolUInt32Dictionary alloc] init]; - break; - case GPBDataTypeInt32: - case GPBDataTypeSFixed32: - case GPBDataTypeSInt32: - result = [[GPBBoolInt32Dictionary alloc] init]; - break; - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - result = [[GPBBoolUInt64Dictionary alloc] init]; - break; - case GPBDataTypeInt64: - case GPBDataTypeSFixed64: - case GPBDataTypeSInt64: - result = [[GPBBoolInt64Dictionary alloc] init]; - break; - case GPBDataTypeFloat: - result = [[GPBBoolFloatDictionary alloc] init]; - break; - case GPBDataTypeDouble: - result = [[GPBBoolDoubleDictionary alloc] init]; - break; - case GPBDataTypeEnum: - result = [[GPBBoolEnumDictionary alloc] - initWithValidationFunction:field.enumDescriptor.enumVerifier]; - break; - case GPBDataTypeBytes: - case GPBDataTypeMessage: - case GPBDataTypeString: - result = [[GPBBoolObjectDictionary alloc] init]; - break; - case GPBDataTypeGroup: - NSCAssert(NO, @"shouldn't happen"); - return nil; - } - break; - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - switch (valueDataType) { - case GPBDataTypeBool: - result = [[GPBUInt32BoolDictionary alloc] init]; - break; - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - result = [[GPBUInt32UInt32Dictionary alloc] init]; - break; - case GPBDataTypeInt32: - case GPBDataTypeSFixed32: - case GPBDataTypeSInt32: - result = [[GPBUInt32Int32Dictionary alloc] init]; - break; - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - result = [[GPBUInt32UInt64Dictionary alloc] init]; - break; - case GPBDataTypeInt64: - case GPBDataTypeSFixed64: - case GPBDataTypeSInt64: - result = [[GPBUInt32Int64Dictionary alloc] init]; - break; - case GPBDataTypeFloat: - result = [[GPBUInt32FloatDictionary alloc] init]; - break; - case GPBDataTypeDouble: - result = [[GPBUInt32DoubleDictionary alloc] init]; - break; - case GPBDataTypeEnum: - result = [[GPBUInt32EnumDictionary alloc] - initWithValidationFunction:field.enumDescriptor.enumVerifier]; - break; - case GPBDataTypeBytes: - case GPBDataTypeMessage: - case GPBDataTypeString: - result = [[GPBUInt32ObjectDictionary alloc] init]; - break; - case GPBDataTypeGroup: - NSCAssert(NO, @"shouldn't happen"); - return nil; - } - break; - case GPBDataTypeInt32: - case GPBDataTypeSFixed32: - case GPBDataTypeSInt32: - switch (valueDataType) { - case GPBDataTypeBool: - result = [[GPBInt32BoolDictionary alloc] init]; - break; - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - result = [[GPBInt32UInt32Dictionary alloc] init]; - break; - case GPBDataTypeInt32: - case GPBDataTypeSFixed32: - case GPBDataTypeSInt32: - result = [[GPBInt32Int32Dictionary alloc] init]; - break; - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - result = [[GPBInt32UInt64Dictionary alloc] init]; - break; - case GPBDataTypeInt64: - case GPBDataTypeSFixed64: - case GPBDataTypeSInt64: - result = [[GPBInt32Int64Dictionary alloc] init]; - break; - case GPBDataTypeFloat: - result = [[GPBInt32FloatDictionary alloc] init]; - break; - case GPBDataTypeDouble: - result = [[GPBInt32DoubleDictionary alloc] init]; - break; - case GPBDataTypeEnum: - result = [[GPBInt32EnumDictionary alloc] - initWithValidationFunction:field.enumDescriptor.enumVerifier]; - break; - case GPBDataTypeBytes: - case GPBDataTypeMessage: - case GPBDataTypeString: - result = [[GPBInt32ObjectDictionary alloc] init]; - break; - case GPBDataTypeGroup: - NSCAssert(NO, @"shouldn't happen"); - return nil; - } - break; - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - switch (valueDataType) { - case GPBDataTypeBool: - result = [[GPBUInt64BoolDictionary alloc] init]; - break; - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - result = [[GPBUInt64UInt32Dictionary alloc] init]; - break; - case GPBDataTypeInt32: - case GPBDataTypeSFixed32: - case GPBDataTypeSInt32: - result = [[GPBUInt64Int32Dictionary alloc] init]; - break; - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - result = [[GPBUInt64UInt64Dictionary alloc] init]; - break; - case GPBDataTypeInt64: - case GPBDataTypeSFixed64: - case GPBDataTypeSInt64: - result = [[GPBUInt64Int64Dictionary alloc] init]; - break; - case GPBDataTypeFloat: - result = [[GPBUInt64FloatDictionary alloc] init]; - break; - case GPBDataTypeDouble: - result = [[GPBUInt64DoubleDictionary alloc] init]; - break; - case GPBDataTypeEnum: - result = [[GPBUInt64EnumDictionary alloc] - initWithValidationFunction:field.enumDescriptor.enumVerifier]; - break; - case GPBDataTypeBytes: - case GPBDataTypeMessage: - case GPBDataTypeString: - result = [[GPBUInt64ObjectDictionary alloc] init]; - break; - case GPBDataTypeGroup: - NSCAssert(NO, @"shouldn't happen"); - return nil; - } - break; - case GPBDataTypeInt64: - case GPBDataTypeSFixed64: - case GPBDataTypeSInt64: - switch (valueDataType) { - case GPBDataTypeBool: - result = [[GPBInt64BoolDictionary alloc] init]; - break; - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - result = [[GPBInt64UInt32Dictionary alloc] init]; - break; - case GPBDataTypeInt32: - case GPBDataTypeSFixed32: - case GPBDataTypeSInt32: - result = [[GPBInt64Int32Dictionary alloc] init]; - break; - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - result = [[GPBInt64UInt64Dictionary alloc] init]; - break; - case GPBDataTypeInt64: - case GPBDataTypeSFixed64: - case GPBDataTypeSInt64: - result = [[GPBInt64Int64Dictionary alloc] init]; - break; - case GPBDataTypeFloat: - result = [[GPBInt64FloatDictionary alloc] init]; - break; - case GPBDataTypeDouble: - result = [[GPBInt64DoubleDictionary alloc] init]; - break; - case GPBDataTypeEnum: - result = [[GPBInt64EnumDictionary alloc] - initWithValidationFunction:field.enumDescriptor.enumVerifier]; - break; - case GPBDataTypeBytes: - case GPBDataTypeMessage: - case GPBDataTypeString: - result = [[GPBInt64ObjectDictionary alloc] init]; - break; - case GPBDataTypeGroup: - NSCAssert(NO, @"shouldn't happen"); - return nil; - } - break; - case GPBDataTypeString: - switch (valueDataType) { - case GPBDataTypeBool: - result = [[GPBStringBoolDictionary alloc] init]; - break; - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - result = [[GPBStringUInt32Dictionary alloc] init]; - break; - case GPBDataTypeInt32: - case GPBDataTypeSFixed32: - case GPBDataTypeSInt32: - result = [[GPBStringInt32Dictionary alloc] init]; - break; - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - result = [[GPBStringUInt64Dictionary alloc] init]; - break; - case GPBDataTypeInt64: - case GPBDataTypeSFixed64: - case GPBDataTypeSInt64: - result = [[GPBStringInt64Dictionary alloc] init]; - break; - case GPBDataTypeFloat: - result = [[GPBStringFloatDictionary alloc] init]; - break; - case GPBDataTypeDouble: - result = [[GPBStringDoubleDictionary alloc] init]; - break; - case GPBDataTypeEnum: - result = [[GPBStringEnumDictionary alloc] - initWithValidationFunction:field.enumDescriptor.enumVerifier]; - break; - case GPBDataTypeBytes: - case GPBDataTypeMessage: - case GPBDataTypeString: - if (autocreator) { - result = [[GPBAutocreatedDictionary alloc] init]; - } else { - result = [[NSMutableDictionary alloc] init]; - } - break; - case GPBDataTypeGroup: - NSCAssert(NO, @"shouldn't happen"); - return nil; - } - break; - - case GPBDataTypeFloat: - case GPBDataTypeDouble: - case GPBDataTypeEnum: - case GPBDataTypeBytes: - case GPBDataTypeGroup: - case GPBDataTypeMessage: - NSCAssert(NO, @"shouldn't happen"); - return nil; - } - - if (autocreator) { - if ((keyDataType == GPBDataTypeString) && - GPBDataTypeIsObject(valueDataType)) { - GPBAutocreatedDictionary *autoDict = result; - autoDict->_autocreator = autocreator; - } else { - GPBInt32Int32Dictionary *gpbDict = result; - gpbDict->_autocreator = autocreator; - } - } - - return result; -} - -#if !defined(__clang_analyzer__) -// These functions are blocked from the analyzer because the analyzer sees the -// GPBSetRetainedObjectIvarWithFieldInternal() call as consuming the array/map, -// so use of the array/map after the call returns is flagged as a use after -// free. -// But GPBSetRetainedObjectIvarWithFieldInternal() is "consuming" the retain -// count be holding onto the object (it is transfering it), the object is -// still valid after returning from the call. The other way to avoid this -// would be to add a -retain/-autorelease, but that would force every -// repeated/map field parsed into the autorelease pool which is both a memory -// and performance hit. - -static id GetOrCreateArrayIvarWithField(GPBMessage *self, - GPBFieldDescriptor *field, - GPBFileSyntax syntax) { - id array = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (!array) { - // No lock needed, this is called from places expecting to mutate - // so no threading protection is needed. - array = CreateArrayForField(field, nil); - GPBSetRetainedObjectIvarWithFieldInternal(self, field, array, syntax); - } - return array; -} - -// This is like GPBGetObjectIvarWithField(), but for arrays, it should -// only be used to wire the method into the class. -static id GetArrayIvarWithField(GPBMessage *self, GPBFieldDescriptor *field) { - id array = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (!array) { - // Check again after getting the lock. - GPBPrepareReadOnlySemaphore(self); - dispatch_semaphore_wait(self->readOnlySemaphore_, DISPATCH_TIME_FOREVER); - array = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (!array) { - array = CreateArrayForField(field, self); - GPBSetAutocreatedRetainedObjectIvarWithField(self, field, array); - } - dispatch_semaphore_signal(self->readOnlySemaphore_); - } - return array; -} - -static id GetOrCreateMapIvarWithField(GPBMessage *self, - GPBFieldDescriptor *field, - GPBFileSyntax syntax) { - id dict = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (!dict) { - // No lock needed, this is called from places expecting to mutate - // so no threading protection is needed. - dict = CreateMapForField(field, nil); - GPBSetRetainedObjectIvarWithFieldInternal(self, field, dict, syntax); - } - return dict; -} - -// This is like GPBGetObjectIvarWithField(), but for maps, it should -// only be used to wire the method into the class. -static id GetMapIvarWithField(GPBMessage *self, GPBFieldDescriptor *field) { - id dict = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (!dict) { - // Check again after getting the lock. - GPBPrepareReadOnlySemaphore(self); - dispatch_semaphore_wait(self->readOnlySemaphore_, DISPATCH_TIME_FOREVER); - dict = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (!dict) { - dict = CreateMapForField(field, self); - GPBSetAutocreatedRetainedObjectIvarWithField(self, field, dict); - } - dispatch_semaphore_signal(self->readOnlySemaphore_); - } - return dict; -} - -#endif // !defined(__clang_analyzer__) - -GPBMessage *GPBCreateMessageWithAutocreator(Class msgClass, - GPBMessage *autocreator, - GPBFieldDescriptor *field) { - GPBMessage *message = [[msgClass alloc] init]; - message->autocreator_ = autocreator; - message->autocreatorField_ = [field retain]; - return message; -} - -static GPBMessage *CreateMessageWithAutocreatorForExtension( - Class msgClass, GPBMessage *autocreator, GPBExtensionDescriptor *extension) - __attribute__((ns_returns_retained)); - -static GPBMessage *CreateMessageWithAutocreatorForExtension( - Class msgClass, GPBMessage *autocreator, - GPBExtensionDescriptor *extension) { - GPBMessage *message = [[msgClass alloc] init]; - message->autocreator_ = autocreator; - message->autocreatorExtension_ = [extension retain]; - return message; -} - -BOOL GPBWasMessageAutocreatedBy(GPBMessage *message, GPBMessage *parent) { - return (message->autocreator_ == parent); -} - -void GPBBecomeVisibleToAutocreator(GPBMessage *self) { - // Message objects that are implicitly created by accessing a message field - // are initially not visible via the hasX selector. This method makes them - // visible. - if (self->autocreator_) { - // This will recursively make all parent messages visible until it reaches a - // super-creator that's visible. - if (self->autocreatorField_) { - GPBFileSyntax syntax = [self->autocreator_ descriptor].file.syntax; - GPBSetObjectIvarWithFieldInternal(self->autocreator_, - self->autocreatorField_, self, syntax); - } else { - [self->autocreator_ setExtension:self->autocreatorExtension_ value:self]; - } - } -} - -void GPBAutocreatedArrayModified(GPBMessage *self, id array) { - // When one of our autocreated arrays adds elements, make it visible. - GPBDescriptor *descriptor = [[self class] descriptor]; - for (GPBFieldDescriptor *field in descriptor->fields_) { - if (field.fieldType == GPBFieldTypeRepeated) { - id curArray = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (curArray == array) { - if (GPBFieldDataTypeIsObject(field)) { - GPBAutocreatedArray *autoArray = array; - autoArray->_autocreator = nil; - } else { - GPBInt32Array *gpbArray = array; - gpbArray->_autocreator = nil; - } - GPBBecomeVisibleToAutocreator(self); - return; - } - } - } - NSCAssert(NO, @"Unknown autocreated %@ for %@.", [array class], self); -} - -void GPBAutocreatedDictionaryModified(GPBMessage *self, id dictionary) { - // When one of our autocreated dicts adds elements, make it visible. - GPBDescriptor *descriptor = [[self class] descriptor]; - for (GPBFieldDescriptor *field in descriptor->fields_) { - if (field.fieldType == GPBFieldTypeMap) { - id curDict = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (curDict == dictionary) { - if ((field.mapKeyDataType == GPBDataTypeString) && - GPBFieldDataTypeIsObject(field)) { - GPBAutocreatedDictionary *autoDict = dictionary; - autoDict->_autocreator = nil; - } else { - GPBInt32Int32Dictionary *gpbDict = dictionary; - gpbDict->_autocreator = nil; - } - GPBBecomeVisibleToAutocreator(self); - return; - } - } - } - NSCAssert(NO, @"Unknown autocreated %@ for %@.", [dictionary class], self); -} - -void GPBClearMessageAutocreator(GPBMessage *self) { - if ((self == nil) || !self->autocreator_) { - return; - } - -#if defined(DEBUG) && DEBUG && !defined(NS_BLOCK_ASSERTIONS) - // Either the autocreator must have its "has" flag set to YES, or it must be - // NO and not equal to ourselves. - BOOL autocreatorHas = - (self->autocreatorField_ - ? GPBGetHasIvarField(self->autocreator_, self->autocreatorField_) - : [self->autocreator_ hasExtension:self->autocreatorExtension_]); - GPBMessage *autocreatorFieldValue = - (self->autocreatorField_ - ? GPBGetObjectIvarWithFieldNoAutocreate(self->autocreator_, - self->autocreatorField_) - : [self->autocreator_->autocreatedExtensionMap_ - objectForKey:self->autocreatorExtension_]); - NSCAssert(autocreatorHas || autocreatorFieldValue != self, - @"Cannot clear autocreator because it still refers to self, self: %@.", - self); - -#endif // DEBUG && !defined(NS_BLOCK_ASSERTIONS) - - self->autocreator_ = nil; - [self->autocreatorField_ release]; - self->autocreatorField_ = nil; - [self->autocreatorExtension_ release]; - self->autocreatorExtension_ = nil; -} - -static GPBUnknownFieldSet *GetOrMakeUnknownFields(GPBMessage *self) { - if (!self->unknownFields_) { - self->unknownFields_ = [[GPBUnknownFieldSet alloc] init]; - GPBBecomeVisibleToAutocreator(self); - } - return self->unknownFields_; -} - -@implementation GPBMessage - -+ (void)initialize { - Class pbMessageClass = [GPBMessage class]; - if ([self class] == pbMessageClass) { - // This is here to start up the "base" class descriptor. - [self descriptor]; - // Message shares extension method resolving with GPBRootObject so insure - // it is started up at the same time. - (void)[GPBRootObject class]; - } else if ([self superclass] == pbMessageClass) { - // This is here to start up all the "message" subclasses. Just needs to be - // done for the messages, not any of the subclasses. - // This must be done in initialize to enforce thread safety of start up of - // the protocol buffer library. - // Note: The generated code for -descriptor calls - // +[GPBDescriptor allocDescriptorForClass:...], passing the GPBRootObject - // subclass for the file. That call chain is what ensures that *Root class - // is started up to support extension resolution off the message class - // (+resolveClassMethod: below) in a thread safe manner. - [self descriptor]; - } -} - -+ (instancetype)allocWithZone:(NSZone *)zone { - // Override alloc to allocate our classes with the additional storage - // required for the instance variables. - GPBDescriptor *descriptor = [self descriptor]; - return NSAllocateObject(self, descriptor->storageSize_, zone); -} - -+ (instancetype)alloc { - return [self allocWithZone:nil]; -} - -+ (GPBDescriptor *)descriptor { - // This is thread safe because it is called from +initialize. - static GPBDescriptor *descriptor = NULL; - static GPBFileDescriptor *fileDescriptor = NULL; - if (!descriptor) { - // Use a dummy file that marks it as proto2 syntax so when used generically - // it supports unknowns/etc. - fileDescriptor = - [[GPBFileDescriptor alloc] initWithPackage:@"internal" - syntax:GPBFileSyntaxProto2]; - - descriptor = [GPBDescriptor allocDescriptorForClass:[GPBMessage class] - rootClass:Nil - file:fileDescriptor - fields:NULL - fieldCount:0 - storageSize:0 - flags:0]; - } - return descriptor; -} - -+ (instancetype)message { - return [[[self alloc] init] autorelease]; -} - -- (instancetype)init { - if ((self = [super init])) { - messageStorage_ = (GPBMessage_StoragePtr)( - ((uint8_t *)self) + class_getInstanceSize([self class])); - } - - return self; -} - -- (instancetype)initWithData:(NSData *)data error:(NSError **)errorPtr { - return [self initWithData:data extensionRegistry:nil error:errorPtr]; -} - -- (instancetype)initWithData:(NSData *)data - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr { - if ((self = [self init])) { - @try { - [self mergeFromData:data extensionRegistry:extensionRegistry]; - if (errorPtr) { - *errorPtr = nil; - } - } - @catch (NSException *exception) { - [self release]; - self = nil; - if (errorPtr) { - *errorPtr = ErrorFromException(exception); - } - } -#ifdef DEBUG - if (self && !self.initialized) { - [self release]; - self = nil; - if (errorPtr) { - *errorPtr = MessageError(GPBMessageErrorCodeMissingRequiredField, nil); - } - } -#endif - } - return self; -} - -- (instancetype)initWithCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry: - (GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr { - if ((self = [self init])) { - @try { - [self mergeFromCodedInputStream:input extensionRegistry:extensionRegistry]; - if (errorPtr) { - *errorPtr = nil; - } - } - @catch (NSException *exception) { - [self release]; - self = nil; - if (errorPtr) { - *errorPtr = ErrorFromException(exception); - } - } -#ifdef DEBUG - if (self && !self.initialized) { - [self release]; - self = nil; - if (errorPtr) { - *errorPtr = MessageError(GPBMessageErrorCodeMissingRequiredField, nil); - } - } -#endif - } - return self; -} - -- (void)dealloc { - [self internalClear:NO]; - NSCAssert(!autocreator_, @"Autocreator was not cleared before dealloc."); - if (readOnlySemaphore_) { - dispatch_release(readOnlySemaphore_); - } - [super dealloc]; -} - -- (void)copyFieldsInto:(GPBMessage *)message - zone:(NSZone *)zone - descriptor:(GPBDescriptor *)descriptor { - // Copy all the storage... - memcpy(message->messageStorage_, messageStorage_, descriptor->storageSize_); - - GPBFileSyntax syntax = descriptor.file.syntax; - - // Loop over the fields doing fixup... - for (GPBFieldDescriptor *field in descriptor->fields_) { - if (GPBFieldIsMapOrArray(field)) { - id value = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (value) { - // We need to copy the array/map, but the catch is for message fields, - // we also need to ensure all the messages as those need copying also. - id newValue; - if (GPBFieldDataTypeIsMessage(field)) { - if (field.fieldType == GPBFieldTypeRepeated) { - NSArray *existingArray = (NSArray *)value; - NSMutableArray *newArray = - [[NSMutableArray alloc] initWithCapacity:existingArray.count]; - newValue = newArray; - for (GPBMessage *msg in existingArray) { - GPBMessage *copiedMsg = [msg copyWithZone:zone]; - [newArray addObject:copiedMsg]; - [copiedMsg release]; - } - } else { - if (field.mapKeyDataType == GPBDataTypeString) { - // Map is an NSDictionary. - NSDictionary *existingDict = value; - NSMutableDictionary *newDict = [[NSMutableDictionary alloc] - initWithCapacity:existingDict.count]; - newValue = newDict; - [existingDict enumerateKeysAndObjectsUsingBlock:^(NSString *key, - GPBMessage *msg, - BOOL *stop) { -#pragma unused(stop) - GPBMessage *copiedMsg = [msg copyWithZone:zone]; - [newDict setObject:copiedMsg forKey:key]; - [copiedMsg release]; - }]; - } else { - // Is one of the GPB*ObjectDictionary classes. Type doesn't - // matter, just need one to invoke the selector. - GPBInt32ObjectDictionary *existingDict = value; - newValue = [existingDict deepCopyWithZone:zone]; - } - } - } else { - // Not messages (but is a map/array)... - if (field.fieldType == GPBFieldTypeRepeated) { - if (GPBFieldDataTypeIsObject(field)) { - // NSArray - newValue = [value mutableCopyWithZone:zone]; - } else { - // GPB*Array - newValue = [value copyWithZone:zone]; - } - } else { - if (field.mapKeyDataType == GPBDataTypeString) { - // NSDictionary - newValue = [value mutableCopyWithZone:zone]; - } else { - // Is one of the GPB*Dictionary classes. Type doesn't matter, - // just need one to invoke the selector. - GPBInt32Int32Dictionary *existingDict = value; - newValue = [existingDict copyWithZone:zone]; - } - } - } - // We retain here because the memcpy picked up the pointer value and - // the next call to SetRetainedObject... will release the current value. - [value retain]; - GPBSetRetainedObjectIvarWithFieldInternal(message, field, newValue, - syntax); - } - } else if (GPBFieldDataTypeIsMessage(field)) { - // For object types, if we have a value, copy it. If we don't, - // zero it to remove the pointer to something that was autocreated - // (and the ptr just got memcpyed). - if (GPBGetHasIvarField(self, field)) { - GPBMessage *value = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - GPBMessage *newValue = [value copyWithZone:zone]; - // We retain here because the memcpy picked up the pointer value and - // the next call to SetRetainedObject... will release the current value. - [value retain]; - GPBSetRetainedObjectIvarWithFieldInternal(message, field, newValue, - syntax); - } else { - uint8_t *storage = (uint8_t *)message->messageStorage_; - id *typePtr = (id *)&storage[field->description_->offset]; - *typePtr = NULL; - } - } else if (GPBFieldDataTypeIsObject(field) && - GPBGetHasIvarField(self, field)) { - // A set string/data value (message picked off above), copy it. - id value = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - id newValue = [value copyWithZone:zone]; - // We retain here because the memcpy picked up the pointer value and - // the next call to SetRetainedObject... will release the current value. - [value retain]; - GPBSetRetainedObjectIvarWithFieldInternal(message, field, newValue, - syntax); - } else { - // memcpy took care of the rest of the primitive fields if they were set. - } - } // for (field in descriptor->fields_) -} - -- (id)copyWithZone:(NSZone *)zone { - GPBDescriptor *descriptor = [self descriptor]; - GPBMessage *result = [[descriptor.messageClass allocWithZone:zone] init]; - - [self copyFieldsInto:result zone:zone descriptor:descriptor]; - // Make immutable copies of the extra bits. - result->unknownFields_ = [unknownFields_ copyWithZone:zone]; - result->extensionMap_ = CloneExtensionMap(extensionMap_, zone); - return result; -} - -- (void)clear { - [self internalClear:YES]; -} - -- (void)internalClear:(BOOL)zeroStorage { - GPBDescriptor *descriptor = [self descriptor]; - for (GPBFieldDescriptor *field in descriptor->fields_) { - if (GPBFieldIsMapOrArray(field)) { - id arrayOrMap = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (arrayOrMap) { - if (field.fieldType == GPBFieldTypeRepeated) { - if (GPBFieldDataTypeIsObject(field)) { - if ([arrayOrMap isKindOfClass:[GPBAutocreatedArray class]]) { - GPBAutocreatedArray *autoArray = arrayOrMap; - if (autoArray->_autocreator == self) { - autoArray->_autocreator = nil; - } - } - } else { - // Type doesn't matter, it is a GPB*Array. - GPBInt32Array *gpbArray = arrayOrMap; - if (gpbArray->_autocreator == self) { - gpbArray->_autocreator = nil; - } - } - } else { - if ((field.mapKeyDataType == GPBDataTypeString) && - GPBFieldDataTypeIsObject(field)) { - if ([arrayOrMap isKindOfClass:[GPBAutocreatedDictionary class]]) { - GPBAutocreatedDictionary *autoDict = arrayOrMap; - if (autoDict->_autocreator == self) { - autoDict->_autocreator = nil; - } - } - } else { - // Type doesn't matter, it is a GPB*Dictionary. - GPBInt32Int32Dictionary *gpbDict = arrayOrMap; - if (gpbDict->_autocreator == self) { - gpbDict->_autocreator = nil; - } - } - } - [arrayOrMap release]; - } - } else if (GPBFieldDataTypeIsMessage(field)) { - GPBClearAutocreatedMessageIvarWithField(self, field); - GPBMessage *value = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [value release]; - } else if (GPBFieldDataTypeIsObject(field) && - GPBGetHasIvarField(self, field)) { - id value = GPBGetObjectIvarWithField(self, field); - [value release]; - } - } - - // GPBClearMessageAutocreator() expects that its caller has already been - // removed from autocreatedExtensionMap_ so we set to nil first. - NSArray *autocreatedValues = [autocreatedExtensionMap_ allValues]; - [autocreatedExtensionMap_ release]; - autocreatedExtensionMap_ = nil; - - // Since we're clearing all of our extensions, make sure that we clear the - // autocreator on any that we've created so they no longer refer to us. - for (GPBMessage *value in autocreatedValues) { - NSCAssert(GPBWasMessageAutocreatedBy(value, self), - @"Autocreated extension does not refer back to self."); - GPBClearMessageAutocreator(value); - } - - [extensionMap_ release]; - extensionMap_ = nil; - [unknownFields_ release]; - unknownFields_ = nil; - - // Note that clearing does not affect autocreator_. If we are being cleared - // because of a dealloc, then autocreator_ should be nil anyway. If we are - // being cleared because someone explicitly clears us, we don't want to - // sever our relationship with our autocreator. - - if (zeroStorage) { - memset(messageStorage_, 0, descriptor->storageSize_); - } -} - -- (BOOL)isInitialized { - GPBDescriptor *descriptor = [self descriptor]; - for (GPBFieldDescriptor *field in descriptor->fields_) { - if (field.isRequired) { - if (!GPBGetHasIvarField(self, field)) { - return NO; - } - } - if (GPBFieldDataTypeIsMessage(field)) { - GPBFieldType fieldType = field.fieldType; - if (fieldType == GPBFieldTypeSingle) { - if (field.isRequired) { - GPBMessage *message = GPBGetMessageMessageField(self, field); - if (!message.initialized) { - return NO; - } - } else { - NSAssert(field.isOptional, - @"%@: Single message field %@ not required or optional?", - [self class], field.name); - if (GPBGetHasIvarField(self, field)) { - GPBMessage *message = GPBGetMessageMessageField(self, field); - if (!message.initialized) { - return NO; - } - } - } - } else if (fieldType == GPBFieldTypeRepeated) { - NSArray *array = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - for (GPBMessage *message in array) { - if (!message.initialized) { - return NO; - } - } - } else { // fieldType == GPBFieldTypeMap - if (field.mapKeyDataType == GPBDataTypeString) { - NSDictionary *map = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (map && !GPBDictionaryIsInitializedInternalHelper(map, field)) { - return NO; - } - } else { - // Real type is GPB*ObjectDictionary, exact type doesn't matter. - GPBInt32ObjectDictionary *map = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (map && ![map isInitialized]) { - return NO; - } - } - } - } - } - - __block BOOL result = YES; - [extensionMap_ - enumerateKeysAndObjectsUsingBlock:^(GPBExtensionDescriptor *extension, - id obj, - BOOL *stop) { - if (GPBExtensionIsMessage(extension)) { - if (extension.isRepeated) { - for (GPBMessage *msg in obj) { - if (!msg.initialized) { - result = NO; - *stop = YES; - break; - } - } - } else { - GPBMessage *asMsg = obj; - if (!asMsg.initialized) { - result = NO; - *stop = YES; - } - } - } - }]; - return result; -} - -- (GPBDescriptor *)descriptor { - return [[self class] descriptor]; -} - -- (NSData *)data { -#ifdef DEBUG - if (!self.initialized) { - return nil; - } -#endif - NSMutableData *data = [NSMutableData dataWithLength:[self serializedSize]]; - GPBCodedOutputStream *stream = - [[GPBCodedOutputStream alloc] initWithData:data]; - @try { - [self writeToCodedOutputStream:stream]; - } - @catch (NSException *exception) { - // This really shouldn't happen. The only way writeToCodedOutputStream: - // could throw is if something in the library has a bug and the - // serializedSize was wrong. -#ifdef DEBUG - NSLog(@"%@: Internal exception while building message data: %@", - [self class], exception); -#endif - data = nil; - } - [stream release]; - return data; -} - -- (NSData *)delimitedData { - size_t serializedSize = [self serializedSize]; - size_t varintSize = GPBComputeRawVarint32SizeForInteger(serializedSize); - NSMutableData *data = - [NSMutableData dataWithLength:(serializedSize + varintSize)]; - GPBCodedOutputStream *stream = - [[GPBCodedOutputStream alloc] initWithData:data]; - @try { - [self writeDelimitedToCodedOutputStream:stream]; - } - @catch (NSException *exception) { - // This really shouldn't happen. The only way writeToCodedOutputStream: - // could throw is if something in the library has a bug and the - // serializedSize was wrong. -#ifdef DEBUG - NSLog(@"%@: Internal exception while building message delimitedData: %@", - [self class], exception); -#endif - // If it happens, truncate. - data.length = 0; - } - [stream release]; - return data; -} - -- (void)writeToOutputStream:(NSOutputStream *)output { - GPBCodedOutputStream *stream = - [[GPBCodedOutputStream alloc] initWithOutputStream:output]; - [self writeToCodedOutputStream:stream]; - [stream release]; -} - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)output { - GPBDescriptor *descriptor = [self descriptor]; - NSArray *fieldsArray = descriptor->fields_; - NSUInteger fieldCount = fieldsArray.count; - const GPBExtensionRange *extensionRanges = descriptor.extensionRanges; - NSUInteger extensionRangesCount = descriptor.extensionRangesCount; - for (NSUInteger i = 0, j = 0; i < fieldCount || j < extensionRangesCount;) { - if (i == fieldCount) { - [self writeExtensionsToCodedOutputStream:output - range:extensionRanges[j++]]; - } else if (j == extensionRangesCount || - GPBFieldNumber(fieldsArray[i]) < extensionRanges[j].start) { - [self writeField:fieldsArray[i++] toCodedOutputStream:output]; - } else { - [self writeExtensionsToCodedOutputStream:output - range:extensionRanges[j++]]; - } - } - if (descriptor.isWireFormat) { - [unknownFields_ writeAsMessageSetTo:output]; - } else { - [unknownFields_ writeToCodedOutputStream:output]; - } -} - -- (void)writeDelimitedToOutputStream:(NSOutputStream *)output { - GPBCodedOutputStream *codedOutput = - [[GPBCodedOutputStream alloc] initWithOutputStream:output]; - [self writeDelimitedToCodedOutputStream:codedOutput]; - [codedOutput release]; -} - -- (void)writeDelimitedToCodedOutputStream:(GPBCodedOutputStream *)output { - [output writeRawVarintSizeTAs32:[self serializedSize]]; - [self writeToCodedOutputStream:output]; -} - -- (void)writeField:(GPBFieldDescriptor *)field - toCodedOutputStream:(GPBCodedOutputStream *)output { - GPBFieldType fieldType = field.fieldType; - if (fieldType == GPBFieldTypeSingle) { - BOOL has = GPBGetHasIvarField(self, field); - if (!has) { - return; - } - } - uint32_t fieldNumber = GPBFieldNumber(field); - -//%PDDM-DEFINE FIELD_CASE(TYPE, REAL_TYPE) -//%FIELD_CASE_FULL(TYPE, REAL_TYPE, REAL_TYPE) -//%PDDM-DEFINE FIELD_CASE_FULL(TYPE, REAL_TYPE, ARRAY_TYPE) -//% case GPBDataType##TYPE: -//% if (fieldType == GPBFieldTypeRepeated) { -//% uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; -//% GPB##ARRAY_TYPE##Array *array = -//% GPBGetObjectIvarWithFieldNoAutocreate(self, field); -//% [output write##TYPE##Array:fieldNumber values:array tag:tag]; -//% } else if (fieldType == GPBFieldTypeSingle) { -//% [output write##TYPE:fieldNumber -//% TYPE$S value:GPBGetMessage##REAL_TYPE##Field(self, field)]; -//% } else { // fieldType == GPBFieldTypeMap -//% // Exact type here doesn't matter. -//% GPBInt32##ARRAY_TYPE##Dictionary *dict = -//% GPBGetObjectIvarWithFieldNoAutocreate(self, field); -//% [dict writeToCodedOutputStream:output asField:field]; -//% } -//% break; -//% -//%PDDM-DEFINE FIELD_CASE2(TYPE) -//% case GPBDataType##TYPE: -//% if (fieldType == GPBFieldTypeRepeated) { -//% NSArray *array = GPBGetObjectIvarWithFieldNoAutocreate(self, field); -//% [output write##TYPE##Array:fieldNumber values:array]; -//% } else if (fieldType == GPBFieldTypeSingle) { -//% // GPBGetObjectIvarWithFieldNoAutocreate() avoids doing the has check -//% // again. -//% [output write##TYPE:fieldNumber -//% TYPE$S value:GPBGetObjectIvarWithFieldNoAutocreate(self, field)]; -//% } else { // fieldType == GPBFieldTypeMap -//% // Exact type here doesn't matter. -//% id dict = GPBGetObjectIvarWithFieldNoAutocreate(self, field); -//% GPBDataType mapKeyDataType = field.mapKeyDataType; -//% if (mapKeyDataType == GPBDataTypeString) { -//% GPBDictionaryWriteToStreamInternalHelper(output, dict, field); -//% } else { -//% [dict writeToCodedOutputStream:output asField:field]; -//% } -//% } -//% break; -//% - - switch (GPBGetFieldDataType(field)) { - -//%PDDM-EXPAND FIELD_CASE(Bool, Bool) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeBool: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBBoolArray *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeBoolArray:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeBool:fieldNumber - value:GPBGetMessageBoolField(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32BoolDictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(Fixed32, UInt32) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeFixed32: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBUInt32Array *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeFixed32Array:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeFixed32:fieldNumber - value:GPBGetMessageUInt32Field(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32UInt32Dictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(SFixed32, Int32) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeSFixed32: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBInt32Array *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeSFixed32Array:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeSFixed32:fieldNumber - value:GPBGetMessageInt32Field(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32Int32Dictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(Float, Float) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeFloat: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBFloatArray *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeFloatArray:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeFloat:fieldNumber - value:GPBGetMessageFloatField(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32FloatDictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(Fixed64, UInt64) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeFixed64: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBUInt64Array *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeFixed64Array:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeFixed64:fieldNumber - value:GPBGetMessageUInt64Field(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32UInt64Dictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(SFixed64, Int64) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeSFixed64: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBInt64Array *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeSFixed64Array:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeSFixed64:fieldNumber - value:GPBGetMessageInt64Field(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32Int64Dictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(Double, Double) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeDouble: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBDoubleArray *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeDoubleArray:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeDouble:fieldNumber - value:GPBGetMessageDoubleField(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32DoubleDictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(Int32, Int32) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeInt32: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBInt32Array *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeInt32Array:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeInt32:fieldNumber - value:GPBGetMessageInt32Field(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32Int32Dictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(Int64, Int64) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeInt64: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBInt64Array *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeInt64Array:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeInt64:fieldNumber - value:GPBGetMessageInt64Field(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32Int64Dictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(SInt32, Int32) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeSInt32: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBInt32Array *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeSInt32Array:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeSInt32:fieldNumber - value:GPBGetMessageInt32Field(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32Int32Dictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(SInt64, Int64) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeSInt64: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBInt64Array *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeSInt64Array:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeSInt64:fieldNumber - value:GPBGetMessageInt64Field(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32Int64Dictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(UInt32, UInt32) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeUInt32: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBUInt32Array *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeUInt32Array:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeUInt32:fieldNumber - value:GPBGetMessageUInt32Field(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32UInt32Dictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE(UInt64, UInt64) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeUInt64: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBUInt64Array *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeUInt64Array:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeUInt64:fieldNumber - value:GPBGetMessageUInt64Field(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32UInt64Dictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE_FULL(Enum, Int32, Enum) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeEnum: - if (fieldType == GPBFieldTypeRepeated) { - uint32_t tag = field.isPackable ? GPBFieldTag(field) : 0; - GPBEnumArray *array = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeEnumArray:fieldNumber values:array tag:tag]; - } else if (fieldType == GPBFieldTypeSingle) { - [output writeEnum:fieldNumber - value:GPBGetMessageInt32Field(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - GPBInt32EnumDictionary *dict = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [dict writeToCodedOutputStream:output asField:field]; - } - break; - -//%PDDM-EXPAND FIELD_CASE2(Bytes) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeBytes: - if (fieldType == GPBFieldTypeRepeated) { - NSArray *array = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeBytesArray:fieldNumber values:array]; - } else if (fieldType == GPBFieldTypeSingle) { - // GPBGetObjectIvarWithFieldNoAutocreate() avoids doing the has check - // again. - [output writeBytes:fieldNumber - value:GPBGetObjectIvarWithFieldNoAutocreate(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - id dict = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - GPBDataType mapKeyDataType = field.mapKeyDataType; - if (mapKeyDataType == GPBDataTypeString) { - GPBDictionaryWriteToStreamInternalHelper(output, dict, field); - } else { - [dict writeToCodedOutputStream:output asField:field]; - } - } - break; - -//%PDDM-EXPAND FIELD_CASE2(String) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeString: - if (fieldType == GPBFieldTypeRepeated) { - NSArray *array = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeStringArray:fieldNumber values:array]; - } else if (fieldType == GPBFieldTypeSingle) { - // GPBGetObjectIvarWithFieldNoAutocreate() avoids doing the has check - // again. - [output writeString:fieldNumber - value:GPBGetObjectIvarWithFieldNoAutocreate(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - id dict = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - GPBDataType mapKeyDataType = field.mapKeyDataType; - if (mapKeyDataType == GPBDataTypeString) { - GPBDictionaryWriteToStreamInternalHelper(output, dict, field); - } else { - [dict writeToCodedOutputStream:output asField:field]; - } - } - break; - -//%PDDM-EXPAND FIELD_CASE2(Message) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeMessage: - if (fieldType == GPBFieldTypeRepeated) { - NSArray *array = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeMessageArray:fieldNumber values:array]; - } else if (fieldType == GPBFieldTypeSingle) { - // GPBGetObjectIvarWithFieldNoAutocreate() avoids doing the has check - // again. - [output writeMessage:fieldNumber - value:GPBGetObjectIvarWithFieldNoAutocreate(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - id dict = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - GPBDataType mapKeyDataType = field.mapKeyDataType; - if (mapKeyDataType == GPBDataTypeString) { - GPBDictionaryWriteToStreamInternalHelper(output, dict, field); - } else { - [dict writeToCodedOutputStream:output asField:field]; - } - } - break; - -//%PDDM-EXPAND FIELD_CASE2(Group) -// This block of code is generated, do not edit it directly. - - case GPBDataTypeGroup: - if (fieldType == GPBFieldTypeRepeated) { - NSArray *array = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [output writeGroupArray:fieldNumber values:array]; - } else if (fieldType == GPBFieldTypeSingle) { - // GPBGetObjectIvarWithFieldNoAutocreate() avoids doing the has check - // again. - [output writeGroup:fieldNumber - value:GPBGetObjectIvarWithFieldNoAutocreate(self, field)]; - } else { // fieldType == GPBFieldTypeMap - // Exact type here doesn't matter. - id dict = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - GPBDataType mapKeyDataType = field.mapKeyDataType; - if (mapKeyDataType == GPBDataTypeString) { - GPBDictionaryWriteToStreamInternalHelper(output, dict, field); - } else { - [dict writeToCodedOutputStream:output asField:field]; - } - } - break; - -//%PDDM-EXPAND-END (18 expansions) - } -} - -#pragma mark - Extensions - -- (id)getExtension:(GPBExtensionDescriptor *)extension { - CheckExtension(self, extension); - id value = [extensionMap_ objectForKey:extension]; - if (value != nil) { - return value; - } - - // No default for repeated. - if (extension.isRepeated) { - return nil; - } - // Non messages get their default. - if (!GPBExtensionIsMessage(extension)) { - return extension.defaultValue; - } - - // Check for an autocreated value. - GPBPrepareReadOnlySemaphore(self); - dispatch_semaphore_wait(readOnlySemaphore_, DISPATCH_TIME_FOREVER); - value = [autocreatedExtensionMap_ objectForKey:extension]; - if (!value) { - // Auto create the message extensions to match normal fields. - value = CreateMessageWithAutocreatorForExtension(extension.msgClass, self, - extension); - - if (autocreatedExtensionMap_ == nil) { - autocreatedExtensionMap_ = [[NSMutableDictionary alloc] init]; - } - - // We can't simply call setExtension here because that would clear the new - // value's autocreator. - [autocreatedExtensionMap_ setObject:value forKey:extension]; - [value release]; - } - - dispatch_semaphore_signal(readOnlySemaphore_); - return value; -} - -- (id)getExistingExtension:(GPBExtensionDescriptor *)extension { - // This is an internal method so we don't need to call CheckExtension(). - return [extensionMap_ objectForKey:extension]; -} - -- (BOOL)hasExtension:(GPBExtensionDescriptor *)extension { -#if defined(DEBUG) && DEBUG - CheckExtension(self, extension); -#endif // DEBUG - return nil != [extensionMap_ objectForKey:extension]; -} - -- (NSArray *)extensionsCurrentlySet { - return [extensionMap_ allKeys]; -} - -- (void)writeExtensionsToCodedOutputStream:(GPBCodedOutputStream *)output - range:(GPBExtensionRange)range { - NSArray *sortedExtensions = [[extensionMap_ allKeys] - sortedArrayUsingSelector:@selector(compareByFieldNumber:)]; - uint32_t start = range.start; - uint32_t end = range.end; - for (GPBExtensionDescriptor *extension in sortedExtensions) { - uint32_t fieldNumber = extension.fieldNumber; - if (fieldNumber >= start && fieldNumber < end) { - id value = [extensionMap_ objectForKey:extension]; - GPBWriteExtensionValueToOutputStream(extension, value, output); - } - } -} - -- (void)setExtension:(GPBExtensionDescriptor *)extension value:(id)value { - if (!value) { - [self clearExtension:extension]; - return; - } - - CheckExtension(self, extension); - - if (extension.repeated) { - [NSException raise:NSInvalidArgumentException - format:@"Must call addExtension() for repeated types."]; - } - - if (extensionMap_ == nil) { - extensionMap_ = [[NSMutableDictionary alloc] init]; - } - - // This pointless cast is for CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION. - // Without it, the compiler complains we're passing an id nullable when - // setObject:forKey: requires a id nonnull for the value. The check for - // !value at the start of the method ensures it isn't nil, but the check - // isn't smart enough to realize that. - [extensionMap_ setObject:(id)value forKey:extension]; - - GPBExtensionDescriptor *descriptor = extension; - - if (GPBExtensionIsMessage(descriptor) && !descriptor.isRepeated) { - GPBMessage *autocreatedValue = - [[autocreatedExtensionMap_ objectForKey:extension] retain]; - // Must remove from the map before calling GPBClearMessageAutocreator() so - // that GPBClearMessageAutocreator() knows its safe to clear. - [autocreatedExtensionMap_ removeObjectForKey:extension]; - GPBClearMessageAutocreator(autocreatedValue); - [autocreatedValue release]; - } - - GPBBecomeVisibleToAutocreator(self); -} - -- (void)addExtension:(GPBExtensionDescriptor *)extension value:(id)value { - CheckExtension(self, extension); - - if (!extension.repeated) { - [NSException raise:NSInvalidArgumentException - format:@"Must call setExtension() for singular types."]; - } - - if (extensionMap_ == nil) { - extensionMap_ = [[NSMutableDictionary alloc] init]; - } - NSMutableArray *list = [extensionMap_ objectForKey:extension]; - if (list == nil) { - list = [NSMutableArray array]; - [extensionMap_ setObject:list forKey:extension]; - } - - [list addObject:value]; - GPBBecomeVisibleToAutocreator(self); -} - -- (void)setExtension:(GPBExtensionDescriptor *)extension - index:(NSUInteger)idx - value:(id)value { - CheckExtension(self, extension); - - if (!extension.repeated) { - [NSException raise:NSInvalidArgumentException - format:@"Must call setExtension() for singular types."]; - } - - if (extensionMap_ == nil) { - extensionMap_ = [[NSMutableDictionary alloc] init]; - } - - NSMutableArray *list = [extensionMap_ objectForKey:extension]; - - [list replaceObjectAtIndex:idx withObject:value]; - GPBBecomeVisibleToAutocreator(self); -} - -- (void)clearExtension:(GPBExtensionDescriptor *)extension { - CheckExtension(self, extension); - - // Only become visible if there was actually a value to clear. - if ([extensionMap_ objectForKey:extension]) { - [extensionMap_ removeObjectForKey:extension]; - GPBBecomeVisibleToAutocreator(self); - } -} - -#pragma mark - mergeFrom - -- (void)mergeFromData:(NSData *)data - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry { - GPBCodedInputStream *input = [[GPBCodedInputStream alloc] initWithData:data]; - [self mergeFromCodedInputStream:input extensionRegistry:extensionRegistry]; - [input checkLastTagWas:0]; - [input release]; -} - -#pragma mark - mergeDelimitedFrom - -- (void)mergeDelimitedFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry { - GPBCodedInputStreamState *state = &input->state_; - if (GPBCodedInputStreamIsAtEnd(state)) { - return; - } - NSData *data = GPBCodedInputStreamReadRetainedBytesNoCopy(state); - if (data == nil) { - return; - } - [self mergeFromData:data extensionRegistry:extensionRegistry]; - [data release]; -} - -#pragma mark - Parse From Data Support - -+ (instancetype)parseFromData:(NSData *)data error:(NSError **)errorPtr { - return [self parseFromData:data extensionRegistry:nil error:errorPtr]; -} - -+ (instancetype)parseFromData:(NSData *)data - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr { - return [[[self alloc] initWithData:data - extensionRegistry:extensionRegistry - error:errorPtr] autorelease]; -} - -+ (instancetype)parseFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr { - return - [[[self alloc] initWithCodedInputStream:input - extensionRegistry:extensionRegistry - error:errorPtr] autorelease]; -} - -#pragma mark - Parse Delimited From Data Support - -+ (instancetype)parseDelimitedFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry: - (GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr { - GPBMessage *message = [[[self alloc] init] autorelease]; - @try { - [message mergeDelimitedFromCodedInputStream:input - extensionRegistry:extensionRegistry]; - if (errorPtr) { - *errorPtr = nil; - } - } - @catch (NSException *exception) { - message = nil; - if (errorPtr) { - *errorPtr = ErrorFromException(exception); - } - } -#ifdef DEBUG - if (message && !message.initialized) { - message = nil; - if (errorPtr) { - *errorPtr = MessageError(GPBMessageErrorCodeMissingRequiredField, nil); - } - } -#endif - return message; -} - -#pragma mark - Unknown Field Support - -- (GPBUnknownFieldSet *)unknownFields { - return unknownFields_; -} - -- (void)setUnknownFields:(GPBUnknownFieldSet *)unknownFields { - if (unknownFields != unknownFields_) { - [unknownFields_ release]; - unknownFields_ = [unknownFields copy]; - GPBBecomeVisibleToAutocreator(self); - } -} - -- (void)parseMessageSet:(GPBCodedInputStream *)input - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry { - uint32_t typeId = 0; - NSData *rawBytes = nil; - GPBExtensionDescriptor *extension = nil; - GPBCodedInputStreamState *state = &input->state_; - while (true) { - uint32_t tag = GPBCodedInputStreamReadTag(state); - if (tag == 0) { - break; - } - - if (tag == GPBWireFormatMessageSetTypeIdTag) { - typeId = GPBCodedInputStreamReadUInt32(state); - if (typeId != 0) { - extension = [extensionRegistry extensionForDescriptor:[self descriptor] - fieldNumber:typeId]; - } - } else if (tag == GPBWireFormatMessageSetMessageTag) { - rawBytes = - [GPBCodedInputStreamReadRetainedBytesNoCopy(state) autorelease]; - } else { - if (![input skipField:tag]) { - break; - } - } - } - - [input checkLastTagWas:GPBWireFormatMessageSetItemEndTag]; - - if (rawBytes != nil && typeId != 0) { - if (extension != nil) { - GPBCodedInputStream *newInput = - [[GPBCodedInputStream alloc] initWithData:rawBytes]; - GPBExtensionMergeFromInputStream(extension, - extension.packable, - newInput, - extensionRegistry, - self); - [newInput release]; - } else { - GPBUnknownFieldSet *unknownFields = GetOrMakeUnknownFields(self); - [unknownFields mergeMessageSetMessage:typeId data:rawBytes]; - } - } -} - -- (BOOL)parseUnknownField:(GPBCodedInputStream *)input - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry - tag:(uint32_t)tag { - GPBWireFormat wireType = GPBWireFormatGetTagWireType(tag); - int32_t fieldNumber = GPBWireFormatGetTagFieldNumber(tag); - - GPBDescriptor *descriptor = [self descriptor]; - GPBExtensionDescriptor *extension = - [extensionRegistry extensionForDescriptor:descriptor - fieldNumber:fieldNumber]; - if (extension == nil) { - if (descriptor.wireFormat && GPBWireFormatMessageSetItemTag == tag) { - [self parseMessageSet:input extensionRegistry:extensionRegistry]; - return YES; - } - } else { - if (extension.wireType == wireType) { - GPBExtensionMergeFromInputStream(extension, - extension.packable, - input, - extensionRegistry, - self); - return YES; - } - // Primitive, repeated types can be packed on unpacked on the wire, and are - // parsed either way. - if ([extension isRepeated] && - !GPBDataTypeIsObject(extension->description_->dataType) && - (extension.alternateWireType == wireType)) { - GPBExtensionMergeFromInputStream(extension, - !extension.packable, - input, - extensionRegistry, - self); - return YES; - } - } - if ([GPBUnknownFieldSet isFieldTag:tag]) { - GPBUnknownFieldSet *unknownFields = GetOrMakeUnknownFields(self); - return [unknownFields mergeFieldFrom:tag input:input]; - } else { - return NO; - } -} - -- (void)addUnknownMapEntry:(int32_t)fieldNum value:(NSData *)data { - GPBUnknownFieldSet *unknownFields = GetOrMakeUnknownFields(self); - [unknownFields addUnknownMapEntry:fieldNum value:data]; -} - -#pragma mark - MergeFromCodedInputStream Support - -static void MergeSingleFieldFromCodedInputStream( - GPBMessage *self, GPBFieldDescriptor *field, GPBFileSyntax syntax, - GPBCodedInputStream *input, GPBExtensionRegistry *extensionRegistry) { - GPBDataType fieldDataType = GPBGetFieldDataType(field); - switch (fieldDataType) { -#define CASE_SINGLE_POD(NAME, TYPE, FUNC_TYPE) \ - case GPBDataType##NAME: { \ - TYPE val = GPBCodedInputStreamRead##NAME(&input->state_); \ - GPBSet##FUNC_TYPE##IvarWithFieldInternal(self, field, val, syntax); \ - break; \ - } -#define CASE_SINGLE_OBJECT(NAME) \ - case GPBDataType##NAME: { \ - id val = GPBCodedInputStreamReadRetained##NAME(&input->state_); \ - GPBSetRetainedObjectIvarWithFieldInternal(self, field, val, syntax); \ - break; \ - } - CASE_SINGLE_POD(Bool, BOOL, Bool) - CASE_SINGLE_POD(Fixed32, uint32_t, UInt32) - CASE_SINGLE_POD(SFixed32, int32_t, Int32) - CASE_SINGLE_POD(Float, float, Float) - CASE_SINGLE_POD(Fixed64, uint64_t, UInt64) - CASE_SINGLE_POD(SFixed64, int64_t, Int64) - CASE_SINGLE_POD(Double, double, Double) - CASE_SINGLE_POD(Int32, int32_t, Int32) - CASE_SINGLE_POD(Int64, int64_t, Int64) - CASE_SINGLE_POD(SInt32, int32_t, Int32) - CASE_SINGLE_POD(SInt64, int64_t, Int64) - CASE_SINGLE_POD(UInt32, uint32_t, UInt32) - CASE_SINGLE_POD(UInt64, uint64_t, UInt64) - CASE_SINGLE_OBJECT(Bytes) - CASE_SINGLE_OBJECT(String) -#undef CASE_SINGLE_POD -#undef CASE_SINGLE_OBJECT - - case GPBDataTypeMessage: { - if (GPBGetHasIvarField(self, field)) { - // GPBGetObjectIvarWithFieldNoAutocreate() avoids doing the has - // check again. - GPBMessage *message = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [input readMessage:message extensionRegistry:extensionRegistry]; - } else { - GPBMessage *message = [[field.msgClass alloc] init]; - [input readMessage:message extensionRegistry:extensionRegistry]; - GPBSetRetainedObjectIvarWithFieldInternal(self, field, message, syntax); - } - break; - } - - case GPBDataTypeGroup: { - if (GPBGetHasIvarField(self, field)) { - // GPBGetObjectIvarWithFieldNoAutocreate() avoids doing the has - // check again. - GPBMessage *message = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [input readGroup:GPBFieldNumber(field) - message:message - extensionRegistry:extensionRegistry]; - } else { - GPBMessage *message = [[field.msgClass alloc] init]; - [input readGroup:GPBFieldNumber(field) - message:message - extensionRegistry:extensionRegistry]; - GPBSetRetainedObjectIvarWithFieldInternal(self, field, message, syntax); - } - break; - } - - case GPBDataTypeEnum: { - int32_t val = GPBCodedInputStreamReadEnum(&input->state_); - if (GPBHasPreservingUnknownEnumSemantics(syntax) || - [field isValidEnumValue:val]) { - GPBSetInt32IvarWithFieldInternal(self, field, val, syntax); - } else { - GPBUnknownFieldSet *unknownFields = GetOrMakeUnknownFields(self); - [unknownFields mergeVarintField:GPBFieldNumber(field) value:val]; - } - } - } // switch -} - -static void MergeRepeatedPackedFieldFromCodedInputStream( - GPBMessage *self, GPBFieldDescriptor *field, GPBFileSyntax syntax, - GPBCodedInputStream *input) { - GPBDataType fieldDataType = GPBGetFieldDataType(field); - GPBCodedInputStreamState *state = &input->state_; - id genericArray = GetOrCreateArrayIvarWithField(self, field, syntax); - int32_t length = GPBCodedInputStreamReadInt32(state); - size_t limit = GPBCodedInputStreamPushLimit(state, length); - while (GPBCodedInputStreamBytesUntilLimit(state) > 0) { - switch (fieldDataType) { -#define CASE_REPEATED_PACKED_POD(NAME, TYPE, ARRAY_TYPE) \ - case GPBDataType##NAME: { \ - TYPE val = GPBCodedInputStreamRead##NAME(state); \ - [(GPB##ARRAY_TYPE##Array *)genericArray addValue:val]; \ - break; \ - } - CASE_REPEATED_PACKED_POD(Bool, BOOL, Bool) - CASE_REPEATED_PACKED_POD(Fixed32, uint32_t, UInt32) - CASE_REPEATED_PACKED_POD(SFixed32, int32_t, Int32) - CASE_REPEATED_PACKED_POD(Float, float, Float) - CASE_REPEATED_PACKED_POD(Fixed64, uint64_t, UInt64) - CASE_REPEATED_PACKED_POD(SFixed64, int64_t, Int64) - CASE_REPEATED_PACKED_POD(Double, double, Double) - CASE_REPEATED_PACKED_POD(Int32, int32_t, Int32) - CASE_REPEATED_PACKED_POD(Int64, int64_t, Int64) - CASE_REPEATED_PACKED_POD(SInt32, int32_t, Int32) - CASE_REPEATED_PACKED_POD(SInt64, int64_t, Int64) - CASE_REPEATED_PACKED_POD(UInt32, uint32_t, UInt32) - CASE_REPEATED_PACKED_POD(UInt64, uint64_t, UInt64) -#undef CASE_REPEATED_PACKED_POD - - case GPBDataTypeBytes: - case GPBDataTypeString: - case GPBDataTypeMessage: - case GPBDataTypeGroup: - NSCAssert(NO, @"Non primitive types can't be packed"); - break; - - case GPBDataTypeEnum: { - int32_t val = GPBCodedInputStreamReadEnum(state); - if (GPBHasPreservingUnknownEnumSemantics(syntax) || - [field isValidEnumValue:val]) { - [(GPBEnumArray*)genericArray addRawValue:val]; - } else { - GPBUnknownFieldSet *unknownFields = GetOrMakeUnknownFields(self); - [unknownFields mergeVarintField:GPBFieldNumber(field) value:val]; - } - break; - } - } // switch - } // while(BytesUntilLimit() > 0) - GPBCodedInputStreamPopLimit(state, limit); -} - -static void MergeRepeatedNotPackedFieldFromCodedInputStream( - GPBMessage *self, GPBFieldDescriptor *field, GPBFileSyntax syntax, - GPBCodedInputStream *input, GPBExtensionRegistry *extensionRegistry) { - GPBCodedInputStreamState *state = &input->state_; - id genericArray = GetOrCreateArrayIvarWithField(self, field, syntax); - switch (GPBGetFieldDataType(field)) { -#define CASE_REPEATED_NOT_PACKED_POD(NAME, TYPE, ARRAY_TYPE) \ - case GPBDataType##NAME: { \ - TYPE val = GPBCodedInputStreamRead##NAME(state); \ - [(GPB##ARRAY_TYPE##Array *)genericArray addValue:val]; \ - break; \ - } -#define CASE_REPEATED_NOT_PACKED_OBJECT(NAME) \ - case GPBDataType##NAME: { \ - id val = GPBCodedInputStreamReadRetained##NAME(state); \ - [(NSMutableArray*)genericArray addObject:val]; \ - [val release]; \ - break; \ - } - CASE_REPEATED_NOT_PACKED_POD(Bool, BOOL, Bool) - CASE_REPEATED_NOT_PACKED_POD(Fixed32, uint32_t, UInt32) - CASE_REPEATED_NOT_PACKED_POD(SFixed32, int32_t, Int32) - CASE_REPEATED_NOT_PACKED_POD(Float, float, Float) - CASE_REPEATED_NOT_PACKED_POD(Fixed64, uint64_t, UInt64) - CASE_REPEATED_NOT_PACKED_POD(SFixed64, int64_t, Int64) - CASE_REPEATED_NOT_PACKED_POD(Double, double, Double) - CASE_REPEATED_NOT_PACKED_POD(Int32, int32_t, Int32) - CASE_REPEATED_NOT_PACKED_POD(Int64, int64_t, Int64) - CASE_REPEATED_NOT_PACKED_POD(SInt32, int32_t, Int32) - CASE_REPEATED_NOT_PACKED_POD(SInt64, int64_t, Int64) - CASE_REPEATED_NOT_PACKED_POD(UInt32, uint32_t, UInt32) - CASE_REPEATED_NOT_PACKED_POD(UInt64, uint64_t, UInt64) - CASE_REPEATED_NOT_PACKED_OBJECT(Bytes) - CASE_REPEATED_NOT_PACKED_OBJECT(String) -#undef CASE_REPEATED_NOT_PACKED_POD -#undef CASE_NOT_PACKED_OBJECT - case GPBDataTypeMessage: { - GPBMessage *message = [[field.msgClass alloc] init]; - [input readMessage:message extensionRegistry:extensionRegistry]; - [(NSMutableArray*)genericArray addObject:message]; - [message release]; - break; - } - case GPBDataTypeGroup: { - GPBMessage *message = [[field.msgClass alloc] init]; - [input readGroup:GPBFieldNumber(field) - message:message - extensionRegistry:extensionRegistry]; - [(NSMutableArray*)genericArray addObject:message]; - [message release]; - break; - } - case GPBDataTypeEnum: { - int32_t val = GPBCodedInputStreamReadEnum(state); - if (GPBHasPreservingUnknownEnumSemantics(syntax) || - [field isValidEnumValue:val]) { - [(GPBEnumArray*)genericArray addRawValue:val]; - } else { - GPBUnknownFieldSet *unknownFields = GetOrMakeUnknownFields(self); - [unknownFields mergeVarintField:GPBFieldNumber(field) value:val]; - } - break; - } - } // switch -} - -- (void)mergeFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry { - GPBDescriptor *descriptor = [self descriptor]; - GPBFileSyntax syntax = descriptor.file.syntax; - GPBCodedInputStreamState *state = &input->state_; - uint32_t tag = 0; - NSUInteger startingIndex = 0; - NSArray *fields = descriptor->fields_; - NSUInteger numFields = fields.count; - while (YES) { - BOOL merged = NO; - tag = GPBCodedInputStreamReadTag(state); - if (tag == 0) { - break; // Reached end. - } - for (NSUInteger i = 0; i < numFields; ++i) { - if (startingIndex >= numFields) startingIndex = 0; - GPBFieldDescriptor *fieldDescriptor = fields[startingIndex]; - if (GPBFieldTag(fieldDescriptor) == tag) { - GPBFieldType fieldType = fieldDescriptor.fieldType; - if (fieldType == GPBFieldTypeSingle) { - MergeSingleFieldFromCodedInputStream(self, fieldDescriptor, syntax, - input, extensionRegistry); - // Well formed protos will only have a single field once, advance - // the starting index to the next field. - startingIndex += 1; - } else if (fieldType == GPBFieldTypeRepeated) { - if (fieldDescriptor.isPackable) { - MergeRepeatedPackedFieldFromCodedInputStream( - self, fieldDescriptor, syntax, input); - // Well formed protos will only have a repeated field that is - // packed once, advance the starting index to the next field. - startingIndex += 1; - } else { - MergeRepeatedNotPackedFieldFromCodedInputStream( - self, fieldDescriptor, syntax, input, extensionRegistry); - } - } else { // fieldType == GPBFieldTypeMap - // GPB*Dictionary or NSDictionary, exact type doesn't matter at this - // point. - id map = GetOrCreateMapIvarWithField(self, fieldDescriptor, syntax); - [input readMapEntry:map - extensionRegistry:extensionRegistry - field:fieldDescriptor - parentMessage:self]; - } - merged = YES; - break; - } else { - startingIndex += 1; - } - } // for(i < numFields) - - if (!merged && (tag != 0)) { - // Primitive, repeated types can be packed on unpacked on the wire, and - // are parsed either way. The above loop covered tag in the preferred - // for, so this need to check the alternate form. - for (NSUInteger i = 0; i < numFields; ++i) { - if (startingIndex >= numFields) startingIndex = 0; - GPBFieldDescriptor *fieldDescriptor = fields[startingIndex]; - if ((fieldDescriptor.fieldType == GPBFieldTypeRepeated) && - !GPBFieldDataTypeIsObject(fieldDescriptor) && - (GPBFieldAlternateTag(fieldDescriptor) == tag)) { - BOOL alternateIsPacked = !fieldDescriptor.isPackable; - if (alternateIsPacked) { - MergeRepeatedPackedFieldFromCodedInputStream( - self, fieldDescriptor, syntax, input); - // Well formed protos will only have a repeated field that is - // packed once, advance the starting index to the next field. - startingIndex += 1; - } else { - MergeRepeatedNotPackedFieldFromCodedInputStream( - self, fieldDescriptor, syntax, input, extensionRegistry); - } - merged = YES; - break; - } else { - startingIndex += 1; - } - } - } - - if (!merged) { - if (tag == 0) { - // zero signals EOF / limit reached - return; - } else { - if (GPBPreserveUnknownFields(syntax)) { - if (![self parseUnknownField:input - extensionRegistry:extensionRegistry - tag:tag]) { - // it's an endgroup tag - return; - } - } else { - if (![input skipField:tag]) { - return; - } - } - } - } // if(!merged) - - } // while(YES) -} - -#pragma mark - MergeFrom Support - -- (void)mergeFrom:(GPBMessage *)other { - Class selfClass = [self class]; - Class otherClass = [other class]; - if (!([selfClass isSubclassOfClass:otherClass] || - [otherClass isSubclassOfClass:selfClass])) { - [NSException raise:NSInvalidArgumentException - format:@"Classes must match %@ != %@", selfClass, otherClass]; - } - - // We assume something will be done and become visible. - GPBBecomeVisibleToAutocreator(self); - - GPBDescriptor *descriptor = [[self class] descriptor]; - GPBFileSyntax syntax = descriptor.file.syntax; - - for (GPBFieldDescriptor *field in descriptor->fields_) { - GPBFieldType fieldType = field.fieldType; - if (fieldType == GPBFieldTypeSingle) { - int32_t hasIndex = GPBFieldHasIndex(field); - uint32_t fieldNumber = GPBFieldNumber(field); - if (!GPBGetHasIvar(other, hasIndex, fieldNumber)) { - // Other doesn't have the field set, on to the next. - continue; - } - GPBDataType fieldDataType = GPBGetFieldDataType(field); - switch (fieldDataType) { - case GPBDataTypeBool: - GPBSetBoolIvarWithFieldInternal( - self, field, GPBGetMessageBoolField(other, field), syntax); - break; - case GPBDataTypeSFixed32: - case GPBDataTypeEnum: - case GPBDataTypeInt32: - case GPBDataTypeSInt32: - GPBSetInt32IvarWithFieldInternal( - self, field, GPBGetMessageInt32Field(other, field), syntax); - break; - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - GPBSetUInt32IvarWithFieldInternal( - self, field, GPBGetMessageUInt32Field(other, field), syntax); - break; - case GPBDataTypeSFixed64: - case GPBDataTypeInt64: - case GPBDataTypeSInt64: - GPBSetInt64IvarWithFieldInternal( - self, field, GPBGetMessageInt64Field(other, field), syntax); - break; - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - GPBSetUInt64IvarWithFieldInternal( - self, field, GPBGetMessageUInt64Field(other, field), syntax); - break; - case GPBDataTypeFloat: - GPBSetFloatIvarWithFieldInternal( - self, field, GPBGetMessageFloatField(other, field), syntax); - break; - case GPBDataTypeDouble: - GPBSetDoubleIvarWithFieldInternal( - self, field, GPBGetMessageDoubleField(other, field), syntax); - break; - case GPBDataTypeBytes: - case GPBDataTypeString: { - id otherVal = GPBGetObjectIvarWithFieldNoAutocreate(other, field); - GPBSetObjectIvarWithFieldInternal(self, field, otherVal, syntax); - break; - } - case GPBDataTypeMessage: - case GPBDataTypeGroup: { - id otherVal = GPBGetObjectIvarWithFieldNoAutocreate(other, field); - if (GPBGetHasIvar(self, hasIndex, fieldNumber)) { - GPBMessage *message = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - [message mergeFrom:otherVal]; - } else { - GPBMessage *message = [otherVal copy]; - GPBSetRetainedObjectIvarWithFieldInternal(self, field, message, - syntax); - } - break; - } - } // switch() - } else if (fieldType == GPBFieldTypeRepeated) { - // In the case of a list, they need to be appended, and there is no - // _hasIvar to worry about setting. - id otherArray = - GPBGetObjectIvarWithFieldNoAutocreate(other, field); - if (otherArray) { - GPBDataType fieldDataType = field->description_->dataType; - if (GPBDataTypeIsObject(fieldDataType)) { - NSMutableArray *resultArray = - GetOrCreateArrayIvarWithField(self, field, syntax); - [resultArray addObjectsFromArray:otherArray]; - } else if (fieldDataType == GPBDataTypeEnum) { - GPBEnumArray *resultArray = - GetOrCreateArrayIvarWithField(self, field, syntax); - [resultArray addRawValuesFromArray:otherArray]; - } else { - // The array type doesn't matter, that all implment - // -addValuesFromArray:. - GPBInt32Array *resultArray = - GetOrCreateArrayIvarWithField(self, field, syntax); - [resultArray addValuesFromArray:otherArray]; - } - } - } else { // fieldType = GPBFieldTypeMap - // In the case of a map, they need to be merged, and there is no - // _hasIvar to worry about setting. - id otherDict = GPBGetObjectIvarWithFieldNoAutocreate(other, field); - if (otherDict) { - GPBDataType keyDataType = field.mapKeyDataType; - GPBDataType valueDataType = field->description_->dataType; - if (GPBDataTypeIsObject(keyDataType) && - GPBDataTypeIsObject(valueDataType)) { - NSMutableDictionary *resultDict = - GetOrCreateMapIvarWithField(self, field, syntax); - [resultDict addEntriesFromDictionary:otherDict]; - } else if (valueDataType == GPBDataTypeEnum) { - // The exact type doesn't matter, just need to know it is a - // GPB*EnumDictionary. - GPBInt32EnumDictionary *resultDict = - GetOrCreateMapIvarWithField(self, field, syntax); - [resultDict addRawEntriesFromDictionary:otherDict]; - } else { - // The exact type doesn't matter, they all implement - // -addEntriesFromDictionary:. - GPBInt32Int32Dictionary *resultDict = - GetOrCreateMapIvarWithField(self, field, syntax); - [resultDict addEntriesFromDictionary:otherDict]; - } - } - } // if (fieldType)..else if...else - } // for(fields) - - // Unknown fields. - if (!unknownFields_) { - [self setUnknownFields:other.unknownFields]; - } else { - [unknownFields_ mergeUnknownFields:other.unknownFields]; - } - - // Extensions - - if (other->extensionMap_.count == 0) { - return; - } - - if (extensionMap_ == nil) { - extensionMap_ = - CloneExtensionMap(other->extensionMap_, NSZoneFromPointer(self)); - } else { - for (GPBExtensionDescriptor *extension in other->extensionMap_) { - id otherValue = [other->extensionMap_ objectForKey:extension]; - id value = [extensionMap_ objectForKey:extension]; - BOOL isMessageExtension = GPBExtensionIsMessage(extension); - - if (extension.repeated) { - NSMutableArray *list = value; - if (list == nil) { - list = [[NSMutableArray alloc] init]; - [extensionMap_ setObject:list forKey:extension]; - [list release]; - } - if (isMessageExtension) { - for (GPBMessage *otherListValue in otherValue) { - GPBMessage *copiedValue = [otherListValue copy]; - [list addObject:copiedValue]; - [copiedValue release]; - } - } else { - [list addObjectsFromArray:otherValue]; - } - } else { - if (isMessageExtension) { - if (value) { - [(GPBMessage *)value mergeFrom:(GPBMessage *)otherValue]; - } else { - GPBMessage *copiedValue = [otherValue copy]; - [extensionMap_ setObject:copiedValue forKey:extension]; - [copiedValue release]; - } - } else { - [extensionMap_ setObject:otherValue forKey:extension]; - } - } - - if (isMessageExtension && !extension.isRepeated) { - GPBMessage *autocreatedValue = - [[autocreatedExtensionMap_ objectForKey:extension] retain]; - // Must remove from the map before calling GPBClearMessageAutocreator() - // so that GPBClearMessageAutocreator() knows its safe to clear. - [autocreatedExtensionMap_ removeObjectForKey:extension]; - GPBClearMessageAutocreator(autocreatedValue); - [autocreatedValue release]; - } - } - } -} - -#pragma mark - isEqual: & hash Support - -- (BOOL)isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[self class]] && - ![self isKindOfClass:[other class]]) { - return NO; - } - - GPBMessage *otherMsg = other; - GPBDescriptor *descriptor = [[self class] descriptor]; - uint8_t *selfStorage = (uint8_t *)messageStorage_; - uint8_t *otherStorage = (uint8_t *)otherMsg->messageStorage_; - - for (GPBFieldDescriptor *field in descriptor->fields_) { - if (GPBFieldIsMapOrArray(field)) { - // In the case of a list or map, there is no _hasIvar to worry about. - // NOTE: These are NSArray/GPB*Array or NSDictionary/GPB*Dictionary, but - // the type doesn't really matter as the objects all support -count and - // -isEqual:. - NSArray *resultMapOrArray = - GPBGetObjectIvarWithFieldNoAutocreate(self, field); - NSArray *otherMapOrArray = - GPBGetObjectIvarWithFieldNoAutocreate(other, field); - // nil and empty are equal - if (resultMapOrArray.count != 0 || otherMapOrArray.count != 0) { - if (![resultMapOrArray isEqual:otherMapOrArray]) { - return NO; - } - } - } else { // Single field - int32_t hasIndex = GPBFieldHasIndex(field); - uint32_t fieldNum = GPBFieldNumber(field); - BOOL selfHas = GPBGetHasIvar(self, hasIndex, fieldNum); - BOOL otherHas = GPBGetHasIvar(other, hasIndex, fieldNum); - if (selfHas != otherHas) { - return NO; // Differing has values, not equal. - } - if (!selfHas) { - // Same has values, was no, nothing else to check for this field. - continue; - } - // Now compare the values. - GPBDataType fieldDataType = GPBGetFieldDataType(field); - size_t fieldOffset = field->description_->offset; - switch (fieldDataType) { - case GPBDataTypeBool: { - // Bools are stored in has_bits to avoid needing explicit space in - // the storage structure. - // (the field number passed to the HasIvar helper doesn't really - // matter since the offset is never negative) - BOOL selfValue = GPBGetHasIvar(self, (int32_t)(fieldOffset), 0); - BOOL otherValue = GPBGetHasIvar(other, (int32_t)(fieldOffset), 0); - if (selfValue != otherValue) { - return NO; - } - break; - } - case GPBDataTypeSFixed32: - case GPBDataTypeInt32: - case GPBDataTypeSInt32: - case GPBDataTypeEnum: - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - case GPBDataTypeFloat: { - GPBInternalCompileAssert(sizeof(float) == sizeof(uint32_t), float_not_32_bits); - // These are all 32bit, signed/unsigned doesn't matter for equality. - uint32_t *selfValPtr = (uint32_t *)&selfStorage[fieldOffset]; - uint32_t *otherValPtr = (uint32_t *)&otherStorage[fieldOffset]; - if (*selfValPtr != *otherValPtr) { - return NO; - } - break; - } - case GPBDataTypeSFixed64: - case GPBDataTypeInt64: - case GPBDataTypeSInt64: - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - case GPBDataTypeDouble: { - GPBInternalCompileAssert(sizeof(double) == sizeof(uint64_t), double_not_64_bits); - // These are all 64bit, signed/unsigned doesn't matter for equality. - uint64_t *selfValPtr = (uint64_t *)&selfStorage[fieldOffset]; - uint64_t *otherValPtr = (uint64_t *)&otherStorage[fieldOffset]; - if (*selfValPtr != *otherValPtr) { - return NO; - } - break; - } - case GPBDataTypeBytes: - case GPBDataTypeString: - case GPBDataTypeMessage: - case GPBDataTypeGroup: { - // Type doesn't matter here, they all implement -isEqual:. - id *selfValPtr = (id *)&selfStorage[fieldOffset]; - id *otherValPtr = (id *)&otherStorage[fieldOffset]; - if (![*selfValPtr isEqual:*otherValPtr]) { - return NO; - } - break; - } - } // switch() - } // if(mapOrArray)...else - } // for(fields) - - // nil and empty are equal - if (extensionMap_.count != 0 || otherMsg->extensionMap_.count != 0) { - if (![extensionMap_ isEqual:otherMsg->extensionMap_]) { - return NO; - } - } - - // nil and empty are equal - GPBUnknownFieldSet *otherUnknowns = otherMsg->unknownFields_; - if ([unknownFields_ countOfFields] != 0 || - [otherUnknowns countOfFields] != 0) { - if (![unknownFields_ isEqual:otherUnknowns]) { - return NO; - } - } - - return YES; -} - -// It is very difficult to implement a generic hash for ProtoBuf messages that -// will perform well. If you need hashing on your ProtoBufs (eg you are using -// them as dictionary keys) you will probably want to implement a ProtoBuf -// message specific hash as a category on your protobuf class. Do not make it a -// category on GPBMessage as you will conflict with this hash, and will possibly -// override hash for all generated protobufs. A good implementation of hash will -// be really fast, so we would recommend only hashing protobufs that have an -// identifier field of some kind that you can easily hash. If you implement -// hash, we would strongly recommend overriding isEqual: in your category as -// well, as the default implementation of isEqual: is extremely slow, and may -// drastically affect performance in large sets. -- (NSUInteger)hash { - GPBDescriptor *descriptor = [[self class] descriptor]; - const NSUInteger prime = 19; - uint8_t *storage = (uint8_t *)messageStorage_; - - // Start with the descriptor and then mix it with some instance info. - // Hopefully that will give a spread based on classes and what fields are set. - NSUInteger result = (NSUInteger)descriptor; - - for (GPBFieldDescriptor *field in descriptor->fields_) { - if (GPBFieldIsMapOrArray(field)) { - // Exact type doesn't matter, just check if there are any elements. - NSArray *mapOrArray = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - NSUInteger count = mapOrArray.count; - if (count) { - // NSArray/NSDictionary use count, use the field number and the count. - result = prime * result + GPBFieldNumber(field); - result = prime * result + count; - } - } else if (GPBGetHasIvarField(self, field)) { - // Just using the field number seemed simple/fast, but then a small - // message class where all the same fields are always set (to different - // things would end up all with the same hash, so pull in some data). - GPBDataType fieldDataType = GPBGetFieldDataType(field); - size_t fieldOffset = field->description_->offset; - switch (fieldDataType) { - case GPBDataTypeBool: { - // Bools are stored in has_bits to avoid needing explicit space in - // the storage structure. - // (the field number passed to the HasIvar helper doesn't really - // matter since the offset is never negative) - BOOL value = GPBGetHasIvar(self, (int32_t)(fieldOffset), 0); - result = prime * result + value; - break; - } - case GPBDataTypeSFixed32: - case GPBDataTypeInt32: - case GPBDataTypeSInt32: - case GPBDataTypeEnum: - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - case GPBDataTypeFloat: { - GPBInternalCompileAssert(sizeof(float) == sizeof(uint32_t), float_not_32_bits); - // These are all 32bit, just mix it in. - uint32_t *valPtr = (uint32_t *)&storage[fieldOffset]; - result = prime * result + *valPtr; - break; - } - case GPBDataTypeSFixed64: - case GPBDataTypeInt64: - case GPBDataTypeSInt64: - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - case GPBDataTypeDouble: { - GPBInternalCompileAssert(sizeof(double) == sizeof(uint64_t), double_not_64_bits); - // These are all 64bit, just mix what fits into an NSUInteger in. - uint64_t *valPtr = (uint64_t *)&storage[fieldOffset]; - result = prime * result + (NSUInteger)(*valPtr); - break; - } - case GPBDataTypeBytes: - case GPBDataTypeString: { - // Type doesn't matter here, they both implement -hash:. - id *valPtr = (id *)&storage[fieldOffset]; - result = prime * result + [*valPtr hash]; - break; - } - - case GPBDataTypeMessage: - case GPBDataTypeGroup: { - GPBMessage **valPtr = (GPBMessage **)&storage[fieldOffset]; - // Could call -hash on the sub message, but that could recurse pretty - // deep; follow the lead of NSArray/NSDictionary and don't really - // recurse for hash, instead use the field number and the descriptor - // of the sub message. Yes, this could suck for a bunch of messages - // where they all only differ in the sub messages, but if you are - // using a message with sub messages for something that needs -hash, - // odds are you are also copying them as keys, and that deep copy - // will also suck. - result = prime * result + GPBFieldNumber(field); - result = prime * result + (NSUInteger)[[*valPtr class] descriptor]; - break; - } - } // switch() - } - } - - // Unknowns and extensions are not included. - - return result; -} - -#pragma mark - Description Support - -- (NSString *)description { - NSString *textFormat = GPBTextFormatForMessage(self, @" "); - NSString *description = [NSString - stringWithFormat:@"<%@ %p>: {\n%@}", [self class], self, textFormat]; - return description; -} - -#if defined(DEBUG) && DEBUG - -// Xcode 5.1 added support for custom quick look info. -// https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/CustomClassDisplay_in_QuickLook/CH01-quick_look_for_custom_objects/CH01-quick_look_for_custom_objects.html#//apple_ref/doc/uid/TP40014001-CH2-SW1 -- (id)debugQuickLookObject { - return GPBTextFormatForMessage(self, nil); -} - -#endif // DEBUG - -#pragma mark - SerializedSize - -- (size_t)serializedSize { - GPBDescriptor *descriptor = [[self class] descriptor]; - size_t result = 0; - - // Has check is done explicitly, so GPBGetObjectIvarWithFieldNoAutocreate() - // avoids doing the has check again. - - // Fields. - for (GPBFieldDescriptor *fieldDescriptor in descriptor->fields_) { - GPBFieldType fieldType = fieldDescriptor.fieldType; - GPBDataType fieldDataType = GPBGetFieldDataType(fieldDescriptor); - - // Single Fields - if (fieldType == GPBFieldTypeSingle) { - BOOL selfHas = GPBGetHasIvarField(self, fieldDescriptor); - if (!selfHas) { - continue; // Nothing to do. - } - - uint32_t fieldNumber = GPBFieldNumber(fieldDescriptor); - - switch (fieldDataType) { -#define CASE_SINGLE_POD(NAME, TYPE, FUNC_TYPE) \ - case GPBDataType##NAME: { \ - TYPE fieldVal = GPBGetMessage##FUNC_TYPE##Field(self, fieldDescriptor); \ - result += GPBCompute##NAME##Size(fieldNumber, fieldVal); \ - break; \ - } -#define CASE_SINGLE_OBJECT(NAME) \ - case GPBDataType##NAME: { \ - id fieldVal = GPBGetObjectIvarWithFieldNoAutocreate(self, fieldDescriptor); \ - result += GPBCompute##NAME##Size(fieldNumber, fieldVal); \ - break; \ - } - CASE_SINGLE_POD(Bool, BOOL, Bool) - CASE_SINGLE_POD(Fixed32, uint32_t, UInt32) - CASE_SINGLE_POD(SFixed32, int32_t, Int32) - CASE_SINGLE_POD(Float, float, Float) - CASE_SINGLE_POD(Fixed64, uint64_t, UInt64) - CASE_SINGLE_POD(SFixed64, int64_t, Int64) - CASE_SINGLE_POD(Double, double, Double) - CASE_SINGLE_POD(Int32, int32_t, Int32) - CASE_SINGLE_POD(Int64, int64_t, Int64) - CASE_SINGLE_POD(SInt32, int32_t, Int32) - CASE_SINGLE_POD(SInt64, int64_t, Int64) - CASE_SINGLE_POD(UInt32, uint32_t, UInt32) - CASE_SINGLE_POD(UInt64, uint64_t, UInt64) - CASE_SINGLE_OBJECT(Bytes) - CASE_SINGLE_OBJECT(String) - CASE_SINGLE_OBJECT(Message) - CASE_SINGLE_OBJECT(Group) - CASE_SINGLE_POD(Enum, int32_t, Int32) -#undef CASE_SINGLE_POD -#undef CASE_SINGLE_OBJECT - } - - // Repeated Fields - } else if (fieldType == GPBFieldTypeRepeated) { - id genericArray = - GPBGetObjectIvarWithFieldNoAutocreate(self, fieldDescriptor); - NSUInteger count = [genericArray count]; - if (count == 0) { - continue; // Nothing to add. - } - __block size_t dataSize = 0; - - switch (fieldDataType) { -#define CASE_REPEATED_POD(NAME, TYPE, ARRAY_TYPE) \ - CASE_REPEATED_POD_EXTRA(NAME, TYPE, ARRAY_TYPE, ) -#define CASE_REPEATED_POD_EXTRA(NAME, TYPE, ARRAY_TYPE, ARRAY_ACCESSOR_NAME) \ - case GPBDataType##NAME: { \ - GPB##ARRAY_TYPE##Array *array = genericArray; \ - [array enumerate##ARRAY_ACCESSOR_NAME##ValuesWithBlock:^(TYPE value, NSUInteger idx, BOOL *stop) { \ - _Pragma("unused(idx, stop)"); \ - dataSize += GPBCompute##NAME##SizeNoTag(value); \ - }]; \ - break; \ - } -#define CASE_REPEATED_OBJECT(NAME) \ - case GPBDataType##NAME: { \ - for (id value in genericArray) { \ - dataSize += GPBCompute##NAME##SizeNoTag(value); \ - } \ - break; \ - } - CASE_REPEATED_POD(Bool, BOOL, Bool) - CASE_REPEATED_POD(Fixed32, uint32_t, UInt32) - CASE_REPEATED_POD(SFixed32, int32_t, Int32) - CASE_REPEATED_POD(Float, float, Float) - CASE_REPEATED_POD(Fixed64, uint64_t, UInt64) - CASE_REPEATED_POD(SFixed64, int64_t, Int64) - CASE_REPEATED_POD(Double, double, Double) - CASE_REPEATED_POD(Int32, int32_t, Int32) - CASE_REPEATED_POD(Int64, int64_t, Int64) - CASE_REPEATED_POD(SInt32, int32_t, Int32) - CASE_REPEATED_POD(SInt64, int64_t, Int64) - CASE_REPEATED_POD(UInt32, uint32_t, UInt32) - CASE_REPEATED_POD(UInt64, uint64_t, UInt64) - CASE_REPEATED_OBJECT(Bytes) - CASE_REPEATED_OBJECT(String) - CASE_REPEATED_OBJECT(Message) - CASE_REPEATED_OBJECT(Group) - CASE_REPEATED_POD_EXTRA(Enum, int32_t, Enum, Raw) -#undef CASE_REPEATED_POD -#undef CASE_REPEATED_POD_EXTRA -#undef CASE_REPEATED_OBJECT - } // switch - result += dataSize; - size_t tagSize = GPBComputeTagSize(GPBFieldNumber(fieldDescriptor)); - if (fieldDataType == GPBDataTypeGroup) { - // Groups have both a start and an end tag. - tagSize *= 2; - } - if (fieldDescriptor.isPackable) { - result += tagSize; - result += GPBComputeSizeTSizeAsInt32NoTag(dataSize); - } else { - result += count * tagSize; - } - - // Map<> Fields - } else { // fieldType == GPBFieldTypeMap - if (GPBDataTypeIsObject(fieldDataType) && - (fieldDescriptor.mapKeyDataType == GPBDataTypeString)) { - // If key type was string, then the map is an NSDictionary. - NSDictionary *map = - GPBGetObjectIvarWithFieldNoAutocreate(self, fieldDescriptor); - if (map) { - result += GPBDictionaryComputeSizeInternalHelper(map, fieldDescriptor); - } - } else { - // Type will be GPB*GroupDictionary, exact type doesn't matter. - GPBInt32Int32Dictionary *map = - GPBGetObjectIvarWithFieldNoAutocreate(self, fieldDescriptor); - result += [map computeSerializedSizeAsField:fieldDescriptor]; - } - } - } // for(fields) - - // Add any unknown fields. - if (descriptor.wireFormat) { - result += [unknownFields_ serializedSizeAsMessageSet]; - } else { - result += [unknownFields_ serializedSize]; - } - - // Add any extensions. - for (GPBExtensionDescriptor *extension in extensionMap_) { - id value = [extensionMap_ objectForKey:extension]; - result += GPBComputeExtensionSerializedSizeIncludingTag(extension, value); - } - - return result; -} - -#pragma mark - Resolve Methods Support - -typedef struct ResolveIvarAccessorMethodResult { - IMP impToAdd; - SEL encodingSelector; -} ResolveIvarAccessorMethodResult; - -static void ResolveIvarGet(GPBFieldDescriptor *field, - ResolveIvarAccessorMethodResult *result) { - GPBDataType fieldDataType = GPBGetFieldDataType(field); - switch (fieldDataType) { -#define CASE_GET(NAME, TYPE, TRUE_NAME) \ - case GPBDataType##NAME: { \ - result->impToAdd = imp_implementationWithBlock(^(id obj) { \ - return GPBGetMessage##TRUE_NAME##Field(obj, field); \ - }); \ - result->encodingSelector = @selector(get##NAME); \ - break; \ - } -#define CASE_GET_OBJECT(NAME, TYPE, TRUE_NAME) \ - case GPBDataType##NAME: { \ - result->impToAdd = imp_implementationWithBlock(^(id obj) { \ - return GPBGetObjectIvarWithField(obj, field); \ - }); \ - result->encodingSelector = @selector(get##NAME); \ - break; \ - } - CASE_GET(Bool, BOOL, Bool) - CASE_GET(Fixed32, uint32_t, UInt32) - CASE_GET(SFixed32, int32_t, Int32) - CASE_GET(Float, float, Float) - CASE_GET(Fixed64, uint64_t, UInt64) - CASE_GET(SFixed64, int64_t, Int64) - CASE_GET(Double, double, Double) - CASE_GET(Int32, int32_t, Int32) - CASE_GET(Int64, int64_t, Int64) - CASE_GET(SInt32, int32_t, Int32) - CASE_GET(SInt64, int64_t, Int64) - CASE_GET(UInt32, uint32_t, UInt32) - CASE_GET(UInt64, uint64_t, UInt64) - CASE_GET_OBJECT(Bytes, id, Object) - CASE_GET_OBJECT(String, id, Object) - CASE_GET_OBJECT(Message, id, Object) - CASE_GET_OBJECT(Group, id, Object) - CASE_GET(Enum, int32_t, Enum) -#undef CASE_GET - } -} - -static void ResolveIvarSet(GPBFieldDescriptor *field, - GPBFileSyntax syntax, - ResolveIvarAccessorMethodResult *result) { - GPBDataType fieldDataType = GPBGetFieldDataType(field); - switch (fieldDataType) { -#define CASE_SET(NAME, TYPE, TRUE_NAME) \ - case GPBDataType##NAME: { \ - result->impToAdd = imp_implementationWithBlock(^(id obj, TYPE value) { \ - return GPBSet##TRUE_NAME##IvarWithFieldInternal(obj, field, value, syntax); \ - }); \ - result->encodingSelector = @selector(set##NAME:); \ - break; \ - } - CASE_SET(Bool, BOOL, Bool) - CASE_SET(Fixed32, uint32_t, UInt32) - CASE_SET(SFixed32, int32_t, Int32) - CASE_SET(Float, float, Float) - CASE_SET(Fixed64, uint64_t, UInt64) - CASE_SET(SFixed64, int64_t, Int64) - CASE_SET(Double, double, Double) - CASE_SET(Int32, int32_t, Int32) - CASE_SET(Int64, int64_t, Int64) - CASE_SET(SInt32, int32_t, Int32) - CASE_SET(SInt64, int64_t, Int64) - CASE_SET(UInt32, uint32_t, UInt32) - CASE_SET(UInt64, uint64_t, UInt64) - CASE_SET(Bytes, id, Object) - CASE_SET(String, id, Object) - CASE_SET(Message, id, Object) - CASE_SET(Group, id, Object) - CASE_SET(Enum, int32_t, Enum) -#undef CASE_SET - } -} - -+ (BOOL)resolveInstanceMethod:(SEL)sel { - const GPBDescriptor *descriptor = [self descriptor]; - if (!descriptor) { - return NO; - } - - // NOTE: hasOrCountSel_/setHasSel_ will be NULL if the field for the given - // message should not have has support (done in GPBDescriptor.m), so there is - // no need for checks here to see if has*/setHas* are allowed. - - ResolveIvarAccessorMethodResult result = {NULL, NULL}; - for (GPBFieldDescriptor *field in descriptor->fields_) { - BOOL isMapOrArray = GPBFieldIsMapOrArray(field); - if (!isMapOrArray) { - // Single fields. - if (sel == field->getSel_) { - ResolveIvarGet(field, &result); - break; - } else if (sel == field->setSel_) { - ResolveIvarSet(field, descriptor.file.syntax, &result); - break; - } else if (sel == field->hasOrCountSel_) { - int32_t index = GPBFieldHasIndex(field); - uint32_t fieldNum = GPBFieldNumber(field); - result.impToAdd = imp_implementationWithBlock(^(id obj) { - return GPBGetHasIvar(obj, index, fieldNum); - }); - result.encodingSelector = @selector(getBool); - break; - } else if (sel == field->setHasSel_) { - result.impToAdd = imp_implementationWithBlock(^(id obj, BOOL value) { - if (value) { - [NSException raise:NSInvalidArgumentException - format:@"%@: %@ can only be set to NO (to clear field).", - [obj class], - NSStringFromSelector(field->setHasSel_)]; - } - GPBClearMessageField(obj, field); - }); - result.encodingSelector = @selector(setBool:); - break; - } else { - GPBOneofDescriptor *oneof = field->containingOneof_; - if (oneof && (sel == oneof->caseSel_)) { - int32_t index = GPBFieldHasIndex(field); - result.impToAdd = imp_implementationWithBlock(^(id obj) { - return GPBGetHasOneof(obj, index); - }); - result.encodingSelector = @selector(getEnum); - break; - } - } - } else { - // map<>/repeated fields. - if (sel == field->getSel_) { - if (field.fieldType == GPBFieldTypeRepeated) { - result.impToAdd = imp_implementationWithBlock(^(id obj) { - return GetArrayIvarWithField(obj, field); - }); - } else { - result.impToAdd = imp_implementationWithBlock(^(id obj) { - return GetMapIvarWithField(obj, field); - }); - } - result.encodingSelector = @selector(getArray); - break; - } else if (sel == field->setSel_) { - // Local for syntax so the block can directly capture it and not the - // full lookup. - const GPBFileSyntax syntax = descriptor.file.syntax; - result.impToAdd = imp_implementationWithBlock(^(id obj, id value) { - return GPBSetObjectIvarWithFieldInternal(obj, field, value, syntax); - }); - result.encodingSelector = @selector(setArray:); - break; - } else if (sel == field->hasOrCountSel_) { - result.impToAdd = imp_implementationWithBlock(^(id obj) { - // Type doesn't matter, all *Array and *Dictionary types support - // -count. - NSArray *arrayOrMap = - GPBGetObjectIvarWithFieldNoAutocreate(obj, field); - return [arrayOrMap count]; - }); - result.encodingSelector = @selector(getArrayCount); - break; - } - } - } - if (result.impToAdd) { - const char *encoding = - GPBMessageEncodingForSelector(result.encodingSelector, YES); - BOOL methodAdded = class_addMethod(descriptor.messageClass, sel, - result.impToAdd, encoding); - return methodAdded; - } - return [super resolveInstanceMethod:sel]; -} - -+ (BOOL)resolveClassMethod:(SEL)sel { - // Extensions scoped to a Message and looked up via class methods. - if (GPBResolveExtensionClassMethod(self, sel)) { - return YES; - } - return [super resolveClassMethod:sel]; -} - -#pragma mark - NSCoding Support - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - self = [self init]; - if (self) { - NSData *data = - [aDecoder decodeObjectOfClass:[NSData class] forKey:kGPBDataCoderKey]; - if (data.length) { - [self mergeFromData:data extensionRegistry:nil]; - } - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - NSData *data = [self data]; - if (data.length) { - [aCoder encodeObject:data forKey:kGPBDataCoderKey]; - } -} - -#pragma mark - KVC Support - -+ (BOOL)accessInstanceVariablesDirectly { - // Make sure KVC doesn't use instance variables. - return NO; -} - -@end - -#pragma mark - Messages from GPBUtilities.h but defined here for access to helpers. - -// Only exists for public api, no core code should use this. -id GPBGetMessageRepeatedField(GPBMessage *self, GPBFieldDescriptor *field) { -#if defined(DEBUG) && DEBUG - if (field.fieldType != GPBFieldTypeRepeated) { - [NSException raise:NSInvalidArgumentException - format:@"%@.%@ is not a repeated field.", - [self class], field.name]; - } -#endif - GPBDescriptor *descriptor = [[self class] descriptor]; - GPBFileSyntax syntax = descriptor.file.syntax; - return GetOrCreateArrayIvarWithField(self, field, syntax); -} - -// Only exists for public api, no core code should use this. -id GPBGetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field) { -#if defined(DEBUG) && DEBUG - if (field.fieldType != GPBFieldTypeMap) { - [NSException raise:NSInvalidArgumentException - format:@"%@.%@ is not a map<> field.", - [self class], field.name]; - } -#endif - GPBDescriptor *descriptor = [[self class] descriptor]; - GPBFileSyntax syntax = descriptor.file.syntax; - return GetOrCreateMapIvarWithField(self, field, syntax); -} - -#pragma clang diagnostic pop diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBMessage_PackagePrivate.h b/Old My Mind/Pods/Protobuf/objectivec/GPBMessage_PackagePrivate.h deleted file mode 100755 index 02d0e16..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBMessage_PackagePrivate.h +++ /dev/null @@ -1,142 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This header is private to the ProtobolBuffers library and must NOT be -// included by any sources outside this library. The contents of this file are -// subject to change at any time without notice. - -#import "GPBMessage.h" - -#import - -#import "GPBBootstrap.h" - -typedef struct GPBMessage_Storage { - uint32_t _has_storage_[0]; -} GPBMessage_Storage; - -typedef struct GPBMessage_Storage *GPBMessage_StoragePtr; - -@interface GPBMessage () { - @package - // NOTE: Because of the +allocWithZone code using NSAllocateObject(), - // this structure should ideally always be kept pointer aligned where the - // real storage starts is also pointer aligned. The compiler/runtime already - // do this, but it may not be documented. - - // A pointer to the actual fields of the subclasses. The actual structure - // pointed to by this pointer will depend on the subclass. - // All of the actual structures will start the same as - // GPBMessage_Storage with _has_storage__ as the first field. - // Kept public because static functions need to access it. - GPBMessage_StoragePtr messageStorage_; - - // A lock to provide mutual exclusion from internal data that can be modified - // by *read* operations such as getters (autocreation of message fields and - // message extensions, not setting of values). Used to guarantee thread safety - // for concurrent reads on the message. - // NOTE: OSSpinLock may seem like a good fit here but Apple engineers have - // pointed out that they are vulnerable to live locking on iOS in cases of - // priority inversion: - // http://mjtsai.com/blog/2015/12/16/osspinlock-is-unsafe/ - // https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000372.html - // Use of readOnlySemaphore_ must be prefaced by a call to - // GPBPrepareReadOnlySemaphore to ensure it has been created. This allows - // readOnlySemaphore_ to be only created when actually needed. - dispatch_once_t readOnlySemaphoreCreationOnce_; - dispatch_semaphore_t readOnlySemaphore_; -} - -// Gets an extension value without autocreating the result if not found. (i.e. -// returns nil if the extension is not set) -- (id)getExistingExtension:(GPBExtensionDescriptor *)extension; - -// Parses a message of this type from the input and merges it with this -// message. -// -// Warning: This does not verify that all required fields are present in -// the input message. -// Note: The caller should call -// -[CodedInputStream checkLastTagWas:] after calling this to -// verify that the last tag seen was the appropriate end-group tag, -// or zero for EOF. -// NOTE: This will throw if there is an error while parsing. -- (void)mergeFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry; - -// Parses the next delimited message of this type from the input and merges it -// with this message. -- (void)mergeDelimitedFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry: - (GPBExtensionRegistry *)extensionRegistry; - -- (void)addUnknownMapEntry:(int32_t)fieldNum value:(NSData *)data; - -@end - -CF_EXTERN_C_BEGIN - - -// Call this before using the readOnlySemaphore_. This ensures it is created only once. -NS_INLINE void GPBPrepareReadOnlySemaphore(GPBMessage *self) { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - dispatch_once(&self->readOnlySemaphoreCreationOnce_, ^{ - self->readOnlySemaphore_ = dispatch_semaphore_create(1); - }); -#pragma clang diagnostic pop -} - -// Returns a new instance that was automatically created by |autocreator| for -// its field |field|. -GPBMessage *GPBCreateMessageWithAutocreator(Class msgClass, - GPBMessage *autocreator, - GPBFieldDescriptor *field) - __attribute__((ns_returns_retained)); - -// Returns whether |message| autocreated this message. This is NO if the message -// was not autocreated by |message| or if it has been mutated since -// autocreation. -BOOL GPBWasMessageAutocreatedBy(GPBMessage *message, GPBMessage *parent); - -// Call this when you mutate a message. It will cause the message to become -// visible to its autocreator. -void GPBBecomeVisibleToAutocreator(GPBMessage *self); - -// Call this when an array/dictionary is mutated so the parent message that -// autocreated it can react. -void GPBAutocreatedArrayModified(GPBMessage *self, id array); -void GPBAutocreatedDictionaryModified(GPBMessage *self, id dictionary); - -// Clear the autocreator, if any. Asserts if the autocreator still has an -// autocreated reference to this message. -void GPBClearMessageAutocreator(GPBMessage *self); - -CF_EXTERN_C_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBProtocolBuffers.h b/Old My Mind/Pods/Protobuf/objectivec/GPBProtocolBuffers.h deleted file mode 100755 index 68d8854..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBProtocolBuffers.h +++ /dev/null @@ -1,76 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBBootstrap.h" - -#import "GPBArray.h" -#import "GPBCodedInputStream.h" -#import "GPBCodedOutputStream.h" -#import "GPBDescriptor.h" -#import "GPBDictionary.h" -#import "GPBExtensionRegistry.h" -#import "GPBMessage.h" -#import "GPBRootObject.h" -#import "GPBUnknownField.h" -#import "GPBUnknownFieldSet.h" -#import "GPBUtilities.h" -#import "GPBWellKnownTypes.h" -#import "GPBWireFormat.h" - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -// Well-known proto types -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import - #import - #import - #import - #import - #import - #import - #import -#else - #import "google/protobuf/Any.pbobjc.h" - #import "google/protobuf/Api.pbobjc.h" - #import "google/protobuf/Duration.pbobjc.h" - #import "google/protobuf/Empty.pbobjc.h" - #import "google/protobuf/FieldMask.pbobjc.h" - #import "google/protobuf/SourceContext.pbobjc.h" - #import "google/protobuf/Struct.pbobjc.h" - #import "google/protobuf/Timestamp.pbobjc.h" - #import "google/protobuf/Type.pbobjc.h" - #import "google/protobuf/Wrappers.pbobjc.h" -#endif diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBProtocolBuffers_RuntimeSupport.h b/Old My Mind/Pods/Protobuf/objectivec/GPBProtocolBuffers_RuntimeSupport.h deleted file mode 100755 index fea75b9..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBProtocolBuffers_RuntimeSupport.h +++ /dev/null @@ -1,40 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This header is meant to only be used by the generated source, it should not -// be included in code using protocol buffers. - -#import "GPBProtocolBuffers.h" - -#import "GPBDescriptor_PackagePrivate.h" -#import "GPBExtensionInternals.h" -#import "GPBMessage_PackagePrivate.h" -#import "GPBRootObject_PackagePrivate.h" -#import "GPBUtilities_PackagePrivate.h" diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBRootObject.h b/Old My Mind/Pods/Protobuf/objectivec/GPBRootObject.h deleted file mode 100755 index d2e2aeb..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBRootObject.h +++ /dev/null @@ -1,52 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -@class GPBExtensionRegistry; - -NS_ASSUME_NONNULL_BEGIN - -/** - * Every generated proto file defines a local "Root" class that exposes a - * GPBExtensionRegistry for all the extensions defined by that file and - * the files it depends on. - **/ -@interface GPBRootObject : NSObject - -/** - * @return An extension registry for the given file and all the files it depends - * on. - **/ -+ (GPBExtensionRegistry *)extensionRegistry; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBRootObject.m b/Old My Mind/Pods/Protobuf/objectivec/GPBRootObject.m deleted file mode 100755 index 4570716..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBRootObject.m +++ /dev/null @@ -1,230 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBRootObject_PackagePrivate.h" - -#import - -#import - -#import "GPBDescriptor.h" -#import "GPBExtensionRegistry.h" -#import "GPBUtilities_PackagePrivate.h" - -@interface GPBExtensionDescriptor (GPBRootObject) -// Get singletonName as a c string. -- (const char *)singletonNameC; -@end - -@implementation GPBRootObject - -// Taken from http://www.burtleburtle.net/bob/hash/doobs.html -// Public Domain -static uint32_t jenkins_one_at_a_time_hash(const char *key) { - uint32_t hash = 0; - for (uint32_t i = 0; key[i] != '\0'; ++i) { - hash += key[i]; - hash += (hash << 10); - hash ^= (hash >> 6); - } - hash += (hash << 3); - hash ^= (hash >> 11); - hash += (hash << 15); - return hash; -} - -// Key methods for our custom CFDictionary. -// Note that the dictionary lasts for the lifetime of our app, so no need -// to worry about deallocation. All of the items are added to it at -// startup, and so the keys don't need to be retained/released. -// Keys are NULL terminated char *. -static const void *GPBRootExtensionKeyRetain(CFAllocatorRef allocator, - const void *value) { -#pragma unused(allocator) - return value; -} - -static void GPBRootExtensionKeyRelease(CFAllocatorRef allocator, - const void *value) { -#pragma unused(allocator) -#pragma unused(value) -} - -static CFStringRef GPBRootExtensionCopyKeyDescription(const void *value) { - const char *key = (const char *)value; - return CFStringCreateWithCString(kCFAllocatorDefault, key, - kCFStringEncodingUTF8); -} - -static Boolean GPBRootExtensionKeyEqual(const void *value1, - const void *value2) { - const char *key1 = (const char *)value1; - const char *key2 = (const char *)value2; - return strcmp(key1, key2) == 0; -} - -static CFHashCode GPBRootExtensionKeyHash(const void *value) { - const char *key = (const char *)value; - return jenkins_one_at_a_time_hash(key); -} - -// NOTE: OSSpinLock may seem like a good fit here but Apple engineers have -// pointed out that they are vulnerable to live locking on iOS in cases of -// priority inversion: -// http://mjtsai.com/blog/2015/12/16/osspinlock-is-unsafe/ -// https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000372.html -static dispatch_semaphore_t gExtensionSingletonDictionarySemaphore; -static CFMutableDictionaryRef gExtensionSingletonDictionary = NULL; -static GPBExtensionRegistry *gDefaultExtensionRegistry = NULL; - -+ (void)initialize { - // Ensure the global is started up. - if (!gExtensionSingletonDictionary) { - gExtensionSingletonDictionarySemaphore = dispatch_semaphore_create(1); - CFDictionaryKeyCallBacks keyCallBacks = { - // See description above for reason for using custom dictionary. - 0, - GPBRootExtensionKeyRetain, - GPBRootExtensionKeyRelease, - GPBRootExtensionCopyKeyDescription, - GPBRootExtensionKeyEqual, - GPBRootExtensionKeyHash, - }; - gExtensionSingletonDictionary = - CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &keyCallBacks, - &kCFTypeDictionaryValueCallBacks); - gDefaultExtensionRegistry = [[GPBExtensionRegistry alloc] init]; - } - - if ([self superclass] == [GPBRootObject class]) { - // This is here to start up all the per file "Root" subclasses. - // This must be done in initialize to enforce thread safety of start up of - // the protocol buffer library. - [self extensionRegistry]; - } -} - -+ (GPBExtensionRegistry *)extensionRegistry { - // Is overridden in all the subclasses that provide extensions to provide the - // per class one. - return gDefaultExtensionRegistry; -} - -+ (void)globallyRegisterExtension:(GPBExtensionDescriptor *)field { - const char *key = [field singletonNameC]; - dispatch_semaphore_wait(gExtensionSingletonDictionarySemaphore, - DISPATCH_TIME_FOREVER); - CFDictionarySetValue(gExtensionSingletonDictionary, key, field); - dispatch_semaphore_signal(gExtensionSingletonDictionarySemaphore); -} - -static id ExtensionForName(id self, SEL _cmd) { - // Really fast way of doing "classname_selName". - // This came up as a hotspot (creation of NSString *) when accessing a - // lot of extensions. - const char *selName = sel_getName(_cmd); - if (selName[0] == '_') { - return nil; // Apple internal selector. - } - size_t selNameLen = 0; - while (1) { - char c = selName[selNameLen]; - if (c == '\0') { // String end. - break; - } - if (c == ':') { - return nil; // Selector took an arg, not one of the runtime methods. - } - ++selNameLen; - } - - const char *className = class_getName(self); - size_t classNameLen = strlen(className); - char key[classNameLen + selNameLen + 2]; - memcpy(key, className, classNameLen); - key[classNameLen] = '_'; - memcpy(&key[classNameLen + 1], selName, selNameLen); - key[classNameLen + 1 + selNameLen] = '\0'; - - // NOTE: Even though this method is called from another C function, - // gExtensionSingletonDictionarySemaphore and gExtensionSingletonDictionary - // will always be initialized. This is because this call flow is just to - // lookup the Extension, meaning the code is calling an Extension class - // message on a Message or Root class. This guarantees that the class was - // initialized and Message classes ensure their Root was also initialized. - NSAssert(gExtensionSingletonDictionary, @"Startup order broken!"); - - dispatch_semaphore_wait(gExtensionSingletonDictionarySemaphore, - DISPATCH_TIME_FOREVER); - id extension = (id)CFDictionaryGetValue(gExtensionSingletonDictionary, key); - if (extension) { - // The method is getting wired in to the class, so no need to keep it in - // the dictionary. - CFDictionaryRemoveValue(gExtensionSingletonDictionary, key); - } - dispatch_semaphore_signal(gExtensionSingletonDictionarySemaphore); - return extension; -} - -BOOL GPBResolveExtensionClassMethod(Class self, SEL sel) { - // Another option would be to register the extensions with the class at - // globallyRegisterExtension: - // Timing the two solutions, this solution turned out to be much faster - // and reduced startup time, and runtime memory. - // The advantage to globallyRegisterExtension is that it would reduce the - // size of the protos somewhat because the singletonNameC wouldn't need - // to include the class name. For a class with a lot of extensions it - // can add up. You could also significantly reduce the code complexity of this - // file. - id extension = ExtensionForName(self, sel); - if (extension != nil) { - const char *encoding = - GPBMessageEncodingForSelector(@selector(getClassValue), NO); - Class metaClass = objc_getMetaClass(class_getName(self)); - IMP imp = imp_implementationWithBlock(^(id obj) { -#pragma unused(obj) - return extension; - }); - if (class_addMethod(metaClass, sel, imp, encoding)) { - return YES; - } - } - return NO; -} - - -+ (BOOL)resolveClassMethod:(SEL)sel { - if (GPBResolveExtensionClassMethod(self, sel)) { - return YES; - } - return [super resolveClassMethod:sel]; -} - -@end diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBRootObject_PackagePrivate.h b/Old My Mind/Pods/Protobuf/objectivec/GPBRootObject_PackagePrivate.h deleted file mode 100755 index 3c8f09c..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBRootObject_PackagePrivate.h +++ /dev/null @@ -1,46 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBRootObject.h" - -@class GPBExtensionDescriptor; - -@interface GPBRootObject () - -// Globally register. -+ (void)globallyRegisterExtension:(GPBExtensionDescriptor *)field; - -@end - -// Returns YES if the selector was resolved and added to the class, -// NO otherwise. -BOOL GPBResolveExtensionClassMethod(Class self, SEL sel); diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBRuntimeTypes.h b/Old My Mind/Pods/Protobuf/objectivec/GPBRuntimeTypes.h deleted file mode 100755 index 4d55206..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBRuntimeTypes.h +++ /dev/null @@ -1,144 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBBootstrap.h" - -@class GPBEnumDescriptor; -@class GPBMessage; -@class GPBInt32Array; - -/** - * Verifies that a given value can be represented by an enum type. - * */ -typedef BOOL (*GPBEnumValidationFunc)(int32_t); - -/** - * Fetches an EnumDescriptor. - * */ -typedef GPBEnumDescriptor *(*GPBEnumDescriptorFunc)(void); - -/** - * Magic value used at runtime to indicate an enum value that wasn't know at - * compile time. - * */ -enum { - kGPBUnrecognizedEnumeratorValue = (int32_t)0xFBADBEEF, -}; - -/** - * A union for storing all possible Protobuf values. Note that owner is - * responsible for memory management of object types. - * */ -typedef union { - BOOL valueBool; - int32_t valueInt32; - int64_t valueInt64; - uint32_t valueUInt32; - uint64_t valueUInt64; - float valueFloat; - double valueDouble; - GPB_UNSAFE_UNRETAINED NSData *valueData; - GPB_UNSAFE_UNRETAINED NSString *valueString; - GPB_UNSAFE_UNRETAINED GPBMessage *valueMessage; - int32_t valueEnum; -} GPBGenericValue; - -/** - * Enum listing the possible data types that a field can contain. - * - * @note Do not change the order of this enum (or add things to it) without - * thinking about it very carefully. There are several things that depend - * on the order. - * */ -typedef NS_ENUM(uint8_t, GPBDataType) { - /** Field contains boolean value(s). */ - GPBDataTypeBool = 0, - /** Field contains unsigned 4 byte value(s). */ - GPBDataTypeFixed32, - /** Field contains signed 4 byte value(s). */ - GPBDataTypeSFixed32, - /** Field contains float value(s). */ - GPBDataTypeFloat, - /** Field contains unsigned 8 byte value(s). */ - GPBDataTypeFixed64, - /** Field contains signed 8 byte value(s). */ - GPBDataTypeSFixed64, - /** Field contains double value(s). */ - GPBDataTypeDouble, - /** - * Field contains variable length value(s). Inefficient for encoding negative - * numbers – if your field is likely to have negative values, use - * GPBDataTypeSInt32 instead. - **/ - GPBDataTypeInt32, - /** - * Field contains variable length value(s). Inefficient for encoding negative - * numbers – if your field is likely to have negative values, use - * GPBDataTypeSInt64 instead. - **/ - GPBDataTypeInt64, - /** Field contains signed variable length integer value(s). */ - GPBDataTypeSInt32, - /** Field contains signed variable length integer value(s). */ - GPBDataTypeSInt64, - /** Field contains unsigned variable length integer value(s). */ - GPBDataTypeUInt32, - /** Field contains unsigned variable length integer value(s). */ - GPBDataTypeUInt64, - /** Field contains an arbitrary sequence of bytes. */ - GPBDataTypeBytes, - /** Field contains UTF-8 encoded or 7-bit ASCII text. */ - GPBDataTypeString, - /** Field contains message type(s). */ - GPBDataTypeMessage, - /** Field contains message type(s). */ - GPBDataTypeGroup, - /** Field contains enum value(s). */ - GPBDataTypeEnum, -}; - -enum { - /** - * A count of the number of types in GPBDataType. Separated out from the - * GPBDataType enum to avoid warnings regarding not handling GPBDataType_Count - * in switch statements. - **/ - GPBDataType_Count = GPBDataTypeEnum + 1 -}; - -/** An extension range. */ -typedef struct GPBExtensionRange { - /** Inclusive. */ - uint32_t start; - /** Exclusive. */ - uint32_t end; -} GPBExtensionRange; diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownField.h b/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownField.h deleted file mode 100755 index a135cc2..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownField.h +++ /dev/null @@ -1,96 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -@class GPBCodedOutputStream; -@class GPBUInt32Array; -@class GPBUInt64Array; -@class GPBUnknownFieldSet; - -NS_ASSUME_NONNULL_BEGIN -/** - * Store an unknown field. These are used in conjunction with - * GPBUnknownFieldSet. - **/ -@interface GPBUnknownField : NSObject - -/** The field number the data is stored under. */ -@property(nonatomic, readonly, assign) int32_t number; - -/** An array of varint values for this field. */ -@property(nonatomic, readonly, strong) GPBUInt64Array *varintList; - -/** An array of fixed32 values for this field. */ -@property(nonatomic, readonly, strong) GPBUInt32Array *fixed32List; - -/** An array of fixed64 values for this field. */ -@property(nonatomic, readonly, strong) GPBUInt64Array *fixed64List; - -/** An array of data values for this field. */ -@property(nonatomic, readonly, strong) NSArray *lengthDelimitedList; - -/** An array of groups of values for this field. */ -@property(nonatomic, readonly, strong) NSArray *groupList; - -/** - * Add a value to the varintList. - * - * @param value The value to add. - **/ -- (void)addVarint:(uint64_t)value; -/** - * Add a value to the fixed32List. - * - * @param value The value to add. - **/ -- (void)addFixed32:(uint32_t)value; -/** - * Add a value to the fixed64List. - * - * @param value The value to add. - **/ -- (void)addFixed64:(uint64_t)value; -/** - * Add a value to the lengthDelimitedList. - * - * @param value The value to add. - **/ -- (void)addLengthDelimited:(NSData *)value; -/** - * Add a value to the groupList. - * - * @param value The value to add. - **/ -- (void)addGroup:(GPBUnknownFieldSet *)value; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownField.m b/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownField.m deleted file mode 100755 index 30efe75..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownField.m +++ /dev/null @@ -1,334 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBUnknownField_PackagePrivate.h" - -#import "GPBArray.h" -#import "GPBCodedOutputStream_PackagePrivate.h" - -@implementation GPBUnknownField { - @protected - int32_t number_; - GPBUInt64Array *mutableVarintList_; - GPBUInt32Array *mutableFixed32List_; - GPBUInt64Array *mutableFixed64List_; - NSMutableArray *mutableLengthDelimitedList_; - NSMutableArray *mutableGroupList_; -} - -@synthesize number = number_; -@synthesize varintList = mutableVarintList_; -@synthesize fixed32List = mutableFixed32List_; -@synthesize fixed64List = mutableFixed64List_; -@synthesize lengthDelimitedList = mutableLengthDelimitedList_; -@synthesize groupList = mutableGroupList_; - -- (instancetype)initWithNumber:(int32_t)number { - if ((self = [super init])) { - number_ = number; - } - return self; -} - -- (void)dealloc { - [mutableVarintList_ release]; - [mutableFixed32List_ release]; - [mutableFixed64List_ release]; - [mutableLengthDelimitedList_ release]; - [mutableGroupList_ release]; - - [super dealloc]; -} - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -- (id)copyWithZone:(NSZone *)zone { - GPBUnknownField *result = - [[GPBUnknownField allocWithZone:zone] initWithNumber:number_]; - result->mutableFixed32List_ = [mutableFixed32List_ copyWithZone:zone]; - result->mutableFixed64List_ = [mutableFixed64List_ copyWithZone:zone]; - result->mutableLengthDelimitedList_ = - [mutableLengthDelimitedList_ copyWithZone:zone]; - result->mutableVarintList_ = [mutableVarintList_ copyWithZone:zone]; - if (mutableGroupList_.count) { - result->mutableGroupList_ = [[NSMutableArray allocWithZone:zone] - initWithCapacity:mutableGroupList_.count]; - for (GPBUnknownFieldSet *group in mutableGroupList_) { - GPBUnknownFieldSet *copied = [group copyWithZone:zone]; - [result->mutableGroupList_ addObject:copied]; - [copied release]; - } - } - return result; -} - -- (BOOL)isEqual:(id)object { - if (self == object) return YES; - if (![object isKindOfClass:[GPBUnknownField class]]) return NO; - GPBUnknownField *field = (GPBUnknownField *)object; - BOOL equalVarint = - (mutableVarintList_.count == 0 && field->mutableVarintList_.count == 0) || - [mutableVarintList_ isEqual:field->mutableVarintList_]; - if (!equalVarint) return NO; - BOOL equalFixed32 = (mutableFixed32List_.count == 0 && - field->mutableFixed32List_.count == 0) || - [mutableFixed32List_ isEqual:field->mutableFixed32List_]; - if (!equalFixed32) return NO; - BOOL equalFixed64 = (mutableFixed64List_.count == 0 && - field->mutableFixed64List_.count == 0) || - [mutableFixed64List_ isEqual:field->mutableFixed64List_]; - if (!equalFixed64) return NO; - BOOL equalLDList = - (mutableLengthDelimitedList_.count == 0 && - field->mutableLengthDelimitedList_.count == 0) || - [mutableLengthDelimitedList_ isEqual:field->mutableLengthDelimitedList_]; - if (!equalLDList) return NO; - BOOL equalGroupList = - (mutableGroupList_.count == 0 && field->mutableGroupList_.count == 0) || - [mutableGroupList_ isEqual:field->mutableGroupList_]; - if (!equalGroupList) return NO; - return YES; -} - -- (NSUInteger)hash { - // Just mix the hashes of the possible sub arrays. - const int prime = 31; - NSUInteger result = prime + [mutableVarintList_ hash]; - result = prime * result + [mutableFixed32List_ hash]; - result = prime * result + [mutableFixed64List_ hash]; - result = prime * result + [mutableLengthDelimitedList_ hash]; - result = prime * result + [mutableGroupList_ hash]; - return result; -} - -- (void)writeToOutput:(GPBCodedOutputStream *)output { - NSUInteger count = mutableVarintList_.count; - if (count > 0) { - [output writeUInt64Array:number_ values:mutableVarintList_ tag:0]; - } - count = mutableFixed32List_.count; - if (count > 0) { - [output writeFixed32Array:number_ values:mutableFixed32List_ tag:0]; - } - count = mutableFixed64List_.count; - if (count > 0) { - [output writeFixed64Array:number_ values:mutableFixed64List_ tag:0]; - } - count = mutableLengthDelimitedList_.count; - if (count > 0) { - [output writeBytesArray:number_ values:mutableLengthDelimitedList_]; - } - count = mutableGroupList_.count; - if (count > 0) { - [output writeUnknownGroupArray:number_ values:mutableGroupList_]; - } -} - -- (size_t)serializedSize { - __block size_t result = 0; - int32_t number = number_; - [mutableVarintList_ - enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - result += GPBComputeUInt64Size(number, value); - }]; - - [mutableFixed32List_ - enumerateValuesWithBlock:^(uint32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - result += GPBComputeFixed32Size(number, value); - }]; - - [mutableFixed64List_ - enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - result += GPBComputeFixed64Size(number, value); - }]; - - for (NSData *data in mutableLengthDelimitedList_) { - result += GPBComputeBytesSize(number, data); - } - - for (GPBUnknownFieldSet *set in mutableGroupList_) { - result += GPBComputeUnknownGroupSize(number, set); - } - - return result; -} - -- (void)writeAsMessageSetExtensionToOutput:(GPBCodedOutputStream *)output { - for (NSData *data in mutableLengthDelimitedList_) { - [output writeRawMessageSetExtension:number_ value:data]; - } -} - -- (size_t)serializedSizeAsMessageSetExtension { - size_t result = 0; - for (NSData *data in mutableLengthDelimitedList_) { - result += GPBComputeRawMessageSetExtensionSize(number_, data); - } - return result; -} - -- (NSString *)description { - NSMutableString *description = [NSMutableString - stringWithFormat:@"<%@ %p>: Field: %d {\n", [self class], self, number_]; - [mutableVarintList_ - enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [description appendFormat:@"\t%llu\n", value]; - }]; - - [mutableFixed32List_ - enumerateValuesWithBlock:^(uint32_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [description appendFormat:@"\t%u\n", value]; - }]; - - [mutableFixed64List_ - enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL *stop) { -#pragma unused(idx, stop) - [description appendFormat:@"\t%llu\n", value]; - }]; - - for (NSData *data in mutableLengthDelimitedList_) { - [description appendFormat:@"\t%@\n", data]; - } - - for (GPBUnknownFieldSet *set in mutableGroupList_) { - [description appendFormat:@"\t%@\n", set]; - } - [description appendString:@"}"]; - return description; -} - -- (void)mergeFromField:(GPBUnknownField *)other { - GPBUInt64Array *otherVarintList = other.varintList; - if (otherVarintList.count > 0) { - if (mutableVarintList_ == nil) { - mutableVarintList_ = [otherVarintList copy]; - } else { - [mutableVarintList_ addValuesFromArray:otherVarintList]; - } - } - - GPBUInt32Array *otherFixed32List = other.fixed32List; - if (otherFixed32List.count > 0) { - if (mutableFixed32List_ == nil) { - mutableFixed32List_ = [otherFixed32List copy]; - } else { - [mutableFixed32List_ addValuesFromArray:otherFixed32List]; - } - } - - GPBUInt64Array *otherFixed64List = other.fixed64List; - if (otherFixed64List.count > 0) { - if (mutableFixed64List_ == nil) { - mutableFixed64List_ = [otherFixed64List copy]; - } else { - [mutableFixed64List_ addValuesFromArray:otherFixed64List]; - } - } - - NSArray *otherLengthDelimitedList = other.lengthDelimitedList; - if (otherLengthDelimitedList.count > 0) { - if (mutableLengthDelimitedList_ == nil) { - mutableLengthDelimitedList_ = [otherLengthDelimitedList mutableCopy]; - } else { - [mutableLengthDelimitedList_ - addObjectsFromArray:otherLengthDelimitedList]; - } - } - - NSArray *otherGroupList = other.groupList; - if (otherGroupList.count > 0) { - if (mutableGroupList_ == nil) { - mutableGroupList_ = - [[NSMutableArray alloc] initWithCapacity:otherGroupList.count]; - } - // Make our own mutable copies. - for (GPBUnknownFieldSet *group in otherGroupList) { - GPBUnknownFieldSet *copied = [group copy]; - [mutableGroupList_ addObject:copied]; - [copied release]; - } - } -} - -- (void)addVarint:(uint64_t)value { - if (mutableVarintList_ == nil) { - mutableVarintList_ = [[GPBUInt64Array alloc] initWithValues:&value count:1]; - } else { - [mutableVarintList_ addValue:value]; - } -} - -- (void)addFixed32:(uint32_t)value { - if (mutableFixed32List_ == nil) { - mutableFixed32List_ = - [[GPBUInt32Array alloc] initWithValues:&value count:1]; - } else { - [mutableFixed32List_ addValue:value]; - } -} - -- (void)addFixed64:(uint64_t)value { - if (mutableFixed64List_ == nil) { - mutableFixed64List_ = - [[GPBUInt64Array alloc] initWithValues:&value count:1]; - } else { - [mutableFixed64List_ addValue:value]; - } -} - -- (void)addLengthDelimited:(NSData *)value { - if (mutableLengthDelimitedList_ == nil) { - mutableLengthDelimitedList_ = - [[NSMutableArray alloc] initWithObjects:&value count:1]; - } else { - [mutableLengthDelimitedList_ addObject:value]; - } -} - -- (void)addGroup:(GPBUnknownFieldSet *)value { - if (mutableGroupList_ == nil) { - mutableGroupList_ = [[NSMutableArray alloc] initWithObjects:&value count:1]; - } else { - [mutableGroupList_ addObject:value]; - } -} - -#pragma clang diagnostic pop - -@end diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet.h b/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet.h deleted file mode 100755 index 1b5f24f..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet.h +++ /dev/null @@ -1,82 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -@class GPBUnknownField; - -NS_ASSUME_NONNULL_BEGIN - -/** - * A collection of unknown fields. Fields parsed from the binary representation - * of a message that are unknown end up in an instance of this set. This only - * applies for files declared with the "proto2" syntax. Files declared with the - * "proto3" syntax discard the unknown values. - **/ -@interface GPBUnknownFieldSet : NSObject - -/** - * Tests to see if the given field number has a value. - * - * @param number The field number to check. - * - * @return YES if there is an unknown field for the given field number. - **/ -- (BOOL)hasField:(int32_t)number; - -/** - * Fetches the GPBUnknownField for the given field number. - * - * @param number The field number to look up. - * - * @return The GPBUnknownField or nil if none found. - **/ -- (nullable GPBUnknownField *)getField:(int32_t)number; - -/** - * @return The number of fields in this set. - **/ -- (NSUInteger)countOfFields; - -/** - * Adds the given field to the set. - * - * @param field The field to add to the set. - **/ -- (void)addField:(GPBUnknownField *)field; - -/** - * @return An array of the GPBUnknownFields sorted by the field numbers. - **/ -- (NSArray *)sortedFields; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet.m b/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet.m deleted file mode 100755 index a7335f0..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet.m +++ /dev/null @@ -1,395 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBUnknownFieldSet_PackagePrivate.h" - -#import "GPBCodedInputStream_PackagePrivate.h" -#import "GPBCodedOutputStream.h" -#import "GPBUnknownField_PackagePrivate.h" -#import "GPBUtilities.h" -#import "GPBWireFormat.h" - -#pragma mark Helpers - -static void checkNumber(int32_t number) { - if (number == 0) { - [NSException raise:NSInvalidArgumentException - format:@"Zero is not a valid field number."]; - } -} - -@implementation GPBUnknownFieldSet { - @package - CFMutableDictionaryRef fields_; -} - -static void CopyWorker(const void *key, const void *value, void *context) { -#pragma unused(key) - GPBUnknownField *field = value; - GPBUnknownFieldSet *result = context; - - GPBUnknownField *copied = [field copy]; - [result addField:copied]; - [copied release]; -} - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -- (id)copyWithZone:(NSZone *)zone { - GPBUnknownFieldSet *result = [[GPBUnknownFieldSet allocWithZone:zone] init]; - if (fields_) { - CFDictionaryApplyFunction(fields_, CopyWorker, result); - } - return result; -} - -- (void)dealloc { - if (fields_) { - CFRelease(fields_); - } - [super dealloc]; -} - -- (BOOL)isEqual:(id)object { - BOOL equal = NO; - if ([object isKindOfClass:[GPBUnknownFieldSet class]]) { - GPBUnknownFieldSet *set = (GPBUnknownFieldSet *)object; - if ((fields_ == NULL) && (set->fields_ == NULL)) { - equal = YES; - } else if ((fields_ != NULL) && (set->fields_ != NULL)) { - equal = CFEqual(fields_, set->fields_); - } - } - return equal; -} - -- (NSUInteger)hash { - // Return the hash of the fields dictionary (or just some value). - if (fields_) { - return CFHash(fields_); - } - return (NSUInteger)[GPBUnknownFieldSet class]; -} - -#pragma mark - Public Methods - -- (BOOL)hasField:(int32_t)number { - ssize_t key = number; - return fields_ ? (CFDictionaryGetValue(fields_, (void *)key) != nil) : NO; -} - -- (GPBUnknownField *)getField:(int32_t)number { - ssize_t key = number; - GPBUnknownField *result = - fields_ ? CFDictionaryGetValue(fields_, (void *)key) : nil; - return result; -} - -- (NSUInteger)countOfFields { - return fields_ ? CFDictionaryGetCount(fields_) : 0; -} - -- (NSArray *)sortedFields { - if (!fields_) return [NSArray array]; - size_t count = CFDictionaryGetCount(fields_); - ssize_t keys[count]; - GPBUnknownField *values[count]; - CFDictionaryGetKeysAndValues(fields_, (const void **)keys, - (const void **)values); - struct GPBFieldPair { - ssize_t key; - GPBUnknownField *value; - } pairs[count]; - for (size_t i = 0; i < count; ++i) { - pairs[i].key = keys[i]; - pairs[i].value = values[i]; - }; - qsort_b(pairs, count, sizeof(struct GPBFieldPair), - ^(const void *first, const void *second) { - const struct GPBFieldPair *a = first; - const struct GPBFieldPair *b = second; - return (a->key > b->key) ? 1 : ((a->key == b->key) ? 0 : -1); - }); - for (size_t i = 0; i < count; ++i) { - values[i] = pairs[i].value; - }; - return [NSArray arrayWithObjects:values count:count]; -} - -#pragma mark - Internal Methods - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)output { - if (!fields_) return; - size_t count = CFDictionaryGetCount(fields_); - ssize_t keys[count]; - GPBUnknownField *values[count]; - CFDictionaryGetKeysAndValues(fields_, (const void **)keys, - (const void **)values); - if (count > 1) { - struct GPBFieldPair { - ssize_t key; - GPBUnknownField *value; - } pairs[count]; - - for (size_t i = 0; i < count; ++i) { - pairs[i].key = keys[i]; - pairs[i].value = values[i]; - }; - qsort_b(pairs, count, sizeof(struct GPBFieldPair), - ^(const void *first, const void *second) { - const struct GPBFieldPair *a = first; - const struct GPBFieldPair *b = second; - return (a->key > b->key) ? 1 : ((a->key == b->key) ? 0 : -1); - }); - for (size_t i = 0; i < count; ++i) { - GPBUnknownField *value = pairs[i].value; - [value writeToOutput:output]; - } - } else { - [values[0] writeToOutput:output]; - } -} - -- (NSString *)description { - NSMutableString *description = [NSMutableString - stringWithFormat:@"<%@ %p>: TextFormat: {\n", [self class], self]; - NSString *textFormat = GPBTextFormatForUnknownFieldSet(self, @" "); - [description appendString:textFormat]; - [description appendString:@"}"]; - return description; -} - -static void GPBUnknownFieldSetSerializedSize(const void *key, const void *value, - void *context) { -#pragma unused(key) - GPBUnknownField *field = value; - size_t *result = context; - *result += [field serializedSize]; -} - -- (size_t)serializedSize { - size_t result = 0; - if (fields_) { - CFDictionaryApplyFunction(fields_, GPBUnknownFieldSetSerializedSize, - &result); - } - return result; -} - -static void GPBUnknownFieldSetWriteAsMessageSetTo(const void *key, - const void *value, - void *context) { -#pragma unused(key) - GPBUnknownField *field = value; - GPBCodedOutputStream *output = context; - [field writeAsMessageSetExtensionToOutput:output]; -} - -- (void)writeAsMessageSetTo:(GPBCodedOutputStream *)output { - if (fields_) { - CFDictionaryApplyFunction(fields_, GPBUnknownFieldSetWriteAsMessageSetTo, - output); - } -} - -static void GPBUnknownFieldSetSerializedSizeAsMessageSet(const void *key, - const void *value, - void *context) { -#pragma unused(key) - GPBUnknownField *field = value; - size_t *result = context; - *result += [field serializedSizeAsMessageSetExtension]; -} - -- (size_t)serializedSizeAsMessageSet { - size_t result = 0; - if (fields_) { - CFDictionaryApplyFunction( - fields_, GPBUnknownFieldSetSerializedSizeAsMessageSet, &result); - } - return result; -} - -- (NSData *)data { - NSMutableData *data = [NSMutableData dataWithLength:self.serializedSize]; - GPBCodedOutputStream *output = - [[GPBCodedOutputStream alloc] initWithData:data]; - [self writeToCodedOutputStream:output]; - [output release]; - return data; -} - -+ (BOOL)isFieldTag:(int32_t)tag { - return GPBWireFormatGetTagWireType(tag) != GPBWireFormatEndGroup; -} - -- (void)addField:(GPBUnknownField *)field { - int32_t number = [field number]; - checkNumber(number); - if (!fields_) { - // Use a custom dictionary here because the keys are numbers and conversion - // back and forth from NSNumber isn't worth the cost. - fields_ = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, NULL, - &kCFTypeDictionaryValueCallBacks); - } - ssize_t key = number; - CFDictionarySetValue(fields_, (const void *)key, field); -} - -- (GPBUnknownField *)mutableFieldForNumber:(int32_t)number create:(BOOL)create { - ssize_t key = number; - GPBUnknownField *existing = - fields_ ? CFDictionaryGetValue(fields_, (const void *)key) : nil; - if (!existing && create) { - existing = [[GPBUnknownField alloc] initWithNumber:number]; - // This retains existing. - [self addField:existing]; - [existing release]; - } - return existing; -} - -static void GPBUnknownFieldSetMergeUnknownFields(const void *key, - const void *value, - void *context) { -#pragma unused(key) - GPBUnknownField *field = value; - GPBUnknownFieldSet *self = context; - - int32_t number = [field number]; - checkNumber(number); - GPBUnknownField *oldField = [self mutableFieldForNumber:number create:NO]; - if (oldField) { - [oldField mergeFromField:field]; - } else { - // Merge only comes from GPBMessage's mergeFrom:, so it means we are on - // mutable message and are an mutable instance, so make sure we need - // mutable fields. - GPBUnknownField *fieldCopy = [field copy]; - [self addField:fieldCopy]; - [fieldCopy release]; - } -} - -- (void)mergeUnknownFields:(GPBUnknownFieldSet *)other { - if (other && other->fields_) { - CFDictionaryApplyFunction(other->fields_, - GPBUnknownFieldSetMergeUnknownFields, self); - } -} - -- (void)mergeFromData:(NSData *)data { - GPBCodedInputStream *input = [[GPBCodedInputStream alloc] initWithData:data]; - [self mergeFromCodedInputStream:input]; - [input checkLastTagWas:0]; - [input release]; -} - -- (void)mergeVarintField:(int32_t)number value:(int32_t)value { - checkNumber(number); - [[self mutableFieldForNumber:number create:YES] addVarint:value]; -} - -- (BOOL)mergeFieldFrom:(int32_t)tag input:(GPBCodedInputStream *)input { - NSAssert(GPBWireFormatIsValidTag(tag), @"Got passed an invalid tag"); - int32_t number = GPBWireFormatGetTagFieldNumber(tag); - GPBCodedInputStreamState *state = &input->state_; - switch (GPBWireFormatGetTagWireType(tag)) { - case GPBWireFormatVarint: { - GPBUnknownField *field = [self mutableFieldForNumber:number create:YES]; - [field addVarint:GPBCodedInputStreamReadInt64(state)]; - return YES; - } - case GPBWireFormatFixed64: { - GPBUnknownField *field = [self mutableFieldForNumber:number create:YES]; - [field addFixed64:GPBCodedInputStreamReadFixed64(state)]; - return YES; - } - case GPBWireFormatLengthDelimited: { - NSData *data = GPBCodedInputStreamReadRetainedBytes(state); - GPBUnknownField *field = [self mutableFieldForNumber:number create:YES]; - [field addLengthDelimited:data]; - [data release]; - return YES; - } - case GPBWireFormatStartGroup: { - GPBUnknownFieldSet *unknownFieldSet = [[GPBUnknownFieldSet alloc] init]; - [input readUnknownGroup:number message:unknownFieldSet]; - GPBUnknownField *field = [self mutableFieldForNumber:number create:YES]; - [field addGroup:unknownFieldSet]; - [unknownFieldSet release]; - return YES; - } - case GPBWireFormatEndGroup: - return NO; - case GPBWireFormatFixed32: { - GPBUnknownField *field = [self mutableFieldForNumber:number create:YES]; - [field addFixed32:GPBCodedInputStreamReadFixed32(state)]; - return YES; - } - } -} - -- (void)mergeMessageSetMessage:(int32_t)number data:(NSData *)messageData { - [[self mutableFieldForNumber:number create:YES] - addLengthDelimited:messageData]; -} - -- (void)addUnknownMapEntry:(int32_t)fieldNum value:(NSData *)data { - GPBUnknownField *field = [self mutableFieldForNumber:fieldNum create:YES]; - [field addLengthDelimited:data]; -} - -- (void)mergeFromCodedInputStream:(GPBCodedInputStream *)input { - while (YES) { - int32_t tag = GPBCodedInputStreamReadTag(&input->state_); - if (tag == 0 || ![self mergeFieldFrom:tag input:input]) { - break; - } - } -} - -- (void)getTags:(int32_t *)tags { - if (!fields_) return; - size_t count = CFDictionaryGetCount(fields_); - ssize_t keys[count]; - CFDictionaryGetKeysAndValues(fields_, (const void **)keys, NULL); - for (size_t i = 0; i < count; ++i) { - tags[i] = (int32_t)keys[i]; - } -} - -#pragma clang diagnostic pop - -@end diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet_PackagePrivate.h b/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet_PackagePrivate.h deleted file mode 100755 index e27127a..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownFieldSet_PackagePrivate.h +++ /dev/null @@ -1,61 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBUnknownFieldSet.h" - -@class GPBCodedOutputStream; -@class GPBCodedInputStream; - -@interface GPBUnknownFieldSet () - -+ (BOOL)isFieldTag:(int32_t)tag; - -- (NSData *)data; - -- (size_t)serializedSize; -- (size_t)serializedSizeAsMessageSet; - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)output; -- (void)writeAsMessageSetTo:(GPBCodedOutputStream *)output; - -- (void)mergeUnknownFields:(GPBUnknownFieldSet *)other; - -- (void)mergeFromCodedInputStream:(GPBCodedInputStream *)input; -- (void)mergeFromData:(NSData *)data; - -- (void)mergeVarintField:(int32_t)number value:(int32_t)value; -- (BOOL)mergeFieldFrom:(int32_t)tag input:(GPBCodedInputStream *)input; -- (void)mergeMessageSetMessage:(int32_t)number data:(NSData *)messageData; - -- (void)addUnknownMapEntry:(int32_t)fieldNum value:(NSData *)data; - -@end diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownField_PackagePrivate.h b/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownField_PackagePrivate.h deleted file mode 100755 index 1fbce0f..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBUnknownField_PackagePrivate.h +++ /dev/null @@ -1,49 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBUnknownField.h" - -@class GPBCodedOutputStream; - -@interface GPBUnknownField () - -- (instancetype)initWithNumber:(int32_t)number; - -- (void)writeToOutput:(GPBCodedOutputStream *)output; -- (size_t)serializedSize; - -- (void)writeAsMessageSetExtensionToOutput:(GPBCodedOutputStream *)output; -- (size_t)serializedSizeAsMessageSetExtension; - -- (void)mergeFromField:(GPBUnknownField *)other; - -@end diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBUtilities.h b/Old My Mind/Pods/Protobuf/objectivec/GPBUtilities.h deleted file mode 100755 index 52e7d2e..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBUtilities.h +++ /dev/null @@ -1,534 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBArray.h" -#import "GPBMessage.h" -#import "GPBRuntimeTypes.h" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -/** - * Generates a string that should be a valid "TextFormat" for the C++ version - * of Protocol Buffers. - * - * @param message The message to generate from. - * @param lineIndent A string to use as the prefix for all lines generated. Can - * be nil if no extra indent is needed. - * - * @return An NSString with the TextFormat of the message. - **/ -NSString *GPBTextFormatForMessage(GPBMessage *message, - NSString * __nullable lineIndent); - -/** - * Generates a string that should be a valid "TextFormat" for the C++ version - * of Protocol Buffers. - * - * @param unknownSet The unknown field set to generate from. - * @param lineIndent A string to use as the prefix for all lines generated. Can - * be nil if no extra indent is needed. - * - * @return An NSString with the TextFormat of the unknown field set. - **/ -NSString *GPBTextFormatForUnknownFieldSet(GPBUnknownFieldSet * __nullable unknownSet, - NSString * __nullable lineIndent); - -/** - * Checks if the given field number is set on a message. - * - * @param self The message to check. - * @param fieldNumber The field number to check. - * - * @return YES if the field number is set on the given message. - **/ -BOOL GPBMessageHasFieldNumberSet(GPBMessage *self, uint32_t fieldNumber); - -/** - * Checks if the given field is set on a message. - * - * @param self The message to check. - * @param field The field to check. - * - * @return YES if the field is set on the given message. - **/ -BOOL GPBMessageHasFieldSet(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Clears the given field for the given message. - * - * @param self The message for which to clear the field. - * @param field The field to clear. - **/ -void GPBClearMessageField(GPBMessage *self, GPBFieldDescriptor *field); - -//%PDDM-EXPAND GPB_ACCESSORS() -// This block of code is generated, do not edit it directly. - - -// -// Get/Set a given field from/to a message. -// - -// Single Fields - -/** - * Gets the value of a bytes field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -NSData *GPBGetMessageBytesField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a bytes field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageBytesField(GPBMessage *self, GPBFieldDescriptor *field, NSData *value); - -/** - * Gets the value of a string field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -NSString *GPBGetMessageStringField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a string field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageStringField(GPBMessage *self, GPBFieldDescriptor *field, NSString *value); - -/** - * Gets the value of a message field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -GPBMessage *GPBGetMessageMessageField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a message field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageMessageField(GPBMessage *self, GPBFieldDescriptor *field, GPBMessage *value); - -/** - * Gets the value of a group field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -GPBMessage *GPBGetMessageGroupField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a group field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageGroupField(GPBMessage *self, GPBFieldDescriptor *field, GPBMessage *value); - -/** - * Gets the value of a bool field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -BOOL GPBGetMessageBoolField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a bool field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageBoolField(GPBMessage *self, GPBFieldDescriptor *field, BOOL value); - -/** - * Gets the value of an int32 field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -int32_t GPBGetMessageInt32Field(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of an int32 field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageInt32Field(GPBMessage *self, GPBFieldDescriptor *field, int32_t value); - -/** - * Gets the value of an uint32 field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -uint32_t GPBGetMessageUInt32Field(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of an uint32 field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageUInt32Field(GPBMessage *self, GPBFieldDescriptor *field, uint32_t value); - -/** - * Gets the value of an int64 field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -int64_t GPBGetMessageInt64Field(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of an int64 field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageInt64Field(GPBMessage *self, GPBFieldDescriptor *field, int64_t value); - -/** - * Gets the value of an uint64 field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -uint64_t GPBGetMessageUInt64Field(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of an uint64 field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageUInt64Field(GPBMessage *self, GPBFieldDescriptor *field, uint64_t value); - -/** - * Gets the value of a float field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -float GPBGetMessageFloatField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a float field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageFloatField(GPBMessage *self, GPBFieldDescriptor *field, float value); - -/** - * Gets the value of a double field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -double GPBGetMessageDoubleField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a double field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageDoubleField(GPBMessage *self, GPBFieldDescriptor *field, double value); - -/** - * Gets the given enum field of a message. For proto3, if the value isn't a - * member of the enum, @c kGPBUnrecognizedEnumeratorValue will be returned. - * GPBGetMessageRawEnumField will bypass the check and return whatever value - * was set. - * - * @param self The message from which to get the field. - * @param field The field to get. - * - * @return The enum value for the given field. - **/ -int32_t GPBGetMessageEnumField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Set the given enum field of a message. You can only set values that are - * members of the enum. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The enum value to set in the field. - **/ -void GPBSetMessageEnumField(GPBMessage *self, - GPBFieldDescriptor *field, - int32_t value); - -/** - * Get the given enum field of a message. No check is done to ensure the value - * was defined in the enum. - * - * @param self The message from which to get the field. - * @param field The field to get. - * - * @return The raw enum value for the given field. - **/ -int32_t GPBGetMessageRawEnumField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Set the given enum field of a message. You can set the value to anything, - * even a value that is not a member of the enum. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The raw enum value to set in the field. - **/ -void GPBSetMessageRawEnumField(GPBMessage *self, - GPBFieldDescriptor *field, - int32_t value); - -// Repeated Fields - -/** - * Gets the value of a repeated field. - * - * @param self The message from which to get the field. - * @param field The repeated field to get. - * - * @return A GPB*Array or an NSMutableArray based on the field's type. - **/ -id GPBGetMessageRepeatedField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a repeated field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param array A GPB*Array or NSMutableArray based on the field's type. - **/ -void GPBSetMessageRepeatedField(GPBMessage *self, - GPBFieldDescriptor *field, - id array); - -// Map Fields - -/** - * Gets the value of a map<> field. - * - * @param self The message from which to get the field. - * @param field The repeated field to get. - * - * @return A GPB*Dictionary or NSMutableDictionary based on the field's type. - **/ -id GPBGetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a map<> field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param dictionary A GPB*Dictionary or NSMutableDictionary based on the - * field's type. - **/ -void GPBSetMessageMapField(GPBMessage *self, - GPBFieldDescriptor *field, - id dictionary); - -//%PDDM-EXPAND-END GPB_ACCESSORS() - -/** - * Returns an empty NSData to assign to byte fields when you wish to assign them - * to empty. Prevents allocating a lot of little [NSData data] objects. - **/ -NSData *GPBEmptyNSData(void) __attribute__((pure)); - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - - -//%PDDM-DEFINE GPB_ACCESSORS() -//% -//%// -//%// Get/Set a given field from/to a message. -//%// -//% -//%// Single Fields -//% -//%GPB_ACCESSOR_SINGLE_FULL(Bytes, NSData, , *) -//%GPB_ACCESSOR_SINGLE_FULL(String, NSString, , *) -//%GPB_ACCESSOR_SINGLE_FULL(Message, GPBMessage, , *) -//%GPB_ACCESSOR_SINGLE_FULL(Group, GPBMessage, , *) -//%GPB_ACCESSOR_SINGLE(Bool, BOOL, ) -//%GPB_ACCESSOR_SINGLE(Int32, int32_t, n) -//%GPB_ACCESSOR_SINGLE(UInt32, uint32_t, n) -//%GPB_ACCESSOR_SINGLE(Int64, int64_t, n) -//%GPB_ACCESSOR_SINGLE(UInt64, uint64_t, n) -//%GPB_ACCESSOR_SINGLE(Float, float, ) -//%GPB_ACCESSOR_SINGLE(Double, double, ) -//%/** -//% * Gets the given enum field of a message. For proto3, if the value isn't a -//% * member of the enum, @c kGPBUnrecognizedEnumeratorValue will be returned. -//% * GPBGetMessageRawEnumField will bypass the check and return whatever value -//% * was set. -//% * -//% * @param self The message from which to get the field. -//% * @param field The field to get. -//% * -//% * @return The enum value for the given field. -//% **/ -//%int32_t GPBGetMessageEnumField(GPBMessage *self, GPBFieldDescriptor *field); -//% -//%/** -//% * Set the given enum field of a message. You can only set values that are -//% * members of the enum. -//% * -//% * @param self The message into which to set the field. -//% * @param field The field to set. -//% * @param value The enum value to set in the field. -//% **/ -//%void GPBSetMessageEnumField(GPBMessage *self, -//% GPBFieldDescriptor *field, -//% int32_t value); -//% -//%/** -//% * Get the given enum field of a message. No check is done to ensure the value -//% * was defined in the enum. -//% * -//% * @param self The message from which to get the field. -//% * @param field The field to get. -//% * -//% * @return The raw enum value for the given field. -//% **/ -//%int32_t GPBGetMessageRawEnumField(GPBMessage *self, GPBFieldDescriptor *field); -//% -//%/** -//% * Set the given enum field of a message. You can set the value to anything, -//% * even a value that is not a member of the enum. -//% * -//% * @param self The message into which to set the field. -//% * @param field The field to set. -//% * @param value The raw enum value to set in the field. -//% **/ -//%void GPBSetMessageRawEnumField(GPBMessage *self, -//% GPBFieldDescriptor *field, -//% int32_t value); -//% -//%// Repeated Fields -//% -//%/** -//% * Gets the value of a repeated field. -//% * -//% * @param self The message from which to get the field. -//% * @param field The repeated field to get. -//% * -//% * @return A GPB*Array or an NSMutableArray based on the field's type. -//% **/ -//%id GPBGetMessageRepeatedField(GPBMessage *self, GPBFieldDescriptor *field); -//% -//%/** -//% * Sets the value of a repeated field. -//% * -//% * @param self The message into which to set the field. -//% * @param field The field to set. -//% * @param array A GPB*Array or NSMutableArray based on the field's type. -//% **/ -//%void GPBSetMessageRepeatedField(GPBMessage *self, -//% GPBFieldDescriptor *field, -//% id array); -//% -//%// Map Fields -//% -//%/** -//% * Gets the value of a map<> field. -//% * -//% * @param self The message from which to get the field. -//% * @param field The repeated field to get. -//% * -//% * @return A GPB*Dictionary or NSMutableDictionary based on the field's type. -//% **/ -//%id GPBGetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field); -//% -//%/** -//% * Sets the value of a map<> field. -//% * -//% * @param self The message into which to set the field. -//% * @param field The field to set. -//% * @param dictionary A GPB*Dictionary or NSMutableDictionary based on the -//% * field's type. -//% **/ -//%void GPBSetMessageMapField(GPBMessage *self, -//% GPBFieldDescriptor *field, -//% id dictionary); -//% - -//%PDDM-DEFINE GPB_ACCESSOR_SINGLE(NAME, TYPE, AN) -//%GPB_ACCESSOR_SINGLE_FULL(NAME, TYPE, AN, ) -//%PDDM-DEFINE GPB_ACCESSOR_SINGLE_FULL(NAME, TYPE, AN, TisP) -//%/** -//% * Gets the value of a##AN NAME$L field. -//% * -//% * @param self The message from which to get the field. -//% * @param field The field to get. -//% **/ -//%TYPE TisP##GPBGetMessage##NAME##Field(GPBMessage *self, GPBFieldDescriptor *field); -//% -//%/** -//% * Sets the value of a##AN NAME$L field. -//% * -//% * @param self The message into which to set the field. -//% * @param field The field to set. -//% * @param value The to set in the field. -//% **/ -//%void GPBSetMessage##NAME##Field(GPBMessage *self, GPBFieldDescriptor *field, TYPE TisP##value); -//% diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBUtilities.m b/Old My Mind/Pods/Protobuf/objectivec/GPBUtilities.m deleted file mode 100755 index 68aadb7..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBUtilities.m +++ /dev/null @@ -1,1785 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBUtilities_PackagePrivate.h" - -#import - -#import "GPBArray_PackagePrivate.h" -#import "GPBDescriptor_PackagePrivate.h" -#import "GPBDictionary_PackagePrivate.h" -#import "GPBMessage_PackagePrivate.h" -#import "GPBUnknownField.h" -#import "GPBUnknownFieldSet.h" - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -static void AppendTextFormatForMessage(GPBMessage *message, - NSMutableString *toStr, - NSString *lineIndent); - -NSData *GPBEmptyNSData(void) { - static dispatch_once_t onceToken; - static NSData *defaultNSData = nil; - dispatch_once(&onceToken, ^{ - defaultNSData = [[NSData alloc] init]; - }); - return defaultNSData; -} - -// -- About Version Checks -- -// There's actually 3 places these checks all come into play: -// 1. When the generated source is compile into .o files, the header check -// happens. This is checking the protoc used matches the library being used -// when making the .o. -// 2. Every place a generated proto header is included in a developer's code, -// the header check comes into play again. But this time it is checking that -// the current library headers being used still support/match the ones for -// the generated code. -// 3. At runtime the final check here (GPBCheckRuntimeVersionsInternal), is -// called from the generated code passing in values captured when the -// generated code's .o was made. This checks that at runtime the generated -// code and runtime library match. - -void GPBCheckRuntimeVersionSupport(int32_t objcRuntimeVersion) { - // NOTE: This is passing the value captured in the compiled code to check - // against the values captured when the runtime support was compiled. This - // ensures the library code isn't in a different framework/library that - // was generated with a non matching version. - if (GOOGLE_PROTOBUF_OBJC_VERSION < objcRuntimeVersion) { - // Library is too old for headers. - [NSException raise:NSInternalInconsistencyException - format:@"Linked to ProtocolBuffer runtime version %d," - @" but code compiled needing atleast %d!", - GOOGLE_PROTOBUF_OBJC_VERSION, objcRuntimeVersion]; - } - if (objcRuntimeVersion < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION) { - // Headers are too old for library. - [NSException raise:NSInternalInconsistencyException - format:@"Proto generation source compiled against runtime" - @" version %d, but this version of the runtime only" - @" supports back to %d!", - objcRuntimeVersion, - GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION]; - } -} - -// This api is no longer used for version checks. 30001 is the last version -// using this old versioning model. When that support is removed, this function -// can be removed (along with the declaration in GPBUtilities_PackagePrivate.h). -void GPBCheckRuntimeVersionInternal(int32_t version) { - GPBInternalCompileAssert(GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION == 30001, - time_to_remove_this_old_version_shim); - if (version != GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION) { - [NSException raise:NSInternalInconsistencyException - format:@"Linked to ProtocolBuffer runtime version %d," - @" but code compiled with version %d!", - GOOGLE_PROTOBUF_OBJC_GEN_VERSION, version]; - } -} - -BOOL GPBMessageHasFieldNumberSet(GPBMessage *self, uint32_t fieldNumber) { - GPBDescriptor *descriptor = [self descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:fieldNumber]; - return GPBMessageHasFieldSet(self, field); -} - -BOOL GPBMessageHasFieldSet(GPBMessage *self, GPBFieldDescriptor *field) { - if (self == nil || field == nil) return NO; - - // Repeated/Map don't use the bit, they check the count. - if (GPBFieldIsMapOrArray(field)) { - // Array/map type doesn't matter, since GPB*Array/NSArray and - // GPB*Dictionary/NSDictionary all support -count; - NSArray *arrayOrMap = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - return (arrayOrMap.count > 0); - } else { - return GPBGetHasIvarField(self, field); - } -} - -void GPBClearMessageField(GPBMessage *self, GPBFieldDescriptor *field) { - // If not set, nothing to do. - if (!GPBGetHasIvarField(self, field)) { - return; - } - - if (GPBFieldStoresObject(field)) { - // Object types are handled slightly differently, they need to be released. - uint8_t *storage = (uint8_t *)self->messageStorage_; - id *typePtr = (id *)&storage[field->description_->offset]; - [*typePtr release]; - *typePtr = nil; - } else { - // POD types just need to clear the has bit as the Get* method will - // fetch the default when needed. - } - GPBSetHasIvarField(self, field, NO); -} - -BOOL GPBGetHasIvar(GPBMessage *self, int32_t idx, uint32_t fieldNumber) { - NSCAssert(self->messageStorage_ != NULL, - @"%@: All messages should have storage (from init)", - [self class]); - if (idx < 0) { - NSCAssert(fieldNumber != 0, @"Invalid field number."); - BOOL hasIvar = (self->messageStorage_->_has_storage_[-idx] == fieldNumber); - return hasIvar; - } else { - NSCAssert(idx != GPBNoHasBit, @"Invalid has bit."); - uint32_t byteIndex = idx / 32; - uint32_t bitMask = (1 << (idx % 32)); - BOOL hasIvar = - (self->messageStorage_->_has_storage_[byteIndex] & bitMask) ? YES : NO; - return hasIvar; - } -} - -uint32_t GPBGetHasOneof(GPBMessage *self, int32_t idx) { - NSCAssert(idx < 0, @"%@: invalid index (%d) for oneof.", - [self class], idx); - uint32_t result = self->messageStorage_->_has_storage_[-idx]; - return result; -} - -void GPBSetHasIvar(GPBMessage *self, int32_t idx, uint32_t fieldNumber, - BOOL value) { - if (idx < 0) { - NSCAssert(fieldNumber != 0, @"Invalid field number."); - uint32_t *has_storage = self->messageStorage_->_has_storage_; - has_storage[-idx] = (value ? fieldNumber : 0); - } else { - NSCAssert(idx != GPBNoHasBit, @"Invalid has bit."); - uint32_t *has_storage = self->messageStorage_->_has_storage_; - uint32_t byte = idx / 32; - uint32_t bitMask = (1 << (idx % 32)); - if (value) { - has_storage[byte] |= bitMask; - } else { - has_storage[byte] &= ~bitMask; - } - } -} - -void GPBMaybeClearOneof(GPBMessage *self, GPBOneofDescriptor *oneof, - int32_t oneofHasIndex, uint32_t fieldNumberNotToClear) { - uint32_t fieldNumberSet = GPBGetHasOneof(self, oneofHasIndex); - if ((fieldNumberSet == fieldNumberNotToClear) || (fieldNumberSet == 0)) { - // Do nothing/nothing set in the oneof. - return; - } - - // Like GPBClearMessageField(), free the memory if an objecttype is set, - // pod types don't need to do anything. - GPBFieldDescriptor *fieldSet = [oneof fieldWithNumber:fieldNumberSet]; - NSCAssert(fieldSet, - @"%@: oneof set to something (%u) not in the oneof?", - [self class], fieldNumberSet); - if (fieldSet && GPBFieldStoresObject(fieldSet)) { - uint8_t *storage = (uint8_t *)self->messageStorage_; - id *typePtr = (id *)&storage[fieldSet->description_->offset]; - [*typePtr release]; - *typePtr = nil; - } - - // Set to nothing stored in the oneof. - // (field number doesn't matter since setting to nothing). - GPBSetHasIvar(self, oneofHasIndex, 1, NO); -} - -#pragma mark - IVar accessors - -//%PDDM-DEFINE IVAR_POD_ACCESSORS_DEFN(NAME, TYPE) -//%TYPE GPBGetMessage##NAME##Field(GPBMessage *self, -//% TYPE$S NAME$S GPBFieldDescriptor *field) { -//% if (GPBGetHasIvarField(self, field)) { -//% uint8_t *storage = (uint8_t *)self->messageStorage_; -//% TYPE *typePtr = (TYPE *)&storage[field->description_->offset]; -//% return *typePtr; -//% } else { -//% return field.defaultValue.value##NAME; -//% } -//%} -//% -//%// Only exists for public api, no core code should use this. -//%void GPBSetMessage##NAME##Field(GPBMessage *self, -//% NAME$S GPBFieldDescriptor *field, -//% NAME$S TYPE value) { -//% if (self == nil || field == nil) return; -//% GPBFileSyntax syntax = [self descriptor].file.syntax; -//% GPBSet##NAME##IvarWithFieldInternal(self, field, value, syntax); -//%} -//% -//%void GPBSet##NAME##IvarWithFieldInternal(GPBMessage *self, -//% NAME$S GPBFieldDescriptor *field, -//% NAME$S TYPE value, -//% NAME$S GPBFileSyntax syntax) { -//% GPBOneofDescriptor *oneof = field->containingOneof_; -//% if (oneof) { -//% GPBMessageFieldDescription *fieldDesc = field->description_; -//% GPBMaybeClearOneof(self, oneof, fieldDesc->hasIndex, fieldDesc->number); -//% } -//% NSCAssert(self->messageStorage_ != NULL, -//% @"%@: All messages should have storage (from init)", -//% [self class]); -//%#if defined(__clang_analyzer__) -//% if (self->messageStorage_ == NULL) return; -//%#endif -//% uint8_t *storage = (uint8_t *)self->messageStorage_; -//% TYPE *typePtr = (TYPE *)&storage[field->description_->offset]; -//% *typePtr = value; -//% // proto2: any value counts as having been set; proto3, it -//% // has to be a non zero value or be in a oneof. -//% BOOL hasValue = ((syntax == GPBFileSyntaxProto2) -//% || (value != (TYPE)0) -//% || (field->containingOneof_ != NULL)); -//% GPBSetHasIvarField(self, field, hasValue); -//% GPBBecomeVisibleToAutocreator(self); -//%} -//% -//%PDDM-DEFINE IVAR_ALIAS_DEFN_OBJECT(NAME, TYPE) -//%// Only exists for public api, no core code should use this. -//%TYPE *GPBGetMessage##NAME##Field(GPBMessage *self, -//% TYPE$S NAME$S GPBFieldDescriptor *field) { -//% return (TYPE *)GPBGetObjectIvarWithField(self, field); -//%} -//% -//%// Only exists for public api, no core code should use this. -//%void GPBSetMessage##NAME##Field(GPBMessage *self, -//% NAME$S GPBFieldDescriptor *field, -//% NAME$S TYPE *value) { -//% GPBSetObjectIvarWithField(self, field, (id)value); -//%} -//% - -// Object types are handled slightly differently, they need to be released -// and retained. - -void GPBSetAutocreatedRetainedObjectIvarWithField( - GPBMessage *self, GPBFieldDescriptor *field, - id __attribute__((ns_consumed)) value) { - uint8_t *storage = (uint8_t *)self->messageStorage_; - id *typePtr = (id *)&storage[field->description_->offset]; - NSCAssert(*typePtr == NULL, @"Can't set autocreated object more than once."); - *typePtr = value; -} - -void GPBClearAutocreatedMessageIvarWithField(GPBMessage *self, - GPBFieldDescriptor *field) { - if (GPBGetHasIvarField(self, field)) { - return; - } - uint8_t *storage = (uint8_t *)self->messageStorage_; - id *typePtr = (id *)&storage[field->description_->offset]; - GPBMessage *oldValue = *typePtr; - *typePtr = NULL; - GPBClearMessageAutocreator(oldValue); - [oldValue release]; -} - -// This exists only for briging some aliased types, nothing else should use it. -static void GPBSetObjectIvarWithField(GPBMessage *self, - GPBFieldDescriptor *field, id value) { - if (self == nil || field == nil) return; - GPBFileSyntax syntax = [self descriptor].file.syntax; - GPBSetRetainedObjectIvarWithFieldInternal(self, field, [value retain], - syntax); -} - -void GPBSetObjectIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, id value, - GPBFileSyntax syntax) { - GPBSetRetainedObjectIvarWithFieldInternal(self, field, [value retain], - syntax); -} - -void GPBSetRetainedObjectIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - id value, GPBFileSyntax syntax) { - NSCAssert(self->messageStorage_ != NULL, - @"%@: All messages should have storage (from init)", - [self class]); -#if defined(__clang_analyzer__) - if (self->messageStorage_ == NULL) return; -#endif - GPBDataType fieldType = GPBGetFieldDataType(field); - BOOL isMapOrArray = GPBFieldIsMapOrArray(field); - BOOL fieldIsMessage = GPBDataTypeIsMessage(fieldType); -#ifdef DEBUG - if (value == nil && !isMapOrArray && !fieldIsMessage && - field.hasDefaultValue) { - // Setting a message to nil is an obvious way to "clear" the value - // as there is no way to set a non-empty default value for messages. - // - // For Strings and Bytes that have default values set it is not clear what - // should be done when their value is set to nil. Is the intention just to - // clear the set value and reset to default, or is the intention to set the - // value to the empty string/data? Arguments can be made for both cases. - // 'nil' has been abused as a replacement for an empty string/data in ObjC. - // We decided to be consistent with all "object" types and clear the has - // field, and fall back on the default value. The warning below will only - // appear in debug, but the could should be changed so the intention is - // clear. - NSString *hasSel = NSStringFromSelector(field->hasOrCountSel_); - NSString *propName = field.name; - NSString *className = self.descriptor.name; - NSLog(@"warning: '%@.%@ = nil;' is not clearly defined for fields with " - @"default values. Please use '%@.%@ = %@' if you want to set it to " - @"empty, or call '%@.%@ = NO' to reset it to it's default value of " - @"'%@'. Defaulting to resetting default value.", - className, propName, className, propName, - (fieldType == GPBDataTypeString) ? @"@\"\"" : @"GPBEmptyNSData()", - className, hasSel, field.defaultValue.valueString); - // Note: valueString, depending on the type, it could easily be - // valueData/valueMessage. - } -#endif // DEBUG - if (!isMapOrArray) { - // Non repeated/map can be in an oneof, clear any existing value from the - // oneof. - GPBOneofDescriptor *oneof = field->containingOneof_; - if (oneof) { - GPBMessageFieldDescription *fieldDesc = field->description_; - GPBMaybeClearOneof(self, oneof, fieldDesc->hasIndex, fieldDesc->number); - } - // Clear "has" if they are being set to nil. - BOOL setHasValue = (value != nil); - // Under proto3, Bytes & String fields get cleared by resetting them to - // their default (empty) values, so if they are set to something of length - // zero, they are being cleared. - if ((syntax == GPBFileSyntaxProto3) && !fieldIsMessage && - ([value length] == 0)) { - // Except, if the field was in a oneof, then it still gets recorded as - // having been set so the state of the oneof can be serialized back out. - if (!oneof) { - setHasValue = NO; - } - if (setHasValue) { - NSCAssert(value != nil, @"Should never be setting has for nil"); - } else { - // The value passed in was retained, it must be released since we - // aren't saving anything in the field. - [value release]; - value = nil; - } - } - GPBSetHasIvarField(self, field, setHasValue); - } - uint8_t *storage = (uint8_t *)self->messageStorage_; - id *typePtr = (id *)&storage[field->description_->offset]; - - id oldValue = *typePtr; - - *typePtr = value; - - if (oldValue) { - if (isMapOrArray) { - if (field.fieldType == GPBFieldTypeRepeated) { - // If the old array was autocreated by us, then clear it. - if (GPBDataTypeIsObject(fieldType)) { - if ([oldValue isKindOfClass:[GPBAutocreatedArray class]]) { - GPBAutocreatedArray *autoArray = oldValue; - if (autoArray->_autocreator == self) { - autoArray->_autocreator = nil; - } - } - } else { - // Type doesn't matter, it is a GPB*Array. - GPBInt32Array *gpbArray = oldValue; - if (gpbArray->_autocreator == self) { - gpbArray->_autocreator = nil; - } - } - } else { // GPBFieldTypeMap - // If the old map was autocreated by us, then clear it. - if ((field.mapKeyDataType == GPBDataTypeString) && - GPBDataTypeIsObject(fieldType)) { - if ([oldValue isKindOfClass:[GPBAutocreatedDictionary class]]) { - GPBAutocreatedDictionary *autoDict = oldValue; - if (autoDict->_autocreator == self) { - autoDict->_autocreator = nil; - } - } - } else { - // Type doesn't matter, it is a GPB*Dictionary. - GPBInt32Int32Dictionary *gpbDict = oldValue; - if (gpbDict->_autocreator == self) { - gpbDict->_autocreator = nil; - } - } - } - } else if (fieldIsMessage) { - // If the old message value was autocreated by us, then clear it. - GPBMessage *oldMessageValue = oldValue; - if (GPBWasMessageAutocreatedBy(oldMessageValue, self)) { - GPBClearMessageAutocreator(oldMessageValue); - } - } - [oldValue release]; - } - - GPBBecomeVisibleToAutocreator(self); -} - -id GPBGetObjectIvarWithFieldNoAutocreate(GPBMessage *self, - GPBFieldDescriptor *field) { - if (self->messageStorage_ == nil) { - return nil; - } - uint8_t *storage = (uint8_t *)self->messageStorage_; - id *typePtr = (id *)&storage[field->description_->offset]; - return *typePtr; -} - -id GPBGetObjectIvarWithField(GPBMessage *self, GPBFieldDescriptor *field) { - NSCAssert(!GPBFieldIsMapOrArray(field), @"Shouldn't get here"); - if (GPBGetHasIvarField(self, field)) { - uint8_t *storage = (uint8_t *)self->messageStorage_; - id *typePtr = (id *)&storage[field->description_->offset]; - return *typePtr; - } - // Not set... - - // Non messages (string/data), get their default. - if (!GPBFieldDataTypeIsMessage(field)) { - return field.defaultValue.valueMessage; - } - - GPBPrepareReadOnlySemaphore(self); - dispatch_semaphore_wait(self->readOnlySemaphore_, DISPATCH_TIME_FOREVER); - GPBMessage *result = GPBGetObjectIvarWithFieldNoAutocreate(self, field); - if (!result) { - // For non repeated messages, create the object, set it and return it. - // This object will not initially be visible via GPBGetHasIvar, so - // we save its creator so it can become visible if it's mutated later. - result = GPBCreateMessageWithAutocreator(field.msgClass, self, field); - GPBSetAutocreatedRetainedObjectIvarWithField(self, field, result); - } - dispatch_semaphore_signal(self->readOnlySemaphore_); - return result; -} - -// Only exists for public api, no core code should use this. -int32_t GPBGetMessageEnumField(GPBMessage *self, GPBFieldDescriptor *field) { - GPBFileSyntax syntax = [self descriptor].file.syntax; - return GPBGetEnumIvarWithFieldInternal(self, field, syntax); -} - -int32_t GPBGetEnumIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - GPBFileSyntax syntax) { - int32_t result = GPBGetMessageInt32Field(self, field); - // If this is presevering unknown enums, make sure the value is valid before - // returning it. - if (GPBHasPreservingUnknownEnumSemantics(syntax) && - ![field isValidEnumValue:result]) { - result = kGPBUnrecognizedEnumeratorValue; - } - return result; -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageEnumField(GPBMessage *self, GPBFieldDescriptor *field, - int32_t value) { - GPBFileSyntax syntax = [self descriptor].file.syntax; - GPBSetInt32IvarWithFieldInternal(self, field, value, syntax); -} - -void GPBSetEnumIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, int32_t value, - GPBFileSyntax syntax) { - // Don't allow in unknown values. Proto3 can use the Raw method. - if (![field isValidEnumValue:value]) { - [NSException raise:NSInvalidArgumentException - format:@"%@.%@: Attempt to set an unknown enum value (%d)", - [self class], field.name, value]; - } - GPBSetInt32IvarWithFieldInternal(self, field, value, syntax); -} - -// Only exists for public api, no core code should use this. -int32_t GPBGetMessageRawEnumField(GPBMessage *self, - GPBFieldDescriptor *field) { - int32_t result = GPBGetMessageInt32Field(self, field); - return result; -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageRawEnumField(GPBMessage *self, GPBFieldDescriptor *field, - int32_t value) { - GPBFileSyntax syntax = [self descriptor].file.syntax; - GPBSetInt32IvarWithFieldInternal(self, field, value, syntax); -} - -BOOL GPBGetMessageBoolField(GPBMessage *self, - GPBFieldDescriptor *field) { - if (GPBGetHasIvarField(self, field)) { - // Bools are stored in the has bits to avoid needing explicit space in the - // storage structure. - // (the field number passed to the HasIvar helper doesn't really matter - // since the offset is never negative) - GPBMessageFieldDescription *fieldDesc = field->description_; - return GPBGetHasIvar(self, (int32_t)(fieldDesc->offset), fieldDesc->number); - } else { - return field.defaultValue.valueBool; - } -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageBoolField(GPBMessage *self, - GPBFieldDescriptor *field, - BOOL value) { - if (self == nil || field == nil) return; - GPBFileSyntax syntax = [self descriptor].file.syntax; - GPBSetBoolIvarWithFieldInternal(self, field, value, syntax); -} - -void GPBSetBoolIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - BOOL value, - GPBFileSyntax syntax) { - GPBMessageFieldDescription *fieldDesc = field->description_; - GPBOneofDescriptor *oneof = field->containingOneof_; - if (oneof) { - GPBMaybeClearOneof(self, oneof, fieldDesc->hasIndex, fieldDesc->number); - } - - // Bools are stored in the has bits to avoid needing explicit space in the - // storage structure. - // (the field number passed to the HasIvar helper doesn't really matter since - // the offset is never negative) - GPBSetHasIvar(self, (int32_t)(fieldDesc->offset), fieldDesc->number, value); - - // proto2: any value counts as having been set; proto3, it - // has to be a non zero value or be in a oneof. - BOOL hasValue = ((syntax == GPBFileSyntaxProto2) - || (value != (BOOL)0) - || (field->containingOneof_ != NULL)); - GPBSetHasIvarField(self, field, hasValue); - GPBBecomeVisibleToAutocreator(self); -} - -//%PDDM-EXPAND IVAR_POD_ACCESSORS_DEFN(Int32, int32_t) -// This block of code is generated, do not edit it directly. - -int32_t GPBGetMessageInt32Field(GPBMessage *self, - GPBFieldDescriptor *field) { - if (GPBGetHasIvarField(self, field)) { - uint8_t *storage = (uint8_t *)self->messageStorage_; - int32_t *typePtr = (int32_t *)&storage[field->description_->offset]; - return *typePtr; - } else { - return field.defaultValue.valueInt32; - } -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageInt32Field(GPBMessage *self, - GPBFieldDescriptor *field, - int32_t value) { - if (self == nil || field == nil) return; - GPBFileSyntax syntax = [self descriptor].file.syntax; - GPBSetInt32IvarWithFieldInternal(self, field, value, syntax); -} - -void GPBSetInt32IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - int32_t value, - GPBFileSyntax syntax) { - GPBOneofDescriptor *oneof = field->containingOneof_; - if (oneof) { - GPBMessageFieldDescription *fieldDesc = field->description_; - GPBMaybeClearOneof(self, oneof, fieldDesc->hasIndex, fieldDesc->number); - } - NSCAssert(self->messageStorage_ != NULL, - @"%@: All messages should have storage (from init)", - [self class]); -#if defined(__clang_analyzer__) - if (self->messageStorage_ == NULL) return; -#endif - uint8_t *storage = (uint8_t *)self->messageStorage_; - int32_t *typePtr = (int32_t *)&storage[field->description_->offset]; - *typePtr = value; - // proto2: any value counts as having been set; proto3, it - // has to be a non zero value or be in a oneof. - BOOL hasValue = ((syntax == GPBFileSyntaxProto2) - || (value != (int32_t)0) - || (field->containingOneof_ != NULL)); - GPBSetHasIvarField(self, field, hasValue); - GPBBecomeVisibleToAutocreator(self); -} - -//%PDDM-EXPAND IVAR_POD_ACCESSORS_DEFN(UInt32, uint32_t) -// This block of code is generated, do not edit it directly. - -uint32_t GPBGetMessageUInt32Field(GPBMessage *self, - GPBFieldDescriptor *field) { - if (GPBGetHasIvarField(self, field)) { - uint8_t *storage = (uint8_t *)self->messageStorage_; - uint32_t *typePtr = (uint32_t *)&storage[field->description_->offset]; - return *typePtr; - } else { - return field.defaultValue.valueUInt32; - } -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageUInt32Field(GPBMessage *self, - GPBFieldDescriptor *field, - uint32_t value) { - if (self == nil || field == nil) return; - GPBFileSyntax syntax = [self descriptor].file.syntax; - GPBSetUInt32IvarWithFieldInternal(self, field, value, syntax); -} - -void GPBSetUInt32IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - uint32_t value, - GPBFileSyntax syntax) { - GPBOneofDescriptor *oneof = field->containingOneof_; - if (oneof) { - GPBMessageFieldDescription *fieldDesc = field->description_; - GPBMaybeClearOneof(self, oneof, fieldDesc->hasIndex, fieldDesc->number); - } - NSCAssert(self->messageStorage_ != NULL, - @"%@: All messages should have storage (from init)", - [self class]); -#if defined(__clang_analyzer__) - if (self->messageStorage_ == NULL) return; -#endif - uint8_t *storage = (uint8_t *)self->messageStorage_; - uint32_t *typePtr = (uint32_t *)&storage[field->description_->offset]; - *typePtr = value; - // proto2: any value counts as having been set; proto3, it - // has to be a non zero value or be in a oneof. - BOOL hasValue = ((syntax == GPBFileSyntaxProto2) - || (value != (uint32_t)0) - || (field->containingOneof_ != NULL)); - GPBSetHasIvarField(self, field, hasValue); - GPBBecomeVisibleToAutocreator(self); -} - -//%PDDM-EXPAND IVAR_POD_ACCESSORS_DEFN(Int64, int64_t) -// This block of code is generated, do not edit it directly. - -int64_t GPBGetMessageInt64Field(GPBMessage *self, - GPBFieldDescriptor *field) { - if (GPBGetHasIvarField(self, field)) { - uint8_t *storage = (uint8_t *)self->messageStorage_; - int64_t *typePtr = (int64_t *)&storage[field->description_->offset]; - return *typePtr; - } else { - return field.defaultValue.valueInt64; - } -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageInt64Field(GPBMessage *self, - GPBFieldDescriptor *field, - int64_t value) { - if (self == nil || field == nil) return; - GPBFileSyntax syntax = [self descriptor].file.syntax; - GPBSetInt64IvarWithFieldInternal(self, field, value, syntax); -} - -void GPBSetInt64IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - int64_t value, - GPBFileSyntax syntax) { - GPBOneofDescriptor *oneof = field->containingOneof_; - if (oneof) { - GPBMessageFieldDescription *fieldDesc = field->description_; - GPBMaybeClearOneof(self, oneof, fieldDesc->hasIndex, fieldDesc->number); - } - NSCAssert(self->messageStorage_ != NULL, - @"%@: All messages should have storage (from init)", - [self class]); -#if defined(__clang_analyzer__) - if (self->messageStorage_ == NULL) return; -#endif - uint8_t *storage = (uint8_t *)self->messageStorage_; - int64_t *typePtr = (int64_t *)&storage[field->description_->offset]; - *typePtr = value; - // proto2: any value counts as having been set; proto3, it - // has to be a non zero value or be in a oneof. - BOOL hasValue = ((syntax == GPBFileSyntaxProto2) - || (value != (int64_t)0) - || (field->containingOneof_ != NULL)); - GPBSetHasIvarField(self, field, hasValue); - GPBBecomeVisibleToAutocreator(self); -} - -//%PDDM-EXPAND IVAR_POD_ACCESSORS_DEFN(UInt64, uint64_t) -// This block of code is generated, do not edit it directly. - -uint64_t GPBGetMessageUInt64Field(GPBMessage *self, - GPBFieldDescriptor *field) { - if (GPBGetHasIvarField(self, field)) { - uint8_t *storage = (uint8_t *)self->messageStorage_; - uint64_t *typePtr = (uint64_t *)&storage[field->description_->offset]; - return *typePtr; - } else { - return field.defaultValue.valueUInt64; - } -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageUInt64Field(GPBMessage *self, - GPBFieldDescriptor *field, - uint64_t value) { - if (self == nil || field == nil) return; - GPBFileSyntax syntax = [self descriptor].file.syntax; - GPBSetUInt64IvarWithFieldInternal(self, field, value, syntax); -} - -void GPBSetUInt64IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - uint64_t value, - GPBFileSyntax syntax) { - GPBOneofDescriptor *oneof = field->containingOneof_; - if (oneof) { - GPBMessageFieldDescription *fieldDesc = field->description_; - GPBMaybeClearOneof(self, oneof, fieldDesc->hasIndex, fieldDesc->number); - } - NSCAssert(self->messageStorage_ != NULL, - @"%@: All messages should have storage (from init)", - [self class]); -#if defined(__clang_analyzer__) - if (self->messageStorage_ == NULL) return; -#endif - uint8_t *storage = (uint8_t *)self->messageStorage_; - uint64_t *typePtr = (uint64_t *)&storage[field->description_->offset]; - *typePtr = value; - // proto2: any value counts as having been set; proto3, it - // has to be a non zero value or be in a oneof. - BOOL hasValue = ((syntax == GPBFileSyntaxProto2) - || (value != (uint64_t)0) - || (field->containingOneof_ != NULL)); - GPBSetHasIvarField(self, field, hasValue); - GPBBecomeVisibleToAutocreator(self); -} - -//%PDDM-EXPAND IVAR_POD_ACCESSORS_DEFN(Float, float) -// This block of code is generated, do not edit it directly. - -float GPBGetMessageFloatField(GPBMessage *self, - GPBFieldDescriptor *field) { - if (GPBGetHasIvarField(self, field)) { - uint8_t *storage = (uint8_t *)self->messageStorage_; - float *typePtr = (float *)&storage[field->description_->offset]; - return *typePtr; - } else { - return field.defaultValue.valueFloat; - } -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageFloatField(GPBMessage *self, - GPBFieldDescriptor *field, - float value) { - if (self == nil || field == nil) return; - GPBFileSyntax syntax = [self descriptor].file.syntax; - GPBSetFloatIvarWithFieldInternal(self, field, value, syntax); -} - -void GPBSetFloatIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - float value, - GPBFileSyntax syntax) { - GPBOneofDescriptor *oneof = field->containingOneof_; - if (oneof) { - GPBMessageFieldDescription *fieldDesc = field->description_; - GPBMaybeClearOneof(self, oneof, fieldDesc->hasIndex, fieldDesc->number); - } - NSCAssert(self->messageStorage_ != NULL, - @"%@: All messages should have storage (from init)", - [self class]); -#if defined(__clang_analyzer__) - if (self->messageStorage_ == NULL) return; -#endif - uint8_t *storage = (uint8_t *)self->messageStorage_; - float *typePtr = (float *)&storage[field->description_->offset]; - *typePtr = value; - // proto2: any value counts as having been set; proto3, it - // has to be a non zero value or be in a oneof. - BOOL hasValue = ((syntax == GPBFileSyntaxProto2) - || (value != (float)0) - || (field->containingOneof_ != NULL)); - GPBSetHasIvarField(self, field, hasValue); - GPBBecomeVisibleToAutocreator(self); -} - -//%PDDM-EXPAND IVAR_POD_ACCESSORS_DEFN(Double, double) -// This block of code is generated, do not edit it directly. - -double GPBGetMessageDoubleField(GPBMessage *self, - GPBFieldDescriptor *field) { - if (GPBGetHasIvarField(self, field)) { - uint8_t *storage = (uint8_t *)self->messageStorage_; - double *typePtr = (double *)&storage[field->description_->offset]; - return *typePtr; - } else { - return field.defaultValue.valueDouble; - } -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageDoubleField(GPBMessage *self, - GPBFieldDescriptor *field, - double value) { - if (self == nil || field == nil) return; - GPBFileSyntax syntax = [self descriptor].file.syntax; - GPBSetDoubleIvarWithFieldInternal(self, field, value, syntax); -} - -void GPBSetDoubleIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - double value, - GPBFileSyntax syntax) { - GPBOneofDescriptor *oneof = field->containingOneof_; - if (oneof) { - GPBMessageFieldDescription *fieldDesc = field->description_; - GPBMaybeClearOneof(self, oneof, fieldDesc->hasIndex, fieldDesc->number); - } - NSCAssert(self->messageStorage_ != NULL, - @"%@: All messages should have storage (from init)", - [self class]); -#if defined(__clang_analyzer__) - if (self->messageStorage_ == NULL) return; -#endif - uint8_t *storage = (uint8_t *)self->messageStorage_; - double *typePtr = (double *)&storage[field->description_->offset]; - *typePtr = value; - // proto2: any value counts as having been set; proto3, it - // has to be a non zero value or be in a oneof. - BOOL hasValue = ((syntax == GPBFileSyntaxProto2) - || (value != (double)0) - || (field->containingOneof_ != NULL)); - GPBSetHasIvarField(self, field, hasValue); - GPBBecomeVisibleToAutocreator(self); -} - -//%PDDM-EXPAND-END (6 expansions) - -// Aliases are function calls that are virtually the same. - -//%PDDM-EXPAND IVAR_ALIAS_DEFN_OBJECT(String, NSString) -// This block of code is generated, do not edit it directly. - -// Only exists for public api, no core code should use this. -NSString *GPBGetMessageStringField(GPBMessage *self, - GPBFieldDescriptor *field) { - return (NSString *)GPBGetObjectIvarWithField(self, field); -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageStringField(GPBMessage *self, - GPBFieldDescriptor *field, - NSString *value) { - GPBSetObjectIvarWithField(self, field, (id)value); -} - -//%PDDM-EXPAND IVAR_ALIAS_DEFN_OBJECT(Bytes, NSData) -// This block of code is generated, do not edit it directly. - -// Only exists for public api, no core code should use this. -NSData *GPBGetMessageBytesField(GPBMessage *self, - GPBFieldDescriptor *field) { - return (NSData *)GPBGetObjectIvarWithField(self, field); -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageBytesField(GPBMessage *self, - GPBFieldDescriptor *field, - NSData *value) { - GPBSetObjectIvarWithField(self, field, (id)value); -} - -//%PDDM-EXPAND IVAR_ALIAS_DEFN_OBJECT(Message, GPBMessage) -// This block of code is generated, do not edit it directly. - -// Only exists for public api, no core code should use this. -GPBMessage *GPBGetMessageMessageField(GPBMessage *self, - GPBFieldDescriptor *field) { - return (GPBMessage *)GPBGetObjectIvarWithField(self, field); -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageMessageField(GPBMessage *self, - GPBFieldDescriptor *field, - GPBMessage *value) { - GPBSetObjectIvarWithField(self, field, (id)value); -} - -//%PDDM-EXPAND IVAR_ALIAS_DEFN_OBJECT(Group, GPBMessage) -// This block of code is generated, do not edit it directly. - -// Only exists for public api, no core code should use this. -GPBMessage *GPBGetMessageGroupField(GPBMessage *self, - GPBFieldDescriptor *field) { - return (GPBMessage *)GPBGetObjectIvarWithField(self, field); -} - -// Only exists for public api, no core code should use this. -void GPBSetMessageGroupField(GPBMessage *self, - GPBFieldDescriptor *field, - GPBMessage *value) { - GPBSetObjectIvarWithField(self, field, (id)value); -} - -//%PDDM-EXPAND-END (4 expansions) - -// GPBGetMessageRepeatedField is defined in GPBMessage.m - -// Only exists for public api, no core code should use this. -void GPBSetMessageRepeatedField(GPBMessage *self, GPBFieldDescriptor *field, id array) { -#if defined(DEBUG) && DEBUG - if (field.fieldType != GPBFieldTypeRepeated) { - [NSException raise:NSInvalidArgumentException - format:@"%@.%@ is not a repeated field.", - [self class], field.name]; - } - Class expectedClass = Nil; - switch (GPBGetFieldDataType(field)) { - case GPBDataTypeBool: - expectedClass = [GPBBoolArray class]; - break; - case GPBDataTypeSFixed32: - case GPBDataTypeInt32: - case GPBDataTypeSInt32: - expectedClass = [GPBInt32Array class]; - break; - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - expectedClass = [GPBUInt32Array class]; - break; - case GPBDataTypeSFixed64: - case GPBDataTypeInt64: - case GPBDataTypeSInt64: - expectedClass = [GPBInt64Array class]; - break; - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - expectedClass = [GPBUInt64Array class]; - break; - case GPBDataTypeFloat: - expectedClass = [GPBFloatArray class]; - break; - case GPBDataTypeDouble: - expectedClass = [GPBDoubleArray class]; - break; - case GPBDataTypeBytes: - case GPBDataTypeString: - case GPBDataTypeMessage: - case GPBDataTypeGroup: - expectedClass = [NSMutableArray class]; - break; - case GPBDataTypeEnum: - expectedClass = [GPBEnumArray class]; - break; - } - if (array && ![array isKindOfClass:expectedClass]) { - [NSException raise:NSInvalidArgumentException - format:@"%@.%@: Expected %@ object, got %@.", - [self class], field.name, expectedClass, [array class]]; - } -#endif - GPBSetObjectIvarWithField(self, field, array); -} - -#if defined(DEBUG) && DEBUG -static NSString *TypeToStr(GPBDataType dataType) { - switch (dataType) { - case GPBDataTypeBool: - return @"Bool"; - case GPBDataTypeSFixed32: - case GPBDataTypeInt32: - case GPBDataTypeSInt32: - return @"Int32"; - case GPBDataTypeFixed32: - case GPBDataTypeUInt32: - return @"UInt32"; - case GPBDataTypeSFixed64: - case GPBDataTypeInt64: - case GPBDataTypeSInt64: - return @"Int64"; - case GPBDataTypeFixed64: - case GPBDataTypeUInt64: - return @"UInt64"; - case GPBDataTypeFloat: - return @"Float"; - case GPBDataTypeDouble: - return @"Double"; - case GPBDataTypeBytes: - case GPBDataTypeString: - case GPBDataTypeMessage: - case GPBDataTypeGroup: - return @"Object"; - case GPBDataTypeEnum: - return @"Bool"; - } -} -#endif - -// GPBGetMessageMapField is defined in GPBMessage.m - -// Only exists for public api, no core code should use this. -void GPBSetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field, - id dictionary) { -#if defined(DEBUG) && DEBUG - if (field.fieldType != GPBFieldTypeMap) { - [NSException raise:NSInvalidArgumentException - format:@"%@.%@ is not a map<> field.", - [self class], field.name]; - } - if (dictionary) { - GPBDataType keyDataType = field.mapKeyDataType; - GPBDataType valueDataType = GPBGetFieldDataType(field); - NSString *keyStr = TypeToStr(keyDataType); - NSString *valueStr = TypeToStr(valueDataType); - if (keyDataType == GPBDataTypeString) { - keyStr = @"String"; - } - Class expectedClass = Nil; - if ((keyDataType == GPBDataTypeString) && - GPBDataTypeIsObject(valueDataType)) { - expectedClass = [NSMutableDictionary class]; - } else { - NSString *className = - [NSString stringWithFormat:@"GPB%@%@Dictionary", keyStr, valueStr]; - expectedClass = NSClassFromString(className); - NSCAssert(expectedClass, @"Missing a class (%@)?", expectedClass); - } - if (![dictionary isKindOfClass:expectedClass]) { - [NSException raise:NSInvalidArgumentException - format:@"%@.%@: Expected %@ object, got %@.", - [self class], field.name, expectedClass, - [dictionary class]]; - } - } -#endif - GPBSetObjectIvarWithField(self, field, dictionary); -} - -#pragma mark - Misc Dynamic Runtime Utils - -const char *GPBMessageEncodingForSelector(SEL selector, BOOL instanceSel) { - Protocol *protocol = - objc_getProtocol(GPBStringifySymbol(GPBMessageSignatureProtocol)); - struct objc_method_description description = - protocol_getMethodDescription(protocol, selector, NO, instanceSel); - return description.types; -} - -#pragma mark - Text Format Support - -static void AppendStringEscaped(NSString *toPrint, NSMutableString *destStr) { - [destStr appendString:@"\""]; - NSUInteger len = [toPrint length]; - for (NSUInteger i = 0; i < len; ++i) { - unichar aChar = [toPrint characterAtIndex:i]; - switch (aChar) { - case '\n': [destStr appendString:@"\\n"]; break; - case '\r': [destStr appendString:@"\\r"]; break; - case '\t': [destStr appendString:@"\\t"]; break; - case '\"': [destStr appendString:@"\\\""]; break; - case '\'': [destStr appendString:@"\\\'"]; break; - case '\\': [destStr appendString:@"\\\\"]; break; - default: - // This differs slightly from the C++ code in that the C++ doesn't - // generate UTF8; it looks at the string in UTF8, but escapes every - // byte > 0x7E. - if (aChar < 0x20) { - [destStr appendFormat:@"\\%d%d%d", - (aChar / 64), ((aChar % 64) / 8), (aChar % 8)]; - } else { - [destStr appendFormat:@"%C", aChar]; - } - break; - } - } - [destStr appendString:@"\""]; -} - -static void AppendBufferAsString(NSData *buffer, NSMutableString *destStr) { - const char *src = (const char *)[buffer bytes]; - size_t srcLen = [buffer length]; - [destStr appendString:@"\""]; - for (const char *srcEnd = src + srcLen; src < srcEnd; src++) { - switch (*src) { - case '\n': [destStr appendString:@"\\n"]; break; - case '\r': [destStr appendString:@"\\r"]; break; - case '\t': [destStr appendString:@"\\t"]; break; - case '\"': [destStr appendString:@"\\\""]; break; - case '\'': [destStr appendString:@"\\\'"]; break; - case '\\': [destStr appendString:@"\\\\"]; break; - default: - if (isprint(*src)) { - [destStr appendFormat:@"%c", *src]; - } else { - // NOTE: doing hex means you have to worry about the letter after - // the hex being another hex char and forcing that to be escaped, so - // use octal to keep it simple. - [destStr appendFormat:@"\\%03o", (uint8_t)(*src)]; - } - break; - } - } - [destStr appendString:@"\""]; -} - -static void AppendTextFormatForMapMessageField( - id map, GPBFieldDescriptor *field, NSMutableString *toStr, - NSString *lineIndent, NSString *fieldName, NSString *lineEnding) { - GPBDataType keyDataType = field.mapKeyDataType; - GPBDataType valueDataType = GPBGetFieldDataType(field); - BOOL isMessageValue = GPBDataTypeIsMessage(valueDataType); - - NSString *msgStartFirst = - [NSString stringWithFormat:@"%@%@ {%@\n", lineIndent, fieldName, lineEnding]; - NSString *msgStart = - [NSString stringWithFormat:@"%@%@ {\n", lineIndent, fieldName]; - NSString *msgEnd = [NSString stringWithFormat:@"%@}\n", lineIndent]; - - NSString *keyLine = [NSString stringWithFormat:@"%@ key: ", lineIndent]; - NSString *valueLine = [NSString stringWithFormat:@"%@ value%s ", lineIndent, - (isMessageValue ? "" : ":")]; - - __block BOOL isFirst = YES; - - if ((keyDataType == GPBDataTypeString) && - GPBDataTypeIsObject(valueDataType)) { - // map is an NSDictionary. - NSDictionary *dict = map; - [dict enumerateKeysAndObjectsUsingBlock:^(NSString *key, id value, BOOL *stop) { - #pragma unused(stop) - [toStr appendString:(isFirst ? msgStartFirst : msgStart)]; - isFirst = NO; - - [toStr appendString:keyLine]; - AppendStringEscaped(key, toStr); - [toStr appendString:@"\n"]; - - [toStr appendString:valueLine]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wswitch-enum" - switch (valueDataType) { - case GPBDataTypeString: - AppendStringEscaped(value, toStr); - break; - - case GPBDataTypeBytes: - AppendBufferAsString(value, toStr); - break; - - case GPBDataTypeMessage: - [toStr appendString:@"{\n"]; - NSString *subIndent = [lineIndent stringByAppendingString:@" "]; - AppendTextFormatForMessage(value, toStr, subIndent); - [toStr appendFormat:@"%@ }", lineIndent]; - break; - - default: - NSCAssert(NO, @"Can't happen"); - break; - } -#pragma clang diagnostic pop - [toStr appendString:@"\n"]; - - [toStr appendString:msgEnd]; - }]; - } else { - // map is one of the GPB*Dictionary classes, type doesn't matter. - GPBInt32Int32Dictionary *dict = map; - [dict enumerateForTextFormat:^(id keyObj, id valueObj) { - [toStr appendString:(isFirst ? msgStartFirst : msgStart)]; - isFirst = NO; - - // Key always is a NSString. - if (keyDataType == GPBDataTypeString) { - [toStr appendString:keyLine]; - AppendStringEscaped(keyObj, toStr); - [toStr appendString:@"\n"]; - } else { - [toStr appendFormat:@"%@%@\n", keyLine, keyObj]; - } - - [toStr appendString:valueLine]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wswitch-enum" - switch (valueDataType) { - case GPBDataTypeString: - AppendStringEscaped(valueObj, toStr); - break; - - case GPBDataTypeBytes: - AppendBufferAsString(valueObj, toStr); - break; - - case GPBDataTypeMessage: - [toStr appendString:@"{\n"]; - NSString *subIndent = [lineIndent stringByAppendingString:@" "]; - AppendTextFormatForMessage(valueObj, toStr, subIndent); - [toStr appendFormat:@"%@ }", lineIndent]; - break; - - case GPBDataTypeEnum: { - int32_t enumValue = [valueObj intValue]; - NSString *valueStr = nil; - GPBEnumDescriptor *descriptor = field.enumDescriptor; - if (descriptor) { - valueStr = [descriptor textFormatNameForValue:enumValue]; - } - if (valueStr) { - [toStr appendString:valueStr]; - } else { - [toStr appendFormat:@"%d", enumValue]; - } - break; - } - - default: - NSCAssert(valueDataType != GPBDataTypeGroup, @"Can't happen"); - // Everything else is a NSString. - [toStr appendString:valueObj]; - break; - } -#pragma clang diagnostic pop - [toStr appendString:@"\n"]; - - [toStr appendString:msgEnd]; - }]; - } -} - -static void AppendTextFormatForMessageField(GPBMessage *message, - GPBFieldDescriptor *field, - NSMutableString *toStr, - NSString *lineIndent) { - id arrayOrMap; - NSUInteger count; - GPBFieldType fieldType = field.fieldType; - switch (fieldType) { - case GPBFieldTypeSingle: - arrayOrMap = nil; - count = (GPBGetHasIvarField(message, field) ? 1 : 0); - break; - - case GPBFieldTypeRepeated: - // Will be NSArray or GPB*Array, type doesn't matter, they both - // implement count. - arrayOrMap = GPBGetObjectIvarWithFieldNoAutocreate(message, field); - count = [(NSArray *)arrayOrMap count]; - break; - - case GPBFieldTypeMap: { - // Will be GPB*Dictionary or NSMutableDictionary, type doesn't matter, - // they both implement count. - arrayOrMap = GPBGetObjectIvarWithFieldNoAutocreate(message, field); - count = [(NSDictionary *)arrayOrMap count]; - break; - } - } - - if (count == 0) { - // Nothing to print, out of here. - return; - } - - NSString *lineEnding = @""; - - // If the name can't be reversed or support for extra info was turned off, - // this can return nil. - NSString *fieldName = [field textFormatName]; - if ([fieldName length] == 0) { - fieldName = [NSString stringWithFormat:@"%u", GPBFieldNumber(field)]; - // If there is only one entry, put the objc name as a comment, other wise - // add it before the repeated values. - if (count > 1) { - [toStr appendFormat:@"%@# %@\n", lineIndent, field.name]; - } else { - lineEnding = [NSString stringWithFormat:@" # %@", field.name]; - } - } - - if (fieldType == GPBFieldTypeMap) { - AppendTextFormatForMapMessageField(arrayOrMap, field, toStr, lineIndent, - fieldName, lineEnding); - return; - } - - id array = arrayOrMap; - const BOOL isRepeated = (array != nil); - - GPBDataType fieldDataType = GPBGetFieldDataType(field); - BOOL isMessageField = GPBDataTypeIsMessage(fieldDataType); - for (NSUInteger j = 0; j < count; ++j) { - // Start the line. - [toStr appendFormat:@"%@%@%s ", lineIndent, fieldName, - (isMessageField ? "" : ":")]; - - // The value. - switch (fieldDataType) { -#define FIELD_CASE(GPBDATATYPE, CTYPE, REAL_TYPE, ...) \ - case GPBDataType##GPBDATATYPE: { \ - CTYPE v = (isRepeated ? [(GPB##REAL_TYPE##Array *)array valueAtIndex:j] \ - : GPBGetMessage##REAL_TYPE##Field(message, field)); \ - [toStr appendFormat:__VA_ARGS__, v]; \ - break; \ - } - - FIELD_CASE(Int32, int32_t, Int32, @"%d") - FIELD_CASE(SInt32, int32_t, Int32, @"%d") - FIELD_CASE(SFixed32, int32_t, Int32, @"%d") - FIELD_CASE(UInt32, uint32_t, UInt32, @"%u") - FIELD_CASE(Fixed32, uint32_t, UInt32, @"%u") - FIELD_CASE(Int64, int64_t, Int64, @"%lld") - FIELD_CASE(SInt64, int64_t, Int64, @"%lld") - FIELD_CASE(SFixed64, int64_t, Int64, @"%lld") - FIELD_CASE(UInt64, uint64_t, UInt64, @"%llu") - FIELD_CASE(Fixed64, uint64_t, UInt64, @"%llu") - FIELD_CASE(Float, float, Float, @"%.*g", FLT_DIG) - FIELD_CASE(Double, double, Double, @"%.*lg", DBL_DIG) - -#undef FIELD_CASE - - case GPBDataTypeEnum: { - int32_t v = (isRepeated ? [(GPBEnumArray *)array rawValueAtIndex:j] - : GPBGetMessageInt32Field(message, field)); - NSString *valueStr = nil; - GPBEnumDescriptor *descriptor = field.enumDescriptor; - if (descriptor) { - valueStr = [descriptor textFormatNameForValue:v]; - } - if (valueStr) { - [toStr appendString:valueStr]; - } else { - [toStr appendFormat:@"%d", v]; - } - break; - } - - case GPBDataTypeBool: { - BOOL v = (isRepeated ? [(GPBBoolArray *)array valueAtIndex:j] - : GPBGetMessageBoolField(message, field)); - [toStr appendString:(v ? @"true" : @"false")]; - break; - } - - case GPBDataTypeString: { - NSString *v = (isRepeated ? [(NSArray *)array objectAtIndex:j] - : GPBGetMessageStringField(message, field)); - AppendStringEscaped(v, toStr); - break; - } - - case GPBDataTypeBytes: { - NSData *v = (isRepeated ? [(NSArray *)array objectAtIndex:j] - : GPBGetMessageBytesField(message, field)); - AppendBufferAsString(v, toStr); - break; - } - - case GPBDataTypeGroup: - case GPBDataTypeMessage: { - GPBMessage *v = - (isRepeated ? [(NSArray *)array objectAtIndex:j] - : GPBGetObjectIvarWithField(message, field)); - [toStr appendFormat:@"{%@\n", lineEnding]; - NSString *subIndent = [lineIndent stringByAppendingString:@" "]; - AppendTextFormatForMessage(v, toStr, subIndent); - [toStr appendFormat:@"%@}", lineIndent]; - lineEnding = @""; - break; - } - - } // switch(fieldDataType) - - // End the line. - [toStr appendFormat:@"%@\n", lineEnding]; - - } // for(count) -} - -static void AppendTextFormatForMessageExtensionRange(GPBMessage *message, - NSArray *activeExtensions, - GPBExtensionRange range, - NSMutableString *toStr, - NSString *lineIndent) { - uint32_t start = range.start; - uint32_t end = range.end; - for (GPBExtensionDescriptor *extension in activeExtensions) { - uint32_t fieldNumber = extension.fieldNumber; - if (fieldNumber < start) { - // Not there yet. - continue; - } - if (fieldNumber > end) { - // Done. - break; - } - - id rawExtValue = [message getExtension:extension]; - BOOL isRepeated = extension.isRepeated; - - NSUInteger numValues = 1; - NSString *lineEnding = @""; - if (isRepeated) { - numValues = [(NSArray *)rawExtValue count]; - } - - NSString *singletonName = extension.singletonName; - if (numValues == 1) { - lineEnding = [NSString stringWithFormat:@" # [%@]", singletonName]; - } else { - [toStr appendFormat:@"%@# [%@]\n", lineIndent, singletonName]; - } - - GPBDataType extDataType = extension.dataType; - for (NSUInteger j = 0; j < numValues; ++j) { - id curValue = (isRepeated ? [rawExtValue objectAtIndex:j] : rawExtValue); - - // Start the line. - [toStr appendFormat:@"%@%u%s ", lineIndent, fieldNumber, - (GPBDataTypeIsMessage(extDataType) ? "" : ":")]; - - // The value. - switch (extDataType) { -#define FIELD_CASE(GPBDATATYPE, CTYPE, NUMSELECTOR, ...) \ - case GPBDataType##GPBDATATYPE: { \ - CTYPE v = [(NSNumber *)curValue NUMSELECTOR]; \ - [toStr appendFormat:__VA_ARGS__, v]; \ - break; \ - } - - FIELD_CASE(Int32, int32_t, intValue, @"%d") - FIELD_CASE(SInt32, int32_t, intValue, @"%d") - FIELD_CASE(SFixed32, int32_t, unsignedIntValue, @"%d") - FIELD_CASE(UInt32, uint32_t, unsignedIntValue, @"%u") - FIELD_CASE(Fixed32, uint32_t, unsignedIntValue, @"%u") - FIELD_CASE(Int64, int64_t, longLongValue, @"%lld") - FIELD_CASE(SInt64, int64_t, longLongValue, @"%lld") - FIELD_CASE(SFixed64, int64_t, longLongValue, @"%lld") - FIELD_CASE(UInt64, uint64_t, unsignedLongLongValue, @"%llu") - FIELD_CASE(Fixed64, uint64_t, unsignedLongLongValue, @"%llu") - FIELD_CASE(Float, float, floatValue, @"%.*g", FLT_DIG) - FIELD_CASE(Double, double, doubleValue, @"%.*lg", DBL_DIG) - // TODO: Add a comment with the enum name from enum descriptors - // (might not be real value, so leave it as a comment, ObjC compiler - // name mangles differently). Doesn't look like we actually generate - // an enum descriptor reference like we do for normal fields, so this - // will take a compiler change. - FIELD_CASE(Enum, int32_t, intValue, @"%d") - -#undef FIELD_CASE - - case GPBDataTypeBool: - [toStr appendString:([(NSNumber *)curValue boolValue] ? @"true" - : @"false")]; - break; - - case GPBDataTypeString: - AppendStringEscaped(curValue, toStr); - break; - - case GPBDataTypeBytes: - AppendBufferAsString((NSData *)curValue, toStr); - break; - - case GPBDataTypeGroup: - case GPBDataTypeMessage: { - [toStr appendFormat:@"{%@\n", lineEnding]; - NSString *subIndent = [lineIndent stringByAppendingString:@" "]; - AppendTextFormatForMessage(curValue, toStr, subIndent); - [toStr appendFormat:@"%@}", lineIndent]; - lineEnding = @""; - break; - } - - } // switch(extDataType) - - } // for(numValues) - - // End the line. - [toStr appendFormat:@"%@\n", lineEnding]; - - } // for..in(activeExtensions) -} - -static void AppendTextFormatForMessage(GPBMessage *message, - NSMutableString *toStr, - NSString *lineIndent) { - GPBDescriptor *descriptor = [message descriptor]; - NSArray *fieldsArray = descriptor->fields_; - NSUInteger fieldCount = fieldsArray.count; - const GPBExtensionRange *extensionRanges = descriptor.extensionRanges; - NSUInteger extensionRangesCount = descriptor.extensionRangesCount; - NSArray *activeExtensions = [[message extensionsCurrentlySet] - sortedArrayUsingSelector:@selector(compareByFieldNumber:)]; - for (NSUInteger i = 0, j = 0; i < fieldCount || j < extensionRangesCount;) { - if (i == fieldCount) { - AppendTextFormatForMessageExtensionRange( - message, activeExtensions, extensionRanges[j++], toStr, lineIndent); - } else if (j == extensionRangesCount || - GPBFieldNumber(fieldsArray[i]) < extensionRanges[j].start) { - AppendTextFormatForMessageField(message, fieldsArray[i++], toStr, - lineIndent); - } else { - AppendTextFormatForMessageExtensionRange( - message, activeExtensions, extensionRanges[j++], toStr, lineIndent); - } - } - - NSString *unknownFieldsStr = - GPBTextFormatForUnknownFieldSet(message.unknownFields, lineIndent); - if ([unknownFieldsStr length] > 0) { - [toStr appendFormat:@"%@# --- Unknown fields ---\n", lineIndent]; - [toStr appendString:unknownFieldsStr]; - } -} - -NSString *GPBTextFormatForMessage(GPBMessage *message, NSString *lineIndent) { - if (message == nil) return @""; - if (lineIndent == nil) lineIndent = @""; - - NSMutableString *buildString = [NSMutableString string]; - AppendTextFormatForMessage(message, buildString, lineIndent); - return buildString; -} - -NSString *GPBTextFormatForUnknownFieldSet(GPBUnknownFieldSet *unknownSet, - NSString *lineIndent) { - if (unknownSet == nil) return @""; - if (lineIndent == nil) lineIndent = @""; - - NSMutableString *result = [NSMutableString string]; - for (GPBUnknownField *field in [unknownSet sortedFields]) { - int32_t fieldNumber = [field number]; - -#define PRINT_LOOP(PROPNAME, CTYPE, FORMAT) \ - [field.PROPNAME \ - enumerateValuesWithBlock:^(CTYPE value, NSUInteger idx, BOOL * stop) { \ - _Pragma("unused(idx, stop)"); \ - [result \ - appendFormat:@"%@%d: " #FORMAT "\n", lineIndent, fieldNumber, value]; \ - }]; - - PRINT_LOOP(varintList, uint64_t, %llu); - PRINT_LOOP(fixed32List, uint32_t, 0x%X); - PRINT_LOOP(fixed64List, uint64_t, 0x%llX); - -#undef PRINT_LOOP - - // NOTE: C++ version of TextFormat tries to parse this as a message - // and print that if it succeeds. - for (NSData *data in field.lengthDelimitedList) { - [result appendFormat:@"%@%d: ", lineIndent, fieldNumber]; - AppendBufferAsString(data, result); - [result appendString:@"\n"]; - } - - for (GPBUnknownFieldSet *subUnknownSet in field.groupList) { - [result appendFormat:@"%@%d: {\n", lineIndent, fieldNumber]; - NSString *subIndent = [lineIndent stringByAppendingString:@" "]; - NSString *subUnknwonSetStr = - GPBTextFormatForUnknownFieldSet(subUnknownSet, subIndent); - [result appendString:subUnknwonSetStr]; - [result appendFormat:@"%@}\n", lineIndent]; - } - } - return result; -} - -// Helpers to decode a varint. Not using GPBCodedInputStream version because -// that needs a state object, and we don't want to create an input stream out -// of the data. -GPB_INLINE int8_t ReadRawByteFromData(const uint8_t **data) { - int8_t result = *((int8_t *)(*data)); - ++(*data); - return result; -} - -static int32_t ReadRawVarint32FromData(const uint8_t **data) { - int8_t tmp = ReadRawByteFromData(data); - if (tmp >= 0) { - return tmp; - } - int32_t result = tmp & 0x7f; - if ((tmp = ReadRawByteFromData(data)) >= 0) { - result |= tmp << 7; - } else { - result |= (tmp & 0x7f) << 7; - if ((tmp = ReadRawByteFromData(data)) >= 0) { - result |= tmp << 14; - } else { - result |= (tmp & 0x7f) << 14; - if ((tmp = ReadRawByteFromData(data)) >= 0) { - result |= tmp << 21; - } else { - result |= (tmp & 0x7f) << 21; - result |= (tmp = ReadRawByteFromData(data)) << 28; - if (tmp < 0) { - // Discard upper 32 bits. - for (int i = 0; i < 5; i++) { - if (ReadRawByteFromData(data) >= 0) { - return result; - } - } - [NSException raise:NSParseErrorException - format:@"Unable to read varint32"]; - } - } - } - } - return result; -} - -NSString *GPBDecodeTextFormatName(const uint8_t *decodeData, int32_t key, - NSString *inputStr) { - // decodData form: - // varint32: num entries - // for each entry: - // varint32: key - // bytes*: decode data - // - // decode data one of two forms: - // 1: a \0 followed by the string followed by an \0 - // 2: bytecodes to transform an input into the right thing, ending with \0 - // - // the bytes codes are of the form: - // 0xabbccccc - // 0x0 (all zeros), end. - // a - if set, add an underscore - // bb - 00 ccccc bytes as is - // bb - 10 ccccc upper first, as is on rest, ccccc byte total - // bb - 01 ccccc lower first, as is on rest, ccccc byte total - // bb - 11 ccccc all upper, ccccc byte total - - if (!decodeData || !inputStr) { - return nil; - } - - // Find key - const uint8_t *scan = decodeData; - int32_t numEntries = ReadRawVarint32FromData(&scan); - BOOL foundKey = NO; - while (!foundKey && (numEntries > 0)) { - --numEntries; - int32_t dataKey = ReadRawVarint32FromData(&scan); - if (dataKey == key) { - foundKey = YES; - } else { - // If it is a inlined string, it will start with \0; if it is bytecode it - // will start with a code. So advance one (skipping the inline string - // marker), and then loop until reaching the end marker (\0). - ++scan; - while (*scan != 0) ++scan; - // Now move past the end marker. - ++scan; - } - } - - if (!foundKey) { - return nil; - } - - // Decode - - if (*scan == 0) { - // Inline string. Move over the marker, and NSString can take it as - // UTF8. - ++scan; - NSString *result = [NSString stringWithUTF8String:(const char *)scan]; - return result; - } - - NSMutableString *result = - [NSMutableString stringWithCapacity:[inputStr length]]; - - const uint8_t kAddUnderscore = 0b10000000; - const uint8_t kOpMask = 0b01100000; - // const uint8_t kOpAsIs = 0b00000000; - const uint8_t kOpFirstUpper = 0b01000000; - const uint8_t kOpFirstLower = 0b00100000; - const uint8_t kOpAllUpper = 0b01100000; - const uint8_t kSegmentLenMask = 0b00011111; - - NSInteger i = 0; - for (; *scan != 0; ++scan) { - if (*scan & kAddUnderscore) { - [result appendString:@"_"]; - } - int segmentLen = *scan & kSegmentLenMask; - uint8_t decodeOp = *scan & kOpMask; - - // Do op specific handling of the first character. - if (decodeOp == kOpFirstUpper) { - unichar c = [inputStr characterAtIndex:i]; - [result appendFormat:@"%c", toupper((char)c)]; - ++i; - --segmentLen; - } else if (decodeOp == kOpFirstLower) { - unichar c = [inputStr characterAtIndex:i]; - [result appendFormat:@"%c", tolower((char)c)]; - ++i; - --segmentLen; - } - // else op == kOpAsIs || op == kOpAllUpper - - // Now pull over the rest of the length for this segment. - for (int x = 0; x < segmentLen; ++x) { - unichar c = [inputStr characterAtIndex:(i + x)]; - if (decodeOp == kOpAllUpper) { - [result appendFormat:@"%c", toupper((char)c)]; - } else { - [result appendFormat:@"%C", c]; - } - } - i += segmentLen; - } - - return result; -} - -#pragma clang diagnostic pop - -#pragma mark - GPBMessageSignatureProtocol - -// A series of selectors that are used solely to get @encoding values -// for them by the dynamic protobuf runtime code. An object using the protocol -// needs to be declared for the protocol to be valid at runtime. -@interface GPBMessageSignatureProtocol : NSObject -@end -@implementation GPBMessageSignatureProtocol -@end diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBUtilities_PackagePrivate.h b/Old My Mind/Pods/Protobuf/objectivec/GPBUtilities_PackagePrivate.h deleted file mode 100755 index 274351b..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBUtilities_PackagePrivate.h +++ /dev/null @@ -1,348 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBUtilities.h" - -#import "GPBDescriptor_PackagePrivate.h" - -// Macros for stringifying library symbols. These are used in the generated -// PB descriptor classes wherever a library symbol name is represented as a -// string. See README.google for more information. -#define GPBStringify(S) #S -#define GPBStringifySymbol(S) GPBStringify(S) - -#define GPBNSStringify(S) @#S -#define GPBNSStringifySymbol(S) GPBNSStringify(S) - -// Constant to internally mark when there is no has bit. -#define GPBNoHasBit INT32_MAX - -CF_EXTERN_C_BEGIN - -// These two are used to inject a runtime check for version mismatch into the -// generated sources to make sure they are linked with a supporting runtime. -void GPBCheckRuntimeVersionSupport(int32_t objcRuntimeVersion); -GPB_INLINE void GPB_DEBUG_CHECK_RUNTIME_VERSIONS() { - // NOTE: By being inline here, this captures the value from the library's - // headers at the time the generated code was compiled. -#if defined(DEBUG) && DEBUG - GPBCheckRuntimeVersionSupport(GOOGLE_PROTOBUF_OBJC_VERSION); -#endif -} - -// Legacy version of the checks, remove when GOOGLE_PROTOBUF_OBJC_GEN_VERSION -// goes away (see more info in GPBBootstrap.h). -void GPBCheckRuntimeVersionInternal(int32_t version); -GPB_INLINE void GPBDebugCheckRuntimeVersion() { -#if defined(DEBUG) && DEBUG - GPBCheckRuntimeVersionInternal(GOOGLE_PROTOBUF_OBJC_GEN_VERSION); -#endif -} - -// Conversion functions for de/serializing floating point types. - -GPB_INLINE int64_t GPBConvertDoubleToInt64(double v) { - union { double f; int64_t i; } u; - u.f = v; - return u.i; -} - -GPB_INLINE int32_t GPBConvertFloatToInt32(float v) { - union { float f; int32_t i; } u; - u.f = v; - return u.i; -} - -GPB_INLINE double GPBConvertInt64ToDouble(int64_t v) { - union { double f; int64_t i; } u; - u.i = v; - return u.f; -} - -GPB_INLINE float GPBConvertInt32ToFloat(int32_t v) { - union { float f; int32_t i; } u; - u.i = v; - return u.f; -} - -GPB_INLINE int32_t GPBLogicalRightShift32(int32_t value, int32_t spaces) { - return (int32_t)((uint32_t)(value) >> spaces); -} - -GPB_INLINE int64_t GPBLogicalRightShift64(int64_t value, int32_t spaces) { - return (int64_t)((uint64_t)(value) >> spaces); -} - -// Decode a ZigZag-encoded 32-bit value. ZigZag encodes signed integers -// into values that can be efficiently encoded with varint. (Otherwise, -// negative values must be sign-extended to 64 bits to be varint encoded, -// thus always taking 10 bytes on the wire.) -GPB_INLINE int32_t GPBDecodeZigZag32(uint32_t n) { - return (int32_t)(GPBLogicalRightShift32((int32_t)n, 1) ^ -((int32_t)(n) & 1)); -} - -// Decode a ZigZag-encoded 64-bit value. ZigZag encodes signed integers -// into values that can be efficiently encoded with varint. (Otherwise, -// negative values must be sign-extended to 64 bits to be varint encoded, -// thus always taking 10 bytes on the wire.) -GPB_INLINE int64_t GPBDecodeZigZag64(uint64_t n) { - return (int64_t)(GPBLogicalRightShift64((int64_t)n, 1) ^ -((int64_t)(n) & 1)); -} - -// Encode a ZigZag-encoded 32-bit value. ZigZag encodes signed integers -// into values that can be efficiently encoded with varint. (Otherwise, -// negative values must be sign-extended to 64 bits to be varint encoded, -// thus always taking 10 bytes on the wire.) -GPB_INLINE uint32_t GPBEncodeZigZag32(int32_t n) { - // Note: the right-shift must be arithmetic - return (uint32_t)((n << 1) ^ (n >> 31)); -} - -// Encode a ZigZag-encoded 64-bit value. ZigZag encodes signed integers -// into values that can be efficiently encoded with varint. (Otherwise, -// negative values must be sign-extended to 64 bits to be varint encoded, -// thus always taking 10 bytes on the wire.) -GPB_INLINE uint64_t GPBEncodeZigZag64(int64_t n) { - // Note: the right-shift must be arithmetic - return (uint64_t)((n << 1) ^ (n >> 63)); -} - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wswitch-enum" -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -GPB_INLINE BOOL GPBDataTypeIsObject(GPBDataType type) { - switch (type) { - case GPBDataTypeBytes: - case GPBDataTypeString: - case GPBDataTypeMessage: - case GPBDataTypeGroup: - return YES; - default: - return NO; - } -} - -GPB_INLINE BOOL GPBDataTypeIsMessage(GPBDataType type) { - switch (type) { - case GPBDataTypeMessage: - case GPBDataTypeGroup: - return YES; - default: - return NO; - } -} - -GPB_INLINE BOOL GPBFieldDataTypeIsMessage(GPBFieldDescriptor *field) { - return GPBDataTypeIsMessage(field->description_->dataType); -} - -GPB_INLINE BOOL GPBFieldDataTypeIsObject(GPBFieldDescriptor *field) { - return GPBDataTypeIsObject(field->description_->dataType); -} - -GPB_INLINE BOOL GPBExtensionIsMessage(GPBExtensionDescriptor *ext) { - return GPBDataTypeIsMessage(ext->description_->dataType); -} - -// The field is an array/map or it has an object value. -GPB_INLINE BOOL GPBFieldStoresObject(GPBFieldDescriptor *field) { - GPBMessageFieldDescription *desc = field->description_; - if ((desc->flags & (GPBFieldRepeated | GPBFieldMapKeyMask)) != 0) { - return YES; - } - return GPBDataTypeIsObject(desc->dataType); -} - -BOOL GPBGetHasIvar(GPBMessage *self, int32_t index, uint32_t fieldNumber); -void GPBSetHasIvar(GPBMessage *self, int32_t idx, uint32_t fieldNumber, - BOOL value); -uint32_t GPBGetHasOneof(GPBMessage *self, int32_t index); - -GPB_INLINE BOOL -GPBGetHasIvarField(GPBMessage *self, GPBFieldDescriptor *field) { - GPBMessageFieldDescription *fieldDesc = field->description_; - return GPBGetHasIvar(self, fieldDesc->hasIndex, fieldDesc->number); -} -GPB_INLINE void GPBSetHasIvarField(GPBMessage *self, GPBFieldDescriptor *field, - BOOL value) { - GPBMessageFieldDescription *fieldDesc = field->description_; - GPBSetHasIvar(self, fieldDesc->hasIndex, fieldDesc->number, value); -} - -void GPBMaybeClearOneof(GPBMessage *self, GPBOneofDescriptor *oneof, - int32_t oneofHasIndex, uint32_t fieldNumberNotToClear); - -#pragma clang diagnostic pop - -//%PDDM-DEFINE GPB_IVAR_SET_DECL(NAME, TYPE) -//%void GPBSet##NAME##IvarWithFieldInternal(GPBMessage *self, -//% NAME$S GPBFieldDescriptor *field, -//% NAME$S TYPE value, -//% NAME$S GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Bool, BOOL) -// This block of code is generated, do not edit it directly. - -void GPBSetBoolIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - BOOL value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Int32, int32_t) -// This block of code is generated, do not edit it directly. - -void GPBSetInt32IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - int32_t value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(UInt32, uint32_t) -// This block of code is generated, do not edit it directly. - -void GPBSetUInt32IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - uint32_t value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Int64, int64_t) -// This block of code is generated, do not edit it directly. - -void GPBSetInt64IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - int64_t value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(UInt64, uint64_t) -// This block of code is generated, do not edit it directly. - -void GPBSetUInt64IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - uint64_t value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Float, float) -// This block of code is generated, do not edit it directly. - -void GPBSetFloatIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - float value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Double, double) -// This block of code is generated, do not edit it directly. - -void GPBSetDoubleIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - double value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Enum, int32_t) -// This block of code is generated, do not edit it directly. - -void GPBSetEnumIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - int32_t value, - GPBFileSyntax syntax); -//%PDDM-EXPAND-END (8 expansions) - -int32_t GPBGetEnumIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - GPBFileSyntax syntax); - -id GPBGetObjectIvarWithField(GPBMessage *self, GPBFieldDescriptor *field); - -void GPBSetObjectIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, id value, - GPBFileSyntax syntax); -void GPBSetRetainedObjectIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - id __attribute__((ns_consumed)) - value, - GPBFileSyntax syntax); - -// GPBGetObjectIvarWithField will automatically create the field (message) if -// it doesn't exist. GPBGetObjectIvarWithFieldNoAutocreate will return nil. -id GPBGetObjectIvarWithFieldNoAutocreate(GPBMessage *self, - GPBFieldDescriptor *field); - -void GPBSetAutocreatedRetainedObjectIvarWithField( - GPBMessage *self, GPBFieldDescriptor *field, - id __attribute__((ns_consumed)) value); - -// Clears and releases the autocreated message ivar, if it's autocreated. If -// it's not set as autocreated, this method does nothing. -void GPBClearAutocreatedMessageIvarWithField(GPBMessage *self, - GPBFieldDescriptor *field); - -// Returns an Objective C encoding for |selector|. |instanceSel| should be -// YES if it's an instance selector (as opposed to a class selector). -// |selector| must be a selector from MessageSignatureProtocol. -const char *GPBMessageEncodingForSelector(SEL selector, BOOL instanceSel); - -// Helper for text format name encoding. -// decodeData is the data describing the sepecial decodes. -// key and inputString are the input that needs decoding. -NSString *GPBDecodeTextFormatName(const uint8_t *decodeData, int32_t key, - NSString *inputString); - -// A series of selectors that are used solely to get @encoding values -// for them by the dynamic protobuf runtime code. See -// GPBMessageEncodingForSelector for details. -@protocol GPBMessageSignatureProtocol -@optional - -#define GPB_MESSAGE_SIGNATURE_ENTRY(TYPE, NAME) \ - -(TYPE)get##NAME; \ - -(void)set##NAME : (TYPE)value; \ - -(TYPE)get##NAME##AtIndex : (NSUInteger)index; - -GPB_MESSAGE_SIGNATURE_ENTRY(BOOL, Bool) -GPB_MESSAGE_SIGNATURE_ENTRY(uint32_t, Fixed32) -GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, SFixed32) -GPB_MESSAGE_SIGNATURE_ENTRY(float, Float) -GPB_MESSAGE_SIGNATURE_ENTRY(uint64_t, Fixed64) -GPB_MESSAGE_SIGNATURE_ENTRY(int64_t, SFixed64) -GPB_MESSAGE_SIGNATURE_ENTRY(double, Double) -GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, Int32) -GPB_MESSAGE_SIGNATURE_ENTRY(int64_t, Int64) -GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, SInt32) -GPB_MESSAGE_SIGNATURE_ENTRY(int64_t, SInt64) -GPB_MESSAGE_SIGNATURE_ENTRY(uint32_t, UInt32) -GPB_MESSAGE_SIGNATURE_ENTRY(uint64_t, UInt64) -GPB_MESSAGE_SIGNATURE_ENTRY(NSData *, Bytes) -GPB_MESSAGE_SIGNATURE_ENTRY(NSString *, String) -GPB_MESSAGE_SIGNATURE_ENTRY(GPBMessage *, Message) -GPB_MESSAGE_SIGNATURE_ENTRY(GPBMessage *, Group) -GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, Enum) - -#undef GPB_MESSAGE_SIGNATURE_ENTRY - -- (id)getArray; -- (NSUInteger)getArrayCount; -- (void)setArray:(NSArray *)array; -+ (id)getClassValue; -@end - -CF_EXTERN_C_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBWellKnownTypes.h b/Old My Mind/Pods/Protobuf/objectivec/GPBWellKnownTypes.h deleted file mode 100755 index 90d96c6..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBWellKnownTypes.h +++ /dev/null @@ -1,234 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2015 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "google/protobuf/Any.pbobjc.h" - #import "google/protobuf/Duration.pbobjc.h" - #import "google/protobuf/Timestamp.pbobjc.h" -#endif - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - Errors - -/** NSError domain used for errors. */ -extern NSString *const GPBWellKnownTypesErrorDomain; - -/** Error code for NSError with GPBWellKnownTypesErrorDomain. */ -typedef NS_ENUM(NSInteger, GPBWellKnownTypesErrorCode) { - /** The type_url could not be computed for the requested GPBMessage class. */ - GPBWellKnownTypesErrorCodeFailedToComputeTypeURL = -100, - /** type_url in a Any doesn’t match that of the requested GPBMessage class. */ - GPBWellKnownTypesErrorCodeTypeURLMismatch = -101, -}; - -#pragma mark - GPBTimestamp - -/** - * Category for GPBTimestamp to work with standard Foundation time/date types. - **/ -@interface GPBTimestamp (GBPWellKnownTypes) - -/** The NSDate representation of this GPBTimestamp. */ -@property(nonatomic, readwrite, strong) NSDate *date; - -/** - * The NSTimeInterval representation of this GPBTimestamp. - * - * @note: Not all second/nanos combinations can be represented in a - * NSTimeInterval, so getting this could be a lossy transform. - **/ -@property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970; - -/** - * Initializes a GPBTimestamp with the given NSDate. - * - * @param date The date to configure the GPBTimestamp with. - * - * @return A newly initialized GPBTimestamp. - **/ -- (instancetype)initWithDate:(NSDate *)date; - -/** - * Initializes a GPBTimestamp with the given NSTimeInterval. - * - * @param timeIntervalSince1970 Time interval to configure the GPBTimestamp with. - * - * @return A newly initialized GPBTimestamp. - **/ -- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970; - -@end - -#pragma mark - GPBDuration - -/** - * Category for GPBDuration to work with standard Foundation time type. - **/ -@interface GPBDuration (GBPWellKnownTypes) - -/** - * The NSTimeInterval representation of this GPBDuration. - * - * @note: Not all second/nanos combinations can be represented in a - * NSTimeInterval, so getting this could be a lossy transform. - **/ -@property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970; - -/** - * Initializes a GPBDuration with the given NSTimeInterval. - * - * @param timeIntervalSince1970 Time interval to configure the GPBDuration with. - * - * @return A newly initialized GPBDuration. - **/ -- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970; - -@end - -#pragma mark - GPBAny - -/** - * Category for GPBAny to help work with the message within the object. - **/ -@interface GPBAny (GBPWellKnownTypes) - -/** - * Convenience method to create a GPBAny containing the serialized message. - * This uses type.googleapis.com/ as the type_url's prefix. - * - * @param message The message to be packed into the GPBAny. - * @param errorPtr Pointer to an error that will be populated if something goes - * wrong. - * - * @return A newly configured GPBAny with the given message, or nil on failure. - */ -+ (nullable instancetype)anyWithMessage:(nonnull GPBMessage *)message - error:(NSError **)errorPtr; - -/** - * Convenience method to create a GPBAny containing the serialized message. - * - * @param message The message to be packed into the GPBAny. - * @param typeURLPrefix The URL prefix to apply for type_url. - * @param errorPtr Pointer to an error that will be populated if something - * goes wrong. - * - * @return A newly configured GPBAny with the given message, or nil on failure. - */ -+ (nullable instancetype)anyWithMessage:(nonnull GPBMessage *)message - typeURLPrefix:(nonnull NSString *)typeURLPrefix - error:(NSError **)errorPtr; - -/** - * Initializes a GPBAny to contain the serialized message. This uses - * type.googleapis.com/ as the type_url's prefix. - * - * @param message The message to be packed into the GPBAny. - * @param errorPtr Pointer to an error that will be populated if something goes - * wrong. - * - * @return A newly configured GPBAny with the given message, or nil on failure. - */ -- (nullable instancetype)initWithMessage:(nonnull GPBMessage *)message - error:(NSError **)errorPtr; - -/** - * Initializes a GPBAny to contain the serialized message. - * - * @param message The message to be packed into the GPBAny. - * @param typeURLPrefix The URL prefix to apply for type_url. - * @param errorPtr Pointer to an error that will be populated if something - * goes wrong. - * - * @return A newly configured GPBAny with the given message, or nil on failure. - */ -- (nullable instancetype)initWithMessage:(nonnull GPBMessage *)message - typeURLPrefix:(nonnull NSString *)typeURLPrefix - error:(NSError **)errorPtr; - -/** - * Packs the serialized message into this GPBAny. This uses - * type.googleapis.com/ as the type_url's prefix. - * - * @param message The message to be packed into the GPBAny. - * @param errorPtr Pointer to an error that will be populated if something goes - * wrong. - * - * @return Whether the packing was successful or not. - */ -- (BOOL)packWithMessage:(nonnull GPBMessage *)message - error:(NSError **)errorPtr; - -/** - * Packs the serialized message into this GPBAny. - * - * @param message The message to be packed into the GPBAny. - * @param typeURLPrefix The URL prefix to apply for type_url. - * @param errorPtr Pointer to an error that will be populated if something - * goes wrong. - * - * @return Whether the packing was successful or not. - */ -- (BOOL)packWithMessage:(nonnull GPBMessage *)message - typeURLPrefix:(nonnull NSString *)typeURLPrefix - error:(NSError **)errorPtr; - -/** - * Unpacks the serialized message as if it was an instance of the given class. - * - * @note When checking type_url, the base URL is not checked, only the fully - * qualified name. - * - * @param messageClass The class to use to deserialize the contained message. - * @param errorPtr Pointer to an error that will be populated if something - * goes wrong. - * - * @return An instance of the given class populated with the contained data, or - * nil on failure. - */ -- (nullable GPBMessage *)unpackMessageClass:(Class)messageClass - error:(NSError **)errorPtr; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBWellKnownTypes.m b/Old My Mind/Pods/Protobuf/objectivec/GPBWellKnownTypes.m deleted file mode 100755 index ed798a2..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBWellKnownTypes.m +++ /dev/null @@ -1,250 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2015 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Importing sources here to force the linker to include our category methods in -// the static library. If these were compiled separately, the category methods -// below would be stripped by the linker. - -#import "GPBWellKnownTypes.h" - -#import "GPBUtilities_PackagePrivate.h" - -NSString *const GPBWellKnownTypesErrorDomain = - GPBNSStringifySymbol(GPBWellKnownTypesErrorDomain); - -static NSString *kTypePrefixGoogleApisCom = @"type.googleapis.com/"; - -static NSTimeInterval TimeIntervalSince1970FromSecondsAndNanos(int64_t seconds, - int32_t nanos) { - return seconds + (NSTimeInterval)nanos / 1e9; -} - -static int32_t SecondsAndNanosFromTimeIntervalSince1970(NSTimeInterval time, - int64_t *outSeconds) { - NSTimeInterval seconds; - NSTimeInterval nanos = modf(time, &seconds); - nanos *= 1e9; - *outSeconds = (int64_t)seconds; - return (int32_t)nanos; -} - -static NSString *BuildTypeURL(NSString *typeURLPrefix, NSString *fullName) { - if (typeURLPrefix.length == 0) { - return fullName; - } - - if ([typeURLPrefix hasSuffix:@"/"]) { - return [typeURLPrefix stringByAppendingString:fullName]; - } - - return [NSString stringWithFormat:@"%@/%@", typeURLPrefix, fullName]; -} - -static NSString *ParseTypeFromURL(NSString *typeURLString) { - NSRange range = [typeURLString rangeOfString:@"/" options:NSBackwardsSearch]; - if ((range.location == NSNotFound) || - (NSMaxRange(range) == typeURLString.length)) { - return nil; - } - NSString *result = [typeURLString substringFromIndex:range.location + 1]; - return result; -} - -#pragma mark - GPBTimestamp - -@implementation GPBTimestamp (GBPWellKnownTypes) - -- (instancetype)initWithDate:(NSDate *)date { - return [self initWithTimeIntervalSince1970:date.timeIntervalSince1970]; -} - -- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970 { - if ((self = [super init])) { - int64_t seconds; - int32_t nanos = SecondsAndNanosFromTimeIntervalSince1970( - timeIntervalSince1970, &seconds); - self.seconds = seconds; - self.nanos = nanos; - } - return self; -} - -- (NSDate *)date { - return [NSDate dateWithTimeIntervalSince1970:self.timeIntervalSince1970]; -} - -- (void)setDate:(NSDate *)date { - self.timeIntervalSince1970 = date.timeIntervalSince1970; -} - -- (NSTimeInterval)timeIntervalSince1970 { - return TimeIntervalSince1970FromSecondsAndNanos(self.seconds, self.nanos); -} - -- (void)setTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970 { - int64_t seconds; - int32_t nanos = - SecondsAndNanosFromTimeIntervalSince1970(timeIntervalSince1970, &seconds); - self.seconds = seconds; - self.nanos = nanos; -} - -@end - -#pragma mark - GPBDuration - -@implementation GPBDuration (GBPWellKnownTypes) - -- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970 { - if ((self = [super init])) { - int64_t seconds; - int32_t nanos = SecondsAndNanosFromTimeIntervalSince1970( - timeIntervalSince1970, &seconds); - self.seconds = seconds; - self.nanos = nanos; - } - return self; -} - -- (NSTimeInterval)timeIntervalSince1970 { - return TimeIntervalSince1970FromSecondsAndNanos(self.seconds, self.nanos); -} - -- (void)setTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970 { - int64_t seconds; - int32_t nanos = - SecondsAndNanosFromTimeIntervalSince1970(timeIntervalSince1970, &seconds); - self.seconds = seconds; - self.nanos = nanos; -} - -@end - -#pragma mark - GPBAny - -@implementation GPBAny (GBPWellKnownTypes) - -+ (instancetype)anyWithMessage:(GPBMessage *)message - error:(NSError **)errorPtr { - return [self anyWithMessage:message - typeURLPrefix:kTypePrefixGoogleApisCom - error:errorPtr]; -} - -+ (instancetype)anyWithMessage:(GPBMessage *)message - typeURLPrefix:(NSString *)typeURLPrefix - error:(NSError **)errorPtr { - return [[[self alloc] initWithMessage:message - typeURLPrefix:typeURLPrefix - error:errorPtr] autorelease]; -} - -- (instancetype)initWithMessage:(GPBMessage *)message - error:(NSError **)errorPtr { - return [self initWithMessage:message - typeURLPrefix:kTypePrefixGoogleApisCom - error:errorPtr]; -} - -- (instancetype)initWithMessage:(GPBMessage *)message - typeURLPrefix:(NSString *)typeURLPrefix - error:(NSError **)errorPtr { - self = [self init]; - if (self) { - if (![self packWithMessage:message - typeURLPrefix:typeURLPrefix - error:errorPtr]) { - [self release]; - self = nil; - } - } - return self; -} - -- (BOOL)packWithMessage:(GPBMessage *)message - error:(NSError **)errorPtr { - return [self packWithMessage:message - typeURLPrefix:kTypePrefixGoogleApisCom - error:errorPtr]; -} - -- (BOOL)packWithMessage:(GPBMessage *)message - typeURLPrefix:(NSString *)typeURLPrefix - error:(NSError **)errorPtr { - NSString *fullName = [message descriptor].fullName; - if (fullName.length == 0) { - if (errorPtr) { - *errorPtr = - [NSError errorWithDomain:GPBWellKnownTypesErrorDomain - code:GPBWellKnownTypesErrorCodeFailedToComputeTypeURL - userInfo:nil]; - } - return NO; - } - if (errorPtr) { - *errorPtr = nil; - } - self.typeURL = BuildTypeURL(typeURLPrefix, fullName); - self.value = message.data; - return YES; -} - -- (GPBMessage *)unpackMessageClass:(Class)messageClass - error:(NSError **)errorPtr { - NSString *fullName = [messageClass descriptor].fullName; - if (fullName.length == 0) { - if (errorPtr) { - *errorPtr = - [NSError errorWithDomain:GPBWellKnownTypesErrorDomain - code:GPBWellKnownTypesErrorCodeFailedToComputeTypeURL - userInfo:nil]; - } - return nil; - } - - NSString *expectedFullName = ParseTypeFromURL(self.typeURL); - if ((expectedFullName == nil) || ![expectedFullName isEqual:fullName]) { - if (errorPtr) { - *errorPtr = - [NSError errorWithDomain:GPBWellKnownTypesErrorDomain - code:GPBWellKnownTypesErrorCodeTypeURLMismatch - userInfo:nil]; - } - return nil; - } - - // Any is proto3, which means no extensions, so this assumes anything put - // within an any also won't need extensions. A second helper could be added - // if needed. - return [messageClass parseFromData:self.value - error:errorPtr]; -} - -@end diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBWireFormat.h b/Old My Mind/Pods/Protobuf/objectivec/GPBWireFormat.h deleted file mode 100755 index c5941a3..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBWireFormat.h +++ /dev/null @@ -1,73 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBRuntimeTypes.h" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -typedef enum { - GPBWireFormatVarint = 0, - GPBWireFormatFixed64 = 1, - GPBWireFormatLengthDelimited = 2, - GPBWireFormatStartGroup = 3, - GPBWireFormatEndGroup = 4, - GPBWireFormatFixed32 = 5, -} GPBWireFormat; - -enum { - GPBWireFormatMessageSetItem = 1, - GPBWireFormatMessageSetTypeId = 2, - GPBWireFormatMessageSetMessage = 3 -}; - -uint32_t GPBWireFormatMakeTag(uint32_t fieldNumber, GPBWireFormat wireType) - __attribute__((const)); -GPBWireFormat GPBWireFormatGetTagWireType(uint32_t tag) __attribute__((const)); -uint32_t GPBWireFormatGetTagFieldNumber(uint32_t tag) __attribute__((const)); -BOOL GPBWireFormatIsValidTag(uint32_t tag) __attribute__((const)); - -GPBWireFormat GPBWireFormatForType(GPBDataType dataType, BOOL isPacked) - __attribute__((const)); - -#define GPBWireFormatMessageSetItemTag \ - (GPBWireFormatMakeTag(GPBWireFormatMessageSetItem, GPBWireFormatStartGroup)) -#define GPBWireFormatMessageSetItemEndTag \ - (GPBWireFormatMakeTag(GPBWireFormatMessageSetItem, GPBWireFormatEndGroup)) -#define GPBWireFormatMessageSetTypeIdTag \ - (GPBWireFormatMakeTag(GPBWireFormatMessageSetTypeId, GPBWireFormatVarint)) -#define GPBWireFormatMessageSetMessageTag \ - (GPBWireFormatMakeTag(GPBWireFormatMessageSetMessage, \ - GPBWireFormatLengthDelimited)) - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END diff --git a/Old My Mind/Pods/Protobuf/objectivec/GPBWireFormat.m b/Old My Mind/Pods/Protobuf/objectivec/GPBWireFormat.m deleted file mode 100755 index 860a339..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/GPBWireFormat.m +++ /dev/null @@ -1,85 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBWireFormat.h" - -#import "GPBUtilities_PackagePrivate.h" - -enum { - GPBWireFormatTagTypeBits = 3, - GPBWireFormatTagTypeMask = 7 /* = (1 << GPBWireFormatTagTypeBits) - 1 */, -}; - -uint32_t GPBWireFormatMakeTag(uint32_t fieldNumber, GPBWireFormat wireType) { - return (fieldNumber << GPBWireFormatTagTypeBits) | wireType; -} - -GPBWireFormat GPBWireFormatGetTagWireType(uint32_t tag) { - return (GPBWireFormat)(tag & GPBWireFormatTagTypeMask); -} - -uint32_t GPBWireFormatGetTagFieldNumber(uint32_t tag) { - return GPBLogicalRightShift32(tag, GPBWireFormatTagTypeBits); -} - -BOOL GPBWireFormatIsValidTag(uint32_t tag) { - uint32_t formatBits = (tag & GPBWireFormatTagTypeMask); - // The valid GPBWireFormat* values are 0-5, anything else is not a valid tag. - BOOL result = (formatBits <= 5); - return result; -} - -GPBWireFormat GPBWireFormatForType(GPBDataType type, BOOL isPacked) { - if (isPacked) { - return GPBWireFormatLengthDelimited; - } - - static const GPBWireFormat format[GPBDataType_Count] = { - GPBWireFormatVarint, // GPBDataTypeBool - GPBWireFormatFixed32, // GPBDataTypeFixed32 - GPBWireFormatFixed32, // GPBDataTypeSFixed32 - GPBWireFormatFixed32, // GPBDataTypeFloat - GPBWireFormatFixed64, // GPBDataTypeFixed64 - GPBWireFormatFixed64, // GPBDataTypeSFixed64 - GPBWireFormatFixed64, // GPBDataTypeDouble - GPBWireFormatVarint, // GPBDataTypeInt32 - GPBWireFormatVarint, // GPBDataTypeInt64 - GPBWireFormatVarint, // GPBDataTypeSInt32 - GPBWireFormatVarint, // GPBDataTypeSInt64 - GPBWireFormatVarint, // GPBDataTypeUInt32 - GPBWireFormatVarint, // GPBDataTypeUInt64 - GPBWireFormatLengthDelimited, // GPBDataTypeBytes - GPBWireFormatLengthDelimited, // GPBDataTypeString - GPBWireFormatLengthDelimited, // GPBDataTypeMessage - GPBWireFormatStartGroup, // GPBDataTypeGroup - GPBWireFormatVarint // GPBDataTypeEnum - }; - return format[type]; -} diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.h b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.h deleted file mode 100755 index d236e4b..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.h +++ /dev/null @@ -1,163 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/any.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBAnyRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBAnyRoot : GPBRootObject -@end - -#pragma mark - GPBAny - -typedef GPB_ENUM(GPBAny_FieldNumber) { - GPBAny_FieldNumber_TypeURL = 1, - GPBAny_FieldNumber_Value = 2, -}; - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `\@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "\@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `\@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "\@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - **/ -@interface GPBAny : GPBMessage - -/** - * A URL/resource name whose content describes the type of the - * serialized protocol buffer message. - * - * For URLs which use the scheme `http`, `https`, or no scheme, the - * following restrictions and interpretations apply: - * - * * If no scheme is provided, `https` is assumed. - * * The last segment of the URL's path must represent the fully - * qualified name of the type (as in `path/google.protobuf.Duration`). - * The name should be in a canonical form (e.g., leading "." is - * not accepted). - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL; - -/** Must be a valid serialized protocol buffer of the above specified type. */ -@property(nonatomic, readwrite, copy, null_resettable) NSData *value; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.m b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.m deleted file mode 100755 index d210643..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.m +++ /dev/null @@ -1,112 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/any.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers_RuntimeSupport.h" -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "google/protobuf/Any.pbobjc.h" -#endif -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -#pragma mark - GPBAnyRoot - -@implementation GPBAnyRoot - -// No extensions in the file and no imports, so no need to generate -// +extensionRegistry. - -@end - -#pragma mark - GPBAnyRoot_FileDescriptor - -static GPBFileDescriptor *GPBAnyRoot_FileDescriptor(void) { - // This is called by +initialize so there is no need to worry - // about thread safety of the singleton. - static GPBFileDescriptor *descriptor = NULL; - if (!descriptor) { - GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" - objcPrefix:@"GPB" - syntax:GPBFileSyntaxProto3]; - } - return descriptor; -} - -#pragma mark - GPBAny - -@implementation GPBAny - -@dynamic typeURL; -@dynamic value; - -typedef struct GPBAny__storage_ { - uint32_t _has_storage_[1]; - NSString *typeURL; - NSData *value; -} GPBAny__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "typeURL", - .dataTypeSpecific.className = NULL, - .number = GPBAny_FieldNumber_TypeURL, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBAny__storage_, typeURL), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom), - .dataType = GPBDataTypeString, - }, - { - .name = "value", - .dataTypeSpecific.className = NULL, - .number = GPBAny_FieldNumber_Value, - .hasIndex = 1, - .offset = (uint32_t)offsetof(GPBAny__storage_, value), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeBytes, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBAny class] - rootClass:[GPBAnyRoot class] - file:GPBAnyRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBAny__storage_) - flags:GPBDescriptorInitializationFlag_None]; -#if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS - static const char *extraTextFormatInfo = - "\001\001\004\241!!\000"; - [localDescriptor setupExtraTextInfo:extraTextFormatInfo]; -#endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.h b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.h deleted file mode 100755 index 742a812..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.h +++ /dev/null @@ -1,299 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/api.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -@class GPBMethod; -@class GPBMixin; -@class GPBOption; -@class GPBSourceContext; -GPB_ENUM_FWD_DECLARE(GPBSyntax); - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBApiRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBApiRoot : GPBRootObject -@end - -#pragma mark - GPBApi - -typedef GPB_ENUM(GPBApi_FieldNumber) { - GPBApi_FieldNumber_Name = 1, - GPBApi_FieldNumber_MethodsArray = 2, - GPBApi_FieldNumber_OptionsArray = 3, - GPBApi_FieldNumber_Version = 4, - GPBApi_FieldNumber_SourceContext = 5, - GPBApi_FieldNumber_MixinsArray = 6, - GPBApi_FieldNumber_Syntax = 7, -}; - -/** - * Api is a light-weight descriptor for a protocol buffer service. - **/ -@interface GPBApi : GPBMessage - -/** - * The fully qualified name of this api, including package name - * followed by the api's simple name. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** The methods of this api, in unspecified order. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *methodsArray; -/** The number of items in @c methodsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger methodsArray_Count; - -/** Any metadata attached to the API. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -/** - * A version string for this api. If specified, must have the form - * `major-version.minor-version`, as in `1.10`. If the minor version - * is omitted, it defaults to zero. If the entire version field is - * empty, the major version is derived from the package name, as - * outlined below. If the field is not empty, the version in the - * package name will be verified to be consistent with what is - * provided here. - * - * The versioning schema uses [semantic - * versioning](http://semver.org) where the major version number - * indicates a breaking change and the minor version an additive, - * non-breaking change. Both version numbers are signals to users - * what to expect from different versions, and should be carefully - * chosen based on the product plan. - * - * The major version is also reflected in the package name of the - * API, which must end in `v`, as in - * `google.feature.v1`. For major versions 0 and 1, the suffix can - * be omitted. Zero major versions must only be used for - * experimental, none-GA apis. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *version; - -/** - * Source context for the protocol buffer service represented by this - * message. - **/ -@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext; -/** Test to see if @c sourceContext has been set. */ -@property(nonatomic, readwrite) BOOL hasSourceContext; - -/** Included APIs. See [Mixin][]. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *mixinsArray; -/** The number of items in @c mixinsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger mixinsArray_Count; - -/** The source syntax of the service. */ -@property(nonatomic, readwrite) enum GPBSyntax syntax; - -@end - -/** - * Fetches the raw value of a @c GPBApi's @c syntax property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBApi_Syntax_RawValue(GPBApi *message); -/** - * Sets the raw value of an @c GPBApi's @c syntax property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value); - -#pragma mark - GPBMethod - -typedef GPB_ENUM(GPBMethod_FieldNumber) { - GPBMethod_FieldNumber_Name = 1, - GPBMethod_FieldNumber_RequestTypeURL = 2, - GPBMethod_FieldNumber_RequestStreaming = 3, - GPBMethod_FieldNumber_ResponseTypeURL = 4, - GPBMethod_FieldNumber_ResponseStreaming = 5, - GPBMethod_FieldNumber_OptionsArray = 6, - GPBMethod_FieldNumber_Syntax = 7, -}; - -/** - * Method represents a method of an api. - **/ -@interface GPBMethod : GPBMessage - -/** The simple name of this method. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** A URL of the input message type. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL; - -/** If true, the request is streamed. */ -@property(nonatomic, readwrite) BOOL requestStreaming; - -/** The URL of the output message type. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL; - -/** If true, the response is streamed. */ -@property(nonatomic, readwrite) BOOL responseStreaming; - -/** Any metadata attached to the method. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -/** The source syntax of this method. */ -@property(nonatomic, readwrite) enum GPBSyntax syntax; - -@end - -/** - * Fetches the raw value of a @c GPBMethod's @c syntax property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBMethod_Syntax_RawValue(GPBMethod *message); -/** - * Sets the raw value of an @c GPBMethod's @c syntax property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value); - -#pragma mark - GPBMixin - -typedef GPB_ENUM(GPBMixin_FieldNumber) { - GPBMixin_FieldNumber_Name = 1, - GPBMixin_FieldNumber_Root = 2, -}; - -/** - * Declares an API to be included in this API. The including API must - * redeclare all the methods from the included API, but documentation - * and options are inherited as follows: - * - * - If after comment and whitespace stripping, the documentation - * string of the redeclared method is empty, it will be inherited - * from the original method. - * - * - Each annotation belonging to the service config (http, - * visibility) which is not set in the redeclared method will be - * inherited. - * - * - If an http annotation is inherited, the path pattern will be - * modified as follows. Any version prefix will be replaced by the - * version of the including API plus the [root][] path if specified. - * - * Example of a simple mixin: - * - * package google.acl.v1; - * service AccessControl { - * // Get the underlying ACL object. - * rpc GetAcl(GetAclRequest) returns (Acl) { - * option (google.api.http).get = "/v1/{resource=**}:getAcl"; - * } - * } - * - * package google.storage.v2; - * service Storage { - * rpc GetAcl(GetAclRequest) returns (Acl); - * - * // Get a data record. - * rpc GetData(GetDataRequest) returns (Data) { - * option (google.api.http).get = "/v2/{resource=**}"; - * } - * } - * - * Example of a mixin configuration: - * - * apis: - * - name: google.storage.v2.Storage - * mixins: - * - name: google.acl.v1.AccessControl - * - * The mixin construct implies that all methods in `AccessControl` are - * also declared with same name and request/response types in - * `Storage`. A documentation generator or annotation processor will - * see the effective `Storage.GetAcl` method after inherting - * documentation and annotations as follows: - * - * service Storage { - * // Get the underlying ACL object. - * rpc GetAcl(GetAclRequest) returns (Acl) { - * option (google.api.http).get = "/v2/{resource=**}:getAcl"; - * } - * ... - * } - * - * Note how the version in the path pattern changed from `v1` to `v2`. - * - * If the `root` field in the mixin is specified, it should be a - * relative path under which inherited HTTP paths are placed. Example: - * - * apis: - * - name: google.storage.v2.Storage - * mixins: - * - name: google.acl.v1.AccessControl - * root: acls - * - * This implies the following inherited HTTP annotation: - * - * service Storage { - * // Get the underlying ACL object. - * rpc GetAcl(GetAclRequest) returns (Acl) { - * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; - * } - * ... - * } - **/ -@interface GPBMixin : GPBMessage - -/** The fully qualified name of the API which is included. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** - * If non-empty specifies a path under which inherited HTTP paths - * are rooted. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *root; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.m b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.m deleted file mode 100755 index 58b4715..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.m +++ /dev/null @@ -1,356 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/api.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers_RuntimeSupport.h" -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "google/protobuf/Api.pbobjc.h" - #import "google/protobuf/SourceContext.pbobjc.h" - #import "google/protobuf/Type.pbobjc.h" -#endif -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -#pragma mark - GPBApiRoot - -@implementation GPBApiRoot - -// No extensions in the file and none of the imports (direct or indirect) -// defined extensions, so no need to generate +extensionRegistry. - -@end - -#pragma mark - GPBApiRoot_FileDescriptor - -static GPBFileDescriptor *GPBApiRoot_FileDescriptor(void) { - // This is called by +initialize so there is no need to worry - // about thread safety of the singleton. - static GPBFileDescriptor *descriptor = NULL; - if (!descriptor) { - GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" - objcPrefix:@"GPB" - syntax:GPBFileSyntaxProto3]; - } - return descriptor; -} - -#pragma mark - GPBApi - -@implementation GPBApi - -@dynamic name; -@dynamic methodsArray, methodsArray_Count; -@dynamic optionsArray, optionsArray_Count; -@dynamic version; -@dynamic hasSourceContext, sourceContext; -@dynamic mixinsArray, mixinsArray_Count; -@dynamic syntax; - -typedef struct GPBApi__storage_ { - uint32_t _has_storage_[1]; - GPBSyntax syntax; - NSString *name; - NSMutableArray *methodsArray; - NSMutableArray *optionsArray; - NSString *version; - GPBSourceContext *sourceContext; - NSMutableArray *mixinsArray; -} GPBApi__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "name", - .dataTypeSpecific.className = NULL, - .number = GPBApi_FieldNumber_Name, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBApi__storage_, name), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - { - .name = "methodsArray", - .dataTypeSpecific.className = GPBStringifySymbol(GPBMethod), - .number = GPBApi_FieldNumber_MethodsArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBApi__storage_, methodsArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeMessage, - }, - { - .name = "optionsArray", - .dataTypeSpecific.className = GPBStringifySymbol(GPBOption), - .number = GPBApi_FieldNumber_OptionsArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBApi__storage_, optionsArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeMessage, - }, - { - .name = "version", - .dataTypeSpecific.className = NULL, - .number = GPBApi_FieldNumber_Version, - .hasIndex = 1, - .offset = (uint32_t)offsetof(GPBApi__storage_, version), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - { - .name = "sourceContext", - .dataTypeSpecific.className = GPBStringifySymbol(GPBSourceContext), - .number = GPBApi_FieldNumber_SourceContext, - .hasIndex = 2, - .offset = (uint32_t)offsetof(GPBApi__storage_, sourceContext), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeMessage, - }, - { - .name = "mixinsArray", - .dataTypeSpecific.className = GPBStringifySymbol(GPBMixin), - .number = GPBApi_FieldNumber_MixinsArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBApi__storage_, mixinsArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeMessage, - }, - { - .name = "syntax", - .dataTypeSpecific.enumDescFunc = GPBSyntax_EnumDescriptor, - .number = GPBApi_FieldNumber_Syntax, - .hasIndex = 3, - .offset = (uint32_t)offsetof(GPBApi__storage_, syntax), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), - .dataType = GPBDataTypeEnum, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBApi class] - rootClass:[GPBApiRoot class] - file:GPBApiRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBApi__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -int32_t GPBApi_Syntax_RawValue(GPBApi *message) { - GPBDescriptor *descriptor = [GPBApi descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBApi_FieldNumber_Syntax]; - return GPBGetMessageInt32Field(message, field); -} - -void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value) { - GPBDescriptor *descriptor = [GPBApi descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBApi_FieldNumber_Syntax]; - GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); -} - -#pragma mark - GPBMethod - -@implementation GPBMethod - -@dynamic name; -@dynamic requestTypeURL; -@dynamic requestStreaming; -@dynamic responseTypeURL; -@dynamic responseStreaming; -@dynamic optionsArray, optionsArray_Count; -@dynamic syntax; - -typedef struct GPBMethod__storage_ { - uint32_t _has_storage_[1]; - GPBSyntax syntax; - NSString *name; - NSString *requestTypeURL; - NSString *responseTypeURL; - NSMutableArray *optionsArray; -} GPBMethod__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "name", - .dataTypeSpecific.className = NULL, - .number = GPBMethod_FieldNumber_Name, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBMethod__storage_, name), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - { - .name = "requestTypeURL", - .dataTypeSpecific.className = NULL, - .number = GPBMethod_FieldNumber_RequestTypeURL, - .hasIndex = 1, - .offset = (uint32_t)offsetof(GPBMethod__storage_, requestTypeURL), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom), - .dataType = GPBDataTypeString, - }, - { - .name = "requestStreaming", - .dataTypeSpecific.className = NULL, - .number = GPBMethod_FieldNumber_RequestStreaming, - .hasIndex = 2, - .offset = 3, // Stored in _has_storage_ to save space. - .flags = GPBFieldOptional, - .dataType = GPBDataTypeBool, - }, - { - .name = "responseTypeURL", - .dataTypeSpecific.className = NULL, - .number = GPBMethod_FieldNumber_ResponseTypeURL, - .hasIndex = 4, - .offset = (uint32_t)offsetof(GPBMethod__storage_, responseTypeURL), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom), - .dataType = GPBDataTypeString, - }, - { - .name = "responseStreaming", - .dataTypeSpecific.className = NULL, - .number = GPBMethod_FieldNumber_ResponseStreaming, - .hasIndex = 5, - .offset = 6, // Stored in _has_storage_ to save space. - .flags = GPBFieldOptional, - .dataType = GPBDataTypeBool, - }, - { - .name = "optionsArray", - .dataTypeSpecific.className = GPBStringifySymbol(GPBOption), - .number = GPBMethod_FieldNumber_OptionsArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBMethod__storage_, optionsArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeMessage, - }, - { - .name = "syntax", - .dataTypeSpecific.enumDescFunc = GPBSyntax_EnumDescriptor, - .number = GPBMethod_FieldNumber_Syntax, - .hasIndex = 7, - .offset = (uint32_t)offsetof(GPBMethod__storage_, syntax), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), - .dataType = GPBDataTypeEnum, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBMethod class] - rootClass:[GPBApiRoot class] - file:GPBApiRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBMethod__storage_) - flags:GPBDescriptorInitializationFlag_None]; -#if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS - static const char *extraTextFormatInfo = - "\002\002\007\244\241!!\000\004\010\244\241!!\000"; - [localDescriptor setupExtraTextInfo:extraTextFormatInfo]; -#endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -int32_t GPBMethod_Syntax_RawValue(GPBMethod *message) { - GPBDescriptor *descriptor = [GPBMethod descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBMethod_FieldNumber_Syntax]; - return GPBGetMessageInt32Field(message, field); -} - -void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value) { - GPBDescriptor *descriptor = [GPBMethod descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBMethod_FieldNumber_Syntax]; - GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); -} - -#pragma mark - GPBMixin - -@implementation GPBMixin - -@dynamic name; -@dynamic root; - -typedef struct GPBMixin__storage_ { - uint32_t _has_storage_[1]; - NSString *name; - NSString *root; -} GPBMixin__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "name", - .dataTypeSpecific.className = NULL, - .number = GPBMixin_FieldNumber_Name, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBMixin__storage_, name), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - { - .name = "root", - .dataTypeSpecific.className = NULL, - .number = GPBMixin_FieldNumber_Root, - .hasIndex = 1, - .offset = (uint32_t)offsetof(GPBMixin__storage_, root), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBMixin class] - rootClass:[GPBApiRoot class] - file:GPBApiRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBMixin__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Duration.pbobjc.h b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Duration.pbobjc.h deleted file mode 100755 index e70138a..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Duration.pbobjc.h +++ /dev/null @@ -1,128 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/duration.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBDurationRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBDurationRoot : GPBRootObject -@end - -#pragma mark - GPBDuration - -typedef GPB_ENUM(GPBDuration_FieldNumber) { - GPBDuration_FieldNumber_Seconds = 1, - GPBDuration_FieldNumber_Nanos = 2, -}; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - **/ -@interface GPBDuration : GPBMessage - -/** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. - **/ -@property(nonatomic, readwrite) int64_t seconds; - -/** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - **/ -@property(nonatomic, readwrite) int32_t nanos; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Duration.pbobjc.m b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Duration.pbobjc.m deleted file mode 100755 index bafb64a..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Duration.pbobjc.m +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/duration.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers_RuntimeSupport.h" -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "google/protobuf/Duration.pbobjc.h" -#endif -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -#pragma mark - GPBDurationRoot - -@implementation GPBDurationRoot - -// No extensions in the file and no imports, so no need to generate -// +extensionRegistry. - -@end - -#pragma mark - GPBDurationRoot_FileDescriptor - -static GPBFileDescriptor *GPBDurationRoot_FileDescriptor(void) { - // This is called by +initialize so there is no need to worry - // about thread safety of the singleton. - static GPBFileDescriptor *descriptor = NULL; - if (!descriptor) { - GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" - objcPrefix:@"GPB" - syntax:GPBFileSyntaxProto3]; - } - return descriptor; -} - -#pragma mark - GPBDuration - -@implementation GPBDuration - -@dynamic seconds; -@dynamic nanos; - -typedef struct GPBDuration__storage_ { - uint32_t _has_storage_[1]; - int32_t nanos; - int64_t seconds; -} GPBDuration__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "seconds", - .dataTypeSpecific.className = NULL, - .number = GPBDuration_FieldNumber_Seconds, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBDuration__storage_, seconds), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeInt64, - }, - { - .name = "nanos", - .dataTypeSpecific.className = NULL, - .number = GPBDuration_FieldNumber_Nanos, - .hasIndex = 1, - .offset = (uint32_t)offsetof(GPBDuration__storage_, nanos), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeInt32, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBDuration class] - rootClass:[GPBDurationRoot class] - file:GPBDurationRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBDuration__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Empty.pbobjc.h b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Empty.pbobjc.h deleted file mode 100755 index bd49cfd..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Empty.pbobjc.h +++ /dev/null @@ -1,70 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/empty.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBEmptyRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBEmptyRoot : GPBRootObject -@end - -#pragma mark - GPBEmpty - -/** - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - **/ -@interface GPBEmpty : GPBMessage - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Empty.pbobjc.m b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Empty.pbobjc.m deleted file mode 100755 index 506b500..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Empty.pbobjc.m +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/empty.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers_RuntimeSupport.h" -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "google/protobuf/Empty.pbobjc.h" -#endif -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -#pragma mark - GPBEmptyRoot - -@implementation GPBEmptyRoot - -// No extensions in the file and no imports, so no need to generate -// +extensionRegistry. - -@end - -#pragma mark - GPBEmptyRoot_FileDescriptor - -static GPBFileDescriptor *GPBEmptyRoot_FileDescriptor(void) { - // This is called by +initialize so there is no need to worry - // about thread safety of the singleton. - static GPBFileDescriptor *descriptor = NULL; - if (!descriptor) { - GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" - objcPrefix:@"GPB" - syntax:GPBFileSyntaxProto3]; - } - return descriptor; -} - -#pragma mark - GPBEmpty - -@implementation GPBEmpty - - -typedef struct GPBEmpty__storage_ { - uint32_t _has_storage_[1]; -} GPBEmpty__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBEmpty class] - rootClass:[GPBEmptyRoot class] - file:GPBEmptyRoot_FileDescriptor() - fields:NULL - fieldCount:0 - storageSize:sizeof(GPBEmpty__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.h b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.h deleted file mode 100755 index 07e6081..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.h +++ /dev/null @@ -1,271 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/field_mask.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBFieldMaskRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBFieldMaskRoot : GPBRootObject -@end - -#pragma mark - GPBFieldMask - -typedef GPB_ENUM(GPBFieldMask_FieldNumber) { - GPBFieldMask_FieldNumber_PathsArray = 1, -}; - -/** - * `FieldMask` represents a set of symbolic field paths, for example: - * - * paths: "f.a" - * paths: "f.b.d" - * - * Here `f` represents a field in some root message, `a` and `b` - * fields in the message found in `f`, and `d` a field found in the - * message in `f.b`. - * - * Field masks are used to specify a subset of fields that should be - * returned by a get operation or modified by an update operation. - * Field masks also have a custom JSON encoding (see below). - * - * # Field Masks in Projections - * - * When used in the context of a projection, a response message or - * sub-message is filtered by the API to only contain those fields as - * specified in the mask. For example, if the mask in the previous - * example is applied to a response message as follows: - * - * f { - * a : 22 - * b { - * d : 1 - * x : 2 - * } - * y : 13 - * } - * z: 8 - * - * The result will not contain specific values for fields x,y and z - * (their value will be set to the default, and omitted in proto text - * output): - * - * - * f { - * a : 22 - * b { - * d : 1 - * } - * } - * - * A repeated field is not allowed except at the last position of a - * paths string. - * - * If a FieldMask object is not present in a get operation, the - * operation applies to all fields (as if a FieldMask of all fields - * had been specified). - * - * Note that a field mask does not necessarily apply to the - * top-level response message. In case of a REST get operation, the - * field mask applies directly to the response, but in case of a REST - * list operation, the mask instead applies to each individual message - * in the returned resource list. In case of a REST custom method, - * other definitions may be used. Where the mask applies will be - * clearly documented together with its declaration in the API. In - * any case, the effect on the returned resource/resources is required - * behavior for APIs. - * - * # Field Masks in Update Operations - * - * A field mask in update operations specifies which fields of the - * targeted resource are going to be updated. The API is required - * to only change the values of the fields as specified in the mask - * and leave the others untouched. If a resource is passed in to - * describe the updated values, the API ignores the values of all - * fields not covered by the mask. - * - * If a repeated field is specified for an update operation, the existing - * repeated values in the target resource will be overwritten by the new values. - * Note that a repeated field is only allowed in the last position of a `paths` - * string. - * - * If a sub-message is specified in the last position of the field mask for an - * update operation, then the existing sub-message in the target resource is - * overwritten. Given the target message: - * - * f { - * b { - * d : 1 - * x : 2 - * } - * c : 1 - * } - * - * And an update message: - * - * f { - * b { - * d : 10 - * } - * } - * - * then if the field mask is: - * - * paths: "f.b" - * - * then the result will be: - * - * f { - * b { - * d : 10 - * } - * c : 1 - * } - * - * However, if the update mask was: - * - * paths: "f.b.d" - * - * then the result would be: - * - * f { - * b { - * d : 10 - * x : 2 - * } - * c : 1 - * } - * - * In order to reset a field's value to the default, the field must - * be in the mask and set to the default value in the provided resource. - * Hence, in order to reset all fields of a resource, provide a default - * instance of the resource and set all fields in the mask, or do - * not provide a mask as described below. - * - * If a field mask is not present on update, the operation applies to - * all fields (as if a field mask of all fields has been specified). - * Note that in the presence of schema evolution, this may mean that - * fields the client does not know and has therefore not filled into - * the request will be reset to their default. If this is unwanted - * behavior, a specific service may require a client to always specify - * a field mask, producing an error if not. - * - * As with get operations, the location of the resource which - * describes the updated values in the request message depends on the - * operation kind. In any case, the effect of the field mask is - * required to be honored by the API. - * - * ## Considerations for HTTP REST - * - * The HTTP kind of an update operation which uses a field mask must - * be set to PATCH instead of PUT in order to satisfy HTTP semantics - * (PUT must only be used for full updates). - * - * # JSON Encoding of Field Masks - * - * In JSON, a field mask is encoded as a single string where paths are - * separated by a comma. Fields name in each path are converted - * to/from lower-camel naming conventions. - * - * As an example, consider the following message declarations: - * - * message Profile { - * User user = 1; - * Photo photo = 2; - * } - * message User { - * string display_name = 1; - * string address = 2; - * } - * - * In proto a field mask for `Profile` may look as such: - * - * mask { - * paths: "user.display_name" - * paths: "photo" - * } - * - * In JSON, the same mask is represented as below: - * - * { - * mask: "user.displayName,photo" - * } - * - * # Field Masks and Oneof Fields - * - * Field masks treat fields in oneofs just as regular fields. Consider the - * following message: - * - * message SampleMessage { - * oneof test_oneof { - * string name = 4; - * SubMessage sub_message = 9; - * } - * } - * - * The field mask can be: - * - * mask { - * paths: "name" - * } - * - * Or: - * - * mask { - * paths: "sub_message" - * } - * - * Note that oneof type names ("test_oneof" in this case) cannot be used in - * paths. - **/ -@interface GPBFieldMask : GPBMessage - -/** The set of field mask paths. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *pathsArray; -/** The number of items in @c pathsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger pathsArray_Count; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.m b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.m deleted file mode 100755 index b0915af..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.m +++ /dev/null @@ -1,96 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/field_mask.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers_RuntimeSupport.h" -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "google/protobuf/FieldMask.pbobjc.h" -#endif -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -#pragma mark - GPBFieldMaskRoot - -@implementation GPBFieldMaskRoot - -// No extensions in the file and no imports, so no need to generate -// +extensionRegistry. - -@end - -#pragma mark - GPBFieldMaskRoot_FileDescriptor - -static GPBFileDescriptor *GPBFieldMaskRoot_FileDescriptor(void) { - // This is called by +initialize so there is no need to worry - // about thread safety of the singleton. - static GPBFileDescriptor *descriptor = NULL; - if (!descriptor) { - GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" - objcPrefix:@"GPB" - syntax:GPBFileSyntaxProto3]; - } - return descriptor; -} - -#pragma mark - GPBFieldMask - -@implementation GPBFieldMask - -@dynamic pathsArray, pathsArray_Count; - -typedef struct GPBFieldMask__storage_ { - uint32_t _has_storage_[1]; - NSMutableArray *pathsArray; -} GPBFieldMask__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "pathsArray", - .dataTypeSpecific.className = NULL, - .number = GPBFieldMask_FieldNumber_PathsArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBFieldMask__storage_, pathsArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeString, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBFieldMask class] - rootClass:[GPBFieldMaskRoot class] - file:GPBFieldMaskRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBFieldMask__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/SourceContext.pbobjc.h b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/SourceContext.pbobjc.h deleted file mode 100755 index 799d190..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/SourceContext.pbobjc.h +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/source_context.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBSourceContextRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBSourceContextRoot : GPBRootObject -@end - -#pragma mark - GPBSourceContext - -typedef GPB_ENUM(GPBSourceContext_FieldNumber) { - GPBSourceContext_FieldNumber_FileName = 1, -}; - -/** - * `SourceContext` represents information about the source of a - * protobuf element, like the file in which it is defined. - **/ -@interface GPBSourceContext : GPBMessage - -/** - * The path-qualified name of the .proto file that contained the associated - * protobuf element. For example: `"google/protobuf/source_context.proto"`. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *fileName; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/SourceContext.pbobjc.m b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/SourceContext.pbobjc.m deleted file mode 100755 index 83bfa34..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/SourceContext.pbobjc.m +++ /dev/null @@ -1,96 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/source_context.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers_RuntimeSupport.h" -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "google/protobuf/SourceContext.pbobjc.h" -#endif -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -#pragma mark - GPBSourceContextRoot - -@implementation GPBSourceContextRoot - -// No extensions in the file and no imports, so no need to generate -// +extensionRegistry. - -@end - -#pragma mark - GPBSourceContextRoot_FileDescriptor - -static GPBFileDescriptor *GPBSourceContextRoot_FileDescriptor(void) { - // This is called by +initialize so there is no need to worry - // about thread safety of the singleton. - static GPBFileDescriptor *descriptor = NULL; - if (!descriptor) { - GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" - objcPrefix:@"GPB" - syntax:GPBFileSyntaxProto3]; - } - return descriptor; -} - -#pragma mark - GPBSourceContext - -@implementation GPBSourceContext - -@dynamic fileName; - -typedef struct GPBSourceContext__storage_ { - uint32_t _has_storage_[1]; - NSString *fileName; -} GPBSourceContext__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "fileName", - .dataTypeSpecific.className = NULL, - .number = GPBSourceContext_FieldNumber_FileName, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBSourceContext__storage_, fileName), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBSourceContext class] - rootClass:[GPBSourceContextRoot class] - file:GPBSourceContextRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBSourceContext__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Struct.pbobjc.h b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Struct.pbobjc.h deleted file mode 100755 index 3fc80ca..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Struct.pbobjc.h +++ /dev/null @@ -1,200 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/struct.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -@class GPBListValue; -@class GPBStruct; -@class GPBValue; - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - Enum GPBNullValue - -/** - * `NullValue` is a singleton enumeration to represent the null value for the - * `Value` type union. - * - * The JSON representation for `NullValue` is JSON `null`. - **/ -typedef GPB_ENUM(GPBNullValue) { - /** - * Value used if any message's field encounters a value that is not defined - * by this enum. The message will also have C functions to get/set the rawValue - * of the field. - **/ - GPBNullValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, - /** Null value. */ - GPBNullValue_NullValue = 0, -}; - -GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void); - -/** - * Checks to see if the given value is defined by the enum or was not known at - * the time this source was generated. - **/ -BOOL GPBNullValue_IsValidValue(int32_t value); - -#pragma mark - GPBStructRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBStructRoot : GPBRootObject -@end - -#pragma mark - GPBStruct - -typedef GPB_ENUM(GPBStruct_FieldNumber) { - GPBStruct_FieldNumber_Fields = 1, -}; - -/** - * `Struct` represents a structured data value, consisting of fields - * which map to dynamically typed values. In some languages, `Struct` - * might be supported by a native representation. For example, in - * scripting languages like JS a struct is represented as an - * object. The details of that representation are described together - * with the proto support for the language. - * - * The JSON representation for `Struct` is JSON object. - **/ -@interface GPBStruct : GPBMessage - -/** Unordered map of dynamically typed values. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary *fields; -/** The number of items in @c fields without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger fields_Count; - -@end - -#pragma mark - GPBValue - -typedef GPB_ENUM(GPBValue_FieldNumber) { - GPBValue_FieldNumber_NullValue = 1, - GPBValue_FieldNumber_NumberValue = 2, - GPBValue_FieldNumber_StringValue = 3, - GPBValue_FieldNumber_BoolValue = 4, - GPBValue_FieldNumber_StructValue = 5, - GPBValue_FieldNumber_ListValue = 6, -}; - -typedef GPB_ENUM(GPBValue_Kind_OneOfCase) { - GPBValue_Kind_OneOfCase_GPBUnsetOneOfCase = 0, - GPBValue_Kind_OneOfCase_NullValue = 1, - GPBValue_Kind_OneOfCase_NumberValue = 2, - GPBValue_Kind_OneOfCase_StringValue = 3, - GPBValue_Kind_OneOfCase_BoolValue = 4, - GPBValue_Kind_OneOfCase_StructValue = 5, - GPBValue_Kind_OneOfCase_ListValue = 6, -}; - -/** - * `Value` represents a dynamically typed value which can be either - * null, a number, a string, a boolean, a recursive struct value, or a - * list of values. A producer of value is expected to set one of that - * variants, absence of any variant indicates an error. - * - * The JSON representation for `Value` is JSON value. - **/ -@interface GPBValue : GPBMessage - -/** The kind of value. */ -@property(nonatomic, readonly) GPBValue_Kind_OneOfCase kindOneOfCase; - -/** Represents a null value. */ -@property(nonatomic, readwrite) GPBNullValue nullValue; - -/** Represents a double value. */ -@property(nonatomic, readwrite) double numberValue; - -/** Represents a string value. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *stringValue; - -/** Represents a boolean value. */ -@property(nonatomic, readwrite) BOOL boolValue; - -/** Represents a structured value. */ -@property(nonatomic, readwrite, strong, null_resettable) GPBStruct *structValue; - -/** Represents a repeated `Value`. */ -@property(nonatomic, readwrite, strong, null_resettable) GPBListValue *listValue; - -@end - -/** - * Fetches the raw value of a @c GPBValue's @c nullValue property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBValue_NullValue_RawValue(GPBValue *message); -/** - * Sets the raw value of an @c GPBValue's @c nullValue property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value); - -/** - * Clears whatever value was set for the oneof 'kind'. - **/ -void GPBValue_ClearKindOneOfCase(GPBValue *message); - -#pragma mark - GPBListValue - -typedef GPB_ENUM(GPBListValue_FieldNumber) { - GPBListValue_FieldNumber_ValuesArray = 1, -}; - -/** - * `ListValue` is a wrapper around a repeated field of values. - * - * The JSON representation for `ListValue` is JSON array. - **/ -@interface GPBListValue : GPBMessage - -/** Repeated field of dynamically typed values. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *valuesArray; -/** The number of items in @c valuesArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger valuesArray_Count; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Struct.pbobjc.m b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Struct.pbobjc.m deleted file mode 100755 index f36ec58..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Struct.pbobjc.m +++ /dev/null @@ -1,293 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/struct.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers_RuntimeSupport.h" -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "google/protobuf/Struct.pbobjc.h" -#endif -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -#pragma mark - GPBStructRoot - -@implementation GPBStructRoot - -// No extensions in the file and no imports, so no need to generate -// +extensionRegistry. - -@end - -#pragma mark - GPBStructRoot_FileDescriptor - -static GPBFileDescriptor *GPBStructRoot_FileDescriptor(void) { - // This is called by +initialize so there is no need to worry - // about thread safety of the singleton. - static GPBFileDescriptor *descriptor = NULL; - if (!descriptor) { - GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" - objcPrefix:@"GPB" - syntax:GPBFileSyntaxProto3]; - } - return descriptor; -} - -#pragma mark - Enum GPBNullValue - -GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void) { - static GPBEnumDescriptor *descriptor = NULL; - if (!descriptor) { - static const char *valueNames = - "NullValue\000"; - static const int32_t values[] = { - GPBNullValue_NullValue, - }; - GPBEnumDescriptor *worker = - [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBNullValue) - valueNames:valueNames - values:values - count:(uint32_t)(sizeof(values) / sizeof(int32_t)) - enumVerifier:GPBNullValue_IsValidValue]; - if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) { - [worker release]; - } - } - return descriptor; -} - -BOOL GPBNullValue_IsValidValue(int32_t value__) { - switch (value__) { - case GPBNullValue_NullValue: - return YES; - default: - return NO; - } -} - -#pragma mark - GPBStruct - -@implementation GPBStruct - -@dynamic fields, fields_Count; - -typedef struct GPBStruct__storage_ { - uint32_t _has_storage_[1]; - NSMutableDictionary *fields; -} GPBStruct__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "fields", - .dataTypeSpecific.className = GPBStringifySymbol(GPBValue), - .number = GPBStruct_FieldNumber_Fields, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBStruct__storage_, fields), - .flags = GPBFieldMapKeyString, - .dataType = GPBDataTypeMessage, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBStruct class] - rootClass:[GPBStructRoot class] - file:GPBStructRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBStruct__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -#pragma mark - GPBValue - -@implementation GPBValue - -@dynamic kindOneOfCase; -@dynamic nullValue; -@dynamic numberValue; -@dynamic stringValue; -@dynamic boolValue; -@dynamic structValue; -@dynamic listValue; - -typedef struct GPBValue__storage_ { - uint32_t _has_storage_[2]; - GPBNullValue nullValue; - NSString *stringValue; - GPBStruct *structValue; - GPBListValue *listValue; - double numberValue; -} GPBValue__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "nullValue", - .dataTypeSpecific.enumDescFunc = GPBNullValue_EnumDescriptor, - .number = GPBValue_FieldNumber_NullValue, - .hasIndex = -1, - .offset = (uint32_t)offsetof(GPBValue__storage_, nullValue), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), - .dataType = GPBDataTypeEnum, - }, - { - .name = "numberValue", - .dataTypeSpecific.className = NULL, - .number = GPBValue_FieldNumber_NumberValue, - .hasIndex = -1, - .offset = (uint32_t)offsetof(GPBValue__storage_, numberValue), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeDouble, - }, - { - .name = "stringValue", - .dataTypeSpecific.className = NULL, - .number = GPBValue_FieldNumber_StringValue, - .hasIndex = -1, - .offset = (uint32_t)offsetof(GPBValue__storage_, stringValue), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - { - .name = "boolValue", - .dataTypeSpecific.className = NULL, - .number = GPBValue_FieldNumber_BoolValue, - .hasIndex = -1, - .offset = 0, // Stored in _has_storage_ to save space. - .flags = GPBFieldOptional, - .dataType = GPBDataTypeBool, - }, - { - .name = "structValue", - .dataTypeSpecific.className = GPBStringifySymbol(GPBStruct), - .number = GPBValue_FieldNumber_StructValue, - .hasIndex = -1, - .offset = (uint32_t)offsetof(GPBValue__storage_, structValue), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeMessage, - }, - { - .name = "listValue", - .dataTypeSpecific.className = GPBStringifySymbol(GPBListValue), - .number = GPBValue_FieldNumber_ListValue, - .hasIndex = -1, - .offset = (uint32_t)offsetof(GPBValue__storage_, listValue), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeMessage, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBValue class] - rootClass:[GPBStructRoot class] - file:GPBStructRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBValue__storage_) - flags:GPBDescriptorInitializationFlag_None]; - static const char *oneofs[] = { - "kind", - }; - [localDescriptor setupOneofs:oneofs - count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) - firstHasIndex:-1]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -int32_t GPBValue_NullValue_RawValue(GPBValue *message) { - GPBDescriptor *descriptor = [GPBValue descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue]; - return GPBGetMessageInt32Field(message, field); -} - -void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value) { - GPBDescriptor *descriptor = [GPBValue descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue]; - GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); -} - -void GPBValue_ClearKindOneOfCase(GPBValue *message) { - GPBDescriptor *descriptor = [message descriptor]; - GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; - GPBMaybeClearOneof(message, oneof, -1, 0); -} -#pragma mark - GPBListValue - -@implementation GPBListValue - -@dynamic valuesArray, valuesArray_Count; - -typedef struct GPBListValue__storage_ { - uint32_t _has_storage_[1]; - NSMutableArray *valuesArray; -} GPBListValue__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "valuesArray", - .dataTypeSpecific.className = GPBStringifySymbol(GPBValue), - .number = GPBListValue_FieldNumber_ValuesArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBListValue__storage_, valuesArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeMessage, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBListValue class] - rootClass:[GPBStructRoot class] - file:GPBStructRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBListValue__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Timestamp.pbobjc.h b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Timestamp.pbobjc.h deleted file mode 100755 index 9c83d09..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Timestamp.pbobjc.h +++ /dev/null @@ -1,132 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/timestamp.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBTimestampRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBTimestampRoot : GPBRootObject -@end - -#pragma mark - GPBTimestamp - -typedef GPB_ENUM(GPBTimestamp_FieldNumber) { - GPBTimestamp_FieldNumber_Seconds = 1, - GPBTimestamp_FieldNumber_Nanos = 2, -}; - -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - **/ -@interface GPBTimestamp : GPBMessage - -/** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - **/ -@property(nonatomic, readwrite) int64_t seconds; - -/** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - **/ -@property(nonatomic, readwrite) int32_t nanos; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Timestamp.pbobjc.m b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Timestamp.pbobjc.m deleted file mode 100755 index 4ab159f..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Timestamp.pbobjc.m +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/timestamp.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers_RuntimeSupport.h" -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "google/protobuf/Timestamp.pbobjc.h" -#endif -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -#pragma mark - GPBTimestampRoot - -@implementation GPBTimestampRoot - -// No extensions in the file and no imports, so no need to generate -// +extensionRegistry. - -@end - -#pragma mark - GPBTimestampRoot_FileDescriptor - -static GPBFileDescriptor *GPBTimestampRoot_FileDescriptor(void) { - // This is called by +initialize so there is no need to worry - // about thread safety of the singleton. - static GPBFileDescriptor *descriptor = NULL; - if (!descriptor) { - GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" - objcPrefix:@"GPB" - syntax:GPBFileSyntaxProto3]; - } - return descriptor; -} - -#pragma mark - GPBTimestamp - -@implementation GPBTimestamp - -@dynamic seconds; -@dynamic nanos; - -typedef struct GPBTimestamp__storage_ { - uint32_t _has_storage_[1]; - int32_t nanos; - int64_t seconds; -} GPBTimestamp__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "seconds", - .dataTypeSpecific.className = NULL, - .number = GPBTimestamp_FieldNumber_Seconds, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBTimestamp__storage_, seconds), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeInt64, - }, - { - .name = "nanos", - .dataTypeSpecific.className = NULL, - .number = GPBTimestamp_FieldNumber_Nanos, - .hasIndex = 1, - .offset = (uint32_t)offsetof(GPBTimestamp__storage_, nanos), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeInt32, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBTimestamp class] - rootClass:[GPBTimestampRoot class] - file:GPBTimestampRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBTimestamp__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.h b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.h deleted file mode 100755 index 1798697..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.h +++ /dev/null @@ -1,440 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/type.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -@class GPBAny; -@class GPBEnumValue; -@class GPBField; -@class GPBOption; -@class GPBSourceContext; - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - Enum GPBSyntax - -/** The syntax in which a protocol buffer element is defined. */ -typedef GPB_ENUM(GPBSyntax) { - /** - * Value used if any message's field encounters a value that is not defined - * by this enum. The message will also have C functions to get/set the rawValue - * of the field. - **/ - GPBSyntax_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, - /** Syntax `proto2`. */ - GPBSyntax_SyntaxProto2 = 0, - - /** Syntax `proto3`. */ - GPBSyntax_SyntaxProto3 = 1, -}; - -GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void); - -/** - * Checks to see if the given value is defined by the enum or was not known at - * the time this source was generated. - **/ -BOOL GPBSyntax_IsValidValue(int32_t value); - -#pragma mark - Enum GPBField_Kind - -/** Basic field types. */ -typedef GPB_ENUM(GPBField_Kind) { - /** - * Value used if any message's field encounters a value that is not defined - * by this enum. The message will also have C functions to get/set the rawValue - * of the field. - **/ - GPBField_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, - /** Field type unknown. */ - GPBField_Kind_TypeUnknown = 0, - - /** Field type double. */ - GPBField_Kind_TypeDouble = 1, - - /** Field type float. */ - GPBField_Kind_TypeFloat = 2, - - /** Field type int64. */ - GPBField_Kind_TypeInt64 = 3, - - /** Field type uint64. */ - GPBField_Kind_TypeUint64 = 4, - - /** Field type int32. */ - GPBField_Kind_TypeInt32 = 5, - - /** Field type fixed64. */ - GPBField_Kind_TypeFixed64 = 6, - - /** Field type fixed32. */ - GPBField_Kind_TypeFixed32 = 7, - - /** Field type bool. */ - GPBField_Kind_TypeBool = 8, - - /** Field type string. */ - GPBField_Kind_TypeString = 9, - - /** Field type group. Proto2 syntax only, and deprecated. */ - GPBField_Kind_TypeGroup = 10, - - /** Field type message. */ - GPBField_Kind_TypeMessage = 11, - - /** Field type bytes. */ - GPBField_Kind_TypeBytes = 12, - - /** Field type uint32. */ - GPBField_Kind_TypeUint32 = 13, - - /** Field type enum. */ - GPBField_Kind_TypeEnum = 14, - - /** Field type sfixed32. */ - GPBField_Kind_TypeSfixed32 = 15, - - /** Field type sfixed64. */ - GPBField_Kind_TypeSfixed64 = 16, - - /** Field type sint32. */ - GPBField_Kind_TypeSint32 = 17, - - /** Field type sint64. */ - GPBField_Kind_TypeSint64 = 18, -}; - -GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void); - -/** - * Checks to see if the given value is defined by the enum or was not known at - * the time this source was generated. - **/ -BOOL GPBField_Kind_IsValidValue(int32_t value); - -#pragma mark - Enum GPBField_Cardinality - -/** Whether a field is optional, required, or repeated. */ -typedef GPB_ENUM(GPBField_Cardinality) { - /** - * Value used if any message's field encounters a value that is not defined - * by this enum. The message will also have C functions to get/set the rawValue - * of the field. - **/ - GPBField_Cardinality_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, - /** For fields with unknown cardinality. */ - GPBField_Cardinality_CardinalityUnknown = 0, - - /** For optional fields. */ - GPBField_Cardinality_CardinalityOptional = 1, - - /** For required fields. Proto2 syntax only. */ - GPBField_Cardinality_CardinalityRequired = 2, - - /** For repeated fields. */ - GPBField_Cardinality_CardinalityRepeated = 3, -}; - -GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void); - -/** - * Checks to see if the given value is defined by the enum or was not known at - * the time this source was generated. - **/ -BOOL GPBField_Cardinality_IsValidValue(int32_t value); - -#pragma mark - GPBTypeRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBTypeRoot : GPBRootObject -@end - -#pragma mark - GPBType - -typedef GPB_ENUM(GPBType_FieldNumber) { - GPBType_FieldNumber_Name = 1, - GPBType_FieldNumber_FieldsArray = 2, - GPBType_FieldNumber_OneofsArray = 3, - GPBType_FieldNumber_OptionsArray = 4, - GPBType_FieldNumber_SourceContext = 5, - GPBType_FieldNumber_Syntax = 6, -}; - -/** - * A protocol buffer message type. - **/ -@interface GPBType : GPBMessage - -/** The fully qualified message name. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** The list of fields. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *fieldsArray; -/** The number of items in @c fieldsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger fieldsArray_Count; - -/** The list of types appearing in `oneof` definitions in this type. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *oneofsArray; -/** The number of items in @c oneofsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger oneofsArray_Count; - -/** The protocol buffer options. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -/** The source context. */ -@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext; -/** Test to see if @c sourceContext has been set. */ -@property(nonatomic, readwrite) BOOL hasSourceContext; - -/** The source syntax. */ -@property(nonatomic, readwrite) GPBSyntax syntax; - -@end - -/** - * Fetches the raw value of a @c GPBType's @c syntax property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBType_Syntax_RawValue(GPBType *message); -/** - * Sets the raw value of an @c GPBType's @c syntax property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBType_Syntax_RawValue(GPBType *message, int32_t value); - -#pragma mark - GPBField - -typedef GPB_ENUM(GPBField_FieldNumber) { - GPBField_FieldNumber_Kind = 1, - GPBField_FieldNumber_Cardinality = 2, - GPBField_FieldNumber_Number = 3, - GPBField_FieldNumber_Name = 4, - GPBField_FieldNumber_TypeURL = 6, - GPBField_FieldNumber_OneofIndex = 7, - GPBField_FieldNumber_Packed = 8, - GPBField_FieldNumber_OptionsArray = 9, - GPBField_FieldNumber_JsonName = 10, - GPBField_FieldNumber_DefaultValue = 11, -}; - -/** - * A single field of a message type. - **/ -@interface GPBField : GPBMessage - -/** The field type. */ -@property(nonatomic, readwrite) GPBField_Kind kind; - -/** The field cardinality. */ -@property(nonatomic, readwrite) GPBField_Cardinality cardinality; - -/** The field number. */ -@property(nonatomic, readwrite) int32_t number; - -/** The field name. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** - * The field type URL, without the scheme, for message or enumeration - * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL; - -/** - * The index of the field type in `Type.oneofs`, for message or enumeration - * types. The first type has index 1; zero means the type is not in the list. - **/ -@property(nonatomic, readwrite) int32_t oneofIndex; - -/** Whether to use alternative packed wire representation. */ -@property(nonatomic, readwrite) BOOL packed; - -/** The protocol buffer options. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -/** The field JSON name. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName; - -/** The string value of the default value of this field. Proto2 syntax only. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue; - -@end - -/** - * Fetches the raw value of a @c GPBField's @c kind property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBField_Kind_RawValue(GPBField *message); -/** - * Sets the raw value of an @c GPBField's @c kind property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBField_Kind_RawValue(GPBField *message, int32_t value); - -/** - * Fetches the raw value of a @c GPBField's @c cardinality property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBField_Cardinality_RawValue(GPBField *message); -/** - * Sets the raw value of an @c GPBField's @c cardinality property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value); - -#pragma mark - GPBEnum - -typedef GPB_ENUM(GPBEnum_FieldNumber) { - GPBEnum_FieldNumber_Name = 1, - GPBEnum_FieldNumber_EnumvalueArray = 2, - GPBEnum_FieldNumber_OptionsArray = 3, - GPBEnum_FieldNumber_SourceContext = 4, - GPBEnum_FieldNumber_Syntax = 5, -}; - -/** - * Enum type definition. - **/ -@interface GPBEnum : GPBMessage - -/** Enum type name. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** Enum value definitions. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *enumvalueArray; -/** The number of items in @c enumvalueArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger enumvalueArray_Count; - -/** Protocol buffer options. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -/** The source context. */ -@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext; -/** Test to see if @c sourceContext has been set. */ -@property(nonatomic, readwrite) BOOL hasSourceContext; - -/** The source syntax. */ -@property(nonatomic, readwrite) GPBSyntax syntax; - -@end - -/** - * Fetches the raw value of a @c GPBEnum's @c syntax property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBEnum_Syntax_RawValue(GPBEnum *message); -/** - * Sets the raw value of an @c GPBEnum's @c syntax property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBEnum_Syntax_RawValue(GPBEnum *message, int32_t value); - -#pragma mark - GPBEnumValue - -typedef GPB_ENUM(GPBEnumValue_FieldNumber) { - GPBEnumValue_FieldNumber_Name = 1, - GPBEnumValue_FieldNumber_Number = 2, - GPBEnumValue_FieldNumber_OptionsArray = 3, -}; - -/** - * Enum value definition. - **/ -@interface GPBEnumValue : GPBMessage - -/** Enum value name. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** Enum value number. */ -@property(nonatomic, readwrite) int32_t number; - -/** Protocol buffer options. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -@end - -#pragma mark - GPBOption - -typedef GPB_ENUM(GPBOption_FieldNumber) { - GPBOption_FieldNumber_Name = 1, - GPBOption_FieldNumber_Value = 2, -}; - -/** - * A protocol buffer option, which can be attached to a message, field, - * enumeration, etc. - **/ -@interface GPBOption : GPBMessage - -/** - * The option's name. For protobuf built-in options (options defined in - * descriptor.proto), this is the short name. For example, `"map_entry"`. - * For custom options, it should be the fully-qualified name. For example, - * `"google.api.http"`. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** - * The option's value packed in an Any message. If the value is a primitive, - * the corresponding wrapper type defined in google/protobuf/wrappers.proto - * should be used. If the value is an enum, it should be stored as an int32 - * value using the google.protobuf.Int32Value type. - **/ -@property(nonatomic, readwrite, strong, null_resettable) GPBAny *value; -/** Test to see if @c value has been set. */ -@property(nonatomic, readwrite) BOOL hasValue; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.m b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.m deleted file mode 100755 index 7a94938..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.m +++ /dev/null @@ -1,701 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/type.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers_RuntimeSupport.h" -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "google/protobuf/Type.pbobjc.h" - #import "google/protobuf/Any.pbobjc.h" - #import "google/protobuf/SourceContext.pbobjc.h" -#endif -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -#pragma mark - GPBTypeRoot - -@implementation GPBTypeRoot - -// No extensions in the file and none of the imports (direct or indirect) -// defined extensions, so no need to generate +extensionRegistry. - -@end - -#pragma mark - GPBTypeRoot_FileDescriptor - -static GPBFileDescriptor *GPBTypeRoot_FileDescriptor(void) { - // This is called by +initialize so there is no need to worry - // about thread safety of the singleton. - static GPBFileDescriptor *descriptor = NULL; - if (!descriptor) { - GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" - objcPrefix:@"GPB" - syntax:GPBFileSyntaxProto3]; - } - return descriptor; -} - -#pragma mark - Enum GPBSyntax - -GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void) { - static GPBEnumDescriptor *descriptor = NULL; - if (!descriptor) { - static const char *valueNames = - "SyntaxProto2\000SyntaxProto3\000"; - static const int32_t values[] = { - GPBSyntax_SyntaxProto2, - GPBSyntax_SyntaxProto3, - }; - GPBEnumDescriptor *worker = - [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBSyntax) - valueNames:valueNames - values:values - count:(uint32_t)(sizeof(values) / sizeof(int32_t)) - enumVerifier:GPBSyntax_IsValidValue]; - if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) { - [worker release]; - } - } - return descriptor; -} - -BOOL GPBSyntax_IsValidValue(int32_t value__) { - switch (value__) { - case GPBSyntax_SyntaxProto2: - case GPBSyntax_SyntaxProto3: - return YES; - default: - return NO; - } -} - -#pragma mark - GPBType - -@implementation GPBType - -@dynamic name; -@dynamic fieldsArray, fieldsArray_Count; -@dynamic oneofsArray, oneofsArray_Count; -@dynamic optionsArray, optionsArray_Count; -@dynamic hasSourceContext, sourceContext; -@dynamic syntax; - -typedef struct GPBType__storage_ { - uint32_t _has_storage_[1]; - GPBSyntax syntax; - NSString *name; - NSMutableArray *fieldsArray; - NSMutableArray *oneofsArray; - NSMutableArray *optionsArray; - GPBSourceContext *sourceContext; -} GPBType__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "name", - .dataTypeSpecific.className = NULL, - .number = GPBType_FieldNumber_Name, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBType__storage_, name), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - { - .name = "fieldsArray", - .dataTypeSpecific.className = GPBStringifySymbol(GPBField), - .number = GPBType_FieldNumber_FieldsArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBType__storage_, fieldsArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeMessage, - }, - { - .name = "oneofsArray", - .dataTypeSpecific.className = NULL, - .number = GPBType_FieldNumber_OneofsArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBType__storage_, oneofsArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeString, - }, - { - .name = "optionsArray", - .dataTypeSpecific.className = GPBStringifySymbol(GPBOption), - .number = GPBType_FieldNumber_OptionsArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBType__storage_, optionsArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeMessage, - }, - { - .name = "sourceContext", - .dataTypeSpecific.className = GPBStringifySymbol(GPBSourceContext), - .number = GPBType_FieldNumber_SourceContext, - .hasIndex = 1, - .offset = (uint32_t)offsetof(GPBType__storage_, sourceContext), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeMessage, - }, - { - .name = "syntax", - .dataTypeSpecific.enumDescFunc = GPBSyntax_EnumDescriptor, - .number = GPBType_FieldNumber_Syntax, - .hasIndex = 2, - .offset = (uint32_t)offsetof(GPBType__storage_, syntax), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), - .dataType = GPBDataTypeEnum, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBType class] - rootClass:[GPBTypeRoot class] - file:GPBTypeRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBType__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -int32_t GPBType_Syntax_RawValue(GPBType *message) { - GPBDescriptor *descriptor = [GPBType descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBType_FieldNumber_Syntax]; - return GPBGetMessageInt32Field(message, field); -} - -void SetGPBType_Syntax_RawValue(GPBType *message, int32_t value) { - GPBDescriptor *descriptor = [GPBType descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBType_FieldNumber_Syntax]; - GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); -} - -#pragma mark - GPBField - -@implementation GPBField - -@dynamic kind; -@dynamic cardinality; -@dynamic number; -@dynamic name; -@dynamic typeURL; -@dynamic oneofIndex; -@dynamic packed; -@dynamic optionsArray, optionsArray_Count; -@dynamic jsonName; -@dynamic defaultValue; - -typedef struct GPBField__storage_ { - uint32_t _has_storage_[1]; - GPBField_Kind kind; - GPBField_Cardinality cardinality; - int32_t number; - int32_t oneofIndex; - NSString *name; - NSString *typeURL; - NSMutableArray *optionsArray; - NSString *jsonName; - NSString *defaultValue; -} GPBField__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "kind", - .dataTypeSpecific.enumDescFunc = GPBField_Kind_EnumDescriptor, - .number = GPBField_FieldNumber_Kind, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBField__storage_, kind), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), - .dataType = GPBDataTypeEnum, - }, - { - .name = "cardinality", - .dataTypeSpecific.enumDescFunc = GPBField_Cardinality_EnumDescriptor, - .number = GPBField_FieldNumber_Cardinality, - .hasIndex = 1, - .offset = (uint32_t)offsetof(GPBField__storage_, cardinality), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), - .dataType = GPBDataTypeEnum, - }, - { - .name = "number", - .dataTypeSpecific.className = NULL, - .number = GPBField_FieldNumber_Number, - .hasIndex = 2, - .offset = (uint32_t)offsetof(GPBField__storage_, number), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeInt32, - }, - { - .name = "name", - .dataTypeSpecific.className = NULL, - .number = GPBField_FieldNumber_Name, - .hasIndex = 3, - .offset = (uint32_t)offsetof(GPBField__storage_, name), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - { - .name = "typeURL", - .dataTypeSpecific.className = NULL, - .number = GPBField_FieldNumber_TypeURL, - .hasIndex = 4, - .offset = (uint32_t)offsetof(GPBField__storage_, typeURL), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom), - .dataType = GPBDataTypeString, - }, - { - .name = "oneofIndex", - .dataTypeSpecific.className = NULL, - .number = GPBField_FieldNumber_OneofIndex, - .hasIndex = 5, - .offset = (uint32_t)offsetof(GPBField__storage_, oneofIndex), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeInt32, - }, - { - .name = "packed", - .dataTypeSpecific.className = NULL, - .number = GPBField_FieldNumber_Packed, - .hasIndex = 6, - .offset = 7, // Stored in _has_storage_ to save space. - .flags = GPBFieldOptional, - .dataType = GPBDataTypeBool, - }, - { - .name = "optionsArray", - .dataTypeSpecific.className = GPBStringifySymbol(GPBOption), - .number = GPBField_FieldNumber_OptionsArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBField__storage_, optionsArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeMessage, - }, - { - .name = "jsonName", - .dataTypeSpecific.className = NULL, - .number = GPBField_FieldNumber_JsonName, - .hasIndex = 8, - .offset = (uint32_t)offsetof(GPBField__storage_, jsonName), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - { - .name = "defaultValue", - .dataTypeSpecific.className = NULL, - .number = GPBField_FieldNumber_DefaultValue, - .hasIndex = 9, - .offset = (uint32_t)offsetof(GPBField__storage_, defaultValue), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBField class] - rootClass:[GPBTypeRoot class] - file:GPBTypeRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBField__storage_) - flags:GPBDescriptorInitializationFlag_None]; -#if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS - static const char *extraTextFormatInfo = - "\001\006\004\241!!\000"; - [localDescriptor setupExtraTextInfo:extraTextFormatInfo]; -#endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -int32_t GPBField_Kind_RawValue(GPBField *message) { - GPBDescriptor *descriptor = [GPBField descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Kind]; - return GPBGetMessageInt32Field(message, field); -} - -void SetGPBField_Kind_RawValue(GPBField *message, int32_t value) { - GPBDescriptor *descriptor = [GPBField descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Kind]; - GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); -} - -int32_t GPBField_Cardinality_RawValue(GPBField *message) { - GPBDescriptor *descriptor = [GPBField descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Cardinality]; - return GPBGetMessageInt32Field(message, field); -} - -void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value) { - GPBDescriptor *descriptor = [GPBField descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Cardinality]; - GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); -} - -#pragma mark - Enum GPBField_Kind - -GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void) { - static GPBEnumDescriptor *descriptor = NULL; - if (!descriptor) { - static const char *valueNames = - "TypeUnknown\000TypeDouble\000TypeFloat\000TypeInt" - "64\000TypeUint64\000TypeInt32\000TypeFixed64\000Type" - "Fixed32\000TypeBool\000TypeString\000TypeGroup\000Ty" - "peMessage\000TypeBytes\000TypeUint32\000TypeEnum\000" - "TypeSfixed32\000TypeSfixed64\000TypeSint32\000Typ" - "eSint64\000"; - static const int32_t values[] = { - GPBField_Kind_TypeUnknown, - GPBField_Kind_TypeDouble, - GPBField_Kind_TypeFloat, - GPBField_Kind_TypeInt64, - GPBField_Kind_TypeUint64, - GPBField_Kind_TypeInt32, - GPBField_Kind_TypeFixed64, - GPBField_Kind_TypeFixed32, - GPBField_Kind_TypeBool, - GPBField_Kind_TypeString, - GPBField_Kind_TypeGroup, - GPBField_Kind_TypeMessage, - GPBField_Kind_TypeBytes, - GPBField_Kind_TypeUint32, - GPBField_Kind_TypeEnum, - GPBField_Kind_TypeSfixed32, - GPBField_Kind_TypeSfixed64, - GPBField_Kind_TypeSint32, - GPBField_Kind_TypeSint64, - }; - GPBEnumDescriptor *worker = - [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBField_Kind) - valueNames:valueNames - values:values - count:(uint32_t)(sizeof(values) / sizeof(int32_t)) - enumVerifier:GPBField_Kind_IsValidValue]; - if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) { - [worker release]; - } - } - return descriptor; -} - -BOOL GPBField_Kind_IsValidValue(int32_t value__) { - switch (value__) { - case GPBField_Kind_TypeUnknown: - case GPBField_Kind_TypeDouble: - case GPBField_Kind_TypeFloat: - case GPBField_Kind_TypeInt64: - case GPBField_Kind_TypeUint64: - case GPBField_Kind_TypeInt32: - case GPBField_Kind_TypeFixed64: - case GPBField_Kind_TypeFixed32: - case GPBField_Kind_TypeBool: - case GPBField_Kind_TypeString: - case GPBField_Kind_TypeGroup: - case GPBField_Kind_TypeMessage: - case GPBField_Kind_TypeBytes: - case GPBField_Kind_TypeUint32: - case GPBField_Kind_TypeEnum: - case GPBField_Kind_TypeSfixed32: - case GPBField_Kind_TypeSfixed64: - case GPBField_Kind_TypeSint32: - case GPBField_Kind_TypeSint64: - return YES; - default: - return NO; - } -} - -#pragma mark - Enum GPBField_Cardinality - -GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void) { - static GPBEnumDescriptor *descriptor = NULL; - if (!descriptor) { - static const char *valueNames = - "CardinalityUnknown\000CardinalityOptional\000C" - "ardinalityRequired\000CardinalityRepeated\000"; - static const int32_t values[] = { - GPBField_Cardinality_CardinalityUnknown, - GPBField_Cardinality_CardinalityOptional, - GPBField_Cardinality_CardinalityRequired, - GPBField_Cardinality_CardinalityRepeated, - }; - GPBEnumDescriptor *worker = - [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBField_Cardinality) - valueNames:valueNames - values:values - count:(uint32_t)(sizeof(values) / sizeof(int32_t)) - enumVerifier:GPBField_Cardinality_IsValidValue]; - if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) { - [worker release]; - } - } - return descriptor; -} - -BOOL GPBField_Cardinality_IsValidValue(int32_t value__) { - switch (value__) { - case GPBField_Cardinality_CardinalityUnknown: - case GPBField_Cardinality_CardinalityOptional: - case GPBField_Cardinality_CardinalityRequired: - case GPBField_Cardinality_CardinalityRepeated: - return YES; - default: - return NO; - } -} - -#pragma mark - GPBEnum - -@implementation GPBEnum - -@dynamic name; -@dynamic enumvalueArray, enumvalueArray_Count; -@dynamic optionsArray, optionsArray_Count; -@dynamic hasSourceContext, sourceContext; -@dynamic syntax; - -typedef struct GPBEnum__storage_ { - uint32_t _has_storage_[1]; - GPBSyntax syntax; - NSString *name; - NSMutableArray *enumvalueArray; - NSMutableArray *optionsArray; - GPBSourceContext *sourceContext; -} GPBEnum__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "name", - .dataTypeSpecific.className = NULL, - .number = GPBEnum_FieldNumber_Name, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBEnum__storage_, name), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - { - .name = "enumvalueArray", - .dataTypeSpecific.className = GPBStringifySymbol(GPBEnumValue), - .number = GPBEnum_FieldNumber_EnumvalueArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBEnum__storage_, enumvalueArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeMessage, - }, - { - .name = "optionsArray", - .dataTypeSpecific.className = GPBStringifySymbol(GPBOption), - .number = GPBEnum_FieldNumber_OptionsArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBEnum__storage_, optionsArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeMessage, - }, - { - .name = "sourceContext", - .dataTypeSpecific.className = GPBStringifySymbol(GPBSourceContext), - .number = GPBEnum_FieldNumber_SourceContext, - .hasIndex = 1, - .offset = (uint32_t)offsetof(GPBEnum__storage_, sourceContext), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeMessage, - }, - { - .name = "syntax", - .dataTypeSpecific.enumDescFunc = GPBSyntax_EnumDescriptor, - .number = GPBEnum_FieldNumber_Syntax, - .hasIndex = 2, - .offset = (uint32_t)offsetof(GPBEnum__storage_, syntax), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), - .dataType = GPBDataTypeEnum, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBEnum class] - rootClass:[GPBTypeRoot class] - file:GPBTypeRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBEnum__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -int32_t GPBEnum_Syntax_RawValue(GPBEnum *message) { - GPBDescriptor *descriptor = [GPBEnum descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBEnum_FieldNumber_Syntax]; - return GPBGetMessageInt32Field(message, field); -} - -void SetGPBEnum_Syntax_RawValue(GPBEnum *message, int32_t value) { - GPBDescriptor *descriptor = [GPBEnum descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBEnum_FieldNumber_Syntax]; - GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); -} - -#pragma mark - GPBEnumValue - -@implementation GPBEnumValue - -@dynamic name; -@dynamic number; -@dynamic optionsArray, optionsArray_Count; - -typedef struct GPBEnumValue__storage_ { - uint32_t _has_storage_[1]; - int32_t number; - NSString *name; - NSMutableArray *optionsArray; -} GPBEnumValue__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "name", - .dataTypeSpecific.className = NULL, - .number = GPBEnumValue_FieldNumber_Name, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBEnumValue__storage_, name), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - { - .name = "number", - .dataTypeSpecific.className = NULL, - .number = GPBEnumValue_FieldNumber_Number, - .hasIndex = 1, - .offset = (uint32_t)offsetof(GPBEnumValue__storage_, number), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeInt32, - }, - { - .name = "optionsArray", - .dataTypeSpecific.className = GPBStringifySymbol(GPBOption), - .number = GPBEnumValue_FieldNumber_OptionsArray, - .hasIndex = GPBNoHasBit, - .offset = (uint32_t)offsetof(GPBEnumValue__storage_, optionsArray), - .flags = GPBFieldRepeated, - .dataType = GPBDataTypeMessage, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBEnumValue class] - rootClass:[GPBTypeRoot class] - file:GPBTypeRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBEnumValue__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -#pragma mark - GPBOption - -@implementation GPBOption - -@dynamic name; -@dynamic hasValue, value; - -typedef struct GPBOption__storage_ { - uint32_t _has_storage_[1]; - NSString *name; - GPBAny *value; -} GPBOption__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "name", - .dataTypeSpecific.className = NULL, - .number = GPBOption_FieldNumber_Name, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBOption__storage_, name), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - { - .name = "value", - .dataTypeSpecific.className = GPBStringifySymbol(GPBAny), - .number = GPBOption_FieldNumber_Value, - .hasIndex = 1, - .offset = (uint32_t)offsetof(GPBOption__storage_, value), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeMessage, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBOption class] - rootClass:[GPBTypeRoot class] - file:GPBTypeRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBOption__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Wrappers.pbobjc.h b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Wrappers.pbobjc.h deleted file mode 100755 index 3cb9fe7..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Wrappers.pbobjc.h +++ /dev/null @@ -1,215 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBWrappersRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBWrappersRoot : GPBRootObject -@end - -#pragma mark - GPBDoubleValue - -typedef GPB_ENUM(GPBDoubleValue_FieldNumber) { - GPBDoubleValue_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `double`. - * - * The JSON representation for `DoubleValue` is JSON number. - **/ -@interface GPBDoubleValue : GPBMessage - -/** The double value. */ -@property(nonatomic, readwrite) double value; - -@end - -#pragma mark - GPBFloatValue - -typedef GPB_ENUM(GPBFloatValue_FieldNumber) { - GPBFloatValue_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `float`. - * - * The JSON representation for `FloatValue` is JSON number. - **/ -@interface GPBFloatValue : GPBMessage - -/** The float value. */ -@property(nonatomic, readwrite) float value; - -@end - -#pragma mark - GPBInt64Value - -typedef GPB_ENUM(GPBInt64Value_FieldNumber) { - GPBInt64Value_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `int64`. - * - * The JSON representation for `Int64Value` is JSON string. - **/ -@interface GPBInt64Value : GPBMessage - -/** The int64 value. */ -@property(nonatomic, readwrite) int64_t value; - -@end - -#pragma mark - GPBUInt64Value - -typedef GPB_ENUM(GPBUInt64Value_FieldNumber) { - GPBUInt64Value_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `uint64`. - * - * The JSON representation for `UInt64Value` is JSON string. - **/ -@interface GPBUInt64Value : GPBMessage - -/** The uint64 value. */ -@property(nonatomic, readwrite) uint64_t value; - -@end - -#pragma mark - GPBInt32Value - -typedef GPB_ENUM(GPBInt32Value_FieldNumber) { - GPBInt32Value_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `int32`. - * - * The JSON representation for `Int32Value` is JSON number. - **/ -@interface GPBInt32Value : GPBMessage - -/** The int32 value. */ -@property(nonatomic, readwrite) int32_t value; - -@end - -#pragma mark - GPBUInt32Value - -typedef GPB_ENUM(GPBUInt32Value_FieldNumber) { - GPBUInt32Value_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `uint32`. - * - * The JSON representation for `UInt32Value` is JSON number. - **/ -@interface GPBUInt32Value : GPBMessage - -/** The uint32 value. */ -@property(nonatomic, readwrite) uint32_t value; - -@end - -#pragma mark - GPBBoolValue - -typedef GPB_ENUM(GPBBoolValue_FieldNumber) { - GPBBoolValue_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `bool`. - * - * The JSON representation for `BoolValue` is JSON `true` and `false`. - **/ -@interface GPBBoolValue : GPBMessage - -/** The bool value. */ -@property(nonatomic, readwrite) BOOL value; - -@end - -#pragma mark - GPBStringValue - -typedef GPB_ENUM(GPBStringValue_FieldNumber) { - GPBStringValue_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `string`. - * - * The JSON representation for `StringValue` is JSON string. - **/ -@interface GPBStringValue : GPBMessage - -/** The string value. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *value; - -@end - -#pragma mark - GPBBytesValue - -typedef GPB_ENUM(GPBBytesValue_FieldNumber) { - GPBBytesValue_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `bytes`. - * - * The JSON representation for `BytesValue` is JSON string. - **/ -@interface GPBBytesValue : GPBMessage - -/** The bytes value. */ -@property(nonatomic, readwrite, copy, null_resettable) NSData *value; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Wrappers.pbobjc.m b/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Wrappers.pbobjc.m deleted file mode 100755 index 5479eb1..0000000 --- a/Old My Mind/Pods/Protobuf/objectivec/google/protobuf/Wrappers.pbobjc.m +++ /dev/null @@ -1,439 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "GPBProtocolBuffers_RuntimeSupport.h" -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "google/protobuf/Wrappers.pbobjc.h" -#endif -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -#pragma mark - GPBWrappersRoot - -@implementation GPBWrappersRoot - -// No extensions in the file and no imports, so no need to generate -// +extensionRegistry. - -@end - -#pragma mark - GPBWrappersRoot_FileDescriptor - -static GPBFileDescriptor *GPBWrappersRoot_FileDescriptor(void) { - // This is called by +initialize so there is no need to worry - // about thread safety of the singleton. - static GPBFileDescriptor *descriptor = NULL; - if (!descriptor) { - GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" - objcPrefix:@"GPB" - syntax:GPBFileSyntaxProto3]; - } - return descriptor; -} - -#pragma mark - GPBDoubleValue - -@implementation GPBDoubleValue - -@dynamic value; - -typedef struct GPBDoubleValue__storage_ { - uint32_t _has_storage_[1]; - double value; -} GPBDoubleValue__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "value", - .dataTypeSpecific.className = NULL, - .number = GPBDoubleValue_FieldNumber_Value, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBDoubleValue__storage_, value), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeDouble, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBDoubleValue class] - rootClass:[GPBWrappersRoot class] - file:GPBWrappersRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBDoubleValue__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -#pragma mark - GPBFloatValue - -@implementation GPBFloatValue - -@dynamic value; - -typedef struct GPBFloatValue__storage_ { - uint32_t _has_storage_[1]; - float value; -} GPBFloatValue__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "value", - .dataTypeSpecific.className = NULL, - .number = GPBFloatValue_FieldNumber_Value, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBFloatValue__storage_, value), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeFloat, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBFloatValue class] - rootClass:[GPBWrappersRoot class] - file:GPBWrappersRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBFloatValue__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -#pragma mark - GPBInt64Value - -@implementation GPBInt64Value - -@dynamic value; - -typedef struct GPBInt64Value__storage_ { - uint32_t _has_storage_[1]; - int64_t value; -} GPBInt64Value__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "value", - .dataTypeSpecific.className = NULL, - .number = GPBInt64Value_FieldNumber_Value, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBInt64Value__storage_, value), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeInt64, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBInt64Value class] - rootClass:[GPBWrappersRoot class] - file:GPBWrappersRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBInt64Value__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -#pragma mark - GPBUInt64Value - -@implementation GPBUInt64Value - -@dynamic value; - -typedef struct GPBUInt64Value__storage_ { - uint32_t _has_storage_[1]; - uint64_t value; -} GPBUInt64Value__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "value", - .dataTypeSpecific.className = NULL, - .number = GPBUInt64Value_FieldNumber_Value, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBUInt64Value__storage_, value), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeUInt64, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBUInt64Value class] - rootClass:[GPBWrappersRoot class] - file:GPBWrappersRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBUInt64Value__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -#pragma mark - GPBInt32Value - -@implementation GPBInt32Value - -@dynamic value; - -typedef struct GPBInt32Value__storage_ { - uint32_t _has_storage_[1]; - int32_t value; -} GPBInt32Value__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "value", - .dataTypeSpecific.className = NULL, - .number = GPBInt32Value_FieldNumber_Value, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBInt32Value__storage_, value), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeInt32, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBInt32Value class] - rootClass:[GPBWrappersRoot class] - file:GPBWrappersRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBInt32Value__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -#pragma mark - GPBUInt32Value - -@implementation GPBUInt32Value - -@dynamic value; - -typedef struct GPBUInt32Value__storage_ { - uint32_t _has_storage_[1]; - uint32_t value; -} GPBUInt32Value__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "value", - .dataTypeSpecific.className = NULL, - .number = GPBUInt32Value_FieldNumber_Value, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBUInt32Value__storage_, value), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeUInt32, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBUInt32Value class] - rootClass:[GPBWrappersRoot class] - file:GPBWrappersRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBUInt32Value__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -#pragma mark - GPBBoolValue - -@implementation GPBBoolValue - -@dynamic value; - -typedef struct GPBBoolValue__storage_ { - uint32_t _has_storage_[1]; -} GPBBoolValue__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "value", - .dataTypeSpecific.className = NULL, - .number = GPBBoolValue_FieldNumber_Value, - .hasIndex = 0, - .offset = 1, // Stored in _has_storage_ to save space. - .flags = GPBFieldOptional, - .dataType = GPBDataTypeBool, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBBoolValue class] - rootClass:[GPBWrappersRoot class] - file:GPBWrappersRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBBoolValue__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -#pragma mark - GPBStringValue - -@implementation GPBStringValue - -@dynamic value; - -typedef struct GPBStringValue__storage_ { - uint32_t _has_storage_[1]; - NSString *value; -} GPBStringValue__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "value", - .dataTypeSpecific.className = NULL, - .number = GPBStringValue_FieldNumber_Value, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBStringValue__storage_, value), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeString, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBStringValue class] - rootClass:[GPBWrappersRoot class] - file:GPBWrappersRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBStringValue__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - -#pragma mark - GPBBytesValue - -@implementation GPBBytesValue - -@dynamic value; - -typedef struct GPBBytesValue__storage_ { - uint32_t _has_storage_[1]; - NSData *value; -} GPBBytesValue__storage_; - -// This method is threadsafe because it is initially called -// in +initialize for each subclass. -+ (GPBDescriptor *)descriptor { - static GPBDescriptor *descriptor = nil; - if (!descriptor) { - static GPBMessageFieldDescription fields[] = { - { - .name = "value", - .dataTypeSpecific.className = NULL, - .number = GPBBytesValue_FieldNumber_Value, - .hasIndex = 0, - .offset = (uint32_t)offsetof(GPBBytesValue__storage_, value), - .flags = GPBFieldOptional, - .dataType = GPBDataTypeBytes, - }, - }; - GPBDescriptor *localDescriptor = - [GPBDescriptor allocDescriptorForClass:[GPBBytesValue class] - rootClass:[GPBWrappersRoot class] - file:GPBWrappersRoot_FileDescriptor() - fields:fields - fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) - storageSize:sizeof(GPBBytesValue__storage_) - flags:GPBDescriptorInitializationFlag_None]; - NSAssert(descriptor == nil, @"Startup recursed!"); - descriptor = localDescriptor; - } - return descriptor; -} - -@end - - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/Old My Mind/Pods/SwiftForms/LICENSE b/Old My Mind/Pods/SwiftForms/LICENSE deleted file mode 100755 index 03d0bb6..0000000 --- a/Old My Mind/Pods/SwiftForms/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) -Copyright (c) 2014 Miguel Ángel Ortuño ( ortuman@gmail.com ) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/FormErrorType.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/FormErrorType.swift deleted file mode 100755 index 37356e8..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/FormErrorType.swift +++ /dev/null @@ -1,12 +0,0 @@ -// -// FormErrorType.swift -// SwiftFormsApplication -// -// Created by Miguel Angel Ortuno Ortuno on 2/1/16. -// Copyright © 2016 Miguel Angel Ortuno Ortuno. All rights reserved. -// - -public enum FormErrorType: Error { - case sectionOutOfIndex - case rowOutOfIndex -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormButtonCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormButtonCell.swift deleted file mode 100755 index 0d3dcdb..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormButtonCell.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// FormButtonCell.swift -// SwiftForms -// -// Created by Miguel Angel Ortuno on 21/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormButtonCell: FormTitleCell { - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - titleLabel.textAlignment = .center - } - - open override func update() { - super.update() - titleLabel.text = rowDescriptor?.title - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormCheckCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormCheckCell.swift deleted file mode 100755 index 818c355..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormCheckCell.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// FormCheckCell.swift -// SwiftForms -// -// Created by Miguel Angel Ortuno on 22/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormCheckCell: FormTitleCell { - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - selectionStyle = .default - accessoryType = .none - } - - open override func update() { - super.update() - - titleLabel.text = rowDescriptor?.title - - var rowValue: Bool - if let value = rowDescriptor?.value as? Bool { - rowValue = value - } else { - rowValue = false - rowDescriptor?.value = rowValue as AnyObject - } - - accessoryType = (rowValue) ? .checkmark : .none - } - - open override class func formViewController(_ formViewController: FormViewController, didSelectRow selectedRow: FormBaseCell) { - guard let row = selectedRow as? FormCheckCell else { return } - row.check() - } - - // MARK: Private interface - - fileprivate func check() { - var newValue: Bool - if let value = rowDescriptor?.value as? Bool { - newValue = !value - } - else { - newValue = true - } - rowDescriptor?.value = newValue as AnyObject - update() - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormDateCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormDateCell.swift deleted file mode 100755 index e9093ec..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormDateCell.swift +++ /dev/null @@ -1,97 +0,0 @@ -// -// FormDateCell.swift -// SwiftForms -// -// Created by Miguel Angel Ortuno on 22/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormDateCell: FormValueCell { - - // MARK: Properties - - fileprivate let datePicker = UIDatePicker() - fileprivate let hiddenTextField = UITextField(frame: CGRect.zero) - - fileprivate let defaultDateFormatter = DateFormatter() - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - contentView.addSubview(hiddenTextField) - hiddenTextField.inputView = datePicker - datePicker.datePickerMode = .date - datePicker.addTarget(self, action: #selector(FormDateCell.valueChanged(_:)), for: .valueChanged) - } - - open override func update() { - super.update() - - if let showsInputToolbar = rowDescriptor?.configuration.cell.showsInputToolbar , showsInputToolbar && hiddenTextField.inputAccessoryView == nil { - hiddenTextField.inputAccessoryView = inputAccesoryView() - } - - titleLabel.text = rowDescriptor?.title - - if let rowType = rowDescriptor?.type { - switch rowType { - case .date: - datePicker.datePickerMode = .date - defaultDateFormatter.dateStyle = .long - defaultDateFormatter.timeStyle = .none - case .time: - datePicker.datePickerMode = .time - defaultDateFormatter.dateStyle = .none - defaultDateFormatter.timeStyle = .short - default: - datePicker.datePickerMode = .dateAndTime - defaultDateFormatter.dateStyle = .long - defaultDateFormatter.timeStyle = .short - } - } - - if let date = rowDescriptor?.value as? Date { - datePicker.date = date - valueLabel.text = getDateFormatter().string(from: date) - } - } - - open override class func formViewController(_ formViewController: FormViewController, didSelectRow selectedRow: FormBaseCell) { - guard let row = selectedRow as? FormDateCell else { return } - - if row.rowDescriptor?.value == nil { - let date = Date() - row.rowDescriptor?.value = date as AnyObject - row.valueLabel.text = row.getDateFormatter().string(from: date) - row.update() - } - - row.hiddenTextField.becomeFirstResponder() - } - - open override func firstResponderElement() -> UIResponder? { - return hiddenTextField - } - - open override class func formRowCanBecomeFirstResponder() -> Bool { - return true - } - - // MARK: Actions - - internal func valueChanged(_ sender: UIDatePicker) { - rowDescriptor?.value = sender.date as AnyObject - valueLabel.text = getDateFormatter().string(from: sender.date) - update() - } - - // MARK: Private interface - - fileprivate func getDateFormatter() -> DateFormatter { - guard let dateFormatter = rowDescriptor?.configuration.date.dateFormatter else { return defaultDateFormatter } - return dateFormatter - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormLabelCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormLabelCell.swift deleted file mode 100755 index 5104b29..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormLabelCell.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// FormTextFieldCell.swift -// SwiftForms -// -// Created by Miguel Ángel Ortuño Ortuño on 20/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -class FormLabelCell: FormValueCell { - - /// MARK: FormBaseCell - - override func configure() { - super.configure() - - accessoryType = .none - - titleLabel.translatesAutoresizingMaskIntoConstraints = false - valueLabel.translatesAutoresizingMaskIntoConstraints = false - - titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - valueLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - - valueLabel.textColor = UIColor.lightGray - valueLabel.textAlignment = .right - - contentView.addSubview(titleLabel) - contentView.addSubview(valueLabel) - - titleLabel.setContentHuggingPriority(500, for: .horizontal) - titleLabel.setContentCompressionResistancePriority(1000, for: .horizontal) - - // apply constant constraints - contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: valueLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: valueLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - } - - override func update() { - super.update() - - titleLabel.text = rowDescriptor?.title - valueLabel.text = rowDescriptor?.configuration.cell.placeholder - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormPickerCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormPickerCell.swift deleted file mode 100755 index 580cea9..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormPickerCell.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// FormPickerCell.swift -// SwiftForms -// -// Created by Miguel Angel Ortuno on 22/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormPickerCell: FormValueCell, UIPickerViewDelegate, UIPickerViewDataSource { - - // MARK: Properties - - fileprivate let picker = UIPickerView() - fileprivate let hiddenTextField = UITextField(frame: CGRect.zero) - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - accessoryType = .none - - picker.delegate = self - picker.dataSource = self - hiddenTextField.inputView = picker - - contentView.addSubview(hiddenTextField) - } - - open override func update() { - super.update() - picker.reloadAllComponents() - - if let showsInputToolbar = rowDescriptor?.configuration.cell.showsInputToolbar , showsInputToolbar && hiddenTextField.inputAccessoryView == nil { - hiddenTextField.inputAccessoryView = inputAccesoryView() - } - - titleLabel.text = rowDescriptor?.title - - if let selectedValue = rowDescriptor?.value { - valueLabel.text = rowDescriptor?.configuration.selection.optionTitleClosure?(selectedValue) - if let options = rowDescriptor?.configuration.selection.options , !options.isEmpty { - var selectedIndex: Int? - for (index, value) in options.enumerated() { - if value === selectedValue { - selectedIndex = index - break - } - } - if let index = selectedIndex { - picker.selectRow(index, inComponent: 0, animated: false) - } - } - } - } - - open override func firstResponderElement() -> UIResponder? { - return hiddenTextField - } - - open override class func formViewController(_ formViewController: FormViewController, didSelectRow selectedRow: FormBaseCell) { - guard let row = selectedRow as? FormPickerCell else { return } - - if selectedRow.rowDescriptor?.value == nil { - guard let options = selectedRow.rowDescriptor?.configuration.selection.options , !options.isEmpty else { return } - let value = options[0] - selectedRow.rowDescriptor?.value = value - row.valueLabel.text = selectedRow.rowDescriptor?.configuration.selection.optionTitleClosure?(value) - row.hiddenTextField.becomeFirstResponder() - } else { - guard let value = selectedRow.rowDescriptor?.value else { return } - row.valueLabel.text = selectedRow.rowDescriptor?.configuration.selection.optionTitleClosure?(value) - row.hiddenTextField.becomeFirstResponder() - } - } - - // MARK: UIPickerViewDelegate - - open func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { - guard let options = rowDescriptor?.configuration.selection.options , !options.isEmpty else { return nil } - guard row < options.count else { return nil } - return rowDescriptor?.configuration.selection.optionTitleClosure?(options[row]) - } - - open func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { - guard let options = rowDescriptor?.configuration.selection.options , !options.isEmpty else { return } - guard row < options.count else { return } - let newValue = options[row] - rowDescriptor?.value = newValue - valueLabel.text = rowDescriptor?.configuration.selection.optionTitleClosure?(newValue) - } - - // MARK: UIPickerViewDataSource - - open func numberOfComponents(in pickerView: UIPickerView) -> Int { - return 1 - } - - open func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { - guard let options = rowDescriptor?.configuration.selection.options else { return 0 } - return options.count - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSegmentedControlCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSegmentedControlCell.swift deleted file mode 100755 index b3f05d7..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSegmentedControlCell.swift +++ /dev/null @@ -1,99 +0,0 @@ -// -// FormSegmentedControlCell.swift -// SwiftForms -// -// Created by Miguel Angel Ortuno on 21/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormSegmentedControlCell: FormBaseCell { - - // MARK: Cell views - - open let titleLabel = UILabel() - open let segmentedControl = UISegmentedControl() - - // MARK: Properties - - fileprivate var customConstraints: [AnyObject] = [] - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - - selectionStyle = .none - - titleLabel.translatesAutoresizingMaskIntoConstraints = false - segmentedControl.translatesAutoresizingMaskIntoConstraints = false - - titleLabel.setContentCompressionResistancePriority(500, for: .horizontal) - segmentedControl.setContentCompressionResistancePriority(500, for: .horizontal) - - titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - - contentView.addSubview(titleLabel) - contentView.addSubview(segmentedControl) - - contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: segmentedControl, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - - segmentedControl.addTarget(self, action: #selector(FormSegmentedControlCell.valueChanged(_:)), for: .valueChanged) - } - - open override func update() { - super.update() - - titleLabel.text = rowDescriptor?.title - updateSegmentedControl() - - guard let value = rowDescriptor?.value else { return } - guard let options = rowDescriptor?.configuration.selection.options , !options.isEmpty else { return } - - var idx = 0 - for optionValue in options { - if optionValue === value { - segmentedControl.selectedSegmentIndex = idx - break - } - idx += 1 - } - } - - open override func constraintsViews() -> [String : UIView] { - return ["titleLabel" : titleLabel, "segmentedControl" : segmentedControl] - } - - open override func defaultVisualConstraints() -> [String] { - if let text = titleLabel.text , text.characters.count > 0 { - return ["H:|-16-[titleLabel]-16-[segmentedControl]-16-|"] - } else { - return ["H:|-16-[segmentedControl]-16-|"] - } - } - - // MARK: Actions - - internal func valueChanged(_ sender: UISegmentedControl) { - guard let options = rowDescriptor?.configuration.selection.options , !options.isEmpty else { return } - let value = options[sender.selectedSegmentIndex] - rowDescriptor?.value = value - } - - // MARK: Private - - fileprivate func updateSegmentedControl() { - segmentedControl.removeAllSegments() - - guard let options = rowDescriptor?.configuration.selection.options , !options.isEmpty else { return } - - var idx = 0 - for value in options { - let title = rowDescriptor?.configuration.selection.optionTitleClosure?(value) - segmentedControl.insertSegment(withTitle: title, at: idx, animated: false) - idx += 1 - } - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSelectorCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSelectorCell.swift deleted file mode 100755 index 7906778..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSelectorCell.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// FormSelectorCell.swift -// SwiftForms -// -// Created by Miguel Ángel Ortuño Ortuño on 23/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormSelectorCell: FormValueCell { - - // MARK: FormBaseCell - - open override func update() { - super.update() - - titleLabel.text = rowDescriptor?.title - - var title: String? - if let multipleValues = rowDescriptor?.value as? [AnyObject] { - var multipleValuesTitle = "" - for (index, selectedValue) in multipleValues.enumerated() { - guard let selectedValueTitle = rowDescriptor?.configuration.selection.optionTitleClosure?(selectedValue) else { continue } - if index != 0 { - multipleValuesTitle += ", " - } - multipleValuesTitle += selectedValueTitle - } - title = multipleValuesTitle - } else if let singleValue = rowDescriptor?.value { - title = rowDescriptor?.configuration.selection.optionTitleClosure?(singleValue) - } - - if let title = title , title.characters.count > 0 { - valueLabel.text = title - valueLabel.textColor = UIColor.black - } else { - valueLabel.text = rowDescriptor?.configuration.cell.placeholder - valueLabel.textColor = UIColor.lightGray - } - } - - open override class func formViewController(_ formViewController: FormViewController, didSelectRow selectedRow: FormBaseCell) { - guard let row = selectedRow as? FormSelectorCell else { return } - - formViewController.view.endEditing(true) - - var selectorControllerClass: UIViewController.Type - - if let controllerClass = row.rowDescriptor?.configuration.selection.controllerClass as? UIViewController.Type { - selectorControllerClass = controllerClass - } else { // fallback to default cell class - selectorControllerClass = FormOptionsSelectorController.self - } - - let selectorController = selectorControllerClass.init() - guard let formRowDescriptorViewController = selectorController as? FormSelector else { return } - - formRowDescriptorViewController.formCell = row - formViewController.navigationController?.pushViewController(selectorController, animated: true) - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSliderCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSliderCell.swift deleted file mode 100755 index 7466df0..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSliderCell.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// FormSliderCell.swift -// SwiftFormsApplication -// -// Created by Miguel Angel Ortuno Ortuno on 23/5/15. -// Copyright (c) 2015 Miguel Angel Ortuno Ortuno. All rights reserved. -// - -import UIKit - -open class FormSliderCell: FormTitleCell { - - // MARK: Cell views - - open let sliderView = UISlider() - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - - selectionStyle = .none - - titleLabel.translatesAutoresizingMaskIntoConstraints = false - sliderView.translatesAutoresizingMaskIntoConstraints = false - - titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - - contentView.addSubview(titleLabel) - contentView.addSubview(sliderView) - - titleLabel.setContentHuggingPriority(500, for: .horizontal) - - contentView.addConstraint(NSLayoutConstraint(item: sliderView, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - - sliderView.addTarget(self, action: #selector(FormSliderCell.valueChanged(_:)), for: .valueChanged) - } - - open override func update() { - super.update() - - if let maximumValue = rowDescriptor?.configuration.stepper.maximumValue { sliderView.maximumValue = Float(maximumValue) } - if let minimumValue = rowDescriptor?.configuration.stepper.minimumValue { sliderView.minimumValue = Float(minimumValue) } - if let continuous = rowDescriptor?.configuration.stepper.continuous { sliderView.isContinuous = continuous } - - titleLabel.text = rowDescriptor?.title - - if let value = rowDescriptor?.value as? Float { - sliderView.value = value - } else { - sliderView.value = sliderView.minimumValue - rowDescriptor?.value = sliderView.minimumValue as AnyObject - } - } - - open override func constraintsViews() -> [String : UIView] { - return ["titleLabel" : titleLabel, "sliderView" : sliderView] - } - - open override func defaultVisualConstraints() -> [String] { - var constraints: [String] = [] - - constraints.append("V:|[titleLabel]|") - constraints.append("H:|-16-[titleLabel]-16-[sliderView]-16-|") - - return constraints - } - - // MARK: Actions - - internal func valueChanged(_: UISlider) { - rowDescriptor?.value = sliderView.value as AnyObject - update() - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormStepperCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormStepperCell.swift deleted file mode 100755 index 16a021e..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormStepperCell.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// FormStepperCell.swift -// SwiftFormsApplication -// -// Created by Miguel Angel Ortuno Ortuno on 23/5/15. -// Copyright (c) 2015 Miguel Angel Ortuno Ortuno. All rights reserved. -// - -import UIKit - -open class FormStepperCell: FormTitleCell { - - // MARK: Cell views - - open let stepperView = UIStepper() - open let countLabel = UILabel() - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - - selectionStyle = .none - - titleLabel.translatesAutoresizingMaskIntoConstraints = false - stepperView.translatesAutoresizingMaskIntoConstraints = false - countLabel.translatesAutoresizingMaskIntoConstraints = false - - titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - countLabel.textAlignment = .right - - contentView.addSubview(titleLabel) - contentView.addSubview(countLabel) - contentView.addSubview(stepperView) - - titleLabel.setContentHuggingPriority(500, for: .horizontal) - - contentView.addConstraint(NSLayoutConstraint(item: stepperView, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - - stepperView.addTarget(self, action: #selector(FormStepperCell.valueChanged(_:)), for: .valueChanged) - } - - open override func update() { - super.update() - - if let maximumValue = rowDescriptor?.configuration.stepper.maximumValue { stepperView.maximumValue = maximumValue } - if let minimumValue = rowDescriptor?.configuration.stepper.minimumValue { stepperView.minimumValue = minimumValue } - if let steps = rowDescriptor?.configuration.stepper.steps { stepperView.stepValue = steps } - - titleLabel.text = rowDescriptor?.title - - if let value = rowDescriptor?.value as? Double { - stepperView.value = value - countLabel.text = String(value) - } else { - stepperView.value = stepperView.minimumValue - rowDescriptor?.value = stepperView.minimumValue as AnyObject - countLabel.text = String(stepperView.minimumValue) - } - } - - open override func constraintsViews() -> [String : UIView] { - return ["titleLabel" : titleLabel, "countLabel" : countLabel, "stepperView" : stepperView] - } - - open override func defaultVisualConstraints() -> [String] { - var constraints: [String] = [] - - constraints.append("V:|[titleLabel]|") - constraints.append("V:|[countLabel]|") - - constraints.append("H:|-16-[titleLabel][countLabel]-[stepperView]-16-|") - return constraints - } - - // MARK: Actions - - internal func valueChanged(_: UISwitch) { - rowDescriptor?.value = stepperView.value as AnyObject - update() - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSwitchCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSwitchCell.swift deleted file mode 100755 index 064eccf..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormSwitchCell.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// FormSwitchCell.swift -// SwiftForms -// -// Created by Miguel Angel Ortuno on 21/08/14. -// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormSwitchCell: FormTitleCell { - - // MARK: Cell views - - open let switchView = UISwitch() - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - - selectionStyle = .none - - switchView.addTarget(self, action: #selector(FormSwitchCell.valueChanged(_:)), for: .valueChanged) - accessoryView = switchView - } - - open override func update() { - super.update() - - titleLabel.text = rowDescriptor?.title - - if let value = rowDescriptor?.value as? Bool { - switchView.isOn = value - } else { - switchView.isOn = false - rowDescriptor?.value = false as AnyObject - } - } - - // MARK: Actions - - internal func valueChanged(_: UISwitch) { - rowDescriptor?.value = switchView.isOn as AnyObject - update() - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormTextFieldCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormTextFieldCell.swift deleted file mode 100755 index 63b4cc7..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormTextFieldCell.swift +++ /dev/null @@ -1,148 +0,0 @@ -// -// FormTextFieldCell.swift -// SwiftForms -// -// Created by Miguel Ángel Ortuño Ortuño on 20/08/14. -// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormTextFieldCell: FormBaseCell { - - // MARK: Cell views - - open let titleLabel = UILabel() - open let textField = UITextField() - - // MARK: Properties - - fileprivate var customConstraints: [AnyObject] = [] - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - - selectionStyle = .none - - titleLabel.translatesAutoresizingMaskIntoConstraints = false - textField.translatesAutoresizingMaskIntoConstraints = false - - titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - textField.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - - contentView.addSubview(titleLabel) - contentView.addSubview(textField) - - titleLabel.setContentHuggingPriority(500, for: .horizontal) - titleLabel.setContentCompressionResistancePriority(1000, for: .horizontal) - - contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: textField, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: textField, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - - textField.addTarget(self, action: #selector(FormTextFieldCell.editingChanged(_:)), for: .editingChanged) - } - - open override func update() { - super.update() - - if let showsInputToolbar = rowDescriptor?.configuration.cell.showsInputToolbar , showsInputToolbar && textField.inputAccessoryView == nil { - textField.inputAccessoryView = inputAccesoryView() - } - - titleLabel.text = rowDescriptor?.title - textField.text = rowDescriptor?.value as? String - textField.placeholder = rowDescriptor?.configuration.cell.placeholder - - textField.isSecureTextEntry = false - textField.clearButtonMode = .whileEditing - - if let type = rowDescriptor?.type { - switch type { - case .text: - textField.autocorrectionType = .default - textField.autocapitalizationType = .sentences - textField.keyboardType = .default - case .number: - textField.keyboardType = .numberPad - case .numbersAndPunctuation: - textField.keyboardType = .numbersAndPunctuation - case .decimal: - textField.keyboardType = .decimalPad - case .name: - textField.autocorrectionType = .no - textField.autocapitalizationType = .words - textField.keyboardType = .default - case .phone: - textField.keyboardType = .phonePad - case .namePhone: - textField.autocorrectionType = .no - textField.autocapitalizationType = .words - textField.keyboardType = .namePhonePad - case .url: - textField.autocorrectionType = .no - textField.autocapitalizationType = .none - textField.keyboardType = .URL - case .twitter: - textField.autocorrectionType = .no - textField.autocapitalizationType = .none - textField.keyboardType = .twitter - case .email: - textField.autocorrectionType = .no - textField.autocapitalizationType = .none - textField.keyboardType = .emailAddress - case .asciiCapable: - textField.autocorrectionType = .no - textField.autocapitalizationType = .none - textField.keyboardType = .asciiCapable - case .password: - textField.isSecureTextEntry = true - textField.clearsOnBeginEditing = false - default: - break - } - } - } - - open override func constraintsViews() -> [String : UIView] { - var views = ["titleLabel" : titleLabel, "textField" : textField] - if self.imageView!.image != nil { - views["imageView"] = imageView - } - return views - } - - open override func defaultVisualConstraints() -> [String] { - if self.imageView!.image != nil { - if titleLabel.text != nil && (titleLabel.text!).characters.count > 0 { - return ["H:[imageView]-[titleLabel]-[textField]-16-|"] - } else { - return ["H:[imageView]-[textField]-16-|"] - } - } else { - if titleLabel.text != nil && (titleLabel.text!).characters.count > 0 { - return ["H:|-16-[titleLabel]-[textField]-16-|"] - } else { - return ["H:|-16-[textField]-16-|"] - } - } - } - - open override func firstResponderElement() -> UIResponder? { - return textField - } - - open override class func formRowCanBecomeFirstResponder() -> Bool { - return true - } - - // MARK: Actions - - internal func editingChanged(_ sender: UITextField) { - guard let text = sender.text, text.characters.count > 0 else { rowDescriptor?.value = nil; update(); return } - rowDescriptor?.value = text as AnyObject - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormTextViewCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormTextViewCell.swift deleted file mode 100755 index 179463d..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/FormTextViewCell.swift +++ /dev/null @@ -1,96 +0,0 @@ -// -// FormTextViewCell.swift -// SwiftForms -// -// Created by Joey Padot on 12/6/14. -// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormTextViewCell : FormBaseCell, UITextViewDelegate { - - // MARK: Cell views - - open let titleLabel = UILabel() - open let textField = UITextView() - - // MARK: Properties - - fileprivate var customConstraints: [AnyObject]! - - // MARK: Class Funcs - - open override class func formRowCellHeight() -> CGFloat { - return 110.0 - } - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - - selectionStyle = .none - - titleLabel.translatesAutoresizingMaskIntoConstraints = false - textField.translatesAutoresizingMaskIntoConstraints = false - - titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - textField.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - - contentView.addSubview(titleLabel) - contentView.addSubview(textField) - - titleLabel.setContentHuggingPriority(500, for: .horizontal) - - contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: textField, attribute: .top, relatedBy: .equal, toItem: contentView, attribute: .top, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: textField, attribute: .bottom, relatedBy: .equal, toItem: contentView, attribute: .bottom, multiplier: 1.0, constant: 0.0)) - - textField.delegate = self - } - - open override func update() { - - titleLabel.text = rowDescriptor?.title - textField.text = rowDescriptor?.value as? String - - textField.isSecureTextEntry = false - textField.autocorrectionType = .default - textField.autocapitalizationType = .sentences - textField.keyboardType = .default - } - - open override func constraintsViews() -> [String : UIView] { - var views = ["titleLabel" : titleLabel, "textField" : textField] - if self.imageView!.image != nil { - views["imageView"] = imageView - } - return views - } - - open override func defaultVisualConstraints() -> [String] { - if self.imageView!.image != nil { - if let text = titleLabel.text , text.characters.count > 0 { - return ["H:[imageView]-[titleLabel]-[textField]-16-|"] - } else { - return ["H:[imageView]-[textField]-16-|"] - } - } else { - if let text = titleLabel.text , text.characters.count > 0 { - return ["H:|-16-[titleLabel]-[textField]-16-|"] - } else { - return ["H:|-16-[textField]-16-|"] - } - } - } - - // MARK: UITextViewDelegate - - open func textViewDidChange(_ textView: UITextView) { - guard let text = textView.text , text.characters.count > 0 else { rowDescriptor?.value = nil; update(); return } - rowDescriptor?.value = text as AnyObject - update() - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormBaseCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormBaseCell.swift deleted file mode 100755 index e294eb1..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormBaseCell.swift +++ /dev/null @@ -1,119 +0,0 @@ -// -// FormBaseCell.swift -// SwiftForms -// -// Created by Miguel Angel Ortuno on 20/08/14. -// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormBaseCell: UITableViewCell { - - // MARK: Properties - - open var rowDescriptor: FormRowDescriptor? { - didSet { - self.update() - } - } - - open weak var formViewController: FormViewController? - - fileprivate var customConstraints: [NSLayoutConstraint] = [] - - // MARK: Init - - public required override init(style: UITableViewCellStyle, reuseIdentifier: String!) { - super.init(style: style, reuseIdentifier: reuseIdentifier) - } - - public required init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - } - - // MARK: Public interface - - open func configure() { - /// override - } - - open func update() { - /// override - } - - open func defaultVisualConstraints() -> [String] { - /// override - return [] - } - - open func constraintsViews() -> [String : UIView] { - /// override - return [:] - } - - open func firstResponderElement() -> UIResponder? { - /// override - return nil - } - - open func inputAccesoryView() -> UIToolbar { - - let actionBar = UIToolbar() - actionBar.isTranslucent = true - actionBar.sizeToFit() - actionBar.barStyle = .default - - let doneButton = UIBarButtonItem(title: NSLocalizedString("Done", comment: ""), style: .done, target: self, action: #selector(FormBaseCell.handleDoneAction(_:))) - - let flexible = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil) - actionBar.items = [flexible, doneButton] - - return actionBar - } - - internal func handleDoneAction(_: UIBarButtonItem) { - firstResponderElement()?.resignFirstResponder() - } - - open class func formRowCellHeight() -> CGFloat { - return 44.0 - } - - open class func formRowCanBecomeFirstResponder() -> Bool { - return false - } - - open class func formViewController(_ formViewController: FormViewController, didSelectRow: FormBaseCell) { - } - - // MARK: Constraints - - open override func updateConstraints() { - if customConstraints.count > 0 { - contentView.removeConstraints(customConstraints) - } - - let views = constraintsViews() - - customConstraints.removeAll() - - var visualConstraints = [String]() - - if let visualConstraintsClosure = rowDescriptor?.configuration.cell.visualConstraintsClosure { - visualConstraints = visualConstraintsClosure(self) - } else { - visualConstraints = defaultVisualConstraints() - } - - for visualConstraint in visualConstraints { - let constraints = NSLayoutConstraint.constraints(withVisualFormat: visualConstraint, options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: views) - for constraint in constraints { - customConstraints.append(constraint) - } - } - - contentView.addConstraints(customConstraints) - super.updateConstraints() - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormTitleCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormTitleCell.swift deleted file mode 100755 index aefe09d..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormTitleCell.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// FormTitleCell.swift -// SwiftForms -// -// Created by Miguel Ángel Ortuño Ortuño on 13/11/14. -// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormTitleCell: FormBaseCell { - - // MARK: Cell views - - open let titleLabel = UILabel() - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - - titleLabel.translatesAutoresizingMaskIntoConstraints = false - titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - - // apply constant constraints - contentView.addSubview(titleLabel) - contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - } - - open override func constraintsViews() -> [String : UIView] { - return ["titleLabel" : titleLabel] - } - - open override func defaultVisualConstraints() -> [String] { - return ["H:|-16-[titleLabel]-16-|"] - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormValueCell.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormValueCell.swift deleted file mode 100755 index db28b10..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/cells/base/FormValueCell.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// FormValueCell.swift -// SwiftForms -// -// Created by Miguel Ángel Ortuño Ortuño on 13/11/14. -// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormValueCell: FormBaseCell { - - // MARK: Cell views - - open let titleLabel = UILabel() - open let valueLabel = UILabel() - - // MARK: Properties - - fileprivate var customConstraints: [AnyObject]! - - // MARK: FormBaseCell - - open override func configure() { - super.configure() - - accessoryType = .disclosureIndicator - - titleLabel.translatesAutoresizingMaskIntoConstraints = false - valueLabel.translatesAutoresizingMaskIntoConstraints = false - - titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - valueLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body) - - valueLabel.textColor = UIColor.lightGray - valueLabel.textAlignment = .right - - contentView.addSubview(titleLabel) - contentView.addSubview(valueLabel) - - titleLabel.setContentHuggingPriority(500, for: .horizontal) - titleLabel.setContentCompressionResistancePriority(1000, for: .horizontal) - - // apply constant constraints - contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: valueLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - contentView.addConstraint(NSLayoutConstraint(item: valueLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0)) - } - - open override func constraintsViews() -> [String : UIView] { - return ["titleLabel" : titleLabel, "valueLabel" : valueLabel] - } - - open override func defaultVisualConstraints() -> [String] { - - // apply default constraints - var rightPadding = 0 - if accessoryType == .none { - rightPadding = 16 - } - - if titleLabel.text != nil && (titleLabel.text!).characters.count > 0 { - return ["H:|-16-[titleLabel]-[valueLabel]-\(rightPadding)-|"] - } - else { - return ["H:|-16-[valueLabel]-\(rightPadding)-|"] - } - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/controllers/FormOptionsViewController.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/controllers/FormOptionsViewController.swift deleted file mode 100755 index 1146359..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/controllers/FormOptionsViewController.swift +++ /dev/null @@ -1,125 +0,0 @@ -// -// FormOptionsSelectorController.swift -// SwiftForms -// -// Created by Miguel Ángel Ortuño Ortuño on 23/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormOptionsSelectorController: UITableViewController, FormSelector { - - // MARK: FormSelector - - open var formCell: FormBaseCell? - - // MARK: Init - - public init() { - super.init(style: .grouped) - } - - public required init(coder aDecoder: NSCoder) { - super.init(coder: aDecoder)! - } - - override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { - super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) - } - - open override func viewDidLoad() { - super.viewDidLoad() - self.navigationItem.title = formCell?.rowDescriptor?.title - } - - // MARK: UITableViewDataSource - - open override func numberOfSections(in tableView: UITableView) -> Int { - return 1 - } - - open override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - guard let options = formCell?.rowDescriptor?.configuration.selection.options , !options.isEmpty else { return 0 } - return options.count - } - - open override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { - return 0.1 - } - - open override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - - let reuseIdentifier = NSStringFromClass(type(of: self)) - - var cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier) - if cell == nil { - cell = UITableViewCell(style: .default, reuseIdentifier: reuseIdentifier) - } - - let options = formCell!.rowDescriptor!.configuration.selection.options - let optionValue = options[(indexPath as NSIndexPath).row] - - cell?.textLabel?.text = formCell?.rowDescriptor?.configuration.selection.optionTitleClosure?(optionValue) - - if let selectedOptions = formCell?.rowDescriptor?.value as? [AnyObject] { - if let _ = selectedOptions.index(where: { $0 === optionValue }) { - cell?.accessoryType = .checkmark - } else { - cell?.accessoryType = .none - } - - } else if let selectedOption = formCell?.rowDescriptor?.value { - if optionValue === selectedOption { - cell?.accessoryType = .checkmark - } else { - cell?.accessoryType = .none - } - } - - return cell! - } - - // MARK: UITableViewDelegate - - open override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - - let cell = tableView.cellForRow(at: indexPath) - - var allowsMultipleSelection = false - if let allowsMultipleSelectionValue = formCell?.rowDescriptor?.configuration.selection.allowsMultipleSelection { - allowsMultipleSelection = allowsMultipleSelectionValue - } - - let options = formCell!.rowDescriptor!.configuration.selection.options - let selectedOption = options[(indexPath as NSIndexPath).row] - - if allowsMultipleSelection { - if var selectedOptions = formCell?.rowDescriptor?.value as? [AnyObject] { - if let index = selectedOptions.index(where: { $0 === selectedOption }) { - selectedOptions.remove(at: index) - cell?.accessoryType = .none - } else { - selectedOptions.append(selectedOption) - cell?.accessoryType = .checkmark - } - formCell?.rowDescriptor?.value = selectedOptions as AnyObject - - } else { - formCell?.rowDescriptor?.value = [AnyObject](arrayLiteral: selectedOption) as AnyObject - cell?.accessoryType = .checkmark - } - - } else { - formCell?.rowDescriptor?.value = selectedOption - } - - formCell?.update() - - if allowsMultipleSelection { - tableView.deselectRow(at: indexPath, animated: true) - } else { - let _ = self.navigationController?.popViewController(animated: true) - } - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/controllers/FormSelector.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/controllers/FormSelector.swift deleted file mode 100755 index 0032995..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/controllers/FormSelector.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// FormSelector.swift -// SwiftForms -// -// Created by Miguel Ángel Ortuño Ortuño on 23/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -@objc public protocol FormSelector: NSObjectProtocol { - var formCell: FormBaseCell? { get set } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/controllers/FormViewController.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/controllers/FormViewController.swift deleted file mode 100755 index 79c488e..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/controllers/FormViewController.swift +++ /dev/null @@ -1,225 +0,0 @@ -// -// FormViewController.swift -// SwiftForms -// -// Created by Miguel Angel Ortuño on 20/08/14. -// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -open class FormViewController : UITableViewController { - - private static var __once: () = { - FormViewController.defaultCellClasses[.text] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.label] = FormLabelCell.self - FormViewController.defaultCellClasses[.number] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.numbersAndPunctuation] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.decimal] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.name] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.phone] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.url] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.twitter] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.namePhone] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.email] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.asciiCapable] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.password] = FormTextFieldCell.self - FormViewController.defaultCellClasses[.button] = FormButtonCell.self - FormViewController.defaultCellClasses[.booleanSwitch] = FormSwitchCell.self - FormViewController.defaultCellClasses[.booleanCheck] = FormCheckCell.self - FormViewController.defaultCellClasses[.segmentedControl] = FormSegmentedControlCell.self - FormViewController.defaultCellClasses[.picker] = FormPickerCell.self - FormViewController.defaultCellClasses[.date] = FormDateCell.self - FormViewController.defaultCellClasses[.time] = FormDateCell.self - FormViewController.defaultCellClasses[.dateAndTime] = FormDateCell.self - FormViewController.defaultCellClasses[.stepper] = FormStepperCell.self - FormViewController.defaultCellClasses[.slider] = FormSliderCell.self - FormViewController.defaultCellClasses[.multipleSelector] = FormSelectorCell.self - FormViewController.defaultCellClasses[.multilineText] = FormTextViewCell.self - }() - - // MARK: Class variables - - fileprivate static var onceDefaultCellClass: Int = 0 - fileprivate static var defaultCellClasses: [FormRowDescriptor.RowType : FormBaseCell.Type] = [:] - - // MARK: Properties - - open var form = FormDescriptor() - - // MARK: Init - - public convenience init() { - self.init(style: .grouped) - } - - public convenience init(form: FormDescriptor) { - self.init(style: .grouped) - self.form = form - } - - public override init(style: UITableViewStyle) { - super.init(style: style) - } - - public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { - super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) - } - - public required init(coder aDecoder: NSCoder) { - super.init(coder: aDecoder)! - } - - // MARK: View life cycle - - open override func viewDidLoad() { - super.viewDidLoad() - navigationItem.title = form.title - } - - // MARK: Public interface - - open func valueForTag(_ tag: String) -> AnyObject? { - for section in form.sections { - for row in section.rows { - if row.tag == tag { - return row.value - } - } - } - return nil - } - - open func setValue(_ value: AnyObject, forTag tag: String) { - for (sectionIndex, section) in form.sections.enumerated() { - for (rowIndex, row) in section.rows.enumerated() { - if row.tag == tag { - form.sections[sectionIndex].rows[rowIndex].value = value - if let cell = self.tableView.cellForRow(at: IndexPath(row: rowIndex, section: sectionIndex)) as? FormBaseCell { - cell.update() - } - return - } - } - } - } - - // MARK: UITableViewDataSource - - open override func numberOfSections(in tableView: UITableView) -> Int { - return form.sections.count - } - - open override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return form.sections[section].rows.count - } - - open override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - - let rowDescriptor = formRowDescriptorAtIndexPath(indexPath) - - let formBaseCellClass = formBaseCellClassFromRowDescriptor(rowDescriptor) - - let reuseIdentifier = NSStringFromClass(formBaseCellClass!) - - var cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier) as? FormBaseCell - if cell == nil { - cell = formBaseCellClass?.init(style: .default, reuseIdentifier: reuseIdentifier) - cell?.formViewController = self - cell?.configure() - } - - cell?.rowDescriptor = rowDescriptor - - // apply cell custom design - for (keyPath, value) in rowDescriptor.configuration.cell.appearance { - cell?.setValue(value, forKeyPath: keyPath) - } - return cell! - } - - open override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { - return form.sections[section].headerTitle - } - - open override func tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? { - return form.sections[section].footerTitle - } - - open override func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { - guard let headerView = form.sections[section].headerView else { return nil } - return headerView - } - - open override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { - guard let footerView = form.sections[section].footerView else { return nil } - return footerView - } - - open override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { - guard let headerView = form.sections[section].headerView , headerView.translatesAutoresizingMaskIntoConstraints else { - return form.sections[section].headerViewHeight - } - return headerView.frame.size.height - } - - open override func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { - guard let footerView = form.sections[section].footerView , footerView.translatesAutoresizingMaskIntoConstraints else { - return form.sections[section].footerViewHeight - } - return footerView.frame.size.height - } - - // MARK: UITableViewDelegate - - open override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - - let rowDescriptor = formRowDescriptorAtIndexPath(indexPath) - - if let formBaseCellClass = formBaseCellClassFromRowDescriptor(rowDescriptor) { - return formBaseCellClass.formRowCellHeight() - } - return super.tableView(tableView, heightForRowAt: indexPath) - } - - open override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - - let rowDescriptor = formRowDescriptorAtIndexPath(indexPath) - - if let selectedRow = tableView.cellForRow(at: indexPath) as? FormBaseCell { - if let formBaseCellClass = formBaseCellClassFromRowDescriptor(rowDescriptor) { - formBaseCellClass.formViewController(self, didSelectRow: selectedRow) - } - } - - if let didSelectClosure = rowDescriptor.configuration.button.didSelectClosure { - didSelectClosure(rowDescriptor) - } - - tableView.deselectRow(at: indexPath, animated: true) - } - - fileprivate class func defaultCellClassForRowType(_ rowType: FormRowDescriptor.RowType) -> FormBaseCell.Type { - _ = FormViewController.__once - return FormViewController.defaultCellClasses[rowType]! - } - - fileprivate func formRowDescriptorAtIndexPath(_ indexPath: IndexPath) -> FormRowDescriptor { - - let section = form.sections[(indexPath as NSIndexPath).section] - let rowDescriptor = section.rows[(indexPath as NSIndexPath).row] - return rowDescriptor - } - - fileprivate func formBaseCellClassFromRowDescriptor(_ rowDescriptor: FormRowDescriptor) -> FormBaseCell.Type! { - - var formBaseCellClass: FormBaseCell.Type - - if let cellClass = rowDescriptor.configuration.cell.cellClass as? FormBaseCell.Type { - formBaseCellClass = cellClass - } else { - formBaseCellClass = FormViewController.defaultCellClassForRowType(rowDescriptor.type) - } - return formBaseCellClass - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormDescriptor.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormDescriptor.swift deleted file mode 100755 index fbe7980..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormDescriptor.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// FormDescriptor.swift -// SwiftForms -// -// Created by Miguel Angel Ortuno on 20/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -public final class FormDescriptor { - - // MARK: Properties - - public var title: String - public var sections: [FormSectionDescriptor] = [] - - // MARK: Init - - public init() { - self.title = "" - } - - public init(title: String) { - self.title = title - } - - // MARK: Public - - public func formValues() -> [String : AnyObject] { - - var formValues: [String : AnyObject] = [:] - - for section in sections { - for row in section.rows { - if row.type != .button { - if let value = row.value { - formValues[row.tag] = value - } else { - formValues[row.tag] = NSNull() - } - } - } - } - return formValues - } - - public func validateForm() -> FormRowDescriptor? { - for section in sections { - for row in section.rows { - if row.configuration.cell.required && row.value == nil { - return row - } - } - } - return nil - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormRowDescriptor.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormRowDescriptor.swift deleted file mode 100755 index 9760ca3..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormRowDescriptor.swift +++ /dev/null @@ -1,159 +0,0 @@ -// -// FormRowDescriptor.swift -// SwiftForms -// -// Created by Miguel Ángel Ortuño Ortuño on 23/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -public final class FormRowDescriptor { - - // MARK: Types - - public enum RowType { - case unknown - case label - case text - case url - case number - case numbersAndPunctuation - case decimal - case name - case phone - case namePhone - case email - case twitter - case asciiCapable - case password - case button - case booleanSwitch - case booleanCheck - case segmentedControl - case picker - case date - case time - case dateAndTime - case stepper - case slider - case multipleSelector - case multilineText - } - - public struct CellConfiguration { - public var cellClass: AnyClass? - public var appearance: [String : AnyObject] - public var placeholder: String? - public var showsInputToolbar: Bool - public var required: Bool - public var willUpdateClosure: ((FormRowDescriptor) -> Void)? - public var didUpdateClosure: ((FormRowDescriptor) -> Void)? - public var visualConstraintsClosure: ((FormBaseCell) -> [String])? - - public init() { - cellClass = nil - appearance = [:] - placeholder = nil - showsInputToolbar = false - required = true - willUpdateClosure = nil - didUpdateClosure = nil - visualConstraintsClosure = nil - } - } - - public struct SelectionConfiguration { - public var controllerClass: AnyClass? - public var options: [AnyObject] - public var optionTitleClosure: ((AnyObject) -> String)? - public var allowsMultipleSelection: Bool - - public init() { - controllerClass = nil - options = [] - optionTitleClosure = nil - allowsMultipleSelection = false - } - } - - public struct ButtonConfiguration { - public var didSelectClosure: ((FormRowDescriptor) -> Void)? - - public init() { - didSelectClosure = nil - } - } - - public struct StepperConfiguration { - public var maximumValue: Double - public var minimumValue: Double - public var steps: Double - public var continuous: Bool - - public init() { - maximumValue = 0.0 - minimumValue = 0.0 - steps = 0.0 - continuous = false - } - } - - public struct DateConfiguration { - public var dateFormatter: DateFormatter? - } - - public struct RowConfiguration { - public var cell: CellConfiguration - public var selection: SelectionConfiguration - public var button: ButtonConfiguration - public var stepper: StepperConfiguration - public var date: DateConfiguration - public var userInfo: [String : AnyObject] - - init() { - cell = CellConfiguration() - selection = SelectionConfiguration() - button = ButtonConfiguration() - stepper = StepperConfiguration() - date = DateConfiguration() - userInfo = [:] - } - } - - // MARK: Properties - - public let tag: String - public let type: RowType - - public var title: String? - - public var value: AnyObject? { - willSet { - guard let willUpdateBlock = configuration.cell.willUpdateClosure else { return } - willUpdateBlock(self) - } - didSet { - guard let didUpdateBlock = configuration.cell.didUpdateClosure else { return } - didUpdateBlock(self) - } - } - - public var configuration: RowConfiguration - - // MARK: Init - - public init(tag: String, type: RowType, title: String, configuration: RowConfiguration) { - self.tag = tag - self.type = type - self.title = title - self.configuration = configuration - } - - public init(tag: String, type: RowType, title: String) { - self.tag = tag - self.type = type - self.title = title - self.configuration = RowConfiguration() - } -} diff --git a/Old My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormSectionDescriptor.swift b/Old My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormSectionDescriptor.swift deleted file mode 100755 index 7db6681..0000000 --- a/Old My Mind/Pods/SwiftForms/SwiftForms/descriptors/FormSectionDescriptor.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// FormSectionDescriptor.swift -// SwiftForms -// -// Created by Miguel Angel Ortuno on 20/08/14. -// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved. -// - -import UIKit - -public final class FormSectionDescriptor { - - // MARK: Properties - - public var rows: [FormRowDescriptor] = [] - - public var headerTitle: String? - public var footerTitle: String? - - public var headerView: UIView? - public var footerView: UIView? - - public var headerViewHeight: CGFloat = UITableViewAutomaticDimension - public var footerViewHeight: CGFloat = UITableViewAutomaticDimension - - // MARK: Init - - public init(headerTitle: String?, footerTitle: String?) { - self.headerTitle = headerTitle - self.footerTitle = footerTitle - } -} diff --git a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Info.plist b/Old My Mind/Pods/Target Support Files/Pods-My Mind/Info.plist deleted file mode 100755 index 2243fe6..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-acknowledgements.markdown b/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-acknowledgements.markdown deleted file mode 100755 index aedd1b8..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-acknowledgements.markdown +++ /dev/null @@ -1,518 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## Firebase - -Copyright 2017 Google - -## FirebaseAnalytics - -Copyright 2017 Google - -## FirebaseAuth - -Copyright 2017 Google - -## FirebaseCore - -Copyright 2017 Google - -## FirebaseDatabase - -Copyright 2017 Google - -## FirebaseInstanceID - -Copyright 2017 Google - -## FirebaseMessaging - -Copyright 2017 Google - -## FirebaseStorage - -Copyright 2017 Google - -## GTMSessionFetcher - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -## GoogleToolboxForMac - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -## Protobuf - -This license applies to all parts of Protocol Buffers except the following: - - - Atomicops support for generic gcc, located in - src/google/protobuf/stubs/atomicops_internals_generic_gcc.h. - This file is copyrighted by Red Hat Inc. - - - Atomicops support for AIX/POWER, located in - src/google/protobuf/stubs/atomicops_internals_power.h. - This file is copyrighted by Bloomberg Finance LP. - -Copyright 2014, Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. - - -## SwiftForms - -The MIT License (MIT) - -Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) -Copyright (c) 2014 Miguel Ángel Ortuño ( ortuman@gmail.com ) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-acknowledgements.plist b/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-acknowledgements.plist deleted file mode 100755 index 287ce8c..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-acknowledgements.plist +++ /dev/null @@ -1,616 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright 2017 Google - License - Copyright - Title - Firebase - Type - PSGroupSpecifier - - - FooterText - Copyright 2017 Google - License - Copyright - Title - FirebaseAnalytics - Type - PSGroupSpecifier - - - FooterText - Copyright 2017 Google - License - Copyright - Title - FirebaseAuth - Type - PSGroupSpecifier - - - FooterText - Copyright 2017 Google - License - Copyright - Title - FirebaseCore - Type - PSGroupSpecifier - - - FooterText - Copyright 2017 Google - License - Copyright - Title - FirebaseDatabase - Type - PSGroupSpecifier - - - FooterText - Copyright 2017 Google - License - Copyright - Title - FirebaseInstanceID - Type - PSGroupSpecifier - - - FooterText - Copyright 2017 Google - License - Copyright - Title - FirebaseMessaging - Type - PSGroupSpecifier - - - FooterText - Copyright 2017 Google - License - Copyright - Title - FirebaseStorage - Type - PSGroupSpecifier - - - FooterText - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - License - Apache - Title - GTMSessionFetcher - Type - PSGroupSpecifier - - - FooterText - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - License - Apache - Title - GoogleToolboxForMac - Type - PSGroupSpecifier - - - FooterText - This license applies to all parts of Protocol Buffers except the following: - - - Atomicops support for generic gcc, located in - src/google/protobuf/stubs/atomicops_internals_generic_gcc.h. - This file is copyrighted by Red Hat Inc. - - - Atomicops support for AIX/POWER, located in - src/google/protobuf/stubs/atomicops_internals_power.h. - This file is copyrighted by Bloomberg Finance LP. - -Copyright 2014, Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. - - License - New BSD - Title - Protobuf - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) -Copyright (c) 2014 Miguel Ángel Ortuño ( ortuman@gmail.com ) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - License - MIT - Title - SwiftForms - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-dummy.m b/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-dummy.m deleted file mode 100755 index 0ed997e..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_My_Mind : NSObject -@end -@implementation PodsDummy_Pods_My_Mind -@end diff --git a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-frameworks.sh b/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-frameworks.sh deleted file mode 100755 index 4d97a87..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-frameworks.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh -set -e - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" - stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi -} - - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/GTMSessionFetcher/GTMSessionFetcher.framework" - install_framework "$BUILT_PRODUCTS_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework" - install_framework "$BUILT_PRODUCTS_DIR/Protobuf/Protobuf.framework" - install_framework "$BUILT_PRODUCTS_DIR/SwiftForms/SwiftForms.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/GTMSessionFetcher/GTMSessionFetcher.framework" - install_framework "$BUILT_PRODUCTS_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework" - install_framework "$BUILT_PRODUCTS_DIR/Protobuf/Protobuf.framework" - install_framework "$BUILT_PRODUCTS_DIR/SwiftForms/SwiftForms.framework" -fi -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-resources.sh b/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-resources.sh deleted file mode 100755 index aed060f..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-resources.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-umbrella.h b/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-umbrella.h deleted file mode 100755 index 1220131..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_My_MindVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_My_MindVersionString[]; - diff --git a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.debug.xcconfig b/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.debug.xcconfig deleted file mode 100755 index 8e98db6..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher" "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac" "$PODS_CONFIGURATION_BUILD_DIR/Protobuf" "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms" "${PODS_ROOT}/FirebaseAnalytics/Frameworks" "${PODS_ROOT}/FirebaseAuth/Frameworks" "${PODS_ROOT}/FirebaseCore/Frameworks" "${PODS_ROOT}/FirebaseDatabase/Frameworks" "${PODS_ROOT}/FirebaseInstanceID/Frameworks" "${PODS_ROOT}/FirebaseMessaging/Frameworks" "${PODS_ROOT}/FirebaseStorage/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 $(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 -HEADER_SEARCH_PATHS = $(inherited) ${PODS_ROOT}/Firebase/Core/Sources $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Firebase" "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" "${PODS_ROOT}/Headers/Public/FirebaseAuth" "${PODS_ROOT}/Headers/Public/FirebaseCore" "${PODS_ROOT}/Headers/Public/FirebaseDatabase" "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" "${PODS_ROOT}/Headers/Public/FirebaseMessaging" "${PODS_ROOT}/Headers/Public/FirebaseStorage" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher/GTMSessionFetcher.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Protobuf/Protobuf.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms/SwiftForms.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Firebase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAuth" -isystem "${PODS_ROOT}/Headers/Public/FirebaseCore" -isystem "${PODS_ROOT}/Headers/Public/FirebaseDatabase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" -isystem "${PODS_ROOT}/Headers/Public/FirebaseMessaging" -isystem "${PODS_ROOT}/Headers/Public/FirebaseStorage" -OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"icucore" -l"sqlite3" -l"z" -framework "AddressBook" -framework "CFNetwork" -framework "FirebaseAnalytics" -framework "FirebaseAuth" -framework "FirebaseCore" -framework "FirebaseDatabase" -framework "FirebaseInstanceID" -framework "FirebaseMessaging" -framework "FirebaseStorage" -framework "GTMSessionFetcher" -framework "GoogleToolboxForMac" -framework "MobileCoreServices" -framework "Protobuf" -framework "Security" -framework "StoreKit" -framework "SwiftForms" -framework "SystemConfiguration" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.modulemap b/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.modulemap deleted file mode 100755 index d34bdf8..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_My_Mind { - umbrella header "Pods-My Mind-umbrella.h" - - export * - module * { export * } -} diff --git a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.release.xcconfig b/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.release.xcconfig deleted file mode 100755 index 8e98db6..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My Mind/Pods-My Mind.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher" "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac" "$PODS_CONFIGURATION_BUILD_DIR/Protobuf" "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms" "${PODS_ROOT}/FirebaseAnalytics/Frameworks" "${PODS_ROOT}/FirebaseAuth/Frameworks" "${PODS_ROOT}/FirebaseCore/Frameworks" "${PODS_ROOT}/FirebaseDatabase/Frameworks" "${PODS_ROOT}/FirebaseInstanceID/Frameworks" "${PODS_ROOT}/FirebaseMessaging/Frameworks" "${PODS_ROOT}/FirebaseStorage/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 $(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 -HEADER_SEARCH_PATHS = $(inherited) ${PODS_ROOT}/Firebase/Core/Sources $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Firebase" "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" "${PODS_ROOT}/Headers/Public/FirebaseAuth" "${PODS_ROOT}/Headers/Public/FirebaseCore" "${PODS_ROOT}/Headers/Public/FirebaseDatabase" "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" "${PODS_ROOT}/Headers/Public/FirebaseMessaging" "${PODS_ROOT}/Headers/Public/FirebaseStorage" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher/GTMSessionFetcher.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Protobuf/Protobuf.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms/SwiftForms.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Firebase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAuth" -isystem "${PODS_ROOT}/Headers/Public/FirebaseCore" -isystem "${PODS_ROOT}/Headers/Public/FirebaseDatabase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" -isystem "${PODS_ROOT}/Headers/Public/FirebaseMessaging" -isystem "${PODS_ROOT}/Headers/Public/FirebaseStorage" -OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"icucore" -l"sqlite3" -l"z" -framework "AddressBook" -framework "CFNetwork" -framework "FirebaseAnalytics" -framework "FirebaseAuth" -framework "FirebaseCore" -framework "FirebaseDatabase" -framework "FirebaseInstanceID" -framework "FirebaseMessaging" -framework "FirebaseStorage" -framework "GTMSessionFetcher" -framework "GoogleToolboxForMac" -framework "MobileCoreServices" -framework "Protobuf" -framework "Security" -framework "StoreKit" -framework "SwiftForms" -framework "SystemConfiguration" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Info.plist b/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Info.plist deleted file mode 100755 index 2243fe6..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-acknowledgements.plist b/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-acknowledgements.plist deleted file mode 100755 index 7acbad1..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-acknowledgements.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-dummy.m b/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-dummy.m deleted file mode 100755 index f84b2a7..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_My_MindTests : NSObject -@end -@implementation PodsDummy_Pods_My_MindTests -@end diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-umbrella.h b/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-umbrella.h deleted file mode 100755 index e44f227..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_My_MindTestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_My_MindTestsVersionString[]; - diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.debug.xcconfig b/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.debug.xcconfig deleted file mode 100755 index 25a88d0..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.debug.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher" "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac" "$PODS_CONFIGURATION_BUILD_DIR/Protobuf" "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms" "${PODS_ROOT}/FirebaseAnalytics/Frameworks" "${PODS_ROOT}/FirebaseAuth/Frameworks" "${PODS_ROOT}/FirebaseCore/Frameworks" "${PODS_ROOT}/FirebaseDatabase/Frameworks" "${PODS_ROOT}/FirebaseInstanceID/Frameworks" "${PODS_ROOT}/FirebaseMessaging/Frameworks" "${PODS_ROOT}/FirebaseStorage/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Firebase" "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" "${PODS_ROOT}/Headers/Public/FirebaseAuth" "${PODS_ROOT}/Headers/Public/FirebaseCore" "${PODS_ROOT}/Headers/Public/FirebaseDatabase" "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" "${PODS_ROOT}/Headers/Public/FirebaseMessaging" "${PODS_ROOT}/Headers/Public/FirebaseStorage" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher/GTMSessionFetcher.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Protobuf/Protobuf.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms/SwiftForms.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Firebase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAuth" -isystem "${PODS_ROOT}/Headers/Public/FirebaseCore" -isystem "${PODS_ROOT}/Headers/Public/FirebaseDatabase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" -isystem "${PODS_ROOT}/Headers/Public/FirebaseMessaging" -isystem "${PODS_ROOT}/Headers/Public/FirebaseStorage" -OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"sqlite3" -l"z" -framework "AddressBook" -framework "CFNetwork" -framework "MobileCoreServices" -framework "Security" -framework "StoreKit" -framework "SystemConfiguration" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.modulemap b/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.modulemap deleted file mode 100755 index 6fa4ca3..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_My_MindTests { - umbrella header "Pods-My MindTests-umbrella.h" - - export * - module * { export * } -} diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.release.xcconfig b/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.release.xcconfig deleted file mode 100755 index 25a88d0..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindTests/Pods-My MindTests.release.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher" "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac" "$PODS_CONFIGURATION_BUILD_DIR/Protobuf" "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms" "${PODS_ROOT}/FirebaseAnalytics/Frameworks" "${PODS_ROOT}/FirebaseAuth/Frameworks" "${PODS_ROOT}/FirebaseCore/Frameworks" "${PODS_ROOT}/FirebaseDatabase/Frameworks" "${PODS_ROOT}/FirebaseInstanceID/Frameworks" "${PODS_ROOT}/FirebaseMessaging/Frameworks" "${PODS_ROOT}/FirebaseStorage/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Firebase" "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" "${PODS_ROOT}/Headers/Public/FirebaseAuth" "${PODS_ROOT}/Headers/Public/FirebaseCore" "${PODS_ROOT}/Headers/Public/FirebaseDatabase" "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" "${PODS_ROOT}/Headers/Public/FirebaseMessaging" "${PODS_ROOT}/Headers/Public/FirebaseStorage" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher/GTMSessionFetcher.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Protobuf/Protobuf.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms/SwiftForms.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Firebase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAuth" -isystem "${PODS_ROOT}/Headers/Public/FirebaseCore" -isystem "${PODS_ROOT}/Headers/Public/FirebaseDatabase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" -isystem "${PODS_ROOT}/Headers/Public/FirebaseMessaging" -isystem "${PODS_ROOT}/Headers/Public/FirebaseStorage" -OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"sqlite3" -l"z" -framework "AddressBook" -framework "CFNetwork" -framework "MobileCoreServices" -framework "Security" -framework "StoreKit" -framework "SystemConfiguration" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Info.plist b/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Info.plist deleted file mode 100755 index 2243fe6..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-acknowledgements.plist b/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-acknowledgements.plist deleted file mode 100755 index 7acbad1..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-acknowledgements.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-dummy.m b/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-dummy.m deleted file mode 100755 index bc15bcd..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_My_MindUITests : NSObject -@end -@implementation PodsDummy_Pods_My_MindUITests -@end diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-umbrella.h b/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-umbrella.h deleted file mode 100755 index 58425c8..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_My_MindUITestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_My_MindUITestsVersionString[]; - diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.debug.xcconfig b/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.debug.xcconfig deleted file mode 100755 index 25a88d0..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.debug.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher" "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac" "$PODS_CONFIGURATION_BUILD_DIR/Protobuf" "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms" "${PODS_ROOT}/FirebaseAnalytics/Frameworks" "${PODS_ROOT}/FirebaseAuth/Frameworks" "${PODS_ROOT}/FirebaseCore/Frameworks" "${PODS_ROOT}/FirebaseDatabase/Frameworks" "${PODS_ROOT}/FirebaseInstanceID/Frameworks" "${PODS_ROOT}/FirebaseMessaging/Frameworks" "${PODS_ROOT}/FirebaseStorage/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Firebase" "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" "${PODS_ROOT}/Headers/Public/FirebaseAuth" "${PODS_ROOT}/Headers/Public/FirebaseCore" "${PODS_ROOT}/Headers/Public/FirebaseDatabase" "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" "${PODS_ROOT}/Headers/Public/FirebaseMessaging" "${PODS_ROOT}/Headers/Public/FirebaseStorage" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher/GTMSessionFetcher.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Protobuf/Protobuf.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms/SwiftForms.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Firebase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAuth" -isystem "${PODS_ROOT}/Headers/Public/FirebaseCore" -isystem "${PODS_ROOT}/Headers/Public/FirebaseDatabase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" -isystem "${PODS_ROOT}/Headers/Public/FirebaseMessaging" -isystem "${PODS_ROOT}/Headers/Public/FirebaseStorage" -OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"sqlite3" -l"z" -framework "AddressBook" -framework "CFNetwork" -framework "MobileCoreServices" -framework "Security" -framework "StoreKit" -framework "SystemConfiguration" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.modulemap b/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.modulemap deleted file mode 100755 index 4143236..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_My_MindUITests { - umbrella header "Pods-My MindUITests-umbrella.h" - - export * - module * { export * } -} diff --git a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.release.xcconfig b/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.release.xcconfig deleted file mode 100755 index 25a88d0..0000000 --- a/Old My Mind/Pods/Target Support Files/Pods-My MindUITests/Pods-My MindUITests.release.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher" "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac" "$PODS_CONFIGURATION_BUILD_DIR/Protobuf" "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms" "${PODS_ROOT}/FirebaseAnalytics/Frameworks" "${PODS_ROOT}/FirebaseAuth/Frameworks" "${PODS_ROOT}/FirebaseCore/Frameworks" "${PODS_ROOT}/FirebaseDatabase/Frameworks" "${PODS_ROOT}/FirebaseInstanceID/Frameworks" "${PODS_ROOT}/FirebaseMessaging/Frameworks" "${PODS_ROOT}/FirebaseStorage/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Firebase" "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" "${PODS_ROOT}/Headers/Public/FirebaseAuth" "${PODS_ROOT}/Headers/Public/FirebaseCore" "${PODS_ROOT}/Headers/Public/FirebaseDatabase" "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" "${PODS_ROOT}/Headers/Public/FirebaseMessaging" "${PODS_ROOT}/Headers/Public/FirebaseStorage" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/GTMSessionFetcher/GTMSessionFetcher.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Protobuf/Protobuf.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftForms/SwiftForms.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Firebase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" -isystem "${PODS_ROOT}/Headers/Public/FirebaseAuth" -isystem "${PODS_ROOT}/Headers/Public/FirebaseCore" -isystem "${PODS_ROOT}/Headers/Public/FirebaseDatabase" -isystem "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" -isystem "${PODS_ROOT}/Headers/Public/FirebaseMessaging" -isystem "${PODS_ROOT}/Headers/Public/FirebaseStorage" -OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"sqlite3" -l"z" -framework "AddressBook" -framework "CFNetwork" -framework "MobileCoreServices" -framework "Security" -framework "StoreKit" -framework "SystemConfiguration" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/Old My Mind/Pods/Target Support Files/SwiftForms/Info.plist b/Old My Mind/Pods/Target Support Files/SwiftForms/Info.plist deleted file mode 100755 index fcedd03..0000000 --- a/Old My Mind/Pods/Target Support Files/SwiftForms/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.7.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-dummy.m b/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-dummy.m deleted file mode 100755 index 0f311b1..0000000 --- a/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_SwiftForms : NSObject -@end -@implementation PodsDummy_SwiftForms -@end diff --git a/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-prefix.pch b/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-prefix.pch deleted file mode 100755 index beb2a24..0000000 --- a/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-umbrella.h b/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-umbrella.h deleted file mode 100755 index 3545fd2..0000000 --- a/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double SwiftFormsVersionNumber; -FOUNDATION_EXPORT const unsigned char SwiftFormsVersionString[]; - diff --git a/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms.modulemap b/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms.modulemap deleted file mode 100755 index 789f293..0000000 --- a/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module SwiftForms { - umbrella header "SwiftForms-umbrella.h" - - export * - module * { export * } -} diff --git a/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms.xcconfig b/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms.xcconfig deleted file mode 100755 index e85163e..0000000 --- a/Old My Mind/Pods/Target Support Files/SwiftForms/SwiftForms.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SwiftForms -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Firebase" "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" "${PODS_ROOT}/Headers/Public/FirebaseAuth" "${PODS_ROOT}/Headers/Public/FirebaseCore" "${PODS_ROOT}/Headers/Public/FirebaseDatabase" "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" "${PODS_ROOT}/Headers/Public/FirebaseMessaging" "${PODS_ROOT}/Headers/Public/FirebaseStorage" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftForms -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Project Reports/Final Year Project Report Final Draft.pdf b/Project Reports/Final Year Project Report Final Draft.pdf deleted file mode 100755 index f8d6b2c..0000000 Binary files a/Project Reports/Final Year Project Report Final Draft.pdf and /dev/null differ diff --git a/Project Reports/Project Presentation.pdf b/Project Reports/Project Presentation.pdf deleted file mode 100755 index 7669308..0000000 Binary files a/Project Reports/Project Presentation.pdf and /dev/null differ diff --git a/Project Reports/Project Presentation.png b/Project Reports/Project Presentation.png deleted file mode 100755 index ca5d081..0000000 Binary files a/Project Reports/Project Presentation.png and /dev/null differ diff --git a/Project Reports/Version 1.docx b/Project Reports/Version 1.docx deleted file mode 100755 index c0b1f03..0000000 Binary files a/Project Reports/Version 1.docx and /dev/null differ diff --git a/Research Documents/My Mind Evaluation.docx b/Research Documents/My Mind Evaluation.docx old mode 100755 new mode 100644 diff --git a/Research Documents/My Mind Evaluation.pdf b/Research Documents/My Mind Evaluation.pdf old mode 100755 new mode 100644 diff --git a/Research Documents/Wellbeing:Mental Health:Counselling Registration Form Original Version.docx b/Research Documents/Wellbeing:Mental Health:Counselling Registration Form Original Version.docx old mode 100755 new mode 100644 diff --git a/Supporting Documents/.DS_Store b/Supporting Documents/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/Supporting Documents/.DS_Store differ diff --git a/Supporting Documents/My Mind App Flowchart.png b/Supporting Documents/My Mind App Flowchart.png new file mode 100644 index 0000000..e0922f2 Binary files /dev/null and b/Supporting Documents/My Mind App Flowchart.png differ diff --git a/Supporting Documents/My Mind Flowchart.vsdx b/Supporting Documents/My Mind Flowchart.vsdx new file mode 100644 index 0000000..c1cb51c Binary files /dev/null and b/Supporting Documents/My Mind Flowchart.vsdx differ diff --git a/Supporting Documents/My Mind System Diagram.png b/Supporting Documents/My Mind System Diagram.png new file mode 100644 index 0000000..92ff78a Binary files /dev/null and b/Supporting Documents/My Mind System Diagram.png differ diff --git a/Supporting Documents/New My Mind Process Flowchart.png b/Supporting Documents/New My Mind Process Flowchart.png new file mode 100644 index 0000000..76a82bf Binary files /dev/null and b/Supporting Documents/New My Mind Process Flowchart.png differ diff --git a/Supporting Documents/Old My Mind Process Flowchart.png b/Supporting Documents/Old My Mind Process Flowchart.png new file mode 100644 index 0000000..96f3831 Binary files /dev/null and b/Supporting Documents/Old My Mind Process Flowchart.png differ diff --git a/Supporting Documents/Project Plan.mpp b/Supporting Documents/Project Plan.mpp new file mode 100644 index 0000000..84a5c8f Binary files /dev/null and b/Supporting Documents/Project Plan.mpp differ diff --git a/Supporting Documents/Project Plan.pdf b/Supporting Documents/Project Plan.pdf new file mode 100644 index 0000000..2ca6ead Binary files /dev/null and b/Supporting Documents/Project Plan.pdf differ diff --git a/Supporting Documents/Project Proposal - System Architecture.vsdx b/Supporting Documents/Project Proposal - System Architecture.vsdx new file mode 100644 index 0000000..3222619 Binary files /dev/null and b/Supporting Documents/Project Proposal - System Architecture.vsdx differ diff --git a/Test Accounts.docx b/Test Accounts.docx deleted file mode 100755 index 1f83880..0000000 Binary files a/Test Accounts.docx and /dev/null differ