multicastresult.js 657 B

12345678910111213141516171819202122232425262728
  1. /** DEPRECATED **/
  2. function MulitcastResult() {
  3. if (!(this instanceof MulitcastResult)) {
  4. return new MulitcastResult();
  5. }
  6. console.warn("You are using node-gcm MulticastResult, which is deprecated.");
  7. this.success = undefined;
  8. this.failure = undefined;
  9. this.canonicalIds = undefined;
  10. this.multicastId = undefined;
  11. this.results = [];
  12. this.retryMulticastIds = [];
  13. }
  14. MulitcastResult.prototype.addResult = function (result) {
  15. this.results.push(result);
  16. };
  17. MulitcastResult.prototype.getTotal = function () {
  18. return this.success + this.failure;
  19. };
  20. module.exports = MulitcastResult;
  21. /** END DEPRECATED **/