Start with NFCService

This commit is contained in:
TheJoKlLa 2023-01-29 16:55:07 +01:00
parent 492ed2e3ce
commit 6e436b5c8c
12 changed files with 155 additions and 0 deletions

View File

@ -32,6 +32,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Borepin.GTK", "Borepin\Borepin.GTK\Borepin.GTK.csproj", "{61D956D2-5819-4736-BBD8-AD8208DE6A62}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Borepin.GTK", "Borepin\Borepin.GTK\Borepin.GTK.csproj", "{61D956D2-5819-4736-BBD8-AD8208DE6A62}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NFC_PCSC", "external\NFC\NFC_PCSC\NFC_PCSC.csproj", "{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -360,6 +362,30 @@ Global
{61D956D2-5819-4736-BBD8-AD8208DE6A62}.Release|x64.Build.0 = Release|Any CPU {61D956D2-5819-4736-BBD8-AD8208DE6A62}.Release|x64.Build.0 = Release|Any CPU
{61D956D2-5819-4736-BBD8-AD8208DE6A62}.Release|x86.ActiveCfg = Release|Any CPU {61D956D2-5819-4736-BBD8-AD8208DE6A62}.Release|x86.ActiveCfg = Release|Any CPU
{61D956D2-5819-4736-BBD8-AD8208DE6A62}.Release|x86.Build.0 = Release|Any CPU {61D956D2-5819-4736-BBD8-AD8208DE6A62}.Release|x86.Build.0 = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|ARM.ActiveCfg = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|ARM.Build.0 = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|iPhone.Build.0 = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|x64.ActiveCfg = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|x64.Build.0 = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|x86.ActiveCfg = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Debug|x86.Build.0 = Debug|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|Any CPU.Build.0 = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|ARM.ActiveCfg = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|ARM.Build.0 = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|iPhone.ActiveCfg = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|iPhone.Build.0 = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|x64.ActiveCfg = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|x64.Build.0 = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|x86.ActiveCfg = Release|Any CPU
{75D6EADC-1F9E-45EF-A913-FF4FA6CD4B35}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -82,6 +82,7 @@
<Compile Include="Services\APIService_New.cs" /> <Compile Include="Services\APIService_New.cs" />
<Compile Include="Services\APIServiceConnection.cs" /> <Compile Include="Services\APIServiceConnection.cs" />
<Compile Include="Services\BrowserService.cs" /> <Compile Include="Services\BrowserService.cs" />
<Compile Include="Services\NFCService.cs" />
<Compile Include="Services\PreferenceStorageService.cs" /> <Compile Include="Services\PreferenceStorageService.cs" />
<Compile Include="Services\SecretStorage.cs" /> <Compile Include="Services\SecretStorage.cs" />
<Compile Include="Services\VersioningService.cs" /> <Compile Include="Services\VersioningService.cs" />
@ -93,6 +94,10 @@
<None Include="Properties\AndroidManifest.xml" /> <None Include="Properties\AndroidManifest.xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\external\NFC\NFC\NFC.csproj">
<Project>{D53A98E8-48B5-4DCE-A98E-4623EE746E16}</Project>
<Name>NFC</Name>
</ProjectReference>
<ProjectReference Include="..\..\FabAccessAPI\FabAccessAPI.csproj"> <ProjectReference Include="..\..\FabAccessAPI\FabAccessAPI.csproj">
<Project>{3251FCE9-FEA3-4662-8BEB-636BE6732D48}</Project> <Project>{3251FCE9-FEA3-4662-8BEB-636BE6732D48}</Project>
<Name>FabAccessAPI</Name> <Name>FabAccessAPI</Name>

View File

@ -1,6 +1,7 @@
using Borepin.Droid.Services; using Borepin.Droid.Services;
using Borepin.Service; using Borepin.Service;
using Borepin.Service.Browser; using Borepin.Service.Browser;
using Borepin.Service.NFC;
using Borepin.Service.Storage; using Borepin.Service.Storage;
using Borepin.Service.Versioning; using Borepin.Service.Versioning;
using Prism; using Prism;
@ -16,6 +17,7 @@ namespace Borepin.Droid
containerRegistry.Register<ISecretStorageService, SecretStorage>(); containerRegistry.Register<ISecretStorageService, SecretStorage>();
containerRegistry.Register<IVersioningService, VersioningService>(); containerRegistry.Register<IVersioningService, VersioningService>();
containerRegistry.Register<IBrowserService, BrowserService>(); containerRegistry.Register<IBrowserService, BrowserService>();
containerRegistry.Register<INFCService, NFCService>();
containerRegistry.RegisterSingleton<IAPIService, APIService>(); containerRegistry.RegisterSingleton<IAPIService, APIService>();
} }

