2 * Copyright (c) 2017 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using LibTVRefCommonPortable.Utils;
19 using System.Collections.Generic;
21 namespace LibTVRefCommonPortable.DataModels
24 /// A class defines App Control behavior.
26 public class AppControlAction : IAction
29 /// A target application ID
31 public string AppID { get; set; }
34 /// A dictionary which has extra data for App Control
36 private Dictionary<string, string> extraData;
39 /// A dictionary which has extra data for App Control
41 public Dictionary<string, string> ExtraData
45 if (extraData == null)
47 extraData = new Dictionary<string, string>();
55 /// A method which invoke a App Control to the application of the AppID
57 /// <returns>a next state after App Control invocation</returns>
58 public string Execute()
60 string result = "default";
61 if (ExtraData == null)
63 AppControlUtils.SendLaunchRequest(AppID);
67 AppControlUtils.SendLaunchRequest(AppID, ExtraData);