WebAPI/Inter App Communication: Difference between revisions

no edit summary
m (Fixed spelling errors)
No edit summary
 
(5 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 22: 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.
     Future connect(DOMString keyword);
     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.
     Future registerConnections(DOMString keyword);
     Promise registerConnections(DOMString keyword);
    
    
     void  unregisterConnections(DOMString keyword);
     void  unregisterConnections(DOMString keyword);
Line 32: 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.
     Future connectionsRegistered(DOMString keyword);
     Promise connectionsRegistered(DOMString keyword);
   };
   };


Line 97: 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]]
Confirmed users
1,340

edits