Base code with Doxygen
authoryuvaraj.s <yuvaraj.s@samsung.com>
Thu, 7 Apr 2016 09:57:42 +0000 (15:27 +0530)
committeryuvaraj.s <yuvaraj.s@samsung.com>
Mon, 18 Apr 2016 10:37:09 +0000 (16:07 +0530)
Change-Id: I3cabc63295696a3bfe975bf06cc68faf84efebf6
Signed-off-by: yuvaraj.s <yuvaraj.s@samsung.com>
Tizen.Content.Download/Properties/AssemblyInfo.cs [new file with mode: 0644]
Tizen.Content.Download/Tizen.Content.Download.csproj [new file with mode: 0644]
Tizen.Content.Download/Tizen.Content.Download.snk [new file with mode: 0644]
Tizen.Content.Download/download/DownloadEnumerator.cs [new file with mode: 0644]
Tizen.Content.Download/download/Notification.cs [new file with mode: 0644]
Tizen.Content.Download/download/Request.cs [new file with mode: 0644]
download.sln [new file with mode: 0644]
download.v12.suo [new file with mode: 0644]
packaging/csapi-download.in [new file with mode: 0644]
packaging/csapi-download.manifest [new file with mode: 0644]
packaging/csapi-download.spec [new file with mode: 0644]

