registerWidgetWarpInfo(widgetHandle, widgetRegInfo);
+ registerWidgetAllowNavigationInfo(widgetHandle, widgetRegInfo);
+
registerWidgetCertificates(widgetHandle, wacSecurity);
CertificateChainList list;
}
}
+void WidgetDAO::registerWidgetAllowNavigationInfo(DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info)
+{
+ using namespace DPL::DB::ORM;
+ using namespace DPL::DB::ORM::wrt;
+ const ConfigParserData& widgetConfigurationInfo = regInfo.configInfo;
+
+ FOREACH(allowNaviIt, widgetConfigurationInfo.allowNavigationInfoList)
+ {
+ WidgetAllowNavigation::Row row;
+ row.Set_app_id(widgetHandle);
+ row.Set_scheme(allowNaviIt->m_scheme);
+ row.Set_host(allowNaviIt->m_host);
+ DO_INSERT(row, WidgetAllowNavigation)
+ }
+}
+
void WidgetDAO::registerWidgetCertificates(DbWidgetHandle widgetHandle,
const IWacSecurity &wacSecurity)
{
SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get accessinfo list")
}
+void WidgetDAOReadOnly::getWidgetAllowNavigationInfo(
+ WidgetAllowNavigationInfoList& allowNavigationList) const
+{
+ SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
+ {
+ WRT_DB_SELECT(select, WidgetAllowNavigation, &WrtDatabase::interface())
+ select->Where(Equals<WidgetAllowNavigation::app_id>(m_widgetHandle));
+ WidgetAllowNavigation::Select::RowList rows = select->GetRowList();
+
+ FOREACH(it, rows) {
+ WidgetAllowNavigationInfo info;
+ info.scheme = it->Get_scheme();
+ info.host = it->Get_host();
+ allowNavigationList.push_back(info);
+ }
+ }
+ SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get allow-navigation info list")
+}
+
LanguageTags WidgetDAOReadOnly::getLanguageTags() const
{
//TODO check widget existance
info.bSubDomains == bSubDomains;
}
};
+typedef std::list<WidgetAccessInfo> WidgetAccessInfoList;
+
+struct WidgetAllowNavigationInfo
+{
+ DPL::String scheme;
+ DPL::String host;
+};
+typedef std::list<WidgetAllowNavigationInfo> WidgetAllowNavigationInfoList;
struct EncryptedFileInfo
{
}
};
-typedef std::list<WidgetAccessInfo> WidgetAccessInfoList;
-
typedef std::list<DPL::String> WindowModeList;
typedef std::list<DPL::String> PrivilegeList;
CapabilityList m_capabilityList;
};
- LiveboxList m_livebox;
-
typedef std::list<DPL::OptionalString> DependsPkgList;
-
typedef std::set<DPL::String> CategoryList;
+ struct AllowNavigationInfo
+ {
+ AllowNavigationInfo(DPL::String scheme,
+ DPL::String host) :
+ m_scheme(scheme),
+ m_host(host)
+ { }
+ DPL::String m_scheme;
+ DPL::String m_host;
+ };
+ typedef std::list<AllowNavigationInfo> AllowNavigationInfoList;
+
+ LiveboxList m_livebox;
StringsList nameSpaces;
LocalizedDataSet localizedDataSet;
DPL::OptionalString tizenPkgId;
DPL::OptionalString tizenAppId;
+ // allow-navigation
+ AllowNavigationInfoList allowNavigationInfoList;
+
//csp polic for widget
DPL::OptionalString cspPolicy;
DPL::OptionalString cspPolicyReportOnly;
* @param[out] outAccessInfoList list filled with access info structures
*/
void getWidgetAccessInfo(WidgetAccessInfoList& outAccessInfoList) const;
+ void getWidgetAllowNavigationInfo(
+ WidgetAllowNavigationInfoList& allowNavigationInfoList) const;
/**
* WAC 2.0 extension
static void registerWidgetWarpInfo(
DbWidgetHandle widgetHandle,
const WidgetRegisterInfo ®Info);
+ static void registerWidgetAllowNavigationInfo(
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
static void registerWidgetCertificates(
DbWidgetHandle widgetHandle,
const IWacSecurity &wacSecurity);
)
CREATE_TABLE_END()
+CREATE_TABLE(WidgetAllowNavigation)
+ COLUMN_NOT_NULL(app_id, INT,)
+ COLUMN_NOT_NULL(scheme, TEXT,)
+ COLUMN_NOT_NULL(host, TEXT,)
+
+ TABLE_CONSTRAINTS(
+ PRIMARY KEY(app_id, scheme, host)
+ FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
+ )
+CREATE_TABLE_END()
+
CREATE_TABLE(WidgetSecuritySettings)
COLUMN_NOT_NULL(app_id, INT,)
COLUMN_NOT_NULL(security_popup_usage, INT, DEFAULT 1)