2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef WRT_COMMON_APP_CONTROL_H_
18 #define WRT_COMMON_APP_CONTROL_H_
20 #include <app_control.h>
30 explicit AppControl(app_control_h app_control);
34 AppControl(const AppControl& src) = delete;
35 AppControl& operator=(const AppControl&) = delete;
37 std::string operation() const;
38 void set_operation(const std::string& operation);
39 std::string mime() const;
40 void set_mime(const std::string& mime);
41 std::string uri() const;
42 void set_uri(const std::string& uri);
43 std::string category() const;
44 void set_category(const std::string& category);
45 std::string data(const std::string& key) const;
46 std::vector<std::string> data_array(const std::string& key) const;
47 std::string encoded_bundle();
49 bool IsDataArray(const std::string& key);
50 bool AddData(const std::string& key, const std::string& value);
51 bool AddDataArray(const std::string& key,
52 const std::vector<std::string>& value_array);
53 bool Reply(const std::map<std::string, std::vector<std::string>>& data);
57 app_control_h app_control_;
58 bundle* app_control_bundle_;
63 #endif // WRT_COMMON_APP_CONTROL_H_