diff --git a/Tizen.Content.Download/Properties/AssemblyInfo.cs b/Tizen.Content.Download/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..1520788
--- /dev/null
@@ -0,0 +1,36 @@
+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.Content.Download")]\r
+[assembly: AssemblyDescription("")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("")]\r
+[assembly: AssemblyProduct("Tizen.Content.Download")]\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("5df9cb6c-6def-4472-883c-573cb0b4d61d")]\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
diff --git a/Tizen.Content.Download/Tizen.Content.Download.csproj b/Tizen.Content.Download/Tizen.Content.Download.csproj
new file mode 100644 (file)
index 0000000..c534785
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+    <ProjectGuid>{7F7C271D-B195-4186-9B0C-CCEE8B5F561E}</ProjectGuid>\r
+    <OutputType>Library</OutputType>\r
+    <AppDesignerFolder>Properties</AppDesignerFolder>\r
+    <RootNamespace>Tizen.Content.Download</RootNamespace>\r
+    <AssemblyName>Tizen.Content.Download</AssemblyName>\r
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r
+    <FileAlignment>512</FileAlignment>\r
+    <TargetFrameworkProfile />\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>full</DebugType>\r
+    <Optimize>false</Optimize>\r
+    <OutputPath>bin\Debug\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+    <DebugType>pdbonly</DebugType>\r
+    <Optimize>true</Optimize>\r
+    <OutputPath>bin\Release\</OutputPath>\r
+    <DefineConstants>TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <SignAssembly>true</SignAssembly>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <AssemblyOriginatorKeyFile>Tizen.Content.Download.snk</AssemblyOriginatorKeyFile>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Reference Include="System" />\r
+    <Reference Include="System.Core" />\r
+    <Reference Include="System.Xml.Linq" />\r
+    <Reference Include="System.Data.DataSetExtensions" />\r
+    <Reference Include="Microsoft.CSharp" />\r
+    <Reference Include="System.Data" />\r
+    <Reference Include="System.Xml" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="Class1.cs" />\r
+    <Compile Include="Properties\AssemblyInfo.cs" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="Tizen.Content.Download.snk" />\r
+  </ItemGroup>\r
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+       Other similar extension points exist, see Microsoft.Common.targets.\r
+  <Target Name="BeforeBuild">\r
+  </Target>\r
+  <Target Name="AfterBuild">\r
+  </Target>\r
+  -->\r
+</Project>
\ No newline at end of file
diff --git a/Tizen.Content.Download/Tizen.Content.Download.snk b/Tizen.Content.Download/Tizen.Content.Download.snk
new file mode 100644 (file)
index 0000000..0bd942d
Binary files /dev/null and b/Tizen.Content.Download/Tizen.Content.Download.snk differ
diff --git a/Tizen.Content.Download/download/DownloadEnumerator.cs b/Tizen.Content.Download/download/DownloadEnumerator.cs
new file mode 100644 (file)
index 0000000..797f88a
--- /dev/null
@@ -0,0 +1,89 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Tizen.Content.Download
+{
+    /// <summary>
+    /// Enumeration for download state.
+    /// </summary>
+    public enum DownloadState
+    {
+        /// <summary>
+        /// Unhandled exception
+        /// <summary>
+        None,
+        /// <summary>
+        /// Ready to download
+        /// <summary>
+        Ready,
+        /// <summary>
+        /// Queued to start downloading
+        /// <summary>
+        Queued,
+        /// <summary>
+        /// Currently downloading
+        /// <summary>
+        Downloading,
+        /// <summary>
+        /// Download is paused and can be resumed
+        /// <summary>
+        Paused,
+        /// <summary>
+        /// The download is completed
+        /// <summary>
+        Completed,
+        /// <summary>
+        /// The download failed
+        /// <summary>
+        Failed,
+        /// <summary>
+        /// User canceled the download request
+        /// <summary>
+        Canceled
+    }
+
+    /// <summary>
+    /// Enumeration for network type.
+    /// </summary>
+    public enum NetworkType
+    {
+        /// <summary>
+        /// Download is available through data network
+        /// <summary>
+        DataNetwork,
+        /// <summary>
+        /// Download is available through WiFi
+        /// <summary>
+        Wifi,
+        /// <summary>
+        /// Download is available through WiFi-Direct
+        /// <summary>
+        WifiDirect,
+        /// <summary>
+        /// Download is available through either data network or WiFi
+        /// <summary>
+        All
+    }
+
+    /// <summary>
+    /// Enumeration for notification type.
+    /// </summary>
+    public enum NotificationType
+    {
+        /// <summary>
+        /// Do not register notification
+        /// <summary>
+        None,
+        /// <summary>
+        /// Completion notification for success state and failed state
+        /// <summary>
+        CompleteOnly,
+        /// <summary>
+        /// All download notifications for ongoing state, success state and failed state
+        /// <summary>
+        All
+    }
+}
+
diff --git a/Tizen.Content.Download/download/Notification.cs b/Tizen.Content.Download/download/Notification.cs
new file mode 100644 (file)
index 0000000..d8a813c
--- /dev/null
@@ -0,0 +1,108 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Tizen.Applications;
+
+namespace Tizen.Content.Download
+{
+    /// <summary>
+    /// The Notification class consists of all the properties required to set notification for download operation.
+    /// </summary>
+    public class Notification
+    {
+        /// <summary>
+        /// Title of the notification.
+        /// If user tries to get before setting, null is returned.
+        /// </summary>
+        public string Title
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// Description of the notification.
+        /// If user tries to get before setting, null is returned.
+        /// </summary>
+        public string Description
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// Type of Notification.
+        /// If user tries to get before setting, defaule NotificationType None is returned.
+        /// </summary>
+        public NotificationType Type
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// AppControl for an ongoing download notification.
+        /// If user tries to get before setting, null is returned.
+        /// </summary>
+        /// <remarks>
+        /// When the notification message is clicked, the action is decided by the app control.
+        /// </remarks>
+        public AppControl AppControlOngoing
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// AppControl for a completed download notification.
+        /// If user tries to get before setting, null is returned.
+        /// </summary>
+        /// <remarks>
+        /// When the notification message is clicked, the action is decided by the app control
+        /// </remarks>
+        public AppControl AppControlComplete
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// AppControl for a failed download notification.
+        /// If user tries to get before setting, null is returned.
+        /// </summary>
+        /// <remarks>
+        /// When the notification message is clicked, the action is decided by the app control
+        /// </remarks>
+        public AppControl AppControlFail
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+    }
+}
+
diff --git a/Tizen.Content.Download/download/Request.cs b/Tizen.Content.Download/download/Request.cs
new file mode 100644 (file)
index 0000000..0ee5eb6
--- /dev/null
@@ -0,0 +1,348 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Tizen.Applications;
+
+namespace Tizen.Content.Download
+{
+    /// <summary>
+    /// The Request class provides functions to create and manage one or more download requests.
+    /// </summary>
+    public class Request : IDisposable
+    {
+        /// <summary>
+        /// Creates a Request object.
+        /// </summary>
+        /// <param name="url"> URL to download</param>
+        public Request(string url)
+        {
+        }
+
+        /// <summary>
+        /// Creates a Request object.
+        /// </summary>
+        /// <param name="url"> URL to download</param>
+        /// <param name="destinationPath"> Directory path where downloaded file is stored </param>
+        /// <param name="fileName"> Name of the downloaded file </param>
+        /// <param name="type"> Network type which the download request must adhere to </param>
+        public Request(string url, string destinationPath, string fileName, NetworkType type)
+        {
+        }
+
+        /// <summary>
+        /// Creates a Request object.
+        /// </summary>
+        /// <param name="url"> URL to download</param>
+        /// <param name="destinationPath"> Directory path where downloaded file is stored </param>
+        /// <param name="fileName"> Name of the downloaded file </param>
+        /// <param name="type"> Network type which the download request must adhere to </param>
+        /// <param name-"httpHeaders"> HTTP header fields for download request </param>
+        public Request(string url, string destinationPath, string fileName, NetworkType type, Dictionary<string, string> httpHeaders)
+        {
+        }
+
+        /// <summary>
+        /// Event that occurs when the download state changes.
+        /// </summary>
+        public event EventHandler<StateChangedEventArgs> StateChanged
+        {
+        }
+
+        /// <summary>
+        /// Event that occurs when the download progress changes.
+        /// </summary>
+        public event EventHandler<ProgressChangedEventArgs> ProgressChanged
+        {
+        }
+
+        /// <summary>
+        /// Absolute path to save the downloaded file.
+        /// If you try to get this property value before calling Start(), an empty string is returned.
+        /// </summary>
+        public string DownloadedPath
+        {
+            get
+            {
+            }
+        }
+
+        /// <summary>
+        /// MIME type of the downloaded content.
+        /// If you try to get this property value before calling Start(), an empty string is returned.
+        /// </summary>
+        public string MimeType
+        {
+            get
+            {
+            }
+        }
+
+        /// <summary>
+        /// Current state of the download.
+        /// </summary>
+        public DownloadState State
+        {
+            get
+            {
+            }
+        }
+
+        /// <summary>
+        /// Content name of the downloaded file.
+        /// This can be defined with reference of HTTP response header data. The content name can be received when HTTP response header is received.
+        /// If you try to get this property value before calling Start(), an empty string is returned.
+        /// </summary>
+        public string ContentName
+        {
+            get
+            {
+            }
+        }
+
+        /// <summary>
+        /// Total size of downloaded content.
+        /// This information is received from the server. If the server does not send the total size of the content, content_size is set to zero.
+        /// If you try to get this property value before calling Start(), 0 is returned.
+        /// </summary>
+        public ulong ContentSize
+        {
+            get
+            {
+            }
+        }
+
+        /// <summary>
+        /// HTTP status code when a download exception occurs.
+        /// If you try to get this property value before calling Start(), -1 is returned.
+        /// </summary>
+        public int HttpStatus
+        {
+            get
+            {
+            }
+        }
+
+        /// <summary>
+        /// ETag value from the HTTP response header when making a HTTP request for resume.
+        /// If you try to get this property value before calling Start(), an empty string is returned.
+        /// </summary>
+        /// <remarks>
+        /// The etag value is available or not depending on the web server. If not available, then on get of the property null is returned.
+        /// After download is started, it can get the etag value.
+        /// </remarks>
+        public string ETagValue
+        {
+            get
+            {
+            }
+        }
+
+        /// <summary>
+        /// Contains properties required for creating download notifications.
+        /// </summary>
+        /// <remarks>
+        /// When the notification message is clicked, the action to take is decided by the app control.
+        /// If the app control is not set, the following default operation is executed when the notification message is clicked:
+        ///  1) download completed state - the viewer application is executed according to extension name of downloaded content,
+        ///  2) download failed state and ongoing state - the client application is executed.
+        /// Should be set before calling Start().
+        /// </remarks>
+        public Notification NotificationProperties
+        {
+            get
+            {
+            }
+        }
+
+        /// <summary>
+        /// URL to download.
+        /// </summary>
+        /// <remarks>
+        /// Should be set before calling Start().
+        /// If you try to get this property value before setting, an empty string is returned.
+        /// </remarks>
+        public string Url
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// Allowed network type for downloading the file.
+        /// The file will be downloaded only under the allowed network.
+        /// If you try to get this property value before setting, default value NetworkType All is returned.
+        /// </summary>
+        /// <remarks>
+        /// Should be set before calling Start().
+        /// </remarks>
+        public NetworkType AllowedNetworkType
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// The file will be downloaded to the set destination file path. The downloaded file is saved to an auto-generated file name in the destination. If the destination is not specified, the file will be downloaded to default storage.
+        /// If you try to get this property value before setting, an empty string is returned.
+        /// </summary>
+        /// <remarks>
+        /// Should be set before calling Start().
+        /// </remarks>
+        public string DestinationPath
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// The file will be saved in the specified destination or default storage with the set file name. If the file name is not specified, the downloaded file will be saved with an auto-generated file name in the destination.
+        /// If you try to get this property value before setting, an empty string is returned.
+        /// </summary>
+        /// <remarks>
+        /// Should be set before calling Start().
+        /// </remarks>
+        public string FileName
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// Enables or disables auto download.
+        /// If this option is enabled, the previous downloading item is restarted automatically as soon as the download daemon is restarted. The download progress continues after the client process is terminated.
+        /// If you try to get this property value before setting, default value false is returned.
+        /// </summary>
+        /// <remarks>
+        /// The default value is false.
+        /// </remarks>
+        public bool AutoDownload
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// Directory path of the temporary file used in the previous download request.
+        /// This is only useful when resuming download to make HTTP request header at the client side. Otherwise, the path is ignored.
+        /// If you try to get this property value before setting, an empty string is returned.
+        /// </summary>
+        /// <remarks>
+        /// If the etag value is not present in the download database, it is not useful to set the temporary file path.
+        /// When resuming download request, the data is attached at the end of this temporary file.
+        /// </remarks>
+        public string TempFilePath
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// HTTP header field and value pairs to the download request.
+        /// HTTP header <field,value> pair is the <key,value> pair in the Dictionary HttpHeaders
+        /// The given HTTP header field will be included with the HTTP request of the download request.
+        /// If you try to get this property value before setting, an empty dictionary is returned.
+        /// </summary>
+        /// <remarks>
+        /// HTTP header fields should be set before calling Start().
+        /// HTTP header fields can be removed before calling Start().
+        /// </remarks>
+        public Dictionary<string, string> HttpHeaders
+        {
+            get
+            {
+            }
+            set
+            {
+            }
+        }
+
+        /// <summary>
+        /// Starts or resumes download.
+        /// Starts to download the current URL, or resumes the download if paused.
+        /// </summary>
+        /// <remarks>
+        /// The URL is the mandatory information to start the download.
+        /// </remarks>
+        public void Start()
+        {
+        }
+
+        /// <summary>
+        /// Pauses download request.
+        /// </summary>
+        /// <remarks>
+        /// The paused download request can be restarted with Start() or canceled with Cancel().
+        /// </remarks>
+        public void Pause()
+        {
+        }
+
+        /// <summary>
+        /// Cancels download request.
+        /// </summary>
+        /// <remarks>
+        /// The canceled download can be restarted with Start().
+        /// </remarks>
+        public void Cancel()
+        {
+        }
+    }
+
+    /// <summary>
+    /// An extended EventArgs class which contains changed download state type.
+    /// </summary>
+    public class StateChangedEventArgs : EventArgs
+    {
+        /// <summary>
+        /// Present download state.
+        /// </summary>
+        public DownloadState state
+        {
+            get
+            {
+            }
+        }
+    }
+
+    /// <summary>
+    /// An extended EventArgs class which contains size of received data in bytes.
+    /// </summary>
+    public class ProgressChangedEventArgs : EventArgs
+    {
+        /// <summary>
+        /// Received data size in bytes.
+        /// </summary>
+        public ulong receivedDataSize
+        {
+            get
+            {
+            }
+        }
+    }
+}
+
diff --git a/download.sln b/download.sln
new file mode 100644 (file)
index 0000000..18c20bd
--- /dev/null
@@ -0,0 +1,22 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Express 2013 for Windows Desktop\r
+VisualStudioVersion = 12.0.21005.1\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.Content.Download", "Tizen.Content.Download\Tizen.Content.Download.csproj", "{7F7C271D-B195-4186-9B0C-CCEE8B5F561E}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Release|Any CPU = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {7F7C271D-B195-4186-9B0C-CCEE8B5F561E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {7F7C271D-B195-4186-9B0C-CCEE8B5F561E}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {7F7C271D-B195-4186-9B0C-CCEE8B5F561E}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {7F7C271D-B195-4186-9B0C-CCEE8B5F561E}.Release|Any CPU.Build.0 = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/download.v12.suo b/download.v12.suo
new file mode 100644 (file)
index 0000000..5a6b304
Binary files /dev/null and b/download.v12.suo differ
diff --git a/packaging/csapi-download.in b/packaging/csapi-download.in
new file mode 100644 (file)
index 0000000..09686c3
--- /dev/null
@@ -0,0 +1,5 @@
+Name: csapi-download
+Description: Tizen Download API for C#
+Version: @version@
+Libs: -r:@dllpath@/@dllname@
+Requires:
diff --git a/packaging/csapi-download.manifest b/packaging/csapi-download.manifest
new file mode 100644 (file)
index 0000000..75b0fa5
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+    <request>
+        <domain name="_"/>
+    </request>
+</manifest>
diff --git a/packaging/csapi-download.spec b/packaging/csapi-download.spec
new file mode 100644 (file)
index 0000000..809637e
--- /dev/null
@@ -0,0 +1,76 @@
+%define dllpath %{_libdir}/mono/tizen
+%define dllname Tizen.Content.Download.dll
+
+Name:       csapi-download
+Summary:    Tizen Downlaod API for C#
+Version:    1.0.0
+Release:    1
+Group:      Development/Libraries
+License:    Apache-2.0
+URL:        https://www.tizen.org
+Source0:    %{name}-%{version}.tar.gz
+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(capi-appfw-application)
+BuildRequires: pkgconfig(capi-web-url-download)
+
+%description
+Tizen API for C#
+
+%package devel
+Summary:    Development package for %{name}
+Group:      Development/Libraries
+Requires:   %{name} = %{version}-%{release}
+
+%description devel
+Development package for %{name}
+
+%prep
+%setup -q
+
+cp %{SOURCE1} .
+
+%build
+# build dll
+mcs -target:library -out:%{dllname} -keyfile:Tizen.Content.Download/Tizen.Content.Download.snk \
+  Tizen.Content.Download/Properties/AssemblyInfo.cs \
+  Tizen.Content.Download/download/*.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
+
+%install
+# copy dll
+mkdir -p %{buildroot}%{dllpath}
+install -p -m 644 %{dllname} %{buildroot}%{dllpath}
+
+# generate pkgconfig
+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}
+
+%files devel
+%{_libdir}/pkgconfig/%{name}.pc