diff options
Diffstat (limited to 'Swiften/Client/NickResolver.h')
-rw-r--r-- | Swiften/Client/NickResolver.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Swiften/Client/NickResolver.h b/Swiften/Client/NickResolver.h new file mode 100644 index 0000000..7f00acd --- /dev/null +++ b/Swiften/Client/NickResolver.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2010 Kevin Smith + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#include <map> +#include <boost/signals.hpp> +#include <boost/shared_ptr.hpp> + +#include "Swiften/Base/String.h" +#include "Swiften/JID/JID.h" +#include "Swiften/Elements/VCard.h" + +namespace Swift { + class XMPPRoster; + class MUCRegistry; + class VCardManager; + class NickResolver { + public: + NickResolver(const JID& ownJID, XMPPRoster* xmppRoster, VCardManager* vcardManager, MUCRegistry* mucRegistry); + + String jidToNick(const JID& jid); + + boost::signal<void (const String&)> onOwnNickChanged; + private: + void handleVCardReceived(const JID& jid, VCard::ref vCard); + + private: + JID ownJID_; + String ownNick_; + XMPPRoster* xmppRoster_; + MUCRegistry* mucRegistry_; + VCardManager* vcardManager_; + }; +} + |