-#git:framework/web/wrt wrt_0.8.184
+#git:framework/web/wrt wrt_0.8.185
Name: wrt
Summary: web runtime
-Version: 0.8.184
+Version: 0.8.185
Release: 1
Group: Development/Libraries
License: Apache License, Version 2.0
RunnableWidgetObjectPtr getRunnableWidgetObject(
const std::string& tizenId,
DPL::Optional<unsigned> serviceIndex)
- {
- try {
- RunnableWidgetObjectPtr runnable;
- WidgetModelPtr model =
- Domain::deserializeWidgetModel(tizenId, serviceIndex);
- if (!!model) {
- runnable.reset(new RunnableWidgetObject(model));
- }
- return runnable;
- } catch (WrtDB::WidgetDAOReadOnly::Exception::WidgetNotExist) {
- LogDebug("Widget not found.");
- return RunnableWidgetObjectPtr();
- }
- }
#else
RunnableWidgetObjectPtr getRunnableWidgetObject(
const std::string& tizenId)
+#endif
{
try {
RunnableWidgetObjectPtr runnable;
WidgetModelPtr model =
+#ifdef MULTIPROCESS_SERVICE_SUPPORT
+ Domain::deserializeWidgetModel(tizenId, serviceIndex);
+#else
Domain::deserializeWidgetModel(tizenId);
+#endif
if (!!model) {
runnable.reset(new RunnableWidgetObject(model));
}
return RunnableWidgetObjectPtr();
}
}
-#endif
CoreModule::NetworkAccessMode homeNetworkAccess()
{
RunnableWidgetObjectPtr CoreModule::getRunnableWidgetObject(
const std::string& tizenId,
DPL::Optional<unsigned> serviceIndex)
-{
- return m_impl->getRunnableWidgetObject(tizenId, serviceIndex);
-}
#else
RunnableWidgetObjectPtr CoreModule::getRunnableWidgetObject(
const std::string& tizenId)
+#endif
{
+#ifdef MULTIPROCESS_SERVICE_SUPPORT
+ return m_impl->getRunnableWidgetObject(tizenId, serviceIndex);
+#else
return m_impl->getRunnableWidgetObject(tizenId);
-}
#endif
+}
CoreModule::NetworkAccessMode CoreModule::homeNetworkAccess()
{
m_ewkContext,
EWK_EXTENSIBLE_API_MEDIA_STREAM_RECORD,
EINA_TRUE);
+ ewk_context_tizen_extensible_api_set(
+ m_ewkContext,
+ EWK_EXTENSIBLE_API_ROTATE_CAMERA_VIEW,
+ EINA_FALSE);
+
setAutoFullscreenMode();
setBackgroundSupport();
#ifdef MULTIPROCESS_SERVICE_SUPPORT
std::shared_ptr<WidgetModel> deserializeWidgetModel(const std::string& tizenId,
DPL::Optional<unsigned> serviceIndex)
-{
- std::shared_ptr<WidgetModel> model;
- DPL::String dplTizenId(DPL::FromUTF8String(tizenId));
- if (WrtDB::WidgetDAOReadOnly::isWidgetInstalled(dplTizenId)) {
- LogDebug("Widget installed - creating model");
- model.reset(new WidgetModel(tizenId));
- model->AppServiceIndex.Set(serviceIndex);
-
- WrtDB::WidgetDAOReadOnly dao(dplTizenId);
- DPL::Optional<DPL::String> defloc = model->defaultlocale.Get();
- if (!defloc.IsNull()) {
- LanguageTagsProviderSingleton::Instance().addWidgetDefaultLocales(
- *defloc);
- }
-
- WrtDB::WidgetAccessInfoList widgetAccessInfoList;
- // widgetAccessInfoList is output parameter
- dao.getWidgetAccessInfo(widgetAccessInfoList);
- model->AccessList.Set(widgetAccessInfoList);
-
- // Widget application service information data
- WidgetApplicationServiceList widgetApplicationServiceList;
- // widgetApplicationServiceList is output parameter
- dao.getAppServiceList(widgetApplicationServiceList);
- model->AppServiceList.Set(widgetApplicationServiceList);
-
- // Set Widget Settings
- WidgetSettings widgetSettings;
- dao.getWidgetSettings(widgetSettings);
- model->SettingList.Set(widgetSettings);
- } else {
- LogError("Widget is not installed - model not created");
- }
- return model;
-}
#else
std::shared_ptr<WidgetModel> deserializeWidgetModel(const std::string& tizenId)
+#endif
{
std::shared_ptr<WidgetModel> model;
DPL::String dplTizenId(DPL::FromUTF8String(tizenId));
if (WrtDB::WidgetDAOReadOnly::isWidgetInstalled(dplTizenId)) {
LogDebug("Widget installed - creating model");
model.reset(new WidgetModel(tizenId));
+#ifdef MULTIPROCESS_SERVICE_SUPPORT
+ model->AppServiceIndex.Set(serviceIndex);
+#endif
WrtDB::WidgetDAOReadOnly dao(dplTizenId);
DPL::Optional<DPL::String> defloc = model->defaultlocale.Get();
}
return model;
}
-#endif
+
} //Namespace Domain
/**
* @brief Creates widget model associated with selected
* @param[in] tizenId
+ * @param[in] service index, NULL for widget content
* @retval WidgetModel
*/
#ifdef MULTIPROCESS_SERVICE_SUPPORT
std::shared_ptr<WidgetModel> deserializeWidgetModel(const std::string& tizenId,
- DPL::Optional<unsigned> serviceIndex);
+ DPL::Optional<unsigned> serviceIndex);
#else
std::shared_ptr<WidgetModel> deserializeWidgetModel(const std::string& tizenId);
#endif
{
notification_h noti = NULL;
noti = notification_create(NOTIFICATION_TYPE_NOTI);
- notification_set_layout(noti, NOTIFICATION_LY_ONGOING_EVENT);
+
+ if (notification_set_layout(noti, NOTIFICATION_LY_ONGOING_EVENT) != NOTIFICATION_ERROR_NONE) {
+ return -1;
+ }
+
notification_set_text(noti,
NOTIFICATION_TEXT_TYPE_TITLE,
fileName.c_str(),
bundle *b = bundle_create();
if (!b) {
+ notification_free(noti);
return -1;
}
if (appsvc_set_operation(b, APPSVC_OPERATION_VIEW) != APPSVC_RET_OK) {
bundle_free(b);
+ notification_free(noti);
return -1;
}
if (appsvc_set_uri(b, filePath.c_str()) != APPSVC_RET_OK) {
bundle_free(b);
+ notification_free(noti);
return -1;
}
notification_set_execute_option(noti,
b);
int privId;
- notification_insert(noti, &privId);
+ if (notification_insert(noti, &privId) != NOTIFICATION_ERROR_NONE) {
+ return -1;
+ }
notification_free(noti);
+ bundle_free(b);
return privId;
}
ByteBuffer pBuf;
pBuf.Construct(inBufSize);
const byte *pByte = reinterpret_cast<const byte*>(inBuffer);
- pBuf.SetArray(pByte, 0, inBufSize);
+
+ if (pBuf.SetArray(pByte, 0, inBufSize) != E_SUCCESS) {
+ LogDebug("Couldnot set pBuf");
+ return NULL;
+ }
+
pBuf.Flip();
- ByteBuffer *getBuffer = pInstance->_TrustZoneService::DecryptN(*appInfo, pBuf);
- return getBuffer;
+ return pInstance->_TrustZoneService::DecryptN(*appInfo, pBuf);
}
}
const byte *b_pkgid = reinterpret_cast<const byte*>(pkgid.c_str());
ByteBuffer appInfo;
appInfo.Construct(pkgid.length());
- appInfo.SetArray(b_pkgid, 0, pkgid.length());
+ if (appInfo.SetArray(b_pkgid, 0, pkgid.length()) != E_SUCCESS) {
+ LogDebug("Couldnot set appInfo");
+ return std::string();
+ }
appInfo.Flip();
int writeCount = 0;
if (!m_currentEwkView) {
LogWarning("Cannot suspend widget without view");
} else {
+ setEwkViewInvisible(m_currentEwkView);
if (!m_isBackgroundSupport) {
- setEwkViewInvisible(m_currentEwkView);
suspendWebkit(m_currentEwkView);
}
}
Assert(m_model);
if (m_currentEwkView) {
+ setEwkViewVisible(m_currentEwkView);
if (!m_isBackgroundSupport) {
- setEwkViewVisible(m_currentEwkView);
resumeWebkit(m_currentEwkView);
}
}
m_widget = WRT::CoreModuleSingleton::Instance()
.getRunnableWidgetObject(m_tizenId, m_serviceIndex);
#else
-m_widget = WRT::CoreModuleSingleton::Instance()
+ m_widget = WRT::CoreModuleSingleton::Instance()
.getRunnableWidgetObject(m_tizenId);
#endif
ADD_PROFILING_POINT("getRunnableWidgetObject", "stop");
fprintf(stream, "Usage : %s [ ... ]\n", program);
fprintf(
stream,
- " -h --help Display this usage information.\n"
- " -l --list Display installed widgets list\n"
- " -s [GUID]or[PkgName] --start Launch widget with package name or GUID\n"
- " -k [GUID]or[PkgName] --kill Kill widget with package name or GUID\n"
- " -r [GUID]or[PkgName] --is-running Check whether widget is running by package name or GUID,\n"
- " If widget is running, 0(zero) will be returned.\n"
- " -d --debug Activate debug mode\n"
- " -t [second] --timeout Set timeout of response from widget in debug mode\n"
- " -v [1]or[0] --developer-mode Set developermode\n"
- " -c [1]or[0] --compliance-mode Set compliancemode\n"
- " -i [imei] --fake-imei Set fakeimei\n"
- " -m [meid] --fake-meid Set fakemeid\n"
+ " -h --help Display this usage information.\n"
+ " -l --list Display installed widgets list\n"
+ " -s [tizen application ID] --start Launch widget with tizen application ID\n"
+ " -k [tizen application ID] --kill Kill widget with tizen application ID\n"
+ " -r [tizen application ID] --is-running Check whether widget is running by tizen application ID,\n"
+ " If widget is running, 0(zero) will be returned.\n"
+ " -d --debug Activate debug mode\n"
+ " -t [second] --timeout Set timeout of response from widget in debug mode\n"
+ " -v [1]or[0] --developer-mode Set developermode\n"
+ " -c [1]or[0] --compliance-mode Set compliancemode\n"
+ " -i [imei] --fake-imei Set fakeimei\n"
+ " -m [meid] --fake-meid Set fakemeid\n"
" if you emit this option, 5 seconds is set in debug mode\n"
);
}
{
int next_opt, opt_idx = 0;
int timeout = TIMEOUT_DEFAULT;
- char pkgname[256] = "";
+ char applicationId[256] = "";
char temp_arg[256] = "";
char pid[6] = "";
char op = '\0';
WidgetDAOReadOnlyList widgetList =
WrtDB::WidgetDAOReadOnly::getWidgetList();
FOREACH(dao, widgetList) {
- WrtDB::WidgetGUID d_guid = (*dao)->getGUID();
- WrtDB::WidgetPkgName d_pkgname = (*dao)->getPkgName();
- if (!d_guid.IsNull() &&
- !strcmp(DPL::ToUTF8String(*d_guid).c_str(), temp_arg))
- {
- WrtDB::WidgetPkgName package_name = (*dao)->getPkgName();
- temp = DPL::ToUTF8String(package_name);
- break;
- }
- if (!strcmp(DPL::ToUTF8String(d_pkgname).c_str(),
+ WrtDB::TizenAppId tizenAppId = (*dao)->getTzAppId();
+ if (!strcmp(DPL::ToUTF8String(tizenAppId).c_str(),
normal_arg.c_str()))
{
- WrtDB::WidgetPkgName package_name = (*dao)->getPkgName();
- temp = DPL::ToUTF8String(package_name);
+ temp = DPL::ToUTF8String(tizenAppId);
break;
}
}
-
if (!temp.empty()) {
- strncpy(pkgname, temp.c_str(), strlen(temp.c_str()));
+ strncpy(applicationId, temp.c_str(), strlen(temp.c_str()));
} else {
printf("result: %s\n", "failed");
return -1;
}
}
- if (strlen(pkgname) > 0) {
+ if (strlen(applicationId) > 0) {
// do setuid to '5000' uid to communicate
//with webapp using RT signal.
gid_t group_list[1];
}
// set package
- ret = service_set_package(serviceHandle, pkgname);
+ ret = service_set_package(serviceHandle, applicationId);
if (SERVICE_ERROR_NONE != ret) {
printf("result: %s\n", "failed");
service_destroy(serviceHandle);
bool isRunning = false;
//checks whether the application is running
- ret = app_manager_is_running(pkgname, &isRunning);
+ ret = app_manager_is_running(applicationId, &isRunning);
if (APP_MANAGER_ERROR_NONE != ret) {
printf("result: %s\n", "failed");
return -1;
// get app_context for running application
// app_context must be released with app_context_destroy
app_context_h appCtx = NULL;
- ret = app_manager_get_app_context(pkgname, &appCtx);
+ ret = app_manager_get_app_context(applicationId, &appCtx);
if (APP_MANAGER_ERROR_NONE != ret) {
printf("result: %s\n", "failed");
return -1;
}
} else if (op == 'r') {
bool isRunning = false;
-
- ret = app_manager_is_running(pkgname, &isRunning);
+ ret = app_manager_is_running(applicationId, &isRunning);
if (APP_MANAGER_ERROR_NONE != ret) {
printf("result: %s\n", "failed");
app_info_from_db * menu_info, int cmd)
{
// warning: unused parameter
- caller_pid = caller_pid;
+ (void) caller_pid;
bundle_del(kb, AUL_K_PKG_NAME);
bundle_del(kb, AUL_K_EXEC);
exit(-1);
}
- __modify_bundle(kb, cr.pid, menu_info, pkt->cmd);
+ __modify_bundle(kb, /*cr.pid - unused parameter*/ 0, menu_info, pkt->cmd);
pkg_name = _get_pkgname(menu_info);
_D("pkg name : %s", pkg_name);
bundle_free(kb);
}
#endif
-
- free(menu_info);
- free(kb);
}
#endif // __LAUNCHPAD_UTIL_H_
if ((pfds[DUMMY_PROCESS].revents & (POLLHUP|POLLNVAL)) != 0)
{
_D("pfds[DUMMY_PROCESS].revents & (POLLHUP|POLLNVAL) (pid:%d)", dummy_process_pid);
- close(pfds[DUMMY_PROCESS].fd);
+
+ if (pfds[DUMMY_PROCESS].fd > -1)
+ {
+ close(pfds[DUMMY_PROCESS].fd);
+ }
dummy_process_pid = DUMMY_NONE;
dummy_process_fd = -1;
{
_E("accept error!");
- return;
+ goto err__refuse_dummy_process;;
}
close(client_fd);
void RunnableObjectStateTester::runTest(RunnableObjectStateTester::Test func)
{
+#ifdef MULTIPROCESS_SERVICE_SUPPORT
m_widget = WRT::CoreModuleSingleton::Instance().getRunnableWidgetObject(m_handle, DPL::Optional<unsigned>());
-
+#else
+ m_widget = WRT::CoreModuleSingleton::Instance().getRunnableWidgetObject(m_handle);
+#endif
//as we know we uses specific implementation
WRT::RunnableWidgetObject * m_widget_impl = dynamic_cast<WRT::RunnableWidgetObject*>(m_widget.get());
Assert(m_widget_impl);