{
acc->serialize(writer);
}
+
+ if (!this->privileges.isEmpty()) {
+ this->privileges.serialize(writer);
+ }
}
endElement(writer);
}
}
endElement(writer);
}
+
+void Privilege::serialize(xmlTextWriterPtr writer)
+{
+ startElement(writer, "privileges");
+ {
+ FOREACH(it, this->name)
+ {
+ startElement(writer, "privilege");
+ writeText(writer, *it);
+ endElement(writer);
+ }
+ }
+ endElement(writer);
+}
} //namespace Jobs
} //namespace WidgetInstall
AccountProviderType provider;
};
+class Privilege
+{
+ public:
+ Privilege() {}
+ void addPrivilegeName(const DPL::String &x)
+ {
+ this->name.push_back(x);
+ }
+ bool isEmpty()
+ {
+ return this->name.empty();
+ }
+
+ void serialize(xmlTextWriterPtr writer);
+
+ private:
+ std::list<DPL::String> name;
+};
+
+typedef Privilege PrivilegeType;
+
/**
* @brief ime-application element
*/
this->account.push_back(x);
}
+ void addPrivileges(const PrivilegeType &x)
+ {
+ this->privileges = x;
+ }
+
void setInstallLocation(const InstallLocationType &x)
{
this->installLocation = x;
PackageType type;
NmtokenType version;
std::list<Account> account;
+ PrivilegeType privileges;
+
};
} //namespace Jobs
} //namespace WidgetInstall
setAppCategory(uiApp);
setLiveBoxInfo(manifest);
setAccount(manifest);
+ setPrivilege(manifest);
manifest.addUiApplication(uiApp);
manifest.generate(path);
manifest.addAccount(accountInfo);
}
+void TaskManifestFile::setPrivilege(Manifest& manifest)
+{
+ WrtDB::ConfigParserData::PrivilegeList privileges =
+ m_context.widgetConfig.configInfo.privilegeList;
+
+ PrivilegeType privilege;
+
+ FOREACH(it, privileges)
+ {
+ privilege.addPrivilegeName(it->name);
+ }
+
+ manifest.addPrivileges(privilege);
+}
+
} //namespace WidgetInstall
} //namespace Jobs
void setAppCategory(UiApplication & uiApp);
void setLiveBoxInfo(Manifest& manifest);
void setAccount(Manifest& uiApp);
+ void setPrivilege(Manifest& manifest);
void generateWidgetName(Manifest & manifest,
UiApplication &uiApp,