Confirmed users
1,340
edits
No edit summary |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= Description = | = Description = | ||
Note: this proposal has a newer version at [https://wiki.mozilla.org/WebAPI/Inter_App_Communication_Alt_proposal Inter App Communication API Alt Proposal] and is currenly under implementation at [https://bugzilla.mozilla.org/show_bug.cgi?id=876397 Bug 876397]. | |||
An application wants to send or get information with another application. For example, some communications related applications (Skype, SMS, dialer) could send communication logs to a logging ''service'' that would then show the log of all communications to the user. Otherwise, an application might want to know which music is currently playing and get this information from a music player. | An application wants to send or get information with another application. For example, some communications related applications (Skype, SMS, dialer) could send communication logs to a logging ''service'' that would then show the log of all communications to the user. Otherwise, an application might want to know which music is currently playing and get this information from a music player. | ||
Line 6: | Line 8: | ||
This API is only there to create a bridge between two applications. The only intended UI is for security reasons, to select communication peers. | This API is only there to create a bridge between two applications. The only intended UI is for security reasons, to select communication peers. | ||
= TODO = | = TODO = | ||
Line 24: | Line 24: | ||
// The returned Future will contain an array of MessagePort, each of | // The returned Future will contain an array of MessagePort, each of | ||
// them representing an peer that allowed the connection. | // them representing an peer that allowed the connection. | ||
Promise connect(DOMString keyword); | |||
// The returned Future will contain ''true'' if at least a peer has been | // The returned Future will contain ''true'' if at least a peer has been | ||
// selected, ''false'' otherwise. | // selected, ''false'' otherwise. | ||
Promise registerConnections(DOMString keyword); | |||
void unregisterConnections(DOMString keyword); | void unregisterConnections(DOMString keyword); | ||
Line 34: | Line 34: | ||
// The returned Future will contain ''true'' if at least a peer is allowed | // The returned Future will contain ''true'' if at least a peer is allowed | ||
// to communicate with the application, ''false'' otherwise. | // to communicate with the application, ''false'' otherwise. | ||
Promise connectionsRegistered(DOMString keyword); | |||
}; | }; | ||
Line 99: | Line 99: | ||
Google Message Passing: https://developer.chrome.com/extensions/messaging.html | Google Message Passing: https://developer.chrome.com/extensions/messaging.html | ||
[[Category:Web APIs]] |