View File

@ -0,0 +1,33 @@
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Borepin.Service.NFC;
using NFC.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Borepin.Droid.Services
{
public class NFCService : INFCService
{
public ICard GetCard()
{
throw new NotImplementedException();
}
public IHardware GetHardware()
{
throw new NotImplementedException();
}
public IReader GetReader()
{
throw new NotImplementedException();
}
}
}

View File

@ -100,6 +100,7 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\APIService.cs" /> <Compile Include="Services\APIService.cs" />
<Compile Include="Services\BrowserService.cs" /> <Compile Include="Services\BrowserService.cs" />
<Compile Include="Services\NFCService.cs" />
<Compile Include="Services\PreferenceStorageService.cs" /> <Compile Include="Services\PreferenceStorageService.cs" />
<Compile Include="Services\SecretStorageService.cs" /> <Compile Include="Services\SecretStorageService.cs" />
<Compile Include="Services\VersioningService.cs" /> <Compile Include="Services\VersioningService.cs" />
@ -190,6 +191,10 @@
<Project>{c587aac3-50a7-4871-a50d-7880b6f24ef6}</Project> <Project>{c587aac3-50a7-4871-a50d-7880b6f24ef6}</Project>
<Name>Capnp.Net.Runtime</Name> <Name>Capnp.Net.Runtime</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\external\NFC\NFC\NFC.csproj">
<Project>{D53A98E8-48B5-4DCE-A98E-4623EE746E16}</Project>
<Name>NFC</Name>
</ProjectReference>
<ProjectReference Include="..\..\FabAccessAPI\FabAccessAPI.csproj"> <ProjectReference Include="..\..\FabAccessAPI\FabAccessAPI.csproj">
<Project>{3251FCE9-FEA3-4662-8BEB-636BE6732D48}</Project> <Project>{3251FCE9-FEA3-4662-8BEB-636BE6732D48}</Project>
<Name>FabAccessAPI</Name> <Name>FabAccessAPI</Name>

View File

@ -5,6 +5,7 @@ using Borepin.Service.Storage;
using Borepin.Service.Versioning; using Borepin.Service.Versioning;
using Borepin.Service; using Borepin.Service;
using Borepin.Service.Browser; using Borepin.Service.Browser;
using Borepin.Service.NFC;
namespace Borepin.UWP namespace Borepin.UWP
{ {
@ -16,6 +17,7 @@ namespace Borepin.UWP
containerRegistry.Register<ISecretStorageService, SecretStorageService>(); containerRegistry.Register<ISecretStorageService, SecretStorageService>();
containerRegistry.Register<IVersioningService, VersioningService>(); containerRegistry.Register<IVersioningService, VersioningService>();
containerRegistry.Register<IBrowserService, BrowserService>(); containerRegistry.Register<IBrowserService, BrowserService>();
containerRegistry.Register<INFCService, NFCService>();
containerRegistry.RegisterSingleton<IAPIService, APIService>(); containerRegistry.RegisterSingleton<IAPIService, APIService>();
} }

View File

