Template:Sdk callback page: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m Missing reference parameter |
||
Line 2: | Line 2: | ||
<code style="display: block; padding: 8px; margin: 8px 0px; border: 1px dashed hsl(204,100%,70%);">vp_callback_set(instance, VP_CALLBACK_{{uc:{{{1|unknown}}}}}, callback_{{lc:{{{1|unknown}}}}}); | <code style="display: block; padding: 8px; margin: 8px 0px; border: 1px dashed hsl(204,100%,70%);">vp_callback_set(instance, VP_CALLBACK_{{uc:{{{1|unknown}}}}}, callback_{{lc:{{{1|unknown}}}}}); | ||
void callback_{{lc:{{{1|unknown}}}}}(VPInstance instance, int reason_code) { }</code></div> | void callback_{{lc:{{{1|unknown}}}}}(VPInstance instance, int reason_code, int reference) { }</code></div> | ||
Sent to the client in response to {{sdk_method|{{{1|unknown}}}}}__NOTOC__ | Sent to the client in response to {{sdk_method|{{{1|unknown}}}}}__NOTOC__ | ||
== Reason code ==__NOEDITSECTION__ | == Reason code ==__NOEDITSECTION__ |
Latest revision as of 23:11, 30 July 2018
Callback set and handler snippet
vp_callback_set(instance, VP_CALLBACK_UNKNOWN, callback_unknown);
void callback_unknown(VPInstance instance, int reason_code, int reference) { }
Sent to the client in response to vp_unknown()
Reason code
This callback is passed a return code integer, which indicates whether the request was successful (0
) or errored for any of these reasons:
Return code | Cause |
---|---|
VP_RC_SUCCESS |
Successful call (for methods that have a registered callback, it only means the request has been sent) |
Return attributes
- No attributes are returned in this callback
Behavior
- There is no special behavior for this callback
Examples
- This callback has no usage examples; please add at least one to this page
Usage
{{sdk callback page|Callback name |reasoncodes= {{sdk return code row|name|cause}} |returnattributes= {{sdk attribute row|type|name|description}} |behavior= |caveats= |examples= |seealso= }}