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. More... | |
| RPCTypes::CallbackFunctionSubscriptionToken | addCallbackEx (RPCResultObserver< _T > *callback) |
| Add callback. More... | |
| bool | complete (_T value, int32_t rpcresult=GenericRPCReplyMessage::RPC_RESULT_OK) |
| Completes an object. More... | |
| int32_t | getRPCCallResult () const |
| Retrieve low level rpc status of the method call. More... | |
| _T | getValue () const |
| Return the value of a call. More... | |
| void | invalidate () |
| Releases all the referenced resources. After calling this it is not safe to access any other methods except the valid(). More... | |
| bool | isComplete () const |
| Check has call completed. More... | |
| bool | isLinkBroken () const |
| Has the link been broken and caused the RPC call to terminate. More... | |
| bool | isTimedOut () const |
| Has the request been timed out. More... | |
| void | removeCallback (RPCTypes::CallbackFunctionSubscriptionToken token) |
| Remove a callback. More... | |
| RPCResult () | |
| Default c++ constructor. More... | |
| void | setTimeout (int ms) |
| Sets the timeout after which the operation is completed locally with timed-out status. More... | |
| bool | valid () const |
| is object OK More... | |
| bool | waitComplete (int32_t ms) const |
| Wait until complete. More... | |
Static Public Member Functions | |
| static RPCResult< _T > | create (RPCTypes::CommHandle handle) |
| Factory function to create a pending RPC Result object with handle provided. More... | |
Protected Member Functions | |
| shared_ptr< RPCResultImpl< _T > > | object () |
| Gets access to contained object. More... | |
| RPCResult (shared_ptr< RPCResultImpl< _T > > object) | |
| C++ constructor - initialize the object. More... | |
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 |