summaryrefslogtreecommitdiff
path: root/src/kolabconversions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kolabconversions.h')
-rw-r--r--src/kolabconversions.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/kolabconversions.h b/src/kolabconversions.h
index 158ee2b..cfd0e7b 100644
--- a/src/kolabconversions.h
+++ b/src/kolabconversions.h
@@ -127,7 +127,7 @@ std::vector<CategoryColor> readColors(const KolabXSD::Configuration::categorycol
return colors;
}
-KolabXSD::Configuration::type_type getConfiguratinoType(Kolab::Configuration::ConfigurationType t)
+KolabXSD::Configuration::type_type getConfigurationType(Kolab::Configuration::ConfigurationType t)
{
switch (t) {
case Kolab::Configuration::TypeDictionary:
@@ -136,8 +136,8 @@ KolabXSD::Configuration::type_type getConfiguratinoType(Kolab::Configuration::Co
return KolabXSD::Configuration::type_type::categorycolor;
case Kolab::Configuration::TypeSnippet:
return KolabXSD::Configuration::type_type::snippets;
- case Kolab::Configuration::TypeTag:
- return KolabXSD::Configuration::type_type::tag;
+ case Kolab::Configuration::TypeRelation:
+ return KolabXSD::Configuration::type_type::relation;
default:
CRITICAL("Invalid configuration type");
}
@@ -168,7 +168,7 @@ std::string serializeObject <Kolab::Configuration> (const Kolab::Configuration &
// WARNING("missing last_modification_date, fallback to current timestamp");
lastModificationDate = fromDateTime(timestamp());
}
- KolabXSD::Configuration n(uid, getProductId(prod), created, lastModificationDate, getConfiguratinoType(configuration.type()));
+ KolabXSD::Configuration n(uid, getProductId(prod), created, lastModificationDate, getConfigurationType(configuration.type()));
switch (configuration.type()) {
case Kolab::Configuration::TypeDictionary: {
@@ -198,25 +198,25 @@ std::string serializeObject <Kolab::Configuration> (const Kolab::Configuration &
}
}
break;
- case Kolab::Configuration::TypeTag: {
- const Kolab::Tag &tag = configuration.tag();
- n.name(tag.name());
- if (!tag.type().empty()) {
- n.tagType(tag.type());
+ case Kolab::Configuration::TypeRelation: {
+ const Kolab::Relation &relation = configuration.relation();
+ n.name(relation.name());
+ if (!relation.type().empty()) {
+ n.relationType(relation.type());
}
- if (!tag.color().empty()) {
- n.color(tag.color());
+ if (!relation.color().empty()) {
+ n.color(relation.color());
}
- if (!tag.iconName().empty()) {
- n.iconName(tag.iconName());
+ if (!relation.iconName().empty()) {
+ n.iconName(relation.iconName());
}
- if (!tag.parent().empty()) {
- n.parent(tag.parent());
+ if (!relation.parent().empty()) {
+ n.parent(relation.parent());
}
- if (!tag.priority() != 0) {
- n.priority(fromInt<KolabXSD::Configuration::priority_type>(tag.priority()));
+ if (!relation.priority() != 0) {
+ n.priority(fromInt<KolabXSD::Configuration::priority_type>(relation.priority()));
}
- BOOST_FOREACH(const std::string &s, tag.members()) {
+ BOOST_FOREACH(const std::string &s, relation.members()) {
n.member().push_back(s);
}
}
@@ -547,31 +547,31 @@ boost::shared_ptr<Kolab::Configuration> deserializeObject <Kolab::Configuration>
collection.setSnippets(snippets);
n = boost::shared_ptr<Kolab::Configuration>(new Kolab::Configuration(collection));
- } else if (configuration->type() == KolabXSD::ConfigurationType::tag) {
+ } else if (configuration->type() == KolabXSD::ConfigurationType::relation) {
std::string name;
if (configuration->name()) {
name = *configuration->name();
}
std::string type;
- if (configuration->tagType()) {
- type = *configuration->tagType();
+ if (configuration->relationType()) {
+ type = *configuration->relationType();
}
- Tag tag(name, type);
+ Relation relation(name, type);
if (configuration->color()) {
- tag.setColor(*configuration->color());
+ relation.setColor(*configuration->color());
}
if (configuration->iconName()) {
- tag.setIconName(*configuration->iconName());
+ relation.setIconName(*configuration->iconName());
}
if (configuration->parent()) {
- tag.setParent(*configuration->parent());
+ relation.setParent(*configuration->parent());
}
if (configuration->priority()) {
- tag.setPriority(convertToInt(*configuration->priority()));
+ relation.setPriority(convertToInt(*configuration->priority()));
}
- tag.setMembers(toStringList(configuration->member()));
+ relation.setMembers(toStringList(configuration->member()));
- n = boost::shared_ptr<Kolab::Configuration>(new Kolab::Configuration(tag));
+ n = boost::shared_ptr<Kolab::Configuration>(new Kolab::Configuration(relation));
} else {
CRITICAL("No valid configuration type");
}