@ -0,0 +1,28 @@
using Borepin.Service.NFC;
using NFC.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Borepin.UWP.Services
{
public class NFCService : INFCService
{
public ICard GetCard()
{
throw new NotImplementedException();
}
public IHardware GetHardware()
{
throw new NotImplementedException();
}
public IReader GetReader()
{
throw new NotImplementedException();
}
}
}

View File

@ -83,6 +83,7 @@
<Compile Include="AppDelegate.cs" /> <Compile Include="AppDelegate.cs" />
<Compile Include="Services\APIService.cs" /> <Compile Include="Services\APIService.cs" />
<Compile Include="Services\BrowserService.cs" /> <Compile Include="Services\BrowserService.cs" />
<Compile Include="Services\NFCService.cs" />
<Compile Include="Services\PreferenceStorageService.cs" /> <Compile Include="Services\PreferenceStorageService.cs" />
<Compile Include="Services\SecretStorageService.cs" /> <Compile Include="Services\SecretStorageService.cs" />
<Compile Include="Services\VersioningService.cs" /> <Compile Include="Services\VersioningService.cs" />
@ -194,6 +195,10 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\external\NFC\NFC\NFC.csproj">
<Project>{D53A98E8-48B5-4DCE-A98E-4623EE746E16}</Project>
<Name>NFC</Name>
</ProjectReference>
<ProjectReference Include="..\..\FabAccessAPI\FabAccessAPI.csproj"> <ProjectReference Include="..\..\FabAccessAPI\FabAccessAPI.csproj">
<Project>{3251FCE9-FEA3-4662-8BEB-636BE6732D48}</Project> <Project>{3251FCE9-FEA3-4662-8BEB-636BE6732D48}</Project>
<Name>FabAccessAPI</Name> <Name>FabAccessAPI</Name>

View File

@ -1,6 +1,7 @@
using Borepin.iOS.Services; using Borepin.iOS.Services;
using Borepin.Service; using Borepin.Service;
using Borepin.Service.Browser; using Borepin.Service.Browser;
using Borepin.Service.NFC;
using Borepin.Service.Storage; using Borepin.Service.Storage;
using Borepin.Service.Versioning; using Borepin.Service.Versioning;
using Prism; using Prism;
@ -16,6 +17,7 @@ namespace Borepin.iOS
containerRegistry.Register<ISecretStorageService, SecretStorageService>(); containerRegistry.Register<ISecretStorageService, SecretStorageService>();
containerRegistry.Register<IVersioningService, VersioningService>(); containerRegistry.Register<IVersioningService, VersioningService>();
containerRegistry.Register<IBrowserService, BrowserService>(); containerRegistry.Register<IBrowserService, BrowserService>();
containerRegistry.Register<INFCService, NFCService>();
containerRegistry.RegisterSingleton<IAPIService, APIService>(); containerRegistry.RegisterSingleton<IAPIService, APIService>();
} }

View File

@ -0,0 +1,29 @@
using Borepin.Service.NFC;
using Foundation;
using NFC.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UIKit;
namespace Borepin.iOS.Services
{
public class NFCService : INFCService
{
public ICard GetCard()
{
throw new NotImplementedException();
}
public IHardware GetHardware()
{
throw new NotImplementedException();
}
public IReader GetReader()
{
throw new NotImplementedException();
}
}
}

View File

@ -159,6 +159,7 @@
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\external\NFC\NFC\NFC.csproj" />
<ProjectReference Include="..\..\FabAccessAPI\FabAccessAPI.csproj" /> <ProjectReference Include="..\..\FabAccessAPI\FabAccessAPI.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -0,0 +1,17 @@
using NFC.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
namespace Borepin.Service.NFC
{
/// <summary>
/// Service to provide hardware specific NFC Interfaces
/// </summary>
public interface INFCService
{
IHardware GetHardware();
IReader GetReader();
ICard GetCard();
}
}