Make library projects and reorganize solution files.
authorcskim <charles0.kim@samsung.com>
Tue, 7 Mar 2017 09:33:23 +0000 (18:33 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:45 +0000 (18:34 +0900)
Change-Id: If8d5d51e8a262bea5376fed5968a8aeb75187a3b

132 files changed:
LibTVRefCommonPortable/DataModels/AppControlAction.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/AppShortcutInfo.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/BTLaunchAction.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/BTOffAction.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/BTOnAction.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/BTSettingShortcutInfo.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/DBItem.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/FileSystemEventCustomArgs.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/HomeMenuAppShortcutInfo.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/IAction.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/IDBItem.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/IEnumerableItem.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/MediaControlAction.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/RecentShortcutInfo.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/ShortcutInfo.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/StateDescription.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/WatcherType.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/WiFiLaunchAction.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/WiFiOffAction.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/WiFiOnAction.cs [new file with mode: 0644]
LibTVRefCommonPortable/DataModels/WiFiSettingShortcutInfo.cs [new file with mode: 0644]
LibTVRefCommonPortable/LibTVRefCommonPortable.cs [new file with mode: 0644]
LibTVRefCommonPortable/LibTVRefCommonPortable.csproj [new file with mode: 0644]
LibTVRefCommonPortable/Models/AppShortcutController.cs [new file with mode: 0644]
LibTVRefCommonPortable/Models/RecentShortcutController.cs [new file with mode: 0644]
LibTVRefCommonPortable/Models/SettingShortcutController.cs [new file with mode: 0644]
LibTVRefCommonPortable/Models/SettingShortcutFactory.cs [new file with mode: 0644]
LibTVRefCommonPortable/Properties/AssemblyInfo.cs [new file with mode: 0644]
LibTVRefCommonPortable/Settings.StyleCop [new file with mode: 0644]
LibTVRefCommonPortable/Utils/AppControlUtils.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/AppShortcutStorage.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/DBUtil.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/DebuggingUtils.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/IAppControl.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/IApplicationManagerAPIs.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/IBTAPIs.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/IDBAPIs.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/IDebuggingAPIs.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/IFileSystemAPIs.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/IFileSystemWatcherAPIs.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/IPackageManager.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/ITVHome.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/IWifiAPIs.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/PackageManagerUtils.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs [new file with mode: 0644]
LibTVRefCommonPortable/Utils/TVHomeImpl.cs [new file with mode: 0644]
LibTVRefCommonPortable/packages.config [new file with mode: 0644]
LibTVRefCommonTizen/LibTVRefCommonTizen.cs [new file with mode: 0644]
LibTVRefCommonTizen/LibTVRefCommonTizen.csproj [new file with mode: 0644]
LibTVRefCommonTizen/LibTVRefCommonTizen.nuget.targets [new file with mode: 0644]
LibTVRefCommonTizen/LibTVRefCommonTizen.project.json [new file with mode: 0644]
LibTVRefCommonTizen/Ports/AppControlPort.cs [new file with mode: 0644]
LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs [new file with mode: 0644]
LibTVRefCommonTizen/Ports/BTModulePort.cs [new file with mode: 0644]
LibTVRefCommonTizen/Ports/DBPort.cs [new file with mode: 0644]
LibTVRefCommonTizen/Ports/DebuggingPort.cs [new file with mode: 0644]
LibTVRefCommonTizen/Ports/FileSystemPort.cs [new file with mode: 0644]
LibTVRefCommonTizen/Ports/FileSystemWatcherPort.cs [new file with mode: 0644]
LibTVRefCommonTizen/Ports/PackageManagerPort.cs [new file with mode: 0644]
LibTVRefCommonTizen/Ports/WifiModulePort.cs [new file with mode: 0644]
LibTVRefCommonTizen/Properties/AssemblyInfo.cs [new file with mode: 0644]
LibTVRefCommonTizen/Settings.StyleCop [new file with mode: 0644]
TVApps.sln
TVApps/TVApps.TizenTV/ApplicationManagerPort.cs
TVApps/TVApps.TizenTV/DebuggingPort.cs [deleted file]
TVApps/TVApps.TizenTV/TVApps.TizenTV.cs
TVApps/TVApps.TizenTV/TVApps.TizenTV.csproj
TVHome.sln
TVHome/TVHome.TizenTV/Ports/AppControlPort.cs [deleted file]
TVHome/TVHome.TizenTV/Ports/ApplicationManagerPort.cs [deleted file]
TVHome/TVHome.TizenTV/Ports/BTModulePort.cs [deleted file]
TVHome/TVHome.TizenTV/Ports/DBPort.cs [deleted file]
TVHome/TVHome.TizenTV/Ports/DebuggingPort.cs [deleted file]
TVHome/TVHome.TizenTV/Ports/FileSystemPort.cs [deleted file]
TVHome/TVHome.TizenTV/Ports/FileSystemWatcherPort.cs [deleted file]
TVHome/TVHome.TizenTV/Ports/PackageManagerPort.cs [deleted file]
TVHome/TVHome.TizenTV/Ports/WifiModulePort.cs [deleted file]
TVHome/TVHome.TizenTV/TVHome.TizenTV.cs
TVHome/TVHome.TizenTV/TVHome.TizenTV.csproj
TVHome/TVHome/Controls/MainPanelButton.xaml.cs
TVHome/TVHome/Controls/SubPanelButton.xaml.cs
TVHome/TVHome/DataModels/AppControlAction.cs [deleted file]
TVHome/TVHome/DataModels/AppShortcutInfo.cs [deleted file]
TVHome/TVHome/DataModels/BTLaunchAction.cs [deleted file]
TVHome/TVHome/DataModels/BTOffAction.cs [deleted file]
TVHome/TVHome/DataModels/BTOnAction.cs [deleted file]
TVHome/TVHome/DataModels/BTSettingShortcutInfo.cs [deleted file]
TVHome/TVHome/DataModels/DBItem.cs [deleted file]
TVHome/TVHome/DataModels/FileSystemEventCustomArgs.cs [deleted file]
TVHome/TVHome/DataModels/HomeMenuAppShortcutInfo.cs [deleted file]
TVHome/TVHome/DataModels/IAction.cs [deleted file]
TVHome/TVHome/DataModels/IDBItem.cs [deleted file]
TVHome/TVHome/DataModels/IEnumerableItem.cs [deleted file]
TVHome/TVHome/DataModels/MediaControlAction.cs [deleted file]
TVHome/TVHome/DataModels/RecentShortcutInfo.cs [deleted file]
TVHome/TVHome/DataModels/ShortcutInfo.cs [deleted file]
TVHome/TVHome/DataModels/StateDescription.cs [deleted file]
TVHome/TVHome/DataModels/WatcherType.cs [deleted file]
TVHome/TVHome/DataModels/WiFiLaunchAction.cs [deleted file]
TVHome/TVHome/DataModels/WiFiOffAction.cs [deleted file]
TVHome/TVHome/DataModels/WiFiOnAction.cs [deleted file]
TVHome/TVHome/DataModels/WiFiSettingShortcutInfo.cs [deleted file]
TVHome/TVHome/Models/AppShortcutController.cs [deleted file]
TVHome/TVHome/Models/RecentShortcutController.cs [deleted file]
TVHome/TVHome/Models/SettingShortcutController.cs [deleted file]
TVHome/TVHome/Models/SettingShortcutFactory.cs [deleted file]
TVHome/TVHome/TVHome.cs
TVHome/TVHome/TVHome.csproj
TVHome/TVHome/Utils/AppControlUtils.cs [deleted file]
TVHome/TVHome/Utils/AppShortcutStorage.cs [deleted file]
TVHome/TVHome/Utils/DBUtil.cs [deleted file]
TVHome/TVHome/Utils/DebuggingUtils.cs [deleted file]
TVHome/TVHome/Utils/IAppControl.cs [deleted file]
TVHome/TVHome/Utils/IApplicationManagerAPIs.cs [deleted file]
TVHome/TVHome/Utils/IBTAPIs.cs [deleted file]
TVHome/TVHome/Utils/IDBAPIs.cs [deleted file]
TVHome/TVHome/Utils/IDebuggingAPIs.cs [deleted file]
TVHome/TVHome/Utils/IFileSystemAPIs.cs [deleted file]
TVHome/TVHome/Utils/IFileSystemWatcherAPIs.cs [deleted file]
TVHome/TVHome/Utils/IPackageManager.cs [deleted file]
TVHome/TVHome/Utils/ITVHome.cs [deleted file]
TVHome/TVHome/Utils/IWifiAPIs.cs [deleted file]
TVHome/TVHome/Utils/PackageManagerUtils.cs [deleted file]
TVHome/TVHome/Utils/RecentShortcutStorage.cs [deleted file]
TVHome/TVHome/Utils/TVHomeImpl.cs [deleted file]
TVHome/TVHome/ViewModels/MainPageViewModel.cs
TVHome/TVHome/Views/MainPage.xaml.cs
TVHome/TVHome/Views/MainPanel.xaml.cs
TVHome/TVHome/Views/Panel.cs
TVHome/TVHome/Views/SubPanel.xaml.cs
TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs
TVHomeApps.sln [new file with mode: 0644]

diff --git a/LibTVRefCommonPortable/DataModels/AppControlAction.cs b/LibTVRefCommonPortable/DataModels/AppControlAction.cs
new file mode 100644 (file)
index 0000000..64762ed
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using LibTVRefCommmonPortable.Utils;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public class AppControlAction : IAction
+    {
+        public string AppID { get; set; }
+        public string Execute()
+        {
+            string result = "default";
+            AppControlUtils.SendLaunchRequest(AppID);
+
+            return result;
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/AppShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/AppShortcutInfo.cs
new file mode 100644 (file)
index 0000000..3abdc6f
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public class AppShortcutInfo : ShortcutInfo
+    {
+        public string AppID { get; set; }
+       
+        public override void UpdateState()
+        {
+            SetCurrentState("default");
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/BTLaunchAction.cs b/LibTVRefCommonPortable/DataModels/BTLaunchAction.cs
new file mode 100644 (file)
index 0000000..7329fd9
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using LibTVRefCommmonPortable.Utils;
+using Xamarin.Forms;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    class BTLaunchAction : IAction
+    {
+        public string Execute()
+        {
+            // Launch BT setting
+            IBTAPIs ibtapis;
+
+            ibtapis = DependencyService.Get<IBTAPIs>();
+            ibtapis?.LaunchBTSetting();
+
+            return "launch";
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/BTOffAction.cs b/LibTVRefCommonPortable/DataModels/BTOffAction.cs
new file mode 100644 (file)
index 0000000..ef3c929
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    class BTOffAction : IAction
+    {
+        public string Execute()
+        {
+            // Turn BT Off
+            return "off";
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/BTOnAction.cs b/LibTVRefCommonPortable/DataModels/BTOnAction.cs
new file mode 100644 (file)
index 0000000..4468d58
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    class BTOnAction : IAction
+    {
+        public string Execute()
+        {
+            // Turn BT On
+            return "on";
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/BTSettingShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/BTSettingShortcutInfo.cs
new file mode 100644 (file)
index 0000000..2e411d6
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public class BTSettingShortcutInfo : ShortcutInfo
+    {
+        public void RegisterSettingStateChangeListener()
+        {
+            // Register BT status change listener
+            throw new NotImplementedException();
+        }
+
+        public override void UpdateState()
+        {
+            // 1. Check Current BT Status.
+
+            // 2. Set Description
+            SetCurrentState("off");
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/DBItem.cs b/LibTVRefCommonPortable/DataModels/DBItem.cs
new file mode 100644 (file)
index 0000000..d5a92a9
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public class DBItem : IDBItem
+    {
+        IDictionary<int, string> itemProperties = new Dictionary<int, string>();
+
+        public IDictionary<int, string> ItemProperties
+        {
+            get
+            {
+                return itemProperties;
+            }
+
+            set
+            {
+                if (itemProperties != null)
+                {
+                    itemProperties = value;
+                }
+            }
+        }
+
+        public void Add(int key, string value)
+        {
+            itemProperties?.Add(key, value);
+        }
+
+        public void SetDBItem(IDBItem item)
+        {
+            throw new NotImplementedException();
+        }
+
+        public void SetColumnValue(int idx, string value)
+        {
+            if (idx > ItemProperties.Count)
+            {
+                return;
+            }
+
+            ItemProperties.Remove(idx);
+            ItemProperties.Add(new KeyValuePair<int, string>(idx, value));
+        }
+
+        public string GetColumnValue(int idx)
+        {
+            if (idx > ItemProperties.Count)
+            {
+                return "";
+            }
+
+            string value;
+            if (ItemProperties.TryGetValue(idx, out value))
+            {
+                return value;
+            }
+
+            return "";
+        }
+
+        public IEnumerable<string> GetColumnValues()
+        {
+            throw new NotImplementedException();
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/FileSystemEventCustomArgs.cs b/LibTVRefCommonPortable/DataModels/FileSystemEventCustomArgs.cs
new file mode 100644 (file)
index 0000000..65098f7
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public class FileSystemEventCustomArgs : EventArgs
+    {
+        //
+        // Summary:
+        //     Initializes a new instance of the System.IO.FileSystemEventArgs class.
+        //
+        // Parameters:
+        //   changeType:
+        //     One of the System.IO.WatcherChangeTypes values, which represents the kind of
+        //     change detected in the file system.
+        //
+        //   directory:
+        //     The root directory of the affected file or directory.
+        //
+        //   name:
+        //     The name of the affected file or directory.
+        public FileSystemEventCustomArgs(WatcherType changeType, string directory, string name)
+        {
+            ChangeType = changeType;
+            FullPath = directory;
+            Name = name;
+        }
+
+        //
+        // Summary:
+        //     Gets the type of directory event that occurred.
+        //
+        // Returns:
+        //     One of the System.IO.WatcherChangeTypes values that represents the kind of change
+        //     detected in the file system.
+        public WatcherType ChangeType { set; get; }
+        //
+        // Summary:
+        //     Gets the fully qualifed path of the affected file or directory.
+        //
+        // Returns:
+        //     The path of the affected file or directory.
+        public string FullPath { set; get; }
+        //
+        // Summary:
+        //     Gets the name of the affected file or directory.
+        //
+        // Returns:
+        //     The name of the affected file or directory.
+        public string Name { set; get; }
+    }
+}
\ No newline at end of file
diff --git a/LibTVRefCommonPortable/DataModels/HomeMenuAppShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/HomeMenuAppShortcutInfo.cs
new file mode 100644 (file)
index 0000000..a280ae9
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public class HomeMenuAppShortcutInfo : ShortcutInfo
+    {
+        public override void UpdateState()
+        {
+            SetCurrentState("default");
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/IAction.cs b/LibTVRefCommonPortable/DataModels/IAction.cs
new file mode 100644 (file)
index 0000000..a13bd1c
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public interface IAction
+    {
+        string Execute();
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/IDBItem.cs b/LibTVRefCommonPortable/DataModels/IDBItem.cs
new file mode 100644 (file)
index 0000000..013a1a7
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Collections.Generic;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public interface IDBItem
+    {
+        void SetDBItem(IDBItem item);
+
+        void SetColumnValue(int idx, string value);
+
+        string GetColumnValue(int idx);
+
+        IEnumerable<string> GetColumnValues();
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/IEnumerableItem.cs b/LibTVRefCommonPortable/DataModels/IEnumerableItem.cs
new file mode 100644 (file)
index 0000000..dda174f
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Collections.Generic;
+
+namespace TVHome.DataModels
+{
+    public interface IEnumerableItem
+    {
+        IDictionary<int, string> ItemProperties
+        {
+            set;
+            get;
+        }
+
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/MediaControlAction.cs b/LibTVRefCommonPortable/DataModels/MediaControlAction.cs
new file mode 100644 (file)
index 0000000..1639965
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    class MediaControlAction : IAction
+    {
+        public string Execute()
+        {
+            throw new NotImplementedException();
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/RecentShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/RecentShortcutInfo.cs
new file mode 100644 (file)
index 0000000..907bba3
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public class RecentShortcutInfo : ShortcutInfo
+    {
+        public DateTime Date
+        {
+            get;
+            set;
+        }
+
+        public override void UpdateState()
+        {
+            SetCurrentState("default");
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/ShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/ShortcutInfo.cs
new file mode 100644 (file)
index 0000000..c14ccba
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Xml.Serialization;
+using LibTVRefCommmonPortable.Utils;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public abstract class ShortcutInfo : INotifyPropertyChanged
+    {
+        [XmlIgnore]
+        private Dictionary<String, StateDescription> stateDescriptions = new Dictionary<String, StateDescription>();
+
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        protected void OnPropertyChanged(string propertyName)
+        {
+            var handler = PropertyChanged;
+            if (handler != null)
+            {
+                handler(this, new PropertyChangedEventArgs(propertyName));
+            }
+        }
+
+        [XmlIgnore]
+        public Dictionary<String, StateDescription> StateDescriptions
+        {
+            get
+            {
+                return stateDescriptions;
+            }
+        }
+
+        [XmlIgnore]
+        public StateDescription CurrentStateDescription
+        {
+            get;
+            set;
+        }
+
+        protected bool SetCurrentState(string state)
+        {
+            if (stateDescriptions.ContainsKey(state) == false)
+            {
+                DebuggingUtils.Err(state + " is doesn't exists!!!");
+                return false;
+            }
+
+            CurrentStateDescription = stateDescriptions[state];
+            OnPropertyChanged("CurrentStateDescription");
+            return true;
+        }
+
+        abstract public void UpdateState();
+
+        public bool DoAction()
+        {
+            if (CurrentStateDescription == null)
+            {
+                DebuggingUtils.Err("Current state is not set!!!");
+                return false;
+            }
+
+            String newState = CurrentStateDescription.Action.Execute();
+            if (newState == null)
+            {
+                DebuggingUtils.Err("Invalid State returned!!!");
+                return false;
+            }
+
+            return SetCurrentState(newState);
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/StateDescription.cs b/LibTVRefCommonPortable/DataModels/StateDescription.cs
new file mode 100644 (file)
index 0000000..0a68f3e
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public class StateDescription
+    {
+        public string Label
+        {
+            get;
+            set;
+        }
+
+        public string IconPath
+        {
+            get;
+            set;
+        }
+
+        public IAction Action
+        {
+            get;
+            set;
+        }
+
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/WatcherType.cs b/LibTVRefCommonPortable/DataModels/WatcherType.cs
new file mode 100644 (file)
index 0000000..22171df
--- /dev/null
@@ -0,0 +1,27 @@
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public enum WatcherType
+    {
+        //
+        // Summary:
+        //     The creation of a file or folder.
+        Created = 1,
+        //
+        // Summary:
+        //     The deletion of a file or folder.
+        Deleted = 2,
+        //
+        // Summary:
+        //     The change of a file or folder. The types of changes include: changes to size,
+        //     attributes, security settings, last write, and last access time.
+        Changed = 4,
+        //
+        // Summary:
+        //     The renaming of a file or folder.
+        Renamed = 8,
+        //
+        // Summary:
+        //     The creation, deletion, change, or renaming of a file or folder.
+        All = 15
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/WiFiLaunchAction.cs b/LibTVRefCommonPortable/DataModels/WiFiLaunchAction.cs
new file mode 100644 (file)
index 0000000..e598e21
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using LibTVRefCommmonPortable.Utils;
+using Xamarin.Forms;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    class WiFiLaunchAction : IAction
+    {
+        public string Execute()
+        {
+            // Launch WiFi Setting
+            IWifiAPIs iwifiapis;
+
+            iwifiapis = DependencyService.Get<IWifiAPIs>();
+            iwifiapis?.LaunchWifiSetting();
+
+            return "launch";
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/WiFiOffAction.cs b/LibTVRefCommonPortable/DataModels/WiFiOffAction.cs
new file mode 100644 (file)
index 0000000..e6566d9
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    class WiFiOffAction : IAction
+    {
+        public string Execute()
+        {
+            // Turn WiFi Off
+            return "off";
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/WiFiOnAction.cs b/LibTVRefCommonPortable/DataModels/WiFiOnAction.cs
new file mode 100644 (file)
index 0000000..0a4b296
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    class WiFiOnAction : IAction
+    {
+        public string Execute()
+        {
+            // Turn WiFi On
+            return "on";
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/DataModels/WiFiSettingShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/WiFiSettingShortcutInfo.cs
new file mode 100644 (file)
index 0000000..3a49cf7
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace LibTVRefCommmonPortable.DataModels
+{
+    public class WiFiSettingShortcutInfo : ShortcutInfo
+    {
+        public void RegisterSettingStateChangeListener()
+        {
+            // Register Wi-Fi status change listener
+            throw new NotImplementedException();
+        }
+
+        public override void UpdateState()
+        {
+            // 1. Check Current Wi-Fi Status.
+
+            // 2. Set Description
+            SetCurrentState("off");
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/LibTVRefCommonPortable.cs b/LibTVRefCommonPortable/LibTVRefCommonPortable.cs
new file mode 100644 (file)
index 0000000..9ec16a6
--- /dev/null
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Xamarin.Forms;
+
+namespace LibTVRefCommonPortable
+{
+    public class LibTVRefCommonPortable : ContentPage
+    {
+        public LibTVRefCommonPortable()
+        {
+
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/LibTVRefCommonPortable.csproj b/LibTVRefCommonPortable/LibTVRefCommonPortable.csproj
new file mode 100644 (file)
index 0000000..f3fb453
--- /dev/null
@@ -0,0 +1,113 @@
+<?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>
+    <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{67F9D3A8-F71E-4428-913F-C37AE82CDB24}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>LibTVRefCommonPortable</RootNamespace>
+    <AssemblyName>LibTVRefCommonPortable</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <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>
+  <ItemGroup>
+    <Compile Include="DataModels\AppControlAction.cs" />
+    <Compile Include="DataModels\AppShortcutInfo.cs" />
+    <Compile Include="DataModels\BTLaunchAction.cs" />
+    <Compile Include="DataModels\BTOffAction.cs" />
+    <Compile Include="DataModels\BTOnAction.cs" />
+    <Compile Include="DataModels\BTSettingShortcutInfo.cs" />
+    <Compile Include="DataModels\DBItem.cs" />
+    <Compile Include="DataModels\FileSystemEventCustomArgs.cs" />
+    <Compile Include="DataModels\HomeMenuAppShortcutInfo.cs" />
+    <Compile Include="DataModels\IAction.cs" />
+    <Compile Include="DataModels\IDBItem.cs" />
+    <Compile Include="DataModels\MediaControlAction.cs" />
+    <Compile Include="DataModels\RecentShortcutInfo.cs" />
+    <Compile Include="DataModels\ShortcutInfo.cs" />
+    <Compile Include="DataModels\StateDescription.cs" />
+    <Compile Include="DataModels\WatcherType.cs" />
+    <Compile Include="DataModels\WiFiLaunchAction.cs" />
+    <Compile Include="DataModels\WiFiOffAction.cs" />
+    <Compile Include="DataModels\WiFiOnAction.cs" />
+    <Compile Include="DataModels\WiFiSettingShortcutInfo.cs" />
+    <Compile Include="LibTVRefCommonPortable.cs" />
+    <Compile Include="Models\AppShortcutController.cs" />
+    <Compile Include="Models\RecentShortcutController.cs" />
+    <Compile Include="Models\SettingShortcutController.cs" />
+    <Compile Include="Models\SettingShortcutFactory.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Utils\AppControlUtils.cs" />
+    <Compile Include="Utils\AppShortcutStorage.cs" />
+    <Compile Include="Utils\DebuggingUtils.cs" />
+    <Compile Include="Utils\IAppControl.cs" />
+    <Compile Include="Utils\IApplicationManagerAPIs.cs" />
+    <Compile Include="Utils\IBTAPIs.cs" />
+    <Compile Include="Utils\IDBAPIs.cs" />
+    <Compile Include="Utils\IDebuggingAPIs.cs" />
+    <Compile Include="Utils\IFileSystemAPIs.cs" />
+    <Compile Include="Utils\IFileSystemWatcherAPIs.cs" />
+    <Compile Include="Utils\IPackageManager.cs" />
+    <Compile Include="Utils\ITVHome.cs" />
+    <Compile Include="Utils\IWifiAPIs.cs" />
+    <Compile Include="Utils\PackageManagerUtils.cs" />
+    <Compile Include="Utils\RecentShortcutStorage.cs" />
+    <Compile Include="Utils\TVHomeImpl.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\Xamarin.Forms.2.2.0.45\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\Xamarin.Forms.2.2.0.45\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\Xamarin.Forms.2.2.0.45\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+  <Import Project="..\packages\Xamarin.Forms.2.2.0.45\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.2.0.45\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\packages\Xamarin.Forms.2.2.0.45\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.2.2.0.45\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.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>
\ No newline at end of file
diff --git a/LibTVRefCommonPortable/Models/AppShortcutController.cs b/LibTVRefCommonPortable/Models/AppShortcutController.cs
new file mode 100644 (file)
index 0000000..39772db
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+
+using LibTVRefCommmonPortable.DataModels;
+using LibTVRefCommmonPortable.Utils;
+
+
+namespace LibTVRefCommmonPortable.Models
+{
+    public class AppShortcutController
+    {
+
+        public AppShortcutController()
+        {
+
+        }
+
+        public IEnumerable<AppShortcutInfo> ReadFromFile()
+        {
+            IApplicationManagerAPIs applicationManagerPort = DependencyService.Get<IApplicationManagerAPIs>();
+            // Accessing below directory is not permitted.
+            // IEnumerable<AppShortcutInfo> pinned_apps_info = AppShortcutStorage.ReadFromFile("/home/owner/apps_rw/TVHome.TizenTV/res/pinned_apps_info.xml");
+            IEnumerable<AppShortcutInfo> pinned_apps_info = AppShortcutStorage.ReadFromFile("/opt/usr/home/owner/share/pinned_apps_info.xml");
+            string[] icons = { "ic_black.png", "ic_blue.png", "ic_green.png", "ic_red.png", "ic_yellow.png", "AppIcon.png" };
+
+            foreach (AppShortcutInfo appShortcutInfo in pinned_apps_info)
+            {
+                Dictionary<string, string> appInfo = applicationManagerPort.GetInstalledApplication(appShortcutInfo.AppID);
+
+                if (appInfo != null)
+                {
+                    string appLabel;
+                    string appIconPath;
+
+                    appInfo.TryGetValue("Label", out appLabel);
+                    appInfo.TryGetValue("IconPath", out appIconPath);
+
+                    DebuggingUtils.Dbg("AppID: " + appShortcutInfo.AppID + ", Label : " + appLabel + " IconPath : " + appIconPath);
+                    Random random = new Random();
+                    var defaultStateDescription = new StateDescription()
+                    {
+                        Label = appLabel,
+                        IconPath = appIconPath ?? icons[random.Next(0, 6)], //IconPath = (resul5t[2] == null) ? "AppIcon.png" : result[2],
+                        Action = new AppControlAction
+                        {
+                            AppID = appShortcutInfo.AppID,
+                        }
+                    };
+
+                    appShortcutInfo.StateDescriptions.Add("default", defaultStateDescription);
+                    appShortcutInfo.CurrentStateDescription = defaultStateDescription;
+                }
+                else
+                {
+                    // TODO : Remove the broken appInfo from pinned_apps_info
+                }
+            }
+
+            return pinned_apps_info;
+        }
+
+        public void WriteToFile(IEnumerable<AppShortcutInfo> pinnedAppsInfo)
+        {
+            // Accessing below directory is not permitted.
+            // AppShortcutStorage.WriteToFile(pinnedAppsInfo, "/home/owner/apps_rw/TVHome.TizenTV/res/pinned_apps_info.xml");
+            AppShortcutStorage.WriteToFile(pinnedAppsInfo, "/opt/usr/home/owner/share/pinned_apps_info.xml");
+        }
+
+        private bool AddAppShortcutChangedListener()
+        {
+            // TODO : register to Tizen app framework to get notification of app list change.
+            return false;
+        }
+
+        public void AddFileSystemChangedListener(EventHandler<EventArgs> eventListener)
+        {
+            if (AppShortcutStorage.Instance != null)
+            {
+                AppShortcutStorage.Instance.AddFileSystemChangedListener(eventListener);
+            }
+            else
+            {
+                DebuggingUtils.Dbg("AppShortcutStorage Instance is NULL");
+            }
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/Models/RecentShortcutController.cs b/LibTVRefCommonPortable/Models/RecentShortcutController.cs
new file mode 100644 (file)
index 0000000..fe816dd
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using LibTVRefCommmonPortable.DataModels;
+using LibTVRefCommmonPortable.Utils;
+
+using Xamarin.Forms;
+
+namespace LibTVRefCommmonPortable.Models
+{
+    public class RecentShortcutController
+    {
+        public RecentShortcutController()
+        {
+        }
+
+        public void Remove(RecentShortcutInfo history)
+        {
+            RecentShortcutStorage.Delete(history);
+        }
+
+        public void RemoveAll()
+        {
+            RecentShortcutStorage.DeleteAll();
+        }
+
+        public bool Update(RecentShortcutInfo shortcut)
+        {
+            RecentShortcutStorage.Update(shortcut);
+            return false;
+        }
+
+        public async Task<IEnumerable<RecentShortcutInfo>> GetList()
+        {
+            IApplicationManagerAPIs applicationManagerPort = DependencyService.Get<IApplicationManagerAPIs>();
+            List<RecentShortcutInfo> recentShortcutInfoList = new List<RecentShortcutInfo>();
+
+            var applicationList = await applicationManagerPort.GetRecentApplications();
+            foreach (KeyValuePair<string, string[]> item in applicationList)
+            {
+                var defaultStateDescription = new StateDescription()
+                {
+                    // TODO : Label에는 ApplicationInfo의 Label을 넣자
+                    Label = item.Value[0],
+                    IconPath = item.Value[2],
+                    Action = new AppControlAction()
+                    {
+                        AppID = item.Key
+                    }
+                };
+                var recentShortcutInfo = new RecentShortcutInfo();
+                recentShortcutInfo.StateDescriptions.Add("default", defaultStateDescription);
+                recentShortcutInfo.CurrentStateDescription = defaultStateDescription;
+                recentShortcutInfoList.Add(recentShortcutInfo);
+            }
+
+            return recentShortcutInfoList;
+
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/Models/SettingShortcutController.cs b/LibTVRefCommonPortable/Models/SettingShortcutController.cs
new file mode 100644 (file)
index 0000000..0b94828
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using LibTVRefCommmonPortable.DataModels;
+
+namespace LibTVRefCommmonPortable.Models
+{
+    public class SettingShortcutController
+    {
+        private List<ShortcutInfo> settingShortcutList = new List<ShortcutInfo>();
+
+        public SettingShortcutController()
+        {
+            ShortcutInfo wifi = SettingShortcutFactory.Get(SettingID.WiFi);
+            settingShortcutList.Add(wifi);
+
+            ShortcutInfo bt = SettingShortcutFactory.Get(SettingID.BLUETOOTH);
+            settingShortcutList.Add(bt);
+
+            // TODO : Provides list of SettingShortcuts
+        }
+
+        public IEnumerable<ShortcutInfo> GetList()
+        {
+            return settingShortcutList ?? null;
+        }
+
+    }
+}
diff --git a/LibTVRefCommonPortable/Models/SettingShortcutFactory.cs b/LibTVRefCommonPortable/Models/SettingShortcutFactory.cs
new file mode 100644 (file)
index 0000000..40cd561
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using LibTVRefCommmonPortable.DataModels;
+
+namespace LibTVRefCommmonPortable.Models
+{
+    public enum SettingID
+    {
+        WiFi,
+        BLUETOOTH
+    };
+
+    public static class SettingShortcutFactory
+    {
+        public static ShortcutInfo Get(SettingID id)
+        {
+            ShortcutInfo sc;
+            switch (id)
+            {
+                case SettingID.WiFi:
+                    sc = new WiFiSettingShortcutInfo()
+                    {
+                        StateDescriptions =
+                        {
+                            {
+                                "on",
+                                new StateDescription
+                                {
+                                    Label = "WiFi ON",
+                                    IconPath = "AppIcon.png",
+                                    Action = new WiFiOffAction(),
+                                }
+                            },
+                            {
+                                "off",
+                                new StateDescription
+                                {
+                                    Label = "WiFi OFF",
+                                    IconPath = "AppIcon.png",
+                                    Action = new WiFiOnAction(),
+                                }
+                            },
+                            {
+                                "launch",
+                                new StateDescription
+                                {
+                                    Label = "WiFi Launch",
+                                    IconPath = "AppIcon.png",
+                                    Action = new WiFiLaunchAction(),
+                                }
+                            },
+                        }
+                    };
+                    sc.UpdateState();
+                    return sc;
+
+                case SettingID.BLUETOOTH:
+                    sc = new BTSettingShortcutInfo()
+                    {
+                        StateDescriptions =
+                        {
+                            {
+                                "on",
+                                new StateDescription
+                                {
+                                    Label = "BT ON",
+                                    IconPath = "AppIcon.png",
+                                    Action = new BTOffAction(),
+                                }
+                            },
+                            {
+                                "off",
+                                new StateDescription
+                                {
+                                    Label = "BT OFF",
+                                    IconPath = "AppIcon.png",
+                                    Action = new BTOnAction(),
+                                }
+                            },
+                            {
+                                "launch",
+                                new StateDescription
+                                {
+                                    Label = "BT Launch",
+                                    IconPath = "AppIcon.png",
+                                    Action = new BTLaunchAction(),
+                                }
+                            },
+                        }
+                    };
+                    sc.UpdateState();
+                    return sc;
+            }
+
+            return null;
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/Properties/AssemblyInfo.cs b/LibTVRefCommonPortable/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..b75f38f
--- /dev/null
@@ -0,0 +1,30 @@
+using System.Resources;
+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("LibTVRefCommonPortable")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("LibTVRefCommonPortable")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("en")]
+
+// 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")]
diff --git a/LibTVRefCommonPortable/Settings.StyleCop b/LibTVRefCommonPortable/Settings.StyleCop
new file mode 100644 (file)
index 0000000..837530c
--- /dev/null
@@ -0,0 +1,722 @@
+<StyleCopSettings Version="105">
+  <GlobalSettings>
+    <StringProperty Name="MergeSettingsFiles">NoMerge</StringProperty>
+  </GlobalSettings>
+  <Analyzers>
+    <Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
+      <Rules>
+        <Rule Name="ElementsMustBeDocumented">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationMustHaveSummaryText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="EnumerationItemsMustBeDocumented">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationMustContainValidXml">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationMustHaveSummary">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PartialElementDocumentationMustHaveSummary">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="VoidReturnValueMustNotBeDocumented">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="GenericTypeParametersMustBeDocumented">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="GenericTypeParameterDocumentationMustHaveText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PropertySummaryDocumentationMustMatchAccessors">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationTextMustNotBeEmpty">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationTextMustContainWhitespace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationMustMeetCharacterPercentage">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationHeadersMustNotContainBlankLines">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="IncludedDocumentationXPathDoesNotExist">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="InheritDocMustBeUsedWithInheritingClass">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationMustBeSpelledCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileMustHaveHeader">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderMustShowCopyright">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderMustHaveCopyrightText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderMustContainFileName">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderMustHaveValidCompanyText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.NamingRules">
+      <Rules>
+        <Rule Name="ConstFieldNamesMustBeginWithUpperCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FieldNamesMustBeginWithLowerCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FieldNamesMustNotContainUnderscore">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementMustBeginWithLowerCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="NonPrivateReadonlyFieldsMustBeginWithUpperCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FieldNamesMustNotUseHungarianNotation">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="AccessibleFieldsMustBeginWithUpperCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="VariableNamesMustNotBePrefixed">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FieldNamesMustNotBeginWithUnderscore">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="StaticReadonlyFieldsMustBeginWithUpperCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
+      <Rules>
+        <Rule Name="AllAccessorsMustBeMultiLineOrSingleLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningCurlyBracketsMustNotBeFollowedByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationHeadersMustNotBeFollowedByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainMultipleBlankLinesInARow">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingCurlyBracketsMustNotBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningCurlyBracketsMustNotBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ChainedStatementBlocksMustNotBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="WhileDoFooterMustNotBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SingleLineCommentsMustNotBeFollowedByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationHeaderMustBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SingleLineCommentMustBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementsMustBeSeparatedByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainBlankLinesAtStartOfFile">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainBlankLinesAtEndOfFile">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
+      <Rules>
+        <Rule Name="AccessModifierMustBeDeclared">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FieldsMustBePrivate">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeAnalysisSuppressionMustHaveJustification">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DebugAssertMustProvideMessageText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DebugFailMustProvideMessageText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileMayOnlyContainASingleClass">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileMayOnlyContainASingleNamespace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="StatementMustNotUseUnnecessaryParenthesis">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ConditionalExpressionsMustDeclarePrecedence">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="RemoveDelegateParenthesisWhenPossible">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="AttributeConstructorMustNotUseUnnecessaryParenthesis">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="RemoveUnnecessaryCode">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
+      <Rules>
+        <Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementsMustAppearInTheCorrectOrder">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementsMustBeOrderedByAccess">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ConstantsMustAppearBeforeFields">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="StaticElementsMustAppearBeforeInstanceElements">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DeclarationKeywordsMustFollowOrder">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ProtectedMustComeBeforeInternal">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PropertyAccessorsMustFollowOrder">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="EventAccessorsMustFollowOrder">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="StaticReadonlyElementsMustAppearBeforeStaticNonReadonlyElements">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="InstanceReadonlyElementsMustAppearBeforeInstanceNonReadonlyElements">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="NoValueFirstComparison">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UsingDirectivesMustBeOrderedAlphabeticallyByNamespace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UsingAliasDirectivesMustBeOrderedAlphabeticallyByAliasName">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UsingStaticDirectivesMustBePlacedAfterUsingNamespaceDirectives">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
+      <Rules>
+        <Rule Name="CommentsMustContainText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DoNotPrefixCallsWithBaseUnlessLocalImplementationExists">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PrefixLocalCallsWithThis">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PrefixCallsCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningParenthesisMustBeOnDeclarationLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingParenthesisMustBeOnLineOfLastParameter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingParenthesisMustBeOnLineOfOpeningParenthesis">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CommaMustBeOnSameLineAsPreviousParameter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ParameterListMustFollowDeclaration">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ParameterMustFollowComma">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ParameterMustNotSpanMultipleLines">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="QueryClauseMustFollowPreviousClause">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="QueryClausesMustBeOnSeparateLinesOrAllOnOneLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="QueryClausesSpanningMultipleLinesMustBeginOnOwnLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DoNotPlaceRegionsWithinElements">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainEmptyStatements">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="BlockStatementsMustNotContainEmbeddedComments">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="BlockStatementsMustNotContainEmbeddedRegions">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UseStringEmptyForEmptyStrings">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UseBuiltInTypeAlias">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UseShorthandForNullableTypes">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
+      <Rules>
+        <Rule Name="CommasMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SemicolonsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationLinesMustBeginWithSingleSpace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SingleLineCommentsMustBeginWithSingleSpace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PreprocessorKeywordsMustNotBePrecededBySpace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OperatorKeywordMustBeFollowedBySpace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningCurlyBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingCurlyBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningGenericBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingGenericBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningAttributeBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingAttributeBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="NullableTypeSymbolsMustNotBePrecededBySpace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="MemberAccessSymbolsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="IncrementDecrementSymbolsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="NegativeSignsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PositiveSignsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DereferenceAndAccessOfSymbolsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ColonsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainMultipleWhitespaceInARow">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="TabsMustNotBeUsed">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DoNotSplitNullConditionalOperators">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+  </Analyzers>
+</StyleCopSettings>
\ No newline at end of file
diff --git a/LibTVRefCommonPortable/Utils/AppControlUtils.cs b/LibTVRefCommonPortable/Utils/AppControlUtils.cs
new file mode 100644 (file)
index 0000000..7d4a467
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public sealed class AppControlUtils
+    {
+        private static IAppControl iam;
+        private static readonly AppControlUtils instance = new AppControlUtils();
+
+        public static AppControlUtils Instance
+        {
+            get { return instance; }
+        }
+
+        private class DefaultAM : IAppControl
+        {
+            public void SendLaunchRequest(string PkgID)
+            {
+            }
+        }
+
+        private AppControlUtils()
+        {
+            if (DependencyService.Get<IAppControl>() != null)
+            {
+                iam = DependencyService.Get<IAppControl>();
+            }
+            else
+            {
+                iam = new DefaultAM();
+            }
+        }
+
+        public static void SendLaunchRequest(string PkgID)
+        {
+            iam.SendLaunchRequest(PkgID);
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/AppShortcutStorage.cs b/LibTVRefCommonPortable/Utils/AppShortcutStorage.cs
new file mode 100644 (file)
index 0000000..4c0ed3b
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml;
+using System.Xml.Serialization;
+using System.IO;
+
+using LibTVRefCommmonPortable.DataModels;
+using LibTVRefCommmonPortable.Utils;
+
+using Xamarin.Forms;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public class AppShortcutStorage
+    {
+        private static IFileSystemWatcherAPIs fileSystemWatcher = DependencyService.Get<IFileSystemWatcherAPIs>();
+        private static AppShortcutStorage instance = new AppShortcutStorage();
+
+        public static AppShortcutStorage Instance
+        {
+            get { return instance; }
+        }
+
+        private AppShortcutStorage()
+        {
+            fileSystemWatcher.Run();
+        }
+
+        private static List<AppShortcutInfo> GetSampleList()
+        {
+            var pinnedAppsInfo = new List<AppShortcutInfo>();
+
+            pinnedAppsInfo.Add(new AppShortcutInfo()
+            {
+                AppID = "org.tizen.settings",
+            });
+
+            pinnedAppsInfo.Add(new AppShortcutInfo()
+            {
+                AppID = "org.tizen.chromium-efl.ubrowser",
+            });
+
+            pinnedAppsInfo.Add(new AppShortcutInfo()
+            {
+                AppID = "org.tizen.dpm-toolkit",
+            });
+
+            pinnedAppsInfo.Add(new AppShortcutInfo()
+            {
+                AppID = "org.tizen.infosquare",
+            });
+
+            pinnedAppsInfo.Add(new AppShortcutInfo()
+            {
+                AppID = "org.tizen.mediahub",
+            });
+
+            pinnedAppsInfo.Add(new AppShortcutInfo()
+            {
+                AppID = "org.tizen.heremaps-uc",
+            });
+
+            pinnedAppsInfo.Add(new AppShortcutInfo()
+            {
+                AppID = "org.tizen.ode",
+            });
+
+            pinnedAppsInfo.Add(new AppShortcutInfo()
+            {
+                AppID = "org.tizen.apps",
+            });
+
+            pinnedAppsInfo.Add(new AppShortcutInfo()
+            {
+                AppID = "org.tizen.home",
+            });
+
+            return pinnedAppsInfo;
+        }
+
+        public static List<AppShortcutInfo> ReadFromFile(string filePath)
+        {
+            IFileSystemAPIs fileSystem = DependencyService.Get<IFileSystemAPIs>();
+            XmlSerializer serializer = new XmlSerializer(typeof(List<AppShortcutInfo>));
+            Stream fileStream = fileSystem.OpenFile(filePath, UtilFileMode.Open);
+            if (fileStream == null)
+            {
+                DebuggingUtils.Dbg("OpenFile failed : " + filePath);
+                // Below lines are just for sample
+                List<AppShortcutInfo> result = GetSampleList();
+                WriteToFile(result, filePath);
+                return result;
+            }
+
+            StreamReader streamReader = new StreamReader(fileStream);
+            return (List<AppShortcutInfo>)serializer.Deserialize(streamReader);
+        }
+
+        public static bool WriteToFile(IEnumerable<AppShortcutInfo> pinnedAppInfo, string filePath)
+        {
+            IFileSystemAPIs fileSystem = DependencyService.Get<IFileSystemAPIs>();
+            XmlSerializer serializer = new XmlSerializer(typeof(List<AppShortcutInfo>));
+            Stream fileStream = fileSystem.OpenFile(filePath, UtilFileMode.OpenOrCreate);
+            if (fileStream == null)
+            {
+                return false;
+            }
+
+            StreamWriter streamWriter = new StreamWriter(fileStream);
+            serializer.Serialize(streamWriter, pinnedAppInfo);
+            streamWriter.Flush();
+            fileSystem.CloseFile(fileStream);
+            return true;
+        }
+
+        public void AddFileSystemChangedListener(EventHandler<EventArgs> eventListener)
+        {
+            fileSystemWatcher.CustomChanged += eventListener;
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/DBUtil.cs b/LibTVRefCommonPortable/Utils/DBUtil.cs
new file mode 100644 (file)
index 0000000..54c6f13
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace TVHome.Utils
+{
+    public class DBUtil
+    {
+        public String DBFileName
+        {
+            get;
+            set;
+        }
+
+        public DBUtil(string dbFilename)
+        {
+
+        }
+
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/DebuggingUtils.cs b/LibTVRefCommonPortable/Utils/DebuggingUtils.cs
new file mode 100644 (file)
index 0000000..11abd12
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Xamarin.Forms;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    /// <summary>
+    /// A debugging utility class.
+    /// </summary>
+    public sealed class DebuggingUtils
+    {
+        private static IDebuggingAPIs ism;
+        private static readonly DebuggingUtils instance = new DebuggingUtils();
+
+        /// <summary>
+        /// A method provides instance of DebuggingUtils. </summary>
+        public static DebuggingUtils Instance
+        {
+            get { return instance; }
+        }
+
+        /// <summary>
+        /// Default implementation of IDebuggingAPIs interface .
+        /// This is required for the unit testing of the Calculator application. </summary>
+        private class DefaultSM : IDebuggingAPIs
+        {
+            public void Dbg(string message)
+            {
+            }
+
+            public void Err(string message)
+            {
+            }
+
+            public void Popup(string message)
+            {
+            }
+        }
+
+        /// <summary>
+        /// DebuggingUtils constructor which set interface instance. </summary>
+        private DebuggingUtils()
+        {
+            if (DependencyService.Get<IDebuggingAPIs>() != null)
+            {
+                ism = DependencyService.Get<IDebuggingAPIs>();
+            }
+            else
+            {
+                ism = new DefaultSM();
+            }
+        }
+
+        /// <summary>
+        /// A method displays a debugging message </summary>
+        /// <param name="message"> A list of command line arguments.</param>
+        public static void Dbg(string message)
+        {
+            ism.Dbg(message);
+        }
+
+        /// <summary>
+        /// A method displays a error message </summary>
+        /// <param name="message"> A list of command line arguments.</param>
+        public static void Err(string message)
+        {
+            ism.Err(message);
+        }
+
+        /// <summary>
+        /// A method displays a pop up  message </summary>
+        /// <param name="message"> A list of command line arguments.</param>
+        public static void Popup(string message)
+        {
+            ism.Popup(message);
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/IAppControl.cs b/LibTVRefCommonPortable/Utils/IAppControl.cs
new file mode 100644 (file)
index 0000000..d1b53ba
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public interface IAppControl
+    {
+        void SendLaunchRequest(string PkgID);
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/IApplicationManagerAPIs.cs b/LibTVRefCommonPortable/Utils/IApplicationManagerAPIs.cs
new file mode 100644 (file)
index 0000000..cd33c16
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public interface IApplicationManagerAPIs
+    {
+        Task<Dictionary<string, string[]>> GetRecentApplications();
+        Dictionary<string, string> GetInstalledApplication(string applicationId);
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/IBTAPIs.cs b/LibTVRefCommonPortable/Utils/IBTAPIs.cs
new file mode 100644 (file)
index 0000000..dec18b1
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public interface IBTAPIs
+    {
+        void BTOn();
+
+        void BTOff();
+
+        void LaunchBTSetting();
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/IDBAPIs.cs b/LibTVRefCommonPortable/Utils/IDBAPIs.cs
new file mode 100644 (file)
index 0000000..a219005
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Collections.Generic;
+using LibTVRefCommmonPortable.DataModels;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public interface IDBAPIs
+    {
+        bool ExecSQL(string dbName, string sql);
+
+        bool ExecSQL(string dbName, string sql, out IEnumerable<DBItem> items);
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/IDebuggingAPIs.cs b/LibTVRefCommonPortable/Utils/IDebuggingAPIs.cs
new file mode 100644 (file)
index 0000000..933d6ad
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    /// <summary>
+    /// A interface contains debugging methods which are using platform subsystems.
+    /// </summary>
+    /// <remarks>
+    /// Implementing this class should be occurred in platform project.
+    /// Also the implementation should be registered to the DependencyService in a app initialization.
+    /// Please refer to Xamarin Dependency Service
+    /// https://developer.xamarin.com/guides/xamarin-forms/dependency-service/introduction/
+    /// </remarks>
+    public interface IDebuggingAPIs
+    {
+        /// <summary>
+        /// A method displays a debugging log. </summary>
+        /// <param name="message"> A debugging message.</param>
+        void Popup(string message);
+
+        /// <summary>
+        /// A method displays a error log. </summary>
+        /// <param name="message"> A error message.</param>
+        void Dbg(string message);
+
+        /// <summary>
+        /// A method displays a dialog with a given message. </summary>
+        /// <param name="message"> A debugging message.</param>
+        void Err(string message);
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/IFileSystemAPIs.cs b/LibTVRefCommonPortable/Utils/IFileSystemAPIs.cs
new file mode 100644 (file)
index 0000000..df6aef6
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.IO;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    //
+    // 요약:
+    //     운영 체제에서 파일을 여는 방법을 지정합니다.
+    public enum UtilFileMode
+    {
+        CreateNew = 1,
+        Create = 2,
+        Open = 3,
+        OpenOrCreate = 4,
+        Truncate = 5,
+        Append = 6
+    }
+
+    public interface IFileSystemAPIs
+    {
+        Stream OpenFile(string filePath, UtilFileMode mode);
+        void Flush(Stream stream);
+        void CloseFile(Stream stream);
+
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/IFileSystemWatcherAPIs.cs b/LibTVRefCommonPortable/Utils/IFileSystemWatcherAPIs.cs
new file mode 100644 (file)
index 0000000..fbc8c6f
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using LibTVRefCommmonPortable.DataModels;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public interface IFileSystemWatcherAPIs
+    {
+        event EventHandler<EventArgs> CustomChanged;
+        void Run();
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/IPackageManager.cs b/LibTVRefCommonPortable/Utils/IPackageManager.cs
new file mode 100644 (file)
index 0000000..073609a
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    /// <summary>
+    /// A interface contains debugging methods which are using platform subsystems.
+    /// </summary>
+    /// <remarks>
+    /// Implementing this class should be occurred in platform project.
+    /// Also the implementation should be registered to the DependencyService in a app initialization.
+    /// Please refer to Xamarin Dependency Service
+    /// https://developer.xamarin.com/guides/xamarin-forms/dependency-service/introduction/
+    /// </remarks>
+    public interface IPackageManager
+    {
+        Dictionary<string, string[]> GetPackageList();
+
+        string GetPackage(string PkgID);
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/ITVHome.cs b/LibTVRefCommonPortable/Utils/ITVHome.cs
new file mode 100644 (file)
index 0000000..13b9c07
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using LibTVRefCommmonPortable.Models;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public interface ITVHome
+    {
+        AppShortcutController AppShortcutControllerInstance
+        {
+            get;
+        }
+
+        RecentShortcutController RecentShortcutControllerInstance
+        {
+            get;
+        }
+
+        SettingShortcutController SettingShortcutControllerInstance
+        {
+            get;
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/IWifiAPIs.cs b/LibTVRefCommonPortable/Utils/IWifiAPIs.cs
new file mode 100644 (file)
index 0000000..426581e
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public interface IWifiAPIs
+    {
+        void WifiOn();
+
+        void WifiOff();
+
+        void LaunchWifiSetting();
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/PackageManagerUtils.cs b/LibTVRefCommonPortable/Utils/PackageManagerUtils.cs
new file mode 100644 (file)
index 0000000..7ccaf4e
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using LibTVRefCommmonPortable.Utils;
+using Xamarin.Forms;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public sealed class PackageManagerUtils
+    {
+        private static IPackageManager ipm;
+        private static readonly PackageManagerUtils instance = new PackageManagerUtils();
+
+        public static PackageManagerUtils Instance
+        {
+            get { return instance; }
+        }
+
+        private class DefaultPM : IPackageManager
+        {
+            public Dictionary<string, string[]> GetPackageList()
+            {
+                return null;
+            }
+
+            public string GetPackage(string PkgID)
+            {
+                return null;
+            }
+        }
+
+        private PackageManagerUtils()
+        {
+            if (DependencyService.Get<IPackageManager>() != null)
+            {
+                ipm = DependencyService.Get<IPackageManager>();
+            }
+            else
+            {
+                ipm = new DefaultPM();
+            }
+        }
+
+        public Dictionary<string, string[]> GetPackageList()
+        {
+            return ipm.GetPackageList();
+        }
+
+        public string GetPackage(string PkgID)
+        {
+            return ipm.GetPackage(PkgID);
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs b/LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs
new file mode 100644 (file)
index 0000000..a7d76bd
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Collections.Generic;
+using LibTVRefCommmonPortable.DataModels;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public class RecentShortcutStorage
+    {
+        public RecentShortcutStorage()
+        {
+
+        }
+
+        public static bool Create()
+        {
+            return false;
+        }
+
+        public static RecentShortcutInfo Read(string key)
+        {
+            RecentShortcutInfo recentShortcutInfo = new RecentShortcutInfo();
+            return recentShortcutInfo;
+        }
+
+        public static IEnumerable<RecentShortcutInfo> Read()
+        {
+            List<RecentShortcutInfo> list = new List<RecentShortcutInfo>();
+
+            return list;
+        }
+
+        public static bool Update(ShortcutInfo shortcut)
+        {
+            // 받은 인자는 조정이 필요함.
+            return false;
+        }
+
+        public static void Delete(ShortcutInfo shortcut)
+        {
+            // 받은 인자는 조정이 필요함.
+        }
+
+        public static void DeleteAll()
+        {
+            // 받은 인자는 조정이 필요함.
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/Utils/TVHomeImpl.cs b/LibTVRefCommonPortable/Utils/TVHomeImpl.cs
new file mode 100644 (file)
index 0000000..c53495c
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using LibTVRefCommmonPortable.Models;
+
+namespace LibTVRefCommmonPortable.Utils
+{
+    public class TVHomeImpl : ITVHome
+    {
+        private static readonly TVHomeImpl instance = new TVHomeImpl();
+        public static ITVHome GetInstance
+        {
+            get
+            {
+                return instance;
+            }
+        }
+
+        private TVHomeImpl()
+        {
+
+        }
+
+        private static readonly AppShortcutController appShortcutController = new AppShortcutController();
+        public AppShortcutController AppShortcutControllerInstance
+        {
+            get
+            {
+                return appShortcutController;
+            }
+        }
+
+        private static readonly RecentShortcutController recentShortcutController = new RecentShortcutController();
+        public RecentShortcutController RecentShortcutControllerInstance
+        {
+            get
+            {
+                return recentShortcutController;
+            }
+        }
+
+        private static readonly SettingShortcutController settingShortcutController = new SettingShortcutController();
+        public SettingShortcutController SettingShortcutControllerInstance
+        {
+            get
+            {
+                return settingShortcutController;
+            }
+        }
+    }
+}
diff --git a/LibTVRefCommonPortable/packages.config b/LibTVRefCommonPortable/packages.config
new file mode 100644 (file)
index 0000000..76b2b35
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Xamarin.Forms" version="2.2.0.45" targetFramework="portable45-net45+win8+wp8+wpa81" />
+</packages>
\ No newline at end of file
diff --git a/LibTVRefCommonTizen/LibTVRefCommonTizen.cs b/LibTVRefCommonTizen/LibTVRefCommonTizen.cs
new file mode 100644 (file)
index 0000000..d53b4eb
--- /dev/null
@@ -0,0 +1,12 @@
+using System;
+
+namespace LibTVRefCommonTizen
+{
+    public class MyLibrary
+    {
+        public string MyMethod()
+        {
+            return "Hello Tizen Library!!!";
+        }
+    }
+}
diff --git a/LibTVRefCommonTizen/LibTVRefCommonTizen.csproj b/LibTVRefCommonTizen/LibTVRefCommonTizen.csproj
new file mode 100644 (file)
index 0000000..6df096f
--- /dev/null
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectTypeGuids>{2F98DAC9-6F16-457B-AED7-D43CAC379341};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <ProjectGuid>{C558D279-897E-45E1-A10A-DECD788770F4}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>LibTVRefCommonTizen</RootNamespace>
+    <AssemblyName>LibTVRefCommonTizen</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <DefaultLanguage>en-US</DefaultLanguage>
+  </PropertyGroup>
+  <PropertyGroup>
+    <TargetFrameworkIdentifier>DNXCore</TargetFrameworkIdentifier>
+    <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
+    <NuGetTargetMoniker>.NETCoreApp,Version=v1.0</NuGetTargetMoniker>
+    <NoStdLib>true</NoStdLib>
+    <NoWarn>$(NoWarn);1701</NoWarn>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>portable</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>portable</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <None Include="LibTVRefCommonTizen.project.json" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="LibTVRefCommonTizen.cs" />
+    <Compile Include="Ports\AppControlPort.cs" />
+    <Compile Include="Ports\ApplicationManagerPort.cs" />
+    <Compile Include="Ports\BTModulePort.cs" />
+    <Compile Include="Ports\DBPort.cs" />
+    <Compile Include="Ports\DebuggingPort.cs" />
+    <Compile Include="Ports\FileSystemPort.cs" />
+    <Compile Include="Ports\FileSystemWatcherPort.cs" />
+    <Compile Include="Ports\PackageManagerPort.cs" />
+    <Compile Include="Ports\WifiModulePort.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\LibTVRefCommonPortable\LibTVRefCommonPortable.csproj">
+      <Project>{67f9d3a8-f71e-4428-913f-c37ae82cdb24}</Project>
+      <Name>LibTVRefCommonPortable</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="BeforeBuild">
+       </Target>
+       <Target Name="AfterBuild">
+       </Target>
+       -->
+  <PropertyGroup>
+    <!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and
+                        https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/target-dotnetcore-with-msbuild
+               -->
+    <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two
+                        properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and
+                        to prevent it from outputting a warning (MSB3644).
+               -->
+    <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>
+    <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>
+    <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
+  </PropertyGroup>
+  <ProjectExtensions>
+    <VisualStudio>
+      <FlavorProperties GUID="{2F98DAC9-6F16-457B-AED7-D43CAC379341}" Configuration="Debug|Any CPU">
+        <ProjectCorporateFlavorCfg />
+      </FlavorProperties>
+      <FlavorProperties GUID="{2F98DAC9-6F16-457B-AED7-D43CAC379341}" Configuration="Release|Any CPU">
+        <ProjectCorporateFlavorCfg />
+      </FlavorProperties>
+    </VisualStudio>
+  </ProjectExtensions>
+</Project>
\ No newline at end of file
diff --git a/LibTVRefCommonTizen/LibTVRefCommonTizen.nuget.targets b/LibTVRefCommonTizen/LibTVRefCommonTizen.nuget.targets
new file mode 100644 (file)
index 0000000..0fb90a4
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Condition="'$(NuGetPackageRoot)' == ''">
+    <NuGetPackageRoot>$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
+  </PropertyGroup>
+  <ImportGroup>
+    <Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.3.193\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.3.193\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/LibTVRefCommonTizen/LibTVRefCommonTizen.project.json b/LibTVRefCommonTizen/LibTVRefCommonTizen.project.json
new file mode 100644 (file)
index 0000000..8032092
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "dependencies": {
+       "ElmSharp": "1.1.0-beta-010",
+    "Microsoft.NETCore.App": "1.1.0",
+    "Tizen.Library": "1.0.0-pre2",
+    "Xamarin.Forms": "2.3.3.193",
+    "Xamarin.Forms.Platform.Tizen": "2.3.3.175-beta-007"
+  },
+  "frameworks": {
+   "netcoreapp1.0": {
+      "imports": [
+        "portable-net45+wp80+win81+wpa81",
+        "netstandard1.6"
+      ]
+    }
+  }
+}
\ No newline at end of file
diff --git a/LibTVRefCommonTizen/Ports/AppControlPort.cs b/LibTVRefCommonTizen/Ports/AppControlPort.cs
new file mode 100644 (file)
index 0000000..1fffa91
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using LibTVRefCommmonPortable.Utils;
+using Tizen;
+using Tizen.Applications;
+
+namespace LibTVRefCommonTizen.Ports
+{
+    public class AppControlPort : IAppControl
+    {
+        public void SendLaunchRequest(string PkgID)
+        {
+            AppControl appControl = new AppControl();
+
+            if (PkgID != null)
+            {
+                appControl.ApplicationId = PkgID;
+            }
+            else
+            {
+                appControl.ApplicationId = "org.tizen.settings";
+            }
+
+            AppControl.SendLaunchRequest(appControl);
+        }
+    }
+}
diff --git a/LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs b/LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs
new file mode 100644 (file)
index 0000000..dc3b1a2
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Xamarin.Forms.Platform.Tizen.Native;
+using Tizen;
+using Tizen.Applications;
+using LibTVRefCommmonPortable.Utils;
+
+namespace LibTVRefCommonTizen.Ports
+{
+    public class ApplicationManagerPort : IApplicationManagerAPIs
+    {
+        public ApplicationManagerPort()
+        {
+            ApplicationManager.ApplicationLaunched += new EventHandler<ApplicationLaunchedEventArgs>(OnApplicationLaunched);
+        }
+
+        void OnApplicationLaunched(object sender, EventArgs args)
+        {
+            ApplicationLaunchedEventArgs launchedEventArgs = args as ApplicationLaunchedEventArgs;
+            DebuggingUtils.Dbg(launchedEventArgs.ApplicationInfo.Label.ToString() + " launched");
+        }
+
+        public async Task<Dictionary<string, string[]>> GetRecentApplications()
+        {
+            // RUA가 지원되지 않으므로 일단 설치된 app들을 가져와 본다
+            // TODO: RUA로 대체한다
+            Dictionary<string, string[]> resultList = new Dictionary<string, string[]>();
+            var applicationList = await ApplicationManager.GetInstalledApplicationsAsync();
+            string[] result;
+
+            foreach (ApplicationInfo appInfo in applicationList)
+            {
+                result = new string[3];
+
+                result[0] = (appInfo.Label != null) ? appInfo.Label : null;
+                result[1] = (appInfo.ApplicationId != null) ? appInfo.ApplicationId : null;
+                result[2] = (System.IO.File.Exists(appInfo.IconPath)) ? appInfo.IconPath : "AppIcon.png";
+                resultList.Add(appInfo.ApplicationId, result);
+            }
+
+            return resultList;
+        }
+
+        public Dictionary<string, string> GetInstalledApplication(string applicationId)
+        {
+            Dictionary<string, string> result = null;
+            ApplicationInfo appInfo = null;
+            string[] icons = { "ic_black.png", "ic_blue.png", "ic_green.png", "ic_red.png", "ic_yellow.png", "AppIcon.png" };
+            Random random = new Random();
+
+            try
+            {
+                appInfo = ApplicationManager.GetInstalledApplication(applicationId);
+                if (appInfo == null)
+                {
+                    DebuggingPort.D("GetInstalledApplication failed");
+                    return null;
+                }
+
+                result = new Dictionary<string, string>();
+                result.Add("Label", appInfo.Label);
+                result.Add("ApplicationId", appInfo.ApplicationId);
+                result.Add("IconPath", (System.IO.File.Exists(appInfo.IconPath)) ? appInfo.IconPath : icons[random.Next(0, 6)]);
+            }
+            catch (Exception exception)
+            {
+                DebuggingPort.E("Exception " + applicationId + " :" + exception.Message);
+                return null;
+            }
+
+            return result;
+        }
+        /*
+        public async Task<IEnumerable<AppItem>> GetAllInstalledApplication()
+        {
+            try
+            {
+                List<AppItem> appItemList = new List<AppItem>();
+                Task<IEnumerable<ApplicationInfo>> task = ApplicationManager.GetInstalledApplicationsAsync();
+                if (task == null)
+                {
+                    DebuggingPort.D("GetInstalledApplication failed");
+                    return null;
+                }
+
+                IEnumerable<ApplicationInfo> installedList = await task;
+
+                foreach (var appInfo in installedList)
+                {
+                    DebuggingPort.D("-------------------------------------");
+                    DebuggingPort.D("TRY" + appInfo.ToString());
+                    if (appInfo.IsNoDisplay)
+                    {
+                        continue;
+                    }
+
+                    Package pkgInfo = PackageManager.GetPackage(appInfo.PackageId);
+                    if (pkgInfo == null)
+                    {
+                        continue;
+                    }
+
+                    DebuggingPort.D("TRY" + pkgInfo.ToString());
+
+                    if (pkgInfo.IsSystemPackage)
+                    {
+                        continue;
+                    }
+
+                    DebuggingPort.D("ADD" + appInfo.ToString());
+                    AppItem item = new AppItem();
+                    item.Title = appInfo.Label;
+                    item.IconUrl = appInfo.IconPath;
+                    item.IconColor = "#00000000";
+                    appItemList.Add(item);
+                }
+
+                return appItemList;
+            }
+            catch (Exception exception)
+            {
+                DebuggingPort.E(exception.Message);
+                return null;
+            }
+        }*/
+    }
+}
\ No newline at end of file
diff --git a/LibTVRefCommonTizen/Ports/BTModulePort.cs b/LibTVRefCommonTizen/Ports/BTModulePort.cs
new file mode 100644 (file)
index 0000000..cb7f548
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Xamarin.Forms.Platform.Tizen.Native;
+using Tizen;
+using LibTVRefCommmonPortable.Utils;
+using System;
+
+namespace LibTVRefCommonTizen.Ports
+{
+    public class BTModulePort : IBTAPIs
+    {
+        public void BTOff()
+        {
+            DebuggingUtils.Dbg("BT is OFF");
+        }
+
+        public void BTOn()
+        {
+            DebuggingUtils.Dbg("BT is ON");
+        }
+
+        public void LaunchBTSetting()
+        {
+            DebuggingUtils.Dbg("BT setting is launched");
+        }
+    }
+}
\ No newline at end of file
diff --git a/LibTVRefCommonTizen/Ports/DBPort.cs b/LibTVRefCommonTizen/Ports/DBPort.cs
new file mode 100644 (file)
index 0000000..6b3a6ac
--- /dev/null
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+using Tizen;
+
+using LibTVRefCommmonPortable.DataModels;
+using LibTVRefCommmonPortable.Utils;
+
+namespace LibTVRefCommonTizen.Ports
+{
+    public class DBPort : IDBAPIs
+    {
+        internal class SQLite
+        {
+            private const string Library = "libsqlite3.so.0";
+
+            [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+            internal delegate int ExecCallback(IntPtr notUsed, int numberOfColumn, IntPtr value, IntPtr column);
+
+            [DllImport(Library, EntryPoint = "sqlite3_open", CallingConvention = CallingConvention.Cdecl)]
+            internal static extern int Open(string fileName, out IntPtr handle);
+
+            [DllImport(Library, EntryPoint = "sqlite3_close", CallingConvention = CallingConvention.Cdecl)]
+            internal static extern int Close(IntPtr handle);
+
+            [DllImport(Library, EntryPoint = "sqlite3_exec", CallingConvention = CallingConvention.Cdecl)]
+            internal static extern int Exec(IntPtr handle, string sql, ExecCallback callback, IntPtr notUsed, IntPtr errorMessage);
+        }
+
+        private const int SQLITE_OK = 0;
+        private const int SQLITE_ROW = 100;
+
+        private const int FIRST_COLUMN = 0;
+
+        private int ptrSize = Marshal.SizeOf<IntPtr>();
+
+        public int PtrSize
+        {
+            get
+            {
+                return ptrSize;
+            }
+        }
+
+        public String appDataPath
+        {
+            get;
+            private set;
+        }
+
+        public DBPort(String appDataPath)
+        {
+            this.appDataPath = appDataPath;
+
+            // TODO : make a unit test for this!!!
+            DebuggingPort.D("DBPort-------------------------------------");
+            DebuggingPort.D("version " + ExecSQL("csk", "SELECT SQLITE_VERSION()"));
+            DebuggingPort.D("create " + ExecSQL("csk", "CREATE TABLE friends(Id INTEGER PRIMARY KEY, Name TEXT);"));
+
+            DebuggingPort.D("insert 1 " + ExecSQL("csk", "INSERT INTO friends(Name) VALUES ('Tom');"));
+            DebuggingPort.D("insert 2 " + ExecSQL("csk", "INSERT INTO friends(Name) VALUES ('Rebecca');"));
+            DebuggingPort.D("insert 3 " + ExecSQL("csk", "INSERT INTO friends(Name) VALUES ('Jim');"));
+            DebuggingPort.D("insert 4 " + ExecSQL("csk", "INSERT INTO friends(Name) VALUES ('Roger');"));
+            DebuggingPort.D("insert 5 " + ExecSQL("csk", "INSERT INTO friends(Name) VALUES ('Robert');"));
+
+            IEnumerable<DBItem> dbItems = new List<DBItem>();
+            DebuggingPort.D("select " + ExecSQL("csk", "SELECT * FROM friends;", out dbItems));
+            foreach (var item in dbItems)
+            {
+                foreach (var value in item.ItemProperties)
+                {
+                    DebuggingPort.D("column[" + value.Key + "] = " + value.Value);
+                }
+            }
+
+            DebuggingPort.D("insert 5 " + ExecSQL("csk", "DROP TABLE friends;"));
+        }
+
+        private static bool CheckResult(int res, string desc)
+        {
+            if (res != SQLITE_OK)
+            {
+                DebuggingPort.D(String.Format("DB Error [{0}], {1}", desc, res));
+                return false;
+            }
+
+            return true;
+        }
+
+        private static bool Open(string appDataPath, string dbName, out IntPtr handle)
+        {
+            DebuggingPort.D("[DB Open]");
+            if (dbName == null)
+            {
+                DebuggingPort.E("DB Name is NULL!!!");
+                handle = IntPtr.Zero;
+                return false;
+            }
+
+            string dbPath = appDataPath + dbName;
+            Log.Debug("csk", dbPath);
+            return CheckResult(SQLite.Open(appDataPath + dbName + ".db", out handle), "open");
+
+        }
+
+        private static void Close(IntPtr handle)
+        {
+            DebuggingPort.D("[DB Close]");
+            if (handle == null)
+            {
+                return;
+            }
+
+            SQLite.Close(handle);
+        }
+
+        internal sealed class DBHandleRAII// : IDisposable
+        {
+            internal IntPtr handle;
+            internal DBHandleRAII(String appDataPath, string fileName)
+            {
+                Open(appDataPath, fileName, out handle);
+            }
+
+            ~DBHandleRAII()
+            {
+                Close(handle);
+            }
+            // TODO : Change to use IDisposable!!!
+            // Dispose is not calling!!!
+            /*
+            public void Dispose()
+            {
+                Close(handle);
+            }
+            */
+        }
+
+        public bool ExecSQL(string dbName, string sql)
+        {
+            if (dbName == null || sql == null)
+            {
+                DebuggingPort.E("Invalid argument!!!");
+                return false;
+            }
+
+            DBHandleRAII db = new DBHandleRAII(appDataPath, dbName);
+            if (db.handle == IntPtr.Zero)
+            {
+                DebuggingPort.E("DB open failed!!!");
+                return false;
+            }
+
+            return CheckResult(SQLite.Exec(db.handle, sql, null, IntPtr.Zero, IntPtr.Zero), "exec ");
+        }
+
+        // TODO : Make this thread safe!!!
+        List<DBItem> givenItems = new List<DBItem>();
+
+        private int ExecCallback(IntPtr notUsed, int numberOfColumn, IntPtr value, IntPtr column)
+        {
+            DebuggingPort.D("ExecCallback");
+            for (int i = 1; i < numberOfColumn; i++)
+            {
+                string _value = Marshal.PtrToStringAnsi(Marshal.ReadIntPtr(value, i * PtrSize));
+                DebuggingPort.E("" + i + " - " + _value + " / ");
+                DBItem item = new DBItem();
+                item.Add(i, _value);
+                givenItems.Add(item);
+            }
+
+            return 0;
+        }
+
+        public bool ExecSQL(string dbName, string sql, out IEnumerable<DBItem> items)
+        {
+            givenItems.Clear();
+            items = givenItems;
+
+            DebuggingPort.D("ExecSQL");
+            if (dbName == null || sql == null)
+            {
+                DebuggingPort.E("Invalid argument!!!");
+                return false;
+            }
+
+            DBHandleRAII db = new DBHandleRAII(appDataPath, dbName);
+            if (db.handle == IntPtr.Zero)
+            {
+                DebuggingPort.E("DB open failed!!!");
+                return false;
+            }
+
+            if (CheckResult(SQLite.Exec(db.handle, sql, ExecCallback, IntPtr.Zero, IntPtr.Zero), "exec") == false)
+            {
+                return false;
+            }
+
+            return true;
+        }
+
+    }
+
+}
diff --git a/LibTVRefCommonTizen/Ports/DebuggingPort.cs b/LibTVRefCommonTizen/Ports/DebuggingPort.cs
new file mode 100644 (file)
index 0000000..eceaef2
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Xamarin.Forms.Platform.Tizen.Native;
+using Tizen;
+using LibTVRefCommmonPortable.Utils;
+
+namespace LibTVRefCommonTizen.Ports
+{
+    /// <summary>
+    /// Platform dependent implementation for the Logging and the Popup displaying.
+    /// DebuggingPort is implementing IDebuggingAPIs which is defined in Calculator shared project.
+    /// </summary>
+    /// <remarks>
+    /// Please refer to Xamarin Dependency Service
+    /// https://developer.xamarin.com/guides/xamarin-forms/dependency-service/introduction/
+    /// </remarks>
+    public class DebuggingPort : IDebuggingAPIs
+    {
+        /// <summary>
+        /// A TV Home Windows reference. This is used to display a Dialog</summary>
+        public static Xamarin.Forms.Platform.Tizen.Native.Window MainWindow
+        {
+            set;
+            get;
+        }
+
+        /// <summary>
+        /// A Logging Tag. </summary>
+        public static string TAG = "home";
+
+        /// <summary>
+        /// A method displays a debugging log. </summary>
+        /// <param name="message"> A debugging message.</param>
+        public void Dbg(string message)
+        {
+            Log.Debug(TAG, message);
+        }
+
+        /// <summary>
+        /// A method displays a error log. </summary>
+        /// <param name="message"> A error message.</param>
+        public void Err(string message)
+        {
+            Log.Error(TAG, message);
+        }
+
+        /// <summary>
+        /// A method displays a dialog with a given message. </summary>
+        /// <param name="message"> A debugging message.</param>
+        public void Popup(string message)
+        {
+            if (MainWindow == null)
+            {
+                return;
+            }
+            //bool result = await Xamarin.Forms.Page.DisplayAlert("Calculator", message, "OK");
+
+            Dialog toast = new Dialog(MainWindow);
+            toast.Title = message;
+            toast.Timeout = 2.3;
+            toast.BackButtonPressed += (s, e) =>
+            {
+                toast.Dismiss();
+            };
+            toast.Show();
+        }
+
+        public static void D(string message)
+        {
+            Log.Debug(TAG, message);
+        }
+
+        public static void E(string message)
+        {
+            Log.Error(TAG, message);
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/LibTVRefCommonTizen/Ports/FileSystemPort.cs b/LibTVRefCommonTizen/Ports/FileSystemPort.cs
new file mode 100644 (file)
index 0000000..c190185
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.IO;
+
+using Tizen;
+using Tizen.Applications;
+using LibTVRefCommmonPortable.Utils;
+
+namespace LibTVRefCommonTizen.Ports
+{
+    public class FileSystemPort : IFileSystemAPIs
+    {
+        public Stream OpenFile(string filePath, UtilFileMode mode)
+        {
+            Stream fileStream = null;
+            DebuggingPort.D("Opening the file... " + filePath);
+            try
+            {
+                fileStream = new FileStream(filePath, (FileMode)mode);
+                DebuggingPort.D("Opened.");
+            }
+            catch (Exception exception)
+            {
+                DebuggingPort.E("Exception!! " + exception.Message);
+            }
+
+            return fileStream;
+        }
+
+        public void Flush(Stream stream)
+        {
+            var fileStream = stream as FileStream;
+            fileStream.Flush();
+        }
+
+        public void CloseFile(Stream stream)
+        {
+            var fileStream = stream as FileStream;
+            fileStream.Dispose();
+        }
+    }
+}
diff --git a/LibTVRefCommonTizen/Ports/FileSystemWatcherPort.cs b/LibTVRefCommonTizen/Ports/FileSystemWatcherPort.cs
new file mode 100644 (file)
index 0000000..8a926dd
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+using System;
+using System.IO;
+using LibTVRefCommmonPortable.Utils;
+using LibTVRefCommmonPortable.DataModels;
+
+namespace LibTVRefCommonTizen.Ports
+{
+    public class FileSystemWatcherPort : IFileSystemWatcherAPIs
+    {
+        static FileSystemWatcher watcher;
+        public event EventHandler<EventArgs> CustomChanged;
+        private FileSystemEventCustomArgs args;
+
+        public void Run()
+        {
+            watcher = new FileSystemWatcher();
+            watcher.Path = "/opt/usr/home/owner/share/";
+            watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.Size;
+            watcher.Filter = "apinnedapp.xml";
+
+            watcher.Created += new FileSystemEventHandler(WatcherChanged);
+            watcher.Changed += new FileSystemEventHandler(WatcherChanged);
+            watcher.Deleted += new FileSystemEventHandler(WatcherChanged);
+            watcher.IncludeSubdirectories = true;
+            watcher.EnableRaisingEvents = true;
+        }
+
+        private void WatcherChanged(object sender, FileSystemEventArgs e)
+        {
+            args = new FileSystemEventCustomArgs((WatcherType)e.ChangeType, e.FullPath, e.Name);
+            if (e.ChangeType.Equals(WatcherChangeTypes.Changed))
+            {
+                CustomChanged(this, args);
+            }
+
+            DebuggingPort.D(e.ChangeType + ", " + e.Name);
+        }
+    }
+}
diff --git a/LibTVRefCommonTizen/Ports/PackageManagerPort.cs b/LibTVRefCommonTizen/Ports/PackageManagerPort.cs
new file mode 100644 (file)
index 0000000..99d99c3
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Tizen;
+using Tizen.Applications;
+
+using LibTVRefCommmonPortable.Utils;
+
+namespace LibTVRefCommonTizen.Ports
+{
+    public class PackageManagerPort : IPackageManager
+    {
+        public PackageManagerPort()
+        {
+            PackageManager.InstallProgressChanged += PackageManager_InstallProgressChanged;
+            PackageManager.UninstallProgressChanged += PackageManager_UninstallProgressChanged;
+        }
+
+        private void PackageManager_UninstallProgressChanged(object sender, PackageManagerEventArgs e)
+        {
+            if (e.State == PackageEventState.Completed)
+            {
+                DebuggingUtils.Dbg("uninstall completed");
+            }
+        }
+
+        private void PackageManager_InstallProgressChanged(object sender, PackageManagerEventArgs e)
+        {
+            if (e.State == PackageEventState.Completed)
+            {
+                DebuggingUtils.Dbg("install completed");
+            }
+        }
+
+        public Dictionary<string, string[]> GetPackageList()
+        {
+            Dictionary<string, string[]> pkgList = new Dictionary<string, string[]>();
+            IEnumerable<Package> packages = PackageManager.GetPackages();
+
+            string[] result;
+
+            foreach (var item in packages)
+            {
+                result = new string[3];
+
+                result[0] = (item.Label != null) ? item.Label : null;
+                result[1] = (item.Id != null) ? item.Id : null;
+                result[2] = (System.IO.File.Exists(item.IconPath)) ? item.IconPath : "AppIcon.png";
+
+                pkgList.Add(item.Label, result);
+            }
+
+            return pkgList;
+        }
+
+        public string GetPackage(string PkgID)
+        {
+            Package tempItem = PackageManager.GetPackage(PkgID);
+
+            return (tempItem != null) ? tempItem.Label : null;
+        }
+    }
+}
\ No newline at end of file
diff --git a/LibTVRefCommonTizen/Ports/WifiModulePort.cs b/LibTVRefCommonTizen/Ports/WifiModulePort.cs
new file mode 100644 (file)
index 0000000..d03fe5a
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Xamarin.Forms.Platform.Tizen.Native;
+using Tizen;
+using LibTVRefCommmonPortable.Utils;
+using System;
+
+namespace LibTVRefCommonTizen.Ports
+{
+    public class WifiModulePort : IWifiAPIs
+    {
+
+        public void WifiOff()
+        {
+            DebuggingUtils.Dbg("WiFi is OFF");
+        }
+
+        public void WifiOn()
+        {
+            DebuggingUtils.Dbg("WiFi is ON");
+        }
+
+        public void LaunchWifiSetting()
+        {
+            DebuggingUtils.Dbg("WiFi setting is launched");
+        }
+    }
+}
\ No newline at end of file
diff --git a/LibTVRefCommonTizen/Properties/AssemblyInfo.cs b/LibTVRefCommonTizen/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..cc5ece9
--- /dev/null
@@ -0,0 +1,36 @@
+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("LibTVRefCommonTizen")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("LibTVRefCommonTizen")]
+[assembly: AssemblyCopyright("Copyright ©  2017")]
+[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("c558d279-897e-45e1-a10a-decd788770f4")]
+
+// 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")]
diff --git a/LibTVRefCommonTizen/Settings.StyleCop b/LibTVRefCommonTizen/Settings.StyleCop
new file mode 100644 (file)
index 0000000..837530c
--- /dev/null
@@ -0,0 +1,722 @@
+<StyleCopSettings Version="105">
+  <GlobalSettings>
+    <StringProperty Name="MergeSettingsFiles">NoMerge</StringProperty>
+  </GlobalSettings>
+  <Analyzers>
+    <Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
+      <Rules>
+        <Rule Name="ElementsMustBeDocumented">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationMustHaveSummaryText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="EnumerationItemsMustBeDocumented">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationMustContainValidXml">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationMustHaveSummary">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PartialElementDocumentationMustHaveSummary">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="VoidReturnValueMustNotBeDocumented">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="GenericTypeParametersMustBeDocumented">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="GenericTypeParameterDocumentationMustHaveText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PropertySummaryDocumentationMustMatchAccessors">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationTextMustNotBeEmpty">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationTextMustContainWhitespace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationMustMeetCharacterPercentage">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationHeadersMustNotContainBlankLines">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="IncludedDocumentationXPathDoesNotExist">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="InheritDocMustBeUsedWithInheritingClass">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationMustBeSpelledCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileMustHaveHeader">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderMustShowCopyright">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderMustHaveCopyrightText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderMustContainFileName">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderMustHaveValidCompanyText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.NamingRules">
+      <Rules>
+        <Rule Name="ConstFieldNamesMustBeginWithUpperCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FieldNamesMustBeginWithLowerCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FieldNamesMustNotContainUnderscore">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementMustBeginWithLowerCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="NonPrivateReadonlyFieldsMustBeginWithUpperCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FieldNamesMustNotUseHungarianNotation">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="AccessibleFieldsMustBeginWithUpperCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="VariableNamesMustNotBePrefixed">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FieldNamesMustNotBeginWithUnderscore">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="StaticReadonlyFieldsMustBeginWithUpperCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
+      <Rules>
+        <Rule Name="AllAccessorsMustBeMultiLineOrSingleLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningCurlyBracketsMustNotBeFollowedByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationHeadersMustNotBeFollowedByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainMultipleBlankLinesInARow">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingCurlyBracketsMustNotBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningCurlyBracketsMustNotBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ChainedStatementBlocksMustNotBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="WhileDoFooterMustNotBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SingleLineCommentsMustNotBeFollowedByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementDocumentationHeaderMustBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SingleLineCommentMustBePrecededByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementsMustBeSeparatedByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainBlankLinesAtStartOfFile">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainBlankLinesAtEndOfFile">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
+      <Rules>
+        <Rule Name="AccessModifierMustBeDeclared">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FieldsMustBePrivate">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeAnalysisSuppressionMustHaveJustification">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DebugAssertMustProvideMessageText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DebugFailMustProvideMessageText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileMayOnlyContainASingleClass">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileMayOnlyContainASingleNamespace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="StatementMustNotUseUnnecessaryParenthesis">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ConditionalExpressionsMustDeclarePrecedence">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="RemoveDelegateParenthesisWhenPossible">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="AttributeConstructorMustNotUseUnnecessaryParenthesis">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="RemoveUnnecessaryCode">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
+      <Rules>
+        <Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementsMustAppearInTheCorrectOrder">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementsMustBeOrderedByAccess">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ConstantsMustAppearBeforeFields">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="StaticElementsMustAppearBeforeInstanceElements">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DeclarationKeywordsMustFollowOrder">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ProtectedMustComeBeforeInternal">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PropertyAccessorsMustFollowOrder">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="EventAccessorsMustFollowOrder">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="StaticReadonlyElementsMustAppearBeforeStaticNonReadonlyElements">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="InstanceReadonlyElementsMustAppearBeforeInstanceNonReadonlyElements">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="NoValueFirstComparison">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UsingDirectivesMustBeOrderedAlphabeticallyByNamespace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UsingAliasDirectivesMustBeOrderedAlphabeticallyByAliasName">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UsingStaticDirectivesMustBePlacedAfterUsingNamespaceDirectives">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
+      <Rules>
+        <Rule Name="CommentsMustContainText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DoNotPrefixCallsWithBaseUnlessLocalImplementationExists">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PrefixLocalCallsWithThis">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PrefixCallsCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningParenthesisMustBeOnDeclarationLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingParenthesisMustBeOnLineOfLastParameter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingParenthesisMustBeOnLineOfOpeningParenthesis">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CommaMustBeOnSameLineAsPreviousParameter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ParameterListMustFollowDeclaration">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ParameterMustFollowComma">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ParameterMustNotSpanMultipleLines">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="QueryClauseMustFollowPreviousClause">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="QueryClausesMustBeOnSeparateLinesOrAllOnOneLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="QueryClausesSpanningMultipleLinesMustBeginOnOwnLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DoNotPlaceRegionsWithinElements">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainEmptyStatements">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="BlockStatementsMustNotContainEmbeddedComments">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="BlockStatementsMustNotContainEmbeddedRegions">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UseStringEmptyForEmptyStrings">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UseBuiltInTypeAlias">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UseShorthandForNullableTypes">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
+      <Rules>
+        <Rule Name="CommasMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SemicolonsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DocumentationLinesMustBeginWithSingleSpace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SingleLineCommentsMustBeginWithSingleSpace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PreprocessorKeywordsMustNotBePrecededBySpace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OperatorKeywordMustBeFollowedBySpace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningCurlyBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingCurlyBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningGenericBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingGenericBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="OpeningAttributeBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingAttributeBracketsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="NullableTypeSymbolsMustNotBePrecededBySpace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="MemberAccessSymbolsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="IncrementDecrementSymbolsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="NegativeSignsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PositiveSignsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DereferenceAndAccessOfSymbolsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ColonsMustBeSpacedCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainMultipleWhitespaceInARow">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="TabsMustNotBeUsed">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="DoNotSplitNullConditionalOperators">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+  </Analyzers>
+</StyleCopSettings>
\ No newline at end of file
index a84930c101579b503c61bf6add0d487392513b90..1c609c9f82ddd5d4aaa8d422a7b67c12535876c5 100644 (file)
@@ -7,6 +7,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVApps", "TVApps\TVApps\TVA
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVApps.TizenTV", "TVApps\TVApps.TizenTV\TVApps.TizenTV.csproj", "{7E341BF5-B7BD-4532-9D4A-AA89537B525E}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibTVRefCommonPortable", "LibTVRefCommonPortable\LibTVRefCommonPortable.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibTVRefCommonTizen", "LibTVRefCommonTizen\LibTVRefCommonTizen.csproj", "{C558D279-897E-45E1-A10A-DECD788770F4}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
@@ -21,6 +25,14 @@ Global
                {7E341BF5-B7BD-4532-9D4A-AA89537B525E}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {7E341BF5-B7BD-4532-9D4A-AA89537B525E}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {7E341BF5-B7BD-4532-9D4A-AA89537B525E}.Release|Any CPU.Build.0 = Release|Any CPU
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.Build.0 = Release|Any CPU
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Release|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
index 421380b7a5db27640d47d3aa79ce4583feaf93c7..baffdb50d0dd617b05a3e58ec94ed0015bd3f55e 100644 (file)
  * limitations under the License.
  */
 
+using LibTVRefCommonTizen.Ports;
 using System;
 using System.Collections.Generic;
 using System.Threading.Tasks;
-using Xamarin.Forms.Platform.Tizen.Native;
-using Tizen;
 using Tizen.Applications;
-using TVApps.Utils;
 using TVApps.Models;
+using TVApps.Utils;
 
-namespace TVApps.TizenTV.Ports
+namespace TVApps.TizenTV
 {
     class ApplicationManagerPort : IApplicationManagerAPIs
     {
diff --git a/TVApps/TVApps.TizenTV/DebuggingPort.cs b/TVApps/TVApps.TizenTV/DebuggingPort.cs
deleted file mode 100644 (file)
index 892ace1..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Xamarin.Forms.Platform.Tizen.Native;
-using Tizen;
-using TVApps.Utils;
-
-namespace TVApps.TizenTV
-{
-    /// <summary>
-    /// Platform dependent implementation for the Logging and the Popup displaying.
-    /// DebuggingPort is implementing IDebuggingAPIs which is defined in Calculator shared project.
-    /// </summary>
-    /// <remarks>
-    /// Please refer to Xamarin Dependency Service
-    /// https://developer.xamarin.com/guides/xamarin-forms/dependency-service/introduction/
-    /// </remarks>
-    class DebuggingPort : IDebuggingAPIs
-    {
-        /// <summary>
-        /// A TV Home Windows reference. This is used to display a Dialog</summary>
-        public static Xamarin.Forms.Platform.Tizen.Native.Window MainWindow
-        {
-            set;
-            get;
-        }
-
-        /// <summary>
-        /// A Logging Tag. </summary>
-        public static string TAG = "apps";
-
-        /// <summary>
-        /// A method displays a debugging log. </summary>
-        /// <param name="message"> A debugging message.</param>
-        public void Dbg(string message)
-        {
-            Log.Debug(TAG, message);
-        }
-
-        /// <summary>
-        /// A method displays a error log. </summary>
-        /// <param name="message"> A error message.</param>
-        public void Err(string message)
-        {
-            Log.Error(TAG, message);
-        }
-
-        /// <summary>
-        /// A method displays a dialog with a given message. </summary>
-        /// <param name="message"> A debugging message.</param>
-        public void Popup(string message)
-        {
-            if (MainWindow == null)
-            {
-                return;
-            }
-            //bool result = await Xamarin.Forms.Page.DisplayAlert("Calculator", message, "OK");
-
-            Dialog toast = new Dialog(MainWindow);
-            toast.Title = message;
-            toast.Timeout = 2.3;
-            toast.BackButtonPressed += (s, e) =>
-            {
-                toast.Dismiss();
-            };
-            toast.Show();
-        }
-
-        public static void D(string message)
-        {
-            Log.Debug(TAG, message);
-        }
-
-        public static void E(string message)
-        {
-            Log.Error(TAG, message);
-        }
-
-    }
-}
\ No newline at end of file
index 358e24cee41d6539bdb9f1de4dfb87d8b3cf9e32..0c1ba5c012f0e43b416a4ee3d641c7e3ae34f1a5 100644 (file)
@@ -1,6 +1,4 @@
-using System;
-using TVApps;
-using TVApps.TizenTV.Ports;
+using LibTVRefCommonTizen.Ports;
 
 namespace TVApps.TizenTV
 {
index b117ab42c97abb78115393e1e840af0f03cdb4b1..30d17727c77cba80bb4f36d1ce24f2edf071811b 100644 (file)
@@ -48,7 +48,6 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="ApplicationManagerPort.cs" />
-    <Compile Include="DebuggingPort.cs" />
     <Compile Include="TVApps.TizenTV.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
     <Folder Include="res\" />
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\LibTVRefCommonPortable\LibTVRefCommonPortable.csproj">
+      <Project>{67f9d3a8-f71e-4428-913f-c37ae82cdb24}</Project>
+      <Name>LibTVRefCommonPortable</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\LibTVRefCommonTizen\LibTVRefCommonTizen.csproj">
+      <Project>{c558d279-897e-45e1-a10a-decd788770f4}</Project>
+      <Name>LibTVRefCommonTizen</Name>
+    </ProjectReference>
     <ProjectReference Include="..\TVApps\TVApps.csproj">
       <Project>{fd8c0ef4-6cea-4421-85b7-7ac8592738c6}</Project>
       <Name>TVApps</Name>
index 03c4426f5fa68b9f09fac8be1504816fd3112c4a..06dc6f4cde178865878326e2886e8b5b5ea2d7dc 100644 (file)
@@ -5,14 +5,14 @@ VisualStudioVersion = 14.0.25420.1
 MinimumVisualStudioVersion = 10.0.40219.1\r
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVHome", "TVHome\TVHome\TVHome.csproj", "{54DD6673-7E64-48E6-A008-4D455E19E017}"\r
 EndProject\r
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVHome.TizenTV", "TVHome\TVHome.TizenTV\TVHome.TizenTV.csproj", "{CE03A1DC-A3E0-41DD-B06C-92C19E8D2A8F}"\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibTVRefCommonPortable", "LibTVRefCommonPortable\LibTVRefCommonPortable.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibTVRefCommonTizen", "LibTVRefCommonTizen\LibTVRefCommonTizen.csproj", "{C558D279-897E-45E1-A10A-DECD788770F4}"\r
        ProjectSection(ProjectDependencies) = postProject\r
-               {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6} = {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}\r
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24} = {67F9D3A8-F71E-4428-913F-C37AE82CDB24}\r
        EndProjectSection\r
 EndProject\r
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVApps", "TVApps\TVApps\TVApps.csproj", "{FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}"\r
-EndProject\r
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVApps.TizenTV", "TVApps\TVApps.TizenTV\TVApps.TizenTV.csproj", "{7E341BF5-B7BD-4532-9D4A-AA89537B525E}"\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVHome.TizenTV", "TVHome\TVHome.TizenTV\TVHome.TizenTV.csproj", "{CE03A1DC-A3E0-41DD-B06C-92C19E8D2A8F}"\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
@@ -24,18 +24,18 @@ Global
                {54DD6673-7E64-48E6-A008-4D455E19E017}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
                {54DD6673-7E64-48E6-A008-4D455E19E017}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
                {54DD6673-7E64-48E6-A008-4D455E19E017}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Release|Any CPU.Build.0 = Release|Any CPU\r
                {CE03A1DC-A3E0-41DD-B06C-92C19E8D2A8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
                {CE03A1DC-A3E0-41DD-B06C-92C19E8D2A8F}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
                {CE03A1DC-A3E0-41DD-B06C-92C19E8D2A8F}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
                {CE03A1DC-A3E0-41DD-B06C-92C19E8D2A8F}.Release|Any CPU.Build.0 = Release|Any CPU\r
-               {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
-               {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
-               {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
-               {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}.Release|Any CPU.Build.0 = Release|Any CPU\r
-               {7E341BF5-B7BD-4532-9D4A-AA89537B525E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
-               {7E341BF5-B7BD-4532-9D4A-AA89537B525E}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
-               {7E341BF5-B7BD-4532-9D4A-AA89537B525E}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
-               {7E341BF5-B7BD-4532-9D4A-AA89537B525E}.Release|Any CPU.Build.0 = Release|Any CPU\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
diff --git a/TVHome/TVHome.TizenTV/Ports/AppControlPort.cs b/TVHome/TVHome.TizenTV/Ports/AppControlPort.cs
deleted file mode 100644 (file)
index e893180..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-\r
-using TVHome.Utils;\r
-using Tizen;\r
-using Tizen.Applications;\r
-\r
-namespace TVHome.TizenTV.Ports\r
-{\r
-    class AppControlPort : IAppControl\r
-    {\r
-        public void SendLaunchRequest(string PkgID)\r
-        {\r
-            AppControl appControl = new AppControl();\r
-\r
-            if (PkgID != null)\r
-            {\r
-                appControl.ApplicationId = PkgID;\r
-            }\r
-            else\r
-            {\r
-                appControl.ApplicationId = "org.tizen.settings";\r
-            }\r
-\r
-            AppControl.SendLaunchRequest(appControl);\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome.TizenTV/Ports/ApplicationManagerPort.cs b/TVHome/TVHome.TizenTV/Ports/ApplicationManagerPort.cs
deleted file mode 100644 (file)
index 73b740f..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Threading.Tasks;\r
-using Xamarin.Forms.Platform.Tizen.Native;\r
-using Tizen;\r
-using Tizen.Applications;\r
-using TVHome.Utils;\r
-\r
-namespace TVHome.TizenTV.Ports\r
-{\r
-    class ApplicationManagerPort : IApplicationManagerAPIs\r
-    {\r
-        public ApplicationManagerPort()\r
-        {\r
-            ApplicationManager.ApplicationLaunched += new EventHandler<ApplicationLaunchedEventArgs>(OnApplicationLaunched);\r
-        }\r
-\r
-        void OnApplicationLaunched(object sender, EventArgs args)\r
-        {\r
-            ApplicationLaunchedEventArgs launchedEventArgs = args as ApplicationLaunchedEventArgs;\r
-            DebuggingUtils.Dbg(launchedEventArgs.ApplicationInfo.Label.ToString() + " launched");\r
-        }\r
-\r
-        public async Task<Dictionary<string, string[]>> GetRecentApplications()\r
-        {\r
-            // RUA가 지원되지 않으므로 일단 설치된 app들을 가져와 본다\r
-            // TODO: RUA로 대체한다\r
-            Dictionary<string, string[]> resultList = new Dictionary<string, string[]>();\r
-            var applicationList = await ApplicationManager.GetInstalledApplicationsAsync();\r
-            string[] result;\r
-\r
-            foreach (ApplicationInfo appInfo in applicationList)\r
-            {\r
-                result = new string[3];\r
-\r
-                result[0] = (appInfo.Label != null) ? appInfo.Label : null;\r
-                result[1] = (appInfo.ApplicationId != null) ? appInfo.ApplicationId : null;\r
-                result[2] = (System.IO.File.Exists(appInfo.IconPath)) ? appInfo.IconPath : "AppIcon.png";\r
-                resultList.Add(appInfo.ApplicationId, result);\r
-            }\r
-\r
-            return resultList;\r
-        }\r
-\r
-        public Dictionary<string, string> GetInstalledApplication(string applicationId)\r
-        {\r
-            Dictionary<string, string> result = null;\r
-            ApplicationInfo appInfo = null;\r
-            string[] icons = { "ic_black.png", "ic_blue.png", "ic_green.png", "ic_red.png", "ic_yellow.png", "AppIcon.png" };\r
-            Random random = new Random();\r
-\r
-            try\r
-            {\r
-                appInfo = ApplicationManager.GetInstalledApplication(applicationId);\r
-                if (appInfo == null)\r
-                {\r
-                    DebuggingPort.D("GetInstalledApplication failed");\r
-                    return null;\r
-                }\r
-\r
-                result = new Dictionary<string, string>();\r
-                result.Add("Label", appInfo.Label);\r
-                result.Add("ApplicationId", appInfo.ApplicationId);\r
-                result.Add("IconPath", (System.IO.File.Exists(appInfo.IconPath)) ? appInfo.IconPath : icons[random.Next(0, 6)]);\r
-            }\r
-            catch (Exception exception)\r
-            {\r
-                DebuggingPort.E("Exception " + applicationId + " :" + exception.Message);\r
-                return null;\r
-            }\r
-\r
-            return result;\r
-        }\r
-    }\r
-}
\ No newline at end of file
diff --git a/TVHome/TVHome.TizenTV/Ports/BTModulePort.cs b/TVHome/TVHome.TizenTV/Ports/BTModulePort.cs
deleted file mode 100644 (file)
index adebd74..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using Xamarin.Forms.Platform.Tizen.Native;\r
-using Tizen;\r
-using TVHome.Utils;\r
-using System;\r
-\r
-namespace TVHome.TizenTV.Ports\r
-{\r
-    class BTModulePort : IBTAPIs\r
-    {\r
-        public void BTOff()\r
-        {\r
-            DebuggingUtils.Dbg("BT is OFF");\r
-        }\r
-\r
-        public void BTOn()\r
-        {\r
-            DebuggingUtils.Dbg("BT is ON");\r
-        }\r
-\r
-        public void LaunchBTSetting()\r
-        {\r
-            DebuggingUtils.Dbg("BT setting is launched");\r
-        }\r
-    }\r
-}
\ No newline at end of file
diff --git a/TVHome/TVHome.TizenTV/Ports/DBPort.cs b/TVHome/TVHome.TizenTV/Ports/DBPort.cs
deleted file mode 100644 (file)
index 6993a6a..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Runtime.InteropServices;\r
-\r
-using Tizen;\r
-\r
-using TVHome.DataModels;\r
-using TVHome.Utils;\r
-\r
-namespace TVHome.TizenTV.Ports\r
-{\r
-    public class DBPort : IDBAPIs\r
-    {\r
-        internal class SQLite\r
-        {\r
-            private const string Library = "libsqlite3.so.0";\r
-\r
-            [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
-            internal delegate int ExecCallback(IntPtr notUsed, int numberOfColumn, IntPtr value, IntPtr column);\r
-\r
-            [DllImport(Library, EntryPoint = "sqlite3_open", CallingConvention = CallingConvention.Cdecl)]\r
-            internal static extern int Open(string fileName, out IntPtr handle);\r
-\r
-            [DllImport(Library, EntryPoint = "sqlite3_close", CallingConvention = CallingConvention.Cdecl)]\r
-            internal static extern int Close(IntPtr handle);\r
-\r
-            [DllImport(Library, EntryPoint = "sqlite3_exec", CallingConvention = CallingConvention.Cdecl)]\r
-            internal static extern int Exec(IntPtr handle, string sql, ExecCallback callback, IntPtr notUsed, IntPtr errorMessage);\r
-        }\r
-\r
-        private const int SQLITE_OK = 0;\r
-        private const int SQLITE_ROW = 100;\r
-\r
-        private const int FIRST_COLUMN = 0;\r
-\r
-        private int ptrSize = Marshal.SizeOf<IntPtr>();\r
-\r
-        public int PtrSize\r
-        {\r
-            get\r
-            {\r
-                return ptrSize;\r
-            }\r
-        }\r
-\r
-        public DBPort()\r
-        {\r
-            // TODO : make a unit test for this!!!\r
-            DebuggingPort.D("DBPort-------------------------------------");\r
-            DebuggingPort.D("version " + ExecSQL("csk", "SELECT SQLITE_VERSION()"));\r
-            DebuggingPort.D("create " + ExecSQL("csk", "CREATE TABLE friends(Id INTEGER PRIMARY KEY, Name TEXT);"));\r
-\r
-            DebuggingPort.D("insert 1 " + ExecSQL("csk", "INSERT INTO friends(Name) VALUES ('Tom');"));\r
-            DebuggingPort.D("insert 2 " + ExecSQL("csk", "INSERT INTO friends(Name) VALUES ('Rebecca');"));\r
-            DebuggingPort.D("insert 3 " + ExecSQL("csk", "INSERT INTO friends(Name) VALUES ('Jim');"));\r
-            DebuggingPort.D("insert 4 " + ExecSQL("csk", "INSERT INTO friends(Name) VALUES ('Roger');"));\r
-            DebuggingPort.D("insert 5 " + ExecSQL("csk", "INSERT INTO friends(Name) VALUES ('Robert');"));\r
-\r
-            IEnumerable<DBItem> dbItems = new List<DBItem>();\r
-            DebuggingPort.D("select " + ExecSQL("csk", "SELECT * FROM friends;", out dbItems));\r
-            foreach (var item in dbItems)\r
-            {\r
-                foreach (var value in item.ItemProperties)\r
-                {\r
-                    DebuggingPort.D("column[" + value.Key + "] = " + value.Value);\r
-                }\r
-            }\r
-\r
-            DebuggingPort.D("insert 5 " + ExecSQL("csk", "DROP TABLE friends;"));\r
-        }\r
-\r
-        private static bool CheckResult(int res, string desc)\r
-        {\r
-            if (res != SQLITE_OK)\r
-            {\r
-                DebuggingPort.D(String.Format("DB Error [{0}], {1}", desc, res));\r
-                return false;\r
-            }\r
-\r
-            return true;\r
-        }\r
-\r
-        private static bool Open(string dbName, out IntPtr handle)\r
-        {\r
-            DebuggingPort.D("[DB Open]");\r
-            if (dbName == null)\r
-            {\r
-                DebuggingPort.E("DB Name is NULL!!!");\r
-                handle = IntPtr.Zero;\r
-                return false;\r
-            }\r
-\r
-            string dbPath = Program.AppDataPath + dbName;\r
-            Log.Debug("csk", dbPath);\r
-            return CheckResult(SQLite.Open(Program.AppDataPath + dbName + ".db", out handle), "open");\r
-\r
-        }\r
-\r
-        private static void Close(IntPtr handle)\r
-        {\r
-            DebuggingPort.D("[DB Close]");\r
-            if (handle == null)\r
-            {\r
-                return;\r
-            }\r
-\r
-            SQLite.Close(handle);\r
-        }\r
-\r
-        internal sealed class DBHandleRAII// : IDisposable\r
-        {\r
-            internal IntPtr handle;\r
-            internal DBHandleRAII(string fileName)\r
-            {\r
-                Open(fileName, out handle);\r
-            }\r
-\r
-            ~DBHandleRAII()\r
-            {\r
-                Close(handle);\r
-            }\r
-            // TODO : Change to use IDisposable!!!\r
-            // Dispose is not calling!!!\r
-            /*\r
-            public void Dispose()\r
-            {\r
-                Close(handle);\r
-            }\r
-            */\r
-        }\r
-\r
-        public bool ExecSQL(string dbName, string sql)\r
-        {\r
-            if (dbName == null || sql == null)\r
-            {\r
-                DebuggingPort.E("Invalid argument!!!");\r
-                return false;\r
-            }\r
-\r
-            DBHandleRAII db = new DBHandleRAII(dbName);\r
-            if (db.handle == IntPtr.Zero)\r
-            {\r
-                DebuggingPort.E("DB open failed!!!");\r
-                return false;\r
-            }\r
-\r
-            return CheckResult(SQLite.Exec(db.handle, sql, null, IntPtr.Zero, IntPtr.Zero), "exec ");\r
-        }\r
-\r
-        // TODO : Make this thread safe!!!\r
-        List<DBItem> givenItems = new List<DBItem>();\r
-\r
-        private int ExecCallback(IntPtr notUsed, int numberOfColumn, IntPtr value, IntPtr column)\r
-        {\r
-            DebuggingPort.D("ExecCallback");\r
-            for (int i = 1; i < numberOfColumn; i++)\r
-            {\r
-                string _value = Marshal.PtrToStringAnsi(Marshal.ReadIntPtr(value, i * PtrSize));\r
-                DebuggingPort.E("" + i + " - " + _value + " / ");\r
-                DBItem item = new DBItem();\r
-                item.Add(i, _value);\r
-                givenItems.Add(item);\r
-            }\r
-\r
-            return 0;\r
-        }\r
-\r
-        public bool ExecSQL(string dbName, string sql, out IEnumerable<DBItem> items)\r
-        {\r
-            givenItems.Clear();\r
-            items = givenItems;\r
-\r
-            DebuggingPort.D("ExecSQL");\r
-            if (dbName == null || sql == null)\r
-            {\r
-                DebuggingPort.E("Invalid argument!!!");\r
-                return false;\r
-            }\r
-\r
-            DBHandleRAII db = new DBHandleRAII(dbName);\r
-            if (db.handle == IntPtr.Zero)\r
-            {\r
-                DebuggingPort.E("DB open failed!!!");\r
-                return false;\r
-            }\r
-\r
-            if (CheckResult(SQLite.Exec(db.handle, sql, ExecCallback, IntPtr.Zero, IntPtr.Zero), "exec") == false)\r
-            {\r
-                return false;\r
-            }\r
-\r
-            return true;\r
-        }\r
-\r
-    }\r
-\r
-}\r
diff --git a/TVHome/TVHome.TizenTV/Ports/DebuggingPort.cs b/TVHome/TVHome.TizenTV/Ports/DebuggingPort.cs
deleted file mode 100644 (file)
index 934d2b8..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using Xamarin.Forms.Platform.Tizen.Native;\r
-using Tizen;\r
-using TVHome.Utils;\r
-\r
-namespace TVHome.TizenTV.Ports\r
-{\r
-    /// <summary>\r
-    /// Platform dependent implementation for the Logging and the Popup displaying.\r
-    /// DebuggingPort is implementing IDebuggingAPIs which is defined in Calculator shared project.\r
-    /// </summary>\r
-    /// <remarks>\r
-    /// Please refer to Xamarin Dependency Service\r
-    /// https://developer.xamarin.com/guides/xamarin-forms/dependency-service/introduction/\r
-    /// </remarks>\r
-    class DebuggingPort : IDebuggingAPIs\r
-    {\r
-        /// <summary>\r
-        /// A TV Home Windows reference. This is used to display a Dialog</summary>\r
-        public static Xamarin.Forms.Platform.Tizen.Native.Window MainWindow\r
-        {\r
-            set;\r
-            get;\r
-        }\r
-\r
-        /// <summary>\r
-        /// A Logging Tag. </summary>\r
-        public static string TAG = "home";\r
-\r
-        /// <summary>\r
-        /// A method displays a debugging log. </summary>\r
-        /// <param name="message"> A debugging message.</param>\r
-        public void Dbg(string message)\r
-        {\r
-            Log.Debug(TAG, message);\r
-        }\r
-\r
-        /// <summary>\r
-        /// A method displays a error log. </summary>\r
-        /// <param name="message"> A error message.</param>\r
-        public void Err(string message)\r
-        {\r
-            Log.Error(TAG, message);\r
-        }\r
-\r
-        /// <summary>\r
-        /// A method displays a dialog with a given message. </summary>\r
-        /// <param name="message"> A debugging message.</param>\r
-        public void Popup(string message)\r
-        {\r
-            if (MainWindow == null)\r
-            {\r
-                return;\r
-            }\r
-            //bool result = await Xamarin.Forms.Page.DisplayAlert("Calculator", message, "OK");\r
-\r
-            Dialog toast = new Dialog(MainWindow);\r
-            toast.Title = message;\r
-            toast.Timeout = 2.3;\r
-            toast.BackButtonPressed += (s, e) =>\r
-            {\r
-                toast.Dismiss();\r
-            };\r
-            toast.Show();\r
-        }\r
-\r
-        public static void D(string message)\r
-        {\r
-            Log.Debug(TAG, message);\r
-        }\r
-\r
-        public static void E(string message)\r
-        {\r
-            Log.Error(TAG, message);\r
-        }\r
-\r
-    }\r
-}
\ No newline at end of file
diff --git a/TVHome/TVHome.TizenTV/Ports/FileSystemPort.cs b/TVHome/TVHome.TizenTV/Ports/FileSystemPort.cs
deleted file mode 100644 (file)
index 4b6fedc..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.IO;
-
-using Tizen;
-using Tizen.Applications;
-using TVHome.Utils;
-
-namespace TVHome.TizenTV.Ports
-{
-    class FileSystemPort : IFileSystemAPIs
-    {
-        public Stream OpenFile(string filePath, UtilFileMode mode)
-        {
-            Stream fileStream = null;
-            DebuggingPort.D("Opening the file... " + filePath);
-            try
-            {
-                fileStream = new FileStream(filePath, (FileMode)mode);
-                DebuggingPort.D("Opened.");
-            }
-            catch (Exception exception)
-            {
-                DebuggingPort.E("Exception!! " + exception.Message);
-            }
-
-            return fileStream;
-        }
-
-        public void Flush(Stream stream)
-        {
-            var fileStream = stream as FileStream;
-            fileStream.Flush();
-        }
-
-        public void CloseFile(Stream stream)
-        {
-            var fileStream = stream as FileStream;
-            fileStream.Dispose();
-        }
-    }
-}
diff --git a/TVHome/TVHome.TizenTV/Ports/FileSystemWatcherPort.cs b/TVHome/TVHome.TizenTV/Ports/FileSystemWatcherPort.cs
deleted file mode 100644 (file)
index 601bd56..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-using System;
-using System.IO;
-using TVHome.Utils;
-using TVHome.DataModels;
-
-namespace TVHome.TizenTV.Ports
-{
-    public class FileSystemWatcherPort : IFileSystemWatcherAPIs
-    {
-        static FileSystemWatcher watcher;
-        public event EventHandler<EventArgs> CustomChanged;
-        private FileSystemEventCustomArgs args;
-
-        public void Run()
-        {
-            watcher = new FileSystemWatcher();
-            watcher.Path = "/opt/usr/home/owner/share/";
-            watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.Size;
-            watcher.Filter = "apinnedapp.xml";
-
-            watcher.Created += new FileSystemEventHandler(WatcherChanged);
-            watcher.Changed += new FileSystemEventHandler(WatcherChanged);
-            watcher.Deleted += new FileSystemEventHandler(WatcherChanged);
-            watcher.IncludeSubdirectories = true;
-            watcher.EnableRaisingEvents = true;
-        }
-
-        private void WatcherChanged(object sender, FileSystemEventArgs e)
-        {
-            args = new FileSystemEventCustomArgs((WatcherType)e.ChangeType, e.FullPath, e.Name);
-            if (e.ChangeType.Equals(WatcherChangeTypes.Changed))
-            {
-                CustomChanged(this, args);
-            }
-
-            DebuggingPort.D(e.ChangeType + ", " + e.Name);
-        }
-    }
-}
diff --git a/TVHome/TVHome.TizenTV/Ports/PackageManagerPort.cs b/TVHome/TVHome.TizenTV/Ports/PackageManagerPort.cs
deleted file mode 100644 (file)
index e2a90d9..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-\r
-using Tizen;\r
-using Tizen.Applications;\r
-\r
-using TVHome.Utils;\r
-\r
-namespace TVHome.TizenTV.Ports\r
-{\r
-    class PackageManagerPort : IPackageManager\r
-    {\r
-        public PackageManagerPort()\r
-        {\r
-            PackageManager.InstallProgressChanged += PackageManager_InstallProgressChanged;\r
-            PackageManager.UninstallProgressChanged += PackageManager_UninstallProgressChanged;\r
-        }\r
-\r
-        private void PackageManager_UninstallProgressChanged(object sender, PackageManagerEventArgs e)\r
-        {\r
-            if (e.State == PackageEventState.Completed)\r
-            {\r
-                DebuggingUtils.Dbg("uninstall completed");\r
-            }\r
-        }\r
-\r
-        private void PackageManager_InstallProgressChanged(object sender, PackageManagerEventArgs e)\r
-        {\r
-            if (e.State == PackageEventState.Completed)\r
-            {\r
-                DebuggingUtils.Dbg("install completed");\r
-            }\r
-        }\r
-\r
-        public Dictionary<string, string[]> GetPackageList()\r
-        {\r
-            Dictionary<string, string[]> pkgList = new Dictionary<string, string[]>();\r
-            IEnumerable<Package> packages = PackageManager.GetPackages();\r
-\r
-            string[] result;\r
-\r
-            foreach (var item in packages)\r
-            {\r
-                result = new string[3];\r
-\r
-                result[0] = (item.Label != null) ? item.Label : null;\r
-                result[1] = (item.Id != null) ? item.Id : null;\r
-                result[2] = (System.IO.File.Exists(item.IconPath)) ? item.IconPath : "AppIcon.png";\r
-\r
-                pkgList.Add(item.Label, result);\r
-            }\r
-\r
-            return pkgList;\r
-        }\r
-\r
-        public string GetPackage(string PkgID)\r
-        {\r
-            Package tempItem = PackageManager.GetPackage(PkgID);\r
-\r
-            return (tempItem != null) ? tempItem.Label : null;\r
-        }\r
-    }\r
-}
\ No newline at end of file
diff --git a/TVHome/TVHome.TizenTV/Ports/WifiModulePort.cs b/TVHome/TVHome.TizenTV/Ports/WifiModulePort.cs
deleted file mode 100644 (file)
index f857a6c..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using Xamarin.Forms.Platform.Tizen.Native;\r
-using Tizen;\r
-using TVHome.Utils;\r
-using System;\r
-\r
-namespace TVHome.TizenTV.Ports\r
-{\r
-    class WifiModulePort : IWifiAPIs\r
-    {\r
-\r
-        public void WifiOff()\r
-        {\r
-            DebuggingUtils.Dbg("WiFi is OFF");\r
-        }\r
-\r
-        public void WifiOn()\r
-        {\r
-            DebuggingUtils.Dbg("WiFi is ON");\r
-        }\r
-\r
-        public void LaunchWifiSetting()\r
-        {\r
-            DebuggingUtils.Dbg("WiFi setting is launched");\r
-        }\r
-    }\r
-}
\ No newline at end of file
index 0ba37bda4b6e114c5437212a8cae0f6595b26ce1..a6863faaecad45a1d3682160d9700d52fbb761b8 100644 (file)
@@ -1,6 +1,6 @@
 using System;\r
 using Tizen;\r
-using TVHome.TizenTV.Ports;\r
+using LibTVRefCommonTizen.Ports;\r
 \r
 namespace TVHome.TizenTV\r
 {\r
index a07544d16b51d599dcfdb07350e2b4b8b04ecde1..af0c5df0555c07ae29b5232f48d5bcf09c287d41 100644 (file)
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
   <ItemGroup>\r
-    <Compile Include="Ports\DBPort.cs" />\r
     <None Include="TVHome.TizenTV.project.json" />\r
     <None Include="tizen-manifest.xml" />\r
     <None Include="shared\res\TVHome.TizenTV.png" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <Compile Include="Ports\AppControlPort.cs" />\r
-    <Compile Include="Ports\ApplicationManagerPort.cs" />\r
-    <Compile Include="Ports\BTModulePort.cs" />\r
-    <Compile Include="Ports\FileSystemPort.cs" />\r
-    <Compile Include="Ports\FileSystemWatcherPort.cs" />\r
-    <Compile Include="Ports\PackageManagerPort.cs" />\r
-    <Compile Include="Ports\WifiModulePort.cs" />\r
-    <Compile Include="Ports\DebuggingPort.cs" />\r
     <Compile Include="TVHome.TizenTV.cs" />\r
     <Compile Include="Properties\AssemblyInfo.cs" />\r
   </ItemGroup>\r
     <Folder Include="lib\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
+    <ProjectReference Include="..\..\LibTVRefCommonPortable\LibTVRefCommonPortable.csproj">\r
+      <Project>{67f9d3a8-f71e-4428-913f-c37ae82cdb24}</Project>\r
+      <Name>LibTVRefCommonPortable</Name>\r
+    </ProjectReference>\r
+    <ProjectReference Include="..\..\LibTVRefCommonTizen\LibTVRefCommonTizen.csproj">\r
+      <Project>{c558d279-897e-45e1-a10a-decd788770f4}</Project>\r
+      <Name>LibTVRefCommonTizen</Name>\r
+    </ProjectReference>\r
     <ProjectReference Include="..\..\TVApps\TVApps.TizenTV\TVApps.TizenTV.csproj">\r
       <Project>{7e341bf5-b7bd-4532-9d4a-aa89537b525e}</Project>\r
       <Name>TVApps.TizenTV</Name>\r
index 8cfca482256a24b7a27920fd462b47513a9c0acc..d3fa919fa484bd89a45afe6a5da78e00c40cf9ba 100755 (executable)
@@ -16,7 +16,7 @@
 
 using System;
 using System.Windows.Input;
-using TVHome.Utils;
+using LibTVRefCommmonPortable.Utils;
 using Xamarin.Forms;
 
 namespace TVHome.Controls
index bf923c3f5962359a6e36890153c6c3c5ea1525ef..e9c917f6099afa15bf9580ad59d924583683e09d 100644 (file)
@@ -16,7 +16,7 @@
 \r
 using System;\r
 using System.Windows.Input;\r
-using TVHome.Utils;\r
+using LibTVRefCommmonPortable.Utils;\r
 using Xamarin.Forms;\r
 \r
 namespace TVHome.Controls\r
diff --git a/TVHome/TVHome/DataModels/AppControlAction.cs b/TVHome/TVHome/DataModels/AppControlAction.cs
deleted file mode 100644 (file)
index 3fb1d3c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using TVHome.Utils;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    class AppControlAction : IAction\r
-    {\r
-        public string AppID { get; set; }\r
-        public string Execute()\r
-        {\r
-            string result = "default";\r
-            AppControlUtils.SendLaunchRequest(AppID);\r
-\r
-            return result;\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/AppShortcutInfo.cs b/TVHome/TVHome/DataModels/AppShortcutInfo.cs
deleted file mode 100644 (file)
index 1e5cf0e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Xml.Serialization;\r
-\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    public class AppShortcutInfo : ShortcutInfo\r
-    {\r
-        public string AppID { get; set; }\r
-       \r
-        public override void UpdateState()\r
-        {\r
-            SetCurrentState("default");\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/BTLaunchAction.cs b/TVHome/TVHome/DataModels/BTLaunchAction.cs
deleted file mode 100644 (file)
index d90ca75..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using TVHome.Utils;\r
-using Xamarin.Forms;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    class BTLaunchAction : IAction\r
-    {\r
-        public string Execute()\r
-        {\r
-            // Launch BT setting\r
-            IBTAPIs ibtapis;\r
-\r
-            ibtapis = DependencyService.Get<IBTAPIs>();\r
-            ibtapis?.LaunchBTSetting();\r
-\r
-            return "launch";\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/BTOffAction.cs b/TVHome/TVHome/DataModels/BTOffAction.cs
deleted file mode 100644 (file)
index 81ab377..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    class BTOffAction : IAction\r
-    {\r
-        public string Execute()\r
-        {\r
-            // Turn BT Off\r
-            return "off";\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/BTOnAction.cs b/TVHome/TVHome/DataModels/BTOnAction.cs
deleted file mode 100644 (file)
index b98a4d0..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    class BTOnAction : IAction\r
-    {\r
-        public string Execute()\r
-        {\r
-            // Turn BT On\r
-            return "on";\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/BTSettingShortcutInfo.cs b/TVHome/TVHome/DataModels/BTSettingShortcutInfo.cs
deleted file mode 100644 (file)
index 86d9d37..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    public class BTSettingShortcutInfo : ShortcutInfo\r
-    {\r
-        public void RegisterSettingStateChangeListener()\r
-        {\r
-            // Register BT status change listener\r
-            throw new NotImplementedException();\r
-        }\r
-\r
-        public override void UpdateState()\r
-        {\r
-            // 1. Check Current BT Status.\r
-\r
-            // 2. Set Description\r
-            SetCurrentState("off");\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/DBItem.cs b/TVHome/TVHome/DataModels/DBItem.cs
deleted file mode 100644 (file)
index d5d9b95..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    public class DBItem : IDBItem\r
-    {\r
-        IDictionary<int, string> itemProperties = new Dictionary<int, string>();\r
-\r
-        public IDictionary<int, string> ItemProperties\r
-        {\r
-            get\r
-            {\r
-                return itemProperties;\r
-            }\r
-\r
-            set\r
-            {\r
-                if (itemProperties != null)\r
-                {\r
-                    itemProperties = value;\r
-                }\r
-            }\r
-        }\r
-\r
-        public void Add(int key, string value)\r
-        {\r
-            itemProperties?.Add(key, value);\r
-        }\r
-\r
-        public void SetDBItem(IDBItem item)\r
-        {\r
-            throw new NotImplementedException();\r
-        }\r
-\r
-        public void SetColumnValue(int idx, string value)\r
-        {\r
-            if (idx > ItemProperties.Count)\r
-            {\r
-                return;\r
-            }\r
-\r
-            ItemProperties.Remove(idx);\r
-            ItemProperties.Add(new KeyValuePair<int, string>(idx, value));\r
-        }\r
-\r
-        public string GetColumnValue(int idx)\r
-        {\r
-            if (idx > ItemProperties.Count)\r
-            {\r
-                return "";\r
-            }\r
-\r
-            string value;\r
-            if (ItemProperties.TryGetValue(idx, out value))\r
-            {\r
-                return value;\r
-            }\r
-\r
-            return "";\r
-        }\r
-\r
-        public IEnumerable<string> GetColumnValues()\r
-        {\r
-            throw new NotImplementedException();\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/FileSystemEventCustomArgs.cs b/TVHome/TVHome/DataModels/FileSystemEventCustomArgs.cs
deleted file mode 100644 (file)
index ec626f2..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-
-namespace TVHome.DataModels
-{
-    public class FileSystemEventCustomArgs : EventArgs
-    {
-        //
-        // Summary:
-        //     Initializes a new instance of the System.IO.FileSystemEventArgs class.
-        //
-        // Parameters:
-        //   changeType:
-        //     One of the System.IO.WatcherChangeTypes values, which represents the kind of
-        //     change detected in the file system.
-        //
-        //   directory:
-        //     The root directory of the affected file or directory.
-        //
-        //   name:
-        //     The name of the affected file or directory.
-        public FileSystemEventCustomArgs(WatcherType changeType, string directory, string name)
-        {
-            ChangeType = changeType;
-            FullPath = directory;
-            Name = name;
-        }
-
-        //
-        // Summary:
-        //     Gets the type of directory event that occurred.
-        //
-        // Returns:
-        //     One of the System.IO.WatcherChangeTypes values that represents the kind of change
-        //     detected in the file system.
-        public WatcherType ChangeType { set; get; }
-        //
-        // Summary:
-        //     Gets the fully qualifed path of the affected file or directory.
-        //
-        // Returns:
-        //     The path of the affected file or directory.
-        public string FullPath { set; get; }
-        //
-        // Summary:
-        //     Gets the name of the affected file or directory.
-        //
-        // Returns:
-        //     The name of the affected file or directory.
-        public string Name { set; get; }
-    }
-}
\ No newline at end of file
diff --git a/TVHome/TVHome/DataModels/HomeMenuAppShortcutInfo.cs b/TVHome/TVHome/DataModels/HomeMenuAppShortcutInfo.cs
deleted file mode 100644 (file)
index be6b7ed..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    public class HomeMenuAppShortcutInfo : ShortcutInfo\r
-    {\r
-        public override void UpdateState()\r
-        {\r
-            SetCurrentState("default");\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/IAction.cs b/TVHome/TVHome/DataModels/IAction.cs
deleted file mode 100644 (file)
index 484e50b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    public interface IAction\r
-    {\r
-        string Execute();\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/IDBItem.cs b/TVHome/TVHome/DataModels/IDBItem.cs
deleted file mode 100644 (file)
index 3fb1428..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System.Collections.Generic;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    public interface IDBItem\r
-    {\r
-        void SetDBItem(IDBItem item);\r
-\r
-        void SetColumnValue(int idx, string value);\r
-\r
-        string GetColumnValue(int idx);\r
-\r
-        IEnumerable<string> GetColumnValues();\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/IEnumerableItem.cs b/TVHome/TVHome/DataModels/IEnumerableItem.cs
deleted file mode 100644 (file)
index 7e350d9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System.Collections.Generic;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    public interface IEnumerableItem\r
-    {\r
-        IDictionary<int, string> ItemProperties\r
-        {\r
-            set;\r
-            get;\r
-        }\r
-\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/MediaControlAction.cs b/TVHome/TVHome/DataModels/MediaControlAction.cs
deleted file mode 100644 (file)
index 41b8e17..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    class MediaControlAction : IAction\r
-    {\r
-        public string Execute()\r
-        {\r
-            throw new NotImplementedException();\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/RecentShortcutInfo.cs b/TVHome/TVHome/DataModels/RecentShortcutInfo.cs
deleted file mode 100644 (file)
index 8dd6592..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    public class RecentShortcutInfo : ShortcutInfo\r
-    {\r
-        public DateTime Date\r
-        {\r
-            get;\r
-            set;\r
-        }\r
-\r
-        public override void UpdateState()\r
-        {\r
-            SetCurrentState("default");\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/ShortcutInfo.cs b/TVHome/TVHome/DataModels/ShortcutInfo.cs
deleted file mode 100644 (file)
index 4873373..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.ComponentModel;\r
-using System.Xml.Serialization;\r
-using TVHome.Utils;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    public abstract class ShortcutInfo : INotifyPropertyChanged\r
-    {\r
-        [XmlIgnore]\r
-        private Dictionary<String, StateDescription> stateDescriptions = new Dictionary<String, StateDescription>();\r
-\r
-        public event PropertyChangedEventHandler PropertyChanged;\r
-\r
-        protected void OnPropertyChanged(string propertyName)\r
-        {\r
-            var handler = PropertyChanged;\r
-            if (handler != null)\r
-            {\r
-                handler(this, new PropertyChangedEventArgs(propertyName));\r
-            }\r
-        }\r
-\r
-        [XmlIgnore]\r
-        public Dictionary<String, StateDescription> StateDescriptions\r
-        {\r
-            get\r
-            {\r
-                return stateDescriptions;\r
-            }\r
-        }\r
-\r
-        [XmlIgnore]\r
-        public StateDescription CurrentStateDescription\r
-        {\r
-            get;\r
-            set;\r
-        }\r
-\r
-        protected bool SetCurrentState(string state)\r
-        {\r
-            if (stateDescriptions.ContainsKey(state) == false)\r
-            {\r
-                DebuggingUtils.Err(state + " is doesn't exists!!!");\r
-                return false;\r
-            }\r
-\r
-            CurrentStateDescription = stateDescriptions[state];\r
-            OnPropertyChanged("CurrentStateDescription");\r
-            return true;\r
-        }\r
-\r
-        abstract public void UpdateState();\r
-\r
-        public bool DoAction()\r
-        {\r
-            if (CurrentStateDescription == null)\r
-            {\r
-                DebuggingUtils.Err("Current state is not set!!!");\r
-                return false;\r
-            }\r
-\r
-            String newState = CurrentStateDescription.Action.Execute();\r
-            if (newState == null)\r
-            {\r
-                DebuggingUtils.Err("Invalid State returned!!!");\r
-                return false;\r
-            }\r
-\r
-            return SetCurrentState(newState);\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/StateDescription.cs b/TVHome/TVHome/DataModels/StateDescription.cs
deleted file mode 100644 (file)
index 2a40d2b..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    public class StateDescription\r
-    {\r
-        public string Label\r
-        {\r
-            get;\r
-            set;\r
-        }\r
-\r
-        public string IconPath\r
-        {\r
-            get;\r
-            set;\r
-        }\r
-\r
-        public IAction Action\r
-        {\r
-            get;\r
-            set;\r
-        }\r
-\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/WatcherType.cs b/TVHome/TVHome/DataModels/WatcherType.cs
deleted file mode 100644 (file)
index e47bbbc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-namespace TVHome.DataModels
-{
-    public enum WatcherType
-    {
-        //
-        // Summary:
-        //     The creation of a file or folder.
-        Created = 1,
-        //
-        // Summary:
-        //     The deletion of a file or folder.
-        Deleted = 2,
-        //
-        // Summary:
-        //     The change of a file or folder. The types of changes include: changes to size,
-        //     attributes, security settings, last write, and last access time.
-        Changed = 4,
-        //
-        // Summary:
-        //     The renaming of a file or folder.
-        Renamed = 8,
-        //
-        // Summary:
-        //     The creation, deletion, change, or renaming of a file or folder.
-        All = 15
-    }
-}
diff --git a/TVHome/TVHome/DataModels/WiFiLaunchAction.cs b/TVHome/TVHome/DataModels/WiFiLaunchAction.cs
deleted file mode 100644 (file)
index 6ca8f26..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using TVHome.Utils;\r
-using Xamarin.Forms;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    class WiFiLaunchAction : IAction\r
-    {\r
-        public string Execute()\r
-        {\r
-            // Launch WiFi Setting\r
-            IWifiAPIs iwifiapis;\r
-\r
-            iwifiapis = DependencyService.Get<IWifiAPIs>();\r
-            iwifiapis?.LaunchWifiSetting();\r
-\r
-            return "launch";\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/WiFiOffAction.cs b/TVHome/TVHome/DataModels/WiFiOffAction.cs
deleted file mode 100644 (file)
index 9222236..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    class WiFiOffAction : IAction\r
-    {\r
-        public string Execute()\r
-        {\r
-            // Turn WiFi Off\r
-            return "off";\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/WiFiOnAction.cs b/TVHome/TVHome/DataModels/WiFiOnAction.cs
deleted file mode 100644 (file)
index 0637117..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    class WiFiOnAction : IAction\r
-    {\r
-        public string Execute()\r
-        {\r
-            // Turn WiFi On\r
-            return "on";\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/DataModels/WiFiSettingShortcutInfo.cs b/TVHome/TVHome/DataModels/WiFiSettingShortcutInfo.cs
deleted file mode 100644 (file)
index 688a4fc..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-\r
-namespace TVHome.DataModels\r
-{\r
-    public class WiFiSettingShortcutInfo : ShortcutInfo\r
-    {\r
-        public void RegisterSettingStateChangeListener()\r
-        {\r
-            // Register Wi-Fi status change listener\r
-            throw new NotImplementedException();\r
-        }\r
-\r
-        public override void UpdateState()\r
-        {\r
-            // 1. Check Current Wi-Fi Status.\r
-\r
-            // 2. Set Description\r
-            SetCurrentState("off");\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Models/AppShortcutController.cs b/TVHome/TVHome/Models/AppShortcutController.cs
deleted file mode 100644 (file)
index 9cd7800..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using Xamarin.Forms;\r
-\r
-using TVHome.DataModels;\r
-using TVHome.Utils;\r
-\r
-\r
-namespace TVHome.Models\r
-{\r
-    public class AppShortcutController\r
-    {\r
-\r
-        public AppShortcutController()\r
-        {\r
-\r
-        }\r
-\r
-        public IEnumerable<AppShortcutInfo> ReadFromFile()\r
-        {\r
-            IApplicationManagerAPIs applicationManagerPort = DependencyService.Get<IApplicationManagerAPIs>();\r
-            // Accessing below directory is not permitted.\r
-            // IEnumerable<AppShortcutInfo> pinned_apps_info = AppShortcutStorage.ReadFromFile("/home/owner/apps_rw/TVHome.TizenTV/res/pinned_apps_info.xml");\r
-            IEnumerable<AppShortcutInfo> pinned_apps_info = AppShortcutStorage.ReadFromFile("/opt/usr/home/owner/share/pinned_apps_info.xml");\r
-            string[] icons = { "ic_black.png", "ic_blue.png", "ic_green.png", "ic_red.png", "ic_yellow.png", "AppIcon.png" };\r
-\r
-            foreach (AppShortcutInfo appShortcutInfo in pinned_apps_info)\r
-            {\r
-                Dictionary<string, string> appInfo = applicationManagerPort.GetInstalledApplication(appShortcutInfo.AppID);\r
-\r
-                if (appInfo != null)\r
-                {\r
-                    string appLabel;\r
-                    string appIconPath;\r
-\r
-                    appInfo.TryGetValue("Label", out appLabel);\r
-                    appInfo.TryGetValue("IconPath", out appIconPath);\r
-\r
-                    DebuggingUtils.Dbg("AppID: " + appShortcutInfo.AppID + ", Label : " + appLabel + " IconPath : " + appIconPath);\r
-                    Random random = new Random();\r
-                    var defaultStateDescription = new StateDescription()\r
-                    {\r
-                        Label = appLabel,\r
-                        IconPath = appIconPath ?? icons[random.Next(0, 6)], //IconPath = (resul5t[2] == null) ? "AppIcon.png" : result[2],\r
-                        Action = new AppControlAction\r
-                        {\r
-                            AppID = appShortcutInfo.AppID,\r
-                        }\r
-                    };\r
-\r
-                    appShortcutInfo.StateDescriptions.Add("default", defaultStateDescription);\r
-                    appShortcutInfo.CurrentStateDescription = defaultStateDescription;\r
-                }\r
-                else\r
-                {\r
-                    // TODO : Remove the broken appInfo from pinned_apps_info\r
-                }\r
-            }\r
-\r
-            return pinned_apps_info;\r
-        }\r
-\r
-        public void WriteToFile(IEnumerable<AppShortcutInfo> pinnedAppsInfo)\r
-        {\r
-            // Accessing below directory is not permitted.\r
-            // AppShortcutStorage.WriteToFile(pinnedAppsInfo, "/home/owner/apps_rw/TVHome.TizenTV/res/pinned_apps_info.xml");\r
-            AppShortcutStorage.WriteToFile(pinnedAppsInfo, "/opt/usr/home/owner/share/pinned_apps_info.xml");\r
-        }\r
-\r
-        private bool AddAppShortcutChangedListener()\r
-        {\r
-            // TODO : register to Tizen app framework to get notification of app list change.\r
-            return false;\r
-        }\r
-\r
-        public void AddFileSystemChangedListener(EventHandler<EventArgs> eventListener)\r
-        {\r
-            if (AppShortcutStorage.Instance != null)\r
-            {\r
-                AppShortcutStorage.Instance.AddFileSystemChangedListener(eventListener);\r
-            }\r
-            else\r
-            {\r
-                DebuggingUtils.Dbg("AppShortcutStorage Instance is NULL");\r
-            }\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Models/RecentShortcutController.cs b/TVHome/TVHome/Models/RecentShortcutController.cs
deleted file mode 100644 (file)
index b81c4e9..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections;\r
-using System.Collections.Generic;\r
-using System.Threading.Tasks;\r
-using TVHome.DataModels;\r
-using TVHome.Utils;\r
-\r
-using Xamarin.Forms;\r
-\r
-namespace TVHome.Models\r
-{\r
-    public class RecentShortcutController\r
-    {\r
-        public RecentShortcutController()\r
-        {\r
-        }\r
-\r
-        public void Remove(RecentShortcutInfo history)\r
-        {\r
-            RecentShortcutStorage.Delete(history);\r
-        }\r
-\r
-        public void RemoveAll()\r
-        {\r
-            RecentShortcutStorage.DeleteAll();\r
-        }\r
-\r
-        public bool Update(RecentShortcutInfo shortcut)\r
-        {\r
-            RecentShortcutStorage.Update(shortcut);\r
-            return false;\r
-        }\r
-\r
-        public async Task<IEnumerable<RecentShortcutInfo>> GetList()\r
-        {\r
-            IApplicationManagerAPIs applicationManagerPort = DependencyService.Get<IApplicationManagerAPIs>();\r
-            List<RecentShortcutInfo> recentShortcutInfoList = new List<RecentShortcutInfo>();\r
-\r
-            var applicationList = await applicationManagerPort.GetRecentApplications();\r
-            foreach (KeyValuePair<string, string[]> item in applicationList)\r
-            {\r
-                var defaultStateDescription = new StateDescription()\r
-                {\r
-                    // TODO : Label에는 ApplicationInfo의 Label을 넣자\r
-                    Label = item.Value[0],\r
-                    IconPath = item.Value[2],\r
-                    Action = new AppControlAction()\r
-                    {\r
-                        AppID = item.Key\r
-                    }\r
-                };\r
-                var recentShortcutInfo = new RecentShortcutInfo();\r
-                recentShortcutInfo.StateDescriptions.Add("default", defaultStateDescription);\r
-                recentShortcutInfo.CurrentStateDescription = defaultStateDescription;\r
-                recentShortcutInfoList.Add(recentShortcutInfo);\r
-            }\r
-\r
-            return recentShortcutInfoList;\r
-\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Models/SettingShortcutController.cs b/TVHome/TVHome/Models/SettingShortcutController.cs
deleted file mode 100644 (file)
index 0e1262d..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections;\r
-using System.Collections.Generic;\r
-using TVHome.DataModels;\r
-\r
-namespace TVHome.Models\r
-{\r
-    public class SettingShortcutController\r
-    {\r
-        private List<ShortcutInfo> settingShortcutList = new List<ShortcutInfo>();\r
-\r
-        public SettingShortcutController()\r
-        {\r
-            ShortcutInfo wifi = SettingShortcutFactory.Get(SettingID.WiFi);\r
-            settingShortcutList.Add(wifi);\r
-\r
-            ShortcutInfo bt = SettingShortcutFactory.Get(SettingID.BLUETOOTH);\r
-            settingShortcutList.Add(bt);\r
-\r
-            // TODO : Provides list of SettingShortcuts\r
-        }\r
-\r
-        public IEnumerable<ShortcutInfo> GetList()\r
-        {\r
-            return settingShortcutList ?? null;\r
-        }\r
-\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Models/SettingShortcutFactory.cs b/TVHome/TVHome/Models/SettingShortcutFactory.cs
deleted file mode 100644 (file)
index 00edc96..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using TVHome.DataModels;\r
-\r
-namespace TVHome.Models\r
-{\r
-    public enum SettingID\r
-    {\r
-        WiFi,\r
-        BLUETOOTH\r
-    };\r
-\r
-    public static class SettingShortcutFactory\r
-    {\r
-        public static ShortcutInfo Get(SettingID id)\r
-        {\r
-            ShortcutInfo sc;\r
-            switch (id)\r
-            {\r
-                case SettingID.WiFi:\r
-                    sc = new WiFiSettingShortcutInfo()\r
-                    {\r
-                        StateDescriptions =\r
-                        {\r
-                            {\r
-                                "on",\r
-                                new StateDescription\r
-                                {\r
-                                    Label = "WiFi ON",\r
-                                    IconPath = "AppIcon.png",\r
-                                    Action = new WiFiOffAction(),\r
-                                }\r
-                            },\r
-                            {\r
-                                "off",\r
-                                new StateDescription\r
-                                {\r
-                                    Label = "WiFi OFF",\r
-                                    IconPath = "AppIcon.png",\r
-                                    Action = new WiFiOnAction(),\r
-                                }\r
-                            },\r
-                            {\r
-                                "launch",\r
-                                new StateDescription\r
-                                {\r
-                                    Label = "WiFi Launch",\r
-                                    IconPath = "AppIcon.png",\r
-                                    Action = new WiFiLaunchAction(),\r
-                                }\r
-                            },\r
-                        }\r
-                    };\r
-                    sc.UpdateState();\r
-                    return sc;\r
-\r
-                case SettingID.BLUETOOTH:\r
-                    sc = new BTSettingShortcutInfo()\r
-                    {\r
-                        StateDescriptions =\r
-                        {\r
-                            {\r
-                                "on",\r
-                                new StateDescription\r
-                                {\r
-                                    Label = "BT ON",\r
-                                    IconPath = "AppIcon.png",\r
-                                    Action = new BTOffAction(),\r
-                                }\r
-                            },\r
-                            {\r
-                                "off",\r
-                                new StateDescription\r
-                                {\r
-                                    Label = "BT OFF",\r
-                                    IconPath = "AppIcon.png",\r
-                                    Action = new BTOnAction(),\r
-                                }\r
-                            },\r
-                            {\r
-                                "launch",\r
-                                new StateDescription\r
-                                {\r
-                                    Label = "BT Launch",\r
-                                    IconPath = "AppIcon.png",\r
-                                    Action = new BTLaunchAction(),\r
-                                }\r
-                            },\r
-                        }\r
-                    };\r
-                    sc.UpdateState();\r
-                    return sc;\r
-            }\r
-\r
-            return null;\r
-        }\r
-    }\r
-}\r
index c510c0b5d2dd09187249a924c38e65a5b2aa0049..3215d5c54f8eaf56eee86a2a9f2bc0cb1925636c 100644 (file)
@@ -3,9 +3,9 @@ using System.Collections.Generic;
 using System.Diagnostics;\r
 using System.Linq;\r
 using System.Text;\r
-using TVHome.DataModels;\r
-using TVHome.Models;\r
-using TVHome.Utils;\r
+using LibTVRefCommmonPortable.DataModels;\r
+using LibTVRefCommmonPortable.Models;\r
+using LibTVRefCommmonPortable.Utils;\r
 using TVHome.Views;\r
 using Xamarin.Forms;\r
 \r
index fe007c3ffb86e4be3b79c7ea871a7028c81187e0..99c888c6dc9c93d015a729ad5a9a10d9dc0a884f 100644 (file)
     <Compile Include="Controls\SubPanelThumbnailButton.xaml.cs">\r
       <DependentUpon>SubPanelThumbnailButton.xaml</DependentUpon>\r
     </Compile>\r
-    <Compile Include="DataModels\AppControlAction.cs" />\r
-    <Compile Include="DataModels\BTLaunchAction.cs" />\r
-    <Compile Include="DataModels\DBItem.cs" />\r
-    <Compile Include="DataModels\BTOffAction.cs" />\r
-    <Compile Include="DataModels\BTOnAction.cs" />\r
-    <Compile Include="DataModels\BTSettingShortcutInfo.cs" />\r
-    <Compile Include="DataModels\FileSystemEventCustomArgs.cs" />\r
-    <Compile Include="DataModels\HomeMenuAppShortcutInfo.cs" />\r
-    <Compile Include="DataModels\IDBItem.cs" />\r
-    <Compile Include="DataModels\WatcherType.cs" />\r
-    <Compile Include="DataModels\WiFiLaunchAction.cs" />\r
-    <Compile Include="Models\SettingShortcutFactory.cs" />\r
-    <Compile Include="Models\AppShortcutController.cs" />\r
-    <Compile Include="DataModels\AppShortcutInfo.cs" />\r
-    <Compile Include="Models\RecentShortcutController.cs" />\r
-    <Compile Include="DataModels\IAction.cs" />\r
-    <Compile Include="DataModels\MediaControlAction.cs" />\r
-    <Compile Include="DataModels\RecentShortcutInfo.cs" />\r
-    <Compile Include="Models\SettingShortcutController.cs" />\r
-    <Compile Include="DataModels\ShortcutInfo.cs" />\r
-    <Compile Include="DataModels\StateDescription.cs" />\r
-    <Compile Include="DataModels\WiFiOffAction.cs" />\r
-    <Compile Include="DataModels\WiFiOnAction.cs" />\r
-    <Compile Include="DataModels\WiFiSettingShortcutInfo.cs" />\r
     <Compile Include="TVHome.cs" />\r
     <Compile Include="Properties\AssemblyInfo.cs" />\r
-    <Compile Include="Utils\AppControlUtils.cs" />\r
-    <Compile Include="Utils\AppShortcutStorage.cs" />\r
-    <Compile Include="Utils\DebuggingUtils.cs" />\r
-    <Compile Include="Utils\IAppControl.cs" />\r
-    <Compile Include="Utils\IApplicationManagerAPIs.cs" />\r
-    <Compile Include="Utils\IBTAPIs.cs" />\r
-    <Compile Include="Utils\IDBAPIs.cs" />\r
-    <Compile Include="Utils\IFileSystemAPIs.cs" />\r
-    <Compile Include="Utils\IFileSystemWatcherAPIs.cs" />\r
-    <Compile Include="Utils\IPackageManager.cs" />\r
-    <Compile Include="Utils\IWifiAPIs.cs" />\r
-    <Compile Include="Utils\IDebuggingAPIs.cs" />\r
-    <Compile Include="Utils\ITVHome.cs" />\r
-    <Compile Include="Utils\PackageManagerUtils.cs" />\r
-    <Compile Include="Utils\RecentShortcutStorage.cs" />\r
-    <Compile Include="Utils\TVHomeImpl.cs" />\r
     <Compile Include="ViewModels\MainPageViewModel.cs" />\r
     <Compile Include="Views\MainPage.xaml.cs">\r
       <DependentUpon>MainPage.xaml</DependentUpon>\r
       <SubType>Designer</SubType>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="..\..\LibTVRefCommonPortable\LibTVRefCommonPortable.csproj">\r
+      <Project>{67f9d3a8-f71e-4428-913f-c37ae82cdb24}</Project>\r
+      <Name>LibTVRefCommonPortable</Name>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
   <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />\r
   <Import Project="..\..\packages\Xamarin.Forms.2.3.3.193\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.3.193\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />\r
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">\r
diff --git a/TVHome/TVHome/Utils/AppControlUtils.cs b/TVHome/TVHome/Utils/AppControlUtils.cs
deleted file mode 100644 (file)
index 46dd159..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-\r
-using Xamarin.Forms;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public sealed class AppControlUtils\r
-    {\r
-        private static IAppControl iam;\r
-        private static readonly AppControlUtils instance = new AppControlUtils();\r
-\r
-        public static AppControlUtils Instance\r
-        {\r
-            get { return instance; }\r
-        }\r
-\r
-        private class DefaultAM : IAppControl\r
-        {\r
-            public void SendLaunchRequest(string PkgID)\r
-            {\r
-            }\r
-        }\r
-\r
-        private AppControlUtils()\r
-        {\r
-            if (DependencyService.Get<IAppControl>() != null)\r
-            {\r
-                iam = DependencyService.Get<IAppControl>();\r
-            }\r
-            else\r
-            {\r
-                iam = new DefaultAM();\r
-            }\r
-        }\r
-\r
-        public static void SendLaunchRequest(string PkgID)\r
-        {\r
-            iam.SendLaunchRequest(PkgID);\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/AppShortcutStorage.cs b/TVHome/TVHome/Utils/AppShortcutStorage.cs
deleted file mode 100644 (file)
index 675da81..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-using System.Xml;\r
-using System.Xml.Serialization;\r
-using System.IO;\r
-\r
-using TVHome.DataModels;\r
-using TVHome.Utils;\r
-\r
-using Xamarin.Forms;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public class AppShortcutStorage\r
-    {\r
-        private static IFileSystemWatcherAPIs fileSystemWatcher = DependencyService.Get<IFileSystemWatcherAPIs>();\r
-        private static AppShortcutStorage instance = new AppShortcutStorage();\r
-\r
-        public static AppShortcutStorage Instance\r
-        {\r
-            get { return instance; }\r
-        }\r
-\r
-        private AppShortcutStorage()\r
-        {\r
-            fileSystemWatcher.Run();\r
-        }\r
-\r
-        private static List<AppShortcutInfo> GetSampleList()\r
-        {\r
-            var pinnedAppsInfo = new List<AppShortcutInfo>();\r
-\r
-            pinnedAppsInfo.Add(new AppShortcutInfo()\r
-            {\r
-                AppID = "org.tizen.settings",\r
-            });\r
-\r
-            pinnedAppsInfo.Add(new AppShortcutInfo()\r
-            {\r
-                AppID = "org.tizen.chromium-efl.ubrowser",\r
-            });\r
-\r
-            pinnedAppsInfo.Add(new AppShortcutInfo()\r
-            {\r
-                AppID = "org.tizen.dpm-toolkit",\r
-            });\r
-\r
-            pinnedAppsInfo.Add(new AppShortcutInfo()\r
-            {\r
-                AppID = "org.tizen.infosquare",\r
-            });\r
-\r
-            pinnedAppsInfo.Add(new AppShortcutInfo()\r
-            {\r
-                AppID = "org.tizen.mediahub",\r
-            });\r
-\r
-            pinnedAppsInfo.Add(new AppShortcutInfo()\r
-            {\r
-                AppID = "org.tizen.heremaps-uc",\r
-            });\r
-\r
-            pinnedAppsInfo.Add(new AppShortcutInfo()\r
-            {\r
-                AppID = "org.tizen.ode",\r
-            });\r
-\r
-            pinnedAppsInfo.Add(new AppShortcutInfo()\r
-            {\r
-                AppID = "org.tizen.apps",\r
-            });\r
-\r
-            pinnedAppsInfo.Add(new AppShortcutInfo()\r
-            {\r
-                AppID = "org.tizen.home",\r
-            });\r
-\r
-            return pinnedAppsInfo;\r
-        }\r
-\r
-        public static List<AppShortcutInfo> ReadFromFile(string filePath)\r
-        {\r
-            IFileSystemAPIs fileSystem = DependencyService.Get<IFileSystemAPIs>();\r
-            XmlSerializer serializer = new XmlSerializer(typeof(List<AppShortcutInfo>));\r
-            Stream fileStream = fileSystem.OpenFile(filePath, UtilFileMode.Open);\r
-            if (fileStream == null)\r
-            {\r
-                DebuggingUtils.Dbg("OpenFile failed : " + filePath);\r
-                // Below lines are just for sample \r
-                List<AppShortcutInfo> result = GetSampleList();\r
-                WriteToFile(result, filePath);\r
-                return result;\r
-            }\r
-\r
-            StreamReader streamReader = new StreamReader(fileStream);\r
-            return (List<AppShortcutInfo>)serializer.Deserialize(streamReader);\r
-        }\r
-\r
-        public static bool WriteToFile(IEnumerable<AppShortcutInfo> pinnedAppInfo, string filePath)\r
-        {\r
-            IFileSystemAPIs fileSystem = DependencyService.Get<IFileSystemAPIs>();\r
-            XmlSerializer serializer = new XmlSerializer(typeof(List<AppShortcutInfo>));\r
-            Stream fileStream = fileSystem.OpenFile(filePath, UtilFileMode.OpenOrCreate);\r
-            if (fileStream == null)\r
-            {\r
-                return false;\r
-            }\r
-\r
-            StreamWriter streamWriter = new StreamWriter(fileStream);\r
-            serializer.Serialize(streamWriter, pinnedAppInfo);\r
-            streamWriter.Flush();\r
-            fileSystem.CloseFile(fileStream);\r
-            return true;\r
-        }\r
-\r
-        public void AddFileSystemChangedListener(EventHandler<EventArgs> eventListener)\r
-        {\r
-            fileSystemWatcher.CustomChanged += eventListener;\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/DBUtil.cs b/TVHome/TVHome/Utils/DBUtil.cs
deleted file mode 100644 (file)
index de0e59c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;\r
-using System.Runtime.InteropServices;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public class DBUtil\r
-    {\r
-        public String DBFileName\r
-        {\r
-            get;\r
-            set;\r
-        }\r
-\r
-        public DBUtil(string dbFilename)\r
-        {\r
-\r
-        }\r
-\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/DebuggingUtils.cs b/TVHome/TVHome/Utils/DebuggingUtils.cs
deleted file mode 100644 (file)
index 0735dc2..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using Xamarin.Forms;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    /// <summary>\r
-    /// A debugging utility class.\r
-    /// </summary>\r
-    public sealed class DebuggingUtils\r
-    {\r
-        private static IDebuggingAPIs ism;\r
-        private static readonly DebuggingUtils instance = new DebuggingUtils();\r
-\r
-        /// <summary>\r
-        /// A method provides instance of DebuggingUtils. </summary>\r
-        public static DebuggingUtils Instance\r
-        {\r
-            get { return instance; }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Default implementation of IDebuggingAPIs interface .\r
-        /// This is required for the unit testing of the Calculator application. </summary>\r
-        private class DefaultSM : IDebuggingAPIs\r
-        {\r
-            public void Dbg(string message)\r
-            {\r
-            }\r
-\r
-            public void Err(string message)\r
-            {\r
-            }\r
-\r
-            public void Popup(string message)\r
-            {\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// DebuggingUtils constructor which set interface instance. </summary>\r
-        private DebuggingUtils()\r
-        {\r
-            if (DependencyService.Get<IDebuggingAPIs>() != null)\r
-            {\r
-                ism = DependencyService.Get<IDebuggingAPIs>();\r
-            }\r
-            else\r
-            {\r
-                ism = new DefaultSM();\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// A method displays a debugging message </summary>\r
-        /// <param name="message"> A list of command line arguments.</param>\r
-        public static void Dbg(string message)\r
-        {\r
-            ism.Dbg(message);\r
-        }\r
-\r
-        /// <summary>\r
-        /// A method displays a error message </summary>\r
-        /// <param name="message"> A list of command line arguments.</param>\r
-        public static void Err(string message)\r
-        {\r
-            ism.Err(message);\r
-        }\r
-\r
-        /// <summary>\r
-        /// A method displays a pop up  message </summary>\r
-        /// <param name="message"> A list of command line arguments.</param>\r
-        public static void Popup(string message)\r
-        {\r
-            ism.Popup(message);\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/IAppControl.cs b/TVHome/TVHome/Utils/IAppControl.cs
deleted file mode 100644 (file)
index 677a28c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public interface IAppControl\r
-    {\r
-        void SendLaunchRequest(string PkgID);\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/IApplicationManagerAPIs.cs b/TVHome/TVHome/Utils/IApplicationManagerAPIs.cs
deleted file mode 100644 (file)
index 4a01b73..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public interface IApplicationManagerAPIs\r
-    {\r
-        Task<Dictionary<string, string[]>> GetRecentApplications();\r
-        Dictionary<string, string> GetInstalledApplication(string applicationId);\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/IBTAPIs.cs b/TVHome/TVHome/Utils/IBTAPIs.cs
deleted file mode 100644 (file)
index 2cd08bf..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public interface IBTAPIs\r
-    {\r
-        void BTOn();\r
-\r
-        void BTOff();\r
-\r
-        void LaunchBTSetting();\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/IDBAPIs.cs b/TVHome/TVHome/Utils/IDBAPIs.cs
deleted file mode 100644 (file)
index 72a38f5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System.Collections.Generic;\r
-using TVHome.DataModels;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public interface IDBAPIs\r
-    {\r
-        bool ExecSQL(string dbName, string sql);\r
-\r
-        bool ExecSQL(string dbName, string sql, out IEnumerable<DBItem> items);\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/IDebuggingAPIs.cs b/TVHome/TVHome/Utils/IDebuggingAPIs.cs
deleted file mode 100644 (file)
index 8270093..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-namespace TVHome.Utils\r
-{\r
-    /// <summary>\r
-    /// A interface contains debugging methods which are using platform subsystems.\r
-    /// </summary>\r
-    /// <remarks>\r
-    /// Implementing this class should be occurred in platform project.\r
-    /// Also the implementation should be registered to the DependencyService in a app initialization.\r
-    /// Please refer to Xamarin Dependency Service\r
-    /// https://developer.xamarin.com/guides/xamarin-forms/dependency-service/introduction/\r
-    /// </remarks>\r
-    public interface IDebuggingAPIs\r
-    {\r
-        /// <summary>\r
-        /// A method displays a debugging log. </summary>\r
-        /// <param name="message"> A debugging message.</param>\r
-        void Popup(string message);\r
-\r
-        /// <summary>\r
-        /// A method displays a error log. </summary>\r
-        /// <param name="message"> A error message.</param>\r
-        void Dbg(string message);\r
-\r
-        /// <summary>\r
-        /// A method displays a dialog with a given message. </summary>\r
-        /// <param name="message"> A debugging message.</param>\r
-        void Err(string message);\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/IFileSystemAPIs.cs b/TVHome/TVHome/Utils/IFileSystemAPIs.cs
deleted file mode 100644 (file)
index 1592e43..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.IO;
-
-namespace TVHome.Utils
-{
-    //
-    // 요약:
-    //     운영 체제에서 파일을 여는 방법을 지정합니다.
-    public enum UtilFileMode
-    {
-        CreateNew = 1,
-        Create = 2,
-        Open = 3,
-        OpenOrCreate = 4,
-        Truncate = 5,
-        Append = 6
-    }
-
-    public interface IFileSystemAPIs
-    {
-        Stream OpenFile(string filePath, UtilFileMode mode);
-        void Flush(Stream stream);
-        void CloseFile(Stream stream);
-
-    }
-}
diff --git a/TVHome/TVHome/Utils/IFileSystemWatcherAPIs.cs b/TVHome/TVHome/Utils/IFileSystemWatcherAPIs.cs
deleted file mode 100644 (file)
index 4f3f0ce..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using TVHome.DataModels;
-
-namespace TVHome.Utils
-{
-    public interface IFileSystemWatcherAPIs
-    {
-        event EventHandler<EventArgs> CustomChanged;
-        void Run();
-    }
-}
diff --git a/TVHome/TVHome/Utils/IPackageManager.cs b/TVHome/TVHome/Utils/IPackageManager.cs
deleted file mode 100644 (file)
index acbb567..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    /// <summary>\r
-    /// A interface contains debugging methods which are using platform subsystems.\r
-    /// </summary>\r
-    /// <remarks>\r
-    /// Implementing this class should be occurred in platform project.\r
-    /// Also the implementation should be registered to the DependencyService in a app initialization.\r
-    /// Please refer to Xamarin Dependency Service\r
-    /// https://developer.xamarin.com/guides/xamarin-forms/dependency-service/introduction/\r
-    /// </remarks>\r
-    public interface IPackageManager\r
-    {\r
-        Dictionary<string, string[]> GetPackageList();\r
-\r
-        string GetPackage(string PkgID);\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/ITVHome.cs b/TVHome/TVHome/Utils/ITVHome.cs
deleted file mode 100644 (file)
index 34e3d02..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using TVHome.Models;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public interface ITVHome\r
-    {\r
-        AppShortcutController AppShortcutControllerInstance\r
-        {\r
-            get;\r
-        }\r
-\r
-        RecentShortcutController RecentShortcutControllerInstance\r
-        {\r
-            get;\r
-        }\r
-\r
-        SettingShortcutController SettingShortcutControllerInstance\r
-        {\r
-            get;\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/IWifiAPIs.cs b/TVHome/TVHome/Utils/IWifiAPIs.cs
deleted file mode 100644 (file)
index 4dd446b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public interface IWifiAPIs\r
-    {\r
-        void WifiOn();\r
-\r
-        void WifiOff();\r
-\r
-        void LaunchWifiSetting();\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/PackageManagerUtils.cs b/TVHome/TVHome/Utils/PackageManagerUtils.cs
deleted file mode 100644 (file)
index 5b933c3..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-\r
-using TVHome.Utils;\r
-using Xamarin.Forms;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public sealed class PackageManagerUtils\r
-    {\r
-        private static IPackageManager ipm;\r
-        private static readonly PackageManagerUtils instance = new PackageManagerUtils();\r
-\r
-        public static PackageManagerUtils Instance\r
-        {\r
-            get { return instance; }\r
-        }\r
-\r
-        private class DefaultPM : IPackageManager\r
-        {\r
-            public Dictionary<string, string[]> GetPackageList()\r
-            {\r
-                return null;\r
-            }\r
-\r
-            public string GetPackage(string PkgID)\r
-            {\r
-                return null;\r
-            }\r
-        }\r
-\r
-        private PackageManagerUtils()\r
-        {\r
-            if (DependencyService.Get<IPackageManager>() != null)\r
-            {\r
-                ipm = DependencyService.Get<IPackageManager>();\r
-            }\r
-            else\r
-            {\r
-                ipm = new DefaultPM();\r
-            }\r
-        }\r
-\r
-        public Dictionary<string, string[]> GetPackageList()\r
-        {\r
-            return ipm.GetPackageList();\r
-        }\r
-\r
-        public string GetPackage(string PkgID)\r
-        {\r
-            return ipm.GetPackage(PkgID);\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/RecentShortcutStorage.cs b/TVHome/TVHome/Utils/RecentShortcutStorage.cs
deleted file mode 100644 (file)
index ed92612..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System.Collections.Generic;\r
-using TVHome.DataModels;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public class RecentShortcutStorage\r
-    {\r
-        public RecentShortcutStorage()\r
-        {\r
-\r
-        }\r
-\r
-        public static bool Create()\r
-        {\r
-            return false;\r
-        }\r
-\r
-        public static RecentShortcutInfo Read(string key)\r
-        {\r
-            RecentShortcutInfo recentShortcutInfo = new RecentShortcutInfo();\r
-            return recentShortcutInfo;\r
-        }\r
-\r
-        public static IEnumerable<RecentShortcutInfo> Read()\r
-        {\r
-            List<RecentShortcutInfo> list = new List<RecentShortcutInfo>();\r
-\r
-            return list;\r
-        }\r
-\r
-        public static bool Update(ShortcutInfo shortcut)\r
-        {\r
-            // 받은 인자는 조정이 필요함.\r
-            return false;\r
-        }\r
-\r
-        public static void Delete(ShortcutInfo shortcut)\r
-        {\r
-            // 받은 인자는 조정이 필요함.\r
-        }\r
-\r
-        public static void DeleteAll()\r
-        {\r
-            // 받은 인자는 조정이 필요함.\r
-        }\r
-    }\r
-}\r
diff --git a/TVHome/TVHome/Utils/TVHomeImpl.cs b/TVHome/TVHome/Utils/TVHomeImpl.cs
deleted file mode 100644 (file)
index e90fc9e..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*\r
- * Copyright (c) 2017 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.1 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://floralicense.org/license/\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using TVHome.Models;\r
-\r
-namespace TVHome.Utils\r
-{\r
-    public class TVHomeImpl : ITVHome\r
-    {\r
-        private static readonly TVHomeImpl instance = new TVHomeImpl();\r
-        public static ITVHome GetInstance\r
-        {\r
-            get\r
-            {\r
-                return instance;\r
-            }\r
-        }\r
-\r
-        private TVHomeImpl()\r
-        {\r
-\r
-        }\r
-\r
-        private static readonly AppShortcutController appShortcutController = new AppShortcutController();\r
-        public AppShortcutController AppShortcutControllerInstance\r
-        {\r
-            get\r
-            {\r
-                return appShortcutController;\r
-            }\r
-        }\r
-\r
-        private static readonly RecentShortcutController recentShortcutController = new RecentShortcutController();\r
-        public RecentShortcutController RecentShortcutControllerInstance\r
-        {\r
-            get\r
-            {\r
-                return recentShortcutController;\r
-            }\r
-        }\r
-\r
-        private static readonly SettingShortcutController settingShortcutController = new SettingShortcutController();\r
-        public SettingShortcutController SettingShortcutControllerInstance\r
-        {\r
-            get\r
-            {\r
-                return settingShortcutController;\r
-            }\r
-        }\r
-    }\r
-}\r
index c9e3e780b93d6e8f39d694698d4aded068633fbb..c7f08aa9c7d8be4c442c0d3a005a94206f8e9edf 100755 (executable)
@@ -20,8 +20,8 @@ using System.Collections.Generic;
 using System.ComponentModel;
 using System.Windows.Input;
 using System.Threading.Tasks;
-using TVHome.DataModels;
-using TVHome.Utils;
+using LibTVRefCommmonPortable.DataModels;
+using LibTVRefCommmonPortable.Utils;
 using Xamarin.Forms;
 
 namespace TVHome.ViewModels
index 6747528534fce88e2aef320c54a23bb7c51a47fc..6c9e79c61b4b6f6f6de3182d0f3718f3f0ad7756 100644 (file)
@@ -18,9 +18,9 @@ using System;
 using System.Collections.Generic;\r
 using System.Diagnostics;\r
 using System.Windows.Input;\r
-using TVHome.DataModels;\r
-using TVHome.Models;\r
-using TVHome.Utils;\r
+using LibTVRefCommmonPortable.DataModels;\r
+using LibTVRefCommmonPortable.Models;\r
+using LibTVRefCommmonPortable.Utils;\r
 using Xamarin.Forms;\r
 \r
 namespace TVHome.Views\r
index 527e92ea191ea37eb236c1adca1e9cb0a3b78ffe..c95a222f35610f5f11212db9c28cd9559c574495 100644 (file)
@@ -19,8 +19,8 @@ using System.Collections.Generic;
 using System.ComponentModel;\r
 using System.Windows.Input;\r
 using TVHome.Controls;\r
-using TVHome.DataModels;\r
-using TVHome.Utils;\r
+using LibTVRefCommmonPortable.DataModels;\r
+using LibTVRefCommmonPortable.Utils;\r
 using TVHome.ViewModels;\r
 using Xamarin.Forms;\r
 \r
index 6a318505235ad17a5a1f13798343ab006ef5ad3d..f20cbb9b3d8b44f53aa5ff998f50db1442df7b38 100644 (file)
@@ -18,7 +18,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Windows.Input;
-using TVHome.DataModels;
+using LibTVRefCommmonPortable.DataModels;
 using Xamarin.Forms;
 
 namespace TVHome.Views
index 97053cb35937115e3ca37ec19c4c976b318ebfef..47ac50495268af44075dc98a01b2d13eca5d45db 100644 (file)
@@ -19,10 +19,10 @@ using System.Collections.Generic;
 using System.Windows.Input;\r
 using System.ComponentModel;\r
 using TVHome.Controls;\r
-using TVHome.DataModels;\r
+using LibTVRefCommmonPortable.DataModels;\r
 using TVHome.ViewModels;\r
 using Xamarin.Forms;\r
-using TVHome.Utils;\r
+using LibTVRefCommmonPortable.Utils;\r
 \r
 namespace TVHome.Views\r
 {\r
index 459a7b37f698838b76db76d72eb828c014a11c23..c2985bd66acf2643993e7c0d52b38f56412dfdd8 100644 (file)
@@ -19,10 +19,10 @@ using System.Collections.Generic;
 using System.Windows.Input;
 using System.ComponentModel;
 using TVHome.Controls;
-using TVHome.DataModels;
+using LibTVRefCommmonPortable.DataModels;
 using TVHome.ViewModels;
 using Xamarin.Forms;
-using TVHome.Utils;
+using LibTVRefCommmonPortable.Utils;
 
 namespace TVHome.Views
 {
diff --git a/TVHomeApps.sln b/TVHomeApps.sln
new file mode 100644 (file)
index 0000000..3b36328
--- /dev/null
@@ -0,0 +1,58 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVHome", "TVHome\TVHome\TVHome.csproj", "{54DD6673-7E64-48E6-A008-4D455E19E017}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVHome.TizenTV", "TVHome\TVHome.TizenTV\TVHome.TizenTV.csproj", "{CE03A1DC-A3E0-41DD-B06C-92C19E8D2A8F}"
+       ProjectSection(ProjectDependencies) = postProject
+               {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6} = {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}
+       EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVApps", "TVApps\TVApps\TVApps.csproj", "{FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVApps.TizenTV", "TVApps\TVApps.TizenTV\TVApps.TizenTV.csproj", "{7E341BF5-B7BD-4532-9D4A-AA89537B525E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibTVRefCommonPortable", "LibTVRefCommonPortable\LibTVRefCommonPortable.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibTVRefCommonTizen", "LibTVRefCommonTizen\LibTVRefCommonTizen.csproj", "{C558D279-897E-45E1-A10A-DECD788770F4}"
+       ProjectSection(ProjectDependencies) = postProject
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24} = {67F9D3A8-F71E-4428-913F-C37AE82CDB24}
+       EndProjectSection
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Any CPU = Debug|Any CPU
+               Release|Any CPU = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {54DD6673-7E64-48E6-A008-4D455E19E017}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {54DD6673-7E64-48E6-A008-4D455E19E017}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {54DD6673-7E64-48E6-A008-4D455E19E017}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {54DD6673-7E64-48E6-A008-4D455E19E017}.Release|Any CPU.Build.0 = Release|Any CPU
+               {CE03A1DC-A3E0-41DD-B06C-92C19E8D2A8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {CE03A1DC-A3E0-41DD-B06C-92C19E8D2A8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {CE03A1DC-A3E0-41DD-B06C-92C19E8D2A8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {CE03A1DC-A3E0-41DD-B06C-92C19E8D2A8F}.Release|Any CPU.Build.0 = Release|Any CPU
+               {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {FD8C0EF4-6CEA-4421-85B7-7AC8592738C6}.Release|Any CPU.Build.0 = Release|Any CPU
+               {7E341BF5-B7BD-4532-9D4A-AA89537B525E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {7E341BF5-B7BD-4532-9D4A-AA89537B525E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {7E341BF5-B7BD-4532-9D4A-AA89537B525E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {7E341BF5-B7BD-4532-9D4A-AA89537B525E}.Release|Any CPU.Build.0 = Release|Any CPU
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.Build.0 = Release|Any CPU
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {C558D279-897E-45E1-A10A-DECD788770F4}.Release|Any CPU.Build.0 = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
+EndGlobal