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/Examples
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swiften/Examples')
-rw-r--r--Swiften/Examples/BenchTool/BenchTool.cpp2
-rw-r--r--Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp8
-rw-r--r--Swiften/Examples/LinkLocalTool/main.cpp4
-rw-r--r--Swiften/Examples/SendFile/ReceiveFile.cpp6
-rw-r--r--Swiften/Examples/SendFile/SendFile.cpp6
-rw-r--r--Swiften/Examples/SendMessage/SendMessage.cpp8
6 files changed, 17 insertions, 17 deletions
diff --git a/Swiften/Examples/BenchTool/BenchTool.cpp b/Swiften/Examples/BenchTool/BenchTool.cpp
index aaf83b5..9e54ed9 100644
--- a/Swiften/Examples/BenchTool/BenchTool.cpp
+++ b/Swiften/Examples/BenchTool/BenchTool.cpp
@@ -45,7 +45,7 @@ int main(int, char**) {
BlindCertificateTrustChecker trustChecker;
std::vector<CoreClient*> clients;
for (int i = 0; i < numberOfInstances; ++i) {
- CoreClient* client = new Swift::CoreClient(JID(jid), String(pass), &networkFactories);
+ CoreClient* client = new Swift::CoreClient(JID(jid), std::string(pass), &networkFactories);
client->setCertificateTrustChecker(&trustChecker);
client->onConnected.connect(&handleConnected);
clients.push_back(client);
diff --git a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
index 2f3a751..fda203a 100644
--- a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
+++ b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
@@ -62,13 +62,13 @@ int main(int argc, char* argv[]) {
int argi = 1;
- String jid = argv[argi++];
- String connectHost = "";
+ std::string jid = argv[argi++];
+ std::string connectHost = "";
if (argc == 5) {
connectHost = argv[argi++];
}
- client = new Swift::Client(JID(jid), String(argv[argi++]), &networkFactories);
+ client = new Swift::Client(JID(jid), std::string(argv[argi++]), &networkFactories);
char* timeoutChar = argv[argi++];
int timeout = atoi(timeoutChar);
timeout = (timeout ? timeout : 30) * 1000;
@@ -76,7 +76,7 @@ int main(int argc, char* argv[]) {
client->onConnected.connect(&handleConnected);
errorConnection = client->onDisconnected.connect(&handleDisconnected);
std::cout << "Connecting to JID " << jid << " with timeout " << timeout << "ms on host: "; ;
- if (!connectHost.isEmpty()) {
+ if (!connectHost.empty()) {
std::cout << connectHost << std::endl;
client->connect(connectHost);
} else {
diff --git a/Swiften/Examples/LinkLocalTool/main.cpp b/Swiften/Examples/LinkLocalTool/main.cpp
index 65fc9bc..d63ef53 100644
--- a/Swiften/Examples/LinkLocalTool/main.cpp
+++ b/Swiften/Examples/LinkLocalTool/main.cpp
@@ -27,13 +27,13 @@ int main(int argc, char* argv[]) {
boost::shared_ptr<DNSSDQuerier> querier = factory.createQuerier();
querier->start();
- if (String(argv[1]) == "browse") {
+ if (std::string(argv[1]) == "browse") {
boost::shared_ptr<DNSSDBrowseQuery> browseQuery = querier->createBrowseQuery();
browseQuery->startBrowsing();
eventLoop.run();
browseQuery->stopBrowsing();
}
- else if (String(argv[1]) == "resolve-service") {
+ else if (std::string(argv[1]) == "resolve-service") {
if (argc < 5) {
std::cerr << "Invalid parameters" << std::endl;
return -1;
diff --git a/Swiften/Examples/SendFile/ReceiveFile.cpp b/Swiften/Examples/SendFile/ReceiveFile.cpp
index 278cc3e..b46d790 100644
--- a/Swiften/Examples/SendFile/ReceiveFile.cpp
+++ b/Swiften/Examples/SendFile/ReceiveFile.cpp
@@ -25,7 +25,7 @@ int exitCode = 2;
class FileReceiver {
public:
- FileReceiver(const JID& jid, const String& password) : jid(jid), password(password), jingleSessionManager(NULL), incomingFileTransferManager(NULL) {
+ FileReceiver(const JID& jid, const std::string& password) : jid(jid), password(password), jingleSessionManager(NULL), incomingFileTransferManager(NULL) {
client = new Swift::Client(jid, password, &networkFactories);
client->onConnected.connect(boost::bind(&FileReceiver::handleConnected, this));
client->onDisconnected.connect(boost::bind(&FileReceiver::handleDisconnected, this, _1));
@@ -91,7 +91,7 @@ class FileReceiver {
private:
JID jid;
- String password;
+ std::string password;
Client* client;
ClientXMLTracer* tracer;
JingleSessionManager* jingleSessionManager;
@@ -107,7 +107,7 @@ int main(int argc, char* argv[]) {
}
JID jid(argv[1]);
- FileReceiver fileReceiver(jid, String(argv[2]));
+ FileReceiver fileReceiver(jid, std::string(argv[2]));
fileReceiver.start();
eventLoop.run();
diff --git a/Swiften/Examples/SendFile/SendFile.cpp b/Swiften/Examples/SendFile/SendFile.cpp
index b2db22b..5ec00a9 100644
--- a/Swiften/Examples/SendFile/SendFile.cpp
+++ b/Swiften/Examples/SendFile/SendFile.cpp
@@ -28,7 +28,7 @@ int exitCode = 2;
class FileSender {
public:
- FileSender(const JID& jid, const String& password, const JID& recipient, const boost::filesystem::path& file, int port) : jid(jid), password(password), recipient(recipient), file(file), transfer(NULL) {
+ FileSender(const JID& jid, const std::string& password, const JID& recipient, const boost::filesystem::path& file, int port) : jid(jid), password(password), recipient(recipient), file(file), transfer(NULL) {
connectionServer = BoostConnectionServer::create(port, networkFactories.getIOServiceThread()->getIOService(), &eventLoop);
socksBytestreamServer = new SOCKS5BytestreamServer(connectionServer);
@@ -94,7 +94,7 @@ class FileSender {
BoostConnectionServer::ref connectionServer;
SOCKS5BytestreamServer* socksBytestreamServer;
JID jid;
- String password;
+ std::string password;
JID recipient;
boost::filesystem::path file;
Client* client;
@@ -111,7 +111,7 @@ int main(int argc, char* argv[]) {
JID sender(argv[1]);
JID recipient(argv[3]);
- FileSender fileSender(sender, String(argv[2]), recipient, boost::filesystem::path(argv[4]), 8888);
+ FileSender fileSender(sender, std::string(argv[2]), recipient, boost::filesystem::path(argv[4]), 8888);
fileSender.start();
{
diff --git a/Swiften/Examples/SendMessage/SendMessage.cpp b/Swiften/Examples/SendMessage/SendMessage.cpp
index d763ffc..d7f7333 100644
--- a/Swiften/Examples/SendMessage/SendMessage.cpp
+++ b/Swiften/Examples/SendMessage/SendMessage.cpp
@@ -51,13 +51,13 @@ int main(int argc, char* argv[]) {
int argi = 1;
- String jid = argv[argi++];
- String connectHost = "";
+ std::string jid = argv[argi++];
+ std::string connectHost = "";
if (argc == 6) {
connectHost = argv[argi++];
}
- client = new Swift::Client(JID(jid), String(argv[argi++]), &networkFactories);
+ client = new Swift::Client(JID(jid), std::string(argv[argi++]), &networkFactories);
client->setAlwaysTrustCertificates();
recipient = JID(argv[argi++]);
@@ -66,7 +66,7 @@ int main(int argc, char* argv[]) {
ClientXMLTracer* tracer = new ClientXMLTracer(client);
client->onConnected.connect(&handleConnected);
errorConnection = client->onDisconnected.connect(&handleDisconnected);
- if (!connectHost.isEmpty()) {
+ if (!connectHost.empty()) {
client->connect(connectHost);
} else {
client->connect();