Hogfather externs.

This commit is contained in:
Ian Gulliver
2016-01-08 15:15:39 -08:00
parent 4471dfd05c
commit f40f4292a7

110
externs/hogfather.js Normal file
View File

@@ -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.<Cosmopolite.typeMessage>}
* @nosideeffects
*/
hogfather.PublicChat.prototype.getMessages = function() {};
/**
* @return {Array.<Cosmopolite.typeMessage>}
* @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) {};