-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TIMOB-24644] Decouple Hyperloop logic and Ti SDK (#174)
* [TIMOB-24644] Decouple Hyperloop logic and Ti SDK
- Loading branch information
Showing
19 changed files
with
852 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+9 KB
...plugins/windows/TitaniumWindows_Hyperloop/bin/phone/Debug/TitaniumWindows_Hyperloop.winmd
Binary file not shown.
Binary file added
BIN
+9 KB
...ugins/windows/TitaniumWindows_Hyperloop/bin/phone/Release/TitaniumWindows_Hyperloop.winmd
Binary file not shown.
Binary file added
BIN
+9 KB
...plugins/windows/TitaniumWindows_Hyperloop/bin/store/Debug/TitaniumWindows_Hyperloop.winmd
Binary file not shown.
Binary file added
BIN
+9 KB
...ugins/windows/TitaniumWindows_Hyperloop/bin/store/Release/TitaniumWindows_Hyperloop.winmd
Binary file not shown.
Binary file added
BIN
+9.5 KB
...plugins/windows/TitaniumWindows_Hyperloop/bin/win10/Debug/TitaniumWindows_Hyperloop.winmd
Binary file not shown.
Binary file added
BIN
+9 KB
...ugins/windows/TitaniumWindows_Hyperloop/bin/win10/Release/TitaniumWindows_Hyperloop.winmd
Binary file not shown.
65 changes: 65 additions & 0 deletions
65
.../sdk_plugins/windows/TitaniumWindows_Hyperloop/phone/TitaniumWindows_Hyperloop.csproj.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{620bd446-2194-4f36-ac67-91052ad56549}</ProjectGuid> | ||
<OutputType>winmdobj</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>TitaniumWindows_Hyperloop</RootNamespace> | ||
<AssemblyName>TitaniumWindows_Hyperloop</AssemblyName> | ||
<DefaultLanguage>en-US</DefaultLanguage> | ||
<FileAlignment>512</FileAlignment> | ||
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<TargetFrameworkProfile>Profile32</TargetFrameworkProfile> | ||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>..\bin\phone\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>..\bin\phone\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<!-- A reference to the entire .NET Framework is automatically included --> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<TargetPlatform Include="Windows, Version=8.1" /> | ||
<TargetPlatform Include="WindowsPhoneApp, Version=8.1" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="..\src\TypeHelper.cs" /> | ||
<Compile Include="..\src\Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<% if (externalReferences.length > 0) { -%> | ||
<ItemGroup> | ||
<% for(var i = 0; i < externalReferences.length; i++) { -%> | ||
<Reference Include="<%= externalReferences[i].Include %>"> | ||
<HintPath><%= externalReferences[i].HintPath %></HintPath> | ||
</Reference> | ||
<% } -%> | ||
</ItemGroup> | ||
<% } -%> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
|
||
</Project> |
22 changes: 22 additions & 0 deletions
22
windows/sdk_plugins/windows/TitaniumWindows_Hyperloop/phone/TitaniumWindows_Hyperloop.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.25420.1 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TitaniumWindows_Hyperloop", "TitaniumWindows_Hyperloop.csproj", "{620BD446-2194-4F36-AC67-91052AD56549}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{620BD446-2194-4F36-AC67-91052AD56549}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{620BD446-2194-4F36-AC67-91052AD56549}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{620BD446-2194-4F36-AC67-91052AD56549}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{620BD446-2194-4F36-AC67-91052AD56549}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
29 changes: 29 additions & 0 deletions
29
windows/sdk_plugins/windows/TitaniumWindows_Hyperloop/src/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("TitaniumWindows_Hyperloop")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("TitaniumWindows_Hyperloop")] | ||
[assembly: AssemblyCopyright("Copyright © Axway 2016")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] | ||
[assembly: ComVisible(false)] |
101 changes: 101 additions & 0 deletions
101
windows/sdk_plugins/windows/TitaniumWindows_Hyperloop/src/TypeHelper.cs.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace TitaniumWindows_Hyperloop | ||
{ | ||
public delegate void HyperloopEventHandler(Event evt, object e); | ||
|
||
public sealed class Event | ||
{ | ||
public event HyperloopEventHandler GotEvent; | ||
|
||
public object Target { get; set; } | ||
public string Name { get; set; } | ||
|
||
public Event(string name, object target) | ||
{ | ||
Target = target; | ||
Name = name; | ||
} | ||
|
||
public void HandleEvent(object sender, object e) | ||
{ | ||
GotEvent?.Invoke(this, e); | ||
} | ||
} | ||
|
||
public sealed class EventHelper | ||
{ | ||
|
||
<% for(var key in native_events) { -%> | ||
public static Event add_<%- native_events[key].signature %>(object target) | ||
{ | ||
Event evt = new Event("<%- native_events[key].name %>", target); | ||
((<%- native_events[key].type %>)target).<%- native_events[key].name %> += evt.HandleEvent; | ||
return evt; | ||
} | ||
public static void remove_<%- native_events[key].signature %>(object evt, object target) | ||
{ | ||
((<%- native_events[key].type %>)target).<%- native_events[key].name %> -= ((Event)evt).HandleEvent; | ||
} | ||
<% } -%> | ||
} | ||
|
||
|
||
public sealed class TypeHelper | ||
{ | ||
private static Dictionary<string, string> KnownTypes = new Dictionary<string, string>() | ||
{ | ||
{ "Object", typeof(System.Object).AssemblyQualifiedName }, | ||
{ "String", typeof(System.String).AssemblyQualifiedName }, | ||
{ "System.Object", typeof(System.Object).AssemblyQualifiedName }, | ||
{ "System.String", typeof(System.String).AssemblyQualifiedName }, | ||
{ "System.Exception", typeof(System.Exception).AssemblyQualifiedName }, | ||
{ "System.Double", typeof(System.Double).AssemblyQualifiedName }, | ||
{ "System.SByte", typeof(System.SByte).AssemblyQualifiedName }, | ||
{ "System.Byte", typeof(System.Byte).AssemblyQualifiedName }, | ||
{ "System.Single", typeof(System.Single).AssemblyQualifiedName }, | ||
{ "System.Decimal", typeof(System.Decimal).AssemblyQualifiedName }, | ||
{ "System.Int64", typeof(System.Int64).AssemblyQualifiedName }, | ||
{ "System.Int32", typeof(System.Int32).AssemblyQualifiedName }, | ||
{ "System.Int16", typeof(System.Int16).AssemblyQualifiedName }, | ||
{ "System.UInt64", typeof(System.UInt64).AssemblyQualifiedName }, | ||
{ "System.UInt32", typeof(System.UInt32).AssemblyQualifiedName }, | ||
{ "System.UInt16", typeof(System.UInt16).AssemblyQualifiedName }, | ||
{ "System.Boolean", typeof(System.Boolean).AssemblyQualifiedName } | ||
}; | ||
|
||
private static Dictionary<string, string> AssemblyQualifiedName = new Dictionary<string, string>() | ||
{ | ||
<% for(var key in native_types) { -%> | ||
{ "<%- native_types[key].name %>", typeof(<%- native_types[key].name %>).AssemblyQualifiedName }, | ||
<% } -%> | ||
}; | ||
|
||
public static Type GetType(string className) | ||
{ | ||
if (!KnownTypes.ContainsKey(className) && !AssemblyQualifiedName.ContainsKey(className)) | ||
{ | ||
throw new TypeLoadException("Unable to find AssemblyQualifiedName for " + className); | ||
} | ||
|
||
// | ||
// Extract assembly qualified name for Windows namespace. | ||
// | ||
string assemblyQualifiedName; | ||
if (!KnownTypes.TryGetValue(className, out assemblyQualifiedName)) | ||
{ | ||
AssemblyQualifiedName.TryGetValue(className, out assemblyQualifiedName); | ||
} | ||
|
||
Type type = Type.GetType(assemblyQualifiedName); | ||
if (type == null) | ||
{ | ||
throw new TypeLoadException("Unable to load " + className); | ||
} | ||
|
||
return type; | ||
} | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
.../sdk_plugins/windows/TitaniumWindows_Hyperloop/store/TitaniumWindows_Hyperloop.csproj.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{620bd446-2194-4f36-ac67-91052ad56549}</ProjectGuid> | ||
<OutputType>winmdobj</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>TitaniumWindows_Hyperloop</RootNamespace> | ||
<AssemblyName>TitaniumWindows_Hyperloop</AssemblyName> | ||
<DefaultLanguage>en-US</DefaultLanguage> | ||
<FileAlignment>512</FileAlignment> | ||
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<TargetFrameworkProfile>Profile32</TargetFrameworkProfile> | ||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>..\bin\phone\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>..\bin\phone\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<!-- A reference to the entire .NET Framework is automatically included --> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<TargetPlatform Include="Windows, Version=8.1" /> | ||
<TargetPlatform Include="WindowsPhoneApp, Version=8.1" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="..\src\TypeHelper.cs" /> | ||
<Compile Include="..\src\Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<% if (externalReferences.length > 0) { -%> | ||
<ItemGroup> | ||
<% for(var i = 0; i < externalReferences.length; i++) { -%> | ||
<Reference Include="<%= externalReferences[i].Include %>"> | ||
<HintPath><%= externalReferences[i].HintPath %></HintPath> | ||
</Reference> | ||
<% } -%> | ||
</ItemGroup> | ||
<% } -%> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
|
||
</Project> |
22 changes: 22 additions & 0 deletions
22
windows/sdk_plugins/windows/TitaniumWindows_Hyperloop/store/TitaniumWindows_Hyperloop.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.25420.1 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TitaniumWindows_Hyperloop", "TitaniumWindows_Hyperloop.csproj", "{620BD446-2194-4F36-AC67-91052AD56549}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{620BD446-2194-4F36-AC67-91052AD56549}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{620BD446-2194-4F36-AC67-91052AD56549}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{620BD446-2194-4F36-AC67-91052AD56549}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{620BD446-2194-4F36-AC67-91052AD56549}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.