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

Commit 4809d05

Browse files
committed
Merge pull request #77 from mauroa/master-pcl
Pending uncommited changes
2 parents 5db3878 + 6481052 commit 4809d05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1177
-92
lines changed

src/Client.Android/Client.Android.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@
9090
<Project>{d3eb8c4f-6cf4-4eb4-94e3-bca31767ae53}</Project>
9191
<Name>Client</Name>
9292
</ProjectReference>
93+
<ProjectReference Include="..\Core.Android\Core.Android.csproj">
94+
<Project>{d0826e54-0983-48ec-b5d0-f19cfd66fade}</Project>
95+
<Name>Core.Android</Name>
96+
</ProjectReference>
9397
<ProjectReference Include="..\Core\Core.csproj">
9498
<Project>{6481b999-0479-4162-ac53-5936ce5fd8bf}</Project>
9599
<Name>Core</Name>
+1-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
/*
2-
Copyright 2014 NETFX
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
*/
10-
11-
using System.Reflection;
1+
using System.Reflection;
122

133
[assembly: AssemblyTitle ("System.Net.Mqtt.Android")]
144
[assembly: AssemblyDescription ("Mqtt client library for Android projects.")]

src/Client.Library/Client.Library.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>System.Net.Mqtt.Client</RootNamespace>
1111
<AssemblyName>System.Net.Mqtt.Library</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<NuGetPackageImportStamp>
1515
</NuGetPackageImportStamp>
16+
<TargetFrameworkProfile />
1617
</PropertyGroup>
1718
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1819
<DebugSymbols>true</DebugSymbols>

src/Client.iOS/Client.iOS.csproj

+6-20
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,6 @@
4343
</ItemGroup>
4444
<ItemGroup>
4545
<Reference Include="System" />
46-
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
47-
<HintPath>..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
48-
<Private>True</Private>
49-
</Reference>
50-
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
51-
<HintPath>..\packages\Rx-Interfaces.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Interfaces.dll</HintPath>
52-
<Private>True</Private>
53-
</Reference>
54-
<Reference Include="System.Reactive.Linq, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
55-
<HintPath>..\packages\Rx-Linq.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Linq.dll</HintPath>
56-
<Private>True</Private>
57-
</Reference>
58-
<Reference Include="System.Reactive.PlatformServices, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
59-
<HintPath>..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
60-
<Private>True</Private>
61-
</Reference>
6246
<Reference Include="System.Xml" />
6347
<Reference Include="System.Core" />
6448
<Reference Include="Xamarin.iOS" />
@@ -69,16 +53,18 @@
6953
<ItemGroup>
7054
<Compile Include="ClientFactory.cs" />
7155
<Compile Include="Properties\AssemblyInfo.cs" />
72-
<Compile Include="TcpBinding.cs" />
73-
<Compile Include="TcpChannel.cs" />
74-
<Compile Include="TcpChannelFactory.cs" />
75-
<Compile Include="TcpChannelProvider.cs" />
7656
</ItemGroup>
7757
<ItemGroup>
7858
<ProjectReference Include="..\Client\Client.csproj">
7959
<Project>{d3eb8c4f-6cf4-4eb4-94e3-bca31767ae53}</Project>
8060
<Name>Client</Name>
8161
</ProjectReference>
62+
<ProjectReference Include="..\Core.iOS\Core.iOS.csproj">
63+
<Project>{e6678fd3-f321-410a-9858-f542e87c1cf7}</Project>
64+
<Name>Core.iOS</Name>
65+
<IsAppExtension>false</IsAppExtension>
66+
<IsWatchApp>false</IsWatchApp>
67+
</ProjectReference>
8268
<ProjectReference Include="..\Core\Core.csproj">
8369
<Project>{6481b999-0479-4162-ac53-5936ce5fd8bf}</Project>
8470
<Name>Core</Name>

src/Client.iOS/packages.config

-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="GitInfo" version="1.1.5" targetFramework="xamarinios10" />
4-
<package id="Rx-Core" version="2.2.5" targetFramework="xamarinios10" />
5-
<package id="Rx-Interfaces" version="2.2.5" targetFramework="xamarinios10" />
6-
<package id="Rx-Linq" version="2.2.5" targetFramework="xamarinios10" />
7-
<package id="Rx-Main" version="2.2.5" targetFramework="xamarinios10" />
8-
<package id="Rx-PlatformServices" version="2.2.5" targetFramework="xamarinios10" />
94
</packages>

