From f40f4292a7de590985e3ef32d90b7d242b00b1ff Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 8 Jan 2016 15:15:39 -0800 Subject: [PATCH] Hogfather externs. --- externs/hogfather.js | 110 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 externs/hogfather.js diff --git a/externs/hogfather.js b/externs/hogfather.js new file mode 100644 index 0000000..bf07d2c --- /dev/null +++ b/externs/hogfather.js @@ -0,0 +1,110 @@ +/** + * @fileoverview Definitions for Cosmopolite API. Details of the API are at: + * https://www.cosmopolite.org/hogfather/reference + * + * @externs + * @author ian@cosmopolite.org (Ian Gulliver) + */ + + +/* Namespace */ +var hogfather = {}; + + +/** + * @constructor + * @param {Cosmopolite} cosmo + * @param {string} id + * @private + */ +hogfather.PublicChat = function(cosmo, id) {}; + + +/** + * @param {Cosmopolite} cosmo + * @return {Promise} + */ +hogfather.PublicChat.Create = function(cosmo) {}; + + +/** + * @param {Cosmopolite} cosmo + * @param {string} id + * @return {Promise} + */ +hogfather.PublicChat.Join = function(cosmo, id) {}; + + +/** + */ +hogfather.PublicChat.prototype.Shutdown = function() {}; + + +/** + * @return {string} + * @nosideeffects + */ +hogfather.PublicChat.prototype.getID = function() {}; + + +/** + * @return {boolean} + * @nosideeffects + */ +hogfather.PublicChat.prototype.amOwner = function() {}; + + +/** + * @return {boolean} + * @nosideeffects + */ +hogfather.PublicChat.prototype.amWriter = function() {}; + + +/** + * @return {Array.} + * @nosideeffects + */ +hogfather.PublicChat.prototype.getMessages = function() {}; + + +/** + * @return {Array.} + * @nosideeffects + */ +hogfather.PublicChat.prototype.getRequests = function() {}; + + +/** + * @param {!*} message + * @return {Promise} + */ +hogfather.PublicChat.prototype.sendMessage = function(message) {}; + + +/** + * @param {string} info + * @return {Promise} + */ +hogfather.PublicChat.prototype.requestAccess = function(info) {}; + + +/** + * @param {string} sender + * @return {Promise} + */ +hogfather.PublicChat.prototype.addOwner = function(sender) {}; + + +/** + * @param {string} sender + * @return {Promise} + */ +hogfather.PublicChat.prototype.addWriter = function(sender) {}; + + +/** + * @param {string} sender + * @return {Promise} + */ +hogfather.PublicChat.prototype.denyRequest = function(sender) {};