Wrapper for concrete RPC results.. provides limited and more convinient access. More...
#include <rpcresult.hpp>
Public Member Functions | |
RPCTypes::CallbackFunctionSubscriptionToken | addCallback (typename RPCResultImpl< _T >::CallbackFunctionType callback) |
Add callback. | |
RPCTypes::CallbackFunctionSubscriptionToken | addCallbackEx (RPCResultObserver< _T > *callback) |
Add callback. | |
bool | complete (_T value, int32_t rpcresult=GenericRPCReplyMessage::RPC_RESULT_OK) |
Completes an object. | |
int32_t | getRPCCallResult () const |
Retrieve low level rpc status of the method call. | |
_T | getValue () const |
Return the value of a call. | |
void | invalidate () |
Releases all the referenced resources. After calling this it is not safe to access any other methods except the valid(). | |
bool | isComplete () const |
Check has call completed. | |
bool | isLinkBroken () const |
Has the link been broken and caused the RPC call to terminate. | |
bool | isTimedOut () const |
Has the request been timed out. | |
void | removeCallback (RPCTypes::CallbackFunctionSubscriptionToken token) |
Remove a callback. | |
RPCResult () | |
Default c++ constructor. | |
void | setTimeout (int ms) |
Sets the timeout after which the operation is completed locally with timed-out status. | |
bool | valid () const |
is object OK | |
bool | waitComplete (int32_t ms) const |
Wait until complete. | |
Static Public Member Functions | |
static RPCResult< _T > | create (RPCTypes::CommHandle handle) |
Factory function to create a pending RPC Result object with handle provided. | |
Protected Member Functions | |
shared_ptr< RPCResultImpl< _T > > | object () |
Gets access to contained object. | |
RPCResult (shared_ptr< RPCResultImpl< _T > > object) | |
C++ constructor - initialize the object. | |
Friends | |
class | RPCCallStore |
class | RPCResultImpl< _T > |
Wrapper for concrete RPC results.. provides limited and more convinient access.
|
inlineprotected |
C++ constructor - initialize the object.
object | object that implements the result. |
|
inline |
Default c++ constructor.
|
inline |
Add callback.
callback | to be called when ready. |
|
inline |
Add callback.
callback | to be called when ready. |
|
inline |
Completes an object.
Normally this is not meant to be used by RPC users but completion is done internally by the Kanzi Connect framework.
rpcresult | The RPC level completion value. |
|
inlinestatic |
Factory function to create a pending RPC Result object with handle provided.
handle | the handle for the object. |
|
inline |
Retrieve low level rpc status of the method call.
|
inline |
Return the value of a call.
Will block calling thread if remote-call is not complete yet.
|
inline |
Releases all the referenced resources. After calling this it is not safe to access any other methods except the valid().
|
inline |
Check has call completed.
|
inline |
Has the link been broken and caused the RPC call to terminate.
|
inline |
Has the request been timed out.
|
inlineprotected |
Gets access to contained object.
In general there should be no need to access the object directly.
|
inline |
Remove a callback.
token | subscription to remove. |
|
inline |
Sets the timeout after which the operation is completed locally with timed-out status.
ms | Timeout in milliseconds. |
|
inline |
is object OK
|
inline |
Wait until complete.
ms | maximum amount of milliseconds to wait. |
|
friend |
|
friend |