addRedirection() now uses Values for the protocols parameters as advised

by fmontesi.

svn path=/branches/work/~ervin/qtjolie/; revision=989152
This commit is contained in:
Kevin Ottens 2009-06-29 15:31:25 +00:00
parent c0228210c4
commit 09a0e07c39
3 changed files with 7 additions and 6 deletions

View File

@ -105,15 +105,15 @@ void MetaService::unloadService(const QString &name)
client.call(message);
}
QString Jolie::MetaService::addRedirection(const QString &name, const QString &url, const QString &inProtocol, const QString &outProtocol)
QString Jolie::MetaService::addRedirection(const QString &name, const QString &url, const Value &inProtocol, const Value &outProtocol)
{
Client client(QString::fromUtf8("localhost"), 9000);
Message message("/", "addRedirection");
Value value;
value.children("resourcePrefix") << Value(name.toUtf8());
value.children("location") << Value(url.toUtf8());
value.children("protocol") << Value(inProtocol.toUtf8());
value.children("exposedProtocol") << Value(outProtocol.toUtf8());
value.children("protocol") << inProtocol;
value.children("exposedProtocol") << outProtocol;
message.setData(value);
Message reply = client.call(message);

View File

@ -27,6 +27,7 @@
namespace Jolie
{
class MetaServicePrivate;
class Value;
class Q_DECL_EXPORT MetaService
{
@ -42,7 +43,7 @@ public:
QStringList loadedServices() const;
void unloadService(const QString &name);
QString addRedirection(const QString &name, const QString &url, const QString &inProtocol, const QString &outProtocol);
QString addRedirection(const QString &name, const QString &url, const Value &inProtocol, const Value &outProtocol);
private:
MetaServicePrivate * const d;

View File

@ -94,8 +94,8 @@ private slots:
m_meta.addRedirection(QString::fromUtf8("Calculator"),
QString::fromUtf8("socket://localhost:8000/"),
QString::fromUtf8("sodep"),
QString::fromUtf8("soap"));
Value("sodep"),
Value("soap"));
}
void onAdded(int a, int b, int result)