ContextI.cpp 533 Bytes
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

#include <Ice/Ice.h>
#include <ContextI.h>

using namespace std;

std::string
ContextI::login(std::string name, std::string passwd, const Ice::Current& /* c */)
{
   secretToken = name + passwd + std::to_string(rand());
   return secretToken;
}

void
ContextI::function(const Ice::Current& /* c */)
{
    cout << "In function" << endl;
}

void
ContextI::shutdown(const Ice::Current& c)
{
    cout << "Shutting down..." << endl;
    c.adapter->getCommunicator()->shutdown();
}