Fixed class layout and code changes for HttpHeaders property
authorDinesh Dwivedi <dinesh.d@samsung.com>
Wed, 1 Jun 2016 14:16:37 +0000 (19:46 +0530)
committerDinesh Dwivedi <dinesh.d@samsung.com>
Thu, 2 Jun 2016 10:03:23 +0000 (15:33 +0530)
Change-Id: I5a95217201303dea63ae849553981efc27ad9a3b
Signed-off-by: Dinesh Dwivedi <dinesh.d@samsung.com>
src/Tizen.Content.Download/Interop/Interop.Download.cs
src/Tizen.Content.Download/Tizen.Content.Download/DownloadEnumerator.cs
src/Tizen.Content.Download/Tizen.Content.Download/DownloadErrorFactory.cs
src/Tizen.Content.Download/Tizen.Content.Download/Notification.cs
src/Tizen.Content.Download/Tizen.Content.Download/ProgressChangedEventArgs.cs
src/Tizen.Content.Download/Tizen.Content.Download/Request.cs
src/Tizen.Content.Download/Tizen.Content.Download/StateChangedEventArgs.cs

index 713e6c7..e4b52d3 100644 (file)
@@ -1,4 +1,12 @@
-using System;
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
 using System.Runtime.InteropServices;
 using Tizen.Applications;
 
@@ -6,11 +14,11 @@ internal static partial class Interop
 {
     internal static partial class Download
     {
-        //capi-web-url-download
         // Request class
-        //Callback delegate for event
-        internal delegate void StateChangedCallback(int requestId, int state, IntPtr userData);
 
+        [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+        internal delegate void StateChangedCallback(int requestId, int state, IntPtr userData);
+        [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
         internal delegate void ProgressChangedCallback(int requestId, ulong receivedSize, IntPtr userData);
 
         [DllImport(Libraries.Download, EntryPoint = "download_create")]
@@ -77,6 +85,7 @@ internal static partial class Interop
         internal static extern int UnsetProgressCallback(int requestId);
 
         // Notification class
+
         [DllImport(Libraries.Download, EntryPoint = "download_set_notification_title")]
         internal static extern int SetNotificationTitle(int requestId, string title);
         [DllImport(Libraries.Download, EntryPoint = "download_get_notification_title")]
index db96b6b..fcbc92a 100644 (file)
@@ -1,4 +1,10 @@
-using System;
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
 
 namespace Tizen.Content.Download
 {
@@ -89,7 +95,8 @@ namespace Tizen.Content.Download
         Completed,
         Failed
     }
-    static internal class Downloads
+
+    internal static class Globals
     {
         internal const string LogTag = "Tizen.Content.Download";
     }
index ea1fec0..54edd96 100644 (file)
@@ -1,4 +1,12 @@
-using System;
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
 using Tizen.Internals.Errors;
 
 namespace Tizen.Content.Download
index b66d892..813f15d 100644 (file)
@@ -1,3 +1,11 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
 using System;
 using Tizen.Applications;
 
@@ -14,6 +22,7 @@ namespace Tizen.Content.Download
         {
             _downloadId = requestId;
         }
+
         /// <summary>
         /// Title of the notification.
         /// If user tries to get before setting, empty string is returned.
@@ -26,7 +35,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetNotificationTitle(_downloadId, out title);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get Notification Title, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get Notification Title, " + (DownloadError)ret);
                     return String.Empty;
                 }
                 return title;
@@ -53,7 +62,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetNotificationDescription(_downloadId, out description);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get Notification Description, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get Notification Description, " + (DownloadError)ret);
                     return String.Empty;
                 }
                 return description;
@@ -80,7 +89,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetNotificationType(_downloadId, out type);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get NotificationType, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get NotificationType, " + (DownloadError)ret);
                     return 0;
                 }
                 return (NotificationType)type;
@@ -110,7 +119,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetNotificationAppControl(_downloadId, (int)NotificationAppControlType.Downloading, out handle);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get Ongoing type NotificationAppControl, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get Ongoing type NotificationAppControl, " + (DownloadError)ret);
                     return null;
                 }
                 return new AppControl(handle);
@@ -140,7 +149,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetNotificationAppControl(_downloadId, (int)NotificationAppControlType.Completed, out handle);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get Complete type NotificationAppControl, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get Complete type NotificationAppControl, " + (DownloadError)ret);
                     return null;
                 }
                 return new AppControl(handle);
@@ -170,7 +179,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetNotificationAppControl(_downloadId, (int)NotificationAppControlType.Failed, out handle);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get Fail type NotificationAppControl, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get Fail type NotificationAppControl, " + (DownloadError)ret);
                     return null;
                 }
                 return new AppControl(handle);