src/Client/Properties/AssemblyInfo.cs

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
/*
2-
Copyright 2014 NETFX
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
*/
10-
11-
using System.Reflection;
1+
using System.Reflection;
122
using System.Runtime.CompilerServices;
133

144
[assembly: AssemblyTitle ("System.Net.Mqtt")]

src/Core.Android/Core.Android.csproj

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{D0826E54-0983-48EC-B5D0-F19CFD66FADE}</ProjectGuid>
9+
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
10+
<OutputType>Library</OutputType>
11+
<AppDesignerFolder>Properties</AppDesignerFolder>
12+
<RootNamespace>System.Net.Mqtt</RootNamespace>
13+
<AssemblyName>System.Net.Mqtt.Core.Android</AssemblyName>
14+
<FileAlignment>512</FileAlignment>
15+
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
16+
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
17+
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
18+
<TargetFrameworkVersion>v5.1</TargetFrameworkVersion>
19+
<NuGetPackageImportStamp>
20+
</NuGetPackageImportStamp>
21+
</PropertyGroup>
22+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
23+
<DebugSymbols>true</DebugSymbols>
24+
<DebugType>full</DebugType>
25+
<Optimize>false</Optimize>
26+
<OutputPath>bin\Debug\</OutputPath>
27+
<DefineConstants>DEBUG;TRACE</DefineConstants>
28+
<ErrorReport>prompt</ErrorReport>
29+
<WarningLevel>4</WarningLevel>
30+
</PropertyGroup>
31+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
32+
<DebugType>pdbonly</DebugType>
33+
<Optimize>true</Optimize>
34+
<OutputPath>bin\Release\</OutputPath>
35+
<DefineConstants>TRACE</DefineConstants>
36+
<ErrorReport>prompt</ErrorReport>
37+
<WarningLevel>4</WarningLevel>
38+
</PropertyGroup>
39+
<PropertyGroup>
40+
<SignAssembly>true</SignAssembly>
41+
</PropertyGroup>
42+
<PropertyGroup>
43+
<AssemblyOriginatorKeyFile>Hermes.snk</AssemblyOriginatorKeyFile>
44+
</PropertyGroup>
45+
<ItemGroup>
46+
<None Include="Hermes.snk" />
47+
</ItemGroup>
48+
<ItemGroup>
49+
<Reference Include="Mono.Android" />
50+
<Reference Include="mscorlib" />
51+
<Reference Include="System" />
52+
<Reference Include="System.Core" />
53+
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
54+
<HintPath>..\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll</HintPath>
55+
<Private>True</Private>
56+
</Reference>
57+
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
58+
<HintPath>..\packages\Rx-Interfaces.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Interfaces.dll</HintPath>
59+
<Private>True</Private>
60+
</Reference>
61+
<Reference Include="System.Reactive.Linq, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
62+
<HintPath>..\packages\Rx-Linq.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Linq.dll</HintPath>
63+
<Private>True</Private>
64+
</Reference>
65+
<Reference Include="System.Reactive.PlatformServices, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
66+
<HintPath>..\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll</HintPath>
67+
<Private>True</Private>
68+
</Reference>
69+
<Reference Include="System.Xml.Linq" />
70+
<Reference Include="System.Xml" />
71+
</ItemGroup>
72+
<ItemGroup>
73+
<Compile Include="Resources\Resource.Designer.cs" />
74+
<Compile Include="Properties\AssemblyInfo.cs" />
75+
<Compile Include="TcpBinding.cs" />
76+
<Compile Include="TcpChannel.cs" />
77+
<Compile Include="TcpChannelFactory.cs" />
78+
<Compile Include="TcpChannelProvider.cs" />
79+
</ItemGroup>
80+
<ItemGroup>
81+
<None Include="packages.config" />
82+
<None Include="Resources\AboutResources.txt" />
83+
</ItemGroup>
84+
<ItemGroup>
85+
<AndroidResource Include="Resources\Values\Strings.xml" />
86+
</ItemGroup>
87+
<ItemGroup>
88+
<ProjectReference Include="..\Core\Core.csproj">
89+
<Project>{6481b999-0479-4162-ac53-5936ce5fd8bf}</Project>
90+
<Name>Core</Name>
91+
</ProjectReference>
92+
</ItemGroup>
93+
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
94+
<Import Project="..\packages\GitInfo.1.1.5\build\GitInfo.targets" Condition="Exists('..\packages\GitInfo.1.1.5\build\GitInfo.targets')" />
95+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
96+
<PropertyGroup>
97+
<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>
98+
</PropertyGroup>
99+
<Error Condition="!Exists('..\packages\GitInfo.1.1.5\build\GitInfo.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitInfo.1.1.5\build\GitInfo.targets'))" />
100+
</Target>
101+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
102+
Other similar extension points exist, see Microsoft.Common.targets.
103+
<Target Name="BeforeBuild">
104+
</Target>
105+
<Target Name="AfterBuild">
106+
</Target>
107+
-->
108+
</Project>

