Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Merge pull request #77 from mauroa/master-pcl
Browse files Browse the repository at this point in the history
Pending uncommited changes
  • Loading branch information
mauroa committed Apr 8, 2016
2 parents 5db3878 + 6481052 commit 4809d05
Show file tree
Hide file tree
Showing 50 changed files with 1,177 additions and 92 deletions.
4 changes: 4 additions & 0 deletions src/Client.Android/Client.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@
<Project>{d3eb8c4f-6cf4-4eb4-94e3-bca31767ae53}</Project>
<Name>Client</Name>
</ProjectReference>
<ProjectReference Include="..\Core.Android\Core.Android.csproj">
<Project>{d0826e54-0983-48ec-b5d0-f19cfd66fade}</Project>
<Name>Core.Android</Name>
</ProjectReference>
<ProjectReference Include="..\Core\Core.csproj">
<Project>{6481b999-0479-4162-ac53-5936ce5fd8bf}</Project>
<Name>Core</Name>
Expand Down
12 changes: 1 addition & 11 deletions src/Client.Android/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
/*
Copyright 2014 NETFX
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
*/

using System.Reflection;
using System.Reflection;

[assembly: AssemblyTitle ("System.Net.Mqtt.Android")]
[assembly: AssemblyDescription ("Mqtt client library for Android projects.")]
3 changes: 2 additions & 1 deletion src/Client.Library/Client.Library.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>System.Net.Mqtt.Client</RootNamespace>
<AssemblyName>System.Net.Mqtt.Library</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
26 changes: 6 additions & 20 deletions src/Client.iOS/Client.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,6 @@
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Rx-Interfaces.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Interfaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Linq, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Rx-Linq.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.PlatformServices, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
Expand All @@ -69,16 +53,18 @@
<ItemGroup>
<Compile Include="ClientFactory.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TcpBinding.cs" />
<Compile Include="TcpChannel.cs" />
<Compile Include="TcpChannelFactory.cs" />
<Compile Include="TcpChannelProvider.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Client\Client.csproj">
<Project>{d3eb8c4f-6cf4-4eb4-94e3-bca31767ae53}</Project>
<Name>Client</Name>
</ProjectReference>
<ProjectReference Include="..\Core.iOS\Core.iOS.csproj">
<Project>{e6678fd3-f321-410a-9858-f542e87c1cf7}</Project>
<Name>Core.iOS</Name>
<IsAppExtension>false</IsAppExtension>
<IsWatchApp>false</IsWatchApp>
</ProjectReference>
<ProjectReference Include="..\Core\Core.csproj">
<Project>{6481b999-0479-4162-ac53-5936ce5fd8bf}</Project>
<Name>Core</Name>
Expand Down
5 changes: 0 additions & 5 deletions src/Client.iOS/packages.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="GitInfo" version="1.1.5" targetFramework="xamarinios10" />
<package id="Rx-Core" version="2.2.5" targetFramework="xamarinios10" />
<package id="Rx-Interfaces" version="2.2.5" targetFramework="xamarinios10" />
<package id="Rx-Linq" version="2.2.5" targetFramework="xamarinios10" />
<package id="Rx-Main" version="2.2.5" targetFramework="xamarinios10" />
<package id="Rx-PlatformServices" version="2.2.5" targetFramework="xamarinios10" />
</packages>
12 changes: 1 addition & 11 deletions src/Client/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
/*
Copyright 2014 NETFX
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
*/

using System.Reflection;
using System.Reflection;
using System.Runtime.CompilerServices;

[assembly: AssemblyTitle ("System.Net.Mqtt")]
Expand Down
108 changes: 108 additions & 0 deletions src/Core.Android/Core.Android.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D0826E54-0983-48EC-B5D0-F19CFD66FADE}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>System.Net.Mqtt</RootNamespace>
<AssemblyName>System.Net.Mqtt.Core.Android</AssemblyName>
<FileAlignment>512</FileAlignment>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v5.1</TargetFrameworkVersion>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\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\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>Hermes.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<None Include="Hermes.snk" />
</ItemGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Rx-Interfaces.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Interfaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Linq, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Rx-Linq.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.PlatformServices, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TcpBinding.cs" />
<Compile Include="TcpChannel.cs" />
<Compile Include="TcpChannelFactory.cs" />
<Compile Include="TcpChannelProvider.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\AboutResources.txt" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Values\Strings.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj">
<Project>{6481b999-0479-4162-ac53-5936ce5fd8bf}</Project>
<Name>Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\packages\GitInfo.1.1.5\build\GitInfo.targets" Condition="Exists('..\packages\GitInfo.1.1.5\build\GitInfo.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\GitInfo.1.1.5\build\GitInfo.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitInfo.1.1.5\build\GitInfo.targets'))" />
</Target>
<!-- 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>
Binary file added src/Core.Android/Hermes.snk
Binary file not shown.
4 changes: 4 additions & 0 deletions src/Core.Android/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
using System.Reflection;

[assembly: AssemblyTitle ("System.Net.Mqtt.Core.Android")]
[assembly: AssemblyDescription ("Mqtt shared components for Android projects.")]
44 changes: 44 additions & 0 deletions src/Core.Android/Resources/AboutResources.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.

For example, a sample Android app that contains a user interface layout (main.axml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:

Resources/
drawable/
icon.png

layout/
main.axml

values/
strings.xml

In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called "R"
(this is an Android convention) that contains the tokens for each one of the resources
included. For example, for the above Resources layout, this is what the R class would expose:

public class R {
public class drawable {
public const int icon = 0x123;
}

public class layout {
public const int main = 0x456;
}

public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}

You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
to reference the layout/main.axml file, or R.strings.first_string to reference the first
string in the dictionary file values/strings.xml.
60 changes: 60 additions & 0 deletions src/Core.Android/Resources/Resource.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Core.Android/Resources/Values/Strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="Hello">Hello World, Click Me!</string>
<string name="ApplicationName">$projectname$</string>
</resources>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Net.Mqtt.Diagnostics;

namespace System.Net.Mqtt.Client
namespace System.Net.Mqtt
{
public class TcpBinding : IProtocolBinding
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Reactive.Subjects;
using System.Threading.Tasks;

namespace System.Net.Mqtt.Client
namespace System.Net.Mqtt
{
internal class TcpChannel : IChannel<byte[]>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Net.Mqtt.Exceptions;
using System.Net.Sockets;

namespace System.Net.Mqtt.Client
namespace System.Net.Mqtt
{
internal class TcpChannelFactory : IChannelFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Reactive.Linq;
using System.Threading.Tasks;

namespace System.Net.Mqtt.Client
namespace System.Net.Mqtt
{
internal class TcpChannelProvider : IChannelProvider
{
Expand Down
9 changes: 9 additions & 0 deletions src/Core.Android/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="GitInfo" version="1.1.5" targetFramework="monoandroid51" />
<package id="Rx-Core" version="2.2.5" targetFramework="monoandroid51" />
<package id="Rx-Interfaces" version="2.2.5" targetFramework="monoandroid51" />
<package id="Rx-Linq" version="2.2.5" targetFramework="monoandroid51" />
<package id="Rx-Main" version="2.2.5" targetFramework="monoandroid51" />
<package id="Rx-PlatformServices" version="2.2.5" targetFramework="monoandroid51" />
</packages>
Loading

0 comments on commit 4809d05

Please sign in to comment.