From 58d093adaa1f4967463a442969231855b03ba8c8 Mon Sep 17 00:00:00 2001 From: Michal Michalski Date: Thu, 7 Nov 2019 11:17:53 +0100 Subject: [PATCH] [messaging] Remove useless comments. Change-Id: I3b74b456b2a32a51fce8962c10edd60c1421749f Signed-off-by: Michal Michalski --- src/messaging/messaging_api.js | 61 +++--------------------------------------- 1 file changed, 4 insertions(+), 57 deletions(-) diff --git a/src/messaging/messaging_api.js b/src/messaging/messaging_api.js index e1e368c..395d4a6 100755 --- a/src/messaging/messaging_api.js +++ b/src/messaging/messaging_api.js @@ -52,26 +52,6 @@ function addTypeToFilter_(data) { return filter; } -/** - * Example usage: - * function Messaging () { - * propertyFactory_(this, 'ids', [2,3,4], Property.W | Property.E | Property.C); - * propertyFactory_(this, 'name', 'Name', Property.E); - * propertyFactory_(this, 'age', 25, Property.W); - * propertyFactory_(this, 'something', 1); - * propertyFactory_(this, 'getSomething', Property.E, {get: function(){return 100;}}); - * } - * Will produce: - * var m = new Messaging(); - * { - * id: [2,3,4], - * name: 'Name', - * age: 25 - * } - * - * m.name = 'A brand new name'; - * privUtils_.log(m.name); // Name - */ function propertyFactory_(that, name, value, flags, options) { flags = flags || 0; if (options === null || typeof options !== 'object') { @@ -112,9 +92,6 @@ function updateInternal_(internal, data) { } } -/** - * Specifies the Messaging service tags. - */ var MessageServiceTag = ['messaging.sms', 'messaging.mms', 'messaging.email']; function Message(type, data) { @@ -179,7 +156,7 @@ function Message(type, data) { inResponseTo: inResponseTo || null, attachments: attachments }; - // id + Object.defineProperty(this, 'id', { get: function() { return _internal.id; @@ -190,7 +167,6 @@ function Message(type, data) { enumerable: true }); - //conversationId Object.defineProperty(this, 'conversationId', { get: function() { return _internal.conversationId; @@ -202,7 +178,6 @@ function Message(type, data) { enumerable: true }); - // folderId Object.defineProperty(this, 'folderId', { get: function() { return _internal.folderId; @@ -213,7 +188,6 @@ function Message(type, data) { enumerable: true }); - // type Object.defineProperty(this, 'type', { get: function() { return _internal.type; @@ -224,7 +198,6 @@ function Message(type, data) { enumerable: true }); - // timestamp Object.defineProperty(this, 'timestamp', { get: function() { return _internal.timestamp @@ -239,7 +212,6 @@ function Message(type, data) { enumerable: true }); - // from Object.defineProperty(this, 'from', { get: function() { return _internal.from; @@ -250,7 +222,6 @@ function Message(type, data) { enumerable: true }); - // to Object.defineProperty(this, 'to', { get: function() { return _internal.to; @@ -262,7 +233,6 @@ function Message(type, data) { enumerable: true }); - // cc Object.defineProperty(this, 'cc', { get: function() { return _internal.cc; @@ -274,7 +244,6 @@ function Message(type, data) { enumerable: true }); - // bcc Object.defineProperty(this, 'bcc', { get: function() { return _internal.bcc; @@ -286,7 +255,6 @@ function Message(type, data) { enumerable: true }); - // body Object.defineProperty(this, 'body', { get: function() { return _internal.body; @@ -299,7 +267,6 @@ function Message(type, data) { enumerable: true }); - // isRead Object.defineProperty(this, 'isRead', { get: function() { return _internal.isRead; @@ -313,7 +280,6 @@ function Message(type, data) { enumerable: true }); - // hasAttachment Object.defineProperty(this, 'hasAttachment', { get: function() { return _internal.attachments.length > 0; @@ -325,7 +291,6 @@ function Message(type, data) { enumerable: true }); - // isHighPriority Object.defineProperty(this, 'isHighPriority', { get: function() { return _internal.isHighPriority; @@ -337,7 +302,6 @@ function Message(type, data) { enumerable: true }); - // subject Object.defineProperty(this, 'subject', { get: function() { return _internal.subject; @@ -349,7 +313,6 @@ function Message(type, data) { enumerable: true }); - // inResponseTo Object.defineProperty(this, 'inResponseTo', { get: function() { return _internal.inResponseTo; @@ -361,7 +324,6 @@ function Message(type, data) { enumerable: true }); - // messageStatus Object.defineProperty(this, 'messageStatus', { get: function() { if (_internal.id) { @@ -382,7 +344,6 @@ function Message(type, data) { enumerable: true }); - // attachments Object.defineProperty(this, 'attachments', { get: function() { return _internal.attachments; @@ -495,7 +456,6 @@ function MessageBody(data) { inlineAttachments: data.inlineAttachments || [] }; - // messageId Object.defineProperty(this, 'messageId', { get: function() { return _internal.messageId; @@ -506,7 +466,6 @@ function MessageBody(data) { enumerable: true }); - // loaded Object.defineProperty(this, 'loaded', { get: function() { return _internal.loaded; @@ -517,7 +476,6 @@ function MessageBody(data) { enumerable: true }); - // plainBody Object.defineProperty(this, 'plainBody', { get: function() { return _internal.plainBody; @@ -532,7 +490,6 @@ function MessageBody(data) { enumerable: true }); - // htmlBody Object.defineProperty(this, 'htmlBody', { get: function() { return _internal.htmlBody; @@ -547,7 +504,6 @@ function MessageBody(data) { enumerable: true }); - // inlineAttachments Object.defineProperty(this, 'inlineAttachments', { get: function() { return _internal.inlineAttachments; @@ -583,7 +539,6 @@ function MessageAttachment(first, second) { filePath: internalConstructor ? first.filePath : first }; - // messageId Object.defineProperty(this, 'messageId', { get: function() { return _internal.messageId; @@ -593,7 +548,7 @@ function MessageAttachment(first, second) { }, enumerable: true }); - // id + Object.defineProperty(this, 'id', { get: function() { return _internal.id; @@ -603,7 +558,7 @@ function MessageAttachment(first, second) { }, enumerable: true }); - // mimeType + Object.defineProperty(this, 'mimeType', { get: function() { return _internal.mimeType; @@ -613,7 +568,7 @@ function MessageAttachment(first, second) { }, enumerable: true }); - // filePath + Object.defineProperty(this, 'filePath', { get: function() { if (_internal.id && !messageAttachmentsLoaded[_internal.id]) { @@ -631,14 +586,6 @@ function MessageAttachment(first, second) { function Messaging() {} -/** - * Gets the messaging service of a given type for a given account. - * @param {!MessageServiceTag} messageServiceType Type of the services to be retrieved. - * @param {!MessageServiceArraySuccessCallback} successCallback Callback function that - * is called when the services are successfully retrieved. - * @param {ErrorCallback} errorCallback Callback function that is called when - * an error occurs. - */ Messaging.prototype.getMessageServices = function() { var args = validator_.validateArgs(arguments, [ { name: 'messageServiceType', type: types_.ENUM, values: MessageServiceTag }, -- 2.7.4