src/Core.Android/Hermes.snk

596 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
using System.Reflection;
2+
3+
[assembly: AssemblyTitle ("System.Net.Mqtt.Core.Android")]
4+
[assembly: AssemblyDescription ("Mqtt shared components for Android projects.")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Images, layout descriptions, binary blobs and string dictionaries can be included
2+
in your application as resource files. Various Android APIs are designed to
3+
operate on the resource IDs instead of dealing with images, strings or binary blobs
4+
directly.
5+
6+
For example, a sample Android app that contains a user interface layout (main.axml),
7+
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8+
would keep its resources in the "Resources" directory of the application:
9+
10+
Resources/
11+
drawable/
12+
icon.png
13+
14+
layout/
15+
main.axml
16+
17+
values/
18+
strings.xml
19+
20+
In order to get the build system to recognize Android resources, set the build action to
21+
"AndroidResource". The native Android APIs do not operate directly with filenames, but
22+
instead operate on resource IDs. When you compile an Android application that uses resources,
23+
the build system will package the resources for distribution and generate a class called "R"
24+
(this is an Android convention) that contains the tokens for each one of the resources
25+
included. For example, for the above Resources layout, this is what the R class would expose:
26+
27+
public class R {
28+
public class drawable {
29+
public const int icon = 0x123;
30+
}
31+
32+
public class layout {
33+
public const int main = 0x456;
34+
}
35+
36+
public class strings {
37+
public const int first_string = 0xabc;
38+
public const int second_string = 0xbcd;
39+
}
40+
}
41+
42+
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43+
to reference the layout/main.axml file, or R.strings.first_string to reference the first
44+
string in the dictionary file values/strings.xml.

src/Core.Android/Resources/Resource.Designer.cs

+60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="Hello">Hello World, Click Me!</string>
4+
<string name="ApplicationName">$projectname$</string>
5+
</resources>

src/Client.iOS/TcpBinding.cs renamed to src/Core.Android/TcpBinding.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Net.Mqtt.Diagnostics;
22

3-
namespace System.Net.Mqtt.Client
3+
namespace System.Net.Mqtt
44
{
55
public class TcpBinding : IProtocolBinding
66
{

src/Client.iOS/TcpChannel.cs renamed to src/Core.Android/TcpChannel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.Reactive.Subjects;
99
using System.Threading.Tasks;
1010

11-
namespace System.Net.Mqtt.Client
11+
namespace System.Net.Mqtt
1212
{
1313
internal class TcpChannel : IChannel<byte[]>
1414
{

src/Client.iOS/TcpChannelFactory.cs renamed to src/Core.Android/TcpChannelFactory.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Net.Mqtt.Exceptions;
33
using System.Net.Sockets;
44

5-
namespace System.Net.Mqtt.Client
5+
namespace System.Net.Mqtt
66
{
77
internal class TcpChannelFactory : IChannelFactory
88
{

src/Client.iOS/TcpChannelProvider.cs renamed to src/Core.Android/TcpChannelProvider.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Reactive.Linq;
55
using System.Threading.Tasks;
66

7-
namespace System.Net.Mqtt.Client
7+
namespace System.Net.Mqtt
88
{
99
internal class TcpChannelProvider : IChannelProvider
1010
{

src/Core.Android/packages.config

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="GitInfo" version="1.1.5" targetFramework="monoandroid51" />
4+
<package id="Rx-Core" version="2.2.5" targetFramework="monoandroid51" />
5+
<package id="Rx-Interfaces" version="2.2.5" targetFramework="monoandroid51" />
6+
<package id="Rx-Linq" version="2.2.5" targetFramework="monoandroid51" />
7+
<package id="Rx-Main" version="2.2.5" targetFramework="monoandroid51" />
8+
<package id="Rx-PlatformServices" version="2.2.5" targetFramework="monoandroid51" />
9+
</packages>

0 commit comments

Comments
 (0)