My first try will be to have something like
Code:
interface ResponseCallback
{
void success(string data);
void failure(string err);
};
interface OperationController
{
void cancel();
};
interface Executor
{
OperationController* runLongTimeOperation(string data, ResponseCallback* callback);
};
So when you call runLongTimeOperation the server returns the OperationController proxy that allows to cancel the given operation, this proxy has just the endpoints of the server you have invoked.
When server has end processing the data it callbacks the client using the ResponseCallback proxy that was passed in.