NPNS services: Difference between revisions

Behemoth (talk | contribs)
npns:s: version for DestroyTokenForBaaS
No edit summary
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This is used for Push Notifications.
This is used for Push Notifications.
It uses a version of the libstrophe[http://strophe.im/libstrophe/] xmpp library with libxml2.
Modifications were made to use the [[SSL services|ssl]] service and support network proxy settings.


= npns:u =
= npns:u =
Line 16: Line 19:
| 4 || ReceiveRaw
| 4 || ReceiveRaw
|-
|-
| 5 || GetReceiveEvent
| 5 || [[#GetReceiveEvent]]
|-
|-
| 7 || GetStateChangeEvent
| 7 || [[#GetStateChangeEvent]]
|-
| 8 || [18.0.0+] ListenToByName
|-
|-
| 21 || CreateToken
| 21 || CreateToken
Line 45: Line 50:
|-
|-
| 153 || [8.0.0+] GetDropEventWithHandover
| 153 || [8.0.0+] GetDropEventWithHandover
|-
| 154 || [12.0.0+] CreateTokenAsync
|}
|}


Line 64: Line 71:
| 4 || ReceiveRaw
| 4 || ReceiveRaw
|-
|-
| 5 || GetReceiveEvent
| 5 || [[#GetReceiveEvent]]
|-
|-
| 6 || [[#ListenUndelivered]]
| 6 || [[#ListenUndelivered]]
|-
|-
| 7 || GetStateChangeEvent
| 7 || [[#GetStateChangeEvent]]
|-
| 8 || [18.0.0+] ListenToByName
|-
|-
| 11 || SubscribeTopic
| 11 || SubscribeTopic
Line 74: Line 83:
| 12 || UnsubscribeTopic
| 12 || UnsubscribeTopic
|-
|-
| 13 || QueryIsTopicExist
| 13 || [1.0.0-17.0.1] QueryIsTopicExist
|-
| 14 || [18.0.0+] SubscribeTopicByAccount
|-
| 15 || [18.0.0+] UnsubscribeTopicByAccount
|-
| 16 || [18.0.0+] DownloadSubscriptionList
|-
|-
| 21 || CreateToken
| 21 || CreateToken
Line 87: Line 102:
|-
|-
| 26 || [5.0.0+] ListenToMyApplicationId
| 26 || [5.0.0+] ListenToMyApplicationId
|-
| 27 || [13.0.0+] DestroyTokenAll
|-
| 28 || [18.0.0+] CreateTokenWithName
|-
| 29 || [18.0.0+] DestroyTokenWithName
|-
|-
| 31 || UploadTokenToBaaS
| 31 || UploadTokenToBaaS
Line 95: Line 116:
|-
|-
| 34 || [7.0.0+] SetBaasDeviceAccountIdList
| 34 || [7.0.0+] SetBaasDeviceAccountIdList
|-
| 35 || [17.0.0+] LinkNsaId
|-
| 36 || [17.0.0+] UnlinkNsaId
|-
| 37 || [18.0.0+] RelinkNsaId
|-
| 40 || [17.0.0+] GetNetworkServiceAccountIdTokenRequestEvent
|-
| 41 || [17.0.0+] TryPopNetworkServiceAccountIdTokenRequestUid
|-
| 42 || [17.0.0+] SetNetworkServiceAccountIdTokenSuccess
|-
| 43 || [17.0.0+] SetNetworkServiceAccountIdTokenFailure
|-
| 44 || [17.0.0+] SetUidList
|-
| 45 || [17.0.0+] PutDigitalTwinKeyValue
|-
| 51 || [18.0.0+] DeleteDigitalTwinKeyValue
|-
|-
| 101 || Suspend
| 101 || Suspend
Line 105: Line 146:
|-
|-
| 105 || [3.0.0+] GetPlayReportRequestEvent
| 105 || [3.0.0+] GetPlayReportRequestEvent
|-
| 106 || [18.0.0+] GetLastNotifiedTime
|-
| 107 || [18.0.0+] SetLastNotifiedTime
|-
|-
| 111 || [[#GetJid]]
| 111 || [[#GetJid]]
Line 123: Line 168:
|-
|-
| 153 || [8.0.0+] GetDropEventWithHandover
| 153 || [8.0.0+] GetDropEventWithHandover
|-
| 154 || [12.0.0+] CreateTokenAsync
|-
| 155 || [12.0.0+] CreateTokenAsyncWithApplicationId
|-
| 156 || [18.0.0+] CreateTokenWithNameAsync
|-
|-
| 161 || [10.0.0+] GetRequestChangeStateCancelEvent
| 161 || [10.0.0+] GetRequestChangeStateCancelEvent
Line 131: Line 182:
|-
|-
| 202 || [3.0.0+] RequestChangeStateForceAsync
| 202 || [3.0.0+] RequestChangeStateForceAsync
|-
| 301 || [18.0.0+] GetPassword
|-
| 302 || [18.0.0+] GetAllImmigration
|-
| 303 || [18.0.0+] GetNotificationHistories
|-
| 304 || [18.0.0+] GetPersistentConnectionSummary
|-
| 305 || [18.0.0+] GetDigitalTwinSummary
|-
| 306 || [18.0.0+] GetDigitalTwinValue
|}
|}


Line 138: Line 201:


=== 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 ===
Line 172: Line 243:
|-
|-
| 4 || GetReceiveEvent || No input, returns an output handle.
| 4 || GetReceiveEvent || No input, returns an output handle.
|-
| 5 || [18.0.0+] ListenToByName ||
|}
|}
== ICreateTokenAsyncContext ==
This is "nn::npns::ICreateTokenAsyncContext".
This was added with [12.0.0+].
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 1 || GetFinishEvent
|-
| 2 || Cancel
|-
| 3 || GetResult
|-
| 10 || GetToken
|}
= Notes =
[[Process_Manager_services|pm:bm]] GetBootMode is only used for passing <code>BootMode == Maintenance</code> to a func, which eventually writes that flag into object state. The func which uses GetBootMode is called from nnMain.


[[Category:Services]]
[[Category:Services]]