index 655337e..c3606f5 100644 (file)
@@ -1,3 +1,11 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
 using System;
 
 namespace Tizen.Content.Download
@@ -13,6 +21,7 @@ namespace Tizen.Content.Download
         {
             _size = size;
         }
+
         /// <summary>
         /// Received data size in bytes.
         /// </summary>
index a772bc8..3ffcfd7 100644 (file)
@@ -1,4 +1,12 @@
-using System;
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
 using System.Collections.Generic;
 using System.Runtime.InteropServices;
 
@@ -11,11 +19,13 @@ namespace Tizen.Content.Download
     {
         private int _downloadId;
         private Notification _notificationProperties;
+        private IDictionary<string, string> _httpHeaders;
         private EventHandler<StateChangedEventArgs> _downloadStateChanged;
         private Interop.Download.StateChangedCallback _downloadStateChangedCallback;
         private EventHandler<ProgressChangedEventArgs> _downloadProgressChanged;
         private Interop.Download.ProgressChangedCallback _downloadProgressChangedCallback;
         private bool _disposed = false;
+
         /// <summary>
         /// Creates a Request object.
         /// </summary>
@@ -37,6 +47,7 @@ namespace Tizen.Content.Download
                 DownloadErrorFactory.ThrowException(ret, "Setting Url failed");
             }
             _notificationProperties = new Notification(_downloadId);
+            _httpHeaders = new Dictionary<string, string>();
         }
 
         /// <summary>
@@ -83,6 +94,7 @@ namespace Tizen.Content.Download
             }
 
             _notificationProperties = new Notification(_downloadId);
+            _httpHeaders = new Dictionary<string, string>();
         }
 
         /// <summary>
@@ -129,16 +141,8 @@ namespace Tizen.Content.Download
                 DownloadErrorFactory.ThrowException(ret, "Setting NetworkType failed");
             }
 
-            foreach (KeyValuePair<string, string> entry in httpHeaders)
-            {
-                ret = Interop.Download.AddHttpHeaderField(_downloadId, entry.Key, entry.Value);
-                if (ret != (int)DownloadError.None)
-                {
-                    DownloadErrorFactory.ThrowException(ret, "Adding HttpHeaderField failed");
-                }
-            }
-
             _notificationProperties = new Notification(_downloadId);
+            _httpHeaders = httpHeaders;
         }
 
         ~Request()
@@ -147,31 +151,6 @@ namespace Tizen.Content.Download
         }
 
         /// <summary>
-        /// Releases all resources used by the Request class.
-        /// </summary>
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-        }
-
-        /// <summary>
-        /// Deletes the corresponding download request.
-        /// </summary>
-        protected virtual void Dispose(bool disposing)
-        {
-            if (_disposed)
-                return;
-
-            if (disposing)
-            {
-                // Free managed objects.
-            }
-            Interop.Download.DestroyRequest(_downloadId);
-            _disposed = true;
-        }
-
-        /// <summary>
         /// Event that occurs when the download state changes.
         /// </summary>
         public event EventHandler<StateChangedEventArgs> StateChanged
@@ -194,28 +173,6 @@ namespace Tizen.Content.Download
             }
         }
 
-        private void RegisterStateChangedEvent()
-        {
-            _downloadStateChangedCallback = (int downloadId, int downloadState, IntPtr userData) =>
-            {
-                StateChangedEventArgs eventArgs = new StateChangedEventArgs((DownloadState)downloadState);
-                _downloadStateChanged.Invoke(this, eventArgs);
-            };
-            int ret = Interop.Download.SetStateChangedCallback(_downloadId, _downloadStateChangedCallback, IntPtr.Zero);
-            if (ret != (int)DownloadError.None)
-            {
-                DownloadErrorFactory.ThrowException(ret, "Setting StateChanged callback failed");
-            }
-        }
-
-        private void UnregisterStateChangedEvent()
-        {
-            int ret = Interop.Download.UnsetStateChangedCallback(_downloadId);
-            if (ret != (int)DownloadError.None)
-            {
-                DownloadErrorFactory.ThrowException(ret, "Unsetting StateChanged callback failed");
-            }
-        }
         /// <summary>
         /// Event that occurs when the download progress changes.
         /// </summary>
@@ -239,29 +196,6 @@ namespace Tizen.Content.Download
             }
         }
 
