--- /dev/null
+/*
+ * 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;
+ }
+ }
+}
--- /dev/null
+/*
+ * 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");
+ }
+ }
+}
--- /dev/null
+/*
+ * 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";
+ }
+ }
+}
--- /dev/null
+/*
+ * 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";
+ }
+ }
+}
--- /dev/null
+/*
+ * 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";
+ }
+ }
+}
--- /dev/null
+/*
+ * 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");
+ }
+ }
+}
--- /dev/null
+/*
+ * 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();
+ }
+ }
+}
--- /dev/null
+/*
+ * 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
--- /dev/null
+/*
+ * 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");
+ }
+ }
+}
--- /dev/null
+/*
+ * 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();
+ }
+}
--- /dev/null
+/*
+ * 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();
+ }
+}
--- /dev/null
+/*
+ * 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;
+ }
+
+ }
+}
--- /dev/null
+/*
+ * 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();
+ }
+ }
+}
--- /dev/null
+/*
+ * 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");
+ }
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+ }
+}
--- /dev/null
+/*
+ * 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;
+ }
+
+ }
+}
--- /dev/null
+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
+ }
+}
--- /dev/null
+/*
+ * 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";
+ }
+ }
+}
--- /dev/null
+/*
+ * 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";
+ }
+ }
+}
--- /dev/null
+/*
+ * 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";
+ }
+ }
+}
--- /dev/null
+/*
+ * 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");
+ }
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Xamarin.Forms;
+
+namespace LibTVRefCommonPortable
+{
+ public class LibTVRefCommonPortable : ContentPage
+ {
+ public LibTVRefCommonPortable()
+ {
+
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <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
--- /dev/null
+/*
+ * 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");
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * 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;
+
+ }
+ }
+}
--- /dev/null
+/*
+ * 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;
+ }
+
+ }
+}
--- /dev/null
+/*
+ * 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;
+ }
+ }
+}
--- /dev/null
+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")]
--- /dev/null
+<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
--- /dev/null
+/*
+ * 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);
+ }
+ }
+}
--- /dev/null
+/*
+ * 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;
+ }
+ }
+}
--- /dev/null
+using System;
+using System.Runtime.InteropServices;
+
+namespace TVHome.Utils
+{
+ public class DBUtil
+ {
+ public String DBFileName
+ {
+ get;
+ set;
+ }
+
+ public DBUtil(string dbFilename)
+ {
+
+ }
+
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+ }
+}
--- /dev/null
+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);
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+}
--- /dev/null
+/*
+ * 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();
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+}
--- /dev/null
+/*
+ * 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);
+
+ }
+}
--- /dev/null
+/*
+ * 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();
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+}
--- /dev/null
+/*
+ * 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;
+ }
+ }
+}
--- /dev/null
+/*
+ * 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();
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+ }
+}
--- /dev/null
+/*
+ * 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()
+ {
+ // 받은 인자는 조정이 필요함.
+ }
+ }
+}
--- /dev/null
+/*
+ * 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;
+ }
+ }
+ }
+}
--- /dev/null
+<?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
--- /dev/null
+using System;
+
+namespace LibTVRefCommonTizen
+{
+ public class MyLibrary
+ {
+ public string MyMethod()
+ {
+ return "Hello Tizen Library!!!";
+ }
+ }
+}
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+{
+ "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
--- /dev/null
+/*
+ * 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);
+ }
+ }
+}
--- /dev/null
+/*
+ * 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
--- /dev/null
+/*
+ * 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
--- /dev/null
+/*
+ * 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;
+ }
+
+ }
+
+}
--- /dev/null
+/*
+ * 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
--- /dev/null
+/*
+ * 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();
+ }
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+ }
+}
--- /dev/null
+/*
+ * 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
--- /dev/null
+/*
+ * 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
--- /dev/null
+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")]
--- /dev/null
+<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
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
{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
* 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
{
+++ /dev/null
-/*
- * 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
-using System;
-using TVApps;
-using TVApps.TizenTV.Ports;
+using LibTVRefCommonTizen.Ports;
namespace TVApps.TizenTV
{
</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>
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
{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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*
- * 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();
- }
- }
-}
+++ /dev/null
-/*
- * 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);
- }
- }
-}
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
using System;\r
using Tizen;\r
-using TVHome.TizenTV.Ports;\r
+using LibTVRefCommonTizen.Ports;\r
\r
namespace TVHome.TizenTV\r
{\r
<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
using System;
using System.Windows.Input;
-using TVHome.Utils;
+using LibTVRefCommmonPortable.Utils;
using Xamarin.Forms;
namespace TVHome.Controls
\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*
- * 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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-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
- }
-}
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
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
<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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-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
+++ /dev/null
-/*\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
+++ /dev/null
-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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*
- * 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);
-
- }
-}
+++ /dev/null
-/*
- * 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();
- }
-}
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
+++ /dev/null
-/*\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
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
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
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
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Input;
-using TVHome.DataModels;
+using LibTVRefCommmonPortable.DataModels;
using Xamarin.Forms;
namespace TVHome.Views
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
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
{
--- /dev/null
+
+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