Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created December 10, 2011 00:53
Show Gist options
  • Select an option

  • Save Raynos/1454082 to your computer and use it in GitHub Desktop.

Select an option

Save Raynos/1454082 to your computer and use it in GitHub Desktop.
var chatServer = {
/**
* Invoke function. callback will be invoked with (err, list). error is any server error and list is JSON format
* of some yet to be defined type that basically covers all your contact list rendering need
**/
getContacts: function (callback) { /* code you don't care about */ },
/**
* Callback will be invoked with (err, call)
*
**/
voiceCall: function (userId, callback) { /* code you don't care about */ }
}
chatServer.on("incomingCall", function (call) { /* your code */ });
var Call = {
acceptCall: function () { /* my code */ },
endCall: function () { /* my code */ }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment