Commit d835f509 authored by Benjamin REIS's avatar Benjamin REIS
Browse files

Add getAddressWithoutGruu to Identity address and create participant without gruu

parent 47cf1d43
......@@ -130,6 +130,12 @@ bool IdentityAddress::setGruu (const string &gruu) {
return true;
}
IdentityAddress IdentityAddress::getAddressWithoutGruu () const {
IdentityAddress address(*this);
address.setGruu("");
return address;
}
string IdentityAddress::asString () const {
Address tmpAddress(*this);
return tmpAddress.asStringUriOnly();
......
......@@ -57,6 +57,8 @@ public:
const std::string &getGruu () const;
bool setGruu (const std::string &gruu);
IdentityAddress getAddressWithoutGruu () const;
virtual std::string asString () const;
private:
......
......@@ -88,12 +88,7 @@ void ParticipantPrivate::removeDevice (const IdentityAddress &gruu) {
Participant::Participant (const IdentityAddress &address) : Object(*new ParticipantPrivate) {
L_D();
d->addr = address;
}
Participant::Participant (IdentityAddress &&address) : Object(*new ParticipantPrivate) {
L_D();
d->addr = address;
d->addr = address.getAddressWithoutGruu();
}
// -----------------------------------------------------------------------------
......
......@@ -57,7 +57,6 @@ public:
L_OVERRIDE_SHARED_FROM_THIS(Participant);
explicit Participant (const IdentityAddress &address);
explicit Participant (IdentityAddress &&address);
const IdentityAddress &getAddress () const;
bool isAdmin () const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment