-using System.Reflection;\r
-using System.Runtime.CompilerServices;\r
-using System.Runtime.InteropServices;\r
-\r
-// General Information about an assembly is controlled through the following \r
-// set of attributes. Change these attribute values to modify the information\r
-// associated with an assembly.\r
-[assembly: AssemblyTitle("Tizen.Messaging")]\r
-[assembly: AssemblyDescription("")]\r
-[assembly: AssemblyConfiguration("")]\r
-[assembly: AssemblyCompany("")]\r
-[assembly: AssemblyProduct("Tizen.Messaging")]\r
-[assembly: AssemblyCopyright("Copyright © 2016")]\r
-[assembly: AssemblyTrademark("")]\r
-[assembly: AssemblyCulture("")]\r
-\r
-// Setting ComVisible to false makes the types in this assembly not visible \r
-// to COM components. If you need to access a type in this assembly from \r
-// COM, set the ComVisible attribute to true on that type.\r
-[assembly: ComVisible(false)]\r
-\r
-// The following GUID is for the ID of the typelib if this project is exposed to COM\r
-[assembly: Guid("4f3ffd8c-4a03-4bc1-83d4-358b0eb6717c")]\r
-\r
-// Version information for an assembly consists of the following four values:\r
-//\r
-// Major Version\r
-// Minor Version \r
-// Build Number\r
-// Revision\r
-//\r
-// You can specify all the values or you can default the Build and Revision Numbers \r
-// by using the '*' as shown below:\r
-// [assembly: AssemblyVersion("1.0.*")]\r
-[assembly: AssemblyVersion("1.0.0.0")]\r
-[assembly: AssemblyFileVersion("1.0.0.0")]\r
+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("Tizen.Messaging")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Tizen.Messaging")]
+[assembly: AssemblyCopyright("Copyright © 2016")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("4f3ffd8c-4a03-4bc1-83d4-358b0eb6717c")]
+
+// 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")]
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.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>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{2EC5CFA1-06D5-4E84-81EC-D3A57B24B6BD}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Tizen.Messaging</RootNamespace>
+ <AssemblyName>Tizen.Messaging.Push</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
+ </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>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>true</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>Tizen.Messaging.Push.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Interop\Interop.Glib.cs" />
+ <Compile Include="Interop\Interop.Libc.cs" />
+ <Compile Include="Interop\Interop.Libraries.cs" />
+ <Compile Include="Interop\Interop.Push.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Tizen.Messaging.Push\Push.cs" />
+ <Compile Include="Tizen.Messaging.Push\PushConnectionStateEventArgs.cs" />
+ <Compile Include="Tizen.Messaging.Push\PushExceptionFactory.cs" />
+ <Compile Include="Tizen.Messaging.Push\PushImpl.cs" />
+ <Compile Include="Tizen.Messaging.Push\PushMessageEventArgs.cs" />
+ <Compile Include="Tizen.Messaging.Push\ServerResponse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Tizen.Messaging.Push.snk" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="Tizen">
+ <PkgConfig>csapi-tizen</PkgConfig>
+ <HintPath>..\..\tizen\Tizen\bin\Debug\Tizen.dll</HintPath>
+ </Reference>
+ <Reference Include="Tizen.Internals">
+ <PkgConfig>csapi-tizen</PkgConfig>
+ <HintPath>..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\tizen\Tizen.Internals\Tizen.Internals.csproj">
+ <Project>{B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}</Project>
+ <Name>Tizen.Internals</Name>
+ <Private>True</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\tizen\Tizen\Tizen.csproj">
+ <Project>{7659CA59-410D-41A1-9841-586E88BC78C9}</Project>
+ <Name>Tizen</Name>
+ <Private>True</Private>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.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>
}
else
{
- ob.AppData = "";
+ ob.AppData = "";
}
string message;
result = Interop.Push.GetNotificationMessage(notification, out message);
}
else
{
- ob.Message = "";
+ ob.Message = "";
}
string sender;
result = Interop.Push.GetNotificationSender(notification, out sender);
}
else
{
- ob.Sender = "";
+ ob.Sender = "";
}
string sessioninfo;
result = Interop.Push.GetNotificationSessionInfo(notification, out sessioninfo);
}
else
{
- ob.SessionInfo = "";
+ ob.SessionInfo = "";
}
string requestid;
result = Interop.Push.GetNotificationRequestId(notification, out requestid);
}
else
{
- ob.RequestId = "";
+ ob.RequestId = "";
}
int time;
result = Interop.Push.GetNotificationTime(notification, out time);
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Tizen.Messaging</RootNamespace>
- <AssemblyName>Tizen.Messaging</AssemblyName>
+ <AssemblyName>Tizen.Messaging.Push</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
- <Reference Include="Tizen">
- <HintPath>..\..\pushtest\lib\Tizen.dll</HintPath>
- </Reference>
- <Reference Include="Tizen.Internals">
- <HintPath>..\..\pushtest\lib\Tizen.Internals.dll</HintPath>
- </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Interop\Interop.Glib.cs" />
<ItemGroup>
<None Include="Tizen.Messaging.Push.snk" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\tizen\Tizen.Internals\Tizen.Internals.csproj">
+ <Project>{b9aa1cb2-f72d-4a30-a33b-a20c850a38a0}</Project>
+ <Name>Tizen.Internals</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\tizen\Tizen\Tizen.csproj">
+ <Project>{7659ca59-410d-41a1-9841-586e88bc78c9}</Project>
+ <Name>Tizen</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.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="AfterBuild">
</Target>
-->
-</Project>
\ No newline at end of file
+</Project>
-%define dllpath %{_libdir}/mono/tizen
-%define dllname Tizen.Messaging.Push.dll
+%define BUILDCONF Debug
Name: csapi-push
Summary: Tizen Push API for C#
Source1: %{name}.manifest
Source2: %{name}.pc.in
-# TODO: replace mono-compiler, mono-devel to mcs, mono-shlib-cop
BuildRequires: mono-compiler
BuildRequires: mono-devel
-# TODO: replace mono-core to gacutil.
-# mono-core should provide the symbol 'gacutil'
-Requires(post): mono-core
-Requires(postun): mono-core
-
-# P/Invoke Dependencies
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(csapi-tizen)
BuildRequires: libpush
%build
# build dll
-mcs -target:library -out:%{dllname} -keyfile:Tizen.Messaging/Tizen.Messaging.Push.snk -pkg:'csapi-tizen'\
- Tizen.Messaging/Properties/AssemblyInfo.cs \
- Tizen.Messaging/Interop/*.cs \
- Tizen.Messaging/Push/*.cs
-
-# check p/invoke
-if [ -x %{dllname} ]; then
- RET=`mono-shlib-cop %{dllname}`; \
- CNT=`echo $RET | grep -E "^error:" | wc -l`; \
- if [ $CNT -gt 0 ]; then exit 1; fi
-fi
+xbuild Tizen.Messaging.Push/Tizen.Messaging.Push.csproj /p:Configuration=%{BUILDCONF}
%install
-# copy dll
-mkdir -p %{buildroot}%{dllpath}
-install -p -m 644 %{dllname} %{buildroot}%{dllpath}
+gacutil -i Tizen.Messaging.Push/bin/%{BUILDCONF}/Tizen.Messaging.Push.dll -root "%{buildroot}%{_libdir}" -package tizen
# generate pkgconfig
+%define pc_libs %{_libdir}/mono/tizen/Tizen.Messaging.Push.dll
mkdir -p %{buildroot}%{_libdir}/pkgconfig
sed -e "s#@version@#%{version}#g" \
-e "s#@dllpath@#%{dllpath}#g" \
-e "s#@dllname@#%{dllname}#g" \
%{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
-%post
-gacutil -i %{dllpath}/%{dllname}
-
%files
-%{dllpath}/%{dllname}
+%manifest %{name}.manifest
+%{_libdir}/mono/
%files devel
%{_libdir}/pkgconfig/%{name}.pc