NPNS services: Difference between revisions

Behemoth (talk | contribs)
npns:s: version for DestroyTokenForBaaS
Behemoth (talk | contribs)
npns: Events and minor cleanup
Line 16: Line 16:
| 4 || ReceiveRaw
| 4 || ReceiveRaw
|-
|-
| 5 || GetReceiveEvent
| 5 || [[#GetReceiveEvent]]
|-
|-
| 7 || GetStateChangeEvent
| 7 || [[#GetStateChangeEvent]]
|-
|-
| 21 || CreateToken
| 21 || CreateToken
Line 64: Line 64:
| 4 || ReceiveRaw
| 4 || ReceiveRaw
|-
|-
| 5 || GetReceiveEvent
| 5 || [[#GetReceiveEvent]]
|-
|-
| 6 || [[#ListenUndelivered]]
| 6 || [[#ListenUndelivered]]
|-
|-
| 7 || GetStateChangeEvent
| 7 || [[#GetStateChangeEvent]]
|-
|-
| 11 || SubscribeTopic
| 11 || SubscribeTopic
Line 138: Line 138:


=== ListenTo ===
=== ListenTo ===
Takes an input u64 program id.
Takes an input u64 program id, no output.
 
=== GetReceiveEvent ===
No input, returns an output Event handle with autoclear=true.
 
=== GetStateChangeEvent ===
No input, returns an output Event handle with autoclear=true.  


=== ListenUndelivered ===
=== ListenUndelivered ===
Same as calling [[#ListenTo]] with program id 0.
No input, same as calling [[#ListenTo]] with program id 0.


=== GetJid ===
=== GetJid ===
Returns the current Jabber Identifier[https://xmpp.org/extensions/xep-0029.html].
No input, returns the current Jabber Identifier[https://xmpp.org/extensions/xep-0029.html] in a type-10 buffer.
Locally it's stored in "npns_save:/persistent.bin"
Locally it's stored in "npns_save:/persistent.bin"


=== CreateJid ===
=== CreateJid ===
No input, no output.
Fetches a new Jid from the CDN. Invalidates the old one if existent.
Fetches a new Jid from the CDN. Invalidates the old one if existent.


=== DestroyJid ===
=== DestroyJid ===
Invalidates and deletes the local Jid.
No input, no output.
Invalidates and deletes the current Jid.


=== CreateNotificationReceiver ===
=== CreateNotificationReceiver ===