-        private void RegisterProgressChangedEvent()
-        {
-            _downloadProgressChangedCallback = (int downloadId, ulong size, IntPtr userData) =>
-            {
-                ProgressChangedEventArgs eventArgs = new ProgressChangedEventArgs(size);
-                _downloadProgressChanged.Invoke(this, eventArgs);
-            };
-            int ret = Interop.Download.SetProgressCallback(_downloadId, _downloadProgressChangedCallback, IntPtr.Zero);
-            if (ret != (int)DownloadError.None)
-            {
-                DownloadErrorFactory.ThrowException(ret, "Setting ProgressChanged callback failed");
-            }
-        }
-
-        private void UnregisterProgressChangedEvent()
-        {
-            int ret = Interop.Download.UnsetProgressCallback(_downloadId);
-            if (ret != (int)DownloadError.None)
-            {
-                DownloadErrorFactory.ThrowException(ret, "Unsetting ProgressChanged callback failed");
-            }
-        }
-
         /// <summary>
         /// Absolute path where the file will be downloaded.
         /// If you try to get this property value before calling Start(), an empty string is returned.
@@ -277,7 +211,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetDownloadedPath(_downloadId, out path);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get DownloadedPath, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get DownloadedPath, " + (DownloadError)ret);
                     return String.Empty;
                 }
                 return path;
@@ -296,7 +230,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetMimeType(_downloadId, out mime);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get MimeType, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get MimeType, " + (DownloadError)ret);
                     return String.Empty;
                 }
                 return mime;
@@ -314,7 +248,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetState(_downloadId, out state);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get DownloadState, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get DownloadState, " + (DownloadError)ret);
                     return DownloadState.None;
                 }
                 return (DownloadState)state;
@@ -334,7 +268,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetContentName(_downloadId, out name);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get ContentName, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get ContentName, " + (DownloadError)ret);
                     return String.Empty;
                 }
                 return name;
@@ -354,7 +288,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetContentSize(_downloadId, out size);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get ContentSize, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get ContentSize, " + (DownloadError)ret);
                     return 0;
                 }
                 return size;
@@ -376,7 +310,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetHttpStatus(_downloadId, out status);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get HttpStatus, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get HttpStatus, " + (DownloadError)ret);
                     return 0;
                 }
                 return status;
@@ -399,7 +333,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetETag(_downloadId, out etag);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get ETagValue, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get ETagValue, " + (DownloadError)ret);
                     return String.Empty;
                 }
                 return etag;
@@ -439,7 +373,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetUrl(_downloadId, out url);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get Url, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get Url, " + (DownloadError)ret);
                     return String.Empty;
                 }
                 return url;
@@ -470,7 +404,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetNetworkType(_downloadId, out type);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get AllowedNetworkType, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get AllowedNetworkType, " + (DownloadError)ret);
                     return NetworkType.All;
                 }
                 return (NetworkType)type;
@@ -500,7 +434,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetDestination(_downloadId, out path);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get DestinationPath, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get DestinationPath, " + (DownloadError)ret);
                     return String.Empty;
                 }
                 return path;
@@ -530,7 +464,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetFileName(_downloadId, out name);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get FileName, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get FileName, " + (DownloadError)ret);
                     return String.Empty;
                 }
                 return name;
@@ -561,7 +495,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetAutoDownload(_downloadId, out value);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get AutoDownload, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get AutoDownload, " + (DownloadError)ret);
                     return false;
                 }
                 return value;
@@ -593,7 +527,7 @@ namespace Tizen.Content.Download
                 int ret = Interop.Download.GetTempFilePath(_downloadId, out path);
                 if (ret != (int)DownloadError.None)
                 {
-                    Log.Error(Downloads.LogTag, "Failed to get TempFilePath, " + (DownloadError)ret);
+                    Log.Error(Globals.LogTag, "Failed to get TempFilePath, " + (DownloadError)ret);
                     return String.Empty;
                 }
                 return path;
@@ -622,41 +556,7 @@ namespace Tizen.Content.Download
         {
             get
             {
-                Dictionary<string, string> httpHeaders = new Dictionary<string, string>();\r
-                IntPtr fieldsPointer;
-                int length;
-                int ret = Interop.Download.GetHttpHeaderFieldList(_downloadId, out fieldsPointer, out length);
-                if (ret != (int)DownloadError.None)
-                {
-                    Log.Error(Downloads.LogTag, "Failed to get HttpHeaders, " + (DownloadError)ret);
-                    return new Dictionary<string, string>();
-                }
-                string[] fields;
-                IntPtrToStringArray(fieldsPointer, length, out fields);
-                Interop.Libc.Free(fieldsPointer);
-                foreach (string field in fields)
-                {
-                    string value;
-                    ret = Interop.Download.GetHttpHeaderField(_downloadId, field, out value);
-                    if (ret != (int)DownloadError.None)
-                    {
-                        Log.Error(Downloads.LogTag, "Failed to get HttpHeader Field, " + (DownloadError)ret);
-                        return new Dictionary<string, string>();
-                    }
-                    httpHeaders.Add(field, value);
-                }
-                return httpHeaders;
-            }
-            set
-            {
-                foreach (KeyValuePair<string, string> entry in value)
-                {
-                    int ret = Interop.Download.AddHttpHeaderField(_downloadId, entry.Key, entry.Value);
-                    if (ret != (int)DownloadError.None)
-                    {
-                        DownloadErrorFactory.ThrowException(ret, "Failed to set HttpHeaders");
-                    }
-                }
+                return _httpHeaders;
             }
         }
 
@@ -669,7 +569,17 @@ namespace Tizen.Content.Download
         /// </remarks>
         public void Start()
         {
-            int ret = Interop.Download.StartDownload(_downloadId);
+            int ret = (int)DownloadError.None;
+            foreach (KeyValuePair<string, string> entry in _httpHeaders)
+            {
+                ret = Interop.Download.AddHttpHeaderField(_downloadId, entry.Key, entry.Value);
+                if (ret != (int)DownloadError.None)
+                {
+                    DownloadErrorFactory.ThrowException(ret, "Failed to set HttpHeaders");
+                }
+            }
+
+            ret = Interop.Download.StartDownload(_downloadId);
             if (ret != (int)DownloadError.None)
             {
                 DownloadErrorFactory.ThrowException(ret, "Failed to start download request");
@@ -706,6 +616,31 @@ namespace Tizen.Content.Download
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the Request class.
+        /// </summary>
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        /// <summary>
+        /// Deletes the corresponding download request.
+        /// </summary>
+        protected virtual void Dispose(bool disposing)
+        {
+            if (_disposed)
+                return;
+
+            if (disposing)
+            {
+                // Free managed objects.
+            }
+            Interop.Download.DestroyRequest(_downloadId);
+            _disposed = true;
+        }
+
         static private void IntPtrToStringArray(IntPtr unmanagedArray, int size, out string[] managedArray)
         {
             managedArray = new string[size];
@@ -718,6 +653,54 @@ namespace Tizen.Content.Download
                 managedArray[iterator] = Marshal.PtrToStringAuto(IntPtrArray[iterator]);
             }
         }
+
+        private void RegisterStateChangedEvent()
+        {
+            _downloadStateChangedCallback = (int downloadId, int downloadState, IntPtr userData) =>
+            {
+                StateChangedEventArgs eventArgs = new StateChangedEventArgs((DownloadState)downloadState);
+                _downloadStateChanged?.Invoke(this, eventArgs);
+            };
+
+            int ret = Interop.Download.SetStateChangedCallback(_downloadId, _downloadStateChangedCallback, IntPtr.Zero);
+            if (ret != (int)DownloadError.None)
+            {
+                DownloadErrorFactory.ThrowException(ret, "Setting StateChanged callback failed");
+            }
+        }
+
+        private void UnregisterStateChangedEvent()
+        {
+            int ret = Interop.Download.UnsetStateChangedCallback(_downloadId);
+            if (ret != (int)DownloadError.None)
+            {
+                DownloadErrorFactory.ThrowException(ret, "Unsetting StateChanged callback failed");
+            }
+        }
+
+        private void RegisterProgressChangedEvent()
+        {
+            _downloadProgressChangedCallback = (int downloadId, ulong size, IntPtr userData) =>
+            {
+                ProgressChangedEventArgs eventArgs = new ProgressChangedEventArgs(size);
+                _downloadProgressChanged?.Invoke(this, eventArgs);
+            };
+
+            int ret = Interop.Download.SetProgressCallback(_downloadId, _downloadProgressChangedCallback, IntPtr.Zero);
+            if (ret != (int)DownloadError.None)
+            {
+                DownloadErrorFactory.ThrowException(ret, "Setting ProgressChanged callback failed");
+            }
+        }
+
+        private void UnregisterProgressChangedEvent()
+        {
+            int ret = Interop.Download.UnsetProgressCallback(_downloadId);
+            if (ret != (int)DownloadError.None)
+            {
+                DownloadErrorFactory.ThrowException(ret, "Unsetting ProgressChanged callback failed");
+            }
+        }
     }
 }
 
index 6c162c6..599644e 100644 (file)
@@ -1,3 +1,11 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
 using System;
 
 namespace Tizen.Content.Download
@@ -13,6 +21,7 @@ namespace Tizen.Content.Download
         {
             _state = downloadState;
         }
+
         /// <summary>
         /// Present download state.
         /// </summary>