#Removing of widget desktop icons
WIDGET_EXEC_PATH=/opt/usr/apps/
+WIDGET_PRELOAD_EXEC_PATH=/usr/apps/
WIDGET_DESKTOP_PATH=/opt/share/applications/
WRT_DB=/opt/dbspace/.wrt.db
PLUGINS_INSTALLATION_REQUIRED_PATH=/opt/share/widget/
do
pkgId=`echo "$appid" | cut -f1 -d"."`
rm -rf ${WIDGET_EXEC_PATH}${pkgId}
+ rm -rf ${WIDGET_PRELOAD_EXEC_PATH}${pkgId}
widget_desktop_file="${WIDGET_DESKTOP_PATH}${appid}.desktop";
if [ -f ${widget_desktop_file} ]; then
rm -f $widget_desktop_file;
namespace DPL {
typedef Optional<String> OptionalString;
typedef Optional<int> OptionalInt;
+typedef Optional<unsigned int> OptionalUInt;
typedef Optional<bool> OptionalBool;
typedef Optional<float> OptionalFloat;
} //namespace DPL
bool m_showWarning;
bool m_showError;
bool m_showPedantic;
+ bool m_printStdErr;
static std::string FormatMessage(const char *message,
const char *filename,
bool showWarning,
bool showError,
bool showPedantic);
+ OldStyleLogProvider(bool showDebug,
+ bool showInfo,
+ bool showWarning,
+ bool showError,
+ bool showPedantic,
+ bool printStdErr);
virtual ~OldStyleLogProvider() {}
virtual void Debug(const char *message,
m_showInfo(showInfo),
m_showWarning(showWarning),
m_showError(showError),
- m_showPedantic(showPedantic)
+ m_showPedantic(showPedantic),
+ m_printStdErr(false)
+{}
+
+OldStyleLogProvider::OldStyleLogProvider(bool showDebug,
+ bool showInfo,
+ bool showWarning,
+ bool showError,
+ bool showPedantic,
+ bool printStdErr) :
+ m_showDebug(showDebug),
+ m_showInfo(showInfo),
+ m_showWarning(showWarning),
+ m_showError(showError),
+ m_showPedantic(showPedantic),
+ m_printStdErr(printStdErr)
{}
void OldStyleLogProvider::Debug(const char *message,
const char *function)
{
if (m_showDebug) {
- fprintf(stdout, "%s%s%s\n", DEBUG_BEGIN,
- FormatMessage(message, filename, line,
- function).c_str(), DEBUG_END);
+ if (m_printStdErr) {
+ fprintf(stderr, "%s%s%s\n", DEBUG_BEGIN,
+ FormatMessage(message, filename, line,
+ function).c_str(), DEBUG_END);
+ } else {
+ fprintf(stdout, "%s%s%s\n", DEBUG_BEGIN,
+ FormatMessage(message, filename, line,
+ function).c_str(), DEBUG_END);
+ }
}
}
const char *function)
{
if (m_showInfo) {
- fprintf(stdout, "%s%s%s\n", INFO_BEGIN,
- FormatMessage(message, filename, line,
- function).c_str(), INFO_END);
+ if (m_printStdErr) {
+ fprintf(stderr, "%s%s%s\n", INFO_BEGIN,
+ FormatMessage(message, filename, line,
+ function).c_str(), INFO_END);
+ } else {
+ fprintf(stdout, "%s%s%s\n", INFO_BEGIN,
+ FormatMessage(message, filename, line,
+ function).c_str(), INFO_END);
+ }
}
}
const char *function)
{
if (m_showWarning) {
- fprintf(stdout, "%s%s%s\n", WARNING_BEGIN,
- FormatMessage(message, filename, line,
- function).c_str(), WARNING_END);
+ if (m_printStdErr) {
+ fprintf(stderr, "%s%s%s\n", WARNING_BEGIN,
+ FormatMessage(message, filename, line,
+ function).c_str(), WARNING_END);
+ } else {
+ fprintf(stdout, "%s%s%s\n", WARNING_BEGIN,
+ FormatMessage(message, filename, line,
+ function).c_str(), WARNING_END);
+ }
}
}
const char *function)
{
if (m_showError) {
- fprintf(stdout, "%s%s%s\n", ERROR_BEGIN,
- FormatMessage(message, filename, line,
- function).c_str(), ERROR_END);
+ if (m_printStdErr) {
+ fprintf(stderr, "%s%s%s\n", ERROR_BEGIN,
+ FormatMessage(message, filename, line,
+ function).c_str(), ERROR_END);
+ } else {
+ fprintf(stdout, "%s%s%s\n", ERROR_BEGIN,
+ FormatMessage(message, filename, line,
+ function).c_str(), ERROR_END);
+ }
}
}
const char *function)
{
if (m_showPedantic) {
- fprintf(stdout, "%s%s%s\n", PEDANTIC_BEGIN,
- FormatMessage(message, filename, line,
- function).c_str(), PEDANTIC_END);
+ if (m_printStdErr) {
+ fprintf(stderr, "%s%s%s\n", PEDANTIC_BEGIN,
+ FormatMessage(message, filename, line,
+ function).c_str(), PEDANTIC_END);
+ } else {
+ fprintf(stdout, "%s%s%s\n", PEDANTIC_BEGIN,
+ FormatMessage(message, filename, line,
+ function).c_str(), PEDANTIC_END);
+ }
}
}
}
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
SETTINGS_TYPE_ALWAYS_ASK,
SETTINGS_TYPE_OFF
};
-} // namespace WrtDB
struct WidgetSetting
{
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
+namespace AppControlPrefix {
+ const char* const PROCESS_PREFIX = "-__CONTROL_PROCESS__";
+}
+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
*/
inline const char* GetUserPreloadedWidgetPath()
{
- // temp
- // return "/usr/apps";
-
- return "/opt/usr/apps";
+ return "/usr/apps";
}
/**
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()
-#git:framework/web/wrt-commons wrt-commons 0.2.110
+#git:framework/web/wrt-commons wrt-commons 0.2.112
Name: wrt-commons
Summary: Wrt common library
-Version: 0.2.110
+Version: 0.2.112
Release: 1
Group: Development/Libraries
License: Apache License, Version 2.0