2016-01-08 15:15:39 -08:00
|
|
|
/**
|
|
|
|
|
* @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}
|
|
|
|
|
*/
|
2016-01-08 15:25:52 -08:00
|
|
|
hogfather.PublicChat.create = function(cosmo) {};
|
2016-01-08 15:15:39 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param {Cosmopolite} cosmo
|
|
|
|
|
* @param {string} id
|
|
|
|
|
* @return {Promise}
|
|
|
|
|
*/
|
2016-01-08 15:25:52 -08:00
|
|
|
hogfather.PublicChat.join = function(cosmo, id) {};
|
2016-01-08 15:15:39 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*/
|
2016-01-08 15:25:52 -08:00
|
|
|
hogfather.PublicChat.prototype.shutdown = function() {};
|
2016-01-08 15:15:39 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @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) {};
|