2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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://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.
17 #include <dpl/foreach.h>
19 #include "tizen_feature.h"
22 namespace WebAppDetailSetting {
24 const char *TizenFeature::m_feature[] = {
25 "http://tizen.org/api/application",
26 "http://tizen.org/api/time",
27 "http://tizen.org/api/contact",
28 "http://tizen.org/api/calendar",
29 "http://tizen.org/api/call",
30 "http://tizen.org/api/messaging",
31 "http://tizen.org/api/bluetooth",
32 "http://tizen.org/api/geocoder",
33 "http://tizen.org/api/nfc",
34 "http://tizen.org/api/sensors",
35 "http://tizen.org/api/systeminfo",
39 const char *TizenFeature::m_featureName[] = {
40 N_("Installed application"),
50 N_("System infomation"),
53 std::map<int, Feature> TizenFeature::getFeatureMap(
54 WrtDB::DbWidgetFeatureSet &features)
57 std::map<int, Feature> featureMap;
60 FOREACH(feature, features) {
61 for (i = 0; i < sizeof(m_feature) / sizeof(*m_feature); i++) {
62 if (featureMap.find(i) != featureMap.end())
65 uri = DPL::ToUTF8String(feature->name);
69 featureMap[i] = Feature(m_featureName[i],
79 } /* WebAppDetailSetting */