summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/FormPage.cpp14
-rw-r--r--Swiften/Elements/FormPage.h10
-rw-r--r--Swiften/Elements/FormSection.cpp8
-rw-r--r--Swiften/Elements/FormSection.h8
4 files changed, 17 insertions, 23 deletions
diff --git a/Swiften/Elements/FormPage.cpp b/Swiften/Elements/FormPage.cpp
index 1a9bd32..db7979f 100644
--- a/Swiften/Elements/FormPage.cpp
+++ b/Swiften/Elements/FormPage.cpp
@@ -7,7 +7,7 @@
namespace Swift {
-FormPage::FormPage() : xmlns_("http://jabber.org/protocol/xdata-layout") {
+FormPage::FormPage() {
}
FormPage::~FormPage() {
@@ -21,11 +21,7 @@ const std::string& FormPage::getLabel() const {
return label_;
}
-const std::string& FormPage::getXMLNS() const {
- return xmlns_;
-}
-
-void FormPage::addChildSection(boost::shared_ptr<FormSection>& section) {
+void FormPage::addChildSection(boost::shared_ptr<FormSection> section) {
childSections_.push_back(section);
}
@@ -33,7 +29,7 @@ const std::vector<boost::shared_ptr<FormSection> >& FormPage::getChildSections()
return childSections_;
}
-void FormPage::addTextElement(boost::shared_ptr<FormText>& textElement) {
+void FormPage::addTextElement(boost::shared_ptr<FormText> textElement) {
textElements_.push_back(textElement);
}
@@ -41,7 +37,7 @@ const std::vector<boost::shared_ptr<FormText> >& FormPage::getTextElements() con
return textElements_;
}
-void FormPage::addReportedRef(boost::shared_ptr<FormReportedRef>& reportedRef) {
+void FormPage::addReportedRef(boost::shared_ptr<FormReportedRef> reportedRef) {
reportedRefs_.push_back(reportedRef);
}
@@ -49,7 +45,7 @@ const std::vector<boost::shared_ptr<FormReportedRef> >& FormPage::getReportedRef
return reportedRefs_;
}
-void FormPage::addField(boost::shared_ptr<FormField>& field) {
+void FormPage::addField(boost::shared_ptr<FormField> field) {
fields_.push_back(field);
}
diff --git a/Swiften/Elements/FormPage.h b/Swiften/Elements/FormPage.h
index e5ecda2..0e66549 100644
--- a/Swiften/Elements/FormPage.h
+++ b/Swiften/Elements/FormPage.h
@@ -23,20 +23,18 @@ namespace Swift {
~FormPage();
void setLabel(const std::string& label);
const std::string& getLabel() const;
- const std::string& getXMLNS() const;
- void addChildSection(boost::shared_ptr<FormSection>& section);
+ void addChildSection(boost::shared_ptr<FormSection> section);
const std::vector<boost::shared_ptr<FormSection> >& getChildSections() const;
- void addTextElement(boost::shared_ptr<FormText>& textElement);
+ void addTextElement(boost::shared_ptr<FormText> textElement);
const std::vector<boost::shared_ptr<FormText> >& getTextElements() const;
- void addReportedRef(boost::shared_ptr<FormReportedRef>& reportedRef);
+ void addReportedRef(boost::shared_ptr<FormReportedRef> reportedRef);
const std::vector<boost::shared_ptr<FormReportedRef> >& getReportedRefs() const;
- void addField(boost::shared_ptr<FormField>& field);
+ void addField(boost::shared_ptr<FormField> field);
const std::vector<boost::shared_ptr<FormField> >& getFields() const;
void addFieldRef(std::string ref);
const std::vector<std::string> getFieldRefs() const;
private:
- std::string xmlns_;
std::string label_;
std::vector<boost::shared_ptr<FormText> > textElements_;
std::vector<boost::shared_ptr<FormSection> > childSections_;
diff --git a/Swiften/Elements/FormSection.cpp b/Swiften/Elements/FormSection.cpp
index 46005a0..7b254df 100644
--- a/Swiften/Elements/FormSection.cpp
+++ b/Swiften/Elements/FormSection.cpp
@@ -21,7 +21,7 @@ const std::string& FormSection::getLabel() const {
return label_;
}
-void FormSection::addTextElement(boost::shared_ptr<FormText>& textElement) {
+void FormSection::addTextElement(boost::shared_ptr<FormText> textElement) {
textElements_.push_back(textElement);
}
@@ -29,7 +29,7 @@ const std::vector<boost::shared_ptr<FormText> >& FormSection::getTextElements()
return textElements_;
}
-void FormSection::addReportedRef(boost::shared_ptr<FormReportedRef>& reportedRef) {
+void FormSection::addReportedRef(boost::shared_ptr<FormReportedRef> reportedRef) {
reportedRefs_.push_back(reportedRef);
}
@@ -37,7 +37,7 @@ const std::vector<boost::shared_ptr<FormReportedRef> >& FormSection::getReported
return reportedRefs_;
}
-void FormSection::addChildSection(boost::shared_ptr<FormSection>& childSection) {
+void FormSection::addChildSection(boost::shared_ptr<FormSection> childSection) {
childSections_.push_back(childSection);
}
@@ -45,7 +45,7 @@ const std::vector<boost::shared_ptr<FormSection> >& FormSection::getChildSection
return childSections_;
}
-void FormSection::addField(boost::shared_ptr<FormField>& field) {
+void FormSection::addField(boost::shared_ptr<FormField> field) {
fields_.push_back(field);
}
diff --git a/Swiften/Elements/FormSection.h b/Swiften/Elements/FormSection.h
index f799062..22af67b 100644
--- a/Swiften/Elements/FormSection.h
+++ b/Swiften/Elements/FormSection.h
@@ -22,13 +22,13 @@ namespace Swift {
~FormSection();
void setLabel(const std::string& label);
const std::string& getLabel() const;
- void addTextElement(boost::shared_ptr<FormText>& textElement);
+ void addTextElement(boost::shared_ptr<FormText> textElement);
const std::vector<boost::shared_ptr<FormText> >& getTextElements() const;
- void addReportedRef(boost::shared_ptr<FormReportedRef>& reportedRef);
+ void addReportedRef(boost::shared_ptr<FormReportedRef> reportedRef);
const std::vector<boost::shared_ptr<FormReportedRef> >& getReportedRefs() const;
- void addChildSection(boost::shared_ptr<FormSection>& childSection);
+ void addChildSection(boost::shared_ptr<FormSection> childSection);
const std::vector<boost::shared_ptr<FormSection> >& getChildSections() const;
- void addField(boost::shared_ptr<FormField>& field);
+ void addField(boost::shared_ptr<FormField> field);
const std::vector<boost::shared_ptr<FormField> >& getFields() const;
void addFieldRef(std::string ref);
const std::vector<std::string> getFieldRefs() const;