Template:Sdk callback page: Difference between revisions

From Virtual Paradise Wiki
Jump to navigation Jump to search
Sleepy E (talk | contribs)
Undo revision 4918 by Sleepy E (talk)
Sleepy E (talk | contribs)
m Missing reference parameter
 
(2 intermediate revisions by the same user not shown)
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>
{{{2}}}__NOTOC__
Sent to the client in response to {{sdk_method|{{{1|unknown}}}}}__NOTOC__
== Reason code ==__NOEDITSECTION__
== Reason code ==__NOEDITSECTION__
{{{reasoncodes|This callback is passed a [[return code]] integer, which indicates whether the request was successful ({{code|0}}) or errored for any of these reasons:
This callback is passed a [[return code]] integer, which indicates whether the request was successful ({{code|0}}) or errored for any of these reasons:
{{sdk return code table|{{{reasoncodes|}}}}}
{{sdk return code table|{{{reasoncodes|}}}}}
== Return attributes ==__NOEDITSECTION__
== Return attributes ==__NOEDITSECTION__
Line 21: Line 21:


== Usage ==
== Usage ==
<pre>{{sdk callback page|Callback name|Callback description
<pre>{{sdk callback page|Callback name
|reasoncodes=
|reasoncodes=
   {{sdk return code row|name|cause}}
   {{sdk return code row|name|cause}}

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=
}}