summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-14 18:57:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-14 21:36:32 (GMT)
commitcb05f5a908e20006c954ce38755c2e422ecc2388 (patch)
treea793551a5fe279a57d4330119560e8542f745484 /Swiften/Network/CAresDomainNameResolver.cpp
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swiften/Network/CAresDomainNameResolver.cpp')
-rw-r--r--Swiften/Network/CAresDomainNameResolver.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Swiften/Network/CAresDomainNameResolver.cpp b/Swiften/Network/CAresDomainNameResolver.cpp
index 8462e4f..dd49139 100644
--- a/Swiften/Network/CAresDomainNameResolver.cpp
+++ b/Swiften/Network/CAresDomainNameResolver.cpp
@@ -26,7 +26,7 @@ namespace Swift {
class CAresQuery : public boost::enable_shared_from_this<CAresQuery>, public EventOwner {
public:
- CAresQuery(const String& query, int dnsclass, int type, CAresDomainNameResolver* resolver) : query(query), dnsclass(dnsclass), type(type), resolver(resolver) {
+ CAresQuery(const std::string& query, int dnsclass, int type, CAresDomainNameResolver* resolver) : query(query), dnsclass(dnsclass), type(type), resolver(resolver) {
}
virtual ~CAresQuery() {
@@ -37,7 +37,7 @@ class CAresQuery : public boost::enable_shared_from_this<CAresQuery>, public Eve
}
void doRun(ares_channel* channel) {
- ares_query(*channel, query.getUTF8Data(), dnsclass, type, &CAresQuery::handleResult, this);
+ ares_query(*channel, query.c_str(), dnsclass, type, &CAresQuery::handleResult, this);
}
static void handleResult(void* arg, int status, int timeouts, unsigned char* buffer, int len) {
@@ -47,7 +47,7 @@ class CAresQuery : public boost::enable_shared_from_this<CAresQuery>, public Eve
virtual void handleResult(int status, int, unsigned char* buffer, int len) = 0;
private:
- String query;
+ std::string query;
int dnsclass;
int type;
CAresDomainNameResolver* resolver;
@@ -55,7 +55,7 @@ class CAresQuery : public boost::enable_shared_from_this<CAresQuery>, public Eve
class CAresDomainNameServiceQuery : public DomainNameServiceQuery, public CAresQuery {
public:
- CAresDomainNameServiceQuery(const String& service, CAresDomainNameResolver* resolver) : CAresQuery(service, 1, 33, resolver) {
+ CAresDomainNameServiceQuery(const std::string& service, CAresDomainNameResolver* resolver) : CAresQuery(service, 1, 33, resolver) {
}
virtual void run() {
@@ -72,7 +72,7 @@ class CAresDomainNameServiceQuery : public DomainNameServiceQuery, public CAresQ
record.priority = rawRecords->priority;
record.weight = rawRecords->weight;
record.port = rawRecords->port;
- record.hostname = String(rawRecords->host);
+ record.hostname = std::string(rawRecords->host);
records.push_back(record);
}
}
@@ -87,7 +87,7 @@ class CAresDomainNameServiceQuery : public DomainNameServiceQuery, public CAresQ
class CAresDomainNameAddressQuery : public DomainNameAddressQuery, public CAresQuery {
public:
- CAresDomainNameAddressQuery(const String& host, CAresDomainNameResolver* resolver) : CAresQuery(host, 1, 1, resolver) {
+ CAresDomainNameAddressQuery(const std::string& host, CAresDomainNameResolver* resolver) : CAresQuery(host, 1, 1, resolver) {
}
virtual void run() {
@@ -129,11 +129,11 @@ CAresDomainNameResolver::~CAresDomainNameResolver() {
ares_destroy(channel);
}
-boost::shared_ptr<DomainNameServiceQuery> CAresDomainNameResolver::createServiceQuery(const String& name) {
+boost::shared_ptr<DomainNameServiceQuery> CAresDomainNameResolver::createServiceQuery(const std::string& name) {
return boost::shared_ptr<DomainNameServiceQuery>(new CAresDomainNameServiceQuery(getNormalized(name), this));
}
-boost::shared_ptr<DomainNameAddressQuery> CAresDomainNameResolver::createAddressQuery(const String& name) {
+boost::shared_ptr<DomainNameAddressQuery> CAresDomainNameResolver::createAddressQuery(const std::string& name) {
return boost::shared_ptr<DomainNameAddressQuery>(new CAresDomainNameAddressQuery(getNormalized(name), this));
}