return m_name <= other.m_name;
}
-bool ConfigParserData::ServiceInfo::operator== (const ServiceInfo& info) const
-{
- return m_src == info.m_src &&
- m_operation == info.m_operation &&
- m_scheme == info.m_scheme &&
- m_mime == info.m_mime &&
- m_disposition == info.m_disposition;
-}
-
-bool ConfigParserData::ServiceInfo::operator!= (const ServiceInfo& info) const
-{
- return m_src != info.m_src ||
- m_operation != info.m_operation ||
- m_scheme != info.m_scheme ||
- m_mime != info.m_mime ||
- m_disposition != info.m_disposition;
-}
-
bool ConfigParserData::AppControlInfo::operator== (const AppControlInfo& info) const
{
return m_src == info.m_src &&
registerWidgetSettings(widgetHandle, widgetRegInfo);
- registerAppService(widgetHandle, widgetRegInfo);
+ registerAppControl(widgetHandle, widgetRegInfo);
registerEncryptedResouceInfo(widgetHandle, widgetRegInfo);
}
}
-void WidgetDAO::insertApplicationServiceInfo(DbWidgetHandle handle,
+void WidgetDAO::insertAppControlInfo(DbWidgetHandle handle,
DPL::String src,
DPL::String operation,
- DPL::String scheme,
+ DPL::String uri,
DPL::String mime,
unsigned index,
unsigned disposition)
using namespace DPL::DB::ORM;
using namespace DPL::DB::ORM::wrt;
- ApplicationServiceInfo::Row row;
+ AppControlInfo::Row row;
row.Set_app_id(handle);
- row.Set_service_index(index);
+ row.Set_execute_index(index);
row.Set_src(src);
row.Set_operation(operation);
- row.Set_scheme(scheme);
+ row.Set_uri(uri);
row.Set_mime(mime);
row.Set_disposition(disposition);
- DO_INSERT(row, ApplicationServiceInfo);
+ DO_INSERT(row, AppControlInfo);
}
-void WidgetDAO::registerAppService(DbWidgetHandle widgetHandle,
+void WidgetDAO::registerAppControl(DbWidgetHandle widgetHandle,
const WidgetRegisterInfo ®Info)
{
using namespace DPL::DB::ORM;
using namespace DPL::DB::ORM::wrt;
const ConfigParserData& widgetConfigurationInfo = regInfo.configInfo;
- // appServiceList
- FOREACH(ASIt, widgetConfigurationInfo.appServiceList)
- {
- ApplicationServiceInfo::Row row;
- row.Set_app_id(widgetHandle);
- row.Set_service_index(ASIt->m_index);
- row.Set_src(ASIt->m_src);
- row.Set_operation(ASIt->m_operation);
- row.Set_scheme(ASIt->m_scheme);
- row.Set_mime(ASIt->m_mime);
- row.Set_disposition(static_cast<int>(ASIt->m_disposition));
-
- DO_INSERT(row, ApplicationServiceInfo)
- }
-
// appControlList
FOREACH(appControl_it, widgetConfigurationInfo.appControlList)
{
{
FOREACH(uri_it, appControl_it->m_uriList)
{
- DPL::String scheme = *uri_it;
+ DPL::String uri = *uri_it;
if (!appControl_it->m_mimeList.empty())
{
{
DPL::String mime = *mime_it;
- insertApplicationServiceInfo(widgetHandle, src, operation, scheme, mime, index, disposition);
+ insertAppControlInfo(widgetHandle, src, operation, uri, mime, index, disposition);
}
}
else
{
DPL::String mime = L"";
- insertApplicationServiceInfo(widgetHandle, src, operation, scheme, mime, index, disposition);
+ insertAppControlInfo(widgetHandle, src, operation, uri, mime, index, disposition);
}
}
}
else
{
- DPL::String scheme = L"";
+ DPL::String uri = L"";
if (!appControl_it->m_mimeList.empty())
{
{
DPL::String mime = *mime_it;
- insertApplicationServiceInfo(widgetHandle, src, operation, scheme, mime, index, disposition);
+ insertAppControlInfo(widgetHandle, src, operation, uri, mime, index, disposition);
}
}
else
{
DPL::String mime = L"";
- insertApplicationServiceInfo(widgetHandle, src, operation, scheme, mime, index, disposition);
+ insertAppControlInfo(widgetHandle, src, operation, uri, mime, index, disposition);
}
}
}
SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get settings list")
}
-void WidgetDAOReadOnly::getAppServiceList(
- WidgetApplicationServiceList& outAppServiceList) const
+void WidgetDAOReadOnly::getAppControlList(
+ WidgetAppControlList& outAppControlList) const
{
- LogDebug("Getting getAppServiceList. Handle: " << m_widgetHandle);
+ LogDebug("Getting getAppControlList. Handle: " << m_widgetHandle);
SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
{
ScopedTransaction transaction(&WrtDatabase::interface());
CHECK_WIDGET_EXISTENCE(transaction, m_widgetHandle)
- WRT_DB_SELECT(select, ApplicationServiceInfo, &WrtDatabase::interface())
- select->Where(Equals<ApplicationServiceInfo::app_id>(m_widgetHandle));
+ WRT_DB_SELECT(select, AppControlInfo, &WrtDatabase::interface())
+ select->Where(Equals<AppControlInfo::app_id>(m_widgetHandle));
- ApplicationServiceInfo::Select::RowList rows = select->GetRowList();
+ AppControlInfo::Select::RowList rows = select->GetRowList();
if (rows.empty()) {
- LogDebug("Application Service list is empty. Handle: " <<
+ LogDebug("AppControl list is empty. Handle: " <<
m_widgetHandle);
}
FOREACH(it, rows) {
- WidgetApplicationService ret;
+ WidgetAppControl ret;
ret.src = it->Get_src();
ret.operation = it->Get_operation();
- ret.scheme = it->Get_scheme();
+ ret.uri = it->Get_uri();
ret.mime = it->Get_mime();
- ret.disposition = static_cast<WidgetApplicationService::Disposition>(it->Get_disposition());
- ret.index = it->Get_service_index();
- outAppServiceList.push_back(ret);
+ ret.disposition = static_cast<WidgetAppControl::Disposition>(it->Get_disposition());
+ ret.index = it->Get_execute_index();
+ outAppControlList.push_back(ret);
}
transaction.Commit();
}
- SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get access host list")
+ SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get AppControl list")
}
PackagingType WidgetDAOReadOnly::getPackagingType() const
typedef std::list<WidgetSetting> WidgetSettings;
/**
- * @brief Widget Application Service
+ * @brief Widget AppControl
*
- * Application sercvice describes details of behaviour
+ * Application control describes details of behaviour
* when widget receives aul bundle data.
*/
-struct WidgetApplicationService
+struct WidgetAppControl
{
enum class Disposition {
WINDOW = 0,
DPL::String src; /* start uri */
DPL::String operation; /* service name */
- DPL::String scheme; /* scheme type*/
+ DPL::String uri; /* scheme type*/
DPL::String mime; /* mime type */
Disposition disposition;
unsigned index;
- bool operator== (const WidgetApplicationService& other) const
+ bool operator== (const WidgetAppControl& other) const
{
return src == other.src &&
operation == other.operation &&
- scheme == other.scheme &&
+ uri == other.uri &&
mime == other.mime &&
disposition == other.disposition;
}
};
-typedef std::list<WidgetApplicationService> WidgetApplicationServiceList;
+typedef std::list<WidgetAppControl> WidgetAppControlList;
} // namespace WrtDB
#endif /* WRT_WIDGET_DAO_COMMON_DAO_TYPES_H_ */
typedef std::set<Setting> SettingsList;
- /* ServiceInfo will be removed.
- * ServiceInfo will be changed AppControl
- */
- struct ServiceInfo
- {
- enum class Disposition {
- WINDOW = 0,
- INLINE
- };
- ServiceInfo(
- const DPL::String& src,
- const DPL::String& operation,
- const DPL::String& scheme,
- const DPL::String& mime,
- const Disposition dispos) :
- m_src(src),
- m_operation(operation),
- m_scheme(scheme),
- m_mime(mime),
- m_disposition(dispos),
- m_index(0)
- {}
- DPL::String m_src;
- DPL::String m_operation;
- DPL::String m_scheme;
- DPL::String m_mime;
- Disposition m_disposition;
- unsigned m_index;
-
- bool operator==(const ServiceInfo&) const;
- bool operator!=(const ServiceInfo&) const;
- };
-
struct AppControlInfo
{
enum class Disposition {
bool operator!=(const AppControlInfo&) const;
};
- typedef std::list<ServiceInfo> ServiceInfoList; // It will be removed.
typedef std::list<AppControlInfo> AppControlInfoList;
typedef std::list<std::pair<DPL::String, DPL::String> > BoxSizeList;
DPL::OptionalString cspPolicy;
DPL::OptionalString cspPolicyReportOnly;
- //Application service model list
- ServiceInfoList appServiceList; //It will be removed.
+ //AppControl model list
AppControlInfoList appControlList;
// For link shared directory
void getWidgetSettings(WidgetSettings& outWidgetSettings) const;
/**
- * This method gets application service list that define AUL value
+ * This method gets application control list that define AUL value
*
* @return See above comment
* @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
*/
- void getAppServiceList(
- WidgetApplicationServiceList& outAppServiceList) const;
+ void getAppControlList(
+ WidgetAppControlList& outAppControlList) const;
/**
* This method returns the type of the package.
static void registerWidgetSettings(
DbWidgetHandle widgetHandle,
const WidgetRegisterInfo ®Info);
- static void registerAppService(
+ static void registerAppControl(
DbWidgetHandle widgetHandle,
const WidgetRegisterInfo ®Info);
static void registerEncryptedResouceInfo(
static void unregisterWidgetInternal(
const TizenAppId & tzAppId);
- static void insertApplicationServiceInfo(DbWidgetHandle handle,
+ static void insertAppControlInfo(DbWidgetHandle handle,
DPL::String src,
DPL::String operation,
- DPL::String scheme,
+ DPL::String uri,
DPL::String mime,
unsigned index,
unsigned disposition);
)
CREATE_TABLE_END()
-CREATE_TABLE(ApplicationServiceInfo)
+CREATE_TABLE(AppControlInfo)
COLUMN_NOT_NULL(app_id, INT,)
- COLUMN_NOT_NULL(service_index, INT,)
+ COLUMN_NOT_NULL(execute_index, INT,)
COLUMN_NOT_NULL(src, TEXT,)
COLUMN_NOT_NULL(operation, TEXT,)
- COLUMN_NOT_NULL(scheme, TEXT,)
+ COLUMN_NOT_NULL(uri, TEXT,)
COLUMN_NOT_NULL(mime, TEXT,)
COLUMN_NOT_NULL(disposition, TINYINT, DEFAULT 0)
TABLE_CONSTRAINTS(
- PRIMARY KEY(app_id, operation, scheme, mime)
+ PRIMARY KEY(app_id, operation, uri, mime)
FOREIGN KEY(app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
)
CREATE_TABLE_END()