Line 1: |
Line 1: |
| + | 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 = |
| This is "nn::npns::INpnsUser". | | This is "nn::npns::INpnsUser". |
Line 6: |
Line 11: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 1 || | + | | 1 || ListenAll |
| + | |- |
| + | | 2 || [[#ListenTo]] |
| + | |- |
| + | | 3 || Receive |
| + | |- |
| + | | 4 || ReceiveRaw |
| + | |- |
| + | | 5 || [[#GetReceiveEvent]] |
| + | |- |
| + | | 7 || [[#GetStateChangeEvent]] |
| + | |- |
| + | | 8 || [18.0.0+] ListenToByName |
| + | |- |
| + | | 21 || CreateToken |
| |- | | |- |
− | | 2 || | + | | 23 || DestroyToken |
| |- | | |- |
− | | 3 || | + | | 25 || QueryIsTokenValid |
| |- | | |- |
− | | 4 || | + | | 26 || [5.0.0+] ListenToMyApplicationId |
| |- | | |- |
− | | 5 || | + | | 101 || Suspend |
| |- | | |- |
− | | 7 || | + | | 102 || Resume |
| |- | | |- |
− | | 21 || | + | | 103 || GetState |
| |- | | |- |
− | | 23 || | + | | 104 || [3.0.0+] GetStatistics |
| |- | | |- |
− | | 25 || | + | | 111 || GetJid |
| |- | | |- |
− | | 101 || | + | | 120 || [7.0.0+] [[#CreateNotificationReceiver]] |
| |- | | |- |
− | | 102 || | + | | 151 || [8.0.0+] GetStateWithHandover |
| |- | | |- |
− | | 103 || | + | | 152 || [8.0.0+] GetStateChangeEventWithHandover |
| |- | | |- |
− | | 104 || | + | | 153 || [8.0.0+] GetDropEventWithHandover |
| |- | | |- |
− | | 111 || | + | | 154 || [12.0.0+] CreateTokenAsync |
| |} | | |} |
| + | |
| + | [5.0.0+] CreateToken/DestroyToken now takes an additional 8-bytes of input and a PID. |
| | | |
| = npns:s = | | = npns:s = |
Line 42: |
Line 63: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 1 || | + | | 1 || ListenAll |
| + | |- |
| + | | 2 || [[#ListenTo]] |
| + | |- |
| + | | 3 || Receive |
| + | |- |
| + | | 4 || ReceiveRaw |
| + | |- |
| + | | 5 || [[#GetReceiveEvent]] |
| + | |- |
| + | | 6 || [[#ListenUndelivered]] |
| + | |- |
| + | | 7 || [[#GetStateChangeEvent]] |
| + | |- |
| + | | 8 || [18.0.0+] ListenToByName |
| + | |- |
| + | | 11 || SubscribeTopic |
| + | |- |
| + | | 12 || UnsubscribeTopic |
| + | |- |
| + | | 13 || [1.0.0-17.0.1] QueryIsTopicExist |
| + | |- |
| + | | 14 || [18.0.0+] SubscribeTopicByAccount |
| + | |- |
| + | | 15 || [18.0.0+] UnsubscribeTopicByAccount |
| + | |- |
| + | | 16 || [18.0.0+] DownloadSubscriptionList |
| + | |- |
| + | | 17 || [19.0.0+] |
| + | |- |
| + | | 21 || CreateToken |
| + | |- |
| + | | 22 || CreateTokenWithApplicationId |
| + | |- |
| + | | 23 || DestroyToken |
| + | |- |
| + | | 24 || DestroyTokenWithApplicationId |
| + | |- |
| + | | 25 || QueryIsTokenValid |
| + | |- |
| + | | 26 || [5.0.0+] ListenToMyApplicationId |
| + | |- |
| + | | 27 || [13.0.0+] DestroyTokenAll |
| + | |- |
| + | | 28 || [18.0.0+] CreateTokenWithName |
| + | |- |
| + | | 29 || [18.0.0+] DestroyTokenWithName |
| + | |- |
| + | | 31 || UploadTokenToBaaS |
| + | |- |
| + | | 32 || [2.0.0+] DestroyTokenForBaaS |
| + | |- |
| + | | 33 || [7.0.0+] CreateTokenForBaas |
| + | |- |
| + | | 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 |
| + | |- |
| + | | 60 || [19.0.0+] |
| + | |- |
| + | | 61 || [19.0.0+] |
| + | |- |
| + | | 101 || Suspend |
| + | |- |
| + | | 102 || Resume |
| + | |- |
| + | | 103 || GetState |
| + | |- |
| + | | 104 || [3.0.0+] GetStatistics |
| + | |- |
| + | | 105 || [3.0.0+] GetPlayReportRequestEvent |
| + | |- |
| + | | 106 || [18.0.0+] GetLastNotifiedTime |
| + | |- |
| + | | 107 || [18.0.0+] SetLastNotifiedTime |
| + | |- |
| + | | 111 || [[#GetJid]] |
| + | |- |
| + | | 112 || [[#CreateJid]] |
| + | |- |
| + | | 113 || [[#DestroyJid]] |
| + | |- |
| + | | 114 || AttachJid |
| + | |- |
| + | | 115 || DetachJid |
| + | |- |
| + | | 120 || [7.0.0+] [[#CreateNotificationReceiver]] |
| + | |- |
| + | | 141 || [19.0.0+] |
| + | |- |
| + | | 142 || [19.0.0+] |
| |- | | |- |
− | | 2 || | + | | 143 || [19.0.0+] |
| |- | | |- |
− | | 3 || | + | | 144 || [19.0.0+] |
| |- | | |- |
− | | 4 || | + | | 145 || [19.0.0+] |
| |- | | |- |
− | | 5 || | + | | 151 || [8.0.0+] GetStateWithHandover |
| |- | | |- |
− | | 6 || | + | | 152 || [8.0.0+] GetStateChangeEventWithHandover |
| |- | | |- |
− | | 7 || | + | | 153 || [8.0.0+] GetDropEventWithHandover |
| |- | | |- |
− | | 11 || | + | | 154 || [12.0.0+] CreateTokenAsync |
| |- | | |- |
− | | 12 || | + | | 155 || [12.0.0+] CreateTokenAsyncWithApplicationId |
| |- | | |- |
− | | 13 || | + | | 156 || [18.0.0+] CreateTokenWithNameAsync |
| + | |- |
| + | | 161 || [10.0.0+] GetRequestChangeStateCancelEvent |
| + | |- |
| + | | 162 || [10.0.0+] RequestChangeStateForceTimedWithCancelEvent |
| + | |- |
| + | | 201 || [3.0.0+] RequestChangeStateForceTimed |
| + | |- |
| + | | 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 |
| + | |} |
| + | |
| + | [5.0.0+] CreateToken/DestroyToken now takes an additional 8-bytes of input and a PID. |
| + | |
| + | ListenAll, ReceiveRaw, CreateToken, DestroyToken, QueryIsTokenValid are stubbed. They return 0x7fc9a on [1.0.0] and 0x36dc9a on later versions. |
| + | |
| + | === ListenTo === |
| + | 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 === |
| + | No input, same as calling [[#ListenTo]] with program id 0. |
| + | |
| + | === GetJid === |
| + | 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" |
| + | |
| + | === CreateJid === |
| + | No input, no output. |
| + | Fetches a new Jid from the CDN. Invalidates the old one if existent. |
| + | |
| + | === DestroyJid === |
| + | No input, no output. |
| + | Invalidates and deletes the current Jid. |
| + | |
| + | === CreateNotificationReceiver === |
| + | Returns an [[#INotificationReceiver]]. |
| + | |
| + | == INotificationReceiver == |
| + | This is "nn::npns::INotificationReceiver". |
| + | |
| + | This was added with [7.0.0+]. |
| + | |
| + | {| class="wikitable" border="1" |
| |- | | |- |
− | | 21 || | + | ! Cmd || Name || Notes |
| |- | | |- |
− | | 22 || | + | | 1 || [[#ListenTo]] || Takes a total of 8-bytes of input, no output. |
| |- | | |- |
− | | 23 || | + | | 2 || ListenToMyApplicationId || Takes a total of 8-bytes of input and a PID, no output. |
| |- | | |- |
− | | 24 || | + | | 3 || Receive || Takes a total of 2-bytes of input and a type-0x6 output buffer. |
| |- | | |- |
− | | 25 || | + | | 4 || GetReceiveEvent || No input, returns an output handle. |
| |- | | |- |
− | | 31 || | + | | 5 || [18.0.0+] ListenToByName || |
| + | |} |
| + | |
| + | == ICreateTokenAsyncContext == |
| + | This is "nn::npns::ICreateTokenAsyncContext". |
| + | |
| + | This was added with [12.0.0+]. |
| + | |
| + | {| class="wikitable" border="1" |
| |- | | |- |
− | | 32 ||
| + | ! Cmd || Name |
| |- | | |- |
− | | 101 || | + | | 1 || GetFinishEvent |
| |- | | |- |
− | | 102 || | + | | 2 || Cancel |
| |- | | |- |
− | | 103 || | + | | 3 || GetResult |
| |- | | |- |
− | | 104 || | + | | 10 || GetToken |
| + | |} |
| + | |
| + | == ISubscriptionUpdateNotifier == |
| + | This is "nn::npns::ISubscriptionUpdateNotifier". |
| + | |
| + | This was added with [19.0.0+]. |
| + | |
| + | {| class="wikitable" border="1" |
| |- | | |- |
− | | 105 ||
| + | ! Cmd || Name |
| |- | | |- |
− | | 111 || | + | | 1 || |
| |- | | |- |
− | | 112 || | + | | 2 || |
| + | |} |
| + | |
| + | == IFuture == |
| + | This is "nn::npns::IFuture". |
| + | |
| + | This was added with [19.0.0+]. |
| + | |
| + | {| class="wikitable" border="1" |
| |- | | |- |
− | | 113 ||
| + | ! Cmd || Name |
| |- | | |- |
− | | 114 || | + | | 1 || |
| |- | | |- |
− | | 115 || | + | | 2 || |
| |- | | |- |
− | | 201 || | + | | 3 || |
| |- | | |- |
− | | 202 || | + | | 10 || |
| |} | | |} |
| + | |
| + | = 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]] |