├── docs ├── styles │ ├── main.css │ └── main.js ├── favicon.ico ├── images │ ├── Diagram.png │ └── WindowsSample.png ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── toc.html └── logo.svg ├── FUNDING.yml ├── Diagram.png ├── src ├── Flutter │ └── flutnet_thermometer_bridge │ │ ├── LICENSE │ │ ├── CHANGELOG.md │ │ ├── lib │ │ ├── exceptions.dart │ │ └── index.dart │ │ ├── .metadata │ │ ├── README.md │ │ └── pubspec.yaml ├── Samples │ ├── Flutnet │ │ ├── Flutter │ │ │ ├── flutnet_thermometer_bridge │ │ │ │ ├── LICENSE │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── lib │ │ │ │ │ ├── exceptions.dart │ │ │ │ │ ├── index.dart │ │ │ │ │ ├── flutnet │ │ │ │ │ │ ├── data │ │ │ │ │ │ │ ├── flutnet_error_code.dart │ │ │ │ │ │ │ └── flutnet_exception.dart │ │ │ │ │ │ └── service_model │ │ │ │ │ │ │ └── platform_operation_exception.g.dart │ │ │ │ │ └── flutnet_thermometer │ │ │ │ │ │ └── service_library │ │ │ │ │ │ ├── generated │ │ │ │ │ │ ├── cmd_thermometer_service_stop_monitoring.g.dart │ │ │ │ │ │ ├── res_thermometer_service_stop_monitoring.g.dart │ │ │ │ │ │ ├── cmd_thermometer_service_start_monitoring.g.dart │ │ │ │ │ │ ├── res_thermometer_service_start_monitoring.g.dart │ │ │ │ │ │ ├── cmd_thermometer_service_get_temperature_async.g.dart │ │ │ │ │ │ ├── res_thermometer_service_get_temperature_async.g.dart │ │ │ │ │ │ ├── cmd_thermometer_service_stop_monitoring.dart │ │ │ │ │ │ ├── res_thermometer_service_stop_monitoring.dart │ │ │ │ │ │ ├── cmd_thermometer_service_start_monitoring.dart │ │ │ │ │ │ ├── res_thermometer_service_start_monitoring.dart │ │ │ │ │ │ ├── cmd_thermometer_service_get_temperature_async.dart │ │ │ │ │ │ └── res_thermometer_service_get_temperature_async.dart │ │ │ │ │ │ ├── temperature_changed_args.g.dart │ │ │ │ │ │ └── temperature_changed_args.dart │ │ │ │ ├── .metadata │ │ │ │ ├── README.md │ │ │ │ └── pubspec.yaml │ │ │ └── flutnet_thermometer │ │ │ │ ├── assets │ │ │ │ ├── flutnet_logo.png │ │ │ │ └── xamarin_logo.png │ │ │ │ ├── .metadata │ │ │ │ ├── README.md │ │ │ │ ├── .vscode │ │ │ │ └── launch.json │ │ │ │ ├── pubspec.yaml │ │ │ │ ├── .gitignore │ │ │ │ ├── flutnet_thermometer.iml │ │ │ │ └── test │ │ │ │ └── widget_test.dart │ │ ├── app.jpg │ │ ├── FlutnetThermometer.ModuleInterop.Android │ │ │ ├── Transforms │ │ │ │ ├── EnumFields.xml │ │ │ │ ├── EnumMethods.xml │ │ │ │ └── Metadata.xml │ │ │ └── Properties │ │ │ │ └── AssemblyInfo.cs │ │ ├── FlutnetThermometer.Android │ │ │ ├── Resources │ │ │ │ ├── xml │ │ │ │ │ └── device_filter.xml │ │ │ │ ├── drawable │ │ │ │ │ ├── launch_image.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ └── layout │ │ │ │ │ └── activity_main.xml │ │ │ ├── Properties │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── AssemblyInfo.cs │ │ │ └── Assets │ │ │ │ └── AboutAssets.txt │ │ └── FlutnetThermometer.ServiceLibrary │ │ │ └── TemperatureChangedArgs.cs │ └── UnoPlatform │ │ ├── UnoCrossPlatform.UWP │ │ ├── Assets │ │ │ ├── storelogo.png │ │ │ ├── splashscreen.scale-200.png │ │ │ ├── lockscreenlogo.scale-200.png │ │ │ ├── square44x44logo.scale-200.png │ │ │ ├── wide310x150logo.scale-200.png │ │ │ └── square150x150logo.scale-200.png │ │ ├── UnoCrossPlatform.UWP_TemporaryKey.pfx │ │ ├── App.xaml │ │ ├── DontDeleteMe.xaml.cs │ │ ├── DontDeleteMe.xaml │ │ └── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── UnoCrossPlatform.Droid │ │ ├── Assets │ │ │ ├── SplashScreen.png │ │ │ ├── Fonts │ │ │ │ └── uno-fluentui-assets.ttf │ │ │ └── AboutAssets.txt │ │ ├── Resources │ │ │ ├── drawable │ │ │ │ └── Icon.png │ │ │ ├── xml │ │ │ │ └── device_filter.xml │ │ │ └── values │ │ │ │ ├── Strings.xml │ │ │ │ └── Styles.xml │ │ ├── Properties │ │ │ ├── AndroidManifest.xml │ │ │ └── AssemblyInfo.cs │ │ ├── MainActivity.cs │ │ └── Main.cs │ │ └── UnoCrossPlatform │ │ ├── MainPage.xaml │ │ └── DispatchingExtensions.cs ├── Device.Net │ ├── Device.Net.pfx │ ├── DeviceType.cs │ ├── DeviceEventArgs.cs │ ├── Logging │ │ ├── LoggerFactoryExtensions.cs │ │ ├── NullLoggerFactory.cs │ │ ├── ILoggerFactory.cs │ │ ├── DummyDisposable.cs │ │ ├── ILoggerProvider.cs │ │ ├── EventId.cs │ │ ├── ILogger.cs │ │ ├── NullLogger.cs │ │ └── NullLoggerOfT.cs │ ├── LoggingExtensions.cs │ ├── Windows │ │ ├── FileAccessRights.cs │ │ ├── SpDeviceInterfaceDetailData.cs │ │ ├── SpDeviceInfoData.cs │ │ ├── CommTimeouts.cs │ │ ├── SpDeviceInterfaceData.cs │ │ ├── WindowsDeviceConstants.cs │ │ ├── WindowsHelpers.cs │ │ └── IApiService.cs │ ├── UnsubscribeDisposable.cs │ ├── Exceptions │ │ ├── AsyncException.cs │ │ ├── DeviceException.cs │ │ ├── ApiException.cs │ │ ├── ValidationException.cs │ │ └── NotInitializedException.cs │ ├── Delegates.cs │ ├── IDeviceListener.cs │ ├── Properties.cs │ ├── Trace.cs │ ├── IDataReceiver.cs │ ├── Observer.cs │ ├── Observable.cs │ ├── AsyncExtensions.cs │ ├── FilterDeviceDefinition.cs │ └── Device.Net.csproj ├── Device.Net.UnoSample │ ├── Device.Net.UnoSample.Skia.Wpf │ │ ├── Program.cs │ │ └── Device.Net.UnoSample.Skia.Wpf.csproj │ ├── Device.Net.UnoSample.macOS │ │ ├── Assets.xcassets │ │ │ ├── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── AppIcon-16.png │ │ │ │ ├── AppIcon-32.png │ │ │ │ ├── AppIcon-128.png │ │ │ │ ├── AppIcon-256.png │ │ │ │ ├── AppIcon-512.png │ │ │ │ ├── AppIcon-128@2x.png │ │ │ │ ├── AppIcon-16@2x.png │ │ │ │ ├── AppIcon-256@2x.png │ │ │ │ ├── AppIcon-32@2x.png │ │ │ │ └── AppIcon-512@2x.png │ │ │ └── unologo.imageset │ │ │ │ └── unoplatform.jpg │ │ ├── Resources │ │ │ └── Fonts │ │ │ │ └── uno-fluentui-assets.ttf │ │ ├── Entitlements.plist │ │ ├── Main.cs │ │ └── Info.plist │ ├── Device.Net.UnoSample.UWP │ │ ├── Assets │ │ │ ├── storelogo.png │ │ │ ├── splashscreen.scale-200.png │ │ │ ├── lockscreenlogo.scale-200.png │ │ │ ├── square44x44logo.scale-200.png │ │ │ ├── wide310x150logo.scale-200.png │ │ │ └── square150x150logo.scale-200.png │ │ ├── Device.Net.UnoSample.Uwp_temporarykey.pfx │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Device.Net.UnoSample.Droid │ │ ├── Resources │ │ │ ├── drawable │ │ │ │ └── Icon.png │ │ │ └── values │ │ │ │ ├── Strings.xml │ │ │ │ └── Styles.xml │ │ ├── Assets │ │ │ ├── Fonts │ │ │ │ └── uno-fluentui-assets.ttf │ │ │ └── AboutAssets.txt │ │ ├── Properties │ │ │ ├── AndroidManifest.xml │ │ │ └── AssemblyInfo.cs │ │ ├── MainActivity.cs │ │ └── Main.cs │ ├── Device.Net.UnoSample.Skia.Gtk │ │ ├── Assets │ │ │ └── Fonts │ │ │ │ └── uno-fluentui-assets.ttf │ │ └── Program.cs │ ├── Device.Net.UnoSample.Skia.Wpf.Host │ │ ├── Assets │ │ │ └── Fonts │ │ │ │ └── uno-fluentui-assets.ttf │ │ ├── App.config │ │ ├── Properties │ │ │ └── Settings.settings │ │ ├── App.xaml.cs │ │ ├── App.xaml │ │ ├── MainWindow.xaml │ │ ├── Device.Net.UnoSample.Skia.Wpf.Host.csproj │ │ └── MainWindow.xaml.cs │ └── Device.Net.UnoSample.Shared │ │ ├── App.xaml │ │ ├── MainPage.xaml │ │ ├── DispatchingExtensions.cs │ │ ├── Assets │ │ └── SharedAssets.md │ │ └── Device.Net.UnoSample.Shared.shproj ├── Hid.Net │ ├── Delegates.cs │ ├── GlobalSuppressions.cs │ ├── Properties.cs │ ├── Windows │ │ ├── HidAttributes.cs │ │ └── IHidApiService.cs │ ├── IHidDevice.cs │ ├── ReadResult.cs │ └── IHidDeviceHandler.cs ├── Usb.Net.AndroidSample │ ├── Resources │ │ ├── values │ │ │ ├── dimens.xml │ │ │ ├── ic_launcher_background.xml │ │ │ ├── Strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── xml │ │ │ └── device_filter.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── menu │ │ │ └── menu_main.xml │ │ └── layout │ │ │ └── content_main.axml │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ └── Assets │ │ └── AboutAssets.txt ├── Usb.Net.UWP.Sample │ ├── Assets │ │ ├── StoreLogo.png │ │ ├── SplashScreen.scale-200.png │ │ ├── LockScreenLogo.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Wide310x150Logo.scale-200.png │ │ └── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── Usb.Net.UWP.Sample_TemporaryKey.pfx │ ├── App.xaml │ └── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml ├── Device.Net.MacOSLibUsbSample │ ├── Assets.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── AppIcon-128.png │ │ │ ├── AppIcon-16.png │ │ │ ├── AppIcon-256.png │ │ │ ├── AppIcon-32.png │ │ │ ├── AppIcon-512.png │ │ │ ├── AppIcon-128@2x.png │ │ │ ├── AppIcon-16@2x.png │ │ │ ├── AppIcon-256@2x.png │ │ │ ├── AppIcon-32@2x.png │ │ │ └── AppIcon-512@2x.png │ ├── Entitlements.plist │ ├── Main.cs │ ├── packages.config │ ├── AppDelegate.cs │ └── Info.plist ├── Device.Net.UWPUnitTests │ ├── Assets │ │ ├── StoreLogo.png │ │ ├── SplashScreen.scale-200.png │ │ ├── LockScreenLogo.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Wide310x150Logo.scale-200.png │ │ └── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── Device.Net.UWPUnitTests_TemporaryKey.pfx │ ├── UnitTestApp.xaml │ └── Properties │ │ ├── AssemblyInfo.cs │ │ └── UnitTestApp.rd.xml ├── Device.Net.Reactive │ ├── IRequest.cs │ ├── Device.Net.Reactive.csproj │ ├── Delegates.cs │ └── IDeviceManager.cs ├── Usb.Net.Android.Fakes │ ├── Android │ │ ├── Content │ │ │ ├── IntentFilter.cs │ │ │ ├── Intent.cs │ │ │ └── Context.cs │ │ ├── App │ │ │ ├── BroadcastReceiver.cs │ │ │ └── PendingIntent.cs │ │ └── Hardware │ │ │ └── Usb │ │ │ ├── UsbRequest.cs │ │ │ ├── UsbEndpoint.cs │ │ │ ├── UsbDevice.cs │ │ │ ├── UsbInterface.cs │ │ │ ├── UsbManager.cs │ │ │ └── UsbDeviceConnection.cs │ ├── Usb.Net.Android.Fakes.csproj │ ├── GlobalSuppressions.cs │ └── Java │ │ └── Nio │ │ ├── Buffer.cs │ │ └── ByteBuffer.cs ├── Device.Net.UWP │ ├── Device.Net.UWP.XML │ └── ConnectionInfo.cs ├── Device.Net.LibUsb │ ├── Device.Net.LibUsb.xml │ ├── ExtensionMethods.cs │ ├── ReadEndpoint.cs │ ├── WriteEndpoint.cs │ └── Device.Net.LibUsb.csproj ├── SerialPort.Net │ ├── Parity.cs │ ├── StopBits.cs │ └── GlobalSuppressions.cs ├── Usb.Net │ ├── IUsbDevice.cs │ ├── Delegates.cs │ ├── IUsbInterfaceEndpoint.cs │ ├── Windows │ │ ├── WinUsbApiCalls.POLICY_TYPE.cs │ │ ├── WINUSB_PIPE_INFORMATION.cs │ │ ├── WindowsUsbExtensions.cs │ │ ├── WinUsbApiCalls.USBD_PIPE_TYPE.cs │ │ ├── WinUsbApiCalls.USB_DEVICE_SPEED.cs │ │ ├── USB_DEVICE_DESCRIPTOR.cs │ │ ├── WindowsUsbInterfaceEndpoint.cs │ │ ├── USB_CONFIGURATION_DESCRIPTOR.cs │ │ └── USB_INTERFACE_DESCRIPTOR.cs │ ├── ControlTransferException.cs │ ├── GlobalSuppressions.cs │ ├── WINUSB_SETUP_PACKET.cs │ ├── UsbDeviceExtensions.cs │ ├── RequestDirection.cs │ ├── Usb.Net.csproj │ ├── RequestType.cs │ ├── UsbDeviceRequestType.cs │ └── SetupPacket.cs ├── Usb.Net.Android │ ├── IUsbPermissionBroadcastReceiver.cs │ ├── AndroidFactory.cs │ ├── IAndroidFactory.cs │ ├── packages.config │ └── Properties │ │ └── AssemblyInfo.cs ├── Device.Net.UnitTests │ ├── MockClasses │ │ ├── MockUsbDevice.cs │ │ └── MockHidDevice.cs │ └── TrezorResponseByteBuffer.cs ├── Directory.Build.props └── Usb.Net.Android.Standard │ └── Usb.Net.Android.Standard.csproj ├── Build └── Icon.png ├── Images └── WindowsSample.png ├── docfx_project ├── api │ ├── .gitignore │ └── index.md ├── images │ ├── Diagram.png │ └── WindowsSample.png ├── filterconfig.yml ├── .gitignore ├── toc.yml └── articles │ ├── NuGet.md │ └── toc.yml ├── Build.bat ├── .github ├── workflows │ └── dotnet-core.yml └── ISSUE_TEMPLATE │ └── issue-report.md ├── Diagram.xml ├── .gitignore ├── LICENSE ├── azure-pipelines.yml └── CONTRIBUTING.md /docs/styles/main.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: MelbourneDeveloper 2 | -------------------------------------------------------------------------------- /Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/Diagram.png -------------------------------------------------------------------------------- /src/Flutter/flutnet_thermometer_bridge/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /Build/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/Build/Icon.png -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/docs/favicon.ico -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /docs/images/Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/docs/images/Diagram.png -------------------------------------------------------------------------------- /Images/WindowsSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/Images/WindowsSample.png -------------------------------------------------------------------------------- /docfx_project/api/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # temp file # 3 | ############### 4 | *.yml 5 | .manifest 6 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/app.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/app.jpg -------------------------------------------------------------------------------- /docs/images/WindowsSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/docs/images/WindowsSample.png -------------------------------------------------------------------------------- /src/Device.Net/Device.Net.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net/Device.Net.pfx -------------------------------------------------------------------------------- /docfx_project/images/Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/docfx_project/images/Diagram.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Wpf/Program.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Device.Net.UnoSample.Skia.Gtk 3 | { 4 | } 5 | -------------------------------------------------------------------------------- /src/Hid.Net/Delegates.cs: -------------------------------------------------------------------------------- 1 | namespace Hid.Net 2 | { 3 | public delegate Report WriteReportTransform(byte[] data); 4 | } 5 | -------------------------------------------------------------------------------- /docfx_project/images/WindowsSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/docfx_project/images/WindowsSample.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /src/Flutter/flutnet_thermometer_bridge/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [0.0.1] - TODO: Add release date. 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.ModuleInterop.Android/Transforms/EnumFields.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.ModuleInterop.Android/Transforms/EnumMethods.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/docs/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/docs/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/Usb.Net.UWP.Sample/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.UWP.Sample/Assets/StoreLogo.png -------------------------------------------------------------------------------- /docfx_project/filterconfig.yml: -------------------------------------------------------------------------------- 1 | apiRules: 2 | - exclude: 3 | uidRegex: ^Device\.Net\.LoggingExtensions$ 4 | type: Type 5 | -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/docs/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/docs/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /src/Device.Net.UWPUnitTests/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UWPUnitTests/Assets/StoreLogo.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [0.0.1] - TODO: Add release date. 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /src/Device.Net.Reactive/IRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Device.Net 2 | { 3 | public interface IRequest 4 | { 5 | byte[] ToArray(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Android/Content/IntentFilter.cs: -------------------------------------------------------------------------------- 1 | namespace Android.Content 2 | { 3 | public interface IntentFilter 4 | { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Usb.Net.UWP.Sample/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.UWP.Sample/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /docs/styles/main.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. 2 | -------------------------------------------------------------------------------- /src/Usb.Net.UWP.Sample/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.UWP.Sample/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /src/Usb.Net.UWP.Sample/Usb.Net.UWP.Sample_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.UWP.Sample/Usb.Net.UWP.Sample_TemporaryKey.pfx -------------------------------------------------------------------------------- /docfx_project/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # folder # 3 | ############### 4 | /**/DROP/ 5 | /**/TEMP/ 6 | /**/packages/ 7 | /**/bin/ 8 | /**/obj/ 9 | _site 10 | -------------------------------------------------------------------------------- /src/Device.Net.UWPUnitTests/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UWPUnitTests/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /src/Usb.Net.UWP.Sample/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.UWP.Sample/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /src/Usb.Net.UWP.Sample/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.UWP.Sample/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /src/Usb.Net.UWP.Sample/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.UWP.Sample/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /src/Device.Net.UWPUnitTests/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UWPUnitTests/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /src/Device.Net/DeviceType.cs: -------------------------------------------------------------------------------- 1 | namespace Device.Net 2 | { 3 | public enum DeviceType 4 | { 5 | Hid, 6 | Usb, 7 | SerialPort 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/Device.Net.UWPUnitTests/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UWPUnitTests/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /src/Device.Net.UWPUnitTests/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UWPUnitTests/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /src/Device.Net.UWPUnitTests/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UWPUnitTests/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/storelogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/storelogo.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/Device.Net.UWPUnitTests/Device.Net.UWPUnitTests_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UWPUnitTests/Device.Net.UWPUnitTests_TemporaryKey.pfx -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/storelogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/storelogo.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer/assets/flutnet_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/Flutter/flutnet_thermometer/assets/flutnet_logo.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer/assets/xamarin_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/Flutter/flutnet_thermometer/assets/xamarin_logo.png -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.Droid/Assets/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/UnoPlatform/UnoCrossPlatform.Droid/Assets/SplashScreen.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/Device.Net.UWP/Device.Net.UWP.XML: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Device.Net.UWP 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2C3E50 4 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/xml/device_filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.Droid/Resources/drawable/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/UnoPlatform/UnoCrossPlatform.Droid/Resources/drawable/Icon.png -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.Droid/Resources/xml/device_filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/values/Strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Usb.Net.AndroidSample 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /src/Device.Net.LibUsb/Device.Net.LibUsb.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Device.Net.LibUsb 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/splashscreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/splashscreen.scale-200.png -------------------------------------------------------------------------------- /src/SerialPort.Net/Parity.cs: -------------------------------------------------------------------------------- 1 | namespace SerialPort.Net 2 | { 3 | public enum Parity 4 | { 5 | None, 6 | Odd, 7 | Even, 8 | Mark, 9 | Space, 10 | } 11 | } -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Android/Content/Intent.cs: -------------------------------------------------------------------------------- 1 | namespace Android.Content 2 | { 3 | public interface Intent 4 | { 5 | bool GetBooleanExtra(string? name, bool defaultValue); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.AndroidSample/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Droid/Resources/drawable/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.Droid/Resources/drawable/Icon.png -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/lockscreenlogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/lockscreenlogo.scale-200.png -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/square44x44logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/square44x44logo.scale-200.png -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/wide310x150logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/wide310x150logo.scale-200.png -------------------------------------------------------------------------------- /src/Usb.Net.UWP.Sample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Usb.Net.UWP.Sample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /docfx_project/api/index.md: -------------------------------------------------------------------------------- 1 | # API Documentation 2 | 3 | This contains reference documentation for Device.Net and all the associated libraries. See [Getting Started](../articles/GettingStarted.html) for a quick start guide. -------------------------------------------------------------------------------- /docfx_project/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Articles 2 | href: articles/ 3 | - name: Api Documentation 4 | href: api/ 5 | homepage: api/index.md 6 | - name: Sponsor 7 | href: https://github.com/sponsors/MelbourneDeveloper 8 | -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/splashscreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/splashscreen.scale-200.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/drawable/launch_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/drawable/launch_image.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2C3E50 4 | -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.Droid/Assets/Fonts/uno-fluentui-assets.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/UnoPlatform/UnoCrossPlatform.Droid/Assets/Fonts/uno-fluentui-assets.ttf -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/square150x150logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/UnoPlatform/UnoCrossPlatform.UWP/Assets/square150x150logo.scale-200.png -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.UWP/UnoCrossPlatform.UWP_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/UnoPlatform/UnoCrossPlatform.UWP/UnoCrossPlatform.UWP_TemporaryKey.pfx -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.MacOSLibUsbSample/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /src/Device.Net.UWPUnitTests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UWPUnitTests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/lockscreenlogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/lockscreenlogo.scale-200.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/square44x44logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/square44x44logo.scale-200.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/wide310x150logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/wide310x150logo.scale-200.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FlutnetThermometer 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.ModuleInterop.Android/Transforms/Metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | Flutnet.Interop.Plugins 3 | 4 | -------------------------------------------------------------------------------- /src/Device.Net.UWP/ConnectionInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Device.Net.UWP 2 | { 3 | public class ConnectionInfo 4 | { 5 | public bool CanConnect { get; set; } 6 | public ushort? UsagePage { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Droid/Assets/Fonts/uno-fluentui-assets.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.Droid/Assets/Fonts/uno-fluentui-assets.ttf -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/square150x150logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Assets/square150x150logo.scale-200.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Gtk/Assets/Fonts/uno-fluentui-assets.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Gtk/Assets/Fonts/uno-fluentui-assets.ttf -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Device.Net.UnoSample.Uwp_temporarykey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.UWP/Device.Net.UnoSample.Uwp_temporarykey.pfx -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Resources/Fonts/uno-fluentui-assets.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Resources/Fonts/uno-fluentui-assets.ttf -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Wpf.Host/Assets/Fonts/uno-fluentui-assets.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Wpf.Host/Assets/Fonts/uno-fluentui-assets.ttf -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src/Usb.Net.UWP.Sample/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/unologo.imageset/unoplatform.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/unologo.imageset/unoplatform.jpg -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png -------------------------------------------------------------------------------- /src/Hid.Net/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | 2 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1819:Properties should not return arrays", Justification = "", Scope = "member", Target = "~P:Hid.Net.Report.TransferResult")] 3 | 4 | -------------------------------------------------------------------------------- /src/Hid.Net/Properties.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Runtime.CompilerServices; 3 | 4 | [assembly: InternalsVisibleTo("Device.Net.UnitTests")] 5 | [assembly: InternalsVisibleTo("Device.Net.UWPUnitTests")] 6 | [assembly: InternalsVisibleTo("Hid.Net.UWP")] 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/Device.Net/main/src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /src/Usb.Net/IUsbDevice.cs: -------------------------------------------------------------------------------- 1 | using Device.Net; 2 | 3 | namespace Usb.Net 4 | { 5 | /// 6 | public interface IUsbDevice : IDevice 7 | { 8 | IUsbInterfaceManager UsbInterfaceManager { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Wpf.Host/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.Droid/Resources/values/Strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello World, Click Me! 4 | UnoCrossPlatform 5 | 6 | -------------------------------------------------------------------------------- /src/SerialPort.Net/StopBits.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SerialPort.Net 4 | { 5 | //Is flags correct here? 6 | [Flags] 7 | public enum StopBits 8 | { 9 | None, 10 | One, 11 | Two, 12 | OnePointFive, 13 | } 14 | } -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Droid/Resources/values/Strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello World, Click Me! 4 | Device.Net.UnoSample 5 | 6 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Android/App/BroadcastReceiver.cs: -------------------------------------------------------------------------------- 1 | using Android.Content; 2 | 3 | namespace Android.App 4 | { 5 | public abstract class BroadcastReceiver 6 | { 7 | public abstract void OnReceive(Context? context, Intent? intent); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2c3e50 4 | #1B3147 5 | #3498db 6 | 7 | -------------------------------------------------------------------------------- /src/Device.Net/DeviceEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Device.Net 4 | { 5 | public class DeviceEventArgs : EventArgs 6 | { 7 | public IDevice Device { get; } 8 | 9 | public DeviceEventArgs(IDevice device) => Device = device; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/xml/device_filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Wpf.Host/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2c3e50 4 | #1B3147 5 | #3498db 6 | 7 | -------------------------------------------------------------------------------- /src/Device.Net/Logging/LoggerFactoryExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.Extensions.Logging.Abstractions 2 | { 3 | public static class LoggerFactoryExtensions 4 | { 5 | public static ILogger CreateLogger(this ILoggerFactory loggerFactory) => new NullLogger(loggerFactory); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.UWP/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Device.Net.UWPUnitTests/UnitTestApp.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Flutter/flutnet_thermometer_bridge/lib/exceptions.dart: -------------------------------------------------------------------------------- 1 | // ************************************* 2 | // NOT EDIT THIS FILE * 3 | // ************************************* 4 | 5 | 6 | export 'flutnet/service_model/platform_operation_exception.dart'; 7 | export 'flutnet/data/flutnet_exception.dart'; 8 | -------------------------------------------------------------------------------- /src/Usb.Net.Android/IUsbPermissionBroadcastReceiver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Usb.Net.Android 4 | { 5 | public interface IUsbPermissionBroadcastReceiver 6 | { 7 | bool? IsPermissionGranted { get; } 8 | event EventHandler Received; 9 | void Register(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/Usb.Net/Delegates.cs: -------------------------------------------------------------------------------- 1 | using Device.Net; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | 5 | namespace Usb.Net 6 | { 7 | public delegate Task PerformControlTransferAsync(SetupPacket setupPacket, byte[] buffer, CancellationToken cancellationToken = default); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/Usb.Net/IUsbInterfaceEndpoint.cs: -------------------------------------------------------------------------------- 1 | namespace Usb.Net 2 | { 3 | public interface IUsbInterfaceEndpoint 4 | { 5 | bool IsRead { get; } 6 | bool IsWrite { get; } 7 | bool IsInterrupt { get; } 8 | byte PipeId { get; } 9 | ushort MaxPacketSize { get; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Shared/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/Main.cs: -------------------------------------------------------------------------------- 1 | using AppKit; 2 | 3 | namespace Device.Net.MacOSLibUsbSample 4 | { 5 | static class MainClass 6 | { 7 | static void Main(string[] args) 8 | { 9 | NSApplication.Init(); 10 | NSApplication.Main(args); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Device.Net/LoggingExtensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | 3 | namespace Device.Net 4 | { 5 | internal static class LoggingExtensions 6 | { 7 | public static void LogDataTransfer(this ILogger logger, Trace trace) 8 | => logger?.LogDebug("{trace}", trace); 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/lib/exceptions.dart: -------------------------------------------------------------------------------- 1 | // ************************************* 2 | // NOT EDIT THIS FILE * 3 | // ************************************* 4 | 5 | 6 | export 'flutnet/service_model/platform_operation_exception.dart'; 7 | export 'flutnet/data/flutnet_exception.dart'; 8 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Android/Hardware/Usb/UsbRequest.cs: -------------------------------------------------------------------------------- 1 | using Java.Nio; 2 | 3 | namespace Android.Hardware.Usb 4 | { 5 | public interface UsbRequest 6 | { 7 | bool Initialize(UsbDeviceConnection? connection, UsbEndpoint? endpoint); 8 | bool Queue(ByteBuffer? buffer, int length); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Android/Content/Context.cs: -------------------------------------------------------------------------------- 1 | 2 | using Android.App; 3 | 4 | namespace Android.Content 5 | { 6 | public interface Context 7 | { 8 | Intent? RegisterReceiver(BroadcastReceiver? receiver, IntentFilter? filter); 9 | void UnregisterReceiver(BroadcastReceiver? receiver); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.macOS/Main.cs: -------------------------------------------------------------------------------- 1 | using AppKit; 2 | 3 | namespace Device.Net.UnoSample.macOS 4 | { 5 | static class MainClass 6 | { 7 | static void Main(string[] args) 8 | { 9 | NSApplication.Init(); 10 | NSApplication.SharedApplication.Delegate = new App(); 11 | NSApplication.Main(args); 12 | } 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /src/Device.Net/Windows/FileAccessRights.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Device.Net.Windows 4 | { 5 | [Flags] 6 | #pragma warning disable CA1028 7 | public enum FileAccessRights : uint 8 | #pragma warning restore CA1028 9 | { 10 | None = 0, 11 | GenericRead = 2147483648, 12 | GenericWrite = 1073741824 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/Device.Net/Logging/NullLoggerFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.Extensions.Logging.Abstractions 2 | { 3 | public class NullLoggerFactory : ILoggerFactory 4 | { 5 | public static NullLoggerFactory Instance { get; } = new NullLoggerFactory(); 6 | 7 | public ILogger CreateLogger(string name) => NullLogger.Instance; 8 | } 9 | } 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Usb.Net.Android.Fakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | false 6 | false 7 | Full 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Device.Net/UnsubscribeDisposable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Device.Net 4 | { 5 | public class UnsubscribeDisposable : IDisposable 6 | { 7 | private readonly Action _unsubscribe; 8 | 9 | public UnsubscribeDisposable(Action unsubscribe) => _unsubscribe = unsubscribe; 10 | 11 | public void Dispose() => _unsubscribe(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Flutter/flutnet_thermometer_bridge/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: fba99f6cf9a14512e461e3122c8ddfaa25394e89 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /src/Device.Net/Logging/ILoggerFactory.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member 2 | 3 | namespace Microsoft.Extensions.Logging 4 | { 5 | public interface ILoggerFactory 6 | { 7 | ILogger CreateLogger(string name); 8 | } 9 | } 10 | 11 | #pragma warning restore CS1591 // Missing XML comment for publicly visible type or member 12 | -------------------------------------------------------------------------------- /src/Device.Net/Logging/DummyDisposable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Device.Net 4 | { 5 | internal class DummyDisposable : IDisposable 6 | { 7 | #pragma warning disable CA1816 // Dispose methods should call SuppressFinalize 8 | public void Dispose() 9 | #pragma warning restore CA1816 // Dispose methods should call SuppressFinalize 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: fba99f6cf9a14512e461e3122c8ddfaa25394e89 8 | channel: stable 9 | 10 | project_type: module 11 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.ServiceLibrary/TemperatureChangedArgs.cs: -------------------------------------------------------------------------------- 1 | using Flutnet.ServiceModel; 2 | using System; 3 | 4 | namespace FlutnetThermometer.ServiceLibrary 5 | { 6 | [PlatformData] 7 | public class TemperatureChangedArgs : EventArgs 8 | { 9 | public double Celsius { get; set; } 10 | 11 | public double Fahrenheit { get; set; } 12 | } 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Android/Hardware/Usb/UsbEndpoint.cs: -------------------------------------------------------------------------------- 1 | namespace Android.Hardware.Usb 2 | { 3 | public interface UsbEndpoint 4 | { 5 | int EndpointNumber { get; } 6 | int MaxPacketSize { get; set; } 7 | UsbAddressing Address { get; } 8 | int Attributes { get; } 9 | UsbAddressing Direction { get; } 10 | UsbAddressing Type { get; } 11 | } 12 | } -------------------------------------------------------------------------------- /docfx_project/articles/NuGet.md: -------------------------------------------------------------------------------- 1 | For Hid Devices: 2 | 3 | **Install-Package Hid.Net** 4 | 5 | For Usb Devices on Android, Windows, or UWP: 6 | 7 | **Install-Package Usb.Net** 8 | 9 | For Usb Devices on Linux or MacOS 10 | 11 | **Install-Package Device.Net.LibUsb** 12 | 13 | Device.Net only provides the base interface. This would allow you to create a provider for a new device type like Bluetooth for example. -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: fba99f6cf9a14512e461e3122c8ddfaa25394e89 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer/README.md: -------------------------------------------------------------------------------- 1 | # flutnet_thermometer 2 | 3 | A new flutter module project. 4 | 5 | ## Getting Started 6 | 7 | For help getting started with Flutter, view our online 8 | [documentation](https://flutter.dev/). 9 | 10 | For instructions integrating Flutter modules to your existing applications, 11 | see the [add-to-app documentation](https://flutter.dev/docs/development/add-to-app). 12 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Android/Hardware/Usb/UsbDevice.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Android.Hardware.Usb 4 | { 5 | public interface UsbDevice : IDisposable 6 | { 7 | int DeviceId { get; } 8 | string DeviceName { get; } 9 | int InterfaceCount { get; } 10 | int ProductId { get; } 11 | int VendorId { get; } 12 | UsbInterface GetInterface(int interfaceNumber); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Flutter/flutnet_thermometer_bridge/lib/index.dart: -------------------------------------------------------------------------------- 1 | // ************************************* 2 | // NOT EDIT THIS FILE * 3 | // ************************************* 4 | 5 | library flutnet_thermometer_bridge; 6 | 7 | export 'flutnet_thermometer/service_library/temperature_changed_args.dart'; 8 | export 'flutnet/data/flutnet_error_code.dart'; 9 | export 'flutnet_thermometer/service_library/thermometer_service.dart'; 10 | -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /src/Device.Net.Reactive/Device.Net.Reactive.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | false 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Android/App/PendingIntent.cs: -------------------------------------------------------------------------------- 1 | using Android.Content; 2 | 3 | namespace Android.App 4 | { 5 | public interface PendingIntent 6 | { 7 | #pragma warning disable IDE0060 // Remove unused parameter 8 | public static PendingIntent? GetBroadcast(Context? context, int requestCode, Intent? intent, PendingIntentFlags flags) => default; 9 | #pragma warning restore IDE0060 // Remove unused parameter 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Usb.Net.Android/AndroidFactory.cs: -------------------------------------------------------------------------------- 1 | using Android.Content; 2 | using Android.Hardware.Usb; 3 | 4 | namespace Usb.Net.Android 5 | { 6 | public class AndroidFactory : IAndroidFactory 7 | { 8 | public Intent CreateIntent(string action) => new Intent(action); 9 | public IntentFilter CreateIntentFilter(string action) => new IntentFilter(action); 10 | public UsbRequest CreateUsbRequest() => new UsbRequest(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/Usb.Net/Windows/WinUsbApiCalls.POLICY_TYPE.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable UnusedMember.Global 2 | // ReSharper disable InconsistentNaming 3 | namespace Usb.Net.Windows 4 | { 5 | internal enum POLICY_TYPE 6 | { 7 | SHORT_PACKET_TERMINATE = 1, 8 | AUTO_CLEAR_STALL, 9 | PIPE_TRANSFER_TIMEOUT, 10 | IGNORE_SHORT_PACKETS, 11 | ALLOW_PARTIAL_READS, 12 | AUTO_FLUSH, 13 | RAW_IO 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/lib/index.dart: -------------------------------------------------------------------------------- 1 | // ************************************* 2 | // NOT EDIT THIS FILE * 3 | // ************************************* 4 | 5 | library flutnet_thermometer_bridge; 6 | 7 | export 'flutnet_thermometer/service_library/temperature_changed_args.dart'; 8 | export 'flutnet/data/flutnet_error_code.dart'; 9 | export 'flutnet_thermometer/service_library/thermometer_service.dart'; 10 | -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Android/Hardware/Usb/UsbInterface.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Android.Hardware.Usb 4 | { 5 | public interface UsbInterface : IDisposable 6 | { 7 | int Id { get; } 8 | int EndpointCount { get; } 9 | UsbClass InterfaceClass { get; } 10 | UsbClass InterfaceSubclass { get; } 11 | string Name { get; } 12 | UsbEndpoint GetEndpoint(int endpointNumber); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Device.Net/Windows/SpDeviceInterfaceDetailData.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | // ReSharper disable FieldCanBeMadeReadOnly.Global 3 | 4 | namespace Device.Net.Windows 5 | { 6 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 7 | internal struct SpDeviceInterfaceDetailData 8 | { 9 | public int CbSize; 10 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] 11 | public string DevicePath; 12 | } 13 | } -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.Droid/Resources/values/Styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Droid/Resources/values/Styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /src/Device.Net/Logging/ILoggerProvider.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member 2 | 3 | 4 | namespace Device.Net.Logging 5 | { 6 | #pragma warning disable CA1040 // Avoid empty interfaces 7 | public interface ILoggerProvider 8 | #pragma warning restore CA1040 // Avoid empty interfaces 9 | { 10 | } 11 | } 12 | 13 | 14 | #pragma warning restore CS1591 // Missing XML comment for publicly visible type or member 15 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Flutter", 9 | "request": "launch", 10 | "type": "dart" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Wpf.Host/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace Device.Net.UnoSample.WPF.Host 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Device.Net/Exceptions/AsyncException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Device.Net.Exceptions 4 | { 5 | public class AsyncException : Exception 6 | { 7 | public AsyncException(string message) : base(message) 8 | { 9 | } 10 | 11 | public AsyncException() 12 | { 13 | } 14 | 15 | public AsyncException(string message, Exception innerException) : base(message, innerException) 16 | { 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Droid/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Views; 3 | using Windows.UI.Xaml; 4 | 5 | namespace Device.Net.UnoSample.Droid 6 | { 7 | [Activity( 8 | MainLauncher = true, 9 | ConfigurationChanges = Uno.UI.ActivityHelper.AllConfigChanges, 10 | WindowSoftInputMode = SoftInput.AdjustPan | SoftInput.StateHidden 11 | )] 12 | public class MainActivity : ApplicationActivity 13 | { 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/Device.Net/Exceptions/DeviceException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Device.Net.Exceptions 4 | { 5 | public class DeviceException : Exception 6 | { 7 | public DeviceException(string message) : base(message) 8 | { 9 | } 10 | 11 | public DeviceException() 12 | { 13 | } 14 | 15 | public DeviceException(string message, Exception innerException) : base(message, innerException) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Device.Net/Windows/SpDeviceInfoData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | // ReSharper disable MemberCanBePrivate.Global 4 | // ReSharper disable FieldCanBeMadeReadOnly.Global 5 | 6 | namespace Device.Net.Windows 7 | { 8 | [StructLayout(LayoutKind.Sequential)] 9 | internal struct SpDeviceInfoData 10 | { 11 | public uint CbSize; 12 | public Guid ClassGuid; 13 | public uint DevInst; 14 | public IntPtr Reserved; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.Droid/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Views; 3 | 4 | namespace UnoCrossPlatform.Droid 5 | { 6 | [Activity( 7 | MainLauncher = true, 8 | ConfigurationChanges = Uno.UI.ActivityHelper.AllConfigChanges, 9 | WindowSoftInputMode = SoftInput.AdjustPan | SoftInput.StateHidden 10 | )] 11 | public class MainActivity : Windows.UI.Xaml.ApplicationActivity 12 | { 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Wpf.Host/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/SerialPort.Net/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | 2 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA1816:Dispose methods should call SuppressFinalize", Justification = "", Scope = "member", Target = "~M:SerialPort.Net.Windows.WindowsSerialPortDevice.Dispose")] 3 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1063:Implement IDisposable Correctly", Justification = "", Scope = "member", Target = "~M:SerialPort.Net.Windows.WindowsSerialPortDevice.Dispose")] 4 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | // This file is used by Code Analysis to maintain SuppressMessage 2 | // attributes that are applied to this project. 3 | // Project-level suppressions either have no target or are given 4 | // a specific target and scoped to a namespace, type, member, etc. 5 | 6 | using System.Diagnostics.CodeAnalysis; 7 | 8 | [assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "", Scope = "type", Target = "~T:Android.Hardware.Usb.UsbRequest")] 9 | -------------------------------------------------------------------------------- /src/Usb.Net/ControlTransferException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Usb.Net 4 | { 5 | public class ControlTransferException : Exception 6 | { 7 | public ControlTransferException(string message) : base(message) 8 | { 9 | } 10 | 11 | public ControlTransferException(string message, Exception innerException) : base(message, innerException) 12 | { 13 | } 14 | 15 | public ControlTransferException() 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Android/Hardware/Usb/UsbManager.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | using Android.App; 4 | using System.Collections.Generic; 5 | 6 | namespace Android.Hardware.Usb 7 | { 8 | public interface UsbManager 9 | { 10 | public const string ExtraPermissionGranted = "permission"; 11 | IDictionary? DeviceList { get; } 12 | UsbDeviceConnection OpenDevice(UsbDevice usbDevice); 13 | void RequestPermission(UsbDevice? device, PendingIntent? pi); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.UWP/DontDeleteMe.xaml.cs: -------------------------------------------------------------------------------- 1 | using Windows.UI.Xaml.Controls; 2 | 3 | // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 4 | 5 | namespace UnoCrossPlatform 6 | { 7 | /// 8 | /// An empty page that can be used on its own or navigated to within a Frame. 9 | /// 10 | public sealed partial class DontDeleteMe : Page 11 | { 12 | public DontDeleteMe() => InitializeComponent(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Java/Nio/Buffer.cs: -------------------------------------------------------------------------------- 1 | namespace Java.Nio 2 | { 3 | // 4 | // Summary: 5 | // A buffer is a list of elements of a specific primitive type. 6 | // 7 | // Remarks: 8 | // Android platform documentation 9 | // Portions of this page are modifications based on work created and shared by the 10 | // Android Open Source Project and used according to terms described in the Creative 11 | // Commons 2.5 Attribution License. 12 | public interface Buffer 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Device.Net.Reactive/Delegates.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | 5 | namespace Device.Net 6 | { 7 | public delegate void DevicesNotify(IReadOnlyCollection connectedDevices); 8 | public delegate void DeviceNotify(ConnectedDeviceDefinition connectedDevice); 9 | public delegate void NotifyDeviceException(ConnectedDeviceDefinition connectedDevice, Exception exception); 10 | public delegate Task> GetConnectedDevicesAsync(); 11 | } 12 | -------------------------------------------------------------------------------- /src/Device.Net/Delegates.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Threading; 4 | using System.Threading.Tasks; 5 | 6 | namespace Device.Net 7 | { 8 | public delegate Task> GetConnectedDeviceDefinitionsAsync(CancellationToken cancellationToken = default); 9 | public delegate ConnectedDeviceDefinition GetDeviceDefinition(string deviceId, Guid classGuid); 10 | public delegate Task GetDeviceAsync(ConnectedDeviceDefinition deviceId, CancellationToken cancellationToken = default); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Build.bat: -------------------------------------------------------------------------------- 1 | git clean -x -f -d 2 | 3 | "c:\temp\nuget" restore src/Device.Net.Pipelines.sln 4 | 5 | dotnet test src/Device.Net.UnitTests/Device.Net.UnitTests.csproj --filter TestCategory!=NotPipelineReady 6 | 7 | msbuild src/Device.Net.Pipelines.sln /property:Configuration=Release 8 | 9 | "c:\temp\nuget" pack Build/NuSpecs/Device.Net.nuspec 10 | "c:\temp\nuget" pack Build/NuSpecs/Device.Net.LibUsb.nuspec 11 | "c:\temp\nuget" pack Build/NuSpecs/Hid.Net.nuspec 12 | "c:\temp\nuget" pack Build/NuSpecs/SerialPort.Net.nuspec 13 | "c:\temp\nuget" pack Build/NuSpecs/Usb.Net.nuspec 14 | 15 | -------------------------------------------------------------------------------- /src/Device.Net.Reactive/IDeviceManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace Device.Net 5 | { 6 | /// 7 | /// This interface is a work in progress. It is not production ready. 8 | /// 9 | public interface IDeviceManager 10 | { 11 | void QueueRequest(IRequest request); 12 | 13 | Task WriteAndReadAsync(IRequest request, Func convertFunc); 14 | 15 | void SelectDevice(ConnectedDeviceDefinition connectedDevice); 16 | 17 | void Start(); 18 | } 19 | } -------------------------------------------------------------------------------- /.github/workflows/dotnet-core.yml: -------------------------------------------------------------------------------- 1 | name: .NET Core 2 | 3 | on: 4 | push: 5 | branches: [ Releases/4.0.0/master ] 6 | pull_request: 7 | branches: [ Releases/4.0.0/master ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Setup .NET Core 17 | uses: actions/setup-dotnet@v1 18 | with: 19 | dotnet-version: 3.1.301 20 | - name: Install dependencies 21 | run: dotnet restore 22 | - name: Build 23 | run: dotnet build --configuration Release --no-restore 24 | 25 | -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.UWP/DontDeleteMe.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Usb.Net/Windows/WINUSB_PIPE_INFORMATION.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | // ReSharper disable MemberCanBePrivate.Global 3 | // ReSharper disable FieldCanBeMadeReadOnly.Global 4 | 5 | #pragma warning disable CA1707 // Identifiers should not contain underscores 6 | 7 | namespace Usb.Net.Windows 8 | { 9 | [StructLayout(LayoutKind.Sequential)] 10 | internal struct WINUSB_PIPE_INFORMATION 11 | { 12 | public USBD_PIPE_TYPE PipeType; 13 | public byte PipeId; 14 | public ushort MaximumPacketSize; 15 | public byte Interval; 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/lib/flutnet/data/flutnet_error_code.dart: -------------------------------------------------------------------------------- 1 | // ************************************* 2 | // NOT EDIT THIS FILE * 3 | // ************************************* 4 | 5 | enum FlutnetErrorCode { 6 | OperationNotImplemented, 7 | OperationArgumentCountMismatch, 8 | InvalidOperationArguments, 9 | OperationArgumentParsingError, 10 | OperationFailed, 11 | OperationCanceled, 12 | EnvironmentNotInitialized, 13 | AppKeyErrorBadFormat, 14 | AppKeyErrorApplicationIdMismatch, 15 | AppKeyErrorUnsupportedLibraryVersion, 16 | TrialCallsExceeded, 17 | } 18 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Wpf.Host/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Flutter/flutnet_thermometer_bridge/README.md: -------------------------------------------------------------------------------- 1 | # flutnet_thermometer_bridge 2 | 3 | Auto-generated Flutter package that acts as a proxy between Dart code and native (Xamarin) code. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Dart 8 | [package](https://flutter.dev/developing-packages/), 9 | a library module containing code that can be shared easily across 10 | multiple Flutter or Dart projects. 11 | 12 | For help getting started with Flutter, view our 13 | [online documentation](https://flutter.dev/docs), which offers tutorials, 14 | samples, guidance on mobile development, and a full API reference. 15 | -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform/MainPage.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Device.Net.LibUsb/ExtensionMethods.cs: -------------------------------------------------------------------------------- 1 | using LibUsbDotNet.Main; 2 | using System; 3 | 4 | namespace Device.Net.LibUsb 5 | { 6 | public static class ExtensionMethods 7 | { 8 | public static ConnectedDeviceDefinition ToConnectedDevice(this UsbRegistry usbRegistry) 9 | => usbRegistry == null ? throw new ArgumentNullException(nameof(usbRegistry)) : 10 | new ConnectedDeviceDefinition( 11 | usbRegistry.DevicePath, 12 | vendorId: (uint)usbRegistry.Vid, 13 | productId: (uint)usbRegistry.Pid, 14 | deviceType: DeviceType.Usb); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Flutter/flutnet_thermometer_bridge/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutnet_thermometer_bridge 2 | description: Auto-generated Flutter package that acts as a proxy between Dart code and native (Xamarin) code. 3 | version: 0.0.1 4 | author: 5 | homepage: 6 | environment: 7 | sdk: ">=2.6.0 <3.0.0" 8 | flutter: ">=1.17.0 <2.0.0" 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | json_annotation: ^3.0.1 13 | intl: ^0.15.7 14 | web_socket_channel: ^1.1.0 15 | synchronized: ^2.2.0+2 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | build_runner: ^1.10.0 20 | json_serializable: ^3.3.0 21 | flutter: 22 | ... 23 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Shared/MainPage.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Device.Net/IDeviceListener.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | 5 | namespace Device.Net 6 | { 7 | public interface IDeviceListener : IDisposable 8 | { 9 | event EventHandler DeviceDisconnected; 10 | event EventHandler DeviceInitialized; 11 | 12 | Task CheckForDevicesAsync(CancellationToken cancellationToken = default); 13 | void Start(); 14 | #pragma warning disable CA1716 // Identifiers should not match keywords 15 | void Stop(); 16 | #pragma warning restore CA1716 // Identifiers should not match keywords 17 | } 18 | } -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/README.md: -------------------------------------------------------------------------------- 1 | # flutnet_thermometer_bridge 2 | 3 | Auto-generated Flutter package that acts as a proxy between Dart code and native (Xamarin) code. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Dart 8 | [package](https://flutter.dev/developing-packages/), 9 | a library module containing code that can be shared easily across 10 | multiple Flutter or Dart projects. 11 | 12 | For help getting started with Flutter, view our 13 | [online documentation](https://flutter.dev/docs), which offers tutorials, 14 | samples, guidance on mobile development, and a full API reference. 15 | -------------------------------------------------------------------------------- /src/Usb.Net.Android/IAndroidFactory.cs: -------------------------------------------------------------------------------- 1 | using Android.Content; 2 | using Android.Hardware.Usb; 3 | 4 | namespace Usb.Net.Android 5 | { 6 | #pragma warning disable CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. 7 | public interface IAndroidFactory 8 | { 9 | UsbRequest CreateUsbRequest(); 10 | IntentFilter CreateIntentFilter(string? action); 11 | Intent CreateIntent(string? action); 12 | } 13 | #pragma warning restore CS8632 // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. 14 | } -------------------------------------------------------------------------------- /src/Device.Net/Exceptions/ApiException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Device.Net.Exceptions 5 | { 6 | public class ApiException : Exception 7 | { 8 | public ApiException() 9 | { 10 | } 11 | 12 | public ApiException(string message) : base(message) 13 | { 14 | } 15 | 16 | public ApiException(string message, Exception innerException) : base(message, innerException) 17 | { 18 | } 19 | 20 | protected ApiException(SerializationInfo info, StreamingContext context) : base(info, context) 21 | { 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Device.Net/Properties.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Runtime.CompilerServices; 3 | [assembly: InternalsVisibleTo("Device.Net.LibUsb")] 4 | [assembly: InternalsVisibleTo("Device.Net.UWP")] 5 | [assembly: InternalsVisibleTo("Device.Net.UnitTests")] 6 | [assembly: InternalsVisibleTo("Device.Net.UWPUnitTests")] 7 | [assembly: InternalsVisibleTo("SerialPort.Net")] 8 | [assembly: InternalsVisibleTo("Usb.Net")] 9 | [assembly: InternalsVisibleTo("Hid.Net")] 10 | [assembly: InternalsVisibleTo("Hid.Net.UWP")] 11 | [assembly: InternalsVisibleTo("Usb.Net.UWP")] 12 | [assembly: InternalsVisibleTo("Usb.Net.Android.Standard")] 13 | [assembly: InternalsVisibleTo("Usb.Net.Android")] -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutnet_thermometer_bridge 2 | description: Auto-generated Flutter package that acts as a proxy between Dart code and native (Xamarin) code. 3 | version: 0.0.1 4 | author: 5 | homepage: 6 | environment: 7 | sdk: ">=2.6.0 <3.0.0" 8 | flutter: ">=1.17.0 <2.0.0" 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | json_annotation: ^3.0.1 13 | intl: ^0.15.7 14 | web_socket_channel: ^1.1.0 15 | synchronized: ^2.2.0+2 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | build_runner: ^1.10.0 20 | json_serializable: ^3.3.0 21 | flutter: 22 | ... 23 | -------------------------------------------------------------------------------- /src/Device.Net.UnitTests/MockClasses/MockUsbDevice.cs: -------------------------------------------------------------------------------- 1 | //using Microsoft.Extensions.Logging; 2 | 3 | //namespace Device.Net.UnitTests 4 | //{ 5 | // public class MockUsbDevice : MockDeviceBase 6 | // { 7 | // public const uint ProductId = 2; 8 | // public const uint VendorId = 2; 9 | // public const string MockedDeviceId = "321"; 10 | 11 | // public MockUsbDevice(string deviceId, ILogger logger) : base(deviceId, logger) 12 | // { 13 | // ConnectedDeviceDefinition = new ConnectedDeviceDefinition(DeviceId) { ProductId = ProductId, VendorId = VendorId, DeviceType = DeviceType.Usb }; 14 | // } 15 | // } 16 | //} 17 | 18 | -------------------------------------------------------------------------------- /src/Device.Net/Windows/CommTimeouts.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | // ReSharper disable MemberCanBePrivate.Global 3 | // ReSharper disable FieldCanBeMadeReadOnly.Global 4 | 5 | #pragma warning disable CA1815 // Override equals and operator equals on value types 6 | 7 | namespace Device.Net.Windows 8 | { 9 | [StructLayout(LayoutKind.Sequential)] 10 | public struct CommTimeouts 11 | { 12 | public uint ReadIntervalTimeout; 13 | public uint ReadTotalTimeoutMultiplier; 14 | public uint ReadTotalTimeoutConstant; 15 | public uint WriteTotalTimeoutMultiplier; 16 | public uint WriteTotalTimeoutConstant; 17 | } 18 | } -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform/DispatchingExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Windows.UI.Core; 4 | 5 | #if NETFX_CORE 6 | using Windows.ApplicationModel.Core; 7 | #endif 8 | 9 | namespace UnoCrossPlatform 10 | { 11 | public static class DispatchingExtensions 12 | { 13 | public static async Task RunOnDispatcher(Action action) => 14 | #if NETFX_CORE 15 | await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => action()); 16 | #else 17 | await CoreDispatcher.Main.RunAsync(CoreDispatcherPriority.Normal, () => action()); 18 | #endif 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Device.Net.MacOSLibUsbSample/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using AppKit; 2 | using Foundation; 3 | 4 | namespace Device.Net.MacOSLibUsbSample 5 | { 6 | [Register("AppDelegate")] 7 | public class AppDelegate : NSApplicationDelegate 8 | { 9 | public AppDelegate() 10 | { 11 | } 12 | 13 | public override void DidFinishLaunching(NSNotification notification) 14 | { 15 | // Insert code here to initialize your application 16 | } 17 | 18 | public override void WillTerminate(NSNotification notification) 19 | { 20 | // Insert code here to tear down your application 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Device.Net/Windows/SpDeviceInterfaceData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | // ReSharper disable MemberCanBePrivate.Global 4 | // ReSharper disable FieldCanBeMadeReadOnly.Global 5 | 6 | namespace Device.Net.Windows 7 | { 8 | [StructLayout(LayoutKind.Sequential)] 9 | #pragma warning disable CA1815 // Override equals and operator equals on value types 10 | internal struct SpDeviceInterfaceData 11 | #pragma warning restore CA1815 // Override equals and operator equals on value types 12 | { 13 | public uint CbSize; 14 | public Guid InterfaceClassGuid; 15 | public uint Flags; 16 | public IntPtr Reserved; 17 | } 18 | } -------------------------------------------------------------------------------- /src/Usb.Net/Windows/WindowsUsbExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Usb.Net.Windows 4 | { 5 | public static class WindowsUsbExtensions 6 | { 7 | public static WINUSB_SETUP_PACKET ToWindowsSetupPacket(this SetupPacket setupPacket) 8 | => setupPacket == null ? throw new ArgumentNullException(nameof(setupPacket)) : new WINUSB_SETUP_PACKET 9 | { 10 | Index = setupPacket.Length, 11 | Length = setupPacket.Length, 12 | Request = setupPacket.Request, 13 | RequestType = setupPacket.RequestType.ToByte(), 14 | Value = setupPacket.Value 15 | }; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Shared/DispatchingExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Windows.UI.Core; 4 | 5 | #if WINDOWS_UWP 6 | using Windows.ApplicationModel.Core; 7 | #endif 8 | 9 | namespace Device.Net.UnoSample 10 | { 11 | public static class DispatchingExtensions 12 | { 13 | public static async Task RunOnDispatcher(Action action) => 14 | #if WINDOWS_UWP 15 | await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => action()); 16 | #else 17 | await CoreDispatcher.Main.RunAsync(CoreDispatcherPriority.Normal, () => action()); 18 | #endif 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Device.Net/Exceptions/ValidationException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Device.Net.Exceptions 5 | { 6 | public class ValidationException : Exception 7 | { 8 | public ValidationException() 9 | { 10 | } 11 | 12 | public ValidationException(string message) : base(message) 13 | { 14 | } 15 | 16 | public ValidationException(string message, Exception innerException) : base(message, innerException) 17 | { 18 | } 19 | 20 | protected ValidationException(SerializationInfo info, StreamingContext context) : base(info, context) 21 | { 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Usb.Net/Windows/WinUsbApiCalls.USBD_PIPE_TYPE.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable MemberCanBePrivate.Global 2 | // ReSharper disable FieldCanBeMadeReadOnly.Global 3 | // ReSharper disable UnusedMember.Global 4 | // ReSharper disable InconsistentNaming 5 | // ReSharper disable IdentifierTypo 6 | 7 | #pragma warning disable CA1707 // Identifiers should not contain underscores 8 | 9 | namespace Usb.Net.Windows 10 | { 11 | internal enum USBD_PIPE_TYPE 12 | { 13 | UsbdPipeTypeControl, 14 | UsbdPipeTypeIsochronous, 15 | UsbdPipeTypeBulk, 16 | UsbdPipeTypeInterrupt 17 | } 18 | } 19 | 20 | #pragma warning restore CA1707 // Identifiers should not contain underscores 21 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Gtk/Program.cs: -------------------------------------------------------------------------------- 1 | using GLib; 2 | using System; 3 | using Uno.UI.Runtime.Skia; 4 | 5 | namespace Device.Net.UnoSample.Skia.Gtk 6 | { 7 | class Program 8 | { 9 | static void Main(string[] args) 10 | { 11 | ExceptionManager.UnhandledException += delegate (UnhandledExceptionArgs expArgs) 12 | { 13 | Console.WriteLine("GLIB UNHANDLED EXCEPTION" + expArgs.ExceptionObject.ToString()); 14 | expArgs.ExitApplication = true; 15 | }; 16 | 17 | var host = new GtkHost(() => new App(), args); 18 | 19 | host.Run(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Usb.Net.Android.Fakes/Android/Hardware/Usb/UsbDeviceConnection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace Android.Hardware.Usb 5 | { 6 | #pragma warning disable IDE1006 // Naming Styles 7 | public interface UsbDeviceConnection : IDisposable 8 | #pragma warning restore IDE1006 // Naming Styles 9 | { 10 | void Close(); 11 | bool ClaimInterface(UsbInterface usbInterface, bool force); 12 | Task RequestWaitAsync(); 13 | Task RequestWaitAsync(long timeout); 14 | int ControlTransfer(UsbAddressing requestType, int request, int value, int index, byte[]? buffer, int length, int timeout); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutnet_thermometer 2 | description: A new flutter module project. 3 | version: 1.0.0+1 4 | environment: 5 | sdk: ">=2.1.0 <3.0.0" 6 | dependencies: 7 | flutter: 8 | sdk: flutter 9 | cupertino_icons: ^0.1.3 10 | flutter_thermometer: ^1.0.0 11 | dev_dependencies: 12 | flutter_test: 13 | sdk: flutter 14 | flutnet_thermometer_bridge: 15 | path: ../flutnet_thermometer_bridge 16 | flutter: 17 | uses-material-design: true 18 | assets: 19 | - assets/ 20 | module: 21 | androidX: true 22 | androidPackage: com.flutnet.flutnet_thermometer 23 | iosBundleIdentifier: com.flutnet.flutnetThermometer 24 | ... 25 | -------------------------------------------------------------------------------- /src/Device.Net/Trace.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable MemberCanBePrivate.Global 2 | namespace Device.Net 3 | { 4 | public class Trace 5 | { 6 | public Trace(bool isWrite, TransferResult transferResult) 7 | { 8 | IsWrite = isWrite; 9 | TransferResult = transferResult; 10 | } 11 | 12 | #pragma warning disable CA1819 // Properties should not return arrays 13 | public TransferResult TransferResult { get; } 14 | #pragma warning restore CA1819 // Properties should not return arrays 15 | public bool IsWrite { get; } 16 | 17 | public override string ToString() => $"Physical {(IsWrite ? "Write" : "Read")} - {TransferResult}"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Device.Net.UWPUnitTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("Device.Net.UWPUnitTests")] 5 | [assembly: AssemblyDescription("")] 6 | [assembly: AssemblyConfiguration("")] 7 | [assembly: AssemblyCompany("")] 8 | [assembly: AssemblyProduct("Device.Net.UWPUnitTests")] 9 | [assembly: AssemblyCopyright("Copyright © 2019")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | [assembly: AssemblyMetadata("TargetPlatform", "UAP")] 13 | 14 | // [assembly: AssemblyVersion("1.0.*")] 15 | [assembly: AssemblyVersion("1.0.0.0")] 16 | [assembly: AssemblyFileVersion("1.0.0.0")] 17 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /src/Device.Net/Exceptions/NotInitializedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Device.Net.Exceptions 5 | { 6 | public class NotInitializedException : Exception 7 | { 8 | public NotInitializedException() 9 | { 10 | } 11 | 12 | public NotInitializedException(string message) : base(message) 13 | { 14 | } 15 | 16 | public NotInitializedException(string message, Exception innerException) : base(message, innerException) 17 | { 18 | } 19 | 20 | protected NotInitializedException(SerializationInfo info, StreamingContext context) : base(info, context) 21 | { 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | Latest 5 | true 6 | true 7 | true 8 | true 9 | true 10 | latest 11 | true 12 | true 13 | 4.2.1 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | .idea/ 8 | .vagrant/ 9 | .sconsign.dblite 10 | .svn/ 11 | 12 | *.swp 13 | profile 14 | 15 | DerivedData/ 16 | 17 | .generated/ 18 | 19 | *.pbxuser 20 | *.mode1v3 21 | *.mode2v3 22 | *.perspectivev3 23 | 24 | !default.pbxuser 25 | !default.mode1v3 26 | !default.mode2v3 27 | !default.perspectivev3 28 | 29 | xcuserdata 30 | 31 | *.moved-aside 32 | 33 | *.pyc 34 | *sync/ 35 | Icon? 36 | .tags* 37 | 38 | build/ 39 | .android/ 40 | .ios/ 41 | .flutter-plugins 42 | .flutter-plugins-dependencies 43 | 44 | # Symbolication related 45 | app.*.symbols 46 | 47 | # Obfuscation related 48 | app.*.map.json 49 | -------------------------------------------------------------------------------- /src/Usb.Net/Windows/WinUsbApiCalls.USB_DEVICE_SPEED.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable MemberCanBePrivate.Global 2 | // ReSharper disable FieldCanBeMadeReadOnly.Global 3 | // ReSharper disable UnusedMember.Global 4 | // ReSharper disable InconsistentNaming 5 | 6 | #pragma warning disable CA1008 // Enums should have zero value 7 | #pragma warning disable CA1707 // Identifiers should not contain underscores 8 | 9 | namespace Usb.Net.Windows 10 | { 11 | internal enum USB_DEVICE_SPEED 12 | { 13 | UsbLowSpeed = 1, 14 | UsbFullSpeed, 15 | UsbHighSpeed 16 | } 17 | } 18 | 19 | #pragma warning restore CA1008 // Enums should have zero value 20 | #pragma warning restore CA1707 // Identifiers should not contain underscores -------------------------------------------------------------------------------- /src/Device.Net/Logging/EventId.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable CA1815 // Override equals and operator equals on value types 2 | #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member 3 | 4 | namespace Microsoft.Extensions.Logging 5 | { 6 | public readonly struct EventId 7 | { 8 | public EventId(int id, string name = null) 9 | { 10 | Id = id; 11 | Name = name; 12 | } 13 | 14 | public int Id { get; } 15 | public string Name { get; } 16 | } 17 | } 18 | 19 | #pragma warning restore CS1591 // Missing XML comment for publicly visible type or member 20 | #pragma warning restore CA1815 // Override equals and operator equals on value types 21 | -------------------------------------------------------------------------------- /src/Samples/UnoPlatform/UnoCrossPlatform.Droid/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Droid/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); -------------------------------------------------------------------------------- /src/Usb.Net/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | 2 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "", Scope = "member", Target = "~P:Usb.Net.UsbInterfaceBase.ReadBufferSize")] 3 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "", Scope = "member", Target = "~P:Usb.Net.UsbInterfaceBase.WriteBufferSize")] 4 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "", Scope = "member", Target = "~P:Usb.Net.Windows.WindowsUsbInterfaceEndpoint.MaxPacketSize")] 5 | 6 | -------------------------------------------------------------------------------- /src/Device.Net.UnitTests/MockClasses/MockHidDevice.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | 3 | namespace Device.Net.UnitTests 4 | { 5 | public class MockHidDevice : MockDeviceBase 6 | { 7 | public const uint ProductId = 1; 8 | public const uint VendorId = 1; 9 | public const string MockedDeviceId = "123"; 10 | 11 | public MockHidDevice(string deviceId, ILoggerFactory loggerFactory, ILogger logger) : base(deviceId, loggerFactory, logger) => ConnectedDeviceDefinition = new ConnectedDeviceDefinition 12 | ( 13 | DeviceId, 14 | DeviceType.Hid, 15 | productId: ProductId, 16 | vendorId: VendorId 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/layout/content_main.axml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/lib/flutnet/service_model/platform_operation_exception.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'platform_operation_exception.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | PlatformOperationException _$PlatformOperationExceptionFromJson(Map json) { 10 | return PlatformOperationException( 11 | message: json['Message'] as String, 12 | ); 13 | } 14 | 15 | Map _$PlatformOperationExceptionToJson( 16 | PlatformOperationException instance) => 17 | { 18 | 'Message': instance.message, 19 | }; 20 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/lib/flutnet_thermometer/service_library/generated/cmd_thermometer_service_stop_monitoring.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'cmd_thermometer_service_stop_monitoring.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CmdThermometerServiceStopMonitoring 10 | _$CmdThermometerServiceStopMonitoringFromJson(Map json) { 11 | return CmdThermometerServiceStopMonitoring(); 12 | } 13 | 14 | Map _$CmdThermometerServiceStopMonitoringToJson( 15 | CmdThermometerServiceStopMonitoring instance) => 16 | {}; 17 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/lib/flutnet_thermometer/service_library/generated/res_thermometer_service_stop_monitoring.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'res_thermometer_service_stop_monitoring.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ResThermometerServiceStopMonitoring 10 | _$ResThermometerServiceStopMonitoringFromJson(Map json) { 11 | return ResThermometerServiceStopMonitoring(); 12 | } 13 | 14 | Map _$ResThermometerServiceStopMonitoringToJson( 15 | ResThermometerServiceStopMonitoring instance) => 16 | {}; 17 | -------------------------------------------------------------------------------- /src/Hid.Net/Windows/HidAttributes.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | // ReSharper disable FieldCanBeMadeReadOnly.Global 3 | // ReSharper disable MemberCanBePrivate.Global 4 | 5 | namespace Hid.Net.Windows 6 | { 7 | [StructLayout(LayoutKind.Sequential)] 8 | #pragma warning disable CA1815 // Override equals and operator equals on value types 9 | internal struct HidAttributes 10 | #pragma warning restore CA1815 // Override equals and operator equals on value types 11 | { 12 | #pragma warning disable CA1051 // Do not declare visible instance fields 13 | public int Size; 14 | public short VendorId; 15 | public short ProductId; 16 | public short VersionNumber; 17 | #pragma warning restore CA1051 // Do not declare visible instance fields 18 | } 19 | } -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/lib/flutnet_thermometer/service_library/generated/cmd_thermometer_service_start_monitoring.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'cmd_thermometer_service_start_monitoring.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CmdThermometerServiceStartMonitoring 10 | _$CmdThermometerServiceStartMonitoringFromJson(Map json) { 11 | return CmdThermometerServiceStartMonitoring(); 12 | } 13 | 14 | Map _$CmdThermometerServiceStartMonitoringToJson( 15 | CmdThermometerServiceStartMonitoring instance) => 16 | {}; 17 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/lib/flutnet_thermometer/service_library/generated/res_thermometer_service_start_monitoring.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'res_thermometer_service_start_monitoring.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ResThermometerServiceStartMonitoring 10 | _$ResThermometerServiceStartMonitoringFromJson(Map json) { 11 | return ResThermometerServiceStartMonitoring(); 12 | } 13 | 14 | Map _$ResThermometerServiceStartMonitoringToJson( 15 | ResThermometerServiceStartMonitoring instance) => 16 | {}; 17 | -------------------------------------------------------------------------------- /src/Device.Net.LibUsb/ReadEndpoint.cs: -------------------------------------------------------------------------------- 1 | using LibUsbDotNet; 2 | using Usb.Net; 3 | 4 | namespace Device.Net.LibUsb 5 | { 6 | public class ReadEndpoint : IUsbInterfaceEndpoint 7 | { 8 | public UsbEndpointReader UsbEndpointReader { get; } 9 | 10 | public ReadEndpoint(UsbEndpointReader usbEndpointReader, ushort? maxPacketSize) 11 | { 12 | UsbEndpointReader = usbEndpointReader; 13 | 14 | if (maxPacketSize.HasValue) MaxPacketSize = maxPacketSize.Value; 15 | } 16 | 17 | public bool IsRead => true; 18 | 19 | public bool IsWrite => false; 20 | 21 | public bool IsInterrupt => false; 22 | 23 | public byte PipeId => UsbEndpointReader.EpNum; 24 | 25 | public ushort MaxPacketSize { get; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Device.Net.LibUsb/WriteEndpoint.cs: -------------------------------------------------------------------------------- 1 | using LibUsbDotNet; 2 | using Usb.Net; 3 | 4 | namespace Device.Net.LibUsb 5 | { 6 | public class WriteEndpoint : IUsbInterfaceEndpoint 7 | { 8 | public UsbEndpointWriter UsbEndpointWriter { get; } 9 | 10 | public WriteEndpoint(UsbEndpointWriter usbEndpointWriter, ushort? maxPacketSize) 11 | { 12 | UsbEndpointWriter = usbEndpointWriter; 13 | 14 | if (maxPacketSize.HasValue) MaxPacketSize = maxPacketSize.Value; 15 | } 16 | 17 | public bool IsRead => false; 18 | 19 | public bool IsWrite => true; 20 | 21 | public bool IsInterrupt => false; 22 | 23 | public byte PipeId => UsbEndpointWriter.EpNum; 24 | 25 | public ushort MaxPacketSize { get; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Usb.Net/WINUSB_SETUP_PACKET.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | // ReSharper disable MemberCanBePrivate.Global 3 | // ReSharper disable FieldCanBeMadeReadOnly.Global 4 | 5 | #pragma warning disable CA1815 // Override equals and operator equals on value types 6 | #pragma warning disable CA1815 // Override equals and operator equals on value types 7 | #pragma warning disable CA1707 // Identifiers should not contain underscores 8 | #pragma warning disable CA1051 9 | 10 | namespace Usb.Net 11 | { 12 | [StructLayout(LayoutKind.Sequential, Pack = 1)] 13 | public struct WINUSB_SETUP_PACKET 14 | { 15 | public byte RequestType; 16 | public byte Request; 17 | public ushort Value; 18 | public ushort Index; 19 | public ushort Length; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/FlutnetThermometer.Android/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Device.Net.UnoSample/Device.Net.UnoSample.Skia.Wpf.Host/Device.Net.UnoSample.Skia.Wpf.Host.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WinExe 5 | Exe 6 | netcoreapp3.1 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Usb.Net/UsbDeviceExtensions.cs: -------------------------------------------------------------------------------- 1 | using Device.Net; 2 | using System; 3 | using System.Linq; 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | 7 | namespace Usb.Net 8 | { 9 | public static class UsbDeviceExtensions 10 | { 11 | public static Task PerformControlTransferAsync(this IUsbDevice usbDevice, SetupPacket setupPacket, byte[] buffer = null, CancellationToken cancellationToken = default) 12 | => usbDevice == null ? throw new ArgumentNullException(nameof(usbDevice)) : 13 | (usbDevice.UsbInterfaceManager.UsbInterfaces.FirstOrDefault() ?? 14 | throw new ControlTransferException("There are no interfaces to send a control transfer to")) 15 | .PerformControlTransferAsync(setupPacket, buffer, cancellationToken); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Samples/Flutnet/Flutter/flutnet_thermometer_bridge/lib/flutnet_thermometer/service_library/generated/cmd_thermometer_service_get_temperature_async.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'cmd_thermometer_service_get_temperature_async.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CmdThermometerServiceGetTemperatureAsync 10 | _$CmdThermometerServiceGetTemperatureAsyncFromJson(Map json) { 11 | return CmdThermometerServiceGetTemperatureAsync(); 12 | } 13 | 14 | Map _$CmdThermometerServiceGetTemperatureAsyncToJson( 15 | CmdThermometerServiceGetTemperatureAsync instance) => 16 | {}; 17 | -------------------------------------------------------------------------------- /src/Usb.Net.AndroidSample/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 |