summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Queries/IQRouter.h')
-rw-r--r--Swiften/Queries/IQRouter.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Swiften/Queries/IQRouter.h b/Swiften/Queries/IQRouter.h
index 312dca8..a21b24d 100644
--- a/Swiften/Queries/IQRouter.h
+++ b/Swiften/Queries/IQRouter.h
@@ -16,18 +16,32 @@ namespace Swift {
class IQChannel;
class IQHandler;
class IQRouter {
public:
IQRouter(IQChannel* channel);
~IQRouter();
/**
+ * Sets the JID of this IQ router.
+ *
+ * This JID is used by requests to check whether incoming
+ * results are addressed correctly.
+ */
+ void setJID(const JID& jid) {
+ jid_ = jid;
+ }
+
+ const JID& getJID() {
+ return jid_;
+ }
+
+ /**
* Sets the 'from' JID for all outgoing IQ stanzas.
*
* By default, IQRouter does not add a from to IQ stanzas, since
* this is automatically added by the server. This overrides this
* default behavior, which is necessary for e.g. components.
*/
void setFrom(const JID& from) {
from_ = from;
}
@@ -49,15 +63,16 @@ namespace Swift {
bool isAvailable();
private:
void handleIQ(boost::shared_ptr<IQ> iq);
void processPendingRemoves();
private:
IQChannel* channel_;
+ JID jid_;
JID from_;
std::vector< boost::shared_ptr<IQHandler> > handlers_;
std::vector< boost::shared_ptr<IQHandler> > queuedRemoves_;
bool queueRemoves_;
};
}