summaryrefslogtreecommitdiffstats
path: root/Nim
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-17 07:03:16 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-17 07:41:26 (GMT)
commit436ae921afbc5c2b461ee9b2d8fa9b1c869ed274 (patch)
tree9d209712286cc49d4c1f08be5ab8f5b90ef4971c /Nim
parent2c954f7e9464b8fdd970eed829e2ba632e8979d8 (diff)
downloadswift-436ae921afbc5c2b461ee9b2d8fa9b1c869ed274.zip
swift-436ae921afbc5c2b461ee9b2d8fa9b1c869ed274.tar.bz2
Implement LinkLocalServiceInfo TXT record.
Diffstat (limited to 'Nim')
-rw-r--r--Nim/main.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/Nim/main.cpp b/Nim/main.cpp
index 607cc80..6747d4a 100644
--- a/Nim/main.cpp
+++ b/Nim/main.cpp
@@ -14,6 +14,7 @@
#include "Swiften/EventLoop/SimpleEventLoop.h"
#include "Swiften/EventLoop/EventOwner.h"
#include "Swiften/Elements/Stanza.h"
+#include "Swiften/LinkLocal/LinkLocalServiceInfo.h"
#include "Swiften/LinkLocal/LinkLocalRoster.h"
#include "Swiften/LinkLocal/DNSSDService.h"
#include "Swiften/LinkLocal/AppleDNSSDService.h"
@@ -63,7 +64,16 @@ class Server {
if (!dnsSDServiceRegistered_) {
dnsSDServiceRegistered_ = true;
dnsSDService_->onServiceRegistered.connect(boost::bind(&Server::handleServiceRegistered, this, _1));
- dnsSDService_->registerService(session->getJID().toBare().toString(), linkLocalConnectionPort_, std::map<String,String>());
+ LinkLocalServiceInfo info;
+ info.setFirstName("Remko");
+ info.setLastName("Tron\xc3\xe7on");
+ info.setEMail("email@example.com");
+ info.setJID(JID("jid@example.com"));
+ info.setMessage("I'm not Here");
+ info.setNick("remko");
+ info.setStatus(LinkLocalServiceInfo::Away);
+ info.setPort(linkLocalConnectionPort_);
+ dnsSDService_->registerService(session->getJID().toBare().toString(), linkLocalConnectionPort_, info);
}
}