<!-- Widget Configuration Document Extensions XSD For TIZEN -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tizen="http://tizen.org/ns/widgets" targetNamespace="http://tizen.org/ns/widgets" xmlns:widgets="http://www.w3.org/ns/widgets">
<xs:import namespace="http://www.w3.org/ns/widgets" schemaLocation="config.xsd"/>
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:simpleType name="appserviceOperationType">
<!--
<xs:restriction base="xs:token">
<xs:all>
<xs:element ref="tizen:box-label"/>
<xs:element ref="tizen:box-icon"/>
- <xs:element ref="tizen:box-content"/>
+ <!--xs:element ref="tizen:box-content"/-->
</xs:all>
<xs:attribute name="id" type="tizen:appWidgetIdType" use="required"/>
<xs:attribute name="primary" type="widgets:data.boolean" use="required"/>
</xs:restriction>
</xs:simpleType>
+<xs:element name="account">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element ref="tizen:icon" />
+ <xs:element ref="tizen:display-name" />
+ <xs:element name="capability" type="xs:string"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="multiple-account-support" use="required" type="widgets:data.boolean"/>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="icon">
+ <xs:complexType>
+ <xs:attribute name="section" use="required" type="xs:string"/>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="display-name">
+ <xs:complexType mixed="true">
+ <xs:attribute ref="xml:lang"/>
+ </xs:complexType>
+</xs:element>
+
</xs:schema>
<xs:element ref="tizen:content" minOccurs="1" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>\r
<xs:element ref="tizen:app-widget" minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>\r
<xs:element ref="tizen:privilege" minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>\r
+ <xs:element ref="tizen:account" minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>\r
</xs:choice>\r
<xs:attribute ref="xml:lang"/>\r
<xs:attribute name="id" type="xs:anyURI"/>\r
+wrt-installer (0.1.16) unstable; urgency=low
+
+ * Fixed send signal pkgmgr to pkgid from appid
+ * Add Account parser and generate manifest
+ * Fixed signature path during installation hybridapp
+
+ -- Jihoon Chung <jihoon.chung@samsung.com> Thu, 21 Mar 2013 11:32:51 +0900
+
wrt-installer (0.1.15) unstable; urgency=low
* add getting detail information from widget file.
-#git:framework/web/wrt-installer wrt-installer 0.1.15
+#git:framework/web/wrt-installer wrt-installer 0.1.16
Name: wrt-installer
Summary: Installer for tizen Webruntime
-Version: 0.1.15
+Version: 0.1.16
Release: 1
Group: Development/Libraries
License: Apache License, Version 2.0
DPL::OptionalString m_policy;
};
+class AccountParser : public ElementParser
+{
+ public:
+ struct AccountProviderParser : public ElementParser
+ {
+ public:
+
+ struct IconParser : public ElementParser
+ {
+ public:
+ virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
+ const DPL::String& /*name*/)
+ {
+ return &IgnoringParser::Create;
+ }
+
+ virtual void Accept(const Text& text)
+ {
+ if (text.value == L"") {
+ return;
+ }
+ m_value = text.value;
+ }
+
+ virtual void Accept(const Element& /*element*/)
+ {}
+
+ virtual void Accept(const XmlAttribute& attribute)
+ {
+ if (attribute.name == L"section") {
+ if (attribute.value == L"account") {
+ m_type = ConfigParserData::IconSectionType::DefaultIcon;
+ } else if (attribute.value == L"account-small") {
+ m_type = ConfigParserData::IconSectionType::SmallIcon;
+ }
+ }
+ }
+
+ virtual void Verify()
+ {
+ if (m_value.IsNull() || *m_value == L"") {
+ return;
+ }
+
+ std::pair<ConfigParserData::IconSectionType, DPL::String> icon;
+ icon.first = m_type;
+ icon.second = *m_value;
+
+ m_data.m_iconSet.insert(icon);
+ }
+
+ IconParser(ConfigParserData::AccountProvider& data) :
+ ElementParser(),
+ m_properNamespace(false),
+ m_data(data),
+ m_type(ConfigParserData::DefaultIcon)
+ {}
+
+ private:
+ bool m_properNamespace;
+ ConfigParserData::IconSectionType m_type;
+ DPL::OptionalString m_value;
+ ConfigParserData::AccountProvider& m_data;
+ };
+
+ struct DisplayNameParser : public ElementParser
+ {
+ public:
+ virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
+ const DPL::String& /*name*/)
+ {
+ return &IgnoringParser::Create;
+ }
+
+ virtual void Accept(const Text& text)
+ {
+ if (text.value == L"") {
+ return;
+ }
+ m_value = text.value;
+ }
+
+ virtual void Accept(const Element& element)
+ {
+ m_lang = element.lang;
+ m_value= L"";
+ }
+
+ virtual void Accept(const XmlAttribute& /*attribute*/)
+ {}
+
+ virtual void Verify()
+ {
+ if (m_value.IsNull() || *m_value == L"") {
+ return;
+ }
+
+ std::pair<DPL::String, DPL::String> name;
+ name.first = *m_lang;
+ name.second = *m_value;
+
+ m_data.m_displayNameSet.insert(name);
+ }
+
+ DisplayNameParser(ConfigParserData::AccountProvider& data) :
+ ElementParser(),
+ m_properNamespace(false),
+ m_data(data)
+ {}
+
+ private:
+ bool m_properNamespace;
+ DPL::OptionalString m_lang;
+ DPL::OptionalString m_value;
+ ConfigParserData::AccountProvider& m_data;
+ };
+
+ struct CapabilityParser : public ElementParser
+ {
+ public:
+ virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
+ const DPL::String& /*name*/)
+ {
+ return &IgnoringParser::Create;
+ }
+
+ virtual void Accept(const Text& text)
+ {
+ if (text.value == L"") {
+ return;
+ }
+ m_value = text.value;
+ }
+
+ virtual void Accept(const Element& /*element*/)
+ {}
+
+ virtual void Accept(const XmlAttribute& /*attribute*/)
+ {}
+
+ virtual void Verify()
+ {
+ if (m_value.IsNull() || *m_value == L"") {
+ return;
+ }
+ m_data.m_capabilityList.push_back(*m_value);
+ }
+
+ CapabilityParser(ConfigParserData::AccountProvider& data) :
+ ElementParser(),
+ m_properNamespace(false),
+ m_data(data)
+ {}
+
+ private:
+ bool m_properNamespace;
+ DPL::OptionalString m_value;
+ ConfigParserData::AccountProvider& m_data;
+ };
+ virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
+ const DPL::String& name)
+ {
+ if (name == L"icon") {
+ return DPL::MakeDelegate(this, &AccountProviderParser::OnIconElement);
+ } else if (name == L"display-name") {
+ return DPL::MakeDelegate(this,
+ &AccountProviderParser::OnDisplayNameElement);
+ } else if (name == L"capability") {
+ return DPL::MakeDelegate(this, &AccountProviderParser::OnCapabilityElement);
+ } else {
+ return &IgnoringParser::Create;
+ }
+ }
+
+ virtual void Accept(const Text& text)
+ {}
+
+ virtual void Accept(const Element& /*element*/)
+ {}
+
+ virtual void Accept(const XmlAttribute& attribute)
+ {
+ if (attribute.name == L"multiple-accounts-support") {
+ if (attribute.value == L"") {
+ return;
+ }
+
+ if (attribute.value == L"ture") {
+ m_multiSupport = true;
+ }
+ }
+ }
+
+ virtual void Verify()
+ {
+ m_data.m_multiAccountSupport = m_multiSupport;
+ }
+
+ ElementParserPtr OnIconElement()
+ {
+ return ElementParserPtr(new IconParser(m_data));
+ }
+
+ ElementParserPtr OnDisplayNameElement()
+ {
+ return ElementParserPtr(new DisplayNameParser(m_data));
+ }
+
+ ElementParserPtr OnCapabilityElement()
+ {
+ return ElementParserPtr(new CapabilityParser(m_data));
+ }
+
+ AccountProviderParser(ConfigParserData::AccountProvider& data) :
+ ElementParser(),
+ m_properNamespace(false),
+ m_data(data),
+ m_multiSupport(false)
+ {}
+
+ private:
+ bool m_properNamespace;
+ bool m_multiSupport;
+ ConfigParserData::AccountProvider& m_data;
+ };
+
+ virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
+ const DPL::String& name)
+ {
+ if (name == L"account-provider") {
+ return DPL::MakeDelegate(this, &AccountParser::OnProviderElement);
+ } else {
+ return &IgnoringParser::Create;
+ }
+ }
+
+ virtual void Accept(const Element& element)
+ {
+ if (element.ns == ConfigurationNamespace::TizenWebAppNamespaceName) {
+ m_properNamespace = true;
+ }
+ }
+
+ virtual void Accept(const XmlAttribute& /*attribute*/)
+ {}
+
+ virtual void Accept(const Text& /*text*/)
+ {}
+
+ virtual void Verify()
+ {}
+
+ ElementParserPtr OnProviderElement()
+ {
+ return ElementParserPtr(new AccountProviderParser(m_account));
+ }
+
+ AccountParser(ConfigParserData& data) :
+ ElementParser(),
+ m_data(data),
+ m_account(data.accountProvider),
+ m_properNamespace(false)
+ {}
+
+ private:
+ ConfigParserData& m_data;
+ ConfigParserData::AccountProvider& m_account;
+ bool m_properNamespace;
+ bool m_multiSupport;
+};
+
ElementParser::ActionFunc WidgetParser::GetElementParser(
const DPL::String& /*ns*/,
const DPL::String&
&WidgetParser::
OnCspReportOnlyElement);
#endif
+ m_map[L"account"] = DPL::MakeDelegate(this, &WidgetParser::OnAccountElement);
}
ElementParserPtr WidgetParser::OnNameElement()
return ElementParserPtr(new CspReportOnlyParser(m_data));
}
+ElementParserPtr WidgetParser::OnAccountElement()
+{
+ return ElementParserPtr(new AccountParser(m_data));
+}
+
void WidgetParser::Accept(const Element& element)
{
if (element.ns != ConfigurationNamespace::W3CWidgetNamespaceName &&
ElementParserPtr OnAppWidgetElement();
ElementParserPtr OnCspElement();
ElementParserPtr OnCspReportOnlyElement();
+ ElementParserPtr OnAccountElement();
virtual ActionFunc GetElementParser(const DPL::String& ns,
const DPL::String& name);
getInstallerStruct().pkgmgrInterface->setPkgname(DPL::ToUTF8String(
m_installerContext.
widgetConfig.
- tzAppid));
+ tzPkgid));
LogInfo("Tizen App Id : " << m_installerContext.widgetConfig.tzAppid);
LogInfo("Tizen Pkg Id : " << m_installerContext.widgetConfig.tzPkgid);
LogInfo("W3C Widget GUID : " << m_installerContext.widgetConfig.guid);
FOREACH(l, this->livebox) {
l->serialize(writer);
}
+ FOREACH(acc, this->account)
+ {
+ acc->serialize(writer);
+ }
}
endElement(writer);
}
endElement(writer);
}
+
+void Account::serialize(xmlTextWriterPtr writer)
+{
+ startElement(writer, "account");
+ {
+ startElement(writer, "account-provider");
+ writeAttribute(writer, "app-id", this->provider.appid);
+ writeAttribute(writer, "multiple-accounts-support",
+ this->provider.multiAccount);
+
+ FOREACH(i, this->provider.icon)
+ {
+ startElement(writer, "icon");
+ writeAttribute(writer, "section", i->first);
+ writeText(writer, i->second);
+ endElement(writer);
+ }
+ FOREACH(n, this->provider.name)
+ {
+ writeElementWithOneAttribute(writer, "label",
+ n->getString(), "xml:lang",
+ n->getLang(), n->hasLang());
+ }
+ FOREACH(c, this->provider.capability)
+ {
+ startElement(writer, "capability");
+ writeText(writer, *c);
+ endElement(writer);
+ }
+ endElement(writer);
+ }
+ endElement(writer);
+}
} //namespace Jobs
} //namespace WidgetInstall
typedef AppControl AppControlType;
/**
+ * @brief account element
+ */
+typedef std::list<std::pair<DPL::String, DPL::String>> IconListType;
+typedef std::list<LabelType> DisplayNameListType;
+typedef std::list<DPL::String> AccountCapabilityType;
+
+struct AccountProvider
+{
+ NcnameType appid;
+ NcnameType multiAccount;
+ IconListType icon;
+ DisplayNameListType name;
+ AccountCapabilityType capability;
+};
+
+typedef AccountProvider AccountProviderType;
+
+class Account
+{
+ public:
+ Account() {}
+ void addAccountProvider(const AccountProvider &x)
+ {
+ this->provider = x;
+ }
+ void serialize(xmlTextWriterPtr writer);
+
+ private:
+ AccountProviderType provider;
+};
+
+/**
* @brief ime-application element
*/
class ImeApplication
this->livebox.push_back(x);
}
+ void addAccount(const Account &x)
+ {
+ this->account.push_back(x);
+ }
+
void setInstallLocation(const InstallLocationType &x)
{
this->installLocation = x;
NcnameType package;
PackageType type;
NmtokenType version;
+ std::list<Account> account;
};
} //namespace Jobs
} //namespace WidgetInstall
{
LogInfo("================ Step: <<Signature>> ENTER ===============");
- std::string widgetPath = m_contextData.locations->getTemporaryRootDir() +
+ std::string widgetPath = m_contextData.locations->getTemporaryPackageDir() +
"/";
SignatureFileInfoSet signatureFiles;
#include <dpl/log/log.h>
#include <dpl/assert.h>
#include <wrt-commons/security-origin-dao/security_origin_dao.h>
+#include <dpl/wrt-dao-ro/widget_dao_types.h>
#include <string>
#include <sstream>
#include <ace_api_install.h>
LogDebug("Create Security origin database");
// automatically create security origin database
using namespace SecurityOriginDB;
+ using namespace WrtDB;
+
SecurityOriginDAO dao(m_context.locations->getPkgId());
// Checking privilege list for setting security origin exception data
if (result != g_W3CPrivilegeTextMap.end()) {
if (result->second == FEATURE_USER_MEDIA) {
dao.setPrivilegeSecurityOriginData(result->second, false);
+ } else if (result->second == FEATURE_FULLSCREEN_MODE) {
+ continue;
} else {
dao.setPrivilegeSecurityOriginData(result->second);
}
setAppControlInfo(uiApp);
setAppCategory(uiApp);
setLiveBoxInfo(manifest);
+ setAccount(manifest);
manifest.addUiApplication(uiApp);
manifest.generate(path);
manifest.addLivebox(liveBox);
}
}
+
+void TaskManifestFile::setAccount(Manifest& manifest)
+{
+ WrtDB::ConfigParserData::AccountProvider account =
+ m_context.widgetConfig.configInfo.accountProvider;
+
+ AccountProviderType provider;
+
+ if (account.m_iconSet.empty()) {
+ LogInfo("Widget doesn't contain Account");
+ return;
+ }
+ if (account.m_multiAccountSupport) {
+ provider.multiAccount = L"ture";
+ } else {
+ provider.multiAccount = L"false";
+ }
+ provider.appid = m_context.widgetConfig.tzAppid;
+
+ FOREACH(it, account.m_iconSet) {
+ std::pair<DPL::String, DPL::String> icon;
+
+ if (it->first == ConfigParserData::IconSectionType::DefaultIcon) {
+ icon.first = L"account";
+ } else if (it->first == ConfigParserData::IconSectionType::SmallIcon) {
+ icon.first = L"account-small";
+ }
+ icon.second = it->second;
+
+ provider.icon.push_back(icon);
+ }
+
+ FOREACH(it, account.m_displayNameSet) {
+ provider.name.push_back(LabelType(it->second, it->first));
+ }
+
+ FOREACH(it, account.m_capabilityList) {
+ provider.capability.push_back(*it);
+ }
+
+ Account accountInfo;
+ accountInfo.addAccountProvider(provider);
+ manifest.addAccount(accountInfo);
+}
+
} //namespace WidgetInstall
} //namespace Jobs
void setAppControlInfo(UiApplication & uiApp);
void setAppCategory(UiApplication & uiApp);
void setLiveBoxInfo(Manifest& manifest);
+ void setAccount(Manifest& uiApp);
void generateWidgetName(Manifest & manifest,
UiApplication &uiApp,
AddTask(new TaskDeleteCertificates(m_context));
// send start signal of pkgmgr
- if (getInstallerStruct().pkgmgrInterface->setPkgname(m_context.tzAppid))
+ if (getInstallerStruct().pkgmgrInterface->setPkgname(m_context.tzPkgid))
{
getInstallerStruct().pkgmgrInterface->sendSignal(
PKGMGR_START_KEY,