{
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
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
*/
{
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;
{
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->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