-#git:framework/web/wrt-plugins-common wrt-plugins-common_0.3.82
+#git:framework/web/wrt-plugins-common wrt-plugins-common_0.3.83
Name: wrt-plugins-common
Summary: wrt-plugins common library
-Version: 0.3.82
+Version: 0.3.83
Release: 1
Group: Development/Libraries
License: Apache License, Version 2.0
bool JSPageSession::Impl::installPlugin(PluginModelPtr plugin)
{
Assert(plugin && "Plugin Model is NULL");
- auto library = loadLibrary(plugin);
-
- LogInfo("Install Plugin '" << library->GetFileName());
+ PluginPtr library = loadLibrary(plugin);
if (!library) {
LogError("Loading library failed");
return false;
}
+ LogInfo("Install Plugin '" << library->GetFileName());
+
// Register new class
FOREACH(it, *(library->GetClassList()))
{
JSGlobalContextRef context)
{
Assert(plugin && "Plugin Model is NULL");
- auto library = loadLibrary(plugin);
-
- LogInfo("Install Plugin '" << library->GetFileName());
+ PluginPtr library = loadLibrary(plugin);
if (!library) {
LogError("Loading library failed");
return false;
}
+ LogInfo("Install Plugin '" << library->GetFileName());
+
if (!(parentObject.instance)) {
LogError("NULL pointer value");
return false;
typedef std::map<JSContextRef, JSPageSessionPtr> PagesSessionsSet;
PagesSessionsSet m_sessions;
+ unsigned int m_windowHandle;
public:
Impl();
CustomEventType eventType,
void* data);
+ unsigned int windowHandle() const;
+ void setWindowHandle(unsigned int handle);
+
static bool s_sanityCheck;
};
return; \
}
-PluginLogic::Impl::Impl()
+PluginLogic::Impl::Impl() :
+ m_windowHandle(0)
{
s_sanityCheck = true;
m_impl->unloadFrame(context);
}
+unsigned int PluginLogic::windowHandle() const
+{
+ return m_impl->windowHandle();
+}
+
+void PluginLogic::setWindowHandle(unsigned int handle)
+{
+ m_impl->setWindowHandle(handle);
+}
+
PluginLogic::PluginLogic() : m_impl(new PluginLogic::Impl())
{}
sessionIt->second->dispatchJavaScriptEvent(eventType, data);
}
+
+unsigned int PluginLogic::Impl::windowHandle() const
+{
+ PLUGIN_LOGIC_SANITY_CHECK
+ return m_windowHandle;
+}
+
+void PluginLogic::Impl::setWindowHandle(unsigned int handle)
+{
+ PLUGIN_LOGIC_SANITY_CHECK
+ LogDebug("XWindow handle " << handle);
+ m_windowHandle = handle;
+}
CustomEventType eventType,
void* data);
+ unsigned int windowHandle() const;
+ void setWindowHandle(unsigned int handle);
+
private:
PluginLogic();
~PluginLogic();
void InfoPopup::responseCallback(const Renderer::AnswerCallbackData &answer)
{
DPL::BinaryQueue retValue;
+ PopupSerializer::appendArg(true, retValue);
PopupSerializer::appendArg(answer.buttonAnswer, retValue);
m_parent->response(retValue);
}
{
bool result = (POPUP_YES_VALUE == answer.buttonAnswer);
DPL::BinaryQueue retValue;
+ PopupSerializer::appendArg(true, retValue);
PopupSerializer::appendArg(result, retValue);
LogDebug("Check state: " << answer.chackState);
PopupSerializer::appendArg(answer.chackState, retValue);
{
bool result = (POPUP_YES_VALUE == answer.buttonAnswer);
DPL::BinaryQueue retValue;
+ PopupSerializer::appendArg(true, retValue);
PopupSerializer::appendArg(result, retValue);
m_parent->response(retValue);
}
//Result from popup application is available. Read it.
DPL::BinaryQueueAutoPtr resultData =
m_input.Read(std::numeric_limits<std::size_t>::max());
- const int result = PopupSerializer::getIntArg(*resultData);
+ const int success = PopupSerializer::getIntArg(*resultData);
+ bool retVal = false;
+ if (success) {
+ const int result = PopupSerializer::getIntArg(*resultData);
- LogDebug("Popup result is: " << result);
+ LogDebug("Popup result is: " << result);
- Assert(resultData->Empty());
+ Assert(resultData->Empty());
+ retVal = (!!result);
+ } else {
+ LogWarning("Failed to show popup.");
+ }
tmp.Close();
m_input.Close();
m_output.Close();
- return (!!result);
+ return retVal;
}
Catch(DPL::Exception)
{
m_output.Write(data, data.Size());
executePopup();
-
+ DPL::BinaryQueueAutoPtr resultData =
+ m_input.Read(std::numeric_limits<std::size_t>::max());
+ const int success = PopupSerializer::getIntArg(*resultData);
+ if (!success) {
+ LogWarning("Failed to show popup.");
+ }
//ignore result
tmp.Close();
//Result from popup application is available. Read it.
DPL::BinaryQueueAutoPtr resultData =
m_input.Read(std::numeric_limits<std::size_t>::max());
- const int result = PopupSerializer::getIntArg(*resultData);
- const int rememberResult = PopupSerializer::getIntArg(*resultData);
-
- LogDebug(
- "Popup result is: " << result << " remeber: " << rememberResult);
-
- Assert(resultData->Empty());
- tmp.Close();
- m_input.Close();
- m_output.Close();
-
- if (1 == result) {
- if (rememberResult == 1) {
- return YES_DO_REMEMBER;
+ const int success = PopupSerializer::getIntArg(*resultData);
+ if (success) {
+ const int result = PopupSerializer::getIntArg(*resultData);
+ const int rememberResult = PopupSerializer::getIntArg(*resultData);
+
+ LogDebug(
+ "Popup result is: " << result << " remeber: " << rememberResult);
+
+ Assert(resultData->Empty());
+ tmp.Close();
+ m_input.Close();
+ m_output.Close();
+
+ if (1 == result) {
+ if (rememberResult == 1) {
+ return YES_DO_REMEMBER;
+ } else {
+ return YES_DONT_REMEMBER;
+ }
} else {
- return YES_DONT_REMEMBER;
+ if (rememberResult == 1) {
+ return NO_DO_REMEMBER;
+ } else {
+ return NO_DONT_REMEMBER;
+ }
}
} else {
- if (rememberResult == 1) {
- return NO_DO_REMEMBER;
- } else {
- return NO_DONT_REMEMBER;
- }
+ LogWarning("Popup failed to execute.");
+ tmp.Close();
+ m_input.Close();
+ m_output.Close();
+ return NO_DONT_REMEMBER;
}
}
Catch(DPL::Exception)
pid_t pid = fork();
if (pid == -1) {
//error occured
- LogError("Cannot display popup!");
+ LogError("Failed to create popup process.");
Assert(false);
}
if (pid == 0) {
NULL);
if (ret == -1) {
//execl returns -1 on error
- LogError("Cannot display popup!");
+ LogError("Failed to set popup binary");
+ //write something to pipe to unblock caller process
+ DPL::NamedOutputPipe errOut;
+ errOut.Open(m_inputName);
+ DPL::BinaryQueue data;
+ PopupSerializer::appendArg(false, data);
+ errOut.Write(data, data.Size());
+ errOut.Close();
+
Assert(false);
}
}
INS_ALL_WIDGET_LOC_STARTFILE="insert into WidgetLocalizedStartFile(app_id, start_file_id, widget_locale, type, encoding)"
INS_ALL_WIDGET_DEFPREF="insert into WidgetDefaultPreference(app_id, key_name, key_value, readonly)"
INS_ALL_WIDGET_PREF="insert into WidgetPreference(tizen_appid, key_name, key_value, readonly)"
- INS_ALL_WIDGET_FEATURE="insert into WidgetFeature(widget_feature_id, app_id, name, required, rejected)"
- INS_ALL_WIDGET_FEATURE_PARAM="insert into FeatureParam(widget_feature_id, name, value)"
+ INS_ALL_WIDGET_FEATURE="insert into WidgetFeature(widget_feature_id, app_id, name, rejected)"
INS_ALL_WIDGET_WINMODES="insert into WidgetWindowModes(app_id, window_mode)"
INS_ALL_WIDGET_WARP="insert into WidgetWARPInfo(app_id, iri, subdomain_access)"
INS_ALL_WIDGET_CERT="insert into WidgetCertificateFingerprint(app_id, owner, chainid, type, md5_fingerprint, sha1_fingerprint, common_name)"
sqlite3 $WRT_DB "insert into LocalizedWidgetInfo(app_id, widget_locale) VALUES(2003, 'en')";
#Widget features
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(1,2000, 'first_2000', 1, 0)";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(2,2000, 'second_2000', 1, 0)";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(3,2000, 'third_2000', 0, 0)";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(8,2000, 'fourth_2000', 1, 0)";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(9,2000, 'fifth_2000', 0, 0)";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(4,2001, 'first_2001', 1, 0)";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(5,2001, 'second_2001', 1, 0)";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(6,2001, 'third_2001', 0, 0)";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(7,2001, 'fourth_2001', 1, 0)";
-
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE_PARAM} VALUES(1, 'first_2000_first', 'firstValue1')";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE_PARAM} VALUES(1, 'first_2000_second', 'firstValue2')";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE_PARAM} VALUES(1, 'first_2000_third', 'firstValue3')";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE_PARAM} VALUES(1, 'first_2000_fourth', 'firstValue4')";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE_PARAM} VALUES(2, 'second_2000', 'secondValue1')";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE_PARAM} VALUES(3, 'third_2000', 'thirdValue1')";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE_PARAM} VALUES(4, 'first_2001', 'firstValue_2001')";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE_PARAM} VALUES(5, 'second_2001', 'secondValue_2001')";
- sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE_PARAM} VALUES(6, 'third_2001', 'thirdValue_2001')";
+ sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(1,2000, 'first_2000', 0)";
+ sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(2,2000, 'second_2000', 0)";
+ sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(3,2000, 'third_2000', 0)";
+ sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(8,2000, 'fourth_2000', 0)";
+ sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(9,2000, 'fifth_2000', 0)";
+ sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(4,2001, 'first_2001', 0)";
+ sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(5,2001, 'second_2001', 0)";
+ sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(6,2001, 'third_2001', 0)";
+ sqlite3 $WRT_DB "${INS_ALL_WIDGET_FEATURE} VALUES(7,2001, 'fourth_2001', 0)";
sqlite3 $WRT_DB "${INS_ALL_WIDGET_ICONS} VALUES(2000, 'icon_src_2000', 50, 50)";
sqlite3 $WRT_DB "insert into WidgetIcon(app_id, icon_src) VALUES(2002, 'icon_src_2002')";