diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..0bacd4d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,11 @@ +# ⚠️ Updating the submodule requires also an update of the windows libraries. +[submodule "src/libdivecomputer"] + path = src/libdivecomputer + url = https://github.com/libdivecomputer/libdivecomputer.git + +[submodule "src/hidapi"] + path = src/hidapi + url = https://github.com/libusb/hidapi.git +[submodule "src/libusb"] + path = src/libusb + url = https://github.com/libusb/libusb.git diff --git a/.metadata b/.metadata index b7b73da..7aa29a8 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "b0366e0a3f089e15fd89c97604ab402fe26b724c" + revision: "67457e669f79e9f8d13d7a68fe09775fefbb79f4" channel: "stable" project_type: plugin_ffi @@ -13,17 +13,20 @@ project_type: plugin_ffi migration: platforms: - platform: root - create_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c - base_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - platform: android - create_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c - base_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + - platform: ios + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - platform: macos - create_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c - base_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - platform: windows - create_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c - base_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 # User provided section diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d4c483..4cef75b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## 0.1.0-dev.2 + +* Reenable windows support through compiled libraries +* Reenable android support through compiled libraries + + +## 0.1.0-dev.1 + +* Adding USB Support for dive computers (#2) @Ben1980 +* Build from source (#1) @Ben1980 + + ## 0.0.1 * Initial release diff --git a/README.md b/README.md index db05c05..9736e44 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,14 @@ This plugin automatically spawns its own isolate for communication with the dive Please refer to the example app for a minimalistic example usage. +# macOS + +This plugin supports USB and Serial connection on macOS. On macOS you need to make sure the app has access to the USB connection granted. To do so add the following snippet to info.plist and make sure you grant USB access in xcode via `Signing & Capabilities -> Hardware -> USB`. +``` +NSUSBPeripheralUsageDescription +Your explanation here +``` + --- ### Acknowledgements diff --git a/android/build.gradle b/android/build.gradle index d2c199a..0d1580a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -42,7 +42,7 @@ android { sourceSets { main { // Bundle so files with the final apk. - jniLibs.srcDirs = ['../native/lib/android'] + jniLibs.srcDirs = ['libraries'] } } diff --git a/android/libraries/arm64-v8a/libdivecomputer.so b/android/libraries/arm64-v8a/libdivecomputer.so new file mode 100644 index 0000000..c21d68e Binary files /dev/null and b/android/libraries/arm64-v8a/libdivecomputer.so differ diff --git a/android/libraries/armeabi-v7a/libdivecomputer.so b/android/libraries/armeabi-v7a/libdivecomputer.so new file mode 100644 index 0000000..f21b760 Binary files /dev/null and b/android/libraries/armeabi-v7a/libdivecomputer.so differ diff --git a/android/libraries/x86/libdivecomputer.so b/android/libraries/x86/libdivecomputer.so new file mode 100644 index 0000000..235f6bf Binary files /dev/null and b/android/libraries/x86/libdivecomputer.so differ diff --git a/android/libraries/x86_64/libdivecomputer.so b/android/libraries/x86_64/libdivecomputer.so new file mode 100644 index 0000000..5a331e8 Binary files /dev/null and b/android/libraries/x86_64/libdivecomputer.so differ diff --git a/example/README.md b/example/README.md new file mode 100644 index 0000000..62deb71 --- /dev/null +++ b/example/README.md @@ -0,0 +1,16 @@ +# dive_computer_example + +Demonstrates how to use the dive_computer plugin. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/example/android/app/src/main/kotlin/app/divenote/dive_computer_ffi_example/MainActivity.kt b/example/android/app/src/main/kotlin/app/divenote/dive_computer_ffi_example/MainActivity.kt deleted file mode 100644 index 4656516..0000000 --- a/example/android/app/src/main/kotlin/app/divenote/dive_computer_ffi_example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package app.divenote.dive_computer_example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/example/ios/.gitignore b/example/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..7c56964 --- /dev/null +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..ec97fc6 --- /dev/null +++ b/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..c4855bf --- /dev/null +++ b/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/example/ios/Podfile b/example/ios/Podfile new file mode 100644 index 0000000..d97f17e --- /dev/null +++ b/example/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '12.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock new file mode 100644 index 0000000..975fd78 --- /dev/null +++ b/example/ios/Podfile.lock @@ -0,0 +1,22 @@ +PODS: + - dive_computer (0.0.1): + - Flutter + - Flutter (1.0.0) + +DEPENDENCIES: + - dive_computer (from `.symlinks/plugins/dive_computer/ios`) + - Flutter (from `Flutter`) + +EXTERNAL SOURCES: + dive_computer: + :path: ".symlinks/plugins/dive_computer/ios" + Flutter: + :path: Flutter + +SPEC CHECKSUMS: + dive_computer: b7f216c7462ea4d565c0cd0d23395df3309bbe56 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + +PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 + +COCOAPODS: 1.13.0 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..8cf5511 --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,725 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 2A964E8657232A83F5A429AE /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A8BBED2A04CB85A6DA9C725 /* Pods_RunnerTests.framework */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + D69F03773F7A0F3F3CE8CD0D /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8EC991CD349A2CB921C06F8F /* Pods_Runner.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0CD38D331467716ED3066AA8 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3AD9C70ADB7B6E9B4729AE06 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 55103F418317CD4187D8084C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 5578EFE77C8AFCEA53A441EA /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 756370A1139B731B21E753EA /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 7A8BBED2A04CB85A6DA9C725 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 8EC991CD349A2CB921C06F8F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D89C407DF6F9D885D259783E /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 75F5CFED740990D932AADC65 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A964E8657232A83F5A429AE /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D69F03773F7A0F3F3CE8CD0D /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 229E9C7CE542AD93B870AD62 /* Pods */ = { + isa = PBXGroup; + children = ( + D89C407DF6F9D885D259783E /* Pods-Runner.debug.xcconfig */, + 0CD38D331467716ED3066AA8 /* Pods-Runner.release.xcconfig */, + 3AD9C70ADB7B6E9B4729AE06 /* Pods-Runner.profile.xcconfig */, + 756370A1139B731B21E753EA /* Pods-RunnerTests.debug.xcconfig */, + 55103F418317CD4187D8084C /* Pods-RunnerTests.release.xcconfig */, + 5578EFE77C8AFCEA53A441EA /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 953DFDD5C45B4DDDA096E9A4 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 8EC991CD349A2CB921C06F8F /* Pods_Runner.framework */, + 7A8BBED2A04CB85A6DA9C725 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + 229E9C7CE542AD93B870AD62 /* Pods */, + 953DFDD5C45B4DDDA096E9A4 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 0A1B5FF57C44F7F7E6C89588 /* [CP] Check Pods Manifest.lock */, + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + 75F5CFED740990D932AADC65 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 99485787850771D1A076D0B6 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 4784EFBF2FF99F6D74E8C8ED /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 0A1B5FF57C44F7F7E6C89588 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + 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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 4784EFBF2FF99F6D74E8C8ED /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + 99485787850771D1A076D0B6 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + 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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 9U48FXASRQ; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 756370A1139B731B21E753EA /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 55103F418317CD4187D8084C /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5578EFE77C8AFCEA53A441EA /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 9U48FXASRQ; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 9U48FXASRQ; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..87131a0 --- /dev/null +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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" : "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" : "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" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..7353c41 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..6ed2d93 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cd7b00 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..fe73094 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..321773c Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..502f463 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..e9f5fea Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..84ac32a Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..8953cba Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..0467bf1 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner/Base.lproj/Main.storyboard b/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist new file mode 100644 index 0000000..726e042 --- /dev/null +++ b/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Dive Computer + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + dive_computer_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/example/ios/Runner/Runner-Bridging-Header.h b/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/example/ios/RunnerTests/RunnerTests.swift b/example/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..86a7c3b --- /dev/null +++ b/example/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock index 9431bef..f554fd3 100644 --- a/example/macos/Podfile.lock +++ b/example/macos/Podfile.lock @@ -1,22 +1,22 @@ -PODS: - - dive_computer (0.0.1): - - FlutterMacOS - - FlutterMacOS (1.0.0) - -DEPENDENCIES: - - dive_computer (from `Flutter/ephemeral/.symlinks/plugins/dive_computer/macos`) - - FlutterMacOS (from `Flutter/ephemeral`) - -EXTERNAL SOURCES: - dive_computer: - :path: Flutter/ephemeral/.symlinks/plugins/dive_computer/macos - FlutterMacOS: - :path: Flutter/ephemeral - -SPEC CHECKSUMS: - dive_computer: aa10146966f7574825b957dccaee47ceb5c5cc3a - FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - -PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 - -COCOAPODS: 1.14.3 +PODS: + - dive_computer (0.0.1): + - FlutterMacOS + - FlutterMacOS (1.0.0) + +DEPENDENCIES: + - dive_computer (from `Flutter/ephemeral/.symlinks/plugins/dive_computer/macos`) + - FlutterMacOS (from `Flutter/ephemeral`) + +EXTERNAL SOURCES: + dive_computer: + :path: Flutter/ephemeral/.symlinks/plugins/dive_computer/macos + FlutterMacOS: + :path: Flutter/ephemeral + +SPEC CHECKSUMS: + dive_computer: e512b5b2b343092ee9551c845b8f84ad38a019c7 + FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 + +PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 + +COCOAPODS: 1.15.2 diff --git a/example/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj index ffcd633..4b0ff07 100644 --- a/example/macos/Runner.xcodeproj/project.pbxproj +++ b/example/macos/Runner.xcodeproj/project.pbxproj @@ -1,787 +1,806 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXAggregateTarget section */ - 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; - buildPhases = ( - 33CC111E2044C6BF0003C045 /* ShellScript */, - ); - dependencies = ( - ); - name = "Flutter Assemble"; - productName = FLX; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 262E412DF37AA4627DE9CE94 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 866168B11938ECFE46CFB139 /* Pods_Runner.framework */; }; - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - CDF727C5C51DE46A62037ED3 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8833DC8D350DF77B2F889694 /* Pods_RunnerTests.framework */; }; - D85A387C2B49ED9F0078351E /* libdivecomputer.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D85A387B2B49ED9F0078351E /* libdivecomputer.0.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; - D85A387D2B49EDA50078351E /* libdivecomputer.0.dylib in Bundle Framework */ = {isa = PBXBuildFile; fileRef = D85A387B2B49ED9F0078351E /* libdivecomputer.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC10EC2044A3C60003C045; - remoteInfo = Runner; - }; - 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC111A2044C6BA0003C045; - remoteInfo = FLX; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 33CC110E2044A8840003C045 /* Bundle Framework */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - D85A387D2B49EDA50078351E /* libdivecomputer.0.dylib in Bundle Framework */, - ); - name = "Bundle Framework"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* dive_computer_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = dive_computer_example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; - 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; - 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; - 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; - 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; - 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 780A784A7027ED5C872FF467 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; - 78A485573E1A8C4FAEFA1EDC /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 8143EB21C71643C0EFB27CB4 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; - 866168B11938ECFE46CFB139 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8833DC8D350DF77B2F889694 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8883DCAD72F734BD88FFF5F1 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - 95F5AACB4C47F0F7503DE220 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - D85A387B2B49ED9F0078351E /* libdivecomputer.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libdivecomputer.0.dylib; path = ../../native/lib/macos/libdivecomputer.0.dylib; sourceTree = ""; }; - DB9FA2622AABAC1AD710C9A2 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 331C80D2294CF70F00263BE5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CDF727C5C51DE46A62037ED3 /* Pods_RunnerTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 262E412DF37AA4627DE9CE94 /* Pods_Runner.framework in Frameworks */, - D85A387C2B49ED9F0078351E /* libdivecomputer.0.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 331C80D6294CF71000263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C80D7294CF71000263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; - 33BA886A226E78AF003329D5 /* Configs */ = { - isa = PBXGroup; - children = ( - 33E5194F232828860026EE4D /* AppInfo.xcconfig */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, - ); - path = Configs; - sourceTree = ""; - }; - 33CC10E42044A3C60003C045 = { - isa = PBXGroup; - children = ( - 33FAB671232836740065AC1E /* Runner */, - 33CEB47122A05771004F2AC0 /* Flutter */, - 331C80D6294CF71000263BE5 /* RunnerTests */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - 4F28B5A0EF698A308363E922 /* Pods */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* dive_computer_example.app */, - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 33CC11242044D66E0003C045 /* Resources */ = { - isa = PBXGroup; - children = ( - 33CC10F22044A3C60003C045 /* Assets.xcassets */, - 33CC10F42044A3C60003C045 /* MainMenu.xib */, - 33CC10F72044A3C60003C045 /* Info.plist */, - ); - name = Resources; - path = ..; - sourceTree = ""; - }; - 33CEB47122A05771004F2AC0 /* Flutter */ = { - isa = PBXGroup; - children = ( - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, - ); - path = Flutter; - sourceTree = ""; - }; - 33FAB671232836740065AC1E /* Runner */ = { - isa = PBXGroup; - children = ( - 33CC10F02044A3C60003C045 /* AppDelegate.swift */, - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, - 33E51913231747F40026EE4D /* DebugProfile.entitlements */, - 33E51914231749380026EE4D /* Release.entitlements */, - 33CC11242044D66E0003C045 /* Resources */, - 33BA886A226E78AF003329D5 /* Configs */, - ); - path = Runner; - sourceTree = ""; - }; - 4F28B5A0EF698A308363E922 /* Pods */ = { - isa = PBXGroup; - children = ( - DB9FA2622AABAC1AD710C9A2 /* Pods-Runner.debug.xcconfig */, - 8883DCAD72F734BD88FFF5F1 /* Pods-Runner.release.xcconfig */, - 78A485573E1A8C4FAEFA1EDC /* Pods-Runner.profile.xcconfig */, - 95F5AACB4C47F0F7503DE220 /* Pods-RunnerTests.debug.xcconfig */, - 8143EB21C71643C0EFB27CB4 /* Pods-RunnerTests.release.xcconfig */, - 780A784A7027ED5C872FF467 /* Pods-RunnerTests.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - D85A387B2B49ED9F0078351E /* libdivecomputer.0.dylib */, - 866168B11938ECFE46CFB139 /* Pods_Runner.framework */, - 8833DC8D350DF77B2F889694 /* Pods_RunnerTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 331C80D4294CF70F00263BE5 /* RunnerTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; - buildPhases = ( - 15F6442D8FE9E6103F572C0A /* [CP] Check Pods Manifest.lock */, - 331C80D1294CF70F00263BE5 /* Sources */, - 331C80D2294CF70F00263BE5 /* Frameworks */, - 331C80D3294CF70F00263BE5 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 331C80DA294CF71000263BE5 /* PBXTargetDependency */, - ); - name = RunnerTests; - productName = RunnerTests; - productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 2553460BA0FF9C6CF3EFA25C /* [CP] Check Pods Manifest.lock */, - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* dive_computer_example.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1430; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 331C80D4294CF70F00263BE5 = { - CreatedOnToolsVersion = 14.0; - TestTargetID = 33CC10EC2044A3C60003C045; - }; - 33CC10EC2044A3C60003C045 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.Sandbox = { - enabled = 1; - }; - }; - }; - 33CC111A2044C6BA0003C045 = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 33CC10E42044A3C60003C045; - productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 33CC10EC2044A3C60003C045 /* Runner */, - 331C80D4294CF70F00263BE5 /* RunnerTests */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 331C80D3294CF70F00263BE5 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 15F6442D8FE9E6103F572C0A /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", - ); - 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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 2553460BA0FF9C6CF3EFA25C /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - 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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; - }; - 33CC111E2044C6BF0003C045 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - Flutter/ephemeral/FlutterInputs.xcfilelist, - ); - inputPaths = ( - Flutter/ephemeral/tripwire, - ); - outputFileListPaths = ( - Flutter/ephemeral/FlutterOutputs.xcfilelist, - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 331C80D1294CF70F00263BE5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10E92044A3C60003C045 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC10EC2044A3C60003C045 /* Runner */; - targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; - }; - 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; - targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 33CC10F52044A3C60003C045 /* Base */, - ); - name = MainMenu.xib; - path = Runner; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 331C80DB294CF71000263BE5 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 95F5AACB4C47F0F7503DE220 /* Pods-RunnerTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/dive_computer_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dive_computer_example"; - }; - name = Debug; - }; - 331C80DC294CF71000263BE5 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 8143EB21C71643C0EFB27CB4 /* Pods-RunnerTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/dive_computer_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dive_computer_example"; - }; - name = Release; - }; - 331C80DD294CF71000263BE5 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 780A784A7027ED5C872FF467 /* Pods-RunnerTests.profile.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/dive_computer_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dive_computer_example"; - }; - name = Profile; - }; - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Profile; - }; - 338D0CEA231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited)"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", - /usr/lib/swift, - "${PROJECT_DIR}/../../native/lib/macos", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Profile; - }; - 338D0CEB231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Profile; - }; - 33CC10F92044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - 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_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 33CC10FA2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - 33CC10FC2044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited)"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", - /usr/lib/swift, - "${PROJECT_DIR}/../../native/lib/macos", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 33CC10FD2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited)"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", - /usr/lib/swift, - "${PROJECT_DIR}/../../native/lib/macos", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 33CC111C2044C6BA0003C045 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 33CC111D2044C6BA0003C045 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 331C80DB294CF71000263BE5 /* Debug */, - 331C80DC294CF71000263BE5 /* Release */, - 331C80DD294CF71000263BE5 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10F92044A3C60003C045 /* Debug */, - 33CC10FA2044A3C60003C045 /* Release */, - 338D0CE9231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10FC2044A3C60003C045 /* Debug */, - 33CC10FD2044A3C60003C045 /* Release */, - 338D0CEA231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC111C2044C6BA0003C045 /* Debug */, - 33CC111D2044C6BA0003C045 /* Release */, - 338D0CEB231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 33CC10E52044A3C60003C045 /* Project object */; -} +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 262E412DF37AA4627DE9CE94 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 866168B11938ECFE46CFB139 /* Pods_Runner.framework */; }; + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + CDF727C5C51DE46A62037ED3 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8833DC8D350DF77B2F889694 /* Pods_RunnerTests.framework */; }; + D85A387C2B49ED9F0078351E /* (null) in Frameworks */ = {isa = PBXBuildFile; settings = {ATTRIBUTES = (Weak, ); }; }; + D85A387D2B49EDA50078351E /* (null) in Bundle Framework */ = {isa = PBXBuildFile; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + D85A387D2B49EDA50078351E /* (null) in Bundle Framework */, + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* dive_computer_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = dive_computer_example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 780A784A7027ED5C872FF467 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 78A485573E1A8C4FAEFA1EDC /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 8143EB21C71643C0EFB27CB4 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 866168B11938ECFE46CFB139 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8833DC8D350DF77B2F889694 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8883DCAD72F734BD88FFF5F1 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 95F5AACB4C47F0F7503DE220 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + DB9FA2622AABAC1AD710C9A2 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + CDF727C5C51DE46A62037ED3 /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 262E412DF37AA4627DE9CE94 /* Pods_Runner.framework in Frameworks */, + D85A387C2B49ED9F0078351E /* (null) in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + 4F28B5A0EF698A308363E922 /* Pods */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* dive_computer_example.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + 4F28B5A0EF698A308363E922 /* Pods */ = { + isa = PBXGroup; + children = ( + DB9FA2622AABAC1AD710C9A2 /* Pods-Runner.debug.xcconfig */, + 8883DCAD72F734BD88FFF5F1 /* Pods-Runner.release.xcconfig */, + 78A485573E1A8C4FAEFA1EDC /* Pods-Runner.profile.xcconfig */, + 95F5AACB4C47F0F7503DE220 /* Pods-RunnerTests.debug.xcconfig */, + 8143EB21C71643C0EFB27CB4 /* Pods-RunnerTests.release.xcconfig */, + 780A784A7027ED5C872FF467 /* Pods-RunnerTests.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 866168B11938ECFE46CFB139 /* Pods_Runner.framework */, + 8833DC8D350DF77B2F889694 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 15F6442D8FE9E6103F572C0A /* [CP] Check Pods Manifest.lock */, + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 2553460BA0FF9C6CF3EFA25C /* [CP] Check Pods Manifest.lock */, + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + 73EDC416F7D2D3C39384ECB1 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* dive_computer_example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 15F6442D8FE9E6103F572C0A /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + 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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 2553460BA0FF9C6CF3EFA25C /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + 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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; + 73EDC416F7D2D3C39384ECB1 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 95F5AACB4C47F0F7503DE220 /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/dive_computer_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dive_computer_example"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8143EB21C71643C0EFB27CB4 /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/dive_computer_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dive_computer_example"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 780A784A7027ED5C872FF467 /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = app.divenote.diveComputerExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/dive_computer_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dive_computer_example"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited)"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", + /usr/lib/swift, + "${PROJECT_DIR}/../../native/lib/macos", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited)"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", + /usr/lib/swift, + "${PROJECT_DIR}/../../native/lib/macos", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited)"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", + /usr/lib/swift, + "${PROJECT_DIR}/../../native/lib/macos", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/example/macos/Runner/DebugProfile.entitlements b/example/macos/Runner/DebugProfile.entitlements index dddb8a3..2357acf 100644 --- a/example/macos/Runner/DebugProfile.entitlements +++ b/example/macos/Runner/DebugProfile.entitlements @@ -6,6 +6,8 @@ com.apple.security.cs.allow-jit + com.apple.security.device.usb + com.apple.security.network.server diff --git a/example/macos/Runner/Info.plist b/example/macos/Runner/Info.plist index 4789daa..b8e6710 100644 --- a/example/macos/Runner/Info.plist +++ b/example/macos/Runner/Info.plist @@ -28,5 +28,7 @@ MainMenu NSPrincipalClass NSApplication + NSUSBPeripheralUsageDescription + Your explanation here diff --git a/example/macos/Runner/Release.entitlements b/example/macos/Runner/Release.entitlements index 852fa1a..127cfcd 100644 --- a/example/macos/Runner/Release.entitlements +++ b/example/macos/Runner/Release.entitlements @@ -4,5 +4,7 @@ com.apple.security.app-sandbox + com.apple.security.device.usb + diff --git a/example/pubspec.lock b/example/pubspec.lock index ae5515b..56f19d0 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -47,7 +47,7 @@ packages: path: ".." relative: true source: path - version: "0.0.1" + version: "0.1.0-dev.2" fake_async: dependency: transitive description: @@ -60,10 +60,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" flutter: dependency: "direct main" description: flutter @@ -73,15 +73,39 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lints: dependency: transitive description: @@ -102,34 +126,34 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" plugin_platform_interface: dependency: transitive description: @@ -199,14 +223,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - web: + vm_service: dependency: transitive description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "13.0.0" sdks: - dart: ">=3.2.3 <4.0.0" + dart: ">=3.3.0-279.1.beta <4.0.0" flutter: ">=3.3.0" diff --git a/ffigen.yaml b/ffigen.yaml index 2097a24..13ef9be 100644 --- a/ffigen.yaml +++ b/ffigen.yaml @@ -3,13 +3,16 @@ name: DiveComputerFfiBindings description: | Regenerate bindings with `flutter pub run ffigen --config ffigen.yaml`. output: 'lib/framework/dive_computer_ffi_bindings_generated.dart' +compiler-opts: '-Isrc/libdivecomputer/include -Isrc/libdivecomputer/src' headers: entry-points: - - 'native/include/libdivecomputer/context.h' - - 'native/include/libdivecomputer/device.h' - - 'native/include/libdivecomputer/iterator.h' - - 'native/include/libdivecomputer/serial.h' - - 'native/include/libdivecomputer/parser.h' + - 'src/libdivecomputer/include/libdivecomputer/context.h' + - 'src/libdivecomputer/include/libdivecomputer/device.h' + - 'src/libdivecomputer/include/libdivecomputer/iterator.h' + - 'src/libdivecomputer/include/libdivecomputer/serial.h' + - 'src/libdivecomputer/include/libdivecomputer/parser.h' + - 'src/libdivecomputer/include/libdivecomputer/usb.h' + - 'src/libdivecomputer/include/libdivecomputer/usbhid.h' preamble: | // ignore_for_file: always_specify_types, unused_field, unused_element // ignore_for_file: camel_case_types diff --git a/macos/dive_computer_ffi.podspec b/ios/dive_computer.podspec similarity index 78% rename from macos/dive_computer_ffi.podspec rename to ios/dive_computer.podspec index f32bb8c..989935f 100644 --- a/macos/dive_computer_ffi.podspec +++ b/ios/dive_computer.podspec @@ -1,27 +1,32 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint dive_computer.podspec` to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'dive_computer' - s.version = '0.0.1' - s.summary = 'DiveComputer FFI plugin for Flutter.' - s.description = <<-DESC -DiveComputer FFI plugin for Flutter. - DESC - s.homepage = 'https://divenote.app' - s.license = { :file => '../LICENSE' } - s.author = { 'Sebastian Schneider' => 'hello@divenote.app' } - - # This will ensure the source files in Classes/ are included in the native - # builds of apps using this FFI plugin. Podspec does not support relative - # paths, so Classes contains a forwarder C file that relatively imports - # `../src/*` so that the C sources can be shared among all target platforms. - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.dependency 'FlutterMacOS' - - s.platform = :osx, '10.11' - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } - s.swift_version = '5.0' -end +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint dive_computer.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'dive_computer' + s.version = '0.0.1' + s.summary = 'DiveComputer FFI plugin for Flutter.' + s.description = <<-DESC +DiveComputer FFI plugin for Flutter. + DESC + s.homepage = 'https://divenote.app' + s.license = { :file => '../LICENSE' } + s.author = { 'Sebastian Schneider' => 'hello@divenote.app' } + + # This will ensure the source files in Classes/ are included in the native + # builds of apps using this FFI plugin. Podspec does not support relative + # paths, so Classes contains a forwarder C file that relatively imports + # `../src/*` so that the C sources can be shared among all target platforms. + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.platform = :ios, '11.0' + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { + 'DEFINES_MODULE' => 'YES', + 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386', + } + + s.swift_version = '5.0' +end diff --git a/lib/framework/dive_computer_ffi.dart b/lib/framework/dive_computer_ffi.dart index 8d61a3c..a72021c 100644 --- a/lib/framework/dive_computer_ffi.dart +++ b/lib/framework/dive_computer_ffi.dart @@ -1,16 +1,17 @@ -import 'dart:async'; +import 'dart:developer' as developer; import 'dart:ffi' as ffi; import 'dart:io'; -import 'dart:developer' as developer; +import 'package:dive_computer/framework/interfaces/dive_computer_interfaces.dart'; import 'package:dive_computer/framework/utils/transports_bitmask.dart'; +import 'package:dive_computer/framework/utils/utils.dart'; import 'package:dive_computer/types/computer.dart'; import 'package:dive_computer/types/dive.dart'; import 'package:ffi/ffi.dart'; import 'package:flutter/foundation.dart'; import 'package:logging/logging.dart' as logging; -import 'dive_computer_ffi_bindings_generated.dart'; +import './dive_computer_ffi_bindings_generated.dart'; final log = logging.Logger('DiveComputerFfi'); @@ -39,8 +40,8 @@ class DiveComputerFfi { fileName = 'libdivecomputer-0.dll'; } else if (Platform.isAndroid) { fileName = 'libdivecomputer.so'; - } else if (Platform.isMacOS) { - fileName = 'libdivecomputer.0.dylib'; + } else if (Platform.isMacOS || Platform.isIOS) { + fileName = 'dive_computer.framework/dive_computer'; } else { throw UnsupportedError('Unknown platform: ${Platform.operatingSystem}'); } @@ -62,25 +63,28 @@ class DiveComputerFfi { static Function(List)? divesCallback; + static final _interfaces = + Interfaces(bindings: _bindings, context: context, log: log); + static void enableDebugLogging([logging.Level level = logging.Level.INFO]) { log.level = level; } static void openConnection() { - _handleResult( + handleResult( _bindings.dc_context_new(context), 'context creation', ); - _handleResult( + handleResult( _bindings.dc_context_set_loglevel( context.value, - dc_loglevel_t.DC_LOGLEVEL_WARNING, + dc_loglevel_t.DC_LOGLEVEL_ALL, ), 'log level setting', ); - _handleResult( + handleResult( _bindings.dc_context_set_logfunc( context.value, ffi.Pointer.fromFunction(_log), @@ -91,7 +95,7 @@ class DiveComputerFfi { } static void closeConnection() { - _handleResult( + handleResult( _bindings.dc_context_free(context.value), 'context freeing', ); @@ -106,7 +110,7 @@ class DiveComputerFfi { final iterator = calloc>(); - _handleResult( + handleResult( _bindings.dc_descriptor_iterator(iterator), 'iterator creation', ); @@ -132,9 +136,9 @@ class DiveComputerFfi { computers.add(computer); _computerDescriptorCache.addEntries([MapEntry(computer, desc.value)]); } - _handleResult(result, 'iterator next'); + handleResult(result, 'iterator next'); - _handleResult( + handleResult( _bindings.dc_iterator_free(iterator.value), 'iterator freeing', ); @@ -149,18 +153,12 @@ class DiveComputerFfi { ]) { final computerDescriptor = _computerDescriptorCache[computer]!; - final ffi.Pointer iostream; - switch (transport) { - case ComputerTransport.serial: - iostream = _connectSerial(computerDescriptor); - break; - default: - throw UnimplementedError(); - } + final ffi.Pointer iostream = + _interfaces.connect(transport, computerDescriptor); final device = calloc>(); try { - _handleResult( + handleResult( _bindings.dc_device_open( device, context.value, @@ -176,7 +174,7 @@ class DiveComputerFfi { lastFingerprint?.toNativeUtf8() ?? ffi.nullptr; _divesCache.clear(); - _handleResult( + handleResult( _bindings.dc_device_foreach( device.value, ffi.Pointer.fromFunction(_dive_callback, 0), @@ -190,68 +188,18 @@ class DiveComputerFfi { } divesCallback?.call(_divesCache); - _handleResult( + handleResult( _bindings.dc_device_close(device.value), 'device close', ); } finally { - _handleResult( + handleResult( _bindings.dc_iostream_close(iostream), 'iostream close', ); } } - static ffi.Pointer _connectSerial( - ffi.Pointer computer) { - final iterator = calloc>(); - - _handleResult( - _bindings.dc_serial_iterator_new(iterator, context.value, computer), - 'serial connection', - ); - - final names = >[]; - - int result; - final desc = calloc>(); - while ((result = _bindings.dc_iterator_next(iterator.value, desc.cast())) == - dc_status_t.DC_STATUS_SUCCESS) { - final ffi.Pointer name = - _bindings.dc_serial_device_get_name(desc.value).cast(); - names.add(name); - - _bindings.dc_serial_device_free(desc.value); - } - _handleResult(result, 'iterator next'); - log.info( - 'Serial devices: ${names.map((e) => e.toDartString()).join(', ')}', - ); - - _handleResult( - _bindings.dc_iterator_free(iterator.value), - 'iterator freeing', - ); - - if (names.isEmpty) { - _handleResult(dc_status_t.DC_STATUS_NODEVICE); - } - - // ### Connecting to the device ### // - final iostream = calloc>(); - - _handleResult( - _bindings.dc_serial_open( - iostream, - context.value, - names[0].cast(), - ), - 'serial open', - ); - - return iostream.value; - } - // ignore: non_constant_identifier_names static int _dive_callback( ffi.Pointer data, @@ -291,7 +239,7 @@ class DiveComputerFfi { final parser = malloc>(); - _handleResult(_bindings.dc_parser_new( + handleResult(_bindings.dc_parser_new( parser, device, data, @@ -345,7 +293,7 @@ class DiveComputerFfi { } final dateTimePointer = malloc(); - _handleResult( + handleResult( _bindings.dc_parser_get_datetime(parser.value, dateTimePointer), ); final dateTime = DateTime( @@ -359,7 +307,7 @@ class DiveComputerFfi { try { _samplesCache.clear(); - _handleResult( + handleResult( _bindings.dc_parser_samples_foreach( parser.value, ffi.Pointer.fromFunction(_sample_callback), @@ -389,7 +337,7 @@ class DiveComputerFfi { log.info(dive); _divesCache.add(dive); - _handleResult(_bindings.dc_parser_destroy(parser.value)); + handleResult(_bindings.dc_parser_destroy(parser.value)); } static T? _parseField( @@ -420,7 +368,7 @@ class DiveComputerFfi { } try { - _handleResult(_bindings.dc_parser_get_field( + handleResult(_bindings.dc_parser_get_field( parser, fieldType, flags, @@ -576,40 +524,6 @@ class DiveComputerFfi { log.fine('[native] ${message.cast().toDartString()}'); } - static void _handleResult(int result, [String operation = '']) { - switch (result) { - case dc_status_t.DC_STATUS_SUCCESS: - if (operation.isNotEmpty) { - log.finer('$operation successful'); - } - case dc_status_t.DC_STATUS_DONE: - if (operation.isNotEmpty) { - log.finer('$operation done'); - } - break; - case dc_status_t.DC_STATUS_UNSUPPORTED: - throw UnsupportedError('Unsupported'); - case dc_status_t.DC_STATUS_INVALIDARGS: - throw ArgumentError('Invalid arguments'); - case dc_status_t.DC_STATUS_TIMEOUT: - throw TimeoutException("Timeout"); - case dc_status_t.DC_STATUS_NOMEMORY: - throw const OutOfMemoryError(); - case dc_status_t.DC_STATUS_NODEVICE: - throw Exception("No device"); - case dc_status_t.DC_STATUS_NOACCESS: - throw Exception("No access"); - case dc_status_t.DC_STATUS_IO: - throw Exception("IO"); - case dc_status_t.DC_STATUS_PROTOCOL: - throw Exception("Protocol"); - case dc_status_t.DC_STATUS_DATAFORMAT: - throw Exception("Data format"); - case dc_status_t.DC_STATUS_CANCELLED: - throw Exception("Cancelled"); - } - } - static String _buildFingerprintHash( ffi.Pointer fingerprint, int fsize) { final ascii = '0123456789ABCDEF'.codeUnits; @@ -617,8 +531,8 @@ class DiveComputerFfi { var result = StringBuffer(); for (var i = 0; i < fsize; ++i) { - var msn = (fingerprint.elementAt(i).value >> 4) & 0x0F; - var lsn = fingerprint.elementAt(i).value & 0x0F; + var msn = ((fingerprint + i).value >> 4) & 0x0F; + var lsn = (fingerprint + i).value & 0x0F; result.writeCharCode(ascii[msn]); result.writeCharCode(ascii[lsn]); diff --git a/lib/framework/dive_computer_ffi_bindings_generated.dart b/lib/framework/dive_computer_ffi_bindings_generated.dart index c8d0bfc..e231185 100644 --- a/lib/framework/dive_computer_ffi_bindings_generated.dart +++ b/lib/framework/dive_computer_ffi_bindings_generated.dart @@ -306,163 +306,6 @@ class DiveComputerFfiBindings { late final _dc_descriptor_filter = _dc_descriptor_filterPtr.asFunction< int Function(ffi.Pointer, int, ffi.Pointer)>(); - void __va_start( - ffi.Pointer arg0, - ) { - return ___va_start( - arg0, - ); - } - - late final ___va_startPtr = - _lookup)>>( - '__va_start'); - late final ___va_start = - ___va_startPtr.asFunction)>(); - - void __security_init_cookie() { - return ___security_init_cookie(); - } - - late final ___security_init_cookiePtr = - _lookup>( - '__security_init_cookie'); - late final ___security_init_cookie = - ___security_init_cookiePtr.asFunction(); - - void __security_check_cookie( - int _StackCookie, - ) { - return ___security_check_cookie( - _StackCookie, - ); - } - - late final ___security_check_cookiePtr = - _lookup>( - '__security_check_cookie'); - late final ___security_check_cookie = - ___security_check_cookiePtr.asFunction(); - - void __report_gsfailure( - int _StackCookie, - ) { - return ___report_gsfailure( - _StackCookie, - ); - } - - late final ___report_gsfailurePtr = - _lookup>( - '__report_gsfailure'); - late final ___report_gsfailure = - ___report_gsfailurePtr.asFunction(); - - late final ffi.Pointer ___security_cookie = - _lookup('__security_cookie'); - - int get __security_cookie => ___security_cookie.value; - - set __security_cookie(int value) => ___security_cookie.value = value; - - void _invalid_parameter_noinfo() { - return __invalid_parameter_noinfo(); - } - - late final __invalid_parameter_noinfoPtr = - _lookup>( - '_invalid_parameter_noinfo'); - late final __invalid_parameter_noinfo = - __invalid_parameter_noinfoPtr.asFunction(); - - void _invalid_parameter_noinfo_noreturn() { - return __invalid_parameter_noinfo_noreturn(); - } - - late final __invalid_parameter_noinfo_noreturnPtr = - _lookup>( - '_invalid_parameter_noinfo_noreturn'); - late final __invalid_parameter_noinfo_noreturn = - __invalid_parameter_noinfo_noreturnPtr.asFunction(); - - void _invoke_watson( - ffi.Pointer _Expression, - ffi.Pointer _FunctionName, - ffi.Pointer _FileName, - int _LineNo, - int _Reserved, - ) { - return __invoke_watson( - _Expression, - _FunctionName, - _FileName, - _LineNo, - _Reserved, - ); - } - - late final __invoke_watsonPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UintPtr)>>('_invoke_watson'); - late final __invoke_watson = __invoke_watsonPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); - - ffi.Pointer _errno() { - return __errno(); - } - - late final __errnoPtr = - _lookup Function()>>('_errno'); - late final __errno = __errnoPtr.asFunction Function()>(); - - int _set_errno( - int _Value, - ) { - return __set_errno( - _Value, - ); - } - - late final __set_errnoPtr = - _lookup>('_set_errno'); - late final __set_errno = __set_errnoPtr.asFunction(); - - int _get_errno( - ffi.Pointer _Value, - ) { - return __get_errno( - _Value, - ); - } - - late final __get_errnoPtr = - _lookup)>>( - '_get_errno'); - late final __get_errno = - __get_errnoPtr.asFunction)>(); - - int __threadid() { - return ___threadid(); - } - - late final ___threadidPtr = - _lookup>('__threadid'); - late final ___threadid = ___threadidPtr.asFunction(); - - int __threadhandle() { - return ___threadhandle(); - } - - late final ___threadhandlePtr = - _lookup>('__threadhandle'); - late final ___threadhandle = ___threadhandlePtr.asFunction(); - /// Get the transport type. /// /// @param[in] iostream A valid I/O stream. @@ -1665,6 +1508,229 @@ class DiveComputerFfiBindings { 'dc_parser_destroy'); late final _dc_parser_destroy = _dc_parser_destroyPtr .asFunction)>(); + + /// Get the vendor id (VID) of the USB device. + /// + /// @param[in] device A valid USB device. + int dc_usb_device_get_vid( + ffi.Pointer device, + ) { + return _dc_usb_device_get_vid( + device, + ); + } + + late final _dc_usb_device_get_vidPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer)>>('dc_usb_device_get_vid'); + late final _dc_usb_device_get_vid = _dc_usb_device_get_vidPtr + .asFunction)>(); + + /// Get the product id (PID) of the USB device. + /// + /// @param[in] device A valid USB device. + int dc_usb_device_get_pid( + ffi.Pointer device, + ) { + return _dc_usb_device_get_pid( + device, + ); + } + + late final _dc_usb_device_get_pidPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer)>>('dc_usb_device_get_pid'); + late final _dc_usb_device_get_pid = _dc_usb_device_get_pidPtr + .asFunction)>(); + + /// Destroy the USB device and free all resources. + /// + /// @param[in] device A valid USB device. + void dc_usb_device_free( + ffi.Pointer device, + ) { + return _dc_usb_device_free( + device, + ); + } + + late final _dc_usb_device_freePtr = _lookup< + ffi.NativeFunction)>>( + 'dc_usb_device_free'); + late final _dc_usb_device_free = _dc_usb_device_freePtr + .asFunction)>(); + + /// Create an iterator to enumerate the USB devices. + /// + /// @param[out] iterator A location to store the iterator. + /// @param[in] context A valid context object. + /// @param[in] descriptor A valid device descriptor or NULL. + /// @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code + /// on failure. + int dc_usb_iterator_new( + ffi.Pointer> iterator, + ffi.Pointer context, + ffi.Pointer descriptor, + ) { + return _dc_usb_iterator_new( + iterator, + context, + descriptor, + ); + } + + late final _dc_usb_iterator_newPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>('dc_usb_iterator_new'); + late final _dc_usb_iterator_new = _dc_usb_iterator_newPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>(); + + /// Open a USB connection. + /// + /// @param[out] iostream A location to store the USB connection. + /// @param[in] context A valid context object. + /// @param[in] device A valid USB device. + /// @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code + /// on failure. + int dc_usb_open( + ffi.Pointer> iostream, + ffi.Pointer context, + ffi.Pointer device, + ) { + return _dc_usb_open( + iostream, + context, + device, + ); + } + + late final _dc_usb_openPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>('dc_usb_open'); + late final _dc_usb_open = _dc_usb_openPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>(); + + /// Get the vendor id (VID) of the USB HID device. + /// + /// @param[in] device A valid USB HID device. + int dc_usbhid_device_get_vid( + ffi.Pointer device, + ) { + return _dc_usbhid_device_get_vid( + device, + ); + } + + late final _dc_usbhid_device_get_vidPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer)>>('dc_usbhid_device_get_vid'); + late final _dc_usbhid_device_get_vid = _dc_usbhid_device_get_vidPtr + .asFunction)>(); + + /// Get the product id (PID) of the USB HID device. + /// + /// @param[in] device A valid USB HID device. + int dc_usbhid_device_get_pid( + ffi.Pointer device, + ) { + return _dc_usbhid_device_get_pid( + device, + ); + } + + late final _dc_usbhid_device_get_pidPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer)>>('dc_usbhid_device_get_pid'); + late final _dc_usbhid_device_get_pid = _dc_usbhid_device_get_pidPtr + .asFunction)>(); + + /// Destroy the USB HID device and free all resources. + /// + /// @param[in] device A valid USB HID device. + void dc_usbhid_device_free( + ffi.Pointer device, + ) { + return _dc_usbhid_device_free( + device, + ); + } + + late final _dc_usbhid_device_freePtr = _lookup< + ffi + .NativeFunction)>>( + 'dc_usbhid_device_free'); + late final _dc_usbhid_device_free = _dc_usbhid_device_freePtr + .asFunction)>(); + + /// Create an iterator to enumerate the USB HID devices. + /// + /// @param[out] iterator A location to store the iterator. + /// @param[in] context A valid context object. + /// @param[in] descriptor A valid device descriptor or NULL. + /// @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code + /// on failure. + int dc_usbhid_iterator_new( + ffi.Pointer> iterator, + ffi.Pointer context, + ffi.Pointer descriptor, + ) { + return _dc_usbhid_iterator_new( + iterator, + context, + descriptor, + ); + } + + late final _dc_usbhid_iterator_newPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>('dc_usbhid_iterator_new'); + late final _dc_usbhid_iterator_new = _dc_usbhid_iterator_newPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>(); + + /// Open a USB HID connection. + /// + /// @param[out] iostream A location to store the USB HID connection. + /// @param[in] context A valid context object. + /// @param[in] device A valid USB HID device. + /// @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code + /// on failure. + int dc_usbhid_open( + ffi.Pointer> iostream, + ffi.Pointer context, + ffi.Pointer device, + ) { + return _dc_usbhid_open( + iostream, + context, + device, + ); + } + + late final _dc_usbhid_openPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>('dc_usbhid_open'); + late final _dc_usbhid_open = _dc_usbhid_openPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>(); } abstract class dc_status_t { @@ -1801,63 +1867,117 @@ abstract class dc_loglevel_t { static const int DC_LOGLEVEL_ALL = 5; } -typedef dc_logfunc_t = ffi.Pointer>; -typedef dc_logfunc_tFunction = ffi.Void Function( - ffi.Pointer context, - ffi.Int32 loglevel, - ffi.Pointer file, - ffi.UnsignedInt line, - ffi.Pointer function, - ffi.Pointer message, - ffi.Pointer userdata); -typedef Dartdc_logfunc_tFunction = void Function( - ffi.Pointer context, - int loglevel, - ffi.Pointer file, - int line, - ffi.Pointer function, - ffi.Pointer message, - ffi.Pointer userdata); +typedef dc_logfunc_t = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer context, + ffi.Int32 loglevel, + ffi.Pointer file, + ffi.UnsignedInt line, + ffi.Pointer function, + ffi.Pointer message, + ffi.Pointer userdata)>>; final class dc_iterator_t extends ffi.Opaque {} final class dc_descriptor_t extends ffi.Opaque {} -typedef va_list = ffi.Pointer; +/// mbstate_t is an opaque object to keep conversion state, during multibyte +/// stream conversions. The content must not be referenced by user programs. +final class __mbstate_t extends ffi.Union { + @ffi.Array.multi([128]) + external ffi.Array __mbstate8; + + /// for alignment + @ffi.LongLong() + external int _mbstateL; +} -final class __crt_locale_data_public extends ffi.Struct { - external ffi.Pointer _locale_pctype; +final class __darwin_pthread_handler_rec extends ffi.Struct { + /// Routine to call + external ffi + .Pointer)>> + __routine; - @ffi.Int() - external int _locale_mb_cur_max; + /// Argument to pass + external ffi.Pointer __arg; - @ffi.UnsignedInt() - external int _locale_lc_codepage; + external ffi.Pointer<__darwin_pthread_handler_rec> __next; } -final class __crt_locale_pointers extends ffi.Struct { - external ffi.Pointer<__crt_locale_data> locinfo; +final class _opaque_pthread_attr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - external ffi.Pointer<__crt_multibyte_data> mbcinfo; + @ffi.Array.multi([56]) + external ffi.Array __opaque; } -final class __crt_locale_data extends ffi.Opaque {} +final class _opaque_pthread_cond_t extends ffi.Struct { + @ffi.Long() + external int __sig; -final class __crt_multibyte_data extends ffi.Opaque {} + @ffi.Array.multi([40]) + external ffi.Array __opaque; +} -final class _Mbstatet extends ffi.Struct { - @ffi.UnsignedLong() - external int _Wchar; +final class _opaque_pthread_condattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - @ffi.UnsignedShort() - external int _Byte; + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} - @ffi.UnsignedShort() - external int _State; +final class _opaque_pthread_mutex_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([56]) + external ffi.Array __opaque; } -typedef errno_t = ffi.Int; -typedef Darterrno_t = int; +final class _opaque_pthread_mutexattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_once_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_rwlock_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([192]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_rwlockattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([16]) + external ffi.Array __opaque; +} + +final class _opaque_pthread_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; + + @ffi.Array.multi([8176]) + external ffi.Array __opaque; +} final class dc_iostream_t extends ffi.Opaque {} @@ -1956,7 +2076,6 @@ final class dc_datetime_t extends ffi.Struct { } typedef dc_ticks_t = ffi.LongLong; -typedef Dartdc_ticks_t = int; abstract class dc_event_type_t { static const int DC_EVENT_WAITING = 1; @@ -2002,38 +2121,20 @@ final class dc_event_vendor_t extends ffi.Struct { external int size; } -typedef dc_cancel_callback_t - = ffi.Pointer>; -typedef dc_cancel_callback_tFunction = ffi.Int Function( - ffi.Pointer userdata); -typedef Dartdc_cancel_callback_tFunction = int Function( - ffi.Pointer userdata); -typedef dc_event_callback_t - = ffi.Pointer>; -typedef dc_event_callback_tFunction = ffi.Void Function( - ffi.Pointer device, - ffi.Int32 event, - ffi.Pointer data, - ffi.Pointer userdata); -typedef Dartdc_event_callback_tFunction = void Function( - ffi.Pointer device, - int event, - ffi.Pointer data, - ffi.Pointer userdata); -typedef dc_dive_callback_t - = ffi.Pointer>; -typedef dc_dive_callback_tFunction = ffi.Int Function( - ffi.Pointer data, - ffi.UnsignedInt size, - ffi.Pointer fingerprint, - ffi.UnsignedInt fsize, - ffi.Pointer userdata); -typedef Dartdc_dive_callback_tFunction = int Function( - ffi.Pointer data, - int size, - ffi.Pointer fingerprint, - int fsize, - ffi.Pointer userdata); +typedef dc_cancel_callback_t = ffi.Pointer< + ffi.NativeFunction userdata)>>; +typedef dc_event_callback_t = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer device, ffi.Int32 event, + ffi.Pointer data, ffi.Pointer userdata)>>; +typedef dc_dive_callback_t = ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer data, + ffi.UnsignedInt size, + ffi.Pointer fingerprint, + ffi.UnsignedInt fsize, + ffi.Pointer userdata)>>; final class dc_serial_device_t extends ffi.Opaque {} @@ -2372,146 +2473,372 @@ final class UnnamedStruct6 extends ffi.Struct { final class dc_parser_t extends ffi.Opaque {} -typedef dc_sample_callback_t - = ffi.Pointer>; -typedef dc_sample_callback_tFunction = ffi.Void Function(ffi.Int32 type, - ffi.Pointer value, ffi.Pointer userdata); -typedef Dartdc_sample_callback_tFunction = void Function(int type, - ffi.Pointer value, ffi.Pointer userdata); +typedef dc_sample_callback_t = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int32 type, ffi.Pointer value, + ffi.Pointer userdata)>>; -const int _VCRT_COMPILER_PREPROCESSOR = 1; +/// USB control transfer. +final class dc_usb_control_t extends ffi.Struct { + @ffi.UnsignedChar() + external int bmRequestType; -const int _SAL_VERSION = 20; + @ffi.UnsignedChar() + external int bRequest; -const int __SAL_H_VERSION = 180000000; + @ffi.UnsignedShort() + external int wValue; -const int _USE_DECLSPECS_FOR_SAL = 0; + @ffi.UnsignedShort() + external int wIndex; -const int _USE_ATTRIBUTES_FOR_SAL = 0; + @ffi.UnsignedShort() + external int wLength; +} -const int _CRT_PACKING = 8; +/// Endpoint direction bits of the USB control transfer. +abstract class dc_usb_endpoint_t { + static const int DC_USB_ENDPOINT_OUT = 0; + static const int DC_USB_ENDPOINT_IN = 128; +} -const int _VCRUNTIME_DISABLED_WARNINGS = 4514; +/// Request type bits of the USB control transfer. +abstract class dc_usb_request_t { + static const int DC_USB_REQUEST_STANDARD = 0; + static const int DC_USB_REQUEST_CLASS = 32; + static const int DC_USB_REQUEST_VENDOR = 64; + static const int DC_USB_REQUEST_RESERVED = 96; +} -const int _HAS_EXCEPTIONS = 1; +/// Recipient bits of the USB control transfer. +abstract class dc_usb_recipient_t { + static const int DC_USB_RECIPIENT_DEVICE = 0; + static const int DC_USB_RECIPIENT_INTERFACE = 1; + static const int DC_USB_RECIPIENT_ENDPOINT = 2; + static const int DC_USB_RECIPIENT_OTHER = 3; +} -const int _WCHAR_T_DEFINED = 1; +/// USB device descriptor. +final class dc_usb_desc_t extends ffi.Struct { + @ffi.UnsignedShort() + external int vid; -const int NULL = 0; + @ffi.UnsignedShort() + external int pid; +} -const int _HAS_CXX17 = 0; +final class dc_usb_device_t extends ffi.Opaque {} -const int _HAS_CXX20 = 0; +/// USB HID device descriptor. +final class dc_usbhid_desc_t extends ffi.Struct { + @ffi.UnsignedShort() + external int vid; + + @ffi.UnsignedShort() + external int pid; +} -const int _HAS_CXX23 = 0; +final class dc_usbhid_device_t extends ffi.Opaque {} -const int _HAS_NODISCARD = 1; +const int __DARWIN_ONLY_64_BIT_INO_T = 1; -const int _UCRT_DISABLED_WARNINGS = 4324; +const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; -const int _ARGMAX = 100; +const int __DARWIN_ONLY_VERS_1050 = 1; -const int _TRUNCATE = -1; +const int __DARWIN_UNIX03 = 1; -const int _CRT_INT_MAX = 2147483647; +const int __DARWIN_64_BIT_INO_T = 1; -const int _CRT_SIZE_MAX = -1; +const int __DARWIN_VERS_1050 = 1; -const String __FILEW__ = 'C'; +const int __DARWIN_NON_CANCELABLE = 0; -const int _CRT_FUNCTIONS_REQUIRED = 1; +const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; -const int _CRT_HAS_CXX17 = 0; +const int __DARWIN_C_ANSI = 4096; -const int _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE = 1; +const int __DARWIN_C_FULL = 900000; -const int _CRT_BUILD_DESKTOP_APP = 1; +const int __DARWIN_C_LEVEL = 900000; -const int _CRT_INTERNAL_NONSTDC_NAMES = 1; +const int __STDC_WANT_LIB_EXT1__ = 1; -const int __STDC_SECURE_LIB__ = 200411; +const int __DARWIN_NO_LONG_LONG = 0; -const int __GOT_SECURE_LIB__ = 200411; +const int _DARWIN_FEATURE_64_BIT_INODE = 1; -const int __STDC_WANT_SECURE_LIB__ = 1; +const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; -const int _SECURECRT_FILL_BUFFER_PATTERN = 254; +const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; -const int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0; +const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; -const int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0; +const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; -const int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 1; +const int __has_ptrcheck = 0; -const int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0; +const int __DARWIN_NULL = 0; -const int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0; +const int __PTHREAD_SIZE__ = 8176; -const int CHAR_BIT = 8; +const int __PTHREAD_ATTR_SIZE__ = 56; -const int SCHAR_MIN = -128; +const int __PTHREAD_MUTEXATTR_SIZE__ = 8; + +const int __PTHREAD_MUTEX_SIZE__ = 56; + +const int __PTHREAD_CONDATTR_SIZE__ = 8; + +const int __PTHREAD_COND_SIZE__ = 40; + +const int __PTHREAD_ONCE_SIZE__ = 8; + +const int __PTHREAD_RWLOCK_SIZE__ = 192; + +const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; + +const int __DARWIN_WCHAR_MAX = 2147483647; + +const int __DARWIN_WCHAR_MIN = -2147483648; + +const int __DARWIN_WEOF = -1; + +const int _FORTIFY_SOURCE = 2; + +const int NULL = 0; + +const int USER_ADDR_NULL = 0; + +const int __DARWIN_CLK_TCK = 100; + +const int MB_LEN_MAX = 6; + +const int CLK_TCK = 100; + +const int CHAR_BIT = 8; const int SCHAR_MAX = 127; -const int UCHAR_MAX = 255; +const int SCHAR_MIN = -128; -const int CHAR_MIN = -128; +const int UCHAR_MAX = 255; const int CHAR_MAX = 127; -const int MB_LEN_MAX = 5; +const int CHAR_MIN = -128; -const int SHRT_MIN = -32768; +const int USHRT_MAX = 65535; const int SHRT_MAX = 32767; -const int USHRT_MAX = 65535; +const int SHRT_MIN = -32768; -const int INT_MIN = -2147483648; +const int UINT_MAX = 4294967295; const int INT_MAX = 2147483647; -const int UINT_MAX = 4294967295; +const int INT_MIN = -2147483648; + +const int ULONG_MAX = -1; -const int LONG_MIN = -2147483648; +const int LONG_MAX = 9223372036854775807; -const int LONG_MAX = 2147483647; +const int LONG_MIN = -9223372036854775808; -const int ULONG_MAX = 4294967295; +const int ULLONG_MAX = -1; const int LLONG_MAX = 9223372036854775807; const int LLONG_MIN = -9223372036854775808; -const int ULLONG_MAX = -1; +const int LONG_BIT = 64; + +const int SSIZE_MAX = 9223372036854775807; + +const int WORD_BIT = 32; + +const int SIZE_T_MAX = -1; + +const int UQUAD_MAX = -1; + +const int QUAD_MAX = 9223372036854775807; + +const int QUAD_MIN = -9223372036854775808; + +const int ARG_MAX = 1048576; + +const int CHILD_MAX = 266; + +const int GID_MAX = 2147483647; + +const int LINK_MAX = 32767; + +const int MAX_CANON = 1024; + +const int MAX_INPUT = 1024; + +const int NAME_MAX = 255; + +const int NGROUPS_MAX = 16; + +const int UID_MAX = 2147483647; + +const int OPEN_MAX = 10240; + +const int PATH_MAX = 1024; + +const int PIPE_BUF = 512; + +const int BC_BASE_MAX = 99; + +const int BC_DIM_MAX = 2048; + +const int BC_SCALE_MAX = 99; + +const int BC_STRING_MAX = 1000; + +const int CHARCLASS_NAME_MAX = 14; + +const int COLL_WEIGHTS_MAX = 2; + +const int EQUIV_CLASS_MAX = 2; + +const int EXPR_NEST_MAX = 32; + +const int LINE_MAX = 2048; + +const int RE_DUP_MAX = 255; + +const int NZERO = 20; + +const int _POSIX_ARG_MAX = 4096; + +const int _POSIX_CHILD_MAX = 25; + +const int _POSIX_LINK_MAX = 8; + +const int _POSIX_MAX_CANON = 255; + +const int _POSIX_MAX_INPUT = 255; + +const int _POSIX_NAME_MAX = 14; + +const int _POSIX_NGROUPS_MAX = 8; + +const int _POSIX_OPEN_MAX = 20; -const int _I8_MIN = -128; +const int _POSIX_PATH_MAX = 256; -const int _I8_MAX = 127; +const int _POSIX_PIPE_BUF = 512; -const int _UI8_MAX = 255; +const int _POSIX_SSIZE_MAX = 32767; -const int _I16_MIN = -32768; +const int _POSIX_STREAM_MAX = 8; -const int _I16_MAX = 32767; +const int _POSIX_TZNAME_MAX = 6; -const int _UI16_MAX = 65535; +const int _POSIX2_BC_BASE_MAX = 99; -const int _I32_MIN = -2147483648; +const int _POSIX2_BC_DIM_MAX = 2048; -const int _I32_MAX = 2147483647; +const int _POSIX2_BC_SCALE_MAX = 99; -const int _UI32_MAX = 4294967295; +const int _POSIX2_BC_STRING_MAX = 1000; -const int _I64_MIN = -9223372036854775808; +const int _POSIX2_EQUIV_CLASS_MAX = 2; -const int _I64_MAX = 9223372036854775807; +const int _POSIX2_EXPR_NEST_MAX = 32; -const int _UI64_MAX = -1; +const int _POSIX2_LINE_MAX = 2048; -const int SIZE_MAX = -1; +const int _POSIX2_RE_DUP_MAX = 255; -const int RSIZE_MAX = 9223372036854775807; +const int _POSIX_AIO_LISTIO_MAX = 2; + +const int _POSIX_AIO_MAX = 1; + +const int _POSIX_DELAYTIMER_MAX = 32; + +const int _POSIX_MQ_OPEN_MAX = 8; + +const int _POSIX_MQ_PRIO_MAX = 32; + +const int _POSIX_RTSIG_MAX = 8; + +const int _POSIX_SEM_NSEMS_MAX = 256; + +const int _POSIX_SEM_VALUE_MAX = 32767; + +const int _POSIX_SIGQUEUE_MAX = 32; + +const int _POSIX_TIMER_MAX = 32; + +const int _POSIX_CLOCKRES_MIN = 20000000; + +const int _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4; + +const int _POSIX_THREAD_KEYS_MAX = 128; + +const int _POSIX_THREAD_THREADS_MAX = 64; + +const int PTHREAD_DESTRUCTOR_ITERATIONS = 4; + +const int PTHREAD_KEYS_MAX = 512; + +const int PTHREAD_STACK_MIN = 16384; + +const int _POSIX_HOST_NAME_MAX = 255; + +const int _POSIX_LOGIN_NAME_MAX = 9; + +const int _POSIX_SS_REPL_MAX = 4; + +const int _POSIX_SYMLINK_MAX = 255; + +const int _POSIX_SYMLOOP_MAX = 8; + +const int _POSIX_TRACE_EVENT_NAME_MAX = 30; + +const int _POSIX_TRACE_NAME_MAX = 8; + +const int _POSIX_TRACE_SYS_MAX = 8; + +const int _POSIX_TRACE_USER_EVENT_MAX = 32; + +const int _POSIX_TTY_NAME_MAX = 9; + +const int _POSIX2_CHARCLASS_NAME_MAX = 14; + +const int _POSIX2_COLL_WEIGHTS_MAX = 2; + +const int _POSIX_RE_DUP_MAX = 255; + +const int OFF_MIN = -9223372036854775808; + +const int OFF_MAX = 9223372036854775807; + +const int PASS_MAX = 128; + +const int NL_ARGMAX = 9; + +const int NL_LANGMAX = 14; + +const int NL_MSGMAX = 32767; + +const int NL_NMAX = 1; + +const int NL_SETMAX = 255; + +const int NL_TEXTMAX = 2048; + +const int _XOPEN_IOV_MAX = 16; + +const int IOV_MAX = 1024; + +const int _XOPEN_NAME_MAX = 255; + +const int _XOPEN_PATH_MAX = 1024; const int DC_TIMEZONE_NONE = -2147483648; @@ -2532,3 +2859,7 @@ const int DC_DIVEMODE_CC = 3; const int DC_SENSOR_NONE = 4294967295; const int DC_GASMIX_UNKNOWN = 4294967295; + +const int DC_IOCTL_USB_CONTROL_READ = 1073771776; + +const int DC_IOCTL_USB_CONTROL_WRITE = 2147513600; diff --git a/lib/framework/interfaces/dive_computer_interfaces.dart b/lib/framework/interfaces/dive_computer_interfaces.dart new file mode 100644 index 0000000..467f8ea --- /dev/null +++ b/lib/framework/interfaces/dive_computer_interfaces.dart @@ -0,0 +1,183 @@ +import 'dart:ffi' as ffi; +import 'package:ffi/ffi.dart'; +import 'package:logging/logging.dart' as logging; + +import '../utils/utils.dart'; +import '../dive_computer_ffi_bindings_generated.dart'; +import '../../types/computer.dart'; + +class Interfaces { + final DiveComputerFfiBindings bindings; + final ffi.Pointer> context; + final logging.Logger log; + + Interfaces({ + required this.bindings, + required this.context, + required this.log, + }); + + ffi.Pointer connect( + ComputerTransport transport, ffi.Pointer computer) { + switch (transport) { + case ComputerTransport.serial: + return _connectSerial(computer); + case ComputerTransport.usb: + return _connectUsb(computer); + case ComputerTransport.usbhid: + return _connectUsbHid(computer); + default: + throw UnimplementedError(); + } + } + + ffi.Pointer _connectSerial( + ffi.Pointer computer) { + final iterator = calloc>(); + + handleResult( + bindings.dc_serial_iterator_new(iterator, context.value, computer), + 'serial connection', + ); + + final names = >[]; + + int result; + final desc = calloc>(); + while ((result = bindings.dc_iterator_next(iterator.value, desc.cast())) == + dc_status_t.DC_STATUS_SUCCESS) { + final ffi.Pointer name = + bindings.dc_serial_device_get_name(desc.value).cast(); + names.add(name); + + bindings.dc_serial_device_free(desc.value); + } + handleResult(result, 'iterator next'); + log.info( + 'Serial devices: ${names.map((e) => e.toDartString()).join(', ')}', + ); + + handleResult( + bindings.dc_iterator_free(iterator.value), + 'iterator freeing', + ); + + if (names.isEmpty) { + handleResult(dc_status_t.DC_STATUS_NODEVICE); + } + + // ### Connecting to the device ### // + final iostream = calloc>(); + + handleResult( + bindings.dc_serial_open( + iostream, + context.value, + names[0].cast(), + ), + 'serial open', + ); + + return iostream.value; + } + + ffi.Pointer _connectUsb( + ffi.Pointer computer) { + final iterator = calloc>(); + + handleResult( + bindings.dc_usb_iterator_new(iterator, context.value, computer), + 'usb connection', + ); + + final desc = calloc>(); + while (bindings.dc_iterator_next(iterator.value, desc.cast()) == + dc_status_t.DC_STATUS_SUCCESS) { + break; + } + + handleResult( + bindings.dc_iterator_free(iterator.value), + 'iterator freeing', + ); + + if (desc.value == ffi.nullptr) { + handleResult(dc_status_t.DC_STATUS_NODEVICE); + } + + String vidHex = bindings + .dc_usb_device_get_vid(desc.value) + .toRadixString(16) + .padLeft(4, '0'); + String pidHex = bindings + .dc_usb_device_get_pid(desc.value) + .toRadixString(16) + .padLeft(4, '0'); + + log.info('Opening USB device for $vidHex:$pidHex'); + + final iostream = calloc>(); + handleResult( + bindings.dc_usb_open( + iostream, + context.value, + desc.value, + ), + 'usbhid open', + ); + + bindings.dc_usb_device_free(desc.value); + + return iostream.value; + } + + ffi.Pointer _connectUsbHid( + ffi.Pointer computer) { + final iterator = calloc>(); + + handleResult( + bindings.dc_usbhid_iterator_new(iterator, context.value, computer), + 'usbhid connection', + ); + + final desc = calloc>(); + while (bindings.dc_iterator_next(iterator.value, desc.cast()) == + dc_status_t.DC_STATUS_SUCCESS) { + break; + } + + handleResult( + bindings.dc_iterator_free(iterator.value), + 'iterator freeing', + ); + + if (desc.value == ffi.nullptr) { + handleResult(dc_status_t.DC_STATUS_NODEVICE); + } + + String vidHex = bindings + .dc_usbhid_device_get_vid(desc.value) + .toRadixString(16) + .padLeft(4, '0'); + String pidHex = bindings + .dc_usbhid_device_get_pid(desc.value) + .toRadixString(16) + .padLeft(4, '0'); + + log.info('Opening USB HID device for $vidHex:$pidHex'); + + final iostream = calloc>(); + handleResult( + bindings.dc_usbhid_open( + iostream, + context.value, + desc.value, + ), + 'usbhid open', + ); + + bindings.dc_usbhid_device_free(desc.value); + + return iostream.value; + } +} diff --git a/lib/framework/utils/utils.dart b/lib/framework/utils/utils.dart new file mode 100644 index 0000000..4e31c32 --- /dev/null +++ b/lib/framework/utils/utils.dart @@ -0,0 +1,76 @@ +import 'dart:async'; +import 'package:logging/logging.dart' as logging; + +import '../dive_computer_ffi_bindings_generated.dart'; + +final log = logging.Logger('DiveComputerFfi'); + +void handleResult(int result, [String operation = '']) { + switch (result) { + case dc_status_t.DC_STATUS_SUCCESS: + if (operation.isNotEmpty) { + log.finer('$operation successful'); + } + break; + case dc_status_t.DC_STATUS_DONE: + if (operation.isNotEmpty) { + log.finer('$operation done'); + } + break; + case dc_status_t.DC_STATUS_UNSUPPORTED: + if (operation.isNotEmpty) { + log.finer('$operation Unsupported'); + } + throw UnsupportedError('Unsupported'); + case dc_status_t.DC_STATUS_INVALIDARGS: + if (operation.isNotEmpty) { + log.finer('$operation Invalid arguments'); + } + throw ArgumentError('Invalid arguments'); + case dc_status_t.DC_STATUS_TIMEOUT: + if (operation.isNotEmpty) { + log.finer('$operation Timeout'); + } + throw TimeoutException("Timeout"); + case dc_status_t.DC_STATUS_NOMEMORY: + if (operation.isNotEmpty) { + log.finer('$operation Out of memory'); + } + throw const OutOfMemoryError(); + case dc_status_t.DC_STATUS_NODEVICE: + if (operation.isNotEmpty) { + log.finer('$operation No device'); + } + throw Exception("No device"); + case dc_status_t.DC_STATUS_NOACCESS: + if (operation.isNotEmpty) { + log.finer('$operation No access'); + } + throw Exception("No access"); + case dc_status_t.DC_STATUS_IO: + if (operation.isNotEmpty) { + log.finer('$operation IO'); + } + throw Exception("IO"); + case dc_status_t.DC_STATUS_PROTOCOL: + if (operation.isNotEmpty) { + log.finer('$operation Protocol'); + } + throw Exception("Protocol"); + case dc_status_t.DC_STATUS_DATAFORMAT: + if (operation.isNotEmpty) { + log.finer('$operation Data format'); + } + throw Exception("Data format"); + case dc_status_t.DC_STATUS_CANCELLED: + if (operation.isNotEmpty) { + log.finer('$operation Cancelled'); + } + throw Exception("Cancelled"); + default: + if (operation.isNotEmpty) { + log.finer('$operation Unknown'); + } + throw Exception("Unknown error"); + } +} diff --git a/macos/Classes/array.c b/macos/Classes/array.c new file mode 100644 index 0000000..11aac65 --- /dev/null +++ b/macos/Classes/array.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/array.c" \ No newline at end of file diff --git a/macos/Classes/atomics_cobalt.c b/macos/Classes/atomics_cobalt.c new file mode 100644 index 0000000..ac50521 --- /dev/null +++ b/macos/Classes/atomics_cobalt.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/atomics_cobalt.c" \ No newline at end of file diff --git a/macos/Classes/atomics_cobalt_parser.c b/macos/Classes/atomics_cobalt_parser.c new file mode 100644 index 0000000..5dbd71f --- /dev/null +++ b/macos/Classes/atomics_cobalt_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/atomics_cobalt_parser.c" \ No newline at end of file diff --git a/macos/Classes/citizen_aqualand.c b/macos/Classes/citizen_aqualand.c new file mode 100644 index 0000000..d762fc3 --- /dev/null +++ b/macos/Classes/citizen_aqualand.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/citizen_aqualand.c" \ No newline at end of file diff --git a/macos/Classes/citizen_aqualand_parser.c b/macos/Classes/citizen_aqualand_parser.c new file mode 100644 index 0000000..4dae348 --- /dev/null +++ b/macos/Classes/citizen_aqualand_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/citizen_aqualand_parser.c" \ No newline at end of file diff --git a/macos/Classes/cochran_commander.c b/macos/Classes/cochran_commander.c new file mode 100644 index 0000000..15e3903 --- /dev/null +++ b/macos/Classes/cochran_commander.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/cochran_commander.c" \ No newline at end of file diff --git a/macos/Classes/cochran_commander_parser.c b/macos/Classes/cochran_commander_parser.c new file mode 100644 index 0000000..7ee3478 --- /dev/null +++ b/macos/Classes/cochran_commander_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/cochran_commander_parser.c" \ No newline at end of file diff --git a/macos/Classes/config.h b/macos/Classes/config.h new file mode 100644 index 0000000..58a46dd --- /dev/null +++ b/macos/Classes/config.h @@ -0,0 +1,158 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +#define HAVE_CONFIG_H 1 + +/* Enable logging. */ +#define ENABLE_LOGGING 1 + +/* Enable pseudo terminal support. */ +/* #undef ENABLE_PTY */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AF_IRDA_H */ + +/* BlueZ library */ +/* #undef HAVE_BLUEZ */ + +/* Define to 1 if you have the 'clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the declaration of 'optreset', and to 0 if you + don't. */ +#define HAVE_DECL_OPTRESET 1 + +/* Define to 1 if you have the declaration of 'strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the 'getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the 'gmtime_r' function. */ +#define HAVE_GMTIME_R 1 + +/* hidapi library */ +#define HAVE_HIDAPI 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOKIT_SERIAL_IOSS_H 1 + +/* libusb library */ +#define HAVE_LIBUSB 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_IRDA_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_SERIAL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_TYPES_H */ + +/* Define to 1 if you have the 'localtime_r' function. */ +#define HAVE_LOCALTIME_R 1 + +/* Define to 1 if you have the 'mach_absolute_time' function. */ +#define HAVE_MACH_ABSOLUTE_TIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MACH_MACH_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define if you have 'strerror_r'. */ +#define HAVE_STRERROR_R 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if 'tm_gmtoff' is a member of 'struct tm'. */ +#define HAVE_STRUCT_TM_TM_GMTOFF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the 'timegm' function. */ +#define HAVE_TIMEGM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if a version suffix is present. */ +#define HAVE_VERSION_SUFFIX 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2BTH_H */ + +/* Define to 1 if you have the '_mkgmtime' function. */ +/* #undef HAVE__MKGMTIME */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libdivecomputer" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libdivecomputer" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libdivecomputer 0.9.0-devel" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libdivecomputer" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.9.0-devel" + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* Version number of package */ +#define VERSION "0.9.0-devel" diff --git a/macos/Classes/cressi_ady_parser.c b/macos/Classes/cressi_ady_parser.c new file mode 100644 index 0000000..2bcd171 --- /dev/null +++ b/macos/Classes/cressi_ady_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/cressi_edy_parser.c" \ No newline at end of file diff --git a/macos/Classes/cressi_edy.c b/macos/Classes/cressi_edy.c new file mode 100644 index 0000000..fad1d26 --- /dev/null +++ b/macos/Classes/cressi_edy.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/cressi_edy.c" \ No newline at end of file diff --git a/macos/Classes/cressi_goa.c b/macos/Classes/cressi_goa.c new file mode 100644 index 0000000..16804db --- /dev/null +++ b/macos/Classes/cressi_goa.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/cressi_goa.c" \ No newline at end of file diff --git a/macos/Classes/cressi_goa_parser.c b/macos/Classes/cressi_goa_parser.c new file mode 100644 index 0000000..0249645 --- /dev/null +++ b/macos/Classes/cressi_goa_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/cressi_goa_parser.c" \ No newline at end of file diff --git a/macos/Classes/cressi_leonardo.c b/macos/Classes/cressi_leonardo.c new file mode 100644 index 0000000..0920e12 --- /dev/null +++ b/macos/Classes/cressi_leonardo.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/cressi_leonardo.c" \ No newline at end of file diff --git a/macos/Classes/cressi_leonardo_parser.c b/macos/Classes/cressi_leonardo_parser.c new file mode 100644 index 0000000..c059391 --- /dev/null +++ b/macos/Classes/cressi_leonardo_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/cressi_leonardo_parser.c" \ No newline at end of file diff --git a/macos/Classes/deepblu_cosmiq.c b/macos/Classes/deepblu_cosmiq.c new file mode 100644 index 0000000..0560d94 --- /dev/null +++ b/macos/Classes/deepblu_cosmiq.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/deepblu_cosmiq.c" \ No newline at end of file diff --git a/macos/Classes/deepblu_cosmiq_parser.c b/macos/Classes/deepblu_cosmiq_parser.c new file mode 100644 index 0000000..9bd2470 --- /dev/null +++ b/macos/Classes/deepblu_cosmiq_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/deepblu_cosmiq_parser.c" \ No newline at end of file diff --git a/macos/Classes/deepsix_excursion.c b/macos/Classes/deepsix_excursion.c new file mode 100644 index 0000000..34830f7 --- /dev/null +++ b/macos/Classes/deepsix_excursion.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/deepsix_excursion.c" \ No newline at end of file diff --git a/macos/Classes/deepsix_excursion_parser.c b/macos/Classes/deepsix_excursion_parser.c new file mode 100644 index 0000000..3be7ed2 --- /dev/null +++ b/macos/Classes/deepsix_excursion_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/deepsix_excursion_parser.c" \ No newline at end of file diff --git a/macos/Classes/dive_computer.c b/macos/Classes/dive_computer.c new file mode 100644 index 0000000..d3075c4 --- /dev/null +++ b/macos/Classes/dive_computer.c @@ -0,0 +1,17 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/context.c" +#include "../../src/libdivecomputer/src/device.c" +#include "../../src/libdivecomputer/src/iterator.c" +#include "../../src/libdivecomputer/src/buffer.c" +#include "../../src/libdivecomputer/src/descriptor.c" +#include "../../src/libdivecomputer/src/iostream.c" +#include "../../src/libdivecomputer/src/checksum.c" +#include "../../src/libdivecomputer/src/ringbuffer.c" +#include "../../src/libdivecomputer/src/rbstream.c" +#include "../../src/libdivecomputer/src/common.c" +#include "../../src/libdivecomputer/src/datetime.c" +#include "../../src/libdivecomputer/src/packet.c" +#include "../../src/libdivecomputer/src/aes.c" +#include "../../src/libdivecomputer/src/platform.c" +#include "../../src/libdivecomputer/src/timer.c" +#include "../../src/libdivecomputer/src/parser.c" \ No newline at end of file diff --git a/macos/Classes/diverite_nitekq.c b/macos/Classes/diverite_nitekq.c new file mode 100644 index 0000000..055442e --- /dev/null +++ b/macos/Classes/diverite_nitekq.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/diverite_nitekq.c" \ No newline at end of file diff --git a/macos/Classes/diverite_nitekq_parser.c b/macos/Classes/diverite_nitekq_parser.c new file mode 100644 index 0000000..993af29 --- /dev/null +++ b/macos/Classes/diverite_nitekq_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/diverite_nitekq_parser.c" \ No newline at end of file diff --git a/macos/Classes/divesoft_freedom.c b/macos/Classes/divesoft_freedom.c new file mode 100644 index 0000000..d1912c9 --- /dev/null +++ b/macos/Classes/divesoft_freedom.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/divesoft_freedom.c" \ No newline at end of file diff --git a/macos/Classes/divesoft_freedom_parser.c b/macos/Classes/divesoft_freedom_parser.c new file mode 100644 index 0000000..a425ce2 --- /dev/null +++ b/macos/Classes/divesoft_freedom_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/divesoft_freedom_parser.c" \ No newline at end of file diff --git a/macos/Classes/divesystem_idive.c b/macos/Classes/divesystem_idive.c new file mode 100644 index 0000000..eecf385 --- /dev/null +++ b/macos/Classes/divesystem_idive.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/divesystem_idive.c" \ No newline at end of file diff --git a/macos/Classes/divesystem_idive_parser.c b/macos/Classes/divesystem_idive_parser.c new file mode 100644 index 0000000..db9909a --- /dev/null +++ b/macos/Classes/divesystem_idive_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/divesystem_idive_parser.c" \ No newline at end of file diff --git a/macos/Classes/hdlc.c b/macos/Classes/hdlc.c new file mode 100644 index 0000000..86f4f40 --- /dev/null +++ b/macos/Classes/hdlc.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/hdlc.c" \ No newline at end of file diff --git a/macos/Classes/hid.c b/macos/Classes/hid.c new file mode 100644 index 0000000..afa0c25 --- /dev/null +++ b/macos/Classes/hid.c @@ -0,0 +1 @@ +#include "../../src/hidapi/mac/hid.c" diff --git a/macos/Classes/hw_frog.c b/macos/Classes/hw_frog.c new file mode 100644 index 0000000..0cf425a --- /dev/null +++ b/macos/Classes/hw_frog.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/hw_frog.c" \ No newline at end of file diff --git a/macos/Classes/hw_ostc.c b/macos/Classes/hw_ostc.c new file mode 100644 index 0000000..75e9ad9 --- /dev/null +++ b/macos/Classes/hw_ostc.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/hw_ostc.c" \ No newline at end of file diff --git a/macos/Classes/hw_ostc3.c b/macos/Classes/hw_ostc3.c new file mode 100644 index 0000000..e95c6e7 --- /dev/null +++ b/macos/Classes/hw_ostc3.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/hw_ostc3.c" \ No newline at end of file diff --git a/macos/Classes/hw_ostc_parser.c b/macos/Classes/hw_ostc_parser.c new file mode 100644 index 0000000..219de9f --- /dev/null +++ b/macos/Classes/hw_ostc_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/hw_ostc_parser.c" \ No newline at end of file diff --git a/macos/Classes/ihex.c b/macos/Classes/ihex.c new file mode 100644 index 0000000..7160ec4 --- /dev/null +++ b/macos/Classes/ihex.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/ihex.c" \ No newline at end of file diff --git a/macos/Classes/liquivision_lynx.c b/macos/Classes/liquivision_lynx.c new file mode 100644 index 0000000..25d9b3a --- /dev/null +++ b/macos/Classes/liquivision_lynx.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/liquivision_lynx.c" \ No newline at end of file diff --git a/macos/Classes/liquivision_lynx_parser.c b/macos/Classes/liquivision_lynx_parser.c new file mode 100644 index 0000000..c3a5d40 --- /dev/null +++ b/macos/Classes/liquivision_lynx_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/liquivision_lynx_parser.c" \ No newline at end of file diff --git a/macos/Classes/mares_common.c b/macos/Classes/mares_common.c new file mode 100644 index 0000000..98bd71e --- /dev/null +++ b/macos/Classes/mares_common.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/mares_common.c" \ No newline at end of file diff --git a/macos/Classes/mares_darwin.c b/macos/Classes/mares_darwin.c new file mode 100644 index 0000000..4df7462 --- /dev/null +++ b/macos/Classes/mares_darwin.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/mares_darwin.c" \ No newline at end of file diff --git a/macos/Classes/mares_darwin_parser.c b/macos/Classes/mares_darwin_parser.c new file mode 100644 index 0000000..00b1387 --- /dev/null +++ b/macos/Classes/mares_darwin_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/mares_darwin_parser.c" \ No newline at end of file diff --git a/macos/Classes/mares_iconhd.c b/macos/Classes/mares_iconhd.c new file mode 100644 index 0000000..a65c583 --- /dev/null +++ b/macos/Classes/mares_iconhd.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/mares_iconhd.c" \ No newline at end of file diff --git a/macos/Classes/mares_iconhd_parser.c b/macos/Classes/mares_iconhd_parser.c new file mode 100644 index 0000000..e1f81c7 --- /dev/null +++ b/macos/Classes/mares_iconhd_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/mares_iconhd_parser.c" \ No newline at end of file diff --git a/macos/Classes/mares_nemo.c b/macos/Classes/mares_nemo.c new file mode 100644 index 0000000..5073887 --- /dev/null +++ b/macos/Classes/mares_nemo.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/mares_nemo.c" \ No newline at end of file diff --git a/macos/Classes/mares_nemo_parser.c b/macos/Classes/mares_nemo_parser.c new file mode 100644 index 0000000..4db5af1 --- /dev/null +++ b/macos/Classes/mares_nemo_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/mares_nemo_parser.c" \ No newline at end of file diff --git a/macos/Classes/mares_puck.c b/macos/Classes/mares_puck.c new file mode 100644 index 0000000..4e8607c --- /dev/null +++ b/macos/Classes/mares_puck.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/mares_puck.c" \ No newline at end of file diff --git a/macos/Classes/mclean_extreme.c b/macos/Classes/mclean_extreme.c new file mode 100644 index 0000000..0dbabd5 --- /dev/null +++ b/macos/Classes/mclean_extreme.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/mclean_extreme.c" \ No newline at end of file diff --git a/macos/Classes/mclean_extreme_parser.c b/macos/Classes/mclean_extreme_parser.c new file mode 100644 index 0000000..d17a471 --- /dev/null +++ b/macos/Classes/mclean_extreme_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/mclean_extreme_parser.c" \ No newline at end of file diff --git a/macos/Classes/oceanic_atom2.c b/macos/Classes/oceanic_atom2.c new file mode 100644 index 0000000..794c001 --- /dev/null +++ b/macos/Classes/oceanic_atom2.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/oceanic_atom2.c" \ No newline at end of file diff --git a/macos/Classes/oceanic_atom2_parser.c b/macos/Classes/oceanic_atom2_parser.c new file mode 100644 index 0000000..33695b7 --- /dev/null +++ b/macos/Classes/oceanic_atom2_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/oceanic_atom2_parser.c" \ No newline at end of file diff --git a/macos/Classes/oceanic_common.c b/macos/Classes/oceanic_common.c new file mode 100644 index 0000000..359abd4 --- /dev/null +++ b/macos/Classes/oceanic_common.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/oceanic_common.c" \ No newline at end of file diff --git a/macos/Classes/oceanic_veo250.c b/macos/Classes/oceanic_veo250.c new file mode 100644 index 0000000..e195327 --- /dev/null +++ b/macos/Classes/oceanic_veo250.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/oceanic_veo250.c" \ No newline at end of file diff --git a/macos/Classes/oceanic_veo250_parser.c b/macos/Classes/oceanic_veo250_parser.c new file mode 100644 index 0000000..abb9492 --- /dev/null +++ b/macos/Classes/oceanic_veo250_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/oceanic_veo250_parser.c" \ No newline at end of file diff --git a/macos/Classes/oceans_s1.c b/macos/Classes/oceans_s1.c new file mode 100644 index 0000000..4f6106a --- /dev/null +++ b/macos/Classes/oceans_s1.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/oceans_s1.c" \ No newline at end of file diff --git a/macos/Classes/oceans_s1_common.c b/macos/Classes/oceans_s1_common.c new file mode 100644 index 0000000..1ef9fcb --- /dev/null +++ b/macos/Classes/oceans_s1_common.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/oceans_s1_common.c" \ No newline at end of file diff --git a/macos/Classes/oceans_s1_parser.c b/macos/Classes/oceans_s1_parser.c new file mode 100644 index 0000000..870a5c8 --- /dev/null +++ b/macos/Classes/oceans_s1_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/oceans_s1_parser.c" \ No newline at end of file diff --git a/macos/Classes/ocenic_vtpro.c b/macos/Classes/ocenic_vtpro.c new file mode 100644 index 0000000..5313627 --- /dev/null +++ b/macos/Classes/ocenic_vtpro.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/oceanic_vtpro.c" \ No newline at end of file diff --git a/macos/Classes/ocenic_vtpro_parser.c b/macos/Classes/ocenic_vtpro_parser.c new file mode 100644 index 0000000..8c33ecd --- /dev/null +++ b/macos/Classes/ocenic_vtpro_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/oceanic_vtpro_parser.c" \ No newline at end of file diff --git a/macos/Classes/reefnet_sensus.c b/macos/Classes/reefnet_sensus.c new file mode 100644 index 0000000..17ad4f3 --- /dev/null +++ b/macos/Classes/reefnet_sensus.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/reefnet_sensus.c" \ No newline at end of file diff --git a/macos/Classes/reefnet_sensus_parser.c b/macos/Classes/reefnet_sensus_parser.c new file mode 100644 index 0000000..1ad60dd --- /dev/null +++ b/macos/Classes/reefnet_sensus_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/reefnet_sensus_parser.c" \ No newline at end of file diff --git a/macos/Classes/reefnet_sensuspro.c b/macos/Classes/reefnet_sensuspro.c new file mode 100644 index 0000000..18a7641 --- /dev/null +++ b/macos/Classes/reefnet_sensuspro.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/reefnet_sensuspro.c" \ No newline at end of file diff --git a/macos/Classes/reefnet_sensuspro_parser.c b/macos/Classes/reefnet_sensuspro_parser.c new file mode 100644 index 0000000..c312291 --- /dev/null +++ b/macos/Classes/reefnet_sensuspro_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/reefnet_sensuspro_parser.c" \ No newline at end of file diff --git a/macos/Classes/reefnet_sensusultra.c b/macos/Classes/reefnet_sensusultra.c new file mode 100644 index 0000000..4f12834 --- /dev/null +++ b/macos/Classes/reefnet_sensusultra.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/reefnet_sensusultra.c" \ No newline at end of file diff --git a/macos/Classes/reefnet_sensusultra_parser.c b/macos/Classes/reefnet_sensusultra_parser.c new file mode 100644 index 0000000..8144fd2 --- /dev/null +++ b/macos/Classes/reefnet_sensusultra_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/reefnet_sensusultra_parser.c" \ No newline at end of file diff --git a/macos/Classes/seac_screen.c b/macos/Classes/seac_screen.c new file mode 100644 index 0000000..d6af7e0 --- /dev/null +++ b/macos/Classes/seac_screen.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/seac_screen.c" \ No newline at end of file diff --git a/macos/Classes/seac_screen_parser.c b/macos/Classes/seac_screen_parser.c new file mode 100644 index 0000000..267f566 --- /dev/null +++ b/macos/Classes/seac_screen_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/seac_screen_parser.c" \ No newline at end of file diff --git a/macos/Classes/serial_posix.c b/macos/Classes/serial_posix.c new file mode 100644 index 0000000..5a909d9 --- /dev/null +++ b/macos/Classes/serial_posix.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/serial_posix.c" \ No newline at end of file diff --git a/macos/Classes/shearwater_common.c b/macos/Classes/shearwater_common.c new file mode 100644 index 0000000..5386313 --- /dev/null +++ b/macos/Classes/shearwater_common.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/shearwater_common.c" \ No newline at end of file diff --git a/macos/Classes/shearwater_petrel.c b/macos/Classes/shearwater_petrel.c new file mode 100644 index 0000000..2e8e3dc --- /dev/null +++ b/macos/Classes/shearwater_petrel.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/shearwater_petrel.c" \ No newline at end of file diff --git a/macos/Classes/shearwater_predator.c b/macos/Classes/shearwater_predator.c new file mode 100644 index 0000000..8e08581 --- /dev/null +++ b/macos/Classes/shearwater_predator.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/shearwater_predator.c" \ No newline at end of file diff --git a/macos/Classes/shearwater_predator_parser.c b/macos/Classes/shearwater_predator_parser.c new file mode 100644 index 0000000..8d63c24 --- /dev/null +++ b/macos/Classes/shearwater_predator_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/shearwater_predator_parser.c" \ No newline at end of file diff --git a/macos/Classes/sporasub_sp2.c b/macos/Classes/sporasub_sp2.c new file mode 100644 index 0000000..dfe9acb --- /dev/null +++ b/macos/Classes/sporasub_sp2.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/sporasub_sp2.c" \ No newline at end of file diff --git a/macos/Classes/sporasub_sp2_parser.c b/macos/Classes/sporasub_sp2_parser.c new file mode 100644 index 0000000..6702d88 --- /dev/null +++ b/macos/Classes/sporasub_sp2_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/sporasub_sp2_parser.c" \ No newline at end of file diff --git a/macos/Classes/suunto_common.c b/macos/Classes/suunto_common.c new file mode 100644 index 0000000..7b401c2 --- /dev/null +++ b/macos/Classes/suunto_common.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_common.c" \ No newline at end of file diff --git a/macos/Classes/suunto_common2.c b/macos/Classes/suunto_common2.c new file mode 100644 index 0000000..7948a4b --- /dev/null +++ b/macos/Classes/suunto_common2.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_common2.c" \ No newline at end of file diff --git a/macos/Classes/suunto_d9.c b/macos/Classes/suunto_d9.c new file mode 100644 index 0000000..65df56d --- /dev/null +++ b/macos/Classes/suunto_d9.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_d9.c" \ No newline at end of file diff --git a/macos/Classes/suunto_d9_parser.c b/macos/Classes/suunto_d9_parser.c new file mode 100644 index 0000000..ed62ced --- /dev/null +++ b/macos/Classes/suunto_d9_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_d9_parser.c" \ No newline at end of file diff --git a/macos/Classes/suunto_eon.c b/macos/Classes/suunto_eon.c new file mode 100644 index 0000000..358a872 --- /dev/null +++ b/macos/Classes/suunto_eon.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_eon.c" \ No newline at end of file diff --git a/macos/Classes/suunto_eon_parser.c b/macos/Classes/suunto_eon_parser.c new file mode 100644 index 0000000..ae8f88a --- /dev/null +++ b/macos/Classes/suunto_eon_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_eon_parser.c" \ No newline at end of file diff --git a/macos/Classes/suunto_eonsteel.c b/macos/Classes/suunto_eonsteel.c new file mode 100644 index 0000000..de3d35e --- /dev/null +++ b/macos/Classes/suunto_eonsteel.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_eonsteel.c" \ No newline at end of file diff --git a/macos/Classes/suunto_eonsteel_parser.c b/macos/Classes/suunto_eonsteel_parser.c new file mode 100644 index 0000000..e833e48 --- /dev/null +++ b/macos/Classes/suunto_eonsteel_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_eonsteel_parser.c" \ No newline at end of file diff --git a/macos/Classes/suunto_solution.c b/macos/Classes/suunto_solution.c new file mode 100644 index 0000000..c5e2d14 --- /dev/null +++ b/macos/Classes/suunto_solution.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_solution.c" \ No newline at end of file diff --git a/macos/Classes/suunto_solution_parser.c b/macos/Classes/suunto_solution_parser.c new file mode 100644 index 0000000..b30fdf8 --- /dev/null +++ b/macos/Classes/suunto_solution_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_solution_parser.c" \ No newline at end of file diff --git a/macos/Classes/suunto_vyper.c b/macos/Classes/suunto_vyper.c new file mode 100644 index 0000000..c50becb --- /dev/null +++ b/macos/Classes/suunto_vyper.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_vyper.c" \ No newline at end of file diff --git a/macos/Classes/suunto_vyper2.c b/macos/Classes/suunto_vyper2.c new file mode 100644 index 0000000..1e9e3a4 --- /dev/null +++ b/macos/Classes/suunto_vyper2.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_vyper2.c" \ No newline at end of file diff --git a/macos/Classes/suunto_vyper_parser.c b/macos/Classes/suunto_vyper_parser.c new file mode 100644 index 0000000..0089749 --- /dev/null +++ b/macos/Classes/suunto_vyper_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/suunto_vyper_parser.c" \ No newline at end of file diff --git a/macos/Classes/sync.c b/macos/Classes/sync.c new file mode 100644 index 0000000..780e780 --- /dev/null +++ b/macos/Classes/sync.c @@ -0,0 +1,9 @@ +#include "../../src/libusb_config/config.h" +#include "../../src/libusb/libusb/os/threads_posix.c" +#include "../../src/libusb/libusb/os/darwin_usb.c" +#include "../../src/libusb/libusb/os/events_posix.c" +#include "../../src/libusb/libusb/hotplug.c" +#include "../../src/libusb/libusb/io.c" +#include "../../src/libusb/libusb/core.c" +#include "../../src/libusb/libusb/descriptor.c" +#include "../../src/libusb/libusb/sync.c" diff --git a/macos/Classes/tecdiving_divecomputereu.c b/macos/Classes/tecdiving_divecomputereu.c new file mode 100644 index 0000000..d872b71 --- /dev/null +++ b/macos/Classes/tecdiving_divecomputereu.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/tecdiving_divecomputereu.c" \ No newline at end of file diff --git a/macos/Classes/tecdiving_divecomputereu_parser.c b/macos/Classes/tecdiving_divecomputereu_parser.c new file mode 100644 index 0000000..0fa0ddc --- /dev/null +++ b/macos/Classes/tecdiving_divecomputereu_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/tecdiving_divecomputereu_parser.c" \ No newline at end of file diff --git a/macos/Classes/usb.c b/macos/Classes/usb.c new file mode 100644 index 0000000..6dacd7a --- /dev/null +++ b/macos/Classes/usb.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/usb.c" \ No newline at end of file diff --git a/macos/Classes/usbhid.c b/macos/Classes/usbhid.c new file mode 100644 index 0000000..b9a8a95 --- /dev/null +++ b/macos/Classes/usbhid.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/usbhid.c" \ No newline at end of file diff --git a/macos/Classes/uwatec_aladin.c b/macos/Classes/uwatec_aladin.c new file mode 100644 index 0000000..a0a1df6 --- /dev/null +++ b/macos/Classes/uwatec_aladin.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/uwatec_aladin.c" \ No newline at end of file diff --git a/macos/Classes/uwatec_memomouse.c b/macos/Classes/uwatec_memomouse.c new file mode 100644 index 0000000..0f0b6ef --- /dev/null +++ b/macos/Classes/uwatec_memomouse.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/uwatec_memomouse.c" \ No newline at end of file diff --git a/macos/Classes/uwatec_memomouse_parser.c b/macos/Classes/uwatec_memomouse_parser.c new file mode 100644 index 0000000..8abab6d --- /dev/null +++ b/macos/Classes/uwatec_memomouse_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/uwatec_memomouse_parser.c" \ No newline at end of file diff --git a/macos/Classes/uwatec_smart.c b/macos/Classes/uwatec_smart.c new file mode 100644 index 0000000..9a0d225 --- /dev/null +++ b/macos/Classes/uwatec_smart.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/uwatec_smart.c" \ No newline at end of file diff --git a/macos/Classes/uwatec_smart_parser.c b/macos/Classes/uwatec_smart_parser.c new file mode 100644 index 0000000..92e2f1e --- /dev/null +++ b/macos/Classes/uwatec_smart_parser.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/uwatec_smart_parser.c" \ No newline at end of file diff --git a/macos/Classes/zeagle_n2ition3.c b/macos/Classes/zeagle_n2ition3.c new file mode 100644 index 0000000..4905c58 --- /dev/null +++ b/macos/Classes/zeagle_n2ition3.c @@ -0,0 +1,2 @@ +#include "config.h" +#include "../../src/libdivecomputer/src/zeagle_n2ition3.c" \ No newline at end of file diff --git a/macos/dive_computer.podspec b/macos/dive_computer.podspec new file mode 100644 index 0000000..9656505 --- /dev/null +++ b/macos/dive_computer.podspec @@ -0,0 +1,33 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint dive_computer.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'dive_computer' + s.version = '0.0.1' + s.summary = 'DiveComputer FFI plugin for Flutter.' + s.description = <<-DESC +DiveComputer FFI plugin for Flutter. + DESC + s.homepage = 'https://divenote.app' + s.license = { :file => '../LICENSE' } + s.author = { 'Sebastian Schneider' => 'hello@divenote.app' } + + # This will ensure the source files in Classes/ are included in the native + # builds of apps using this FFI plugin. Podspec does not support relative + # paths, so Classes contains a forwarder C file that relatively imports + # `../src/*` so that the C sources can be shared among all target platforms. + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'FlutterMacOS' + + s.platform = :osx, '10.11' + + s.pod_target_xcconfig = { + 'DEFINES_MODULE' => 'YES', + 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/../src/libdivecomputer/include" "${PODS_TARGET_SRCROOT}/../src/libdivecomputer_config" "${PODS_TARGET_SRCROOT}/../src/hidapi/hidapi" "${PODS_TARGET_SRCROOT}/../src/hidapi_config" "${PODS_TARGET_SRCROOT}/../src/libusb/libusb" "${PODS_TARGET_SRCROOT}/../src/libusb_config"', + 'GCC_WARN_INHIBIT_ALL_WARNINGS' => 'YES', + } + + s.swift_version = '5.0' +end diff --git a/native/include/libdivecomputer/atomics_cobalt.h b/native/include/libdivecomputer/atomics_cobalt.h deleted file mode 100644 index c2dfd66..0000000 --- a/native/include/libdivecomputer/atomics_cobalt.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2011 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_ATOMICS_COBALT_H -#define DC_ATOMICS_COBALT_H - -#include "common.h" -#include "device.h" -#include "parser.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -dc_status_t -atomics_cobalt_device_version (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -atomics_cobalt_device_set_simulation (dc_device_t *device, unsigned int simulation); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_ATOMICS_COBALT_H */ diff --git a/native/include/libdivecomputer/ble.h b/native/include/libdivecomputer/ble.h deleted file mode 100644 index 1452873..0000000 --- a/native/include/libdivecomputer/ble.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2019 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_BLE_H -#define DC_BLE_H - -#include "ioctl.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * Get the remote device name. - */ -#define DC_IOCTL_BLE_GET_NAME DC_IOCTL_IOR('b', 0, DC_IOCTL_SIZE_VARIABLE) - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_BLE_H */ diff --git a/native/include/libdivecomputer/bluetooth.h b/native/include/libdivecomputer/bluetooth.h deleted file mode 100644 index c0370ff..0000000 --- a/native/include/libdivecomputer/bluetooth.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2013 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_BLUETOOTH_H -#define DC_BLUETOOTH_H - -#include "common.h" -#include "context.h" -#include "iostream.h" -#include "iterator.h" -#include "descriptor.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * The minimum number of bytes (including the terminating null byte) for - * formatting a bluetooth address as a string. - */ -#define DC_BLUETOOTH_SIZE 18 - -/** - * Bluetooth address (48 bits). - */ -#if defined (_WIN32) && !defined (__GNUC__) -typedef unsigned __int64 dc_bluetooth_address_t; -#else -typedef unsigned long long dc_bluetooth_address_t; -#endif - -/** - * Convert a bluetooth address to a string. - * - * The bluetooth address is formatted as XX:XX:XX:XX:XX:XX, where each - * XX is a hexadecimal number specifying an octet of the 48-bit address. - * The minimum size for the buffer is #DC_BLUETOOTH_SIZE bytes. - * - * @param[in] address A bluetooth address. - * @param[in] str The memory buffer to store the result. - * @param[in] size The size of the memory buffer. - * @returns The null-terminated string on success, or NULL on failure. - */ -char * -dc_bluetooth_addr2str(dc_bluetooth_address_t address, char *str, size_t size); - -/** - * Convert a string to a bluetooth address. - * - * The string is expected to be in the format XX:XX:XX:XX:XX:XX, where - * each XX is a hexadecimal number specifying an octet of the 48-bit - * address. - * - * @param[in] address A null-terminated string. - * @returns The bluetooth address on success, or zero on failure. - */ -dc_bluetooth_address_t -dc_bluetooth_str2addr(const char *address); - -/** - * Opaque object representing a bluetooth device. - */ -typedef struct dc_bluetooth_device_t dc_bluetooth_device_t; - -/** - * Get the address of the bluetooth device. - * - * @param[in] device A valid bluetooth device. - */ -dc_bluetooth_address_t -dc_bluetooth_device_get_address (dc_bluetooth_device_t *device); - -/** - * Get the name of the bluetooth device. - * - * @param[in] device A valid bluetooth device. - */ -const char * -dc_bluetooth_device_get_name (dc_bluetooth_device_t *device); - -/** - * Destroy the bluetooth device and free all resources. - * - * @param[in] device A valid bluetooth device. - */ -void -dc_bluetooth_device_free (dc_bluetooth_device_t *device); - -/** - * Create an iterator to enumerate the bluetooth devices. - * - * @param[out] iterator A location to store the iterator. - * @param[in] context A valid context object. - * @param[in] descriptor A valid device descriptor or NULL. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_bluetooth_iterator_new (dc_iterator_t **iterator, dc_context_t *context, dc_descriptor_t *descriptor); - -/** - * Open an bluetooth connection. - * - * @param[out] iostream A location to store the bluetooth connection. - * @param[in] context A valid context object. - * @param[in] address The bluetooth device address. - * @param[in] port The bluetooth port number. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_bluetooth_open (dc_iostream_t **iostream, dc_context_t *context, dc_bluetooth_address_t address, unsigned int port); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_BLUETOOTH_H */ diff --git a/native/include/libdivecomputer/buffer.h b/native/include/libdivecomputer/buffer.h deleted file mode 100644 index 8cbf27f..0000000 --- a/native/include/libdivecomputer/buffer.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2009 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_BUFFER_H -#define DC_BUFFER_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct dc_buffer_t dc_buffer_t; - -dc_buffer_t * -dc_buffer_new (size_t capacity); - -void -dc_buffer_free (dc_buffer_t *buffer); - -int -dc_buffer_clear (dc_buffer_t *buffer); - -int -dc_buffer_reserve (dc_buffer_t *buffer, size_t capacity); - -int -dc_buffer_resize (dc_buffer_t *buffer, size_t size); - -int -dc_buffer_append (dc_buffer_t *buffer, const unsigned char data[], size_t size); - -int -dc_buffer_prepend (dc_buffer_t *buffer, const unsigned char data[], size_t size); - -int -dc_buffer_insert (dc_buffer_t *buffer, size_t offset, const unsigned char data[], size_t size); - -int -dc_buffer_slice (dc_buffer_t *buffer, size_t offset, size_t size); - -size_t -dc_buffer_get_size (dc_buffer_t *buffer); - -unsigned char * -dc_buffer_get_data (dc_buffer_t *buffer); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_BUFFER_H */ diff --git a/native/include/libdivecomputer/common.h b/native/include/libdivecomputer/common.h deleted file mode 100644 index 6bf3556..0000000 --- a/native/include/libdivecomputer/common.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2011 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_COMMON_H -#define DC_COMMON_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef enum dc_status_t { - DC_STATUS_SUCCESS = 0, - DC_STATUS_DONE = 1, - DC_STATUS_UNSUPPORTED = -1, - DC_STATUS_INVALIDARGS = -2, - DC_STATUS_NOMEMORY = -3, - DC_STATUS_NODEVICE = -4, - DC_STATUS_NOACCESS = -5, - DC_STATUS_IO = -6, - DC_STATUS_TIMEOUT = -7, - DC_STATUS_PROTOCOL = -8, - DC_STATUS_DATAFORMAT = -9, - DC_STATUS_CANCELLED = -10 -} dc_status_t; - -typedef enum dc_transport_t { - DC_TRANSPORT_NONE = 0, - DC_TRANSPORT_SERIAL = (1 << 0), - DC_TRANSPORT_USB = (1 << 1), - DC_TRANSPORT_USBHID = (1 << 2), - DC_TRANSPORT_IRDA = (1 << 3), - DC_TRANSPORT_BLUETOOTH = (1 << 4), - DC_TRANSPORT_BLE = (1 << 5) -} dc_transport_t; - -typedef enum dc_family_t { - DC_FAMILY_NULL = 0, - /* Suunto */ - DC_FAMILY_SUUNTO_SOLUTION = (1 << 16), - DC_FAMILY_SUUNTO_EON, - DC_FAMILY_SUUNTO_VYPER, - DC_FAMILY_SUUNTO_VYPER2, - DC_FAMILY_SUUNTO_D9, - DC_FAMILY_SUUNTO_EONSTEEL, - /* Reefnet */ - DC_FAMILY_REEFNET_SENSUS = (2 << 16), - DC_FAMILY_REEFNET_SENSUSPRO, - DC_FAMILY_REEFNET_SENSUSULTRA, - /* Uwatec */ - DC_FAMILY_UWATEC_ALADIN = (3 << 16), - DC_FAMILY_UWATEC_MEMOMOUSE, - DC_FAMILY_UWATEC_SMART, - DC_FAMILY_UWATEC_MERIDIAN, /* Deprecated: integrated into the Uwatec Smart family. */ - DC_FAMILY_UWATEC_G2, /* Deprecated: integrated into the Uwatec Smart family. */ - /* Oceanic */ - DC_FAMILY_OCEANIC_VTPRO = (4 << 16), - DC_FAMILY_OCEANIC_VEO250, - DC_FAMILY_OCEANIC_ATOM2, - /* Mares */ - DC_FAMILY_MARES_NEMO = (5 << 16), - DC_FAMILY_MARES_PUCK, - DC_FAMILY_MARES_DARWIN, - DC_FAMILY_MARES_ICONHD, - /* Heinrichs Weikamp */ - DC_FAMILY_HW_OSTC = (6 << 16), - DC_FAMILY_HW_FROG, - DC_FAMILY_HW_OSTC3, - /* Cressi */ - DC_FAMILY_CRESSI_EDY = (7 << 16), - DC_FAMILY_CRESSI_LEONARDO, - DC_FAMILY_CRESSI_GOA, - /* Zeagle */ - DC_FAMILY_ZEAGLE_N2ITION3 = (8 << 16), - /* Atomic Aquatics */ - DC_FAMILY_ATOMICS_COBALT = (9 << 16), - /* Shearwater */ - DC_FAMILY_SHEARWATER_PREDATOR = (10 << 16), - DC_FAMILY_SHEARWATER_PETREL, - /* Dive Rite */ - DC_FAMILY_DIVERITE_NITEKQ = (11 << 16), - /* Citizen */ - DC_FAMILY_CITIZEN_AQUALAND = (12 << 16), - /* DiveSystem */ - DC_FAMILY_DIVESYSTEM_IDIVE = (13 << 16), - /* Cochran */ - DC_FAMILY_COCHRAN_COMMANDER = (14 << 16), - /* Tecdiving */ - DC_FAMILY_TECDIVING_DIVECOMPUTEREU = (15 << 16), - /* McLean */ - DC_FAMILY_MCLEAN_EXTREME = (16 << 16), - /* Liquivision */ - DC_FAMILY_LIQUIVISION_LYNX = (17 << 16), - /* Sporasub */ - DC_FAMILY_SPORASUB_SP2 = (18 << 16), - /* Deep Six */ - DC_FAMILY_DEEPSIX_EXCURSION = (19 << 16), - /* Seac Screen */ - DC_FAMILY_SEAC_SCREEN = (20 << 16), - /* Deepblu Cosmiq */ - DC_FAMILY_DEEPBLU_COSMIQ = (21 << 16), - /* Oceans S1 */ - DC_FAMILY_OCEANS_S1 = (22 << 16), - /* Divesoft Freedom */ - DC_FAMILY_DIVESOFT_FREEDOM = (23 << 16), -} dc_family_t; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_COMMON_H */ diff --git a/native/include/libdivecomputer/context.h b/native/include/libdivecomputer/context.h deleted file mode 100644 index 824b67b..0000000 --- a/native/include/libdivecomputer/context.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2012 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_CONTEXT_H -#define DC_CONTEXT_H - -#include "common.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct dc_context_t dc_context_t; - -typedef enum dc_loglevel_t { - DC_LOGLEVEL_NONE, - DC_LOGLEVEL_ERROR, - DC_LOGLEVEL_WARNING, - DC_LOGLEVEL_INFO, - DC_LOGLEVEL_DEBUG, - DC_LOGLEVEL_ALL -} dc_loglevel_t; - -typedef void (*dc_logfunc_t) (dc_context_t *context, dc_loglevel_t loglevel, const char *file, unsigned int line, const char *function, const char *message, void *userdata); - -dc_status_t -dc_context_new (dc_context_t **context); - -dc_status_t -dc_context_free (dc_context_t *context); - -dc_status_t -dc_context_set_loglevel (dc_context_t *context, dc_loglevel_t loglevel); - -dc_status_t -dc_context_set_logfunc (dc_context_t *context, dc_logfunc_t logfunc, void *userdata); - -unsigned int -dc_context_get_transports (dc_context_t *context); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_CONTEXT_H */ diff --git a/native/include/libdivecomputer/custom.h b/native/include/libdivecomputer/custom.h deleted file mode 100644 index dd50e21..0000000 --- a/native/include/libdivecomputer/custom.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2017 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_CUSTOM_H -#define DC_CUSTOM_H - -#include "common.h" -#include "context.h" -#include "iostream.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct dc_custom_cbs_t { - dc_status_t (*set_timeout) (void *userdata, int timeout); - dc_status_t (*set_break) (void *userdata, unsigned int value); - dc_status_t (*set_dtr) (void *userdata, unsigned int value); - dc_status_t (*set_rts) (void *userdata, unsigned int value); - dc_status_t (*get_lines) (void *userdata, unsigned int *value); - dc_status_t (*get_available) (void *userdata, size_t *value); - dc_status_t (*configure) (void *userdata, unsigned int baudrate, unsigned int databits, dc_parity_t parity, dc_stopbits_t stopbits, dc_flowcontrol_t flowcontrol); - dc_status_t (*poll) (void *userdata, int timeout); - dc_status_t (*read) (void *userdata, void *data, size_t size, size_t *actual); - dc_status_t (*write) (void *userdata, const void *data, size_t size, size_t *actual); - dc_status_t (*ioctl) (void *userdata, unsigned int request, void *data, size_t size); - dc_status_t (*flush) (void *userdata); - dc_status_t (*purge) (void *userdata, dc_direction_t direction); - dc_status_t (*sleep) (void *userdata, unsigned int milliseconds); - dc_status_t (*close) (void *userdata); -} dc_custom_cbs_t; - -/** - * Create a custom I/O stream. - * - * @param[out] iostream A location to store the custom I/O stream. - * @param[in] context A valid context object. - * @param[in] callbacks The callback functions to call. - * @param[in] userdata User data to pass to the callback functions. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_custom_open (dc_iostream_t **iostream, dc_context_t *context, dc_transport_t transport, const dc_custom_cbs_t *callbacks, void *userdata); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_CUSTOM_H */ diff --git a/native/include/libdivecomputer/datetime.h b/native/include/libdivecomputer/datetime.h deleted file mode 100644 index e5b876f..0000000 --- a/native/include/libdivecomputer/datetime.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2010 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_DATETIME_H -#define DC_DATETIME_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define DC_TIMEZONE_NONE INT_MIN - -#if defined (_WIN32) && !defined (__GNUC__) -typedef __int64 dc_ticks_t; -#else -typedef long long int dc_ticks_t; -#endif - -typedef struct dc_datetime_t { - int year; - int month; - int day; - int hour; - int minute; - int second; - int timezone; -} dc_datetime_t; - -dc_ticks_t -dc_datetime_now (void); - -dc_datetime_t * -dc_datetime_localtime (dc_datetime_t *result, - dc_ticks_t ticks); - -dc_datetime_t * -dc_datetime_gmtime (dc_datetime_t *result, - dc_ticks_t ticks); - -dc_ticks_t -dc_datetime_mktime (const dc_datetime_t *dt); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_DATETIME_H */ diff --git a/native/include/libdivecomputer/descriptor.h b/native/include/libdivecomputer/descriptor.h deleted file mode 100644 index bdd8c73..0000000 --- a/native/include/libdivecomputer/descriptor.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2012 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_DESCRIPTOR_H -#define DC_DESCRIPTOR_H - -#include "common.h" -#include "iterator.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * Opaque object representing a supported dive computer. - */ -typedef struct dc_descriptor_t dc_descriptor_t; - -/** - * Create an iterator to enumerate the supported dive computers. - * - * @param[out] iterator A location to store the iterator. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_descriptor_iterator (dc_iterator_t **iterator); - -/** - * Free the device descriptor. - * - * @param[in] descriptor A valid device descriptor. - */ -void -dc_descriptor_free (dc_descriptor_t *descriptor); - -/** - * Get the vendor name of the dive computer. - * - * @param[in] descriptor A valid device descriptor. - * @returns The vendor name of the dive computer on success, or NULL on failure. - */ -const char * -dc_descriptor_get_vendor (dc_descriptor_t *descriptor); - -/** - * Get the product name of the dive computer. - * - * @param[in] descriptor A valid device descriptor. - * @returns The product name of the dive computer on success, or NULL on - * failure. - */ -const char * -dc_descriptor_get_product (dc_descriptor_t *descriptor); - -/** - * Get the family type of the dive computer. - * - * @param[in] descriptor A valid device descriptor. - * @returns The family type of the dive computer on success, or DC_FAMILY_NULL - * on failure. - */ -dc_family_t -dc_descriptor_get_type (dc_descriptor_t *descriptor); - -/** - * Get the model number of the dive computer. - * - * @param[in] descriptor A valid device descriptor. - * @returns The model number of the dive computer on success, or zero on - * failure. - */ -unsigned int -dc_descriptor_get_model (dc_descriptor_t *descriptor); - -/** - * Get all transports supported by the dive computer. - * - * @param[in] descriptor A valid device descriptor. - * @returns A bitmask with all the transports supported by the dive computer on - * success, or DC_TRANSPORT_NONE on failure. - */ -unsigned int -dc_descriptor_get_transports (dc_descriptor_t *descriptor); - -/** - * Check if a low-level I/O device matches a supported dive computer. - * - * @param[in] descriptor A valid device descriptor. - * @param[in] transport The transport type of the I/O device. - * @param[in] userdata A pointer to a transport specific data structure: - * - DC_TRANSPORT_SERIAL: Name of the device node (string) - * - DC_TRANSPORT_USB: USB VID/PID (#dc_usb_desc_t) - * - DC_TRANSPORT_USBHID: USB VID/PID (#dc_usbhid_desc_t) - * - DC_TRANSPORT_IRDA: IrDA device name (string) - * - DC_TRANSPORT_BLUETOOTH: Bluetooth device name (string) - * - DC_TRANSPORT_BLE: Bluetooth device name (string) - * @returns Non-zero if the device matches a supported dive computer, or zero if - * there is no match. - */ -int -dc_descriptor_filter (dc_descriptor_t *descriptor, dc_transport_t transport, const void *userdata); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_DESCRIPTOR_H */ diff --git a/native/include/libdivecomputer/device.h b/native/include/libdivecomputer/device.h deleted file mode 100644 index 8810a65..0000000 --- a/native/include/libdivecomputer/device.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_DEVICE_H -#define DC_DEVICE_H - -#include "common.h" -#include "context.h" -#include "descriptor.h" -#include "iostream.h" -#include "buffer.h" -#include "datetime.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef enum dc_event_type_t { - DC_EVENT_WAITING = (1 << 0), - DC_EVENT_PROGRESS = (1 << 1), - DC_EVENT_DEVINFO = (1 << 2), - DC_EVENT_CLOCK = (1 << 3), - DC_EVENT_VENDOR = (1 << 4) -} dc_event_type_t; - -typedef struct dc_device_t dc_device_t; - -typedef struct dc_event_progress_t { - unsigned int current; - unsigned int maximum; -} dc_event_progress_t; - -typedef struct dc_event_devinfo_t { - unsigned int model; - unsigned int firmware; - unsigned int serial; -} dc_event_devinfo_t; - -typedef struct dc_event_clock_t { - unsigned int devtime; - dc_ticks_t systime; -} dc_event_clock_t; - -typedef struct dc_event_vendor_t { - const unsigned char *data; - unsigned int size; -} dc_event_vendor_t; - -typedef int (*dc_cancel_callback_t) (void *userdata); - -typedef void (*dc_event_callback_t) (dc_device_t *device, dc_event_type_t event, const void *data, void *userdata); - -typedef int (*dc_dive_callback_t) (const unsigned char *data, unsigned int size, const unsigned char *fingerprint, unsigned int fsize, void *userdata); - -dc_status_t -dc_device_open (dc_device_t **out, dc_context_t *context, dc_descriptor_t *descriptor, dc_iostream_t *iostream); - -dc_family_t -dc_device_get_type (dc_device_t *device); - -dc_status_t -dc_device_set_cancel (dc_device_t *device, dc_cancel_callback_t callback, void *userdata); - -dc_status_t -dc_device_set_events (dc_device_t *device, unsigned int events, dc_event_callback_t callback, void *userdata); - -dc_status_t -dc_device_set_fingerprint (dc_device_t *device, const unsigned char data[], unsigned int size); - -dc_status_t -dc_device_read (dc_device_t *device, unsigned int address, unsigned char data[], unsigned int size); - -dc_status_t -dc_device_write (dc_device_t *device, unsigned int address, const unsigned char data[], unsigned int size); - -dc_status_t -dc_device_dump (dc_device_t *device, dc_buffer_t *buffer); - -dc_status_t -dc_device_foreach (dc_device_t *device, dc_dive_callback_t callback, void *userdata); - -dc_status_t -dc_device_timesync (dc_device_t *device, const dc_datetime_t *datetime); - -dc_status_t -dc_device_close (dc_device_t *device); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_DEVICE_H */ diff --git a/native/include/libdivecomputer/divesystem_idive.h b/native/include/libdivecomputer/divesystem_idive.h deleted file mode 100644 index 07065d1..0000000 --- a/native/include/libdivecomputer/divesystem_idive.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2019 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_DIVESYSTEM_IDIVE_H -#define DC_DIVESYSTEM_IDIVE_H - -#include "common.h" -#include "device.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -dc_status_t -divesystem_idive_device_fwupdate (dc_device_t *abstract, const char *filename); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_DIVESYSTEM_IDIVE_H */ diff --git a/native/include/libdivecomputer/hw_frog.h b/native/include/libdivecomputer/hw_frog.h deleted file mode 100644 index 0af10ca..0000000 --- a/native/include/libdivecomputer/hw_frog.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2012 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_HW_FROG_H -#define DC_HW_FROG_H - -#include "common.h" -#include "device.h" -#include "datetime.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define HW_FROG_DISPLAY_SIZE 15 -#define HW_FROG_CUSTOMTEXT_SIZE 13 - -dc_status_t -hw_frog_device_version (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -hw_frog_device_display (dc_device_t *device, const char *text); - -dc_status_t -hw_frog_device_customtext (dc_device_t *device, const char *text); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_HW_FROG_H */ diff --git a/native/include/libdivecomputer/hw_ostc.h b/native/include/libdivecomputer/hw_ostc.h deleted file mode 100644 index b7daca7..0000000 --- a/native/include/libdivecomputer/hw_ostc.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2009 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_HW_OSTC_H -#define DC_HW_OSTC_H - -#include "common.h" -#include "device.h" -#include "datetime.h" -#include "buffer.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define HW_OSTC_MD2HASH_SIZE 18 -#define HW_OSTC_EEPROM_SIZE 256 - -typedef enum hw_ostc_format_t { - HW_OSTC_FORMAT_RAW, - HW_OSTC_FORMAT_RGB16, - HW_OSTC_FORMAT_RGB24 -} hw_ostc_format_t; - -dc_status_t -hw_ostc_device_md2hash (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -hw_ostc_device_eeprom_read (dc_device_t *device, unsigned int bank, unsigned char data[], unsigned int size); - -dc_status_t -hw_ostc_device_eeprom_write (dc_device_t *device, unsigned int bank, const unsigned char data[], unsigned int size); - -dc_status_t -hw_ostc_device_reset (dc_device_t *device); - -dc_status_t -hw_ostc_device_screenshot (dc_device_t *device, dc_buffer_t *buffer, hw_ostc_format_t format); - -dc_status_t -hw_ostc_device_fwupdate (dc_device_t *abstract, const char *filename); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_HW_OSTC_H */ diff --git a/native/include/libdivecomputer/hw_ostc3.h b/native/include/libdivecomputer/hw_ostc3.h deleted file mode 100644 index c69dd93..0000000 --- a/native/include/libdivecomputer/hw_ostc3.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2013 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_HW_OSTC3_H -#define DC_HW_OSTC3_H - -#include "common.h" -#include "device.h" -#include "datetime.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define HW_OSTC3_DISPLAY_SIZE 16 -#define HW_OSTC3_CUSTOMTEXT_SIZE 60 - -dc_status_t -hw_ostc3_device_version (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -hw_ostc3_device_hardware (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -hw_ostc3_device_display (dc_device_t *device, const char *text); - -dc_status_t -hw_ostc3_device_customtext (dc_device_t *device, const char *text); - -dc_status_t -hw_ostc3_device_config_read (dc_device_t *abstract, unsigned int config, unsigned char data[], unsigned int size); - -dc_status_t -hw_ostc3_device_config_write (dc_device_t *abstract, unsigned int config, const unsigned char data[], unsigned int size); - -dc_status_t -hw_ostc3_device_config_reset (dc_device_t *abstract); - -dc_status_t -hw_ostc3_device_fwupdate (dc_device_t *abstract, const char *filename); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_HW_OSTC3_H */ diff --git a/native/include/libdivecomputer/ioctl.h b/native/include/libdivecomputer/ioctl.h deleted file mode 100644 index dd7bc90..0000000 --- a/native/include/libdivecomputer/ioctl.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2019 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_IOCTL_H -#define DC_IOCTL_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * Ioctl direction bits. - * - * Note: WRITE means the application is writing and the driver is - * reading. READ means the application is reading and the driver is - * writing. - */ -#define DC_IOCTL_DIR_NONE 0u -#define DC_IOCTL_DIR_READ 1u -#define DC_IOCTL_DIR_WRITE 2u - -/* - * Ioctl variable size bits. - */ -#define DC_IOCTL_SIZE_VARIABLE 0 - -/* - * Helper macro to encode ioctl numbers. - */ -#define DC_IOCTL_BASE(dir,type,nr,size) \ - (((dir) << 30) | \ - ((size) << 16) | \ - ((type) << 8) | \ - ((nr) << 0)) - -/* - * Macros to encode ioctl numbers. - */ -#define DC_IOCTL_IO(type,nr) DC_IOCTL_BASE(DC_IOCTL_DIR_NONE, (type), (nr), 0) -#define DC_IOCTL_IOR(type,nr,size) DC_IOCTL_BASE(DC_IOCTL_DIR_READ, (type), (nr), (size)) -#define DC_IOCTL_IOW(type,nr,size) DC_IOCTL_BASE(DC_IOCTL_DIR_WRITE, (type), (nr), (size)) -#define DC_IOCTL_IORW(type,nr,size) DC_IOCTL_BASE(DC_IOCTL_DIR_READ | DC_IOCTL_DIR_WRITE, (type), (nr), (size)) - -/* - * Macros to decode ioctl numbers. - */ -#define DC_IOCTL_DIR(request) (((request) >> 30) & 0x0003) -#define DC_IOCTL_SIZE(request) (((request) >> 16) & 0x3FFF) -#define DC_IOCTL_TYPE(request) (((request) >> 8) & 0x00FF) -#define DC_IOCTL_NR(request) (((request) >> 0) & 0x00FF) - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_IOCTL_H */ diff --git a/native/include/libdivecomputer/iostream.h b/native/include/libdivecomputer/iostream.h deleted file mode 100644 index b09cba1..0000000 --- a/native/include/libdivecomputer/iostream.h +++ /dev/null @@ -1,316 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2016 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_IOSTREAM_H -#define DC_IOSTREAM_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * Opaque object representing a I/O stream. - */ -typedef struct dc_iostream_t dc_iostream_t; - -/** - * The parity checking scheme. - */ -typedef enum dc_parity_t { - DC_PARITY_NONE, /**< No parity */ - DC_PARITY_ODD, /**< Odd parity */ - DC_PARITY_EVEN, /**< Even parity */ - DC_PARITY_MARK, /**< Mark parity (always 1) */ - DC_PARITY_SPACE /**< Space parity (alwasy 0) */ -} dc_parity_t; - -/** - * The number of stop bits. - */ -typedef enum dc_stopbits_t { - DC_STOPBITS_ONE, /**< 1 stop bit */ - DC_STOPBITS_ONEPOINTFIVE, /**< 1.5 stop bits*/ - DC_STOPBITS_TWO /**< 2 stop bits */ -} dc_stopbits_t; - -/** - * The flow control. - */ -typedef enum dc_flowcontrol_t { - DC_FLOWCONTROL_NONE, /**< No flow control */ - DC_FLOWCONTROL_HARDWARE, /**< Hardware (RTS/CTS) flow control */ - DC_FLOWCONTROL_SOFTWARE /**< Software (XON/XOFF) flow control */ -} dc_flowcontrol_t; - -/** - * The direction of the data transmission. - */ -typedef enum dc_direction_t { - DC_DIRECTION_INPUT = 0x01, /**< Input direction */ - DC_DIRECTION_OUTPUT = 0x02, /**< Output direction */ - DC_DIRECTION_ALL = DC_DIRECTION_INPUT | DC_DIRECTION_OUTPUT /**< All directions */ -} dc_direction_t; - -/** - * The line signals. - */ -typedef enum dc_line_t { - DC_LINE_DCD = 0x01, /**< Data carrier detect */ - DC_LINE_CTS = 0x02, /**< Clear to send */ - DC_LINE_DSR = 0x04, /**< Data set ready */ - DC_LINE_RNG = 0x08, /**< Ring indicator */ -} dc_line_t; - -/** - * Get the transport type. - * - * @param[in] iostream A valid I/O stream. - * @returns The transport type of the I/O stream. - */ -dc_transport_t -dc_iostream_get_transport (dc_iostream_t *iostream); - -/** - * Set the read timeout. - * - * There are three distinct modes available: - * - * 1. Blocking (timeout < 0): - * - * The read operation is blocked until all the requested bytes have - * been received. If the requested number of bytes does not arrive, - * the operation will block forever. - * - * 2. Non-blocking (timeout == 0): - * - * The read operation returns immediately with the bytes that have - * already been received, even if no bytes have been received. - * - * 3. Timeout (timeout > 0): - * - * The read operation is blocked until all the requested bytes have - * been received. If the requested number of bytes does not arrive - * within the specified amount of time, the operation will return - * with the bytes that have already been received. - * - * @param[in] iostream A valid I/O stream. - * @param[in] timeout The timeout in milliseconds. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_set_timeout (dc_iostream_t *iostream, int timeout); - -/** - * Set the state of the break condition. - * - * @param[in] iostream A valid I/O stream. - * @param[in] value The break condition state. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_set_break (dc_iostream_t *iostream, unsigned int value); - -/** - * Set the state of the DTR line. - * - * @param[in] iostream A valid I/O stream. - * @param[in] value The DTR line state. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_set_dtr (dc_iostream_t *iostream, unsigned int value); - -/** - * Set the state of the RTS line. - * - * @param[in] iostream A valid I/O stream. - * @param[in] value The RTS line state. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_set_rts (dc_iostream_t *iostream, unsigned int value); - -/** - * Query the state of the line signals. - * - * @param[in] iostream A valid I/O stream. - * @param[out] value A location to store the bitmap with the state - * of the line signals. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_get_lines (dc_iostream_t *iostream, unsigned int *value); - -/** - * Query the number of available bytes in the input buffer. - * - * @param[in] iostream A valid I/O stream. - * @param[out] value A location to store the number of bytes in the - * input buffer. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_get_available (dc_iostream_t *iostream, size_t *value); - -/** - * Configure the line settings. - * - * @param[in] iostream A valid I/O stream. - * @param[in] baudrate The baud rate setting. - * @param[in] databits The number of data bits. - * @param[in] parity The parity setting. - * @param[in] stopbits The number of stop bits. - * @param[in] flowcontrol The flow control setting. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_configure (dc_iostream_t *iostream, unsigned int baudrate, unsigned int databits, dc_parity_t parity, dc_stopbits_t stopbits, dc_flowcontrol_t flowcontrol); - -/** - * Poll the I/O stream for available data. - * - * There are three distinct modes available: - * - * 1. Blocking (timeout < 0): - * - * The poll operation is blocked until one or more bytes have been - * received. If no bytes are received, the operation will block - * forever. - * - * 2. Non-blocking (timeout == 0): - * - * The poll operation returns immediately, even if no bytes have - * been received. - * - * 3. Timeout (timeout > 0): - * - * The poll operation is blocked until one or more bytes have been - * received. If no bytes are received within the specified amount of - * time, the operation will return with a timeout. - * - * @param[in] iostream A valid I/O stream. - * @param[in] timeout The timeout in milliseconds. - * @returns #DC_STATUS_SUCCESS on success, #DC_STATUS_TIMEOUT on - * timeout, or another #dc_status_t code on failure. - */ -dc_status_t -dc_iostream_poll (dc_iostream_t *iostream, int timeout); - -/** - * Read data from the I/O stream. - * - * @param[in] iostream A valid I/O stream. - * @param[out] data The memory buffer to read the data into. - * @param[in] size The number of bytes to read. - * @param[out] actual An (optional) location to store the actual - * number of bytes transferred. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_read (dc_iostream_t *iostream, void *data, size_t size, size_t *actual); - -/** - * Write data to the I/O stream. - * - * @param[in] iostream A valid I/O stream. - * @param[in] data The memory buffer to write the data from. - * @param[in] size The number of bytes to write. - * @param[out] actual An (optional) location to store the actual - * number of bytes transferred. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_write (dc_iostream_t *iostream, const void *data, size_t size, size_t *actual); - -/** - * Perform an I/O stream specific request. - * - * @param[in] iostream A valid I/O stream. - * @param[in] request The request to perform. - * @param[in,out] data The request specific data. - * @param[in] size The size of the request specific data. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_ioctl (dc_iostream_t *iostream, unsigned int request, void *data, size_t size); - -/** - * Flush the internal output buffer and wait until the data has been - * transmitted. - * - * @param[in] iostream A valid I/O stream. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_flush (dc_iostream_t *iostream); - -/** - * Discards all data from the internal buffers. - * - * @param[in] iostream A valid I/O stream. - * @param[in] direction The direction of the buffer(s). - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_purge (dc_iostream_t *iostream, dc_direction_t direction); - -/** - * Suspend execution of the current thread for the specified amount of - * time. - * - * @param[in] iostream A valid I/O stream. - * @param[in] milliseconds The number of milliseconds to sleep. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_sleep (dc_iostream_t *iostream, unsigned int milliseconds); - -/** - * Close the I/O stream and free all resources. - * - * @param[in] iostream A valid I/O stream. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_iostream_close (dc_iostream_t *iostream); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_IOSTREAM_H */ diff --git a/native/include/libdivecomputer/irda.h b/native/include/libdivecomputer/irda.h deleted file mode 100644 index f592ca9..0000000 --- a/native/include/libdivecomputer/irda.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_IRDA_H -#define DC_IRDA_H - -#include "common.h" -#include "context.h" -#include "iostream.h" -#include "iterator.h" -#include "descriptor.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * Opaque object representing an IrDA device. - */ -typedef struct dc_irda_device_t dc_irda_device_t; - -/** - * Get the address of the IrDA device. - * - * @param[in] device A valid IrDA device. - */ -unsigned int -dc_irda_device_get_address (dc_irda_device_t *device); - -/** - * Get the name of the IrDA device. - * - * @param[in] device A valid IrDA device. - */ -const char * -dc_irda_device_get_name (dc_irda_device_t *device); - -/** - * Destroy the IrDA device and free all resources. - * - * @param[in] device A valid IrDA device. - */ -void -dc_irda_device_free (dc_irda_device_t *device); - -/** - * Create an iterator to enumerate the IrDA devices. - * - * @param[out] iterator A location to store the iterator. - * @param[in] context A valid context object. - * @param[in] descriptor A valid device descriptor or NULL. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_irda_iterator_new (dc_iterator_t **iterator, dc_context_t *context, dc_descriptor_t *descriptor); - -/** - * Open an IrDA connection. - * - * @param[out] iostream A location to store the IrDA connection. - * @param[in] context A valid context object. - * @param[in] address The IrDA device address. - * @param[in] lsap The IrDA LSAP number. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_irda_open (dc_iostream_t **iostream, dc_context_t *context, unsigned int address, unsigned int lsap); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_IRDA_H */ diff --git a/native/include/libdivecomputer/iterator.h b/native/include/libdivecomputer/iterator.h deleted file mode 100644 index aabe1bf..0000000 --- a/native/include/libdivecomputer/iterator.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2012 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_ITERATOR_H -#define DC_ITERATOR_H - -#include "common.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct dc_iterator_t dc_iterator_t; - -dc_status_t -dc_iterator_next (dc_iterator_t *iterator, void *item); - -dc_status_t -dc_iterator_free (dc_iterator_t *iterator); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_ITERATOR_H */ diff --git a/native/include/libdivecomputer/oceanic_atom2.h b/native/include/libdivecomputer/oceanic_atom2.h deleted file mode 100644 index 68481d2..0000000 --- a/native/include/libdivecomputer/oceanic_atom2.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_OCEANIC_ATOM2_H -#define DC_OCEANIC_ATOM2_H - -#include "common.h" -#include "device.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -dc_status_t -oceanic_atom2_device_version (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -oceanic_atom2_device_keepalive (dc_device_t *device); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_OCEANIC_ATOM2_H */ diff --git a/native/include/libdivecomputer/oceanic_veo250.h b/native/include/libdivecomputer/oceanic_veo250.h deleted file mode 100644 index e7ade87..0000000 --- a/native/include/libdivecomputer/oceanic_veo250.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_OCEANIC_VEO250_H -#define DC_OCEANIC_VEO250_H - -#include "common.h" -#include "device.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -dc_status_t -oceanic_veo250_device_version (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -oceanic_veo250_device_keepalive (dc_device_t *device); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_OCEANIC_VEO250_H */ diff --git a/native/include/libdivecomputer/oceanic_vtpro.h b/native/include/libdivecomputer/oceanic_vtpro.h deleted file mode 100644 index 6357763..0000000 --- a/native/include/libdivecomputer/oceanic_vtpro.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_OCEANIC_VTPRO_H -#define DC_OCEANIC_VTPRO_H - -#include "common.h" -#include "device.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -dc_status_t -oceanic_vtpro_device_version (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -oceanic_vtpro_device_keepalive (dc_device_t *device); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_OCEANIC_VTPRO_H */ diff --git a/native/include/libdivecomputer/parser.h b/native/include/libdivecomputer/parser.h deleted file mode 100644 index ee69e42..0000000 --- a/native/include/libdivecomputer/parser.h +++ /dev/null @@ -1,311 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_PARSER_H -#define DC_PARSER_H - -#include "common.h" -#include "context.h" -#include "descriptor.h" -#include "device.h" -#include "datetime.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef enum dc_sample_type_t { - DC_SAMPLE_TIME, - DC_SAMPLE_DEPTH, - DC_SAMPLE_PRESSURE, - DC_SAMPLE_TEMPERATURE, - DC_SAMPLE_EVENT, - DC_SAMPLE_RBT, - DC_SAMPLE_HEARTBEAT, - DC_SAMPLE_BEARING, - DC_SAMPLE_VENDOR, - DC_SAMPLE_SETPOINT, - DC_SAMPLE_PPO2, - DC_SAMPLE_CNS, - DC_SAMPLE_DECO, - DC_SAMPLE_GASMIX -} dc_sample_type_t; - -typedef enum dc_field_type_t { - DC_FIELD_DIVETIME, - DC_FIELD_MAXDEPTH, - DC_FIELD_AVGDEPTH, - DC_FIELD_GASMIX_COUNT, - DC_FIELD_GASMIX, - DC_FIELD_SALINITY, - DC_FIELD_ATMOSPHERIC, - DC_FIELD_TEMPERATURE_SURFACE, - DC_FIELD_TEMPERATURE_MINIMUM, - DC_FIELD_TEMPERATURE_MAXIMUM, - DC_FIELD_TANK_COUNT, - DC_FIELD_TANK, - DC_FIELD_DIVEMODE, - DC_FIELD_DECOMODEL, -} dc_field_type_t; - -typedef enum parser_sample_event_t { - SAMPLE_EVENT_NONE, - SAMPLE_EVENT_DECOSTOP, - SAMPLE_EVENT_RBT, - SAMPLE_EVENT_ASCENT, - SAMPLE_EVENT_CEILING, - SAMPLE_EVENT_WORKLOAD, - SAMPLE_EVENT_TRANSMITTER, - SAMPLE_EVENT_VIOLATION, - SAMPLE_EVENT_BOOKMARK, - SAMPLE_EVENT_SURFACE, - SAMPLE_EVENT_SAFETYSTOP, - SAMPLE_EVENT_GASCHANGE, /* Deprecated: replaced by DC_SAMPLE_GASMIX. */ - SAMPLE_EVENT_SAFETYSTOP_VOLUNTARY, - SAMPLE_EVENT_SAFETYSTOP_MANDATORY, - SAMPLE_EVENT_DEEPSTOP, - SAMPLE_EVENT_CEILING_SAFETYSTOP, - SAMPLE_EVENT_FLOOR, - SAMPLE_EVENT_DIVETIME, - SAMPLE_EVENT_MAXDEPTH, - SAMPLE_EVENT_OLF, - SAMPLE_EVENT_PO2, - SAMPLE_EVENT_AIRTIME, - SAMPLE_EVENT_RGBM, - SAMPLE_EVENT_HEADING, - SAMPLE_EVENT_TISSUELEVEL, - SAMPLE_EVENT_GASCHANGE2, /* Deprecated: replaced by DC_SAMPLE_GASMIX. */ -} parser_sample_event_t; - -/* For backwards compatibility */ -#define SAMPLE_EVENT_UNKNOWN SAMPLE_EVENT_FLOOR - -typedef enum parser_sample_flags_t { - SAMPLE_FLAGS_NONE = 0, - SAMPLE_FLAGS_BEGIN = (1 << 0), - SAMPLE_FLAGS_END = (1 << 1) -} parser_sample_flags_t; - -typedef enum parser_sample_vendor_t { - SAMPLE_VENDOR_NONE, - SAMPLE_VENDOR_UWATEC_ALADIN, - SAMPLE_VENDOR_UWATEC_SMART, - SAMPLE_VENDOR_OCEANIC_VTPRO, - SAMPLE_VENDOR_OCEANIC_VEO250, - SAMPLE_VENDOR_OCEANIC_ATOM2 -} parser_sample_vendor_t; - -typedef enum dc_water_t { - DC_WATER_FRESH, - DC_WATER_SALT -} dc_water_t; - -typedef enum dc_divemode_t { - DC_DIVEMODE_FREEDIVE, - DC_DIVEMODE_GAUGE, - DC_DIVEMODE_OC, /* Open circuit */ - DC_DIVEMODE_CCR, /* Closed circuit rebreather */ - DC_DIVEMODE_SCR /* Semi-closed circuit rebreather */ -} dc_divemode_t; - -/* For backwards compatibility */ -#define DC_DIVEMODE_CC DC_DIVEMODE_CCR - -typedef enum dc_deco_type_t { - DC_DECO_NDL, - DC_DECO_SAFETYSTOP, - DC_DECO_DECOSTOP, - DC_DECO_DEEPSTOP -} dc_deco_type_t; - -typedef struct dc_salinity_t { - dc_water_t type; - double density; -} dc_salinity_t; - -typedef enum dc_usage_t { - DC_USAGE_NONE, - DC_USAGE_OXYGEN, - DC_USAGE_DILUENT, - DC_USAGE_SIDEMOUNT, -} dc_usage_t; - -typedef struct dc_gasmix_t { - double helium; - double oxygen; - double nitrogen; - dc_usage_t usage; -} dc_gasmix_t; - -#define DC_SENSOR_NONE 0xFFFFFFFF -#define DC_GASMIX_UNKNOWN 0xFFFFFFFF - -typedef enum dc_tankvolume_t { - DC_TANKVOLUME_NONE, - DC_TANKVOLUME_METRIC, - DC_TANKVOLUME_IMPERIAL, -} dc_tankvolume_t; - -/* - * Tank volume - * - * There are two different ways to specify the volume of a tank. In the - * metric system, the tank volume is specified as the water capacity, - * while in the imperial system the tank volume is specified as the air - * capacity at the surface (1 ATM) when the tank is filled at its - * working pressure. Libdivecomputer will always convert the tank volume - * to the metric representation, and indicate the original tank type: - * - * DC_TANKVOLUME_NONE: Tank volume is not available. Both the volume and - * workpressure will be zero. - * - * DC_TANKVOLUME_METRIC: A metric tank. The workpressure is optional and - * may be zero. - * - * DC_TANKVOLUME_IMPERIAL: An imperial tank. Both the volume and - * workpressure are mandatory and always non-zero. The volume has been - * converted from air capacity to water capacity. To calculate the - * original air capacity again, multiply with the workpressure and - * divide by 1 ATM (Vair = Vwater * Pwork / Patm). - */ - -typedef struct dc_tank_t { - unsigned int gasmix; /* Gas mix index, or DC_GASMIX_UNKNOWN */ - dc_tankvolume_t type; /* Tank type */ - double volume; /* Volume (liter) */ - double workpressure; /* Work pressure (bar) */ - double beginpressure; /* Begin pressure (bar) */ - double endpressure; /* End pressure (bar) */ - dc_usage_t usage; -} dc_tank_t; - -typedef enum dc_decomodel_type_t { - DC_DECOMODEL_NONE, - DC_DECOMODEL_BUHLMANN, - DC_DECOMODEL_VPM, - DC_DECOMODEL_RGBM, - DC_DECOMODEL_DCIEM, -} dc_decomodel_type_t; - -/* - * Decompression model - * - * The type field contains the decompression algorithm. - * - * The (optional) conservatism field contains the personal adjustment - * setting of the algorithm. The exact interpretation depends on the - * dive computer, but the default value (zero) will typically correspond - * to the neutral setting, while a positive value is more conservative - * and a negative value more aggressive. - * - * The (optional) params field contains the parameters of the algorithm: - * - * DC_DECOMODEL_BUHLMANN: The Gradient Factor (GF) parameters low and - * high. For a pure Buhlmann algorithm (e.g. without GF enabled), both - * values are 100. If GF are enabled, but the actual parameter values - * are not available from the dive computer, both values are zero. - */ -typedef struct dc_decomodel_t { - dc_decomodel_type_t type; - int conservatism; - union { - struct { - unsigned int high; - unsigned int low; - } gf; - } params; -} dc_decomodel_t; - -typedef union dc_sample_value_t { - unsigned int time; /* Milliseconds */ - double depth; - struct { - unsigned int tank; - double value; - } pressure; - double temperature; - struct { - unsigned int type; - unsigned int time; - unsigned int flags; - unsigned int value; - } event; - unsigned int rbt; - unsigned int heartbeat; - unsigned int bearing; - struct { - unsigned int type; - unsigned int size; - const void *data; - } vendor; - double setpoint; - struct { - unsigned int sensor; - double value; - } ppo2; - double cns; - struct { - unsigned int type; - unsigned int time; - double depth; - unsigned int tts; - } deco; - unsigned int gasmix; /* Gas mix index */ -} dc_sample_value_t; - -typedef struct dc_parser_t dc_parser_t; - -typedef void (*dc_sample_callback_t) (dc_sample_type_t type, const dc_sample_value_t *value, void *userdata); - -dc_status_t -dc_parser_new (dc_parser_t **parser, dc_device_t *device, const unsigned char data[], size_t size); - -dc_status_t -dc_parser_new2 (dc_parser_t **parser, dc_context_t *context, dc_descriptor_t *descriptor, const unsigned char data[], size_t size); - -dc_family_t -dc_parser_get_type (dc_parser_t *parser); - -dc_status_t -dc_parser_set_clock (dc_parser_t *parser, unsigned int devtime, dc_ticks_t systime); - -dc_status_t -dc_parser_set_atmospheric (dc_parser_t *parser, double atmospheric); - -dc_status_t -dc_parser_set_density (dc_parser_t *parser, double density); - -dc_status_t -dc_parser_get_datetime (dc_parser_t *parser, dc_datetime_t *datetime); - -dc_status_t -dc_parser_get_field (dc_parser_t *parser, dc_field_type_t type, unsigned int flags, void *value); - -dc_status_t -dc_parser_samples_foreach (dc_parser_t *parser, dc_sample_callback_t callback, void *userdata); - -dc_status_t -dc_parser_destroy (dc_parser_t *parser); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_PARSER_H */ diff --git a/native/include/libdivecomputer/reefnet_sensus.h b/native/include/libdivecomputer/reefnet_sensus.h deleted file mode 100644 index b0fe271..0000000 --- a/native/include/libdivecomputer/reefnet_sensus.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_REEFNET_SENSUS_H -#define DC_REEFNET_SENSUS_H - -#include "common.h" -#include "device.h" -#include "parser.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define REEFNET_SENSUS_HANDSHAKE_SIZE 10 - -dc_status_t -reefnet_sensus_device_get_handshake (dc_device_t *device, unsigned char data[], unsigned int size); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_REEFNET_SENSUS_H */ diff --git a/native/include/libdivecomputer/reefnet_sensuspro.h b/native/include/libdivecomputer/reefnet_sensuspro.h deleted file mode 100644 index b879a50..0000000 --- a/native/include/libdivecomputer/reefnet_sensuspro.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_REEFNET_SENSUSPRO_H -#define DC_REEFNET_SENSUSPRO_H - -#include "common.h" -#include "device.h" -#include "parser.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define REEFNET_SENSUSPRO_HANDSHAKE_SIZE 10 - -dc_status_t -reefnet_sensuspro_device_get_handshake (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -reefnet_sensuspro_device_write_interval (dc_device_t *device, unsigned char interval); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_REEFNET_SENSUSPRO_H */ diff --git a/native/include/libdivecomputer/reefnet_sensusultra.h b/native/include/libdivecomputer/reefnet_sensusultra.h deleted file mode 100644 index fc1b4f7..0000000 --- a/native/include/libdivecomputer/reefnet_sensusultra.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_REEFNET_SENSUSULTRA_H -#define DC_REEFNET_SENSUSULTRA_H - -#include "common.h" -#include "device.h" -#include "parser.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define REEFNET_SENSUSULTRA_USER_SIZE 16384 -#define REEFNET_SENSUSULTRA_HANDSHAKE_SIZE 24 -#define REEFNET_SENSUSULTRA_SENSE_SIZE 6 - -typedef enum reefnet_sensusultra_parameter_t { - REEFNET_SENSUSULTRA_PARAMETER_INTERVAL, - REEFNET_SENSUSULTRA_PARAMETER_THRESHOLD, - REEFNET_SENSUSULTRA_PARAMETER_ENDCOUNT, - REEFNET_SENSUSULTRA_PARAMETER_AVERAGING -} reefnet_sensusultra_parameter_t; - -dc_status_t -reefnet_sensusultra_device_get_handshake (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -reefnet_sensusultra_device_read_user (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -reefnet_sensusultra_device_write_user (dc_device_t *device, const unsigned char data[], unsigned int size); - -dc_status_t -reefnet_sensusultra_device_write_parameter (dc_device_t *device, reefnet_sensusultra_parameter_t parameter, unsigned int value); - -dc_status_t -reefnet_sensusultra_device_sense (dc_device_t *device, unsigned char data[], unsigned int size); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_REEFNET_SENSUSULTRA_H */ diff --git a/native/include/libdivecomputer/serial.h b/native/include/libdivecomputer/serial.h deleted file mode 100644 index 917ba7c..0000000 --- a/native/include/libdivecomputer/serial.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_SERIAL_H -#define DC_SERIAL_H - -#include "common.h" -#include "context.h" -#include "iostream.h" -#include "iterator.h" -#include "descriptor.h" -#include "ioctl.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * Opaque object representing a serial device. - */ -typedef struct dc_serial_device_t dc_serial_device_t; - -/** - * Get the device node of the serial device. - * - * @param[in] device A valid serial device. - */ -const char * -dc_serial_device_get_name (dc_serial_device_t *device); - -/** - * Destroy the serial device and free all resources. - * - * @param[in] device A valid serial device. - */ -void -dc_serial_device_free (dc_serial_device_t *device); - -/** - * Create an iterator to enumerate the serial devices. - * - * @param[out] iterator A location to store the iterator. - * @param[in] context A valid context object. - * @param[in] descriptor A valid device descriptor or NULL. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_serial_iterator_new (dc_iterator_t **iterator, dc_context_t *context, dc_descriptor_t *descriptor); - -/** - * Open a serial connection. - * - * @param[out] iostream A location to store the serial connection. - * @param[in] context A valid context object. - * @param[in] name The name of the device node. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_serial_open (dc_iostream_t **iostream, dc_context_t *context, const char *name); - -/** - * Set the receive latency in milliseconds. - * - * The effect of this setting is highly platform and driver specific. On - * Windows it does nothing at all, on Linux it controls the low latency - * flag (e.g. only zero vs non-zero latency), and on Mac OS X it sets - * the receive latency as requested. - */ -#define DC_IOCTL_SERIAL_SET_LATENCY DC_IOCTL_IOW('s', 0, sizeof(unsigned int)) - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_SERIAL_H */ diff --git a/native/include/libdivecomputer/suunto_d9.h b/native/include/libdivecomputer/suunto_d9.h deleted file mode 100644 index dbea025..0000000 --- a/native/include/libdivecomputer/suunto_d9.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_SUUNTO_D9_H -#define DC_SUUNTO_D9_H - -#include "common.h" -#include "device.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define SUUNTO_D9_VERSION_SIZE 0x04 - -dc_status_t -suunto_d9_device_version (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -suunto_d9_device_reset_maxdepth (dc_device_t *device); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_SUUNTO_D9_H */ diff --git a/native/include/libdivecomputer/suunto_eon.h b/native/include/libdivecomputer/suunto_eon.h deleted file mode 100644 index aeacdb3..0000000 --- a/native/include/libdivecomputer/suunto_eon.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_SUUNTO_EON_H -#define DC_SUUNTO_EON_H - -#include "common.h" -#include "device.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define SUUNTO_EON_NAME_SIZE 20 - -dc_status_t -suunto_eon_device_write_name (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -suunto_eon_device_write_interval (dc_device_t *device, unsigned char interval); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_SUUNTO_EON_H */ diff --git a/native/include/libdivecomputer/suunto_vyper2.h b/native/include/libdivecomputer/suunto_vyper2.h deleted file mode 100644 index 7c67320..0000000 --- a/native/include/libdivecomputer/suunto_vyper2.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_SUUNTO_VYPER2_H -#define DC_SUUNTO_VYPER2_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include "common.h" -#include "device.h" - -#define SUUNTO_VYPER2_VERSION_SIZE 0x04 - -dc_status_t -suunto_vyper2_device_version (dc_device_t *device, unsigned char data[], unsigned int size); - -dc_status_t -suunto_vyper2_device_reset_maxdepth (dc_device_t *device); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_SUUNTO_VYPER2_H */ diff --git a/native/include/libdivecomputer/units.h b/native/include/libdivecomputer/units.h deleted file mode 100644 index 17f4b8c..0000000 --- a/native/include/libdivecomputer/units.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2008 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef UNITS_H -#define UNITS_H - - -#define POUND 0.45359237 -#define FEET 0.3048 -#define INCH 0.0254 -#define GRAVITY 9.80665 -#define ATM 101325.0 -#define BAR 100000.0 -#define FSW (ATM / 33.0) -#define MSW (BAR / 10.0) -#define PSI ((POUND * GRAVITY) / (INCH * INCH)) -#define CUFT (FEET * FEET * FEET) - - -#endif /* UNITS_H */ diff --git a/native/include/libdivecomputer/usb.h b/native/include/libdivecomputer/usb.h deleted file mode 100644 index 82e5881..0000000 --- a/native/include/libdivecomputer/usb.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2020 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_USB_H -#define DC_USB_H - -#include "common.h" -#include "context.h" -#include "iostream.h" -#include "iterator.h" -#include "descriptor.h" -#include "ioctl.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * Perform a USB control transfer. - * - * The parameters for the control transfer are specified in the - * #dc_usb_control_t data structure. If the control transfer requires - * additional data as in- or output, the buffer must be located - * immediately after the #dc_usb_control_t data structure, and the - * length of the buffer must be indicated in the #wLength field. The - * size of the ioctl request is the total size, including the size of - * the #dc_usb_control_t structure. - */ -#define DC_IOCTL_USB_CONTROL_READ DC_IOCTL_IOR('u', 0, DC_IOCTL_SIZE_VARIABLE) -#define DC_IOCTL_USB_CONTROL_WRITE DC_IOCTL_IOW('u', 0, DC_IOCTL_SIZE_VARIABLE) - -/** - * USB control transfer. - */ -typedef struct dc_usb_control_t { - unsigned char bmRequestType; - unsigned char bRequest; - unsigned short wValue; - unsigned short wIndex; - unsigned short wLength; -} dc_usb_control_t; - -/** - * Endpoint direction bits of the USB control transfer. - */ -typedef enum dc_usb_endpoint_t { - DC_USB_ENDPOINT_OUT = 0x00, - DC_USB_ENDPOINT_IN = 0x80 -} dc_usb_endpoint_t; - -/** - * Request type bits of the USB control transfer. - */ -typedef enum dc_usb_request_t { - DC_USB_REQUEST_STANDARD = 0x00, - DC_USB_REQUEST_CLASS = 0x20, - DC_USB_REQUEST_VENDOR = 0x40, - DC_USB_REQUEST_RESERVED = 0x60 -} dc_usb_request_t; - -/** - * Recipient bits of the USB control transfer. - */ -typedef enum dc_usb_recipient_t { - DC_USB_RECIPIENT_DEVICE = 0x00, - DC_USB_RECIPIENT_INTERFACE = 0x01, - DC_USB_RECIPIENT_ENDPOINT = 0x02, - DC_USB_RECIPIENT_OTHER = 0x03, -} dc_usb_recipient_t; - -/** - * USB device descriptor. - */ -typedef struct dc_usb_desc_t { - unsigned short vid; - unsigned short pid; -} dc_usb_desc_t; - -/** - * Opaque object representing a USB device. - */ -typedef struct dc_usb_device_t dc_usb_device_t; - -/** - * Get the vendor id (VID) of the USB device. - * - * @param[in] device A valid USB device. - */ -unsigned int -dc_usb_device_get_vid (dc_usb_device_t *device); - -/** - * Get the product id (PID) of the USB device. - * - * @param[in] device A valid USB device. - */ -unsigned int -dc_usb_device_get_pid (dc_usb_device_t *device); - -/** - * Destroy the USB device and free all resources. - * - * @param[in] device A valid USB device. - */ -void -dc_usb_device_free(dc_usb_device_t *device); - -/** - * Create an iterator to enumerate the USB devices. - * - * @param[out] iterator A location to store the iterator. - * @param[in] context A valid context object. - * @param[in] descriptor A valid device descriptor or NULL. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_usb_iterator_new (dc_iterator_t **iterator, dc_context_t *context, dc_descriptor_t *descriptor); - -/** - * Open a USB connection. - * - * @param[out] iostream A location to store the USB connection. - * @param[in] context A valid context object. - * @param[in] device A valid USB device. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_usb_open (dc_iostream_t **iostream, dc_context_t *context, dc_usb_device_t *device); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_USB_H */ diff --git a/native/include/libdivecomputer/usbhid.h b/native/include/libdivecomputer/usbhid.h deleted file mode 100644 index 245adf0..0000000 --- a/native/include/libdivecomputer/usbhid.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2016 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_USBHID_H -#define DC_USBHID_H - -#include "common.h" -#include "context.h" -#include "iostream.h" -#include "iterator.h" -#include "descriptor.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * USB HID device descriptor. - */ -typedef struct dc_usbhid_desc_t { - unsigned short vid; - unsigned short pid; -} dc_usbhid_desc_t; - -/** - * Opaque object representing a USB HID device. - */ -typedef struct dc_usbhid_device_t dc_usbhid_device_t; - -/** - * Get the vendor id (VID) of the USB HID device. - * - * @param[in] device A valid USB HID device. - */ -unsigned int -dc_usbhid_device_get_vid (dc_usbhid_device_t *device); - -/** - * Get the product id (PID) of the USB HID device. - * - * @param[in] device A valid USB HID device. - */ -unsigned int -dc_usbhid_device_get_pid (dc_usbhid_device_t *device); - -/** - * Destroy the USB HID device and free all resources. - * - * @param[in] device A valid USB HID device. - */ -void -dc_usbhid_device_free(dc_usbhid_device_t *device); - -/** - * Create an iterator to enumerate the USB HID devices. - * - * @param[out] iterator A location to store the iterator. - * @param[in] context A valid context object. - * @param[in] descriptor A valid device descriptor or NULL. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_usbhid_iterator_new (dc_iterator_t **iterator, dc_context_t *context, dc_descriptor_t *descriptor); - -/** - * Open a USB HID connection. - * - * @param[out] iostream A location to store the USB HID connection. - * @param[in] context A valid context object. - * @param[in] device A valid USB HID device. - * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code - * on failure. - */ -dc_status_t -dc_usbhid_open (dc_iostream_t **iostream, dc_context_t *context, dc_usbhid_device_t *device); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* DC_USBHID_H */ diff --git a/native/include/libdivecomputer/version.h b/native/include/libdivecomputer/version.h deleted file mode 100644 index e37ad3c..0000000 --- a/native/include/libdivecomputer/version.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * libdivecomputer - * - * Copyright (C) 2010 Jef Driesen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -#ifndef DC_VERSION_H -#define DC_VERSION_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define DC_VERSION "0.9.0-devel" -#define DC_VERSION_MAJOR 0 -#define DC_VERSION_MINOR 9 -#define DC_VERSION_MICRO 0 - -#define DC_VERSION_CHECK(major,minor,micro) \ - (DC_VERSION_MAJOR > (major) || \ - (DC_VERSION_MAJOR == (major) && DC_VERSION_MINOR > (minor)) || \ - (DC_VERSION_MAJOR == (major) && DC_VERSION_MINOR == (minor) && \ - DC_VERSION_MICRO >= (micro))) - -typedef struct dc_version_t { - unsigned int major; - unsigned int minor; - unsigned int micro; -} dc_version_t; - -const char * -dc_version (dc_version_t *version); - -int -dc_version_check (unsigned int major, unsigned int minor, unsigned int micro); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* DC_VERSION_H */ diff --git a/native/lib/android/arm64-v8a/libdivecomputer.so b/native/lib/android/arm64-v8a/libdivecomputer.so deleted file mode 100644 index ffd4a40..0000000 Binary files a/native/lib/android/arm64-v8a/libdivecomputer.so and /dev/null differ diff --git a/native/lib/android/armeabi-v7a/libdivecomputer.so b/native/lib/android/armeabi-v7a/libdivecomputer.so deleted file mode 100644 index 719ca0f..0000000 Binary files a/native/lib/android/armeabi-v7a/libdivecomputer.so and /dev/null differ diff --git a/native/lib/android/x86/libdivecomputer.so b/native/lib/android/x86/libdivecomputer.so deleted file mode 100644 index 7116781..0000000 Binary files a/native/lib/android/x86/libdivecomputer.so and /dev/null differ diff --git a/native/lib/android/x86_64/libdivecomputer.so b/native/lib/android/x86_64/libdivecomputer.so deleted file mode 100644 index 243d834..0000000 Binary files a/native/lib/android/x86_64/libdivecomputer.so and /dev/null differ diff --git a/native/lib/macos/libdivecomputer-arm64.0.dylib b/native/lib/macos/libdivecomputer-arm64.0.dylib deleted file mode 100644 index c797f4b..0000000 Binary files a/native/lib/macos/libdivecomputer-arm64.0.dylib and /dev/null differ diff --git a/native/lib/macos/libdivecomputer-x86_64.0.dylib b/native/lib/macos/libdivecomputer-x86_64.0.dylib deleted file mode 100644 index 58923d0..0000000 Binary files a/native/lib/macos/libdivecomputer-x86_64.0.dylib and /dev/null differ diff --git a/native/lib/macos/libdivecomputer.0.dylib b/native/lib/macos/libdivecomputer.0.dylib deleted file mode 100644 index 49f2cf2..0000000 Binary files a/native/lib/macos/libdivecomputer.0.dylib and /dev/null differ diff --git a/pubspec.yaml b/pubspec.yaml index 7e6f748..f26c3d2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: dive_computer description: "A Flutter plugin for communication with dive computers." -version: 0.0.1 +version: 0.1.0-dev.2 homepage: "https://divenote.app" repository: "https://github.com/DiveNote/dive_computer" issue_tracker: "https://github.com/DiveNote/dive_computer/issues" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..106c6a3 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,179 @@ +# The Flutter tooling requires that developers have CMake 3.10 or later +# installed. You should not increase this version, as doing so will cause +# the plugin to fail to compile for some customers of the plugin. +cmake_minimum_required(VERSION 3.10) + +project(libdivecomputer VERSION 0.0.1 LANGUAGES C) + +add_subdirectory(hidapi hidapi) +add_subdirectory(libusb libusb) + +add_compile_definitions(ENABLE_LOGGING=1) +add_compile_definitions(HAVE_CLOCK_GETTIME=1) +add_compile_definitions(HAVE_DECL_OPTRESET=1) +add_compile_definitions(HAVE_DECL_STRERROR_R=1) +add_compile_definitions(HAVE_DLFCN_H=1) +add_compile_definitions(HAVE_GETOPT_H=1) +add_compile_definitions(HAVE_GETOPT_LONG=1) +add_compile_definitions(HAVE_GMTIME_R=1) +add_compile_definitions(HAVE_HIDAPI=1) +add_compile_definitions(HAVE_INTTYPES_H=1) +add_compile_definitions(HAVE_IOKIT_SERIAL_IOSS_H=1) +add_compile_definitions(HAVE_LIBUSB=1) +add_compile_definitions(HAVE_LOCALTIME_R=1) +add_compile_definitions(HAVE_MACH_ABSOLUTE_TIME=1) +add_compile_definitions(HAVE_MACH_MACH_TIME_H=1) +add_compile_definitions(HAVE_PTHREAD_H=1) +add_compile_definitions(HAVE_STDINT_H=1) +add_compile_definitions(HAVE_STDIO_H=1) +add_compile_definitions(HAVE_STDLIB_H=1) +add_compile_definitions(HAVE_STRERROR_R=1) +add_compile_definitions(HAVE_STRINGS_H=1) +add_compile_definitions(HAVE_STRING_H=1) +add_compile_definitions(HAVE_STRUCT_TM_TM_GMTOFF=1) +add_compile_definitions(HAVE_SYS_PARAM_H=1) +add_compile_definitions(HAVE_SYS_SOCKET_H=1) +add_compile_definitions(HAVE_SYS_STAT_H=1) +add_compile_definitions(HAVE_SYS_TYPES_H=1) +add_compile_definitions(HAVE_TIMEGM=1) +add_compile_definitions(HAVE_UNISTD_H=1) +add_compile_definitions(HAVE_VERSION_SUFFIX=1) +add_compile_definitions(LT_OBJDIR=".libs/") +add_compile_definitions(PACKAGE="libdivecomputer") +add_compile_definitions(PACKAGE_BUGREPORT="") +add_compile_definitions(PACKAGE_NAME="libdivecomputer") +add_compile_definitions(PACKAGE_STRING="libdivecomputer 0.9.0-devel") +add_compile_definitions(PACKAGE_TARNAME="libdivecomputer") +add_compile_definitions(PACKAGE_URL="") +add_compile_definitions(PACKAGE_VERSION="0.9.0-devel") +add_compile_definitions(STDC_HEADERS=1) +add_compile_definitions(VERSION="0.9.0-devel") + +# add_compile_definitions(__APPLE__=1) +# add_compile_definitions(HAVE_HIDAPI=1) +# add_compile_definitions(HAVE_PTHREAD_H=1) + +include_directories( + "libdivecomputer/include" + "hidapi/hidapi" + "libusb/libusb" +) + +add_library(libdivecomputer SHARED + "libdivecomputer/src/context.c" + "libdivecomputer/src/device.c" + "libdivecomputer/src/iterator.c" + "libdivecomputer/src/buffer.c" + "libdivecomputer/src/descriptor.c" + "libdivecomputer/src/iostream.c" + "libdivecomputer/src/array.c" + "libdivecomputer/src/checksum.c" + "libdivecomputer/src/ringbuffer.c" + "libdivecomputer/src/rbstream.c" + "libdivecomputer/src/common.c" + "libdivecomputer/src/datetime.c" + "libdivecomputer/src/packet.c" + "libdivecomputer/src/aes.c" + "libdivecomputer/src/platform.c" + "libdivecomputer/src/ihex.c" + "libdivecomputer/src/timer.c" + "libdivecomputer/src/parser.c" + "libdivecomputer/src/serial_posix.c" + "libdivecomputer/src/usb.c" + "libdivecomputer/src/usbhid.c" + + "libdivecomputer/src/atomics_cobalt.c" + "libdivecomputer/src/atomics_cobalt_parser.c" + "libdivecomputer/src/citizen_aqualand.c" + "libdivecomputer/src/citizen_aqualand_parser.c" + "libdivecomputer/src/cochran_commander.c" + "libdivecomputer/src/cochran_commander_parser.c" + "libdivecomputer/src/cressi_edy.c" + "libdivecomputer/src/cressi_edy_parser.c" + "libdivecomputer/src/cressi_goa.c" + "libdivecomputer/src/cressi_goa_parser.c" + "libdivecomputer/src/cressi_leonardo.c" + "libdivecomputer/src/cressi_leonardo_parser.c" + "libdivecomputer/src/deepblu_cosmiq.c" + "libdivecomputer/src/deepblu_cosmiq_parser.c" + "libdivecomputer/src/deepsix_excursion.c" + "libdivecomputer/src/deepsix_excursion_parser.c" + "libdivecomputer/src/diverite_nitekq.c" + "libdivecomputer/src/diverite_nitekq_parser.c" + "libdivecomputer/src/divesoft_freedom.c" + "libdivecomputer/src/divesoft_freedom_parser.c" + "libdivecomputer/src/hdlc.c" + "libdivecomputer/src/divesystem_idive.c" + "libdivecomputer/src/divesystem_idive_parser.c" + "libdivecomputer/src/hw_frog.c" + "libdivecomputer/src/hw_ostc3.c" + "libdivecomputer/src/hw_ostc.c" + "libdivecomputer/src/hw_ostc_parser.c" + "libdivecomputer/src/liquivision_lynx.c" + "libdivecomputer/src/liquivision_lynx_parser.c" + "libdivecomputer/src/mares_common.c" + "libdivecomputer/src/mares_darwin.c" + "libdivecomputer/src/mares_darwin_parser.c" + "libdivecomputer/src/mares_iconhd.c" + "libdivecomputer/src/mares_iconhd_parser.c" + "libdivecomputer/src/mares_nemo.c" + "libdivecomputer/src/mares_nemo_parser.c" + "libdivecomputer/src/mares_puck.c" + "libdivecomputer/src/mclean_extreme.c" + "libdivecomputer/src/mclean_extreme_parser.c" + "libdivecomputer/src/oceanic_common.c" + "libdivecomputer/src/oceanic_atom2.c" + "libdivecomputer/src/oceanic_atom2_parser.c" + "libdivecomputer/src/oceanic_veo250.c" + "libdivecomputer/src/oceanic_veo250_parser.c" + "libdivecomputer/src/oceanic_vtpro.c" + "libdivecomputer/src/oceanic_vtpro_parser.c" + "libdivecomputer/src/oceans_s1_common.c" + "libdivecomputer/src/oceans_s1.c" + "libdivecomputer/src/oceans_s1_parser.c" + "libdivecomputer/src/reefnet_sensus.c" + "libdivecomputer/src/reefnet_sensus_parser.c" + "libdivecomputer/src/reefnet_sensuspro.c" + "libdivecomputer/src/reefnet_sensuspro_parser.c" + "libdivecomputer/src/reefnet_sensusultra.c" + "libdivecomputer/src/reefnet_sensusultra_parser.c" + "libdivecomputer/src/seac_screen.c" + "libdivecomputer/src/seac_screen_parser.c" + "libdivecomputer/src/shearwater_common.c" + "libdivecomputer/src/shearwater_petrel.c" + "libdivecomputer/src/shearwater_predator.c" + "libdivecomputer/src/shearwater_predator_parser.c" + "libdivecomputer/src/sporasub_sp2.c" + "libdivecomputer/src/sporasub_sp2_parser.c" + "libdivecomputer/src/suunto_common.c" + "libdivecomputer/src/suunto_common2.c" + "libdivecomputer/src/suunto_d9.c" + "libdivecomputer/src/suunto_d9_parser.c" + "libdivecomputer/src/suunto_eon.c" + "libdivecomputer/src/suunto_eon_parser.c" + "libdivecomputer/src/suunto_eonsteel.c" + "libdivecomputer/src/suunto_eonsteel_parser.c" + "libdivecomputer/src/suunto_solution.c" + "libdivecomputer/src/suunto_solution_parser.c" + "libdivecomputer/src/suunto_vyper.c" + "libdivecomputer/src/suunto_vyper_parser.c" + "libdivecomputer/src/suunto_vyper2.c" + "libdivecomputer/src/tecdiving_divecomputereu.c" + "libdivecomputer/src/tecdiving_divecomputereu_parser.c" + "libdivecomputer/src/uwatec_aladin.c" + "libdivecomputer/src/uwatec_memomouse.c" + "libdivecomputer/src/uwatec_memomouse_parser.c" + "libdivecomputer/src/uwatec_smart.c" + "libdivecomputer/src/uwatec_smart_parser.c" + "libdivecomputer/src/zeagle_n2ition3.c" +) + +target_link_libraries(libdivecomputer PRIVATE hidapi::hidapi) +target_link_libraries(libdivecomputer PRIVATE libusb) + +set_target_properties(libdivecomputer PROPERTIES + PUBLIC_HEADER dive_computer.h + OUTPUT_NAME "libdivecomputer" +) + +target_compile_definitions(libdivecomputer PUBLIC DART_SHARED_LIB) diff --git a/src/hidapi b/src/hidapi new file mode 160000 index 0000000..7011fa9 --- /dev/null +++ b/src/hidapi @@ -0,0 +1 @@ +Subproject commit 7011fa98af2dde00c298105735e470de800288c7 diff --git a/src/libdivecomputer b/src/libdivecomputer new file mode 160000 index 0000000..1d0aeec --- /dev/null +++ b/src/libdivecomputer @@ -0,0 +1 @@ +Subproject commit 1d0aeecf65834d21b310e189a903eaa84d0e0caf diff --git a/src/libusb b/src/libusb new file mode 160000 index 0000000..d52e355 --- /dev/null +++ b/src/libusb @@ -0,0 +1 @@ +Subproject commit d52e355daa09f17ce64819122cb067b8a2ee0d4b diff --git a/src/libusb_config/config.h b/src/libusb_config/config.h new file mode 100644 index 0000000..f9fcc19 --- /dev/null +++ b/src/libusb_config/config.h @@ -0,0 +1,160 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to the attribute for default visibility. */ +#define DEFAULT_VISIBILITY __attribute__ ((visibility ("default"))) + +/* Define to 1 to start with debug message logging enabled. */ +/* #undef ENABLE_DEBUG_LOGGING */ + +/* Define to 1 to enable message logging. */ +#define ENABLE_LOGGING 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ASM_TYPES_H */ + +/* Define to 1 if you have the 'clock_gettime' function. */ +/* #undef HAVE_CLOCK_GETTIME */ + +/* Define to 1 if you have the declaration of 'EFD_CLOEXEC', and to 0 if you + don't. */ +/* #undef HAVE_DECL_EFD_CLOEXEC */ + +/* Define to 1 if you have the declaration of 'EFD_NONBLOCK', and to 0 if you + don't. */ +/* #undef HAVE_DECL_EFD_NONBLOCK */ + +/* Define to 1 if you have the declaration of 'TFD_CLOEXEC', and to 0 if you + don't. */ +/* #undef HAVE_DECL_TFD_CLOEXEC */ + +/* Define to 1 if you have the declaration of 'TFD_NONBLOCK', and to 0 if you + don't. */ +/* #undef HAVE_DECL_TFD_NONBLOCK */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if the system has eventfd functionality. */ +/* #undef HAVE_EVENTFD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header + file. */ +#define HAVE_IOKIT_USB_IOUSBHOSTFAMILYDEFINITIONS_H 1 + +/* Define to 1 if you have the 'udev' library (-ludev). */ +/* #undef HAVE_LIBUDEV */ + +/* Define to 1 if the system has the type 'nfds_t'. */ +#define HAVE_NFDS_T 1 + +/* Define to 1 if you have the 'pipe2' function. */ +/* #undef HAVE_PIPE2 */ + +/* Define to 1 if you have the 'pthread_condattr_setclock' function. */ +/* #undef HAVE_PTHREAD_CONDATTR_SETCLOCK */ + +/* Define to 1 if you have the 'pthread_setname_np' function. */ +/* #undef HAVE_PTHREAD_SETNAME_NP */ + +/* Define to 1 if you have the 'pthread_threadid_np' function. */ +#define HAVE_PTHREAD_THREADID_NP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if the system has the type 'struct timespec'. */ +/* #undef HAVE_STRUCT_TIMESPEC */ + +/* Define to 1 if you have the 'syslog' function. */ +/* #undef HAVE_SYSLOG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if the system has timerfd functionality. */ +/* #undef HAVE_TIMERFD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libusb-1.0" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "libusb-devel@lists.sourceforge.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libusb-1.0" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libusb-1.0 1.0.27" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libusb-1.0" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://libusb.info" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.0.27" + +/* Define to 1 if compiling for a POSIX platform. */ +#define PLATFORM_POSIX 1 + +/* Define to 1 if compiling for a Windows platform. */ +/* #undef PLATFORM_WINDOWS */ + +/* Define to the attribute for enabling parameter checks on printf-like + functions. */ +#define PRINTF_FORMAT(a, b) __attribute__ ((__format__ (__printf__, a, b))) + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* UMockdev hotplug code is not racy */ +/* #undef UMOCKDEV_HOTPLUG */ + +/* Define to 1 to output logging messages to the systemwide log. */ +/* #undef USE_SYSTEM_LOGGING_FACILITY */ + +/* Version number of package */ +#define VERSION "1.0.27" + +/* Enable GNU extensions. */ +#define _GNU_SOURCE 1 + +/* Define to the oldest supported Windows version. */ +/* #undef _WIN32_WINNT */ + +/* Define to '__inline__' or '__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index cab6cab..634e534 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -12,6 +12,6 @@ project(${PROJECT_NAME} LANGUAGES CXX) # This list could contain prebuilt libraries, or libraries created by an # external build triggered from this build file. set(dive_computer_bundled_libraries - ${CMAKE_CURRENT_SOURCE_DIR}/../native/lib/windows_x64/libdivecomputer-0.dll;${CMAKE_CURRENT_SOURCE_DIR}/../native/lib/windows_x64/libusb-1.0.dll;${CMAKE_CURRENT_SOURCE_DIR}/../native/lib/windows_x64/libhidapi-0.dll + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/libdivecomputer-0.dll;${CMAKE_CURRENT_SOURCE_DIR}/libraries/libusb-1.0.dll;${CMAKE_CURRENT_SOURCE_DIR}/libraries/libhidapi-0.dll PARENT_SCOPE ) diff --git a/native/lib/windows_x64/libdivecomputer-0.dll b/windows/libraries/libdivecomputer-0.dll similarity index 78% rename from native/lib/windows_x64/libdivecomputer-0.dll rename to windows/libraries/libdivecomputer-0.dll index cb88857..cc30c30 100644 Binary files a/native/lib/windows_x64/libdivecomputer-0.dll and b/windows/libraries/libdivecomputer-0.dll differ diff --git a/native/lib/windows_x64/libhidapi-0.dll b/windows/libraries/libhidapi-0.dll similarity index 99% rename from native/lib/windows_x64/libhidapi-0.dll rename to windows/libraries/libhidapi-0.dll index 7d95450..d8c3a7b 100644 Binary files a/native/lib/windows_x64/libhidapi-0.dll and b/windows/libraries/libhidapi-0.dll differ diff --git a/native/lib/windows_x64/libusb-1.0.dll b/windows/libraries/libusb-1.0.dll similarity index 99% rename from native/lib/windows_x64/libusb-1.0.dll rename to windows/libraries/libusb-1.0.dll index faeb17b..b8cfb00 100644 Binary files a/native/lib/windows_x64/libusb-1.0.dll and b/windows/libraries/libusb-1.0.dll differ