summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/JID/JID.h')
-rw-r--r--Swiften/JID/JID.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/JID/JID.h b/Swiften/JID/JID.h
index 756db98..a4461ba 100644
--- a/Swiften/JID/JID.h
+++ b/Swiften/JID/JID.h
@@ -66,19 +66,19 @@ namespace Swift {
* @param domain JID domain part.
* @param resource JID resource part.
*/
JID(const std::string& node, const std::string& domain, const std::string& resource);
/**
* @return Is a correctly-formatted JID.
*/
bool isValid() const {
- return !domain_.empty(); /* FIXME */
+ return valid_;
}
/**
* e.g. JID("node@domain").getNode() == "node"
* @return could be empty.
*/
const std::string& getNode() const {
return node_;
}
@@ -156,15 +156,16 @@ namespace Swift {
friend bool operator!=(const Swift::JID& a, const Swift::JID& b) {
return a.compare(b, Swift::JID::WithResource) != 0;
}
private:
void nameprepAndSetComponents(const std::string& node, const std::string& domain, const std::string& resource);
void initializeFromString(const std::string&);
private:
+ bool valid_;
std::string node_;
std::string domain_;
bool hasResource_;
std::string resource_;
};
}