Skip to content

Commit

Permalink
Merge pull request #22 from Laerdal/develop
Browse files Browse the repository at this point in the history
develop
  • Loading branch information
ksidirop-laerdal authored Nov 12, 2024
2 parents 19d3694 + 2efda09 commit 84f39b6
Show file tree
Hide file tree
Showing 11 changed files with 654 additions and 113 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ env:
SCL_NUGET_ORG_FEED_API_KEY: ${{ secrets.NUGET_ORG_FEED_API_KEY }}
SCL_GITHUB_NUGET_FEED_USERNAME: ${{ secrets.SCL_GITHUB_NUGET_FEED_USERNAME }}

DOTNET_TARGET_WORKLOAD_VERSION: "8.0.402" # dont upgrade this lightheartedly the workload snapshot implicitly defines which versions of Android/iOS/MacCatalyst SDKs are supported


on:
workflow_call: # so that other workflows can trigger this
Expand Down Expand Up @@ -59,6 +61,7 @@ jobs:
chmod +x "${{env.BUILD_REPOSITORY_FOLDERPATH}}/Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh" \
&& \
"${{env.BUILD_REPOSITORY_FOLDERPATH}}/Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh" \
"${{env.DOTNET_TARGET_WORKLOAD_VERSION}}" \
"https://nuget.pkg.github.com/Laerdal/index.json" \
"${{env.SCL_GITHUB_NUGET_FEED_USERNAME}}" \
"${{env.SCL_GITHUB_ACCESS_TOKEN}}" \
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ ASALocalRun/

Output/
Laerdal.Dfu.Bindings.iOS/Carthage/
Laerdal.Dfu.Bindings.iOS/Sharpie/
# Laerdal.Dfu.Bindings.iOS/Sharpie/

*.binlog
*.csproj.xml
Expand Down
55 changes: 23 additions & 32 deletions Laerdal.Dfu.Bindings.iOS/ApiDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
namespace Laerdal.Dfu.Bindings.iOS
{
// @interface DFUFirmware : NSObject
// [Model (Name = "_TtC13iOSDFULibrary11DFUFirmware")] // [Protocol (Name = "_TtC13iOSDFULibrary11DFUFirmware")]
[BaseType (typeof(NSObject), Name = "_TtC13iOSDFULibrary11DFUFirmware")]
// [Model (Name = "_TtC9NordicDFU11DFUFirmware")] // [Protocol (Name = "_TtC9NordicDFU11DFUFirmware")]
[BaseType (typeof(NSObject), Name = "_TtC9NordicDFU11DFUFirmware")]
[DisableDefaultCtor]
interface DFUFirmware
{
Expand Down Expand Up @@ -86,8 +86,7 @@ interface DFUFirmware
}

// @interface DFUFirmwareSize : NSObject
// [Model (Name = "_TtC13iOSDFULibrary15DFUFirmwareSize")] // [Protocol (Name = "_TtC13iOSDFULibrary15DFUFirmwareSize")]
[BaseType (typeof(NSObject), Name = "_TtC13iOSDFULibrary15DFUFirmwareSize")]
[BaseType (typeof(NSObject), Name = "_TtC9NordicDFU15DFUFirmwareSize")]
[DisableDefaultCtor]
interface DFUFirmwareSize
{
Expand All @@ -105,9 +104,9 @@ interface DFUFirmwareSize
}

// @protocol DFUPeripheralSelectorDelegate
[Model (Name = "_TtP13iOSDFULibrary29DFUPeripheralSelectorDelegate_")]
[Protocol (Name = "_TtP13iOSDFULibrary29DFUPeripheralSelectorDelegate_")]
[BaseType (typeof(NSObject), Name = "_TtP13iOSDFULibrary29DFUPeripheralSelectorDelegate_")]
[Model (Name = "_TtP9NordicDFU29DFUPeripheralSelectorDelegate_")]
[Protocol (Name = "_TtP9NordicDFU29DFUPeripheralSelectorDelegate_")]
[BaseType (typeof(NSObject), Name = "_TtP9NordicDFU29DFUPeripheralSelectorDelegate_")]
interface IDFUPeripheralSelectorDelegate
{
// @required -(BOOL)select:(CBPeripheral * _Nonnull)peripheral advertisementData:(NSDictionary<NSString *,id> * _Nonnull)advertisementData RSSI:(NSNumber * _Nonnull)RSSI hint:(NSString * _Nullable)name __attribute__((warn_unused_result("")));
Expand All @@ -123,9 +122,9 @@ interface IDFUPeripheralSelectorDelegate
}

// @protocol DFUProgressDelegate
[Model (Name = "_TtP13iOSDFULibrary19DFUProgressDelegate_")]
[Protocol (Name = "_TtP13iOSDFULibrary19DFUProgressDelegate_")]
[BaseType (typeof(NSObject), Name = "_TtP13iOSDFULibrary19DFUProgressDelegate_")]
[Model (Name = "_TtP9NordicDFU19DFUProgressDelegate_")]
[Protocol (Name = "_TtP9NordicDFU19DFUProgressDelegate_")]
[BaseType (typeof(NSObject), Name = "_TtP9NordicDFU19DFUProgressDelegate_")]
interface DFUProgressDelegate
{
// @required -(void)dfuProgressDidChangeFor:(NSInteger)part outOf:(NSInteger)totalParts to:(NSInteger)progress currentSpeedBytesPerSecond:(double)currentSpeedBytesPerSecond avgSpeedBytesPerSecond:(double)avgSpeedBytesPerSecond;
Expand All @@ -135,9 +134,8 @@ interface DFUProgressDelegate
}

// @interface DFUServiceController : NSObject
// [Model (Name = "_TtC13iOSDFULibrary20DFUServiceController")] // [Protocol (Name = "_TtC13iOSDFULibrary20DFUServiceController")]
[BaseType (typeof(NSObject), Name = "_TtC13iOSDFULibrary20DFUServiceController")]
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "_TtC9NordicDFU20DFUServiceController")]
interface DFUServiceController
{
// -(void)pause;
Expand Down Expand Up @@ -166,9 +164,9 @@ interface DFUServiceController
}

// @protocol DFUServiceDelegate
[Model (Name = "_TtP13iOSDFULibrary18DFUServiceDelegate_")]
[Protocol (Name = "_TtP13iOSDFULibrary18DFUServiceDelegate_")]
[BaseType (typeof(NSObject), Name = "_TtP13iOSDFULibrary18DFUServiceDelegate_")]
[Model (Name = "_TtP9NordicDFU18DFUServiceDelegate_")]
[Protocol (Name = "_TtP9NordicDFU18DFUServiceDelegate_")]
[BaseType (typeof(NSObject), Name = "_TtP9NordicDFU18DFUServiceDelegate_")]
interface DFUServiceDelegate
{
// @required -(void)dfuStateDidChangeTo:(enum DFUState)state;
Expand All @@ -183,9 +181,8 @@ interface DFUServiceDelegate
}

// @interface DFUServiceInitiator : NSObject
// [Model (Name = "_TtC13iOSDFULibrary19DFUServiceInitiator")] [Protocol (Name = "_TtC13iOSDFULibrary19DFUServiceInitiator")]
[BaseType (typeof(NSObject), Name = "_TtC13iOSDFULibrary19DFUServiceInitiator")]
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "_TtC9NordicDFU19DFUServiceInitiator")]
interface DFUServiceInitiator
{
[Wrap ("WeakDelegate")]
Expand Down Expand Up @@ -283,9 +280,8 @@ interface DFUServiceInitiator
}

// @interface DFUUuid : NSObject
// [Model (Name = "_TtC13iOSDFULibrary7DFUUuid")] // [Protocol (Name = "_TtC13iOSDFULibrary7DFUUuid")]
[BaseType (typeof(NSObject), Name = "_TtC13iOSDFULibrary7DFUUuid")]
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "_TtC9NordicDFU7DFUUuid")]
interface DFUUuid
{
// @property (readonly, nonatomic, strong) CBUUID * _Nonnull uuid;
Expand All @@ -303,9 +299,8 @@ interface DFUUuid
}

// @interface DFUUuidHelper : NSObject
// [Model (Name = "_TtC13iOSDFULibrary13DFUUuidHelper")] // [Protocol (Name = "_TtC13iOSDFULibrary13DFUUuidHelper")]
[BaseType (typeof(NSObject), Name = "_TtC13iOSDFULibrary13DFUUuidHelper")]
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "_TtC9NordicDFU13DFUUuidHelper")]
interface DFUUuidHelper
{
// @property (readonly, nonatomic, strong) CBUUID * _Nonnull legacyDFUService;
Expand Down Expand Up @@ -358,25 +353,23 @@ interface DFUUuidHelper
}

// @interface IntelHex2BinConverter : NSObject
// [Model (Name = "_TtC13iOSDFULibrary21IntelHex2BinConverter")] // [Protocol (Name = "_TtC13iOSDFULibrary21IntelHex2BinConverter")]
[BaseType (typeof(NSObject), Name = "_TtC13iOSDFULibrary21IntelHex2BinConverter")]
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "_TtC9NordicDFU21IntelHex2BinConverter")]
interface IntelHex2BinConverter
{
}

// @interface LegacyDFUServiceInitiator : DFUServiceInitiator
// [Model (Name = "_TtC13iOSDFULibrary25LegacyDFUServiceInitiator")] // [Protocol (Name = "_TtC13iOSDFULibrary25LegacyDFUServiceInitiator")]
[BaseType (typeof(DFUServiceInitiator), Name = "_TtC13iOSDFULibrary25LegacyDFUServiceInitiator")]
[DisableDefaultCtor]
[BaseType (typeof(DFUServiceInitiator), Name = "_TtC9NordicDFU25LegacyDFUServiceInitiator")]
interface LegacyDFUServiceInitiator
{
// -(DFUServiceController * _Nullable)startWithTargetWithIdentifier:(NSUUID * _Nonnull)uuid __attribute__((warn_unused_result("")));
[Export ("startWithTargetWithIdentifier:")]
[return: NullAllowed]
DFUServiceController StartWithTargetWithIdentifier (NSUuid uuid);

// -(instancetype _Nonnull)initWithCentralManager:(CBCentralManager * _Nonnull)centralManager target:(CBPeripheral * _Nonnull)target __attribute__((objc_designated_initializer)) __attribute__((deprecated("")));
// -(instancetype _Nonnull)initWithCentralManager:(CBCentralManager * _Nonnull)centralManager target:(CBPeripheral * _Nonnull)target __attribute__((objc_designated_initializer)) __attribute__((deprecated("Use init(queue: DispatchQueue?) instead.")));
[Export ("initWithCentralManager:target:")]
[DesignatedInitializer]
NativeHandle Constructor (CBCentralManager centralManager, CBPeripheral target);
Expand All @@ -388,9 +381,8 @@ interface LegacyDFUServiceInitiator
}

// @protocol LoggerDelegate
[Model (Name = "_TtP13iOSDFULibrary14LoggerDelegate_")]
[Protocol (Name = "_TtP13iOSDFULibrary14LoggerDelegate_")]
[BaseType (typeof(NSObject), Name = "_TtP13iOSDFULibrary14LoggerDelegate_")]
[Model (Name = "_TtP9NordicDFU14LoggerDelegate_")]
[BaseType (typeof(NSObject), Name = "_TtP9NordicDFU14LoggerDelegate_")]
interface LoggerDelegate
{
// @required -(void)logWith:(enum LogLevel)level message:(NSString * _Nonnull)message;
Expand All @@ -400,17 +392,16 @@ interface LoggerDelegate
}

// @interface SecureDFUServiceInitiator : DFUServiceInitiator
// [Model (Name = "_TtC13iOSDFULibrary25SecureDFUServiceInitiator")] // [Protocol (Name = "_TtC13iOSDFULibrary25SecureDFUServiceInitiator")]
[BaseType (typeof(DFUServiceInitiator), Name = "_TtC13iOSDFULibrary25SecureDFUServiceInitiator")]
[DisableDefaultCtor]
[BaseType (typeof(DFUServiceInitiator), Name = "_TtC9NordicDFU25SecureDFUServiceInitiator")]
interface SecureDFUServiceInitiator
{
// -(DFUServiceController * _Nullable)startWithTargetWithIdentifier:(NSUUID * _Nonnull)uuid __attribute__((warn_unused_result("")));
[Export ("startWithTargetWithIdentifier:")]
[return: NullAllowed]
DFUServiceController StartWithTargetWithIdentifier (NSUuid uuid);

// -(instancetype _Nonnull)initWithCentralManager:(CBCentralManager * _Nonnull)centralManager target:(CBPeripheral * _Nonnull)target __attribute__((objc_designated_initializer)) __attribute__((deprecated("")));
// -(instancetype _Nonnull)initWithCentralManager:(CBCentralManager * _Nonnull)centralManager target:(CBPeripheral * _Nonnull)target __attribute__((objc_designated_initializer)) __attribute__((deprecated("Use init(queue: DispatchQueue?) instead.")));
[Export ("initWithCentralManager:target:")]
[DesignatedInitializer]
NativeHandle Constructor (CBCentralManager centralManager, CBPeripheral target);
Expand Down
Loading

0 comments on commit 84f39b6

Please sign in to comment.