{
return !this->lang.empty();
}
+ int operator==(const StringWithLang &other)
+ {
+ return (DPL::ToUTF8String(other.string) == DPL::ToUTF8String(string)) &&
+ (DPL::ToUTF8String(other.lang) == DPL::ToUTF8String(lang));
+ }
private:
DPL::String string;
typedef DPL::String OperationType, MimeType, UriType, TypeType, PackageType;
typedef DPL::OptionalString InstallLocationType, CategoriesType;
typedef DPL::String AppCategoryType;
+typedef DPL::String KeyType, ValueType;
/**
* xmllib2 wrappers
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;
+};
+
+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;
+
+class Metadata
+{
+ public:
+ Metadata(KeyType k, ValueType v) :
+ key(k),
+ value(v)
+ {}
+ void serialize(xmlTextWriterPtr writer);
+
+ private:
+ KeyType key;
+ ValueType value;
+};
+
+typedef Metadata MetadataType;
+
+
+/**
* @brief ime-application element
*/
class ImeApplication
{
this->appCategory.push_back(x);
}
+ void addMetadata(const MetadataType &m)
+ {
+ this->metadata.push_back(m);
+ }
void serialize(xmlTextWriterPtr writer);
private:
std::list<IconType> icon;
std::list<AppControlType> appControl;
std::list<AppCategoryType> appCategory;
+ std::list<MetadataType> metadata;
};
typedef UiApplication UiApplicationType;
{
NcnameType boxSrc;
NcnameType boxMouseEvent;
+ NcnameType boxTouchEffect;
boxSizeType boxSize;
NcnameType pdSrc;
NcnameType pdWidth;
{
this->primary = x;
}
- void setAutoLaunch(const NcnameType &x)
- {
- this->autoLaunch = x;
- }
void setUpdatePeriod(const NcnameType &x)
{
this->updatePeriod = x;
void addLabel(const LabelType &x)
{
+#ifdef MULTIPROCESS_SERVICE_SUPPORT
+ auto pos = std::find(label.begin(), label.end(), x);
+ if (pos == label.end()) {
+ this->label.push_back(x);
+ }
+#else
this->label.push_back(x);
+#endif
}
void addIcon(const IconType &x)
{
this->livebox.push_back(x);
}
+ void addAccount(const Account &x)
+ {
+ this->account.push_back(x);
+ }
+
+ void addPrivileges(const PrivilegeType &x)
+ {
+ this->privileges = x;
+ }
+
void setInstallLocation(const InstallLocationType &x)
{
this->installLocation = x;
NcnameType package;
PackageType type;
NmtokenType version;
+ std::list<Account> account;
+ PrivilegeType privileges;
+
};
} //namespace Jobs
} //namespace WidgetInstall