// // Autogenerated by Thrift Compiler (0.10.0) // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // "use strict"; var thrift = require('thrift'); var Thrift = thrift.Thrift; var Q = thrift.Q; var ttypes = require('./line_types'); //HELPER FUNCTIONS AND STRUCTURES var TalkService_getChatRoomAnnouncementsBulk_args = function(args) { this.chatRoomMids = null; if (args) { if (args.chatRoomMids !== undefined && args.chatRoomMids !== null) { this.chatRoomMids = Thrift.copyList(args.chatRoomMids, [null]); } } }; TalkService_getChatRoomAnnouncementsBulk_args.prototype = {}; TalkService_getChatRoomAnnouncementsBulk_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.LIST) { var _size1530 = 0; var _rtmp31534; this.chatRoomMids = []; var _etype1533 = 0; _rtmp31534 = input.readListBegin(); _etype1533 = _rtmp31534.etype; _size1530 = _rtmp31534.size; for (var _i1535 = 0; _i1535 < _size1530; ++_i1535) { var elem1536 = null; elem1536 = input.readString(); this.chatRoomMids.push(elem1536); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getChatRoomAnnouncementsBulk_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getChatRoomAnnouncementsBulk_args'); if (this.chatRoomMids !== null && this.chatRoomMids !== undefined) { output.writeFieldBegin('chatRoomMids', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.chatRoomMids.length); for (var iter1537 in this.chatRoomMids) { if (this.chatRoomMids.hasOwnProperty(iter1537)) { iter1537 = this.chatRoomMids[iter1537]; output.writeString(iter1537); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getChatRoomAnnouncementsBulk_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [Thrift.copyList, ttypes.ChatRoomAnnouncement]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getChatRoomAnnouncementsBulk_result.prototype = {}; TalkService_getChatRoomAnnouncementsBulk_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size1538 = 0; var _rtmp31542; this.success = {}; var _ktype1539 = 0; var _vtype1540 = 0; _rtmp31542 = input.readMapBegin(); _ktype1539 = _rtmp31542.ktype; _vtype1540 = _rtmp31542.vtype; _size1538 = _rtmp31542.size; for (var _i1543 = 0; _i1543 < _size1538; ++_i1543) { var key1544 = null; var val1545 = null; key1544 = input.readString(); var _size1546 = 0; var _rtmp31550; val1545 = []; var _etype1549 = 0; _rtmp31550 = input.readListBegin(); _etype1549 = _rtmp31550.etype; _size1546 = _rtmp31550.size; for (var _i1551 = 0; _i1551 < _size1546; ++_i1551) { var elem1552 = null; elem1552 = new ttypes.ChatRoomAnnouncement(); elem1552.read(input); val1545.push(elem1552); } input.readListEnd(); this.success[key1544] = val1545; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getChatRoomAnnouncementsBulk_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getChatRoomAnnouncementsBulk_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.LIST, Thrift.objectLength(this.success)); for (var kiter1553 in this.success) { if (this.success.hasOwnProperty(kiter1553)) { var viter1554 = this.success[kiter1553]; output.writeString(kiter1553); output.writeListBegin(Thrift.Type.STRUCT, viter1554.length); for (var iter1555 in viter1554) { if (viter1554.hasOwnProperty(iter1555)) { iter1555 = viter1554[iter1555]; iter1555.write(output); } } output.writeListEnd(); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getChatRoomAnnouncements_args = function(args) { this.chatRoomMid = null; if (args) { if (args.chatRoomMid !== undefined && args.chatRoomMid !== null) { this.chatRoomMid = args.chatRoomMid; } } }; TalkService_getChatRoomAnnouncements_args.prototype = {}; TalkService_getChatRoomAnnouncements_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.chatRoomMid = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getChatRoomAnnouncements_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getChatRoomAnnouncements_args'); if (this.chatRoomMid !== null && this.chatRoomMid !== undefined) { output.writeFieldBegin('chatRoomMid', Thrift.Type.STRING, 2); output.writeString(this.chatRoomMid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getChatRoomAnnouncements_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.ChatRoomAnnouncement]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getChatRoomAnnouncements_result.prototype = {}; TalkService_getChatRoomAnnouncements_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1556 = 0; var _rtmp31560; this.success = []; var _etype1559 = 0; _rtmp31560 = input.readListBegin(); _etype1559 = _rtmp31560.etype; _size1556 = _rtmp31560.size; for (var _i1561 = 0; _i1561 < _size1556; ++_i1561) { var elem1562 = null; elem1562 = new ttypes.ChatRoomAnnouncement(); elem1562.read(input); this.success.push(elem1562); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getChatRoomAnnouncements_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getChatRoomAnnouncements_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1563 in this.success) { if (this.success.hasOwnProperty(iter1563)) { iter1563 = this.success[iter1563]; iter1563.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createChatRoomAnnouncement_args = function(args) { this.reqSeq = null; this.chatRoomMid = null; this.type = null; this.contents = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.chatRoomMid !== undefined && args.chatRoomMid !== null) { this.chatRoomMid = args.chatRoomMid; } if (args.type !== undefined && args.type !== null) { this.type = args.type; } if (args.contents !== undefined && args.contents !== null) { this.contents = new ttypes.ChatRoomAnnouncementContents(args.contents); } } }; TalkService_createChatRoomAnnouncement_args.prototype = {}; TalkService_createChatRoomAnnouncement_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.chatRoomMid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.type = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRUCT) { this.contents = new ttypes.ChatRoomAnnouncementContents(); this.contents.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createChatRoomAnnouncement_args.prototype.write = function(output) { output.writeStructBegin('TalkService_createChatRoomAnnouncement_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.chatRoomMid !== null && this.chatRoomMid !== undefined) { output.writeFieldBegin('chatRoomMid', Thrift.Type.STRING, 2); output.writeString(this.chatRoomMid); output.writeFieldEnd(); } if (this.type !== null && this.type !== undefined) { output.writeFieldBegin('type', Thrift.Type.I32, 3); output.writeI32(this.type); output.writeFieldEnd(); } if (this.contents !== null && this.contents !== undefined) { output.writeFieldBegin('contents', Thrift.Type.STRUCT, 4); this.contents.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createChatRoomAnnouncement_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.ChatRoomAnnouncement(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_createChatRoomAnnouncement_result.prototype = {}; TalkService_createChatRoomAnnouncement_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.ChatRoomAnnouncement(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createChatRoomAnnouncement_result.prototype.write = function(output) { output.writeStructBegin('TalkService_createChatRoomAnnouncement_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeChatRoomAnnouncement_args = function(args) { this.reqSeq = null; this.chatRoomMid = null; this.announcementSeq = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.chatRoomMid !== undefined && args.chatRoomMid !== null) { this.chatRoomMid = args.chatRoomMid; } if (args.announcementSeq !== undefined && args.announcementSeq !== null) { this.announcementSeq = args.announcementSeq; } } }; TalkService_removeChatRoomAnnouncement_args.prototype = {}; TalkService_removeChatRoomAnnouncement_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.chatRoomMid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { this.announcementSeq = input.readI64(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeChatRoomAnnouncement_args.prototype.write = function(output) { output.writeStructBegin('TalkService_removeChatRoomAnnouncement_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.chatRoomMid !== null && this.chatRoomMid !== undefined) { output.writeFieldBegin('chatRoomMid', Thrift.Type.STRING, 2); output.writeString(this.chatRoomMid); output.writeFieldEnd(); } if (this.announcementSeq !== null && this.announcementSeq !== undefined) { output.writeFieldBegin('announcementSeq', Thrift.Type.I64, 3); output.writeI64(this.announcementSeq); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeChatRoomAnnouncement_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_removeChatRoomAnnouncement_result.prototype = {}; TalkService_removeChatRoomAnnouncement_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeChatRoomAnnouncement_result.prototype.write = function(output) { output.writeStructBegin('TalkService_removeChatRoomAnnouncement_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_unsendMessage_args = function(args) { this.seq = null; this.messageId = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } } }; TalkService_unsendMessage_args.prototype = {}; TalkService_unsendMessage_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.messageId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_unsendMessage_args.prototype.write = function(output) { output.writeStructBegin('TalkService_unsendMessage_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.messageId !== null && this.messageId !== undefined) { output.writeFieldBegin('messageId', Thrift.Type.STRING, 2); output.writeString(this.messageId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_unsendMessage_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_unsendMessage_result.prototype = {}; TalkService_unsendMessage_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_unsendMessage_result.prototype.write = function(output) { output.writeStructBegin('TalkService_unsendMessage_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroupWithoutMembers_args = function(args) { this.groupId = null; if (args) { if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } } }; TalkService_getGroupWithoutMembers_args.prototype = {}; TalkService_getGroupWithoutMembers_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.groupId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroupWithoutMembers_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroupWithoutMembers_args'); if (this.groupId !== null && this.groupId !== undefined) { output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); output.writeString(this.groupId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroupWithoutMembers_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Group(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getGroupWithoutMembers_result.prototype = {}; TalkService_getGroupWithoutMembers_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Group(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroupWithoutMembers_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroupWithoutMembers_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_requestResendMessage_args = function(args) { this.reqSeq = null; this.senderMid = null; this.messageId = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.senderMid !== undefined && args.senderMid !== null) { this.senderMid = args.senderMid; } if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } } }; TalkService_requestResendMessage_args.prototype = {}; TalkService_requestResendMessage_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.senderMid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.messageId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_requestResendMessage_args.prototype.write = function(output) { output.writeStructBegin('TalkService_requestResendMessage_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.senderMid !== null && this.senderMid !== undefined) { output.writeFieldBegin('senderMid', Thrift.Type.STRING, 2); output.writeString(this.senderMid); output.writeFieldEnd(); } if (this.messageId !== null && this.messageId !== undefined) { output.writeFieldBegin('messageId', Thrift.Type.STRING, 3); output.writeString(this.messageId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_requestResendMessage_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_requestResendMessage_result.prototype = {}; TalkService_requestResendMessage_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_requestResendMessage_result.prototype.write = function(output) { output.writeStructBegin('TalkService_requestResendMessage_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_respondResendMessage_args = function(args) { this.reqSeq = null; this.receiverMid = null; this.originalMessageId = null; this.resendMessage = null; this.errorCode = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.receiverMid !== undefined && args.receiverMid !== null) { this.receiverMid = args.receiverMid; } if (args.originalMessageId !== undefined && args.originalMessageId !== null) { this.originalMessageId = args.originalMessageId; } if (args.resendMessage !== undefined && args.resendMessage !== null) { this.resendMessage = new ttypes.Message(args.resendMessage); } if (args.errorCode !== undefined && args.errorCode !== null) { this.errorCode = args.errorCode; } } }; TalkService_respondResendMessage_args.prototype = {}; TalkService_respondResendMessage_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.receiverMid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.originalMessageId = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRUCT) { this.resendMessage = new ttypes.Message(); this.resendMessage.read(input); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { this.errorCode = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_respondResendMessage_args.prototype.write = function(output) { output.writeStructBegin('TalkService_respondResendMessage_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.receiverMid !== null && this.receiverMid !== undefined) { output.writeFieldBegin('receiverMid', Thrift.Type.STRING, 2); output.writeString(this.receiverMid); output.writeFieldEnd(); } if (this.originalMessageId !== null && this.originalMessageId !== undefined) { output.writeFieldBegin('originalMessageId', Thrift.Type.STRING, 3); output.writeString(this.originalMessageId); output.writeFieldEnd(); } if (this.resendMessage !== null && this.resendMessage !== undefined) { output.writeFieldBegin('resendMessage', Thrift.Type.STRUCT, 4); this.resendMessage.write(output); output.writeFieldEnd(); } if (this.errorCode !== null && this.errorCode !== undefined) { output.writeFieldBegin('errorCode', Thrift.Type.I32, 5); output.writeI32(this.errorCode); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_respondResendMessage_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_respondResendMessage_result.prototype = {}; TalkService_respondResendMessage_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_respondResendMessage_result.prototype.write = function(output) { output.writeStructBegin('TalkService_respondResendMessage_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acceptGroupInvitation_args = function(args) { this.reqSeq = null; this.groupId = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } } }; TalkService_acceptGroupInvitation_args.prototype = {}; TalkService_acceptGroupInvitation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.groupId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acceptGroupInvitation_args.prototype.write = function(output) { output.writeStructBegin('TalkService_acceptGroupInvitation_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.groupId !== null && this.groupId !== undefined) { output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); output.writeString(this.groupId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acceptGroupInvitation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_acceptGroupInvitation_result.prototype = {}; TalkService_acceptGroupInvitation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acceptGroupInvitation_result.prototype.write = function(output) { output.writeStructBegin('TalkService_acceptGroupInvitation_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acceptGroupInvitationByTicket_args = function(args) { this.reqSeq = null; this.GroupMid = null; this.ticketId = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.GroupMid !== undefined && args.GroupMid !== null) { this.GroupMid = args.GroupMid; } if (args.ticketId !== undefined && args.ticketId !== null) { this.ticketId = args.ticketId; } } }; TalkService_acceptGroupInvitationByTicket_args.prototype = {}; TalkService_acceptGroupInvitationByTicket_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.GroupMid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.ticketId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acceptGroupInvitationByTicket_args.prototype.write = function(output) { output.writeStructBegin('TalkService_acceptGroupInvitationByTicket_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.GroupMid !== null && this.GroupMid !== undefined) { output.writeFieldBegin('GroupMid', Thrift.Type.STRING, 2); output.writeString(this.GroupMid); output.writeFieldEnd(); } if (this.ticketId !== null && this.ticketId !== undefined) { output.writeFieldBegin('ticketId', Thrift.Type.STRING, 3); output.writeString(this.ticketId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acceptGroupInvitationByTicket_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_acceptGroupInvitationByTicket_result.prototype = {}; TalkService_acceptGroupInvitationByTicket_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acceptGroupInvitationByTicket_result.prototype.write = function(output) { output.writeStructBegin('TalkService_acceptGroupInvitationByTicket_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acceptProximityMatches_args = function(args) { this.sessionId = null; this.ids = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } if (args.ids !== undefined && args.ids !== null) { this.ids = Thrift.copyList(args.ids, [null]); } } }; TalkService_acceptProximityMatches_args.prototype = {}; TalkService_acceptProximityMatches_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.SET) { var _size1564 = 0; var _rtmp31568; this.ids = []; var _etype1567 = 0; _rtmp31568 = input.readSetBegin(); _etype1567 = _rtmp31568.etype; _size1564 = _rtmp31568.size; for (var _i1569 = 0; _i1569 < _size1564; ++_i1569) { var elem1570 = null; elem1570 = input.readString(); this.ids.push(elem1570); } input.readSetEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acceptProximityMatches_args.prototype.write = function(output) { output.writeStructBegin('TalkService_acceptProximityMatches_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } if (this.ids !== null && this.ids !== undefined) { output.writeFieldBegin('ids', Thrift.Type.SET, 3); output.writeSetBegin(Thrift.Type.STRING, this.ids.length); for (var iter1571 in this.ids) { if (this.ids.hasOwnProperty(iter1571)) { iter1571 = this.ids[iter1571]; output.writeString(iter1571); } } output.writeSetEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acceptProximityMatches_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_acceptProximityMatches_result.prototype = {}; TalkService_acceptProximityMatches_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acceptProximityMatches_result.prototype.write = function(output) { output.writeStructBegin('TalkService_acceptProximityMatches_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acquireCallRoute_args = function(args) { this.to = null; if (args) { if (args.to !== undefined && args.to !== null) { this.to = args.to; } } }; TalkService_acquireCallRoute_args.prototype = {}; TalkService_acquireCallRoute_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.to = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acquireCallRoute_args.prototype.write = function(output) { output.writeStructBegin('TalkService_acquireCallRoute_args'); if (this.to !== null && this.to !== undefined) { output.writeFieldBegin('to', Thrift.Type.STRING, 2); output.writeString(this.to); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acquireCallRoute_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_acquireCallRoute_result.prototype = {}; TalkService_acquireCallRoute_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1572 = 0; var _rtmp31576; this.success = []; var _etype1575 = 0; _rtmp31576 = input.readListBegin(); _etype1575 = _rtmp31576.etype; _size1572 = _rtmp31576.size; for (var _i1577 = 0; _i1577 < _size1572; ++_i1577) { var elem1578 = null; elem1578 = input.readString(); this.success.push(elem1578); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acquireCallRoute_result.prototype.write = function(output) { output.writeStructBegin('TalkService_acquireCallRoute_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter1579 in this.success) { if (this.success.hasOwnProperty(iter1579)) { iter1579 = this.success[iter1579]; output.writeString(iter1579); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acquireCallTicket_args = function(args) { this.to = null; if (args) { if (args.to !== undefined && args.to !== null) { this.to = args.to; } } }; TalkService_acquireCallTicket_args.prototype = {}; TalkService_acquireCallTicket_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.to = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acquireCallTicket_args.prototype.write = function(output) { output.writeStructBegin('TalkService_acquireCallTicket_args'); if (this.to !== null && this.to !== undefined) { output.writeFieldBegin('to', Thrift.Type.STRING, 2); output.writeString(this.to); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acquireCallTicket_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_acquireCallTicket_result.prototype = {}; TalkService_acquireCallTicket_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acquireCallTicket_result.prototype.write = function(output) { output.writeStructBegin('TalkService_acquireCallTicket_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acquireEncryptedAccessToken_args = function(args) { this.featureType = null; if (args) { if (args.featureType !== undefined && args.featureType !== null) { this.featureType = args.featureType; } } }; TalkService_acquireEncryptedAccessToken_args.prototype = {}; TalkService_acquireEncryptedAccessToken_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.featureType = input.readI32(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acquireEncryptedAccessToken_args.prototype.write = function(output) { output.writeStructBegin('TalkService_acquireEncryptedAccessToken_args'); if (this.featureType !== null && this.featureType !== undefined) { output.writeFieldBegin('featureType', Thrift.Type.I32, 2); output.writeI32(this.featureType); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_acquireEncryptedAccessToken_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_acquireEncryptedAccessToken_result.prototype = {}; TalkService_acquireEncryptedAccessToken_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_acquireEncryptedAccessToken_result.prototype.write = function(output) { output.writeStructBegin('TalkService_acquireEncryptedAccessToken_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_addSnsId_args = function(args) { this.snsIdType = null; this.snsAccessToken = null; if (args) { if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } if (args.snsAccessToken !== undefined && args.snsAccessToken !== null) { this.snsAccessToken = args.snsAccessToken; } } }; TalkService_addSnsId_args.prototype = {}; TalkService_addSnsId_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.snsIdType = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.snsAccessToken = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_addSnsId_args.prototype.write = function(output) { output.writeStructBegin('TalkService_addSnsId_args'); if (this.snsIdType !== null && this.snsIdType !== undefined) { output.writeFieldBegin('snsIdType', Thrift.Type.I32, 2); output.writeI32(this.snsIdType); output.writeFieldEnd(); } if (this.snsAccessToken !== null && this.snsAccessToken !== undefined) { output.writeFieldBegin('snsAccessToken', Thrift.Type.STRING, 3); output.writeString(this.snsAccessToken); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_addSnsId_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_addSnsId_result.prototype = {}; TalkService_addSnsId_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_addSnsId_result.prototype.write = function(output) { output.writeStructBegin('TalkService_addSnsId_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_blockContact_args = function(args) { this.reqSeq = null; this.id = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.id !== undefined && args.id !== null) { this.id = args.id; } } }; TalkService_blockContact_args.prototype = {}; TalkService_blockContact_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.id = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_blockContact_args.prototype.write = function(output) { output.writeStructBegin('TalkService_blockContact_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.id !== null && this.id !== undefined) { output.writeFieldBegin('id', Thrift.Type.STRING, 2); output.writeString(this.id); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_blockContact_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_blockContact_result.prototype = {}; TalkService_blockContact_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_blockContact_result.prototype.write = function(output) { output.writeStructBegin('TalkService_blockContact_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_blockRecommendation_args = function(args) { this.reqSeq = null; this.id = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.id !== undefined && args.id !== null) { this.id = args.id; } } }; TalkService_blockRecommendation_args.prototype = {}; TalkService_blockRecommendation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.id = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_blockRecommendation_args.prototype.write = function(output) { output.writeStructBegin('TalkService_blockRecommendation_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.id !== null && this.id !== undefined) { output.writeFieldBegin('id', Thrift.Type.STRING, 2); output.writeString(this.id); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_blockRecommendation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_blockRecommendation_result.prototype = {}; TalkService_blockRecommendation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_blockRecommendation_result.prototype.write = function(output) { output.writeStructBegin('TalkService_blockRecommendation_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_cancelGroupInvitation_args = function(args) { this.reqSeq = null; this.groupId = null; this.contactIds = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } if (args.contactIds !== undefined && args.contactIds !== null) { this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; TalkService_cancelGroupInvitation_args.prototype = {}; TalkService_cancelGroupInvitation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.groupId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size1580 = 0; var _rtmp31584; this.contactIds = []; var _etype1583 = 0; _rtmp31584 = input.readListBegin(); _etype1583 = _rtmp31584.etype; _size1580 = _rtmp31584.size; for (var _i1585 = 0; _i1585 < _size1580; ++_i1585) { var elem1586 = null; elem1586 = input.readString(); this.contactIds.push(elem1586); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_cancelGroupInvitation_args.prototype.write = function(output) { output.writeStructBegin('TalkService_cancelGroupInvitation_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.groupId !== null && this.groupId !== undefined) { output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); output.writeString(this.groupId); output.writeFieldEnd(); } if (this.contactIds !== null && this.contactIds !== undefined) { output.writeFieldBegin('contactIds', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.contactIds.length); for (var iter1587 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter1587)) { iter1587 = this.contactIds[iter1587]; output.writeString(iter1587); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_cancelGroupInvitation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_cancelGroupInvitation_result.prototype = {}; TalkService_cancelGroupInvitation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_cancelGroupInvitation_result.prototype.write = function(output) { output.writeStructBegin('TalkService_cancelGroupInvitation_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_changeVerificationMethod_args = function(args) { this.sessionId = null; this.method = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } if (args.method !== undefined && args.method !== null) { this.method = args.method; } } }; TalkService_changeVerificationMethod_args.prototype = {}; TalkService_changeVerificationMethod_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.method = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_changeVerificationMethod_args.prototype.write = function(output) { output.writeStructBegin('TalkService_changeVerificationMethod_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } if (this.method !== null && this.method !== undefined) { output.writeFieldBegin('method', Thrift.Type.I32, 3); output.writeI32(this.method); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_changeVerificationMethod_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.VerificationSessionData(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_changeVerificationMethod_result.prototype = {}; TalkService_changeVerificationMethod_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.VerificationSessionData(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_changeVerificationMethod_result.prototype.write = function(output) { output.writeStructBegin('TalkService_changeVerificationMethod_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_clearIdentityCredential_args = function(args) { }; TalkService_clearIdentityCredential_args.prototype = {}; TalkService_clearIdentityCredential_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_clearIdentityCredential_args.prototype.write = function(output) { output.writeStructBegin('TalkService_clearIdentityCredential_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_clearIdentityCredential_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_clearIdentityCredential_result.prototype = {}; TalkService_clearIdentityCredential_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_clearIdentityCredential_result.prototype.write = function(output) { output.writeStructBegin('TalkService_clearIdentityCredential_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_clearMessageBox_args = function(args) { this.channelId = null; this.messageBoxId = null; if (args) { if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } } }; TalkService_clearMessageBox_args.prototype = {}; TalkService_clearMessageBox_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.channelId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.messageBoxId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_clearMessageBox_args.prototype.write = function(output) { output.writeStructBegin('TalkService_clearMessageBox_args'); if (this.channelId !== null && this.channelId !== undefined) { output.writeFieldBegin('channelId', Thrift.Type.STRING, 2); output.writeString(this.channelId); output.writeFieldEnd(); } if (this.messageBoxId !== null && this.messageBoxId !== undefined) { output.writeFieldBegin('messageBoxId', Thrift.Type.STRING, 3); output.writeString(this.messageBoxId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_clearMessageBox_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_clearMessageBox_result.prototype = {}; TalkService_clearMessageBox_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_clearMessageBox_result.prototype.write = function(output) { output.writeStructBegin('TalkService_clearMessageBox_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_closeProximityMatch_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } }; TalkService_closeProximityMatch_args.prototype = {}; TalkService_closeProximityMatch_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_closeProximityMatch_args.prototype.write = function(output) { output.writeStructBegin('TalkService_closeProximityMatch_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_closeProximityMatch_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_closeProximityMatch_result.prototype = {}; TalkService_closeProximityMatch_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_closeProximityMatch_result.prototype.write = function(output) { output.writeStructBegin('TalkService_closeProximityMatch_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_commitSendMessage_args = function(args) { this.seq = null; this.messageId = null; this.receiverMids = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } if (args.receiverMids !== undefined && args.receiverMids !== null) { this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; TalkService_commitSendMessage_args.prototype = {}; TalkService_commitSendMessage_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.messageId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size1588 = 0; var _rtmp31592; this.receiverMids = []; var _etype1591 = 0; _rtmp31592 = input.readListBegin(); _etype1591 = _rtmp31592.etype; _size1588 = _rtmp31592.size; for (var _i1593 = 0; _i1593 < _size1588; ++_i1593) { var elem1594 = null; elem1594 = input.readString(); this.receiverMids.push(elem1594); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_commitSendMessage_args.prototype.write = function(output) { output.writeStructBegin('TalkService_commitSendMessage_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.messageId !== null && this.messageId !== undefined) { output.writeFieldBegin('messageId', Thrift.Type.STRING, 2); output.writeString(this.messageId); output.writeFieldEnd(); } if (this.receiverMids !== null && this.receiverMids !== undefined) { output.writeFieldBegin('receiverMids', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.receiverMids.length); for (var iter1595 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter1595)) { iter1595 = this.receiverMids[iter1595]; output.writeString(iter1595); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_commitSendMessage_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_commitSendMessage_result.prototype = {}; TalkService_commitSendMessage_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size1596 = 0; var _rtmp31600; this.success = {}; var _ktype1597 = 0; var _vtype1598 = 0; _rtmp31600 = input.readMapBegin(); _ktype1597 = _rtmp31600.ktype; _vtype1598 = _rtmp31600.vtype; _size1596 = _rtmp31600.size; for (var _i1601 = 0; _i1601 < _size1596; ++_i1601) { var key1602 = null; var val1603 = null; key1602 = input.readString(); val1603 = input.readString(); this.success[key1602] = val1603; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_commitSendMessage_result.prototype.write = function(output) { output.writeStructBegin('TalkService_commitSendMessage_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.success)); for (var kiter1604 in this.success) { if (this.success.hasOwnProperty(kiter1604)) { var viter1605 = this.success[kiter1604]; output.writeString(kiter1604); output.writeString(viter1605); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_commitSendMessages_args = function(args) { this.seq = null; this.messageIds = null; this.receiverMids = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.messageIds !== undefined && args.messageIds !== null) { this.messageIds = Thrift.copyList(args.messageIds, [null]); } if (args.receiverMids !== undefined && args.receiverMids !== null) { this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; TalkService_commitSendMessages_args.prototype = {}; TalkService_commitSendMessages_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size1606 = 0; var _rtmp31610; this.messageIds = []; var _etype1609 = 0; _rtmp31610 = input.readListBegin(); _etype1609 = _rtmp31610.etype; _size1606 = _rtmp31610.size; for (var _i1611 = 0; _i1611 < _size1606; ++_i1611) { var elem1612 = null; elem1612 = input.readString(); this.messageIds.push(elem1612); } input.readListEnd(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size1613 = 0; var _rtmp31617; this.receiverMids = []; var _etype1616 = 0; _rtmp31617 = input.readListBegin(); _etype1616 = _rtmp31617.etype; _size1613 = _rtmp31617.size; for (var _i1618 = 0; _i1618 < _size1613; ++_i1618) { var elem1619 = null; elem1619 = input.readString(); this.receiverMids.push(elem1619); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_commitSendMessages_args.prototype.write = function(output) { output.writeStructBegin('TalkService_commitSendMessages_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.messageIds !== null && this.messageIds !== undefined) { output.writeFieldBegin('messageIds', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.messageIds.length); for (var iter1620 in this.messageIds) { if (this.messageIds.hasOwnProperty(iter1620)) { iter1620 = this.messageIds[iter1620]; output.writeString(iter1620); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.receiverMids !== null && this.receiverMids !== undefined) { output.writeFieldBegin('receiverMids', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.receiverMids.length); for (var iter1621 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter1621)) { iter1621 = this.receiverMids[iter1621]; output.writeString(iter1621); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_commitSendMessages_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_commitSendMessages_result.prototype = {}; TalkService_commitSendMessages_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size1622 = 0; var _rtmp31626; this.success = {}; var _ktype1623 = 0; var _vtype1624 = 0; _rtmp31626 = input.readMapBegin(); _ktype1623 = _rtmp31626.ktype; _vtype1624 = _rtmp31626.vtype; _size1622 = _rtmp31626.size; for (var _i1627 = 0; _i1627 < _size1622; ++_i1627) { var key1628 = null; var val1629 = null; key1628 = input.readString(); val1629 = input.readString(); this.success[key1628] = val1629; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_commitSendMessages_result.prototype.write = function(output) { output.writeStructBegin('TalkService_commitSendMessages_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.success)); for (var kiter1630 in this.success) { if (this.success.hasOwnProperty(kiter1630)) { var viter1631 = this.success[kiter1630]; output.writeString(kiter1630); output.writeString(viter1631); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_commitUpdateProfile_args = function(args) { this.seq = null; this.attrs = null; this.receiverMids = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.attrs !== undefined && args.attrs !== null) { this.attrs = Thrift.copyList(args.attrs, [null]); } if (args.receiverMids !== undefined && args.receiverMids !== null) { this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; TalkService_commitUpdateProfile_args.prototype = {}; TalkService_commitUpdateProfile_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size1632 = 0; var _rtmp31636; this.attrs = []; var _etype1635 = 0; _rtmp31636 = input.readListBegin(); _etype1635 = _rtmp31636.etype; _size1632 = _rtmp31636.size; for (var _i1637 = 0; _i1637 < _size1632; ++_i1637) { var elem1638 = null; elem1638 = input.readI32(); this.attrs.push(elem1638); } input.readListEnd(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size1639 = 0; var _rtmp31643; this.receiverMids = []; var _etype1642 = 0; _rtmp31643 = input.readListBegin(); _etype1642 = _rtmp31643.etype; _size1639 = _rtmp31643.size; for (var _i1644 = 0; _i1644 < _size1639; ++_i1644) { var elem1645 = null; elem1645 = input.readString(); this.receiverMids.push(elem1645); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_commitUpdateProfile_args.prototype.write = function(output) { output.writeStructBegin('TalkService_commitUpdateProfile_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.attrs !== null && this.attrs !== undefined) { output.writeFieldBegin('attrs', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.I32, this.attrs.length); for (var iter1646 in this.attrs) { if (this.attrs.hasOwnProperty(iter1646)) { iter1646 = this.attrs[iter1646]; output.writeI32(iter1646); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.receiverMids !== null && this.receiverMids !== undefined) { output.writeFieldBegin('receiverMids', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.receiverMids.length); for (var iter1647 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter1647)) { iter1647 = this.receiverMids[iter1647]; output.writeString(iter1647); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_commitUpdateProfile_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_commitUpdateProfile_result.prototype = {}; TalkService_commitUpdateProfile_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size1648 = 0; var _rtmp31652; this.success = {}; var _ktype1649 = 0; var _vtype1650 = 0; _rtmp31652 = input.readMapBegin(); _ktype1649 = _rtmp31652.ktype; _vtype1650 = _rtmp31652.vtype; _size1648 = _rtmp31652.size; for (var _i1653 = 0; _i1653 < _size1648; ++_i1653) { var key1654 = null; var val1655 = null; key1654 = input.readString(); val1655 = input.readString(); this.success[key1654] = val1655; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_commitUpdateProfile_result.prototype.write = function(output) { output.writeStructBegin('TalkService_commitUpdateProfile_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.success)); for (var kiter1656 in this.success) { if (this.success.hasOwnProperty(kiter1656)) { var viter1657 = this.success[kiter1656]; output.writeString(kiter1656); output.writeString(viter1657); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_confirmEmail_args = function(args) { this.verifier = null; this.pinCode = null; if (args) { if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } if (args.pinCode !== undefined && args.pinCode !== null) { this.pinCode = args.pinCode; } } }; TalkService_confirmEmail_args.prototype = {}; TalkService_confirmEmail_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.verifier = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.pinCode = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_confirmEmail_args.prototype.write = function(output) { output.writeStructBegin('TalkService_confirmEmail_args'); if (this.verifier !== null && this.verifier !== undefined) { output.writeFieldBegin('verifier', Thrift.Type.STRING, 2); output.writeString(this.verifier); output.writeFieldEnd(); } if (this.pinCode !== null && this.pinCode !== undefined) { output.writeFieldBegin('pinCode', Thrift.Type.STRING, 3); output.writeString(this.pinCode); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_confirmEmail_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_confirmEmail_result.prototype = {}; TalkService_confirmEmail_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_confirmEmail_result.prototype.write = function(output) { output.writeStructBegin('TalkService_confirmEmail_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createGroup_args = function(args) { this.seq = null; this.name = null; this.contactIds = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.name !== undefined && args.name !== null) { this.name = args.name; } if (args.contactIds !== undefined && args.contactIds !== null) { this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; TalkService_createGroup_args.prototype = {}; TalkService_createGroup_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.name = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size1658 = 0; var _rtmp31662; this.contactIds = []; var _etype1661 = 0; _rtmp31662 = input.readListBegin(); _etype1661 = _rtmp31662.etype; _size1658 = _rtmp31662.size; for (var _i1663 = 0; _i1663 < _size1658; ++_i1663) { var elem1664 = null; elem1664 = input.readString(); this.contactIds.push(elem1664); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createGroup_args.prototype.write = function(output) { output.writeStructBegin('TalkService_createGroup_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.name !== null && this.name !== undefined) { output.writeFieldBegin('name', Thrift.Type.STRING, 2); output.writeString(this.name); output.writeFieldEnd(); } if (this.contactIds !== null && this.contactIds !== undefined) { output.writeFieldBegin('contactIds', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.contactIds.length); for (var iter1665 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter1665)) { iter1665 = this.contactIds[iter1665]; output.writeString(iter1665); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createGroup_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Group(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_createGroup_result.prototype = {}; TalkService_createGroup_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Group(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createGroup_result.prototype.write = function(output) { output.writeStructBegin('TalkService_createGroup_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createQrcodeBase64Image_args = function(args) { this.url = null; this.characterSet = null; this.imageSize = null; this.x = null; this.y = null; this.width = null; this.height = null; if (args) { if (args.url !== undefined && args.url !== null) { this.url = args.url; } if (args.characterSet !== undefined && args.characterSet !== null) { this.characterSet = args.characterSet; } if (args.imageSize !== undefined && args.imageSize !== null) { this.imageSize = args.imageSize; } if (args.x !== undefined && args.x !== null) { this.x = args.x; } if (args.y !== undefined && args.y !== null) { this.y = args.y; } if (args.width !== undefined && args.width !== null) { this.width = args.width; } if (args.height !== undefined && args.height !== null) { this.height = args.height; } } }; TalkService_createQrcodeBase64Image_args.prototype = {}; TalkService_createQrcodeBase64Image_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.url = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.characterSet = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.imageSize = input.readI32(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { this.x = input.readI32(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.I32) { this.y = input.readI32(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.I32) { this.width = input.readI32(); } else { input.skip(ftype); } break; case 8: if (ftype == Thrift.Type.I32) { this.height = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createQrcodeBase64Image_args.prototype.write = function(output) { output.writeStructBegin('TalkService_createQrcodeBase64Image_args'); if (this.url !== null && this.url !== undefined) { output.writeFieldBegin('url', Thrift.Type.STRING, 2); output.writeString(this.url); output.writeFieldEnd(); } if (this.characterSet !== null && this.characterSet !== undefined) { output.writeFieldBegin('characterSet', Thrift.Type.STRING, 3); output.writeString(this.characterSet); output.writeFieldEnd(); } if (this.imageSize !== null && this.imageSize !== undefined) { output.writeFieldBegin('imageSize', Thrift.Type.I32, 4); output.writeI32(this.imageSize); output.writeFieldEnd(); } if (this.x !== null && this.x !== undefined) { output.writeFieldBegin('x', Thrift.Type.I32, 5); output.writeI32(this.x); output.writeFieldEnd(); } if (this.y !== null && this.y !== undefined) { output.writeFieldBegin('y', Thrift.Type.I32, 6); output.writeI32(this.y); output.writeFieldEnd(); } if (this.width !== null && this.width !== undefined) { output.writeFieldBegin('width', Thrift.Type.I32, 7); output.writeI32(this.width); output.writeFieldEnd(); } if (this.height !== null && this.height !== undefined) { output.writeFieldBegin('height', Thrift.Type.I32, 8); output.writeI32(this.height); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createQrcodeBase64Image_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_createQrcodeBase64Image_result.prototype = {}; TalkService_createQrcodeBase64Image_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createQrcodeBase64Image_result.prototype.write = function(output) { output.writeStructBegin('TalkService_createQrcodeBase64Image_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createRoom_args = function(args) { this.reqSeq = null; this.contactIds = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.contactIds !== undefined && args.contactIds !== null) { this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; TalkService_createRoom_args.prototype = {}; TalkService_createRoom_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size1666 = 0; var _rtmp31670; this.contactIds = []; var _etype1669 = 0; _rtmp31670 = input.readListBegin(); _etype1669 = _rtmp31670.etype; _size1666 = _rtmp31670.size; for (var _i1671 = 0; _i1671 < _size1666; ++_i1671) { var elem1672 = null; elem1672 = input.readString(); this.contactIds.push(elem1672); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createRoom_args.prototype.write = function(output) { output.writeStructBegin('TalkService_createRoom_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.contactIds !== null && this.contactIds !== undefined) { output.writeFieldBegin('contactIds', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.contactIds.length); for (var iter1673 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter1673)) { iter1673 = this.contactIds[iter1673]; output.writeString(iter1673); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createRoom_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Room(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_createRoom_result.prototype = {}; TalkService_createRoom_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Room(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createRoom_result.prototype.write = function(output) { output.writeStructBegin('TalkService_createRoom_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createSession_args = function(args) { }; TalkService_createSession_args.prototype = {}; TalkService_createSession_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createSession_args.prototype.write = function(output) { output.writeStructBegin('TalkService_createSession_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createSession_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_createSession_result.prototype = {}; TalkService_createSession_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createSession_result.prototype.write = function(output) { output.writeStructBegin('TalkService_createSession_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_fetchAnnouncements_args = function(args) { this.lastFetchedIndex = null; if (args) { if (args.lastFetchedIndex !== undefined && args.lastFetchedIndex !== null) { this.lastFetchedIndex = args.lastFetchedIndex; } } }; TalkService_fetchAnnouncements_args.prototype = {}; TalkService_fetchAnnouncements_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.lastFetchedIndex = input.readI32(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_fetchAnnouncements_args.prototype.write = function(output) { output.writeStructBegin('TalkService_fetchAnnouncements_args'); if (this.lastFetchedIndex !== null && this.lastFetchedIndex !== undefined) { output.writeFieldBegin('lastFetchedIndex', Thrift.Type.I32, 2); output.writeI32(this.lastFetchedIndex); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_fetchAnnouncements_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Announcement]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_fetchAnnouncements_result.prototype = {}; TalkService_fetchAnnouncements_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1674 = 0; var _rtmp31678; this.success = []; var _etype1677 = 0; _rtmp31678 = input.readListBegin(); _etype1677 = _rtmp31678.etype; _size1674 = _rtmp31678.size; for (var _i1679 = 0; _i1679 < _size1674; ++_i1679) { var elem1680 = null; elem1680 = new ttypes.Announcement(); elem1680.read(input); this.success.push(elem1680); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_fetchAnnouncements_result.prototype.write = function(output) { output.writeStructBegin('TalkService_fetchAnnouncements_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1681 in this.success) { if (this.success.hasOwnProperty(iter1681)) { iter1681 = this.success[iter1681]; iter1681.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_fetchMessages_args = function(args) { this.localTs = null; this.count = null; if (args) { if (args.localTs !== undefined && args.localTs !== null) { this.localTs = args.localTs; } if (args.count !== undefined && args.count !== null) { this.count = args.count; } } }; TalkService_fetchMessages_args.prototype = {}; TalkService_fetchMessages_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.localTs = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.count = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_fetchMessages_args.prototype.write = function(output) { output.writeStructBegin('TalkService_fetchMessages_args'); if (this.localTs !== null && this.localTs !== undefined) { output.writeFieldBegin('localTs', Thrift.Type.I64, 2); output.writeI64(this.localTs); output.writeFieldEnd(); } if (this.count !== null && this.count !== undefined) { output.writeFieldBegin('count', Thrift.Type.I32, 3); output.writeI32(this.count); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_fetchMessages_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Message]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_fetchMessages_result.prototype = {}; TalkService_fetchMessages_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1682 = 0; var _rtmp31686; this.success = []; var _etype1685 = 0; _rtmp31686 = input.readListBegin(); _etype1685 = _rtmp31686.etype; _size1682 = _rtmp31686.size; for (var _i1687 = 0; _i1687 < _size1682; ++_i1687) { var elem1688 = null; elem1688 = new ttypes.Message(); elem1688.read(input); this.success.push(elem1688); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_fetchMessages_result.prototype.write = function(output) { output.writeStructBegin('TalkService_fetchMessages_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1689 in this.success) { if (this.success.hasOwnProperty(iter1689)) { iter1689 = this.success[iter1689]; iter1689.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_fetchOperations_args = function(args) { this.localRev = null; this.count = null; if (args) { if (args.localRev !== undefined && args.localRev !== null) { this.localRev = args.localRev; } if (args.count !== undefined && args.count !== null) { this.count = args.count; } } }; TalkService_fetchOperations_args.prototype = {}; TalkService_fetchOperations_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.localRev = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.count = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_fetchOperations_args.prototype.write = function(output) { output.writeStructBegin('TalkService_fetchOperations_args'); if (this.localRev !== null && this.localRev !== undefined) { output.writeFieldBegin('localRev', Thrift.Type.I64, 2); output.writeI64(this.localRev); output.writeFieldEnd(); } if (this.count !== null && this.count !== undefined) { output.writeFieldBegin('count', Thrift.Type.I32, 3); output.writeI32(this.count); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_fetchOperations_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.ShouldSyncException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Operation]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_fetchOperations_result.prototype = {}; TalkService_fetchOperations_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1690 = 0; var _rtmp31694; this.success = []; var _etype1693 = 0; _rtmp31694 = input.readListBegin(); _etype1693 = _rtmp31694.etype; _size1690 = _rtmp31694.size; for (var _i1695 = 0; _i1695 < _size1690; ++_i1695) { var elem1696 = null; elem1696 = new ttypes.Operation(); elem1696.read(input); this.success.push(elem1696); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.ShouldSyncException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_fetchOperations_result.prototype.write = function(output) { output.writeStructBegin('TalkService_fetchOperations_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1697 in this.success) { if (this.success.hasOwnProperty(iter1697)) { iter1697 = this.success[iter1697]; iter1697.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_fetchOps_args = function(args) { this.localRev = null; this.count = null; this.globalRev = null; this.individualRev = null; if (args) { if (args.localRev !== undefined && args.localRev !== null) { this.localRev = args.localRev; } if (args.count !== undefined && args.count !== null) { this.count = args.count; } if (args.globalRev !== undefined && args.globalRev !== null) { this.globalRev = args.globalRev; } if (args.individualRev !== undefined && args.individualRev !== null) { this.individualRev = args.individualRev; } } }; TalkService_fetchOps_args.prototype = {}; TalkService_fetchOps_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.localRev = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.count = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I64) { this.globalRev = input.readI64(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I64) { this.individualRev = input.readI64(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_fetchOps_args.prototype.write = function(output) { output.writeStructBegin('TalkService_fetchOps_args'); if (this.localRev !== null && this.localRev !== undefined) { output.writeFieldBegin('localRev', Thrift.Type.I64, 2); output.writeI64(this.localRev); output.writeFieldEnd(); } if (this.count !== null && this.count !== undefined) { output.writeFieldBegin('count', Thrift.Type.I32, 3); output.writeI32(this.count); output.writeFieldEnd(); } if (this.globalRev !== null && this.globalRev !== undefined) { output.writeFieldBegin('globalRev', Thrift.Type.I64, 4); output.writeI64(this.globalRev); output.writeFieldEnd(); } if (this.individualRev !== null && this.individualRev !== undefined) { output.writeFieldBegin('individualRev', Thrift.Type.I64, 5); output.writeI64(this.individualRev); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_fetchOps_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.ShouldSyncException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Operation]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_fetchOps_result.prototype = {}; TalkService_fetchOps_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1698 = 0; var _rtmp31702; this.success = []; var _etype1701 = 0; _rtmp31702 = input.readListBegin(); _etype1701 = _rtmp31702.etype; _size1698 = _rtmp31702.size; for (var _i1703 = 0; _i1703 < _size1698; ++_i1703) { var elem1704 = null; elem1704 = new ttypes.Operation(); elem1704.read(input); this.success.push(elem1704); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.ShouldSyncException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_fetchOps_result.prototype.write = function(output) { output.writeStructBegin('TalkService_fetchOps_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1705 in this.success) { if (this.success.hasOwnProperty(iter1705)) { iter1705 = this.success[iter1705]; iter1705.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findAndAddContactsByEmail_args = function(args) { this.reqSeq = null; this.emails = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.emails !== undefined && args.emails !== null) { this.emails = Thrift.copyList(args.emails, [null]); } } }; TalkService_findAndAddContactsByEmail_args.prototype = {}; TalkService_findAndAddContactsByEmail_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.SET) { var _size1706 = 0; var _rtmp31710; this.emails = []; var _etype1709 = 0; _rtmp31710 = input.readSetBegin(); _etype1709 = _rtmp31710.etype; _size1706 = _rtmp31710.size; for (var _i1711 = 0; _i1711 < _size1706; ++_i1711) { var elem1712 = null; elem1712 = input.readString(); this.emails.push(elem1712); } input.readSetEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findAndAddContactsByEmail_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findAndAddContactsByEmail_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.emails !== null && this.emails !== undefined) { output.writeFieldBegin('emails', Thrift.Type.SET, 2); output.writeSetBegin(Thrift.Type.STRING, this.emails.length); for (var iter1713 in this.emails) { if (this.emails.hasOwnProperty(iter1713)) { iter1713 = this.emails[iter1713]; output.writeString(iter1713); } } output.writeSetEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findAndAddContactsByEmail_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findAndAddContactsByEmail_result.prototype = {}; TalkService_findAndAddContactsByEmail_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size1714 = 0; var _rtmp31718; this.success = {}; var _ktype1715 = 0; var _vtype1716 = 0; _rtmp31718 = input.readMapBegin(); _ktype1715 = _rtmp31718.ktype; _vtype1716 = _rtmp31718.vtype; _size1714 = _rtmp31718.size; for (var _i1719 = 0; _i1719 < _size1714; ++_i1719) { var key1720 = null; var val1721 = null; key1720 = input.readString(); val1721 = new ttypes.Contact(); val1721.read(input); this.success[key1720] = val1721; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findAndAddContactsByEmail_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findAndAddContactsByEmail_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success)); for (var kiter1722 in this.success) { if (this.success.hasOwnProperty(kiter1722)) { var viter1723 = this.success[kiter1722]; output.writeString(kiter1722); viter1723.write(output); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findAndAddContactsByMid_args = function(args) { this.reqSeq = null; this.mid = null; this.type = null; this.reference = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } if (args.type !== undefined && args.type !== null) { this.type = args.type; } if (args.reference !== undefined && args.reference !== null) { this.reference = args.reference; } } }; TalkService_findAndAddContactsByMid_args.prototype = {}; TalkService_findAndAddContactsByMid_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.type = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.reference = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findAndAddContactsByMid_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findAndAddContactsByMid_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 2); output.writeString(this.mid); output.writeFieldEnd(); } if (this.type !== null && this.type !== undefined) { output.writeFieldBegin('type', Thrift.Type.I32, 3); output.writeI32(this.type); output.writeFieldEnd(); } if (this.reference !== null && this.reference !== undefined) { output.writeFieldBegin('reference', Thrift.Type.STRING, 4); output.writeString(this.reference); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findAndAddContactsByMid_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findAndAddContactsByMid_result.prototype = {}; TalkService_findAndAddContactsByMid_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size1724 = 0; var _rtmp31728; this.success = {}; var _ktype1725 = 0; var _vtype1726 = 0; _rtmp31728 = input.readMapBegin(); _ktype1725 = _rtmp31728.ktype; _vtype1726 = _rtmp31728.vtype; _size1724 = _rtmp31728.size; for (var _i1729 = 0; _i1729 < _size1724; ++_i1729) { var key1730 = null; var val1731 = null; key1730 = input.readString(); val1731 = new ttypes.Contact(); val1731.read(input); this.success[key1730] = val1731; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findAndAddContactsByMid_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findAndAddContactsByMid_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success)); for (var kiter1732 in this.success) { if (this.success.hasOwnProperty(kiter1732)) { var viter1733 = this.success[kiter1732]; output.writeString(kiter1732); viter1733.write(output); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findGroupByTicketV2_args = function(args) { this.ticketId = null; if (args) { if (args.ticketId !== undefined && args.ticketId !== null) { this.ticketId = args.ticketId; } } }; TalkService_findGroupByTicketV2_args.prototype = {}; TalkService_findGroupByTicketV2_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.ticketId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findGroupByTicketV2_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findGroupByTicketV2_args'); if (this.ticketId !== null && this.ticketId !== undefined) { output.writeFieldBegin('ticketId', Thrift.Type.STRING, 1); output.writeString(this.ticketId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findGroupByTicketV2_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Group(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findGroupByTicketV2_result.prototype = {}; TalkService_findGroupByTicketV2_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Group(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findGroupByTicketV2_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findGroupByTicketV2_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findAndAddContactsByPhone_args = function(args) { this.reqSeq = null; this.phones = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.phones !== undefined && args.phones !== null) { this.phones = Thrift.copyList(args.phones, [null]); } } }; TalkService_findAndAddContactsByPhone_args.prototype = {}; TalkService_findAndAddContactsByPhone_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.SET) { var _size1734 = 0; var _rtmp31738; this.phones = []; var _etype1737 = 0; _rtmp31738 = input.readSetBegin(); _etype1737 = _rtmp31738.etype; _size1734 = _rtmp31738.size; for (var _i1739 = 0; _i1739 < _size1734; ++_i1739) { var elem1740 = null; elem1740 = input.readString(); this.phones.push(elem1740); } input.readSetEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findAndAddContactsByPhone_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findAndAddContactsByPhone_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.phones !== null && this.phones !== undefined) { output.writeFieldBegin('phones', Thrift.Type.SET, 2); output.writeSetBegin(Thrift.Type.STRING, this.phones.length); for (var iter1741 in this.phones) { if (this.phones.hasOwnProperty(iter1741)) { iter1741 = this.phones[iter1741]; output.writeString(iter1741); } } output.writeSetEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findAndAddContactsByPhone_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findAndAddContactsByPhone_result.prototype = {}; TalkService_findAndAddContactsByPhone_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size1742 = 0; var _rtmp31746; this.success = {}; var _ktype1743 = 0; var _vtype1744 = 0; _rtmp31746 = input.readMapBegin(); _ktype1743 = _rtmp31746.ktype; _vtype1744 = _rtmp31746.vtype; _size1742 = _rtmp31746.size; for (var _i1747 = 0; _i1747 < _size1742; ++_i1747) { var key1748 = null; var val1749 = null; key1748 = input.readString(); val1749 = new ttypes.Contact(); val1749.read(input); this.success[key1748] = val1749; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findAndAddContactsByPhone_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findAndAddContactsByPhone_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success)); for (var kiter1750 in this.success) { if (this.success.hasOwnProperty(kiter1750)) { var viter1751 = this.success[kiter1750]; output.writeString(kiter1750); viter1751.write(output); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getFriendRequests_args = function(args) { this.direction = null; this.lastSeenSeqId = null; if (args) { if (args.direction !== undefined && args.direction !== null) { this.direction = args.direction; } if (args.lastSeenSeqId !== undefined && args.lastSeenSeqId !== null) { this.lastSeenSeqId = args.lastSeenSeqId; } } }; TalkService_getFriendRequests_args.prototype = {}; TalkService_getFriendRequests_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.direction = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I64) { this.lastSeenSeqId = input.readI64(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getFriendRequests_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getFriendRequests_args'); if (this.direction !== null && this.direction !== undefined) { output.writeFieldBegin('direction', Thrift.Type.I32, 1); output.writeI32(this.direction); output.writeFieldEnd(); } if (this.lastSeenSeqId !== null && this.lastSeenSeqId !== undefined) { output.writeFieldBegin('lastSeenSeqId', Thrift.Type.I64, 2); output.writeI64(this.lastSeenSeqId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getFriendRequests_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.FriendRequest]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getFriendRequests_result.prototype = {}; TalkService_getFriendRequests_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1752 = 0; var _rtmp31756; this.success = []; var _etype1755 = 0; _rtmp31756 = input.readListBegin(); _etype1755 = _rtmp31756.etype; _size1752 = _rtmp31756.size; for (var _i1757 = 0; _i1757 < _size1752; ++_i1757) { var elem1758 = null; elem1758 = new ttypes.FriendRequest(); elem1758.read(input); this.success.push(elem1758); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getFriendRequests_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getFriendRequests_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1759 in this.success) { if (this.success.hasOwnProperty(iter1759)) { iter1759 = this.success[iter1759]; iter1759.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeFriendRequest_args = function(args) { this.direction = null; this.midOrEMid = null; if (args) { if (args.direction !== undefined && args.direction !== null) { this.direction = args.direction; } if (args.midOrEMid !== undefined && args.midOrEMid !== null) { this.midOrEMid = args.midOrEMid; } } }; TalkService_removeFriendRequest_args.prototype = {}; TalkService_removeFriendRequest_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.direction = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.midOrEMid = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeFriendRequest_args.prototype.write = function(output) { output.writeStructBegin('TalkService_removeFriendRequest_args'); if (this.direction !== null && this.direction !== undefined) { output.writeFieldBegin('direction', Thrift.Type.I32, 1); output.writeI32(this.direction); output.writeFieldEnd(); } if (this.midOrEMid !== null && this.midOrEMid !== undefined) { output.writeFieldBegin('midOrEMid', Thrift.Type.STRING, 2); output.writeString(this.midOrEMid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeFriendRequest_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_removeFriendRequest_result.prototype = {}; TalkService_removeFriendRequest_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeFriendRequest_result.prototype.write = function(output) { output.writeStructBegin('TalkService_removeFriendRequest_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findAndAddContactsByUserid_args = function(args) { this.reqSeq = null; this.userid = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } } }; TalkService_findAndAddContactsByUserid_args.prototype = {}; TalkService_findAndAddContactsByUserid_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.userid = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findAndAddContactsByUserid_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findAndAddContactsByUserid_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.userid !== null && this.userid !== undefined) { output.writeFieldBegin('userid', Thrift.Type.STRING, 2); output.writeString(this.userid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findAndAddContactsByUserid_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findAndAddContactsByUserid_result.prototype = {}; TalkService_findAndAddContactsByUserid_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size1760 = 0; var _rtmp31764; this.success = {}; var _ktype1761 = 0; var _vtype1762 = 0; _rtmp31764 = input.readMapBegin(); _ktype1761 = _rtmp31764.ktype; _vtype1762 = _rtmp31764.vtype; _size1760 = _rtmp31764.size; for (var _i1765 = 0; _i1765 < _size1760; ++_i1765) { var key1766 = null; var val1767 = null; key1766 = input.readString(); val1767 = new ttypes.Contact(); val1767.read(input); this.success[key1766] = val1767; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findAndAddContactsByUserid_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findAndAddContactsByUserid_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success)); for (var kiter1768 in this.success) { if (this.success.hasOwnProperty(kiter1768)) { var viter1769 = this.success[kiter1768]; output.writeString(kiter1768); viter1769.write(output); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findContactByUserid_args = function(args) { this.userid = null; if (args) { if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } } }; TalkService_findContactByUserid_args.prototype = {}; TalkService_findContactByUserid_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.userid = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findContactByUserid_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findContactByUserid_args'); if (this.userid !== null && this.userid !== undefined) { output.writeFieldBegin('userid', Thrift.Type.STRING, 2); output.writeString(this.userid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findContactByUserid_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Contact(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findContactByUserid_result.prototype = {}; TalkService_findContactByUserid_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Contact(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findContactByUserid_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findContactByUserid_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findContactByUserTicket_args = function(args) { this.ticketIdWithTag = null; if (args) { if (args.ticketIdWithTag !== undefined && args.ticketIdWithTag !== null) { this.ticketIdWithTag = args.ticketIdWithTag; } } }; TalkService_findContactByUserTicket_args.prototype = {}; TalkService_findContactByUserTicket_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.ticketIdWithTag = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findContactByUserTicket_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findContactByUserTicket_args'); if (this.ticketIdWithTag !== null && this.ticketIdWithTag !== undefined) { output.writeFieldBegin('ticketIdWithTag', Thrift.Type.STRING, 2); output.writeString(this.ticketIdWithTag); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findContactByUserTicket_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Contact(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findContactByUserTicket_result.prototype = {}; TalkService_findContactByUserTicket_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Contact(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findContactByUserTicket_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findContactByUserTicket_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findContactsByEmail_args = function(args) { this.emails = null; if (args) { if (args.emails !== undefined && args.emails !== null) { this.emails = Thrift.copyList(args.emails, [null]); } } }; TalkService_findContactsByEmail_args.prototype = {}; TalkService_findContactsByEmail_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.SET) { var _size1770 = 0; var _rtmp31774; this.emails = []; var _etype1773 = 0; _rtmp31774 = input.readSetBegin(); _etype1773 = _rtmp31774.etype; _size1770 = _rtmp31774.size; for (var _i1775 = 0; _i1775 < _size1770; ++_i1775) { var elem1776 = null; elem1776 = input.readString(); this.emails.push(elem1776); } input.readSetEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findContactsByEmail_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findContactsByEmail_args'); if (this.emails !== null && this.emails !== undefined) { output.writeFieldBegin('emails', Thrift.Type.SET, 2); output.writeSetBegin(Thrift.Type.STRING, this.emails.length); for (var iter1777 in this.emails) { if (this.emails.hasOwnProperty(iter1777)) { iter1777 = this.emails[iter1777]; output.writeString(iter1777); } } output.writeSetEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findContactsByEmail_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findContactsByEmail_result.prototype = {}; TalkService_findContactsByEmail_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size1778 = 0; var _rtmp31782; this.success = {}; var _ktype1779 = 0; var _vtype1780 = 0; _rtmp31782 = input.readMapBegin(); _ktype1779 = _rtmp31782.ktype; _vtype1780 = _rtmp31782.vtype; _size1778 = _rtmp31782.size; for (var _i1783 = 0; _i1783 < _size1778; ++_i1783) { var key1784 = null; var val1785 = null; key1784 = input.readString(); val1785 = new ttypes.Contact(); val1785.read(input); this.success[key1784] = val1785; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findContactsByEmail_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findContactsByEmail_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success)); for (var kiter1786 in this.success) { if (this.success.hasOwnProperty(kiter1786)) { var viter1787 = this.success[kiter1786]; output.writeString(kiter1786); viter1787.write(output); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findContactsByPhone_args = function(args) { this.phones = null; if (args) { if (args.phones !== undefined && args.phones !== null) { this.phones = Thrift.copyList(args.phones, [null]); } } }; TalkService_findContactsByPhone_args.prototype = {}; TalkService_findContactsByPhone_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.SET) { var _size1788 = 0; var _rtmp31792; this.phones = []; var _etype1791 = 0; _rtmp31792 = input.readSetBegin(); _etype1791 = _rtmp31792.etype; _size1788 = _rtmp31792.size; for (var _i1793 = 0; _i1793 < _size1788; ++_i1793) { var elem1794 = null; elem1794 = input.readString(); this.phones.push(elem1794); } input.readSetEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findContactsByPhone_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findContactsByPhone_args'); if (this.phones !== null && this.phones !== undefined) { output.writeFieldBegin('phones', Thrift.Type.SET, 2); output.writeSetBegin(Thrift.Type.STRING, this.phones.length); for (var iter1795 in this.phones) { if (this.phones.hasOwnProperty(iter1795)) { iter1795 = this.phones[iter1795]; output.writeString(iter1795); } } output.writeSetEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findContactsByPhone_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findContactsByPhone_result.prototype = {}; TalkService_findContactsByPhone_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size1796 = 0; var _rtmp31800; this.success = {}; var _ktype1797 = 0; var _vtype1798 = 0; _rtmp31800 = input.readMapBegin(); _ktype1797 = _rtmp31800.ktype; _vtype1798 = _rtmp31800.vtype; _size1796 = _rtmp31800.size; for (var _i1801 = 0; _i1801 < _size1796; ++_i1801) { var key1802 = null; var val1803 = null; key1802 = input.readString(); val1803 = new ttypes.Contact(); val1803.read(input); this.success[key1802] = val1803; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findContactsByPhone_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findContactsByPhone_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success)); for (var kiter1804 in this.success) { if (this.success.hasOwnProperty(kiter1804)) { var viter1805 = this.success[kiter1804]; output.writeString(kiter1804); viter1805.write(output); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findSnsIdUserStatus_args = function(args) { this.snsIdType = null; this.snsAccessToken = null; this.udidHash = null; if (args) { if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } if (args.snsAccessToken !== undefined && args.snsAccessToken !== null) { this.snsAccessToken = args.snsAccessToken; } if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } } }; TalkService_findSnsIdUserStatus_args.prototype = {}; TalkService_findSnsIdUserStatus_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.snsIdType = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.snsAccessToken = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findSnsIdUserStatus_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findSnsIdUserStatus_args'); if (this.snsIdType !== null && this.snsIdType !== undefined) { output.writeFieldBegin('snsIdType', Thrift.Type.I32, 2); output.writeI32(this.snsIdType); output.writeFieldEnd(); } if (this.snsAccessToken !== null && this.snsAccessToken !== undefined) { output.writeFieldBegin('snsAccessToken', Thrift.Type.STRING, 3); output.writeString(this.snsAccessToken); output.writeFieldEnd(); } if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 4); output.writeString(this.udidHash); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findSnsIdUserStatus_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.SnsIdUserStatus(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findSnsIdUserStatus_result.prototype = {}; TalkService_findSnsIdUserStatus_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.SnsIdUserStatus(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findSnsIdUserStatus_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findSnsIdUserStatus_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_finishUpdateVerification_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } }; TalkService_finishUpdateVerification_args.prototype = {}; TalkService_finishUpdateVerification_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_finishUpdateVerification_args.prototype.write = function(output) { output.writeStructBegin('TalkService_finishUpdateVerification_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_finishUpdateVerification_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_finishUpdateVerification_result.prototype = {}; TalkService_finishUpdateVerification_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_finishUpdateVerification_result.prototype.write = function(output) { output.writeStructBegin('TalkService_finishUpdateVerification_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_generateUserTicket_args = function(args) { this.expirationTime = null; this.maxUseCount = null; if (args) { if (args.expirationTime !== undefined && args.expirationTime !== null) { this.expirationTime = args.expirationTime; } if (args.maxUseCount !== undefined && args.maxUseCount !== null) { this.maxUseCount = args.maxUseCount; } } }; TalkService_generateUserTicket_args.prototype = {}; TalkService_generateUserTicket_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 3: if (ftype == Thrift.Type.I64) { this.expirationTime = input.readI64(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.maxUseCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_generateUserTicket_args.prototype.write = function(output) { output.writeStructBegin('TalkService_generateUserTicket_args'); if (this.expirationTime !== null && this.expirationTime !== undefined) { output.writeFieldBegin('expirationTime', Thrift.Type.I64, 3); output.writeI64(this.expirationTime); output.writeFieldEnd(); } if (this.maxUseCount !== null && this.maxUseCount !== undefined) { output.writeFieldBegin('maxUseCount', Thrift.Type.I32, 4); output.writeI32(this.maxUseCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_generateUserTicket_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Ticket(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_generateUserTicket_result.prototype = {}; TalkService_generateUserTicket_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Ticket(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_generateUserTicket_result.prototype.write = function(output) { output.writeStructBegin('TalkService_generateUserTicket_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_destroyMessage_args = function(args) { this.seq = null; this.chatId = null; this.messageId = null; this.sessionId = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.chatId !== undefined && args.chatId !== null) { this.chatId = args.chatId; } if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } }; TalkService_destroyMessage_args.prototype = {}; TalkService_destroyMessage_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.chatId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.messageId = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.BYTE) { this.sessionId = input.readByte(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_destroyMessage_args.prototype.write = function(output) { output.writeStructBegin('TalkService_destroyMessage_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.chatId !== null && this.chatId !== undefined) { output.writeFieldBegin('chatId', Thrift.Type.STRING, 2); output.writeString(this.chatId); output.writeFieldEnd(); } if (this.messageId !== null && this.messageId !== undefined) { output.writeFieldBegin('messageId', Thrift.Type.STRING, 3); output.writeString(this.messageId); output.writeFieldEnd(); } if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.BYTE, 4); output.writeByte(this.sessionId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_destroyMessage_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_destroyMessage_result.prototype = {}; TalkService_destroyMessage_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_destroyMessage_result.prototype.write = function(output) { output.writeStructBegin('TalkService_destroyMessage_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getAcceptedProximityMatches_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } }; TalkService_getAcceptedProximityMatches_args.prototype = {}; TalkService_getAcceptedProximityMatches_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getAcceptedProximityMatches_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getAcceptedProximityMatches_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getAcceptedProximityMatches_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getAcceptedProximityMatches_result.prototype = {}; TalkService_getAcceptedProximityMatches_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.SET) { var _size1806 = 0; var _rtmp31810; this.success = []; var _etype1809 = 0; _rtmp31810 = input.readSetBegin(); _etype1809 = _rtmp31810.etype; _size1806 = _rtmp31810.size; for (var _i1811 = 0; _i1811 < _size1806; ++_i1811) { var elem1812 = null; elem1812 = input.readString(); this.success.push(elem1812); } input.readSetEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getAcceptedProximityMatches_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getAcceptedProximityMatches_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.SET, 0); output.writeSetBegin(Thrift.Type.STRING, this.success.length); for (var iter1813 in this.success) { if (this.success.hasOwnProperty(iter1813)) { iter1813 = this.success[iter1813]; output.writeString(iter1813); } } output.writeSetEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getActiveBuddySubscriberIds_args = function(args) { }; TalkService_getActiveBuddySubscriberIds_args.prototype = {}; TalkService_getActiveBuddySubscriberIds_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getActiveBuddySubscriberIds_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getActiveBuddySubscriberIds_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getActiveBuddySubscriberIds_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getActiveBuddySubscriberIds_result.prototype = {}; TalkService_getActiveBuddySubscriberIds_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1814 = 0; var _rtmp31818; this.success = []; var _etype1817 = 0; _rtmp31818 = input.readListBegin(); _etype1817 = _rtmp31818.etype; _size1814 = _rtmp31818.size; for (var _i1819 = 0; _i1819 < _size1814; ++_i1819) { var elem1820 = null; elem1820 = input.readString(); this.success.push(elem1820); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getActiveBuddySubscriberIds_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getActiveBuddySubscriberIds_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter1821 in this.success) { if (this.success.hasOwnProperty(iter1821)) { iter1821 = this.success[iter1821]; output.writeString(iter1821); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getAllContactIds_args = function(args) { }; TalkService_getAllContactIds_args.prototype = {}; TalkService_getAllContactIds_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getAllContactIds_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getAllContactIds_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getAllContactIds_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getAllContactIds_result.prototype = {}; TalkService_getAllContactIds_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1822 = 0; var _rtmp31826; this.success = []; var _etype1825 = 0; _rtmp31826 = input.readListBegin(); _etype1825 = _rtmp31826.etype; _size1822 = _rtmp31826.size; for (var _i1827 = 0; _i1827 < _size1822; ++_i1827) { var elem1828 = null; elem1828 = input.readString(); this.success.push(elem1828); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getAllContactIds_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getAllContactIds_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter1829 in this.success) { if (this.success.hasOwnProperty(iter1829)) { iter1829 = this.success[iter1829]; output.writeString(iter1829); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getAuthQrcode_args = function(args) { this.keepLoggedIn = null; this.systemName = null; if (args) { if (args.keepLoggedIn !== undefined && args.keepLoggedIn !== null) { this.keepLoggedIn = args.keepLoggedIn; } if (args.systemName !== undefined && args.systemName !== null) { this.systemName = args.systemName; } } }; TalkService_getAuthQrcode_args.prototype = {}; TalkService_getAuthQrcode_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.BOOL) { this.keepLoggedIn = input.readBool(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.systemName = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getAuthQrcode_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getAuthQrcode_args'); if (this.keepLoggedIn !== null && this.keepLoggedIn !== undefined) { output.writeFieldBegin('keepLoggedIn', Thrift.Type.BOOL, 2); output.writeBool(this.keepLoggedIn); output.writeFieldEnd(); } if (this.systemName !== null && this.systemName !== undefined) { output.writeFieldBegin('systemName', Thrift.Type.STRING, 3); output.writeString(this.systemName); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getAuthQrcode_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.AuthQrcode(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getAuthQrcode_result.prototype = {}; TalkService_getAuthQrcode_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.AuthQrcode(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getAuthQrcode_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getAuthQrcode_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getBlockedContactIds_args = function(args) { }; TalkService_getBlockedContactIds_args.prototype = {}; TalkService_getBlockedContactIds_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getBlockedContactIds_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getBlockedContactIds_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getBlockedContactIds_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getBlockedContactIds_result.prototype = {}; TalkService_getBlockedContactIds_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1830 = 0; var _rtmp31834; this.success = []; var _etype1833 = 0; _rtmp31834 = input.readListBegin(); _etype1833 = _rtmp31834.etype; _size1830 = _rtmp31834.size; for (var _i1835 = 0; _i1835 < _size1830; ++_i1835) { var elem1836 = null; elem1836 = input.readString(); this.success.push(elem1836); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getBlockedContactIds_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getBlockedContactIds_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter1837 in this.success) { if (this.success.hasOwnProperty(iter1837)) { iter1837 = this.success[iter1837]; output.writeString(iter1837); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWithPhoneNumber_args = function(args) { this.sessionId = null; this.migrationPincodeSessionId = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } if (args.migrationPincodeSessionId !== undefined && args.migrationPincodeSessionId !== null) { this.migrationPincodeSessionId = args.migrationPincodeSessionId; } } }; TalkService_registerWithPhoneNumber_args.prototype = {}; TalkService_registerWithPhoneNumber_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.migrationPincodeSessionId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWithPhoneNumber_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWithPhoneNumber_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } if (this.migrationPincodeSessionId !== null && this.migrationPincodeSessionId !== undefined) { output.writeFieldBegin('migrationPincodeSessionId', Thrift.Type.STRING, 3); output.writeString(this.migrationPincodeSessionId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWithPhoneNumber_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.RegisterWithPhoneNumberResult(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerWithPhoneNumber_result.prototype = {}; TalkService_registerWithPhoneNumber_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.RegisterWithPhoneNumberResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWithPhoneNumber_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWithPhoneNumber_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWithPhoneNumberAndPassword_args = function(args) { this.sessionId = null; this.keynm = null; this.encrypted = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } if (args.keynm !== undefined && args.keynm !== null) { this.keynm = args.keynm; } if (args.encrypted !== undefined && args.encrypted !== null) { this.encrypted = args.encrypted; } } }; TalkService_registerWithPhoneNumberAndPassword_args.prototype = {}; TalkService_registerWithPhoneNumberAndPassword_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.keynm = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.encrypted = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWithPhoneNumberAndPassword_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWithPhoneNumberAndPassword_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } if (this.keynm !== null && this.keynm !== undefined) { output.writeFieldBegin('keynm', Thrift.Type.STRING, 3); output.writeString(this.keynm); output.writeFieldEnd(); } if (this.encrypted !== null && this.encrypted !== undefined) { output.writeFieldBegin('encrypted', Thrift.Type.STRING, 4); output.writeString(this.encrypted); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWithPhoneNumberAndPassword_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.RegisterWithPhoneNumberResult(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerWithPhoneNumberAndPassword_result.prototype = {}; TalkService_registerWithPhoneNumberAndPassword_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.RegisterWithPhoneNumberResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWithPhoneNumberAndPassword_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWithPhoneNumberAndPassword_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getAnalyticsInfo_args = function(args) { }; TalkService_getAnalyticsInfo_args.prototype = {}; TalkService_getAnalyticsInfo_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getAnalyticsInfo_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getAnalyticsInfo_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getAnalyticsInfo_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.AnalyticsInfo(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getAnalyticsInfo_result.prototype = {}; TalkService_getAnalyticsInfo_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.AnalyticsInfo(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getAnalyticsInfo_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getAnalyticsInfo_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportClientStatistics_args = function(args) { this.reqSeq = null; this.category = null; this.count = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.category !== undefined && args.category !== null) { this.category = args.category; } if (args.count !== undefined && args.count !== null) { this.count = args.count; } } }; TalkService_reportClientStatistics_args.prototype = {}; TalkService_reportClientStatistics_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { this.category = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.count = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportClientStatistics_args.prototype.write = function(output) { output.writeStructBegin('TalkService_reportClientStatistics_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.category !== null && this.category !== undefined) { output.writeFieldBegin('category', Thrift.Type.I32, 2); output.writeI32(this.category); output.writeFieldEnd(); } if (this.count !== null && this.count !== undefined) { output.writeFieldBegin('count', Thrift.Type.I32, 3); output.writeI32(this.count); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportClientStatistics_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_reportClientStatistics_result.prototype = {}; TalkService_reportClientStatistics_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportClientStatistics_result.prototype.write = function(output) { output.writeStructBegin('TalkService_reportClientStatistics_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyPhoneNumberForLogin_args = function(args) { this.verifierFromPhone = null; this.pinCodeForPhone = null; this.verifierFromLogin = null; if (args) { if (args.verifierFromPhone !== undefined && args.verifierFromPhone !== null) { this.verifierFromPhone = args.verifierFromPhone; } if (args.pinCodeForPhone !== undefined && args.pinCodeForPhone !== null) { this.pinCodeForPhone = args.pinCodeForPhone; } if (args.verifierFromLogin !== undefined && args.verifierFromLogin !== null) { this.verifierFromLogin = args.verifierFromLogin; } } }; TalkService_verifyPhoneNumberForLogin_args.prototype = {}; TalkService_verifyPhoneNumberForLogin_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.verifierFromPhone = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.pinCodeForPhone = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.verifierFromLogin = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyPhoneNumberForLogin_args.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyPhoneNumberForLogin_args'); if (this.verifierFromPhone !== null && this.verifierFromPhone !== undefined) { output.writeFieldBegin('verifierFromPhone', Thrift.Type.STRING, 2); output.writeString(this.verifierFromPhone); output.writeFieldEnd(); } if (this.pinCodeForPhone !== null && this.pinCodeForPhone !== undefined) { output.writeFieldBegin('pinCodeForPhone', Thrift.Type.STRING, 3); output.writeString(this.pinCodeForPhone); output.writeFieldEnd(); } if (this.verifierFromLogin !== null && this.verifierFromLogin !== undefined) { output.writeFieldBegin('verifierFromLogin', Thrift.Type.STRING, 4); output.writeString(this.verifierFromLogin); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyPhoneNumberForLogin_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_verifyPhoneNumberForLogin_result.prototype = {}; TalkService_verifyPhoneNumberForLogin_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyPhoneNumberForLogin_result.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyPhoneNumberForLogin_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyPhoneNumber_args = function(args) { this.sessionId = null; this.pinCode = null; this.udidHash = null; this.migrationPincodeSessionId = null; this.oldUdidHash = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } if (args.pinCode !== undefined && args.pinCode !== null) { this.pinCode = args.pinCode; } if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } if (args.migrationPincodeSessionId !== undefined && args.migrationPincodeSessionId !== null) { this.migrationPincodeSessionId = args.migrationPincodeSessionId; } if (args.oldUdidHash !== undefined && args.oldUdidHash !== null) { this.oldUdidHash = args.oldUdidHash; } } }; TalkService_verifyPhoneNumber_args.prototype = {}; TalkService_verifyPhoneNumber_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.pinCode = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { this.migrationPincodeSessionId = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { this.oldUdidHash = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyPhoneNumber_args.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyPhoneNumber_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } if (this.pinCode !== null && this.pinCode !== undefined) { output.writeFieldBegin('pinCode', Thrift.Type.STRING, 3); output.writeString(this.pinCode); output.writeFieldEnd(); } if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 4); output.writeString(this.udidHash); output.writeFieldEnd(); } if (this.migrationPincodeSessionId !== null && this.migrationPincodeSessionId !== undefined) { output.writeFieldBegin('migrationPincodeSessionId', Thrift.Type.STRING, 5); output.writeString(this.migrationPincodeSessionId); output.writeFieldEnd(); } if (this.oldUdidHash !== null && this.oldUdidHash !== undefined) { output.writeFieldBegin('oldUdidHash', Thrift.Type.STRING, 6); output.writeString(this.oldUdidHash); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyPhoneNumber_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.PhoneVerificationResult(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_verifyPhoneNumber_result.prototype = {}; TalkService_verifyPhoneNumber_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.PhoneVerificationResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyPhoneNumber_result.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyPhoneNumber_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getBlockedContactIdsByRange_args = function(args) { this.start = null; this.count = null; if (args) { if (args.start !== undefined && args.start !== null) { this.start = args.start; } if (args.count !== undefined && args.count !== null) { this.count = args.count; } } }; TalkService_getBlockedContactIdsByRange_args.prototype = {}; TalkService_getBlockedContactIdsByRange_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.start = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.count = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getBlockedContactIdsByRange_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getBlockedContactIdsByRange_args'); if (this.start !== null && this.start !== undefined) { output.writeFieldBegin('start', Thrift.Type.I32, 2); output.writeI32(this.start); output.writeFieldEnd(); } if (this.count !== null && this.count !== undefined) { output.writeFieldBegin('count', Thrift.Type.I32, 3); output.writeI32(this.count); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getBlockedContactIdsByRange_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getBlockedContactIdsByRange_result.prototype = {}; TalkService_getBlockedContactIdsByRange_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1838 = 0; var _rtmp31842; this.success = []; var _etype1841 = 0; _rtmp31842 = input.readListBegin(); _etype1841 = _rtmp31842.etype; _size1838 = _rtmp31842.size; for (var _i1843 = 0; _i1843 < _size1838; ++_i1843) { var elem1844 = null; elem1844 = input.readString(); this.success.push(elem1844); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getBlockedContactIdsByRange_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getBlockedContactIdsByRange_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter1845 in this.success) { if (this.success.hasOwnProperty(iter1845)) { iter1845 = this.success[iter1845]; output.writeString(iter1845); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getBlockedRecommendationIds_args = function(args) { }; TalkService_getBlockedRecommendationIds_args.prototype = {}; TalkService_getBlockedRecommendationIds_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getBlockedRecommendationIds_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getBlockedRecommendationIds_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getBlockedRecommendationIds_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getBlockedRecommendationIds_result.prototype = {}; TalkService_getBlockedRecommendationIds_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1846 = 0; var _rtmp31850; this.success = []; var _etype1849 = 0; _rtmp31850 = input.readListBegin(); _etype1849 = _rtmp31850.etype; _size1846 = _rtmp31850.size; for (var _i1851 = 0; _i1851 < _size1846; ++_i1851) { var elem1852 = null; elem1852 = input.readString(); this.success.push(elem1852); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getBlockedRecommendationIds_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getBlockedRecommendationIds_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter1853 in this.success) { if (this.success.hasOwnProperty(iter1853)) { iter1853 = this.success[iter1853]; output.writeString(iter1853); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getBuddyBlockerIds_args = function(args) { }; TalkService_getBuddyBlockerIds_args.prototype = {}; TalkService_getBuddyBlockerIds_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getBuddyBlockerIds_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getBuddyBlockerIds_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getBuddyBlockerIds_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getBuddyBlockerIds_result.prototype = {}; TalkService_getBuddyBlockerIds_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1854 = 0; var _rtmp31858; this.success = []; var _etype1857 = 0; _rtmp31858 = input.readListBegin(); _etype1857 = _rtmp31858.etype; _size1854 = _rtmp31858.size; for (var _i1859 = 0; _i1859 < _size1854; ++_i1859) { var elem1860 = null; elem1860 = input.readString(); this.success.push(elem1860); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getBuddyBlockerIds_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getBuddyBlockerIds_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter1861 in this.success) { if (this.success.hasOwnProperty(iter1861)) { iter1861 = this.success[iter1861]; output.writeString(iter1861); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getBuddyLocation_args = function(args) { this.mid = null; this.index = null; if (args) { if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } if (args.index !== undefined && args.index !== null) { this.index = args.index; } } }; TalkService_getBuddyLocation_args.prototype = {}; TalkService_getBuddyLocation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.index = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getBuddyLocation_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getBuddyLocation_args'); if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 2); output.writeString(this.mid); output.writeFieldEnd(); } if (this.index !== null && this.index !== undefined) { output.writeFieldBegin('index', Thrift.Type.I32, 3); output.writeI32(this.index); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getBuddyLocation_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Geolocation(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getBuddyLocation_result.prototype = {}; TalkService_getBuddyLocation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Geolocation(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getBuddyLocation_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getBuddyLocation_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getCompactContactsModifiedSince_args = function(args) { this.timestamp = null; if (args) { if (args.timestamp !== undefined && args.timestamp !== null) { this.timestamp = args.timestamp; } } }; TalkService_getCompactContactsModifiedSince_args.prototype = {}; TalkService_getCompactContactsModifiedSince_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.timestamp = input.readI64(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getCompactContactsModifiedSince_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getCompactContactsModifiedSince_args'); if (this.timestamp !== null && this.timestamp !== undefined) { output.writeFieldBegin('timestamp', Thrift.Type.I64, 2); output.writeI64(this.timestamp); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getCompactContactsModifiedSince_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.CompactContact]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getCompactContactsModifiedSince_result.prototype = {}; TalkService_getCompactContactsModifiedSince_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1862 = 0; var _rtmp31866; this.success = []; var _etype1865 = 0; _rtmp31866 = input.readListBegin(); _etype1865 = _rtmp31866.etype; _size1862 = _rtmp31866.size; for (var _i1867 = 0; _i1867 < _size1862; ++_i1867) { var elem1868 = null; elem1868 = new ttypes.CompactContact(); elem1868.read(input); this.success.push(elem1868); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getCompactContactsModifiedSince_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getCompactContactsModifiedSince_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1869 in this.success) { if (this.success.hasOwnProperty(iter1869)) { iter1869 = this.success[iter1869]; iter1869.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getCompactGroup_args = function(args) { this.groupId = null; if (args) { if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } } }; TalkService_getCompactGroup_args.prototype = {}; TalkService_getCompactGroup_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.groupId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getCompactGroup_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getCompactGroup_args'); if (this.groupId !== null && this.groupId !== undefined) { output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); output.writeString(this.groupId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getCompactGroup_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Group(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getCompactGroup_result.prototype = {}; TalkService_getCompactGroup_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Group(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getCompactGroup_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getCompactGroup_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getCompactRoom_args = function(args) { this.roomId = null; if (args) { if (args.roomId !== undefined && args.roomId !== null) { this.roomId = args.roomId; } } }; TalkService_getCompactRoom_args.prototype = {}; TalkService_getCompactRoom_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.roomId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getCompactRoom_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getCompactRoom_args'); if (this.roomId !== null && this.roomId !== undefined) { output.writeFieldBegin('roomId', Thrift.Type.STRING, 2); output.writeString(this.roomId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getCompactRoom_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Room(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getCompactRoom_result.prototype = {}; TalkService_getCompactRoom_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Room(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getCompactRoom_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getCompactRoom_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getContact_args = function(args) { this.id = null; if (args) { if (args.id !== undefined && args.id !== null) { this.id = args.id; } } }; TalkService_getContact_args.prototype = {}; TalkService_getContact_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.id = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getContact_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getContact_args'); if (this.id !== null && this.id !== undefined) { output.writeFieldBegin('id', Thrift.Type.STRING, 2); output.writeString(this.id); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getContact_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Contact(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getContact_result.prototype = {}; TalkService_getContact_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Contact(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getContact_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getContact_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getContacts_args = function(args) { this.ids = null; if (args) { if (args.ids !== undefined && args.ids !== null) { this.ids = Thrift.copyList(args.ids, [null]); } } }; TalkService_getContacts_args.prototype = {}; TalkService_getContacts_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.LIST) { var _size1870 = 0; var _rtmp31874; this.ids = []; var _etype1873 = 0; _rtmp31874 = input.readListBegin(); _etype1873 = _rtmp31874.etype; _size1870 = _rtmp31874.size; for (var _i1875 = 0; _i1875 < _size1870; ++_i1875) { var elem1876 = null; elem1876 = input.readString(); this.ids.push(elem1876); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getContacts_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getContacts_args'); if (this.ids !== null && this.ids !== undefined) { output.writeFieldBegin('ids', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.ids.length); for (var iter1877 in this.ids) { if (this.ids.hasOwnProperty(iter1877)) { iter1877 = this.ids[iter1877]; output.writeString(iter1877); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getContacts_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Contact]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getContacts_result.prototype = {}; TalkService_getContacts_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1878 = 0; var _rtmp31882; this.success = []; var _etype1881 = 0; _rtmp31882 = input.readListBegin(); _etype1881 = _rtmp31882.etype; _size1878 = _rtmp31882.size; for (var _i1883 = 0; _i1883 < _size1878; ++_i1883) { var elem1884 = null; elem1884 = new ttypes.Contact(); elem1884.read(input); this.success.push(elem1884); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getContacts_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getContacts_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1885 in this.success) { if (this.success.hasOwnProperty(iter1885)) { iter1885 = this.success[iter1885]; iter1885.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getContactWithFriendRequestStatus_args = function(args) { this.id = null; if (args) { if (args.id !== undefined && args.id !== null) { this.id = args.id; } } }; TalkService_getContactWithFriendRequestStatus_args.prototype = {}; TalkService_getContactWithFriendRequestStatus_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.id = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getContactWithFriendRequestStatus_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getContactWithFriendRequestStatus_args'); if (this.id !== null && this.id !== undefined) { output.writeFieldBegin('id', Thrift.Type.STRING, 2); output.writeString(this.id); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getContactWithFriendRequestStatus_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Contact(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getContactWithFriendRequestStatus_result.prototype = {}; TalkService_getContactWithFriendRequestStatus_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Contact(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getContactWithFriendRequestStatus_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getContactWithFriendRequestStatus_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getCountryWithRequestIp_args = function(args) { }; TalkService_getCountryWithRequestIp_args.prototype = {}; TalkService_getCountryWithRequestIp_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getCountryWithRequestIp_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getCountryWithRequestIp_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getCountryWithRequestIp_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getCountryWithRequestIp_result.prototype = {}; TalkService_getCountryWithRequestIp_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getCountryWithRequestIp_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getCountryWithRequestIp_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getFavoriteMids_args = function(args) { }; TalkService_getFavoriteMids_args.prototype = {}; TalkService_getFavoriteMids_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getFavoriteMids_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getFavoriteMids_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getFavoriteMids_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getFavoriteMids_result.prototype = {}; TalkService_getFavoriteMids_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1886 = 0; var _rtmp31890; this.success = []; var _etype1889 = 0; _rtmp31890 = input.readListBegin(); _etype1889 = _rtmp31890.etype; _size1886 = _rtmp31890.size; for (var _i1891 = 0; _i1891 < _size1886; ++_i1891) { var elem1892 = null; elem1892 = input.readString(); this.success.push(elem1892); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getFavoriteMids_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getFavoriteMids_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter1893 in this.success) { if (this.success.hasOwnProperty(iter1893)) { iter1893 = this.success[iter1893]; output.writeString(iter1893); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroup_args = function(args) { this.groupId = null; if (args) { if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } } }; TalkService_getGroup_args.prototype = {}; TalkService_getGroup_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.groupId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroup_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroup_args'); if (this.groupId !== null && this.groupId !== undefined) { output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); output.writeString(this.groupId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroup_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Group(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getGroup_result.prototype = {}; TalkService_getGroup_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Group(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroup_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroup_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroupIdsInvited_args = function(args) { }; TalkService_getGroupIdsInvited_args.prototype = {}; TalkService_getGroupIdsInvited_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroupIdsInvited_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroupIdsInvited_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroupIdsInvited_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getGroupIdsInvited_result.prototype = {}; TalkService_getGroupIdsInvited_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1894 = 0; var _rtmp31898; this.success = []; var _etype1897 = 0; _rtmp31898 = input.readListBegin(); _etype1897 = _rtmp31898.etype; _size1894 = _rtmp31898.size; for (var _i1899 = 0; _i1899 < _size1894; ++_i1899) { var elem1900 = null; elem1900 = input.readString(); this.success.push(elem1900); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroupIdsInvited_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroupIdsInvited_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter1901 in this.success) { if (this.success.hasOwnProperty(iter1901)) { iter1901 = this.success[iter1901]; output.writeString(iter1901); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroupIdsJoined_args = function(args) { }; TalkService_getGroupIdsJoined_args.prototype = {}; TalkService_getGroupIdsJoined_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroupIdsJoined_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroupIdsJoined_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroupIdsJoined_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getGroupIdsJoined_result.prototype = {}; TalkService_getGroupIdsJoined_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1902 = 0; var _rtmp31906; this.success = []; var _etype1905 = 0; _rtmp31906 = input.readListBegin(); _etype1905 = _rtmp31906.etype; _size1902 = _rtmp31906.size; for (var _i1907 = 0; _i1907 < _size1902; ++_i1907) { var elem1908 = null; elem1908 = input.readString(); this.success.push(elem1908); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroupIdsJoined_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroupIdsJoined_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter1909 in this.success) { if (this.success.hasOwnProperty(iter1909)) { iter1909 = this.success[iter1909]; output.writeString(iter1909); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroups_args = function(args) { this.groupIds = null; if (args) { if (args.groupIds !== undefined && args.groupIds !== null) { this.groupIds = Thrift.copyList(args.groupIds, [null]); } } }; TalkService_getGroups_args.prototype = {}; TalkService_getGroups_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.LIST) { var _size1910 = 0; var _rtmp31914; this.groupIds = []; var _etype1913 = 0; _rtmp31914 = input.readListBegin(); _etype1913 = _rtmp31914.etype; _size1910 = _rtmp31914.size; for (var _i1915 = 0; _i1915 < _size1910; ++_i1915) { var elem1916 = null; elem1916 = input.readString(); this.groupIds.push(elem1916); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroups_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroups_args'); if (this.groupIds !== null && this.groupIds !== undefined) { output.writeFieldBegin('groupIds', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.groupIds.length); for (var iter1917 in this.groupIds) { if (this.groupIds.hasOwnProperty(iter1917)) { iter1917 = this.groupIds[iter1917]; output.writeString(iter1917); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroups_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Group]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getGroups_result.prototype = {}; TalkService_getGroups_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1918 = 0; var _rtmp31922; this.success = []; var _etype1921 = 0; _rtmp31922 = input.readListBegin(); _etype1921 = _rtmp31922.etype; _size1918 = _rtmp31922.size; for (var _i1923 = 0; _i1923 < _size1918; ++_i1923) { var elem1924 = null; elem1924 = new ttypes.Group(); elem1924.read(input); this.success.push(elem1924); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroups_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroups_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1925 in this.success) { if (this.success.hasOwnProperty(iter1925)) { iter1925 = this.success[iter1925]; iter1925.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getHiddenContactMids_args = function(args) { }; TalkService_getHiddenContactMids_args.prototype = {}; TalkService_getHiddenContactMids_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getHiddenContactMids_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getHiddenContactMids_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getHiddenContactMids_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getHiddenContactMids_result.prototype = {}; TalkService_getHiddenContactMids_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1926 = 0; var _rtmp31930; this.success = []; var _etype1929 = 0; _rtmp31930 = input.readListBegin(); _etype1929 = _rtmp31930.etype; _size1926 = _rtmp31930.size; for (var _i1931 = 0; _i1931 < _size1926; ++_i1931) { var elem1932 = null; elem1932 = input.readString(); this.success.push(elem1932); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getHiddenContactMids_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getHiddenContactMids_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter1933 in this.success) { if (this.success.hasOwnProperty(iter1933)) { iter1933 = this.success[iter1933]; output.writeString(iter1933); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getIdentityIdentifier_args = function(args) { }; TalkService_getIdentityIdentifier_args.prototype = {}; TalkService_getIdentityIdentifier_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getIdentityIdentifier_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getIdentityIdentifier_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getIdentityIdentifier_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getIdentityIdentifier_result.prototype = {}; TalkService_getIdentityIdentifier_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getIdentityIdentifier_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getIdentityIdentifier_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getLastAnnouncementIndex_args = function(args) { }; TalkService_getLastAnnouncementIndex_args.prototype = {}; TalkService_getLastAnnouncementIndex_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getLastAnnouncementIndex_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getLastAnnouncementIndex_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getLastAnnouncementIndex_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getLastAnnouncementIndex_result.prototype = {}; TalkService_getLastAnnouncementIndex_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.I32) { this.success = input.readI32(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getLastAnnouncementIndex_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getLastAnnouncementIndex_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.I32, 0); output.writeI32(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getLastOpRevision_args = function(args) { }; TalkService_getLastOpRevision_args.prototype = {}; TalkService_getLastOpRevision_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getLastOpRevision_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getLastOpRevision_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getLastOpRevision_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getLastOpRevision_result.prototype = {}; TalkService_getLastOpRevision_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.I64) { this.success = input.readI64(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getLastOpRevision_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getLastOpRevision_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.I64, 0); output.writeI64(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getSuggestRevisions_args = function(args) { }; TalkService_getSuggestRevisions_args.prototype = {}; TalkService_getSuggestRevisions_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getSuggestRevisions_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getSuggestRevisions_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getSuggestRevisions_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.SuggestDictionaryRevisions(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getSuggestRevisions_result.prototype = {}; TalkService_getSuggestRevisions_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.SuggestDictionaryRevisions(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getSuggestRevisions_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getSuggestRevisions_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getPreviousMessagesV2WithReadCount_args = function(args) { this.messageBoxId = null; this.endMessageId = null; this.messagesCount = null; if (args) { if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } if (args.endMessageId !== undefined && args.endMessageId !== null) { this.endMessageId = new ttypes.MessageBoxV2MessageId(args.endMessageId); } if (args.messagesCount !== undefined && args.messagesCount !== null) { this.messagesCount = args.messagesCount; } } }; TalkService_getPreviousMessagesV2WithReadCount_args.prototype = {}; TalkService_getPreviousMessagesV2WithReadCount_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.messageBoxId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.endMessageId = new ttypes.MessageBoxV2MessageId(); this.endMessageId.read(input); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.messagesCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getPreviousMessagesV2WithReadCount_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getPreviousMessagesV2WithReadCount_args'); if (this.messageBoxId !== null && this.messageBoxId !== undefined) { output.writeFieldBegin('messageBoxId', Thrift.Type.STRING, 2); output.writeString(this.messageBoxId); output.writeFieldEnd(); } if (this.endMessageId !== null && this.endMessageId !== undefined) { output.writeFieldBegin('endMessageId', Thrift.Type.STRUCT, 3); this.endMessageId.write(output); output.writeFieldEnd(); } if (this.messagesCount !== null && this.messagesCount !== undefined) { output.writeFieldBegin('messagesCount', Thrift.Type.I32, 4); output.writeI32(this.messagesCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getPreviousMessagesV2WithReadCount_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Message]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getPreviousMessagesV2WithReadCount_result.prototype = {}; TalkService_getPreviousMessagesV2WithReadCount_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1934 = 0; var _rtmp31938; this.success = []; var _etype1937 = 0; _rtmp31938 = input.readListBegin(); _etype1937 = _rtmp31938.etype; _size1934 = _rtmp31938.size; for (var _i1939 = 0; _i1939 < _size1934; ++_i1939) { var elem1940 = null; elem1940 = new ttypes.Message(); elem1940.read(input); this.success.push(elem1940); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getPreviousMessagesV2WithReadCount_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getPreviousMessagesV2WithReadCount_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1941 in this.success) { if (this.success.hasOwnProperty(iter1941)) { iter1941 = this.success[iter1941]; iter1941.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBox_args = function(args) { this.channelId = null; this.messageBoxId = null; this.lastMessagesCount = null; if (args) { if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } if (args.lastMessagesCount !== undefined && args.lastMessagesCount !== null) { this.lastMessagesCount = args.lastMessagesCount; } } }; TalkService_getMessageBox_args.prototype = {}; TalkService_getMessageBox_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.channelId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.messageBoxId = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.lastMessagesCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBox_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBox_args'); if (this.channelId !== null && this.channelId !== undefined) { output.writeFieldBegin('channelId', Thrift.Type.STRING, 2); output.writeString(this.channelId); output.writeFieldEnd(); } if (this.messageBoxId !== null && this.messageBoxId !== undefined) { output.writeFieldBegin('messageBoxId', Thrift.Type.STRING, 3); output.writeString(this.messageBoxId); output.writeFieldEnd(); } if (this.lastMessagesCount !== null && this.lastMessagesCount !== undefined) { output.writeFieldBegin('lastMessagesCount', Thrift.Type.I32, 4); output.writeI32(this.lastMessagesCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBox_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.TMessageBox(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getMessageBox_result.prototype = {}; TalkService_getMessageBox_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.TMessageBox(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBox_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBox_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxCompactWrapUp_args = function(args) { this.mid = null; if (args) { if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } } }; TalkService_getMessageBoxCompactWrapUp_args.prototype = {}; TalkService_getMessageBoxCompactWrapUp_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxCompactWrapUp_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxCompactWrapUp_args'); if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 2); output.writeString(this.mid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxCompactWrapUp_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.TMessageBoxWrapUp(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getMessageBoxCompactWrapUp_result.prototype = {}; TalkService_getMessageBoxCompactWrapUp_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.TMessageBoxWrapUp(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxCompactWrapUp_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxCompactWrapUp_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxCompactWrapUpList_args = function(args) { this.start = null; this.messageBoxCount = null; if (args) { if (args.start !== undefined && args.start !== null) { this.start = args.start; } if (args.messageBoxCount !== undefined && args.messageBoxCount !== null) { this.messageBoxCount = args.messageBoxCount; } } }; TalkService_getMessageBoxCompactWrapUpList_args.prototype = {}; TalkService_getMessageBoxCompactWrapUpList_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.start = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.messageBoxCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxCompactWrapUpList_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxCompactWrapUpList_args'); if (this.start !== null && this.start !== undefined) { output.writeFieldBegin('start', Thrift.Type.I32, 2); output.writeI32(this.start); output.writeFieldEnd(); } if (this.messageBoxCount !== null && this.messageBoxCount !== undefined) { output.writeFieldBegin('messageBoxCount', Thrift.Type.I32, 3); output.writeI32(this.messageBoxCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxCompactWrapUpList_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.TMessageBoxWrapUpResponse(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getMessageBoxCompactWrapUpList_result.prototype = {}; TalkService_getMessageBoxCompactWrapUpList_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.TMessageBoxWrapUpResponse(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxCompactWrapUpList_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxCompactWrapUpList_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxList_args = function(args) { this.channelId = null; this.lastMessagesCount = null; if (args) { if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } if (args.lastMessagesCount !== undefined && args.lastMessagesCount !== null) { this.lastMessagesCount = args.lastMessagesCount; } } }; TalkService_getMessageBoxList_args.prototype = {}; TalkService_getMessageBoxList_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.channelId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.lastMessagesCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxList_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxList_args'); if (this.channelId !== null && this.channelId !== undefined) { output.writeFieldBegin('channelId', Thrift.Type.STRING, 2); output.writeString(this.channelId); output.writeFieldEnd(); } if (this.lastMessagesCount !== null && this.lastMessagesCount !== undefined) { output.writeFieldBegin('lastMessagesCount', Thrift.Type.I32, 3); output.writeI32(this.lastMessagesCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxList_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.TMessageBox]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getMessageBoxList_result.prototype = {}; TalkService_getMessageBoxList_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1942 = 0; var _rtmp31946; this.success = []; var _etype1945 = 0; _rtmp31946 = input.readListBegin(); _etype1945 = _rtmp31946.etype; _size1942 = _rtmp31946.size; for (var _i1947 = 0; _i1947 < _size1942; ++_i1947) { var elem1948 = null; elem1948 = new ttypes.TMessageBox(); elem1948.read(input); this.success.push(elem1948); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxList_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxList_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1949 in this.success) { if (this.success.hasOwnProperty(iter1949)) { iter1949 = this.success[iter1949]; iter1949.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxListByStatus_args = function(args) { this.channelId = null; this.lastMessagesCount = null; this.status = null; if (args) { if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } if (args.lastMessagesCount !== undefined && args.lastMessagesCount !== null) { this.lastMessagesCount = args.lastMessagesCount; } if (args.status !== undefined && args.status !== null) { this.status = args.status; } } }; TalkService_getMessageBoxListByStatus_args.prototype = {}; TalkService_getMessageBoxListByStatus_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.channelId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.lastMessagesCount = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.status = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxListByStatus_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxListByStatus_args'); if (this.channelId !== null && this.channelId !== undefined) { output.writeFieldBegin('channelId', Thrift.Type.STRING, 2); output.writeString(this.channelId); output.writeFieldEnd(); } if (this.lastMessagesCount !== null && this.lastMessagesCount !== undefined) { output.writeFieldBegin('lastMessagesCount', Thrift.Type.I32, 3); output.writeI32(this.lastMessagesCount); output.writeFieldEnd(); } if (this.status !== null && this.status !== undefined) { output.writeFieldBegin('status', Thrift.Type.I32, 4); output.writeI32(this.status); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxListByStatus_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.TMessageBox]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getMessageBoxListByStatus_result.prototype = {}; TalkService_getMessageBoxListByStatus_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1950 = 0; var _rtmp31954; this.success = []; var _etype1953 = 0; _rtmp31954 = input.readListBegin(); _etype1953 = _rtmp31954.etype; _size1950 = _rtmp31954.size; for (var _i1955 = 0; _i1955 < _size1950; ++_i1955) { var elem1956 = null; elem1956 = new ttypes.TMessageBox(); elem1956.read(input); this.success.push(elem1956); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxListByStatus_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxListByStatus_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1957 in this.success) { if (this.success.hasOwnProperty(iter1957)) { iter1957 = this.success[iter1957]; iter1957.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxWrapUp_args = function(args) { this.mid = null; if (args) { if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } } }; TalkService_getMessageBoxWrapUp_args.prototype = {}; TalkService_getMessageBoxWrapUp_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxWrapUp_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxWrapUp_args'); if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 2); output.writeString(this.mid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxWrapUp_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.TMessageBoxWrapUp(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getMessageBoxWrapUp_result.prototype = {}; TalkService_getMessageBoxWrapUp_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.TMessageBoxWrapUp(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxWrapUp_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxWrapUp_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxWrapUpList_args = function(args) { this.start = null; this.messageBoxCount = null; if (args) { if (args.start !== undefined && args.start !== null) { this.start = args.start; } if (args.messageBoxCount !== undefined && args.messageBoxCount !== null) { this.messageBoxCount = args.messageBoxCount; } } }; TalkService_getMessageBoxWrapUpList_args.prototype = {}; TalkService_getMessageBoxWrapUpList_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.start = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.messageBoxCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxWrapUpList_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxWrapUpList_args'); if (this.start !== null && this.start !== undefined) { output.writeFieldBegin('start', Thrift.Type.I32, 2); output.writeI32(this.start); output.writeFieldEnd(); } if (this.messageBoxCount !== null && this.messageBoxCount !== undefined) { output.writeFieldBegin('messageBoxCount', Thrift.Type.I32, 3); output.writeI32(this.messageBoxCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxWrapUpList_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.TMessageBoxWrapUpResponse(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getMessageBoxWrapUpList_result.prototype = {}; TalkService_getMessageBoxWrapUpList_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.TMessageBoxWrapUpResponse(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxWrapUpList_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxWrapUpList_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessagesBySequenceNumber_args = function(args) { this.channelId = null; this.messageBoxId = null; this.startSeq = null; this.endSeq = null; if (args) { if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } if (args.startSeq !== undefined && args.startSeq !== null) { this.startSeq = args.startSeq; } if (args.endSeq !== undefined && args.endSeq !== null) { this.endSeq = args.endSeq; } } }; TalkService_getMessagesBySequenceNumber_args.prototype = {}; TalkService_getMessagesBySequenceNumber_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.channelId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.messageBoxId = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I64) { this.startSeq = input.readI64(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I64) { this.endSeq = input.readI64(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessagesBySequenceNumber_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessagesBySequenceNumber_args'); if (this.channelId !== null && this.channelId !== undefined) { output.writeFieldBegin('channelId', Thrift.Type.STRING, 2); output.writeString(this.channelId); output.writeFieldEnd(); } if (this.messageBoxId !== null && this.messageBoxId !== undefined) { output.writeFieldBegin('messageBoxId', Thrift.Type.STRING, 3); output.writeString(this.messageBoxId); output.writeFieldEnd(); } if (this.startSeq !== null && this.startSeq !== undefined) { output.writeFieldBegin('startSeq', Thrift.Type.I64, 4); output.writeI64(this.startSeq); output.writeFieldEnd(); } if (this.endSeq !== null && this.endSeq !== undefined) { output.writeFieldBegin('endSeq', Thrift.Type.I64, 5); output.writeI64(this.endSeq); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessagesBySequenceNumber_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Message]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getMessagesBySequenceNumber_result.prototype = {}; TalkService_getMessagesBySequenceNumber_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1958 = 0; var _rtmp31962; this.success = []; var _etype1961 = 0; _rtmp31962 = input.readListBegin(); _etype1961 = _rtmp31962.etype; _size1958 = _rtmp31962.size; for (var _i1963 = 0; _i1963 < _size1958; ++_i1963) { var elem1964 = null; elem1964 = new ttypes.Message(); elem1964.read(input); this.success.push(elem1964); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessagesBySequenceNumber_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessagesBySequenceNumber_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1965 in this.success) { if (this.success.hasOwnProperty(iter1965)) { iter1965 = this.success[iter1965]; iter1965.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getNextMessages_args = function(args) { this.messageBoxId = null; this.startSeq = null; this.messagesCount = null; if (args) { if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } if (args.startSeq !== undefined && args.startSeq !== null) { this.startSeq = args.startSeq; } if (args.messagesCount !== undefined && args.messagesCount !== null) { this.messagesCount = args.messagesCount; } } }; TalkService_getNextMessages_args.prototype = {}; TalkService_getNextMessages_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.messageBoxId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { this.startSeq = input.readI64(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.messagesCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getNextMessages_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getNextMessages_args'); if (this.messageBoxId !== null && this.messageBoxId !== undefined) { output.writeFieldBegin('messageBoxId', Thrift.Type.STRING, 2); output.writeString(this.messageBoxId); output.writeFieldEnd(); } if (this.startSeq !== null && this.startSeq !== undefined) { output.writeFieldBegin('startSeq', Thrift.Type.I64, 3); output.writeI64(this.startSeq); output.writeFieldEnd(); } if (this.messagesCount !== null && this.messagesCount !== undefined) { output.writeFieldBegin('messagesCount', Thrift.Type.I32, 4); output.writeI32(this.messagesCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getNextMessages_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Message]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getNextMessages_result.prototype = {}; TalkService_getNextMessages_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1966 = 0; var _rtmp31970; this.success = []; var _etype1969 = 0; _rtmp31970 = input.readListBegin(); _etype1969 = _rtmp31970.etype; _size1966 = _rtmp31970.size; for (var _i1971 = 0; _i1971 < _size1966; ++_i1971) { var elem1972 = null; elem1972 = new ttypes.Message(); elem1972.read(input); this.success.push(elem1972); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getNextMessages_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getNextMessages_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1973 in this.success) { if (this.success.hasOwnProperty(iter1973)) { iter1973 = this.success[iter1973]; iter1973.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getNotificationPolicy_args = function(args) { this.carrier = null; if (args) { if (args.carrier !== undefined && args.carrier !== null) { this.carrier = args.carrier; } } }; TalkService_getNotificationPolicy_args.prototype = {}; TalkService_getNotificationPolicy_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.carrier = input.readI32(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getNotificationPolicy_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getNotificationPolicy_args'); if (this.carrier !== null && this.carrier !== undefined) { output.writeFieldBegin('carrier', Thrift.Type.I32, 2); output.writeI32(this.carrier); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getNotificationPolicy_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getNotificationPolicy_result.prototype = {}; TalkService_getNotificationPolicy_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1974 = 0; var _rtmp31978; this.success = []; var _etype1977 = 0; _rtmp31978 = input.readListBegin(); _etype1977 = _rtmp31978.etype; _size1974 = _rtmp31978.size; for (var _i1979 = 0; _i1979 < _size1974; ++_i1979) { var elem1980 = null; elem1980 = input.readI32(); this.success.push(elem1980); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getNotificationPolicy_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getNotificationPolicy_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.I32, this.success.length); for (var iter1981 in this.success) { if (this.success.hasOwnProperty(iter1981)) { iter1981 = this.success[iter1981]; output.writeI32(iter1981); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getPreviousMessages_args = function(args) { this.messageBoxId = null; this.endSeq = null; this.messagesCount = null; if (args) { if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } if (args.endSeq !== undefined && args.endSeq !== null) { this.endSeq = args.endSeq; } if (args.messagesCount !== undefined && args.messagesCount !== null) { this.messagesCount = args.messagesCount; } } }; TalkService_getPreviousMessages_args.prototype = {}; TalkService_getPreviousMessages_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.messageBoxId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { this.endSeq = input.readI64(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.messagesCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getPreviousMessages_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getPreviousMessages_args'); if (this.messageBoxId !== null && this.messageBoxId !== undefined) { output.writeFieldBegin('messageBoxId', Thrift.Type.STRING, 2); output.writeString(this.messageBoxId); output.writeFieldEnd(); } if (this.endSeq !== null && this.endSeq !== undefined) { output.writeFieldBegin('endSeq', Thrift.Type.I64, 3); output.writeI64(this.endSeq); output.writeFieldEnd(); } if (this.messagesCount !== null && this.messagesCount !== undefined) { output.writeFieldBegin('messagesCount', Thrift.Type.I32, 4); output.writeI32(this.messagesCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getPreviousMessages_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Message]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getPreviousMessages_result.prototype = {}; TalkService_getPreviousMessages_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1982 = 0; var _rtmp31986; this.success = []; var _etype1985 = 0; _rtmp31986 = input.readListBegin(); _etype1985 = _rtmp31986.etype; _size1982 = _rtmp31986.size; for (var _i1987 = 0; _i1987 < _size1982; ++_i1987) { var elem1988 = null; elem1988 = new ttypes.Message(); elem1988.read(input); this.success.push(elem1988); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getPreviousMessages_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getPreviousMessages_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1989 in this.success) { if (this.success.hasOwnProperty(iter1989)) { iter1989 = this.success[iter1989]; iter1989.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getProfile_args = function(args) { }; TalkService_getProfile_args.prototype = {}; TalkService_getProfile_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getProfile_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getProfile_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getProfile_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Profile(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getProfile_result.prototype = {}; TalkService_getProfile_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Profile(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getProfile_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getProfile_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getProximityMatchCandidateList_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } }; TalkService_getProximityMatchCandidateList_args.prototype = {}; TalkService_getProximityMatchCandidateList_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getProximityMatchCandidateList_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getProximityMatchCandidateList_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getProximityMatchCandidateList_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.ProximityMatchCandidateResult(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getProximityMatchCandidateList_result.prototype = {}; TalkService_getProximityMatchCandidateList_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.ProximityMatchCandidateResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getProximityMatchCandidateList_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getProximityMatchCandidateList_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getProximityMatchCandidates_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } }; TalkService_getProximityMatchCandidates_args.prototype = {}; TalkService_getProximityMatchCandidates_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getProximityMatchCandidates_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getProximityMatchCandidates_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getProximityMatchCandidates_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Contact]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getProximityMatchCandidates_result.prototype = {}; TalkService_getProximityMatchCandidates_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.SET) { var _size1990 = 0; var _rtmp31994; this.success = []; var _etype1993 = 0; _rtmp31994 = input.readSetBegin(); _etype1993 = _rtmp31994.etype; _size1990 = _rtmp31994.size; for (var _i1995 = 0; _i1995 < _size1990; ++_i1995) { var elem1996 = null; elem1996 = new ttypes.Contact(); elem1996.read(input); this.success.push(elem1996); } input.readSetEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getProximityMatchCandidates_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getProximityMatchCandidates_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.SET, 0); output.writeSetBegin(Thrift.Type.STRUCT, this.success.length); for (var iter1997 in this.success) { if (this.success.hasOwnProperty(iter1997)) { iter1997 = this.success[iter1997]; iter1997.write(output); } } output.writeSetEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getRecentMessages_args = function(args) { this.messageBoxId = null; this.messagesCount = null; if (args) { if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } if (args.messagesCount !== undefined && args.messagesCount !== null) { this.messagesCount = args.messagesCount; } } }; TalkService_getRecentMessages_args.prototype = {}; TalkService_getRecentMessages_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.messageBoxId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.messagesCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getRecentMessages_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getRecentMessages_args'); if (this.messageBoxId !== null && this.messageBoxId !== undefined) { output.writeFieldBegin('messageBoxId', Thrift.Type.STRING, 2); output.writeString(this.messageBoxId); output.writeFieldEnd(); } if (this.messagesCount !== null && this.messagesCount !== undefined) { output.writeFieldBegin('messagesCount', Thrift.Type.I32, 3); output.writeI32(this.messagesCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getRecentMessages_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Message]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getRecentMessages_result.prototype = {}; TalkService_getRecentMessages_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size1998 = 0; var _rtmp32002; this.success = []; var _etype2001 = 0; _rtmp32002 = input.readListBegin(); _etype2001 = _rtmp32002.etype; _size1998 = _rtmp32002.size; for (var _i2003 = 0; _i2003 < _size1998; ++_i2003) { var elem2004 = null; elem2004 = new ttypes.Message(); elem2004.read(input); this.success.push(elem2004); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getRecentMessages_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getRecentMessages_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter2005 in this.success) { if (this.success.hasOwnProperty(iter2005)) { iter2005 = this.success[iter2005]; iter2005.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getRecommendationIds_args = function(args) { }; TalkService_getRecommendationIds_args.prototype = {}; TalkService_getRecommendationIds_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getRecommendationIds_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getRecommendationIds_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getRecommendationIds_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getRecommendationIds_result.prototype = {}; TalkService_getRecommendationIds_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size2006 = 0; var _rtmp32010; this.success = []; var _etype2009 = 0; _rtmp32010 = input.readListBegin(); _etype2009 = _rtmp32010.etype; _size2006 = _rtmp32010.size; for (var _i2011 = 0; _i2011 < _size2006; ++_i2011) { var elem2012 = null; elem2012 = input.readString(); this.success.push(elem2012); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getRecommendationIds_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getRecommendationIds_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter2013 in this.success) { if (this.success.hasOwnProperty(iter2013)) { iter2013 = this.success[iter2013]; output.writeString(iter2013); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getRoom_args = function(args) { this.roomId = null; if (args) { if (args.roomId !== undefined && args.roomId !== null) { this.roomId = args.roomId; } } }; TalkService_getRoom_args.prototype = {}; TalkService_getRoom_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.roomId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getRoom_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getRoom_args'); if (this.roomId !== null && this.roomId !== undefined) { output.writeFieldBegin('roomId', Thrift.Type.STRING, 2); output.writeString(this.roomId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getRoom_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Room(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getRoom_result.prototype = {}; TalkService_getRoom_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Room(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getRoom_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getRoom_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getRSAKeyInfo_args = function(args) { this.provider = null; if (args) { if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } } }; TalkService_getRSAKeyInfo_args.prototype = {}; TalkService_getRSAKeyInfo_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.provider = input.readI32(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getRSAKeyInfo_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getRSAKeyInfo_args'); if (this.provider !== null && this.provider !== undefined) { output.writeFieldBegin('provider', Thrift.Type.I32, 2); output.writeI32(this.provider); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getRSAKeyInfo_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.RSAKey(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getRSAKeyInfo_result.prototype = {}; TalkService_getRSAKeyInfo_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.RSAKey(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getRSAKeyInfo_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getRSAKeyInfo_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getServerTime_args = function(args) { }; TalkService_getServerTime_args.prototype = {}; TalkService_getServerTime_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getServerTime_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getServerTime_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getServerTime_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getServerTime_result.prototype = {}; TalkService_getServerTime_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.I64) { this.success = input.readI64(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getServerTime_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getServerTime_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.I64, 0); output.writeI64(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getSessions_args = function(args) { }; TalkService_getSessions_args.prototype = {}; TalkService_getSessions_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getSessions_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getSessions_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getSessions_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.LoginSession]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getSessions_result.prototype = {}; TalkService_getSessions_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size2014 = 0; var _rtmp32018; this.success = []; var _etype2017 = 0; _rtmp32018 = input.readListBegin(); _etype2017 = _rtmp32018.etype; _size2014 = _rtmp32018.size; for (var _i2019 = 0; _i2019 < _size2014; ++_i2019) { var elem2020 = null; elem2020 = new ttypes.LoginSession(); elem2020.read(input); this.success.push(elem2020); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getSessions_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getSessions_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter2021 in this.success) { if (this.success.hasOwnProperty(iter2021)) { iter2021 = this.success[iter2021]; iter2021.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getSettings_args = function(args) { }; TalkService_getSettings_args.prototype = {}; TalkService_getSettings_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getSettings_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getSettings_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getSettings_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Settings(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getSettings_result.prototype = {}; TalkService_getSettings_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Settings(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getSettings_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getSettings_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroupsV2_args = function(args) { this.groupIds = null; if (args) { if (args.groupIds !== undefined && args.groupIds !== null) { this.groupIds = Thrift.copyList(args.groupIds, [null]); } } }; TalkService_getGroupsV2_args.prototype = {}; TalkService_getGroupsV2_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.LIST) { var _size2022 = 0; var _rtmp32026; this.groupIds = []; var _etype2025 = 0; _rtmp32026 = input.readListBegin(); _etype2025 = _rtmp32026.etype; _size2022 = _rtmp32026.size; for (var _i2027 = 0; _i2027 < _size2022; ++_i2027) { var elem2028 = null; elem2028 = input.readString(); this.groupIds.push(elem2028); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroupsV2_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroupsV2_args'); if (this.groupIds !== null && this.groupIds !== undefined) { output.writeFieldBegin('groupIds', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.groupIds.length); for (var iter2029 in this.groupIds) { if (this.groupIds.hasOwnProperty(iter2029)) { iter2029 = this.groupIds[iter2029]; output.writeString(iter2029); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getGroupsV2_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Group]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getGroupsV2_result.prototype = {}; TalkService_getGroupsV2_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size2030 = 0; var _rtmp32034; this.success = []; var _etype2033 = 0; _rtmp32034 = input.readListBegin(); _etype2033 = _rtmp32034.etype; _size2030 = _rtmp32034.size; for (var _i2035 = 0; _i2035 < _size2030; ++_i2035) { var elem2036 = null; elem2036 = new ttypes.Group(); elem2036.read(input); this.success.push(elem2036); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getGroupsV2_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getGroupsV2_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter2037 in this.success) { if (this.success.hasOwnProperty(iter2037)) { iter2037 = this.success[iter2037]; iter2037.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getSettingsAttributes_args = function(args) { this.attrBitset = null; if (args) { if (args.attrBitset !== undefined && args.attrBitset !== null) { this.attrBitset = args.attrBitset; } } }; TalkService_getSettingsAttributes_args.prototype = {}; TalkService_getSettingsAttributes_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.attrBitset = input.readI32(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getSettingsAttributes_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getSettingsAttributes_args'); if (this.attrBitset !== null && this.attrBitset !== undefined) { output.writeFieldBegin('attrBitset', Thrift.Type.I32, 2); output.writeI32(this.attrBitset); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getSettingsAttributes_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Settings(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getSettingsAttributes_result.prototype = {}; TalkService_getSettingsAttributes_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Settings(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getSettingsAttributes_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getSettingsAttributes_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getSystemConfiguration_args = function(args) { }; TalkService_getSystemConfiguration_args.prototype = {}; TalkService_getSystemConfiguration_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getSystemConfiguration_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getSystemConfiguration_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getSystemConfiguration_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.SystemConfiguration(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getSystemConfiguration_result.prototype = {}; TalkService_getSystemConfiguration_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.SystemConfiguration(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getSystemConfiguration_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getSystemConfiguration_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getUserTicket_args = function(args) { }; TalkService_getUserTicket_args.prototype = {}; TalkService_getUserTicket_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getUserTicket_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getUserTicket_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getUserTicket_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Ticket(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getUserTicket_result.prototype = {}; TalkService_getUserTicket_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Ticket(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getUserTicket_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getUserTicket_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getWapInvitation_args = function(args) { this.invitationHash = null; if (args) { if (args.invitationHash !== undefined && args.invitationHash !== null) { this.invitationHash = args.invitationHash; } } }; TalkService_getWapInvitation_args.prototype = {}; TalkService_getWapInvitation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.invitationHash = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getWapInvitation_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getWapInvitation_args'); if (this.invitationHash !== null && this.invitationHash !== undefined) { output.writeFieldBegin('invitationHash', Thrift.Type.STRING, 2); output.writeString(this.invitationHash); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getWapInvitation_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.WapInvitation(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getWapInvitation_result.prototype = {}; TalkService_getWapInvitation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.WapInvitation(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getWapInvitation_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getWapInvitation_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_invalidateUserTicket_args = function(args) { }; TalkService_invalidateUserTicket_args.prototype = {}; TalkService_invalidateUserTicket_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_invalidateUserTicket_args.prototype.write = function(output) { output.writeStructBegin('TalkService_invalidateUserTicket_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_invalidateUserTicket_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_invalidateUserTicket_result.prototype = {}; TalkService_invalidateUserTicket_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_invalidateUserTicket_result.prototype.write = function(output) { output.writeStructBegin('TalkService_invalidateUserTicket_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_inviteFriendsBySms_args = function(args) { this.phoneNumberList = null; if (args) { if (args.phoneNumberList !== undefined && args.phoneNumberList !== null) { this.phoneNumberList = Thrift.copyList(args.phoneNumberList, [null]); } } }; TalkService_inviteFriendsBySms_args.prototype = {}; TalkService_inviteFriendsBySms_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.LIST) { var _size2038 = 0; var _rtmp32042; this.phoneNumberList = []; var _etype2041 = 0; _rtmp32042 = input.readListBegin(); _etype2041 = _rtmp32042.etype; _size2038 = _rtmp32042.size; for (var _i2043 = 0; _i2043 < _size2038; ++_i2043) { var elem2044 = null; elem2044 = input.readString(); this.phoneNumberList.push(elem2044); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_inviteFriendsBySms_args.prototype.write = function(output) { output.writeStructBegin('TalkService_inviteFriendsBySms_args'); if (this.phoneNumberList !== null && this.phoneNumberList !== undefined) { output.writeFieldBegin('phoneNumberList', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.phoneNumberList.length); for (var iter2045 in this.phoneNumberList) { if (this.phoneNumberList.hasOwnProperty(iter2045)) { iter2045 = this.phoneNumberList[iter2045]; output.writeString(iter2045); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_inviteFriendsBySms_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_inviteFriendsBySms_result.prototype = {}; TalkService_inviteFriendsBySms_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_inviteFriendsBySms_result.prototype.write = function(output) { output.writeStructBegin('TalkService_inviteFriendsBySms_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_inviteIntoGroup_args = function(args) { this.reqSeq = null; this.groupId = null; this.contactIds = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } if (args.contactIds !== undefined && args.contactIds !== null) { this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; TalkService_inviteIntoGroup_args.prototype = {}; TalkService_inviteIntoGroup_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.groupId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size2046 = 0; var _rtmp32050; this.contactIds = []; var _etype2049 = 0; _rtmp32050 = input.readListBegin(); _etype2049 = _rtmp32050.etype; _size2046 = _rtmp32050.size; for (var _i2051 = 0; _i2051 < _size2046; ++_i2051) { var elem2052 = null; elem2052 = input.readString(); this.contactIds.push(elem2052); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_inviteIntoGroup_args.prototype.write = function(output) { output.writeStructBegin('TalkService_inviteIntoGroup_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.groupId !== null && this.groupId !== undefined) { output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); output.writeString(this.groupId); output.writeFieldEnd(); } if (this.contactIds !== null && this.contactIds !== undefined) { output.writeFieldBegin('contactIds', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.contactIds.length); for (var iter2053 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter2053)) { iter2053 = this.contactIds[iter2053]; output.writeString(iter2053); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_inviteIntoGroup_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_inviteIntoGroup_result.prototype = {}; TalkService_inviteIntoGroup_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_inviteIntoGroup_result.prototype.write = function(output) { output.writeStructBegin('TalkService_inviteIntoGroup_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_inviteIntoRoom_args = function(args) { this.reqSeq = null; this.roomId = null; this.contactIds = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.roomId !== undefined && args.roomId !== null) { this.roomId = args.roomId; } if (args.contactIds !== undefined && args.contactIds !== null) { this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; TalkService_inviteIntoRoom_args.prototype = {}; TalkService_inviteIntoRoom_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.roomId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size2054 = 0; var _rtmp32058; this.contactIds = []; var _etype2057 = 0; _rtmp32058 = input.readListBegin(); _etype2057 = _rtmp32058.etype; _size2054 = _rtmp32058.size; for (var _i2059 = 0; _i2059 < _size2054; ++_i2059) { var elem2060 = null; elem2060 = input.readString(); this.contactIds.push(elem2060); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_inviteIntoRoom_args.prototype.write = function(output) { output.writeStructBegin('TalkService_inviteIntoRoom_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.roomId !== null && this.roomId !== undefined) { output.writeFieldBegin('roomId', Thrift.Type.STRING, 2); output.writeString(this.roomId); output.writeFieldEnd(); } if (this.contactIds !== null && this.contactIds !== undefined) { output.writeFieldBegin('contactIds', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.contactIds.length); for (var iter2061 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter2061)) { iter2061 = this.contactIds[iter2061]; output.writeString(iter2061); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_inviteIntoRoom_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_inviteIntoRoom_result.prototype = {}; TalkService_inviteIntoRoom_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_inviteIntoRoom_result.prototype.write = function(output) { output.writeStructBegin('TalkService_inviteIntoRoom_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_inviteViaEmail_args = function(args) { this.reqSeq = null; this.email = null; this.name = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.email !== undefined && args.email !== null) { this.email = args.email; } if (args.name !== undefined && args.name !== null) { this.name = args.name; } } }; TalkService_inviteViaEmail_args.prototype = {}; TalkService_inviteViaEmail_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.email = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.name = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_inviteViaEmail_args.prototype.write = function(output) { output.writeStructBegin('TalkService_inviteViaEmail_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.email !== null && this.email !== undefined) { output.writeFieldBegin('email', Thrift.Type.STRING, 2); output.writeString(this.email); output.writeFieldEnd(); } if (this.name !== null && this.name !== undefined) { output.writeFieldBegin('name', Thrift.Type.STRING, 3); output.writeString(this.name); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_inviteViaEmail_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_inviteViaEmail_result.prototype = {}; TalkService_inviteViaEmail_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_inviteViaEmail_result.prototype.write = function(output) { output.writeStructBegin('TalkService_inviteViaEmail_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_isIdentityIdentifierAvailable_args = function(args) { this.provider = null; this.identifier = null; if (args) { if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } } }; TalkService_isIdentityIdentifierAvailable_args.prototype = {}; TalkService_isIdentityIdentifierAvailable_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 3: if (ftype == Thrift.Type.I32) { this.provider = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.identifier = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_isIdentityIdentifierAvailable_args.prototype.write = function(output) { output.writeStructBegin('TalkService_isIdentityIdentifierAvailable_args'); if (this.provider !== null && this.provider !== undefined) { output.writeFieldBegin('provider', Thrift.Type.I32, 3); output.writeI32(this.provider); output.writeFieldEnd(); } if (this.identifier !== null && this.identifier !== undefined) { output.writeFieldBegin('identifier', Thrift.Type.STRING, 2); output.writeString(this.identifier); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_isIdentityIdentifierAvailable_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_isIdentityIdentifierAvailable_result.prototype = {}; TalkService_isIdentityIdentifierAvailable_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.BOOL) { this.success = input.readBool(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_isIdentityIdentifierAvailable_result.prototype.write = function(output) { output.writeStructBegin('TalkService_isIdentityIdentifierAvailable_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.BOOL, 0); output.writeBool(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_isUseridAvailable_args = function(args) { this.userid = null; if (args) { if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } } }; TalkService_isUseridAvailable_args.prototype = {}; TalkService_isUseridAvailable_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.userid = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_isUseridAvailable_args.prototype.write = function(output) { output.writeStructBegin('TalkService_isUseridAvailable_args'); if (this.userid !== null && this.userid !== undefined) { output.writeFieldBegin('userid', Thrift.Type.STRING, 2); output.writeString(this.userid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_isUseridAvailable_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_isUseridAvailable_result.prototype = {}; TalkService_isUseridAvailable_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.BOOL) { this.success = input.readBool(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_isUseridAvailable_result.prototype.write = function(output) { output.writeStructBegin('TalkService_isUseridAvailable_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.BOOL, 0); output.writeBool(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_kickoutFromGroup_args = function(args) { this.reqSeq = null; this.groupId = null; this.contactIds = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } if (args.contactIds !== undefined && args.contactIds !== null) { this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; TalkService_kickoutFromGroup_args.prototype = {}; TalkService_kickoutFromGroup_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.groupId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size2062 = 0; var _rtmp32066; this.contactIds = []; var _etype2065 = 0; _rtmp32066 = input.readListBegin(); _etype2065 = _rtmp32066.etype; _size2062 = _rtmp32066.size; for (var _i2067 = 0; _i2067 < _size2062; ++_i2067) { var elem2068 = null; elem2068 = input.readString(); this.contactIds.push(elem2068); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_kickoutFromGroup_args.prototype.write = function(output) { output.writeStructBegin('TalkService_kickoutFromGroup_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.groupId !== null && this.groupId !== undefined) { output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); output.writeString(this.groupId); output.writeFieldEnd(); } if (this.contactIds !== null && this.contactIds !== undefined) { output.writeFieldBegin('contactIds', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.contactIds.length); for (var iter2069 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter2069)) { iter2069 = this.contactIds[iter2069]; output.writeString(iter2069); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_kickoutFromGroup_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_kickoutFromGroup_result.prototype = {}; TalkService_kickoutFromGroup_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_kickoutFromGroup_result.prototype.write = function(output) { output.writeStructBegin('TalkService_kickoutFromGroup_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reissueGroupTicket_args = function(args) { this.groupMid = null; if (args) { if (args.groupMid !== undefined && args.groupMid !== null) { this.groupMid = args.groupMid; } } }; TalkService_reissueGroupTicket_args.prototype = {}; TalkService_reissueGroupTicket_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.groupMid = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reissueGroupTicket_args.prototype.write = function(output) { output.writeStructBegin('TalkService_reissueGroupTicket_args'); if (this.groupMid !== null && this.groupMid !== undefined) { output.writeFieldBegin('groupMid', Thrift.Type.STRING, 1); output.writeString(this.groupMid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reissueGroupTicket_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_reissueGroupTicket_result.prototype = {}; TalkService_reissueGroupTicket_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reissueGroupTicket_result.prototype.write = function(output) { output.writeStructBegin('TalkService_reissueGroupTicket_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findGroupByTicket_args = function(args) { this.ticketId = null; if (args) { if (args.ticketId !== undefined && args.ticketId !== null) { this.ticketId = args.ticketId; } } }; TalkService_findGroupByTicket_args.prototype = {}; TalkService_findGroupByTicket_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.ticketId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findGroupByTicket_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findGroupByTicket_args'); if (this.ticketId !== null && this.ticketId !== undefined) { output.writeFieldBegin('ticketId', Thrift.Type.STRING, 1); output.writeString(this.ticketId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findGroupByTicket_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Group(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findGroupByTicket_result.prototype = {}; TalkService_findGroupByTicket_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Group(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findGroupByTicket_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findGroupByTicket_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_leaveGroup_args = function(args) { this.reqSeq = null; this.groupId = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } } }; TalkService_leaveGroup_args.prototype = {}; TalkService_leaveGroup_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.groupId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_leaveGroup_args.prototype.write = function(output) { output.writeStructBegin('TalkService_leaveGroup_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.groupId !== null && this.groupId !== undefined) { output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); output.writeString(this.groupId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_leaveGroup_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_leaveGroup_result.prototype = {}; TalkService_leaveGroup_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_leaveGroup_result.prototype.write = function(output) { output.writeStructBegin('TalkService_leaveGroup_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_leaveRoom_args = function(args) { this.reqSeq = null; this.roomId = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.roomId !== undefined && args.roomId !== null) { this.roomId = args.roomId; } } }; TalkService_leaveRoom_args.prototype = {}; TalkService_leaveRoom_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.roomId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_leaveRoom_args.prototype.write = function(output) { output.writeStructBegin('TalkService_leaveRoom_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.roomId !== null && this.roomId !== undefined) { output.writeFieldBegin('roomId', Thrift.Type.STRING, 2); output.writeString(this.roomId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_leaveRoom_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_leaveRoom_result.prototype = {}; TalkService_leaveRoom_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_leaveRoom_result.prototype.write = function(output) { output.writeStructBegin('TalkService_leaveRoom_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_loginWithIdentityCredential_args = function(args) { this.identityProvider = null; this.identifier = null; this.password = null; this.keepLoggedIn = null; this.accessLocation = null; this.systemName = null; this.certificate = null; if (args) { if (args.identityProvider !== undefined && args.identityProvider !== null) { this.identityProvider = args.identityProvider; } if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } if (args.password !== undefined && args.password !== null) { this.password = args.password; } if (args.keepLoggedIn !== undefined && args.keepLoggedIn !== null) { this.keepLoggedIn = args.keepLoggedIn; } if (args.accessLocation !== undefined && args.accessLocation !== null) { this.accessLocation = args.accessLocation; } if (args.systemName !== undefined && args.systemName !== null) { this.systemName = args.systemName; } if (args.certificate !== undefined && args.certificate !== null) { this.certificate = args.certificate; } } }; TalkService_loginWithIdentityCredential_args.prototype = {}; TalkService_loginWithIdentityCredential_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 8: if (ftype == Thrift.Type.I32) { this.identityProvider = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.identifier = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.password = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.BOOL) { this.keepLoggedIn = input.readBool(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { this.accessLocation = input.readString(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRING) { this.systemName = input.readString(); } else { input.skip(ftype); } break; case 9: if (ftype == Thrift.Type.STRING) { this.certificate = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_loginWithIdentityCredential_args.prototype.write = function(output) { output.writeStructBegin('TalkService_loginWithIdentityCredential_args'); if (this.identityProvider !== null && this.identityProvider !== undefined) { output.writeFieldBegin('identityProvider', Thrift.Type.I32, 8); output.writeI32(this.identityProvider); output.writeFieldEnd(); } if (this.identifier !== null && this.identifier !== undefined) { output.writeFieldBegin('identifier', Thrift.Type.STRING, 3); output.writeString(this.identifier); output.writeFieldEnd(); } if (this.password !== null && this.password !== undefined) { output.writeFieldBegin('password', Thrift.Type.STRING, 4); output.writeString(this.password); output.writeFieldEnd(); } if (this.keepLoggedIn !== null && this.keepLoggedIn !== undefined) { output.writeFieldBegin('keepLoggedIn', Thrift.Type.BOOL, 5); output.writeBool(this.keepLoggedIn); output.writeFieldEnd(); } if (this.accessLocation !== null && this.accessLocation !== undefined) { output.writeFieldBegin('accessLocation', Thrift.Type.STRING, 6); output.writeString(this.accessLocation); output.writeFieldEnd(); } if (this.systemName !== null && this.systemName !== undefined) { output.writeFieldBegin('systemName', Thrift.Type.STRING, 7); output.writeString(this.systemName); output.writeFieldEnd(); } if (this.certificate !== null && this.certificate !== undefined) { output.writeFieldBegin('certificate', Thrift.Type.STRING, 9); output.writeString(this.certificate); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_loginWithIdentityCredential_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_loginWithIdentityCredential_result.prototype = {}; TalkService_loginWithIdentityCredential_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_loginWithIdentityCredential_result.prototype.write = function(output) { output.writeStructBegin('TalkService_loginWithIdentityCredential_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_loginWithIdentityCredentialForCertificate_args = function(args) { this.identityProvider = null; this.identifier = null; this.password = null; this.keepLoggedIn = null; this.accessLocation = null; this.systemName = null; this.certificate = null; if (args) { if (args.identityProvider !== undefined && args.identityProvider !== null) { this.identityProvider = args.identityProvider; } if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } if (args.password !== undefined && args.password !== null) { this.password = args.password; } if (args.keepLoggedIn !== undefined && args.keepLoggedIn !== null) { this.keepLoggedIn = args.keepLoggedIn; } if (args.accessLocation !== undefined && args.accessLocation !== null) { this.accessLocation = args.accessLocation; } if (args.systemName !== undefined && args.systemName !== null) { this.systemName = args.systemName; } if (args.certificate !== undefined && args.certificate !== null) { this.certificate = args.certificate; } } }; TalkService_loginWithIdentityCredentialForCertificate_args.prototype = {}; TalkService_loginWithIdentityCredentialForCertificate_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 8: if (ftype == Thrift.Type.I32) { this.identityProvider = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.identifier = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.password = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.BOOL) { this.keepLoggedIn = input.readBool(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { this.accessLocation = input.readString(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRING) { this.systemName = input.readString(); } else { input.skip(ftype); } break; case 9: if (ftype == Thrift.Type.STRING) { this.certificate = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_loginWithIdentityCredentialForCertificate_args.prototype.write = function(output) { output.writeStructBegin('TalkService_loginWithIdentityCredentialForCertificate_args'); if (this.identityProvider !== null && this.identityProvider !== undefined) { output.writeFieldBegin('identityProvider', Thrift.Type.I32, 8); output.writeI32(this.identityProvider); output.writeFieldEnd(); } if (this.identifier !== null && this.identifier !== undefined) { output.writeFieldBegin('identifier', Thrift.Type.STRING, 3); output.writeString(this.identifier); output.writeFieldEnd(); } if (this.password !== null && this.password !== undefined) { output.writeFieldBegin('password', Thrift.Type.STRING, 4); output.writeString(this.password); output.writeFieldEnd(); } if (this.keepLoggedIn !== null && this.keepLoggedIn !== undefined) { output.writeFieldBegin('keepLoggedIn', Thrift.Type.BOOL, 5); output.writeBool(this.keepLoggedIn); output.writeFieldEnd(); } if (this.accessLocation !== null && this.accessLocation !== undefined) { output.writeFieldBegin('accessLocation', Thrift.Type.STRING, 6); output.writeString(this.accessLocation); output.writeFieldEnd(); } if (this.systemName !== null && this.systemName !== undefined) { output.writeFieldBegin('systemName', Thrift.Type.STRING, 7); output.writeString(this.systemName); output.writeFieldEnd(); } if (this.certificate !== null && this.certificate !== undefined) { output.writeFieldBegin('certificate', Thrift.Type.STRING, 9); output.writeString(this.certificate); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_loginWithIdentityCredentialForCertificate_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.LoginResult(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_loginWithIdentityCredentialForCertificate_result.prototype = {}; TalkService_loginWithIdentityCredentialForCertificate_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.LoginResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_loginWithIdentityCredentialForCertificate_result.prototype.write = function(output) { output.writeStructBegin('TalkService_loginWithIdentityCredentialForCertificate_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_loginWithVerifier_args = function(args) { this.verifier = null; if (args) { if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } }; TalkService_loginWithVerifier_args.prototype = {}; TalkService_loginWithVerifier_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 3: if (ftype == Thrift.Type.STRING) { this.verifier = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_loginWithVerifier_args.prototype.write = function(output) { output.writeStructBegin('TalkService_loginWithVerifier_args'); if (this.verifier !== null && this.verifier !== undefined) { output.writeFieldBegin('verifier', Thrift.Type.STRING, 3); output.writeString(this.verifier); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_loginWithVerifier_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_loginWithVerifier_result.prototype = {}; TalkService_loginWithVerifier_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_loginWithVerifier_result.prototype.write = function(output) { output.writeStructBegin('TalkService_loginWithVerifier_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_loginWithVerifierForCerificate_args = function(args) { this.verifier = null; if (args) { if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } }; TalkService_loginWithVerifierForCerificate_args.prototype = {}; TalkService_loginWithVerifierForCerificate_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 3: if (ftype == Thrift.Type.STRING) { this.verifier = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_loginWithVerifierForCerificate_args.prototype.write = function(output) { output.writeStructBegin('TalkService_loginWithVerifierForCerificate_args'); if (this.verifier !== null && this.verifier !== undefined) { output.writeFieldBegin('verifier', Thrift.Type.STRING, 3); output.writeString(this.verifier); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_loginWithVerifierForCerificate_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.LoginResult(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_loginWithVerifierForCerificate_result.prototype = {}; TalkService_loginWithVerifierForCerificate_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.LoginResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_loginWithVerifierForCerificate_result.prototype.write = function(output) { output.writeStructBegin('TalkService_loginWithVerifierForCerificate_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_loginWithVerifierForCertificate_args = function(args) { this.verifier = null; if (args) { if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } }; TalkService_loginWithVerifierForCertificate_args.prototype = {}; TalkService_loginWithVerifierForCertificate_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 3: if (ftype == Thrift.Type.STRING) { this.verifier = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_loginWithVerifierForCertificate_args.prototype.write = function(output) { output.writeStructBegin('TalkService_loginWithVerifierForCertificate_args'); if (this.verifier !== null && this.verifier !== undefined) { output.writeFieldBegin('verifier', Thrift.Type.STRING, 3); output.writeString(this.verifier); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_loginWithVerifierForCertificate_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.LoginResult(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_loginWithVerifierForCertificate_result.prototype = {}; TalkService_loginWithVerifierForCertificate_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.LoginResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_loginWithVerifierForCertificate_result.prototype.write = function(output) { output.writeStructBegin('TalkService_loginWithVerifierForCertificate_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_logout_args = function(args) { }; TalkService_logout_args.prototype = {}; TalkService_logout_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_logout_args.prototype.write = function(output) { output.writeStructBegin('TalkService_logout_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_logout_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_logout_result.prototype = {}; TalkService_logout_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_logout_result.prototype.write = function(output) { output.writeStructBegin('TalkService_logout_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_logoutSession_args = function(args) { this.tokenKey = null; if (args) { if (args.tokenKey !== undefined && args.tokenKey !== null) { this.tokenKey = args.tokenKey; } } }; TalkService_logoutSession_args.prototype = {}; TalkService_logoutSession_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.tokenKey = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_logoutSession_args.prototype.write = function(output) { output.writeStructBegin('TalkService_logoutSession_args'); if (this.tokenKey !== null && this.tokenKey !== undefined) { output.writeFieldBegin('tokenKey', Thrift.Type.STRING, 2); output.writeString(this.tokenKey); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_logoutSession_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_logoutSession_result.prototype = {}; TalkService_logoutSession_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_logoutSession_result.prototype.write = function(output) { output.writeStructBegin('TalkService_logoutSession_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_noop_args = function(args) { }; TalkService_noop_args.prototype = {}; TalkService_noop_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_noop_args.prototype.write = function(output) { output.writeStructBegin('TalkService_noop_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_noop_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_noop_result.prototype = {}; TalkService_noop_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_noop_result.prototype.write = function(output) { output.writeStructBegin('TalkService_noop_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifiedRedirect_args = function(args) { this.paramMap = null; if (args) { if (args.paramMap !== undefined && args.paramMap !== null) { this.paramMap = Thrift.copyMap(args.paramMap, [null]); } } }; TalkService_notifiedRedirect_args.prototype = {}; TalkService_notifiedRedirect_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.MAP) { var _size2070 = 0; var _rtmp32074; this.paramMap = {}; var _ktype2071 = 0; var _vtype2072 = 0; _rtmp32074 = input.readMapBegin(); _ktype2071 = _rtmp32074.ktype; _vtype2072 = _rtmp32074.vtype; _size2070 = _rtmp32074.size; for (var _i2075 = 0; _i2075 < _size2070; ++_i2075) { var key2076 = null; var val2077 = null; key2076 = input.readString(); val2077 = input.readString(); this.paramMap[key2076] = val2077; } input.readMapEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifiedRedirect_args.prototype.write = function(output) { output.writeStructBegin('TalkService_notifiedRedirect_args'); if (this.paramMap !== null && this.paramMap !== undefined) { output.writeFieldBegin('paramMap', Thrift.Type.MAP, 2); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.paramMap)); for (var kiter2078 in this.paramMap) { if (this.paramMap.hasOwnProperty(kiter2078)) { var viter2079 = this.paramMap[kiter2078]; output.writeString(kiter2078); output.writeString(viter2079); } } output.writeMapEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifiedRedirect_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_notifiedRedirect_result.prototype = {}; TalkService_notifiedRedirect_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifiedRedirect_result.prototype.write = function(output) { output.writeStructBegin('TalkService_notifiedRedirect_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifyBuddyOnAir_args = function(args) { this.seq = null; this.receiverMids = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.receiverMids !== undefined && args.receiverMids !== null) { this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; TalkService_notifyBuddyOnAir_args.prototype = {}; TalkService_notifyBuddyOnAir_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size2080 = 0; var _rtmp32084; this.receiverMids = []; var _etype2083 = 0; _rtmp32084 = input.readListBegin(); _etype2083 = _rtmp32084.etype; _size2080 = _rtmp32084.size; for (var _i2085 = 0; _i2085 < _size2080; ++_i2085) { var elem2086 = null; elem2086 = input.readString(); this.receiverMids.push(elem2086); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyBuddyOnAir_args.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyBuddyOnAir_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.receiverMids !== null && this.receiverMids !== undefined) { output.writeFieldBegin('receiverMids', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.receiverMids.length); for (var iter2087 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter2087)) { iter2087 = this.receiverMids[iter2087]; output.writeString(iter2087); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifyBuddyOnAir_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_notifyBuddyOnAir_result.prototype = {}; TalkService_notifyBuddyOnAir_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size2088 = 0; var _rtmp32092; this.success = {}; var _ktype2089 = 0; var _vtype2090 = 0; _rtmp32092 = input.readMapBegin(); _ktype2089 = _rtmp32092.ktype; _vtype2090 = _rtmp32092.vtype; _size2088 = _rtmp32092.size; for (var _i2093 = 0; _i2093 < _size2088; ++_i2093) { var key2094 = null; var val2095 = null; key2094 = input.readString(); val2095 = input.readString(); this.success[key2094] = val2095; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyBuddyOnAir_result.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyBuddyOnAir_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.success)); for (var kiter2096 in this.success) { if (this.success.hasOwnProperty(kiter2096)) { var viter2097 = this.success[kiter2096]; output.writeString(kiter2096); output.writeString(viter2097); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifyIndividualEvent_args = function(args) { this.notificationStatus = null; this.receiverMids = null; if (args) { if (args.notificationStatus !== undefined && args.notificationStatus !== null) { this.notificationStatus = args.notificationStatus; } if (args.receiverMids !== undefined && args.receiverMids !== null) { this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; TalkService_notifyIndividualEvent_args.prototype = {}; TalkService_notifyIndividualEvent_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.notificationStatus = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size2098 = 0; var _rtmp32102; this.receiverMids = []; var _etype2101 = 0; _rtmp32102 = input.readListBegin(); _etype2101 = _rtmp32102.etype; _size2098 = _rtmp32102.size; for (var _i2103 = 0; _i2103 < _size2098; ++_i2103) { var elem2104 = null; elem2104 = input.readString(); this.receiverMids.push(elem2104); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyIndividualEvent_args.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyIndividualEvent_args'); if (this.notificationStatus !== null && this.notificationStatus !== undefined) { output.writeFieldBegin('notificationStatus', Thrift.Type.I32, 2); output.writeI32(this.notificationStatus); output.writeFieldEnd(); } if (this.receiverMids !== null && this.receiverMids !== undefined) { output.writeFieldBegin('receiverMids', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.receiverMids.length); for (var iter2105 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter2105)) { iter2105 = this.receiverMids[iter2105]; output.writeString(iter2105); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifyIndividualEvent_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_notifyIndividualEvent_result.prototype = {}; TalkService_notifyIndividualEvent_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyIndividualEvent_result.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyIndividualEvent_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifyInstalled_args = function(args) { this.udidHash = null; this.applicationTypeWithExtensions = null; if (args) { if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } if (args.applicationTypeWithExtensions !== undefined && args.applicationTypeWithExtensions !== null) { this.applicationTypeWithExtensions = args.applicationTypeWithExtensions; } } }; TalkService_notifyInstalled_args.prototype = {}; TalkService_notifyInstalled_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.applicationTypeWithExtensions = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyInstalled_args.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyInstalled_args'); if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 2); output.writeString(this.udidHash); output.writeFieldEnd(); } if (this.applicationTypeWithExtensions !== null && this.applicationTypeWithExtensions !== undefined) { output.writeFieldBegin('applicationTypeWithExtensions', Thrift.Type.STRING, 3); output.writeString(this.applicationTypeWithExtensions); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifyInstalled_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_notifyInstalled_result.prototype = {}; TalkService_notifyInstalled_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyInstalled_result.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyInstalled_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifyRegistrationComplete_args = function(args) { this.udidHash = null; this.applicationTypeWithExtensions = null; if (args) { if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } if (args.applicationTypeWithExtensions !== undefined && args.applicationTypeWithExtensions !== null) { this.applicationTypeWithExtensions = args.applicationTypeWithExtensions; } } }; TalkService_notifyRegistrationComplete_args.prototype = {}; TalkService_notifyRegistrationComplete_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.applicationTypeWithExtensions = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyRegistrationComplete_args.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyRegistrationComplete_args'); if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 2); output.writeString(this.udidHash); output.writeFieldEnd(); } if (this.applicationTypeWithExtensions !== null && this.applicationTypeWithExtensions !== undefined) { output.writeFieldBegin('applicationTypeWithExtensions', Thrift.Type.STRING, 3); output.writeString(this.applicationTypeWithExtensions); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifyRegistrationComplete_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_notifyRegistrationComplete_result.prototype = {}; TalkService_notifyRegistrationComplete_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyRegistrationComplete_result.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyRegistrationComplete_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifySleep_args = function(args) { this.lastRev = null; this.badge = null; if (args) { if (args.lastRev !== undefined && args.lastRev !== null) { this.lastRev = args.lastRev; } if (args.badge !== undefined && args.badge !== null) { this.badge = args.badge; } } }; TalkService_notifySleep_args.prototype = {}; TalkService_notifySleep_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.lastRev = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.badge = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifySleep_args.prototype.write = function(output) { output.writeStructBegin('TalkService_notifySleep_args'); if (this.lastRev !== null && this.lastRev !== undefined) { output.writeFieldBegin('lastRev', Thrift.Type.I64, 2); output.writeI64(this.lastRev); output.writeFieldEnd(); } if (this.badge !== null && this.badge !== undefined) { output.writeFieldBegin('badge', Thrift.Type.I32, 3); output.writeI32(this.badge); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifySleep_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_notifySleep_result.prototype = {}; TalkService_notifySleep_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifySleep_result.prototype.write = function(output) { output.writeStructBegin('TalkService_notifySleep_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifyUpdated_args = function(args) { this.lastRev = null; this.deviceInfo = null; if (args) { if (args.lastRev !== undefined && args.lastRev !== null) { this.lastRev = args.lastRev; } if (args.deviceInfo !== undefined && args.deviceInfo !== null) { this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; TalkService_notifyUpdated_args.prototype = {}; TalkService_notifyUpdated_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.lastRev = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.deviceInfo = new ttypes.DeviceInfo(); this.deviceInfo.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyUpdated_args.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyUpdated_args'); if (this.lastRev !== null && this.lastRev !== undefined) { output.writeFieldBegin('lastRev', Thrift.Type.I64, 2); output.writeI64(this.lastRev); output.writeFieldEnd(); } if (this.deviceInfo !== null && this.deviceInfo !== undefined) { output.writeFieldBegin('deviceInfo', Thrift.Type.STRUCT, 3); this.deviceInfo.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_notifyUpdated_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_notifyUpdated_result.prototype = {}; TalkService_notifyUpdated_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyUpdated_result.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyUpdated_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_openProximityMatch_args = function(args) { this.location = null; if (args) { if (args.location !== undefined && args.location !== null) { this.location = new ttypes.Location(args.location); } } }; TalkService_openProximityMatch_args.prototype = {}; TalkService_openProximityMatch_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRUCT) { this.location = new ttypes.Location(); this.location.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_openProximityMatch_args.prototype.write = function(output) { output.writeStructBegin('TalkService_openProximityMatch_args'); if (this.location !== null && this.location !== undefined) { output.writeFieldBegin('location', Thrift.Type.STRUCT, 2); this.location.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_openProximityMatch_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_openProximityMatch_result.prototype = {}; TalkService_openProximityMatch_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_openProximityMatch_result.prototype.write = function(output) { output.writeStructBegin('TalkService_openProximityMatch_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerBuddyUser_args = function(args) { this.buddyId = null; this.registrarPassword = null; if (args) { if (args.buddyId !== undefined && args.buddyId !== null) { this.buddyId = args.buddyId; } if (args.registrarPassword !== undefined && args.registrarPassword !== null) { this.registrarPassword = args.registrarPassword; } } }; TalkService_registerBuddyUser_args.prototype = {}; TalkService_registerBuddyUser_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.buddyId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.registrarPassword = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerBuddyUser_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerBuddyUser_args'); if (this.buddyId !== null && this.buddyId !== undefined) { output.writeFieldBegin('buddyId', Thrift.Type.STRING, 2); output.writeString(this.buddyId); output.writeFieldEnd(); } if (this.registrarPassword !== null && this.registrarPassword !== undefined) { output.writeFieldBegin('registrarPassword', Thrift.Type.STRING, 3); output.writeString(this.registrarPassword); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerBuddyUser_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerBuddyUser_result.prototype = {}; TalkService_registerBuddyUser_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerBuddyUser_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerBuddyUser_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerBuddyUserid_args = function(args) { this.seq = null; this.userid = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } } }; TalkService_registerBuddyUserid_args.prototype = {}; TalkService_registerBuddyUserid_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.userid = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerBuddyUserid_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerBuddyUserid_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 2); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.userid !== null && this.userid !== undefined) { output.writeFieldBegin('userid', Thrift.Type.STRING, 3); output.writeString(this.userid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerBuddyUserid_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerBuddyUserid_result.prototype = {}; TalkService_registerBuddyUserid_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerBuddyUserid_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerBuddyUserid_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerDevice_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } }; TalkService_registerDevice_args.prototype = {}; TalkService_registerDevice_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerDevice_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerDevice_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerDevice_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerDevice_result.prototype = {}; TalkService_registerDevice_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerDevice_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerDevice_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerDeviceWithIdentityCredential_args = function(args) { this.sessionId = null; this.provider = null; this.identifier = null; this.verifier = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } }; TalkService_registerDeviceWithIdentityCredential_args.prototype = {}; TalkService_registerDeviceWithIdentityCredential_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { this.provider = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.identifier = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.verifier = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerDeviceWithIdentityCredential_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerDeviceWithIdentityCredential_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } if (this.provider !== null && this.provider !== undefined) { output.writeFieldBegin('provider', Thrift.Type.I32, 5); output.writeI32(this.provider); output.writeFieldEnd(); } if (this.identifier !== null && this.identifier !== undefined) { output.writeFieldBegin('identifier', Thrift.Type.STRING, 3); output.writeString(this.identifier); output.writeFieldEnd(); } if (this.verifier !== null && this.verifier !== undefined) { output.writeFieldBegin('verifier', Thrift.Type.STRING, 4); output.writeString(this.verifier); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerDeviceWithIdentityCredential_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerDeviceWithIdentityCredential_result.prototype = {}; TalkService_registerDeviceWithIdentityCredential_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerDeviceWithIdentityCredential_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerDeviceWithIdentityCredential_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerDeviceWithoutPhoneNumber_args = function(args) { this.region = null; this.udidHash = null; this.deviceInfo = null; if (args) { if (args.region !== undefined && args.region !== null) { this.region = args.region; } if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined && args.deviceInfo !== null) { this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; TalkService_registerDeviceWithoutPhoneNumber_args.prototype = {}; TalkService_registerDeviceWithoutPhoneNumber_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.region = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRUCT) { this.deviceInfo = new ttypes.DeviceInfo(); this.deviceInfo.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerDeviceWithoutPhoneNumber_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerDeviceWithoutPhoneNumber_args'); if (this.region !== null && this.region !== undefined) { output.writeFieldBegin('region', Thrift.Type.STRING, 2); output.writeString(this.region); output.writeFieldEnd(); } if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 3); output.writeString(this.udidHash); output.writeFieldEnd(); } if (this.deviceInfo !== null && this.deviceInfo !== undefined) { output.writeFieldBegin('deviceInfo', Thrift.Type.STRUCT, 4); this.deviceInfo.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerDeviceWithoutPhoneNumber_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerDeviceWithoutPhoneNumber_result.prototype = {}; TalkService_registerDeviceWithoutPhoneNumber_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerDeviceWithoutPhoneNumber_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerDeviceWithoutPhoneNumber_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_args = function(args) { this.region = null; this.udidHash = null; this.deviceInfo = null; this.provider = null; this.identifier = null; this.verifier = null; this.mid = null; this.migrationPincodeSessionId = null; if (args) { if (args.region !== undefined && args.region !== null) { this.region = args.region; } if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined && args.deviceInfo !== null) { this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } if (args.migrationPincodeSessionId !== undefined && args.migrationPincodeSessionId !== null) { this.migrationPincodeSessionId = args.migrationPincodeSessionId; } } }; TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_args.prototype = {}; TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.region = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRUCT) { this.deviceInfo = new ttypes.DeviceInfo(); this.deviceInfo.read(input); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { this.provider = input.readI32(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { this.identifier = input.readString(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRING) { this.verifier = input.readString(); } else { input.skip(ftype); } break; case 8: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; case 9: if (ftype == Thrift.Type.STRING) { this.migrationPincodeSessionId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_args'); if (this.region !== null && this.region !== undefined) { output.writeFieldBegin('region', Thrift.Type.STRING, 2); output.writeString(this.region); output.writeFieldEnd(); } if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 3); output.writeString(this.udidHash); output.writeFieldEnd(); } if (this.deviceInfo !== null && this.deviceInfo !== undefined) { output.writeFieldBegin('deviceInfo', Thrift.Type.STRUCT, 4); this.deviceInfo.write(output); output.writeFieldEnd(); } if (this.provider !== null && this.provider !== undefined) { output.writeFieldBegin('provider', Thrift.Type.I32, 5); output.writeI32(this.provider); output.writeFieldEnd(); } if (this.identifier !== null && this.identifier !== undefined) { output.writeFieldBegin('identifier', Thrift.Type.STRING, 6); output.writeString(this.identifier); output.writeFieldEnd(); } if (this.verifier !== null && this.verifier !== undefined) { output.writeFieldBegin('verifier', Thrift.Type.STRING, 7); output.writeString(this.verifier); output.writeFieldEnd(); } if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 8); output.writeString(this.mid); output.writeFieldEnd(); } if (this.migrationPincodeSessionId !== null && this.migrationPincodeSessionId !== undefined) { output.writeFieldBegin('migrationPincodeSessionId', Thrift.Type.STRING, 9); output.writeString(this.migrationPincodeSessionId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result.prototype = {}; TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerUserid_args = function(args) { this.reqSeq = null; this.userid = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } } }; TalkService_registerUserid_args.prototype = {}; TalkService_registerUserid_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.userid = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerUserid_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerUserid_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.userid !== null && this.userid !== undefined) { output.writeFieldBegin('userid', Thrift.Type.STRING, 2); output.writeString(this.userid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerUserid_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerUserid_result.prototype = {}; TalkService_registerUserid_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.BOOL) { this.success = input.readBool(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerUserid_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerUserid_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.BOOL, 0); output.writeBool(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWapDevice_args = function(args) { this.invitationHash = null; this.guidHash = null; this.email = null; this.deviceInfo = null; if (args) { if (args.invitationHash !== undefined && args.invitationHash !== null) { this.invitationHash = args.invitationHash; } if (args.guidHash !== undefined && args.guidHash !== null) { this.guidHash = args.guidHash; } if (args.email !== undefined && args.email !== null) { this.email = args.email; } if (args.deviceInfo !== undefined && args.deviceInfo !== null) { this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; TalkService_registerWapDevice_args.prototype = {}; TalkService_registerWapDevice_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.invitationHash = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.guidHash = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.email = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRUCT) { this.deviceInfo = new ttypes.DeviceInfo(); this.deviceInfo.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWapDevice_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWapDevice_args'); if (this.invitationHash !== null && this.invitationHash !== undefined) { output.writeFieldBegin('invitationHash', Thrift.Type.STRING, 2); output.writeString(this.invitationHash); output.writeFieldEnd(); } if (this.guidHash !== null && this.guidHash !== undefined) { output.writeFieldBegin('guidHash', Thrift.Type.STRING, 3); output.writeString(this.guidHash); output.writeFieldEnd(); } if (this.email !== null && this.email !== undefined) { output.writeFieldBegin('email', Thrift.Type.STRING, 4); output.writeString(this.email); output.writeFieldEnd(); } if (this.deviceInfo !== null && this.deviceInfo !== undefined) { output.writeFieldBegin('deviceInfo', Thrift.Type.STRUCT, 5); this.deviceInfo.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWapDevice_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerWapDevice_result.prototype = {}; TalkService_registerWapDevice_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWapDevice_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWapDevice_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWithExistingSnsIdAndIdentityCredential_args = function(args) { this.identityCredential = null; this.region = null; this.udidHash = null; this.deviceInfo = null; if (args) { if (args.identityCredential !== undefined && args.identityCredential !== null) { this.identityCredential = new ttypes.IdentityCredential(args.identityCredential); } if (args.region !== undefined && args.region !== null) { this.region = args.region; } if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined && args.deviceInfo !== null) { this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; TalkService_registerWithExistingSnsIdAndIdentityCredential_args.prototype = {}; TalkService_registerWithExistingSnsIdAndIdentityCredential_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRUCT) { this.identityCredential = new ttypes.IdentityCredential(); this.identityCredential.read(input); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.region = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRUCT) { this.deviceInfo = new ttypes.DeviceInfo(); this.deviceInfo.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWithExistingSnsIdAndIdentityCredential_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWithExistingSnsIdAndIdentityCredential_args'); if (this.identityCredential !== null && this.identityCredential !== undefined) { output.writeFieldBegin('identityCredential', Thrift.Type.STRUCT, 2); this.identityCredential.write(output); output.writeFieldEnd(); } if (this.region !== null && this.region !== undefined) { output.writeFieldBegin('region', Thrift.Type.STRING, 3); output.writeString(this.region); output.writeFieldEnd(); } if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 4); output.writeString(this.udidHash); output.writeFieldEnd(); } if (this.deviceInfo !== null && this.deviceInfo !== undefined) { output.writeFieldBegin('deviceInfo', Thrift.Type.STRUCT, 5); this.deviceInfo.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWithExistingSnsIdAndIdentityCredential_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerWithExistingSnsIdAndIdentityCredential_result.prototype = {}; TalkService_registerWithExistingSnsIdAndIdentityCredential_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWithExistingSnsIdAndIdentityCredential_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWithExistingSnsIdAndIdentityCredential_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWithSnsId_args = function(args) { this.snsIdType = null; this.snsAccessToken = null; this.region = null; this.udidHash = null; this.deviceInfo = null; this.mid = null; if (args) { if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } if (args.snsAccessToken !== undefined && args.snsAccessToken !== null) { this.snsAccessToken = args.snsAccessToken; } if (args.region !== undefined && args.region !== null) { this.region = args.region; } if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined && args.deviceInfo !== null) { this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } } }; TalkService_registerWithSnsId_args.prototype = {}; TalkService_registerWithSnsId_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.snsIdType = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.snsAccessToken = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.region = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRUCT) { this.deviceInfo = new ttypes.DeviceInfo(); this.deviceInfo.read(input); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWithSnsId_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWithSnsId_args'); if (this.snsIdType !== null && this.snsIdType !== undefined) { output.writeFieldBegin('snsIdType', Thrift.Type.I32, 2); output.writeI32(this.snsIdType); output.writeFieldEnd(); } if (this.snsAccessToken !== null && this.snsAccessToken !== undefined) { output.writeFieldBegin('snsAccessToken', Thrift.Type.STRING, 3); output.writeString(this.snsAccessToken); output.writeFieldEnd(); } if (this.region !== null && this.region !== undefined) { output.writeFieldBegin('region', Thrift.Type.STRING, 4); output.writeString(this.region); output.writeFieldEnd(); } if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 5); output.writeString(this.udidHash); output.writeFieldEnd(); } if (this.deviceInfo !== null && this.deviceInfo !== undefined) { output.writeFieldBegin('deviceInfo', Thrift.Type.STRUCT, 6); this.deviceInfo.write(output); output.writeFieldEnd(); } if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 7); output.writeString(this.mid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWithSnsId_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.RegisterWithSnsIdResult(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerWithSnsId_result.prototype = {}; TalkService_registerWithSnsId_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.RegisterWithSnsIdResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWithSnsId_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWithSnsId_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWithSnsIdAndIdentityCredential_args = function(args) { this.snsIdType = null; this.snsAccessToken = null; this.identityCredential = null; this.region = null; this.udidHash = null; this.deviceInfo = null; if (args) { if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } if (args.snsAccessToken !== undefined && args.snsAccessToken !== null) { this.snsAccessToken = args.snsAccessToken; } if (args.identityCredential !== undefined && args.identityCredential !== null) { this.identityCredential = new ttypes.IdentityCredential(args.identityCredential); } if (args.region !== undefined && args.region !== null) { this.region = args.region; } if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined && args.deviceInfo !== null) { this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; TalkService_registerWithSnsIdAndIdentityCredential_args.prototype = {}; TalkService_registerWithSnsIdAndIdentityCredential_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.snsIdType = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.snsAccessToken = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRUCT) { this.identityCredential = new ttypes.IdentityCredential(); this.identityCredential.read(input); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { this.region = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRUCT) { this.deviceInfo = new ttypes.DeviceInfo(); this.deviceInfo.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWithSnsIdAndIdentityCredential_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWithSnsIdAndIdentityCredential_args'); if (this.snsIdType !== null && this.snsIdType !== undefined) { output.writeFieldBegin('snsIdType', Thrift.Type.I32, 2); output.writeI32(this.snsIdType); output.writeFieldEnd(); } if (this.snsAccessToken !== null && this.snsAccessToken !== undefined) { output.writeFieldBegin('snsAccessToken', Thrift.Type.STRING, 3); output.writeString(this.snsAccessToken); output.writeFieldEnd(); } if (this.identityCredential !== null && this.identityCredential !== undefined) { output.writeFieldBegin('identityCredential', Thrift.Type.STRUCT, 4); this.identityCredential.write(output); output.writeFieldEnd(); } if (this.region !== null && this.region !== undefined) { output.writeFieldBegin('region', Thrift.Type.STRING, 5); output.writeString(this.region); output.writeFieldEnd(); } if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 6); output.writeString(this.udidHash); output.writeFieldEnd(); } if (this.deviceInfo !== null && this.deviceInfo !== undefined) { output.writeFieldBegin('deviceInfo', Thrift.Type.STRUCT, 7); this.deviceInfo.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerWithSnsIdAndIdentityCredential_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerWithSnsIdAndIdentityCredential_result.prototype = {}; TalkService_registerWithSnsIdAndIdentityCredential_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerWithSnsIdAndIdentityCredential_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerWithSnsIdAndIdentityCredential_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reissueDeviceCredential_args = function(args) { }; TalkService_reissueDeviceCredential_args.prototype = {}; TalkService_reissueDeviceCredential_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reissueDeviceCredential_args.prototype.write = function(output) { output.writeStructBegin('TalkService_reissueDeviceCredential_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reissueDeviceCredential_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_reissueDeviceCredential_result.prototype = {}; TalkService_reissueDeviceCredential_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reissueDeviceCredential_result.prototype.write = function(output) { output.writeStructBegin('TalkService_reissueDeviceCredential_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reissueUserTicket_args = function(args) { this.expirationTime = null; this.maxUseCount = null; if (args) { if (args.expirationTime !== undefined && args.expirationTime !== null) { this.expirationTime = args.expirationTime; } if (args.maxUseCount !== undefined && args.maxUseCount !== null) { this.maxUseCount = args.maxUseCount; } } }; TalkService_reissueUserTicket_args.prototype = {}; TalkService_reissueUserTicket_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 3: if (ftype == Thrift.Type.I64) { this.expirationTime = input.readI64(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.maxUseCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reissueUserTicket_args.prototype.write = function(output) { output.writeStructBegin('TalkService_reissueUserTicket_args'); if (this.expirationTime !== null && this.expirationTime !== undefined) { output.writeFieldBegin('expirationTime', Thrift.Type.I64, 3); output.writeI64(this.expirationTime); output.writeFieldEnd(); } if (this.maxUseCount !== null && this.maxUseCount !== undefined) { output.writeFieldBegin('maxUseCount', Thrift.Type.I32, 4); output.writeI32(this.maxUseCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reissueUserTicket_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_reissueUserTicket_result.prototype = {}; TalkService_reissueUserTicket_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reissueUserTicket_result.prototype.write = function(output) { output.writeStructBegin('TalkService_reissueUserTicket_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageReadRange_args = function(args) { this.chatIds = null; if (args) { if (args.chatIds !== undefined && args.chatIds !== null) { this.chatIds = Thrift.copyList(args.chatIds, [null]); } } }; TalkService_getMessageReadRange_args.prototype = {}; TalkService_getMessageReadRange_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.LIST) { var _size2106 = 0; var _rtmp32110; this.chatIds = []; var _etype2109 = 0; _rtmp32110 = input.readListBegin(); _etype2109 = _rtmp32110.etype; _size2106 = _rtmp32110.size; for (var _i2111 = 0; _i2111 < _size2106; ++_i2111) { var elem2112 = null; elem2112 = input.readString(); this.chatIds.push(elem2112); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageReadRange_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageReadRange_args'); if (this.chatIds !== null && this.chatIds !== undefined) { output.writeFieldBegin('chatIds', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.chatIds.length); for (var iter2113 in this.chatIds) { if (this.chatIds.hasOwnProperty(iter2113)) { iter2113 = this.chatIds[iter2113]; output.writeString(iter2113); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageReadRange_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.TMessageReadRange]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getMessageReadRange_result.prototype = {}; TalkService_getMessageReadRange_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size2114 = 0; var _rtmp32118; this.success = []; var _etype2117 = 0; _rtmp32118 = input.readListBegin(); _etype2117 = _rtmp32118.etype; _size2114 = _rtmp32118.size; for (var _i2119 = 0; _i2119 < _size2114; ++_i2119) { var elem2120 = null; elem2120 = new ttypes.TMessageReadRange(); elem2120.read(input); this.success.push(elem2120); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageReadRange_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageReadRange_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter2121 in this.success) { if (this.success.hasOwnProperty(iter2121)) { iter2121 = this.success[iter2121]; iter2121.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_rejectGroupInvitation_args = function(args) { this.reqSeq = null; this.groupId = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } } }; TalkService_rejectGroupInvitation_args.prototype = {}; TalkService_rejectGroupInvitation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.groupId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_rejectGroupInvitation_args.prototype.write = function(output) { output.writeStructBegin('TalkService_rejectGroupInvitation_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.groupId !== null && this.groupId !== undefined) { output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); output.writeString(this.groupId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_rejectGroupInvitation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_rejectGroupInvitation_result.prototype = {}; TalkService_rejectGroupInvitation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_rejectGroupInvitation_result.prototype.write = function(output) { output.writeStructBegin('TalkService_rejectGroupInvitation_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_releaseSession_args = function(args) { }; TalkService_releaseSession_args.prototype = {}; TalkService_releaseSession_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_releaseSession_args.prototype.write = function(output) { output.writeStructBegin('TalkService_releaseSession_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_releaseSession_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_releaseSession_result.prototype = {}; TalkService_releaseSession_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_releaseSession_result.prototype.write = function(output) { output.writeStructBegin('TalkService_releaseSession_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeAllMessages_args = function(args) { this.seq = null; this.lastMessageId = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.lastMessageId !== undefined && args.lastMessageId !== null) { this.lastMessageId = args.lastMessageId; } } }; TalkService_removeAllMessages_args.prototype = {}; TalkService_removeAllMessages_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.lastMessageId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeAllMessages_args.prototype.write = function(output) { output.writeStructBegin('TalkService_removeAllMessages_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.lastMessageId !== null && this.lastMessageId !== undefined) { output.writeFieldBegin('lastMessageId', Thrift.Type.STRING, 2); output.writeString(this.lastMessageId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeAllMessages_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_removeAllMessages_result.prototype = {}; TalkService_removeAllMessages_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeAllMessages_result.prototype.write = function(output) { output.writeStructBegin('TalkService_removeAllMessages_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeBuddyLocation_args = function(args) { this.mid = null; this.index = null; if (args) { if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } if (args.index !== undefined && args.index !== null) { this.index = args.index; } } }; TalkService_removeBuddyLocation_args.prototype = {}; TalkService_removeBuddyLocation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.index = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeBuddyLocation_args.prototype.write = function(output) { output.writeStructBegin('TalkService_removeBuddyLocation_args'); if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 2); output.writeString(this.mid); output.writeFieldEnd(); } if (this.index !== null && this.index !== undefined) { output.writeFieldBegin('index', Thrift.Type.I32, 3); output.writeI32(this.index); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeBuddyLocation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_removeBuddyLocation_result.prototype = {}; TalkService_removeBuddyLocation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeBuddyLocation_result.prototype.write = function(output) { output.writeStructBegin('TalkService_removeBuddyLocation_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeMessage_args = function(args) { this.messageId = null; if (args) { if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } } }; TalkService_removeMessage_args.prototype = {}; TalkService_removeMessage_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.messageId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeMessage_args.prototype.write = function(output) { output.writeStructBegin('TalkService_removeMessage_args'); if (this.messageId !== null && this.messageId !== undefined) { output.writeFieldBegin('messageId', Thrift.Type.STRING, 2); output.writeString(this.messageId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeMessage_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_removeMessage_result.prototype = {}; TalkService_removeMessage_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.BOOL) { this.success = input.readBool(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeMessage_result.prototype.write = function(output) { output.writeStructBegin('TalkService_removeMessage_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.BOOL, 0); output.writeBool(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_makeUserAddMyselfAsContact_args = function(args) { this.contactOwnerMid = null; if (args) { if (args.contactOwnerMid !== undefined && args.contactOwnerMid !== null) { this.contactOwnerMid = args.contactOwnerMid; } } }; TalkService_makeUserAddMyselfAsContact_args.prototype = {}; TalkService_makeUserAddMyselfAsContact_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.contactOwnerMid = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_makeUserAddMyselfAsContact_args.prototype.write = function(output) { output.writeStructBegin('TalkService_makeUserAddMyselfAsContact_args'); if (this.contactOwnerMid !== null && this.contactOwnerMid !== undefined) { output.writeFieldBegin('contactOwnerMid', Thrift.Type.STRING, 1); output.writeString(this.contactOwnerMid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_makeUserAddMyselfAsContact_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.ContactTransition(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_makeUserAddMyselfAsContact_result.prototype = {}; TalkService_makeUserAddMyselfAsContact_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.ContactTransition(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_makeUserAddMyselfAsContact_result.prototype.write = function(output) { output.writeStructBegin('TalkService_makeUserAddMyselfAsContact_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeMessageFromMyHome_args = function(args) { this.messageId = null; if (args) { if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } } }; TalkService_removeMessageFromMyHome_args.prototype = {}; TalkService_removeMessageFromMyHome_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.messageId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeMessageFromMyHome_args.prototype.write = function(output) { output.writeStructBegin('TalkService_removeMessageFromMyHome_args'); if (this.messageId !== null && this.messageId !== undefined) { output.writeFieldBegin('messageId', Thrift.Type.STRING, 2); output.writeString(this.messageId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeMessageFromMyHome_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_removeMessageFromMyHome_result.prototype = {}; TalkService_removeMessageFromMyHome_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.BOOL) { this.success = input.readBool(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeMessageFromMyHome_result.prototype.write = function(output) { output.writeStructBegin('TalkService_removeMessageFromMyHome_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.BOOL, 0); output.writeBool(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeSnsId_args = function(args) { this.snsIdType = null; if (args) { if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } } }; TalkService_removeSnsId_args.prototype = {}; TalkService_removeSnsId_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.snsIdType = input.readI32(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeSnsId_args.prototype.write = function(output) { output.writeStructBegin('TalkService_removeSnsId_args'); if (this.snsIdType !== null && this.snsIdType !== undefined) { output.writeFieldBegin('snsIdType', Thrift.Type.I32, 2); output.writeI32(this.snsIdType); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeSnsId_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_removeSnsId_result.prototype = {}; TalkService_removeSnsId_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeSnsId_result.prototype.write = function(output) { output.writeStructBegin('TalkService_removeSnsId_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_report_args = function(args) { this.syncOpRevision = null; this.category = null; this.report = null; if (args) { if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } if (args.category !== undefined && args.category !== null) { this.category = args.category; } if (args.report !== undefined && args.report !== null) { this.report = args.report; } } }; TalkService_report_args.prototype = {}; TalkService_report_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.syncOpRevision = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.category = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.report = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_report_args.prototype.write = function(output) { output.writeStructBegin('TalkService_report_args'); if (this.syncOpRevision !== null && this.syncOpRevision !== undefined) { output.writeFieldBegin('syncOpRevision', Thrift.Type.I64, 2); output.writeI64(this.syncOpRevision); output.writeFieldEnd(); } if (this.category !== null && this.category !== undefined) { output.writeFieldBegin('category', Thrift.Type.I32, 3); output.writeI32(this.category); output.writeFieldEnd(); } if (this.report !== null && this.report !== undefined) { output.writeFieldBegin('report', Thrift.Type.STRING, 4); output.writeString(this.report); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_report_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_report_result.prototype = {}; TalkService_report_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_report_result.prototype.write = function(output) { output.writeStructBegin('TalkService_report_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportContacts_args = function(args) { this.syncOpRevision = null; this.category = null; this.contactReports = null; this.actionType = null; if (args) { if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } if (args.category !== undefined && args.category !== null) { this.category = args.category; } if (args.contactReports !== undefined && args.contactReports !== null) { this.contactReports = Thrift.copyList(args.contactReports, [ttypes.ContactReport]); } if (args.actionType !== undefined && args.actionType !== null) { this.actionType = args.actionType; } } }; TalkService_reportContacts_args.prototype = {}; TalkService_reportContacts_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.syncOpRevision = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.category = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.LIST) { var _size2122 = 0; var _rtmp32126; this.contactReports = []; var _etype2125 = 0; _rtmp32126 = input.readListBegin(); _etype2125 = _rtmp32126.etype; _size2122 = _rtmp32126.size; for (var _i2127 = 0; _i2127 < _size2122; ++_i2127) { var elem2128 = null; elem2128 = new ttypes.ContactReport(); elem2128.read(input); this.contactReports.push(elem2128); } input.readListEnd(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { this.actionType = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportContacts_args.prototype.write = function(output) { output.writeStructBegin('TalkService_reportContacts_args'); if (this.syncOpRevision !== null && this.syncOpRevision !== undefined) { output.writeFieldBegin('syncOpRevision', Thrift.Type.I64, 2); output.writeI64(this.syncOpRevision); output.writeFieldEnd(); } if (this.category !== null && this.category !== undefined) { output.writeFieldBegin('category', Thrift.Type.I32, 3); output.writeI32(this.category); output.writeFieldEnd(); } if (this.contactReports !== null && this.contactReports !== undefined) { output.writeFieldBegin('contactReports', Thrift.Type.LIST, 4); output.writeListBegin(Thrift.Type.STRUCT, this.contactReports.length); for (var iter2129 in this.contactReports) { if (this.contactReports.hasOwnProperty(iter2129)) { iter2129 = this.contactReports[iter2129]; iter2129.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.actionType !== null && this.actionType !== undefined) { output.writeFieldBegin('actionType', Thrift.Type.I32, 5); output.writeI32(this.actionType); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportContacts_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.ContactReportResult]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_reportContacts_result.prototype = {}; TalkService_reportContacts_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size2130 = 0; var _rtmp32134; this.success = []; var _etype2133 = 0; _rtmp32134 = input.readListBegin(); _etype2133 = _rtmp32134.etype; _size2130 = _rtmp32134.size; for (var _i2135 = 0; _i2135 < _size2130; ++_i2135) { var elem2136 = null; elem2136 = new ttypes.ContactReportResult(); elem2136.read(input); this.success.push(elem2136); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportContacts_result.prototype.write = function(output) { output.writeStructBegin('TalkService_reportContacts_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter2137 in this.success) { if (this.success.hasOwnProperty(iter2137)) { iter2137 = this.success[iter2137]; iter2137.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportGroups_args = function(args) { this.syncOpRevision = null; this.groups = null; if (args) { if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } if (args.groups !== undefined && args.groups !== null) { this.groups = Thrift.copyList(args.groups, [ttypes.Group]); } } }; TalkService_reportGroups_args.prototype = {}; TalkService_reportGroups_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.syncOpRevision = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size2138 = 0; var _rtmp32142; this.groups = []; var _etype2141 = 0; _rtmp32142 = input.readListBegin(); _etype2141 = _rtmp32142.etype; _size2138 = _rtmp32142.size; for (var _i2143 = 0; _i2143 < _size2138; ++_i2143) { var elem2144 = null; elem2144 = new ttypes.Group(); elem2144.read(input); this.groups.push(elem2144); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportGroups_args.prototype.write = function(output) { output.writeStructBegin('TalkService_reportGroups_args'); if (this.syncOpRevision !== null && this.syncOpRevision !== undefined) { output.writeFieldBegin('syncOpRevision', Thrift.Type.I64, 2); output.writeI64(this.syncOpRevision); output.writeFieldEnd(); } if (this.groups !== null && this.groups !== undefined) { output.writeFieldBegin('groups', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRUCT, this.groups.length); for (var iter2145 in this.groups) { if (this.groups.hasOwnProperty(iter2145)) { iter2145 = this.groups[iter2145]; iter2145.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportGroups_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_reportGroups_result.prototype = {}; TalkService_reportGroups_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportGroups_result.prototype.write = function(output) { output.writeStructBegin('TalkService_reportGroups_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportProfile_args = function(args) { this.syncOpRevision = null; this.profile = null; if (args) { if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } if (args.profile !== undefined && args.profile !== null) { this.profile = new ttypes.Profile(args.profile); } } }; TalkService_reportProfile_args.prototype = {}; TalkService_reportProfile_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.syncOpRevision = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.profile = new ttypes.Profile(); this.profile.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportProfile_args.prototype.write = function(output) { output.writeStructBegin('TalkService_reportProfile_args'); if (this.syncOpRevision !== null && this.syncOpRevision !== undefined) { output.writeFieldBegin('syncOpRevision', Thrift.Type.I64, 2); output.writeI64(this.syncOpRevision); output.writeFieldEnd(); } if (this.profile !== null && this.profile !== undefined) { output.writeFieldBegin('profile', Thrift.Type.STRUCT, 3); this.profile.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportProfile_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_reportProfile_result.prototype = {}; TalkService_reportProfile_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportProfile_result.prototype.write = function(output) { output.writeStructBegin('TalkService_reportProfile_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportRooms_args = function(args) { this.syncOpRevision = null; this.rooms = null; if (args) { if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } if (args.rooms !== undefined && args.rooms !== null) { this.rooms = Thrift.copyList(args.rooms, [ttypes.Room]); } } }; TalkService_reportRooms_args.prototype = {}; TalkService_reportRooms_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.syncOpRevision = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size2146 = 0; var _rtmp32150; this.rooms = []; var _etype2149 = 0; _rtmp32150 = input.readListBegin(); _etype2149 = _rtmp32150.etype; _size2146 = _rtmp32150.size; for (var _i2151 = 0; _i2151 < _size2146; ++_i2151) { var elem2152 = null; elem2152 = new ttypes.Room(); elem2152.read(input); this.rooms.push(elem2152); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportRooms_args.prototype.write = function(output) { output.writeStructBegin('TalkService_reportRooms_args'); if (this.syncOpRevision !== null && this.syncOpRevision !== undefined) { output.writeFieldBegin('syncOpRevision', Thrift.Type.I64, 2); output.writeI64(this.syncOpRevision); output.writeFieldEnd(); } if (this.rooms !== null && this.rooms !== undefined) { output.writeFieldBegin('rooms', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRUCT, this.rooms.length); for (var iter2153 in this.rooms) { if (this.rooms.hasOwnProperty(iter2153)) { iter2153 = this.rooms[iter2153]; iter2153.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportRooms_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_reportRooms_result.prototype = {}; TalkService_reportRooms_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportRooms_result.prototype.write = function(output) { output.writeStructBegin('TalkService_reportRooms_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findAndAddContactByMetaTag_args = function(args) { this.reqSeq = null; this.userid = null; this.reference = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } if (args.reference !== undefined && args.reference !== null) { this.reference = args.reference; } } }; TalkService_findAndAddContactByMetaTag_args.prototype = {}; TalkService_findAndAddContactByMetaTag_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.userid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.reference = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findAndAddContactByMetaTag_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findAndAddContactByMetaTag_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.userid !== null && this.userid !== undefined) { output.writeFieldBegin('userid', Thrift.Type.STRING, 2); output.writeString(this.userid); output.writeFieldEnd(); } if (this.reference !== null && this.reference !== undefined) { output.writeFieldBegin('reference', Thrift.Type.STRING, 3); output.writeString(this.reference); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findAndAddContactByMetaTag_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Contact(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findAndAddContactByMetaTag_result.prototype = {}; TalkService_findAndAddContactByMetaTag_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Contact(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findAndAddContactByMetaTag_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findAndAddContactByMetaTag_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportSettings_args = function(args) { this.syncOpRevision = null; this.settings = null; if (args) { if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } if (args.settings !== undefined && args.settings !== null) { this.settings = new ttypes.Settings(args.settings); } } }; TalkService_reportSettings_args.prototype = {}; TalkService_reportSettings_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I64) { this.syncOpRevision = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.settings = new ttypes.Settings(); this.settings.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportSettings_args.prototype.write = function(output) { output.writeStructBegin('TalkService_reportSettings_args'); if (this.syncOpRevision !== null && this.syncOpRevision !== undefined) { output.writeFieldBegin('syncOpRevision', Thrift.Type.I64, 2); output.writeI64(this.syncOpRevision); output.writeFieldEnd(); } if (this.settings !== null && this.settings !== undefined) { output.writeFieldBegin('settings', Thrift.Type.STRUCT, 3); this.settings.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportSettings_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_reportSettings_result.prototype = {}; TalkService_reportSettings_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportSettings_result.prototype.write = function(output) { output.writeStructBegin('TalkService_reportSettings_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportSpam_args = function(args) { this.chatMid = null; this.memberMids = null; this.spammerReasons = null; this.senderMids = null; this.spamMessageIds = null; this.spamMessages = null; if (args) { if (args.chatMid !== undefined && args.chatMid !== null) { this.chatMid = args.chatMid; } if (args.memberMids !== undefined && args.memberMids !== null) { this.memberMids = Thrift.copyList(args.memberMids, [null]); } if (args.spammerReasons !== undefined && args.spammerReasons !== null) { this.spammerReasons = Thrift.copyList(args.spammerReasons, [null]); } if (args.senderMids !== undefined && args.senderMids !== null) { this.senderMids = Thrift.copyList(args.senderMids, [null]); } if (args.spamMessageIds !== undefined && args.spamMessageIds !== null) { this.spamMessageIds = Thrift.copyList(args.spamMessageIds, [null]); } if (args.spamMessages !== undefined && args.spamMessages !== null) { this.spamMessages = Thrift.copyList(args.spamMessages, [null]); } } }; TalkService_reportSpam_args.prototype = {}; TalkService_reportSpam_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.chatMid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size2154 = 0; var _rtmp32158; this.memberMids = []; var _etype2157 = 0; _rtmp32158 = input.readListBegin(); _etype2157 = _rtmp32158.etype; _size2154 = _rtmp32158.size; for (var _i2159 = 0; _i2159 < _size2154; ++_i2159) { var elem2160 = null; elem2160 = input.readString(); this.memberMids.push(elem2160); } input.readListEnd(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.LIST) { var _size2161 = 0; var _rtmp32165; this.spammerReasons = []; var _etype2164 = 0; _rtmp32165 = input.readListBegin(); _etype2164 = _rtmp32165.etype; _size2161 = _rtmp32165.size; for (var _i2166 = 0; _i2166 < _size2161; ++_i2166) { var elem2167 = null; elem2167 = input.readI32(); this.spammerReasons.push(elem2167); } input.readListEnd(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.LIST) { var _size2168 = 0; var _rtmp32172; this.senderMids = []; var _etype2171 = 0; _rtmp32172 = input.readListBegin(); _etype2171 = _rtmp32172.etype; _size2168 = _rtmp32172.size; for (var _i2173 = 0; _i2173 < _size2168; ++_i2173) { var elem2174 = null; elem2174 = input.readString(); this.senderMids.push(elem2174); } input.readListEnd(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.LIST) { var _size2175 = 0; var _rtmp32179; this.spamMessageIds = []; var _etype2178 = 0; _rtmp32179 = input.readListBegin(); _etype2178 = _rtmp32179.etype; _size2175 = _rtmp32179.size; for (var _i2180 = 0; _i2180 < _size2175; ++_i2180) { var elem2181 = null; elem2181 = input.readString(); this.spamMessageIds.push(elem2181); } input.readListEnd(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.LIST) { var _size2182 = 0; var _rtmp32186; this.spamMessages = []; var _etype2185 = 0; _rtmp32186 = input.readListBegin(); _etype2185 = _rtmp32186.etype; _size2182 = _rtmp32186.size; for (var _i2187 = 0; _i2187 < _size2182; ++_i2187) { var elem2188 = null; elem2188 = input.readString(); this.spamMessages.push(elem2188); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportSpam_args.prototype.write = function(output) { output.writeStructBegin('TalkService_reportSpam_args'); if (this.chatMid !== null && this.chatMid !== undefined) { output.writeFieldBegin('chatMid', Thrift.Type.STRING, 2); output.writeString(this.chatMid); output.writeFieldEnd(); } if (this.memberMids !== null && this.memberMids !== undefined) { output.writeFieldBegin('memberMids', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.memberMids.length); for (var iter2189 in this.memberMids) { if (this.memberMids.hasOwnProperty(iter2189)) { iter2189 = this.memberMids[iter2189]; output.writeString(iter2189); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.spammerReasons !== null && this.spammerReasons !== undefined) { output.writeFieldBegin('spammerReasons', Thrift.Type.LIST, 4); output.writeListBegin(Thrift.Type.I32, this.spammerReasons.length); for (var iter2190 in this.spammerReasons) { if (this.spammerReasons.hasOwnProperty(iter2190)) { iter2190 = this.spammerReasons[iter2190]; output.writeI32(iter2190); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.senderMids !== null && this.senderMids !== undefined) { output.writeFieldBegin('senderMids', Thrift.Type.LIST, 5); output.writeListBegin(Thrift.Type.STRING, this.senderMids.length); for (var iter2191 in this.senderMids) { if (this.senderMids.hasOwnProperty(iter2191)) { iter2191 = this.senderMids[iter2191]; output.writeString(iter2191); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.spamMessageIds !== null && this.spamMessageIds !== undefined) { output.writeFieldBegin('spamMessageIds', Thrift.Type.LIST, 6); output.writeListBegin(Thrift.Type.STRING, this.spamMessageIds.length); for (var iter2192 in this.spamMessageIds) { if (this.spamMessageIds.hasOwnProperty(iter2192)) { iter2192 = this.spamMessageIds[iter2192]; output.writeString(iter2192); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.spamMessages !== null && this.spamMessages !== undefined) { output.writeFieldBegin('spamMessages', Thrift.Type.LIST, 7); output.writeListBegin(Thrift.Type.STRING, this.spamMessages.length); for (var iter2193 in this.spamMessages) { if (this.spamMessages.hasOwnProperty(iter2193)) { iter2193 = this.spamMessages[iter2193]; output.writeString(iter2193); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportSpam_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_reportSpam_result.prototype = {}; TalkService_reportSpam_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportSpam_result.prototype.write = function(output) { output.writeStructBegin('TalkService_reportSpam_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportSpammer_args = function(args) { this.spammerMid = null; this.spammerReasons = null; this.spamMessageIds = null; if (args) { if (args.spammerMid !== undefined && args.spammerMid !== null) { this.spammerMid = args.spammerMid; } if (args.spammerReasons !== undefined && args.spammerReasons !== null) { this.spammerReasons = Thrift.copyList(args.spammerReasons, [null]); } if (args.spamMessageIds !== undefined && args.spamMessageIds !== null) { this.spamMessageIds = Thrift.copyList(args.spamMessageIds, [null]); } } }; TalkService_reportSpammer_args.prototype = {}; TalkService_reportSpammer_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.spammerMid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size2194 = 0; var _rtmp32198; this.spammerReasons = []; var _etype2197 = 0; _rtmp32198 = input.readListBegin(); _etype2197 = _rtmp32198.etype; _size2194 = _rtmp32198.size; for (var _i2199 = 0; _i2199 < _size2194; ++_i2199) { var elem2200 = null; elem2200 = input.readI32(); this.spammerReasons.push(elem2200); } input.readListEnd(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.LIST) { var _size2201 = 0; var _rtmp32205; this.spamMessageIds = []; var _etype2204 = 0; _rtmp32205 = input.readListBegin(); _etype2204 = _rtmp32205.etype; _size2201 = _rtmp32205.size; for (var _i2206 = 0; _i2206 < _size2201; ++_i2206) { var elem2207 = null; elem2207 = input.readString(); this.spamMessageIds.push(elem2207); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportSpammer_args.prototype.write = function(output) { output.writeStructBegin('TalkService_reportSpammer_args'); if (this.spammerMid !== null && this.spammerMid !== undefined) { output.writeFieldBegin('spammerMid', Thrift.Type.STRING, 2); output.writeString(this.spammerMid); output.writeFieldEnd(); } if (this.spammerReasons !== null && this.spammerReasons !== undefined) { output.writeFieldBegin('spammerReasons', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.I32, this.spammerReasons.length); for (var iter2208 in this.spammerReasons) { if (this.spammerReasons.hasOwnProperty(iter2208)) { iter2208 = this.spammerReasons[iter2208]; output.writeI32(iter2208); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.spamMessageIds !== null && this.spamMessageIds !== undefined) { output.writeFieldBegin('spamMessageIds', Thrift.Type.LIST, 4); output.writeListBegin(Thrift.Type.STRING, this.spamMessageIds.length); for (var iter2209 in this.spamMessageIds) { if (this.spamMessageIds.hasOwnProperty(iter2209)) { iter2209 = this.spamMessageIds[iter2209]; output.writeString(iter2209); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_reportSpammer_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_reportSpammer_result.prototype = {}; TalkService_reportSpammer_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_reportSpammer_result.prototype.write = function(output) { output.writeStructBegin('TalkService_reportSpammer_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_requestAccountPasswordReset_args = function(args) { this.provider = null; this.identifier = null; this.locale = null; if (args) { if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } if (args.locale !== undefined && args.locale !== null) { this.locale = args.locale; } } }; TalkService_requestAccountPasswordReset_args.prototype = {}; TalkService_requestAccountPasswordReset_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 4: if (ftype == Thrift.Type.I32) { this.provider = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.identifier = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { this.locale = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_requestAccountPasswordReset_args.prototype.write = function(output) { output.writeStructBegin('TalkService_requestAccountPasswordReset_args'); if (this.provider !== null && this.provider !== undefined) { output.writeFieldBegin('provider', Thrift.Type.I32, 4); output.writeI32(this.provider); output.writeFieldEnd(); } if (this.identifier !== null && this.identifier !== undefined) { output.writeFieldBegin('identifier', Thrift.Type.STRING, 2); output.writeString(this.identifier); output.writeFieldEnd(); } if (this.locale !== null && this.locale !== undefined) { output.writeFieldBegin('locale', Thrift.Type.STRING, 5); output.writeString(this.locale); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_requestAccountPasswordReset_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_requestAccountPasswordReset_result.prototype = {}; TalkService_requestAccountPasswordReset_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_requestAccountPasswordReset_result.prototype.write = function(output) { output.writeStructBegin('TalkService_requestAccountPasswordReset_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_requestEmailConfirmation_args = function(args) { this.emailConfirmation = null; if (args) { if (args.emailConfirmation !== undefined && args.emailConfirmation !== null) { this.emailConfirmation = new ttypes.EmailConfirmation(args.emailConfirmation); } } }; TalkService_requestEmailConfirmation_args.prototype = {}; TalkService_requestEmailConfirmation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRUCT) { this.emailConfirmation = new ttypes.EmailConfirmation(); this.emailConfirmation.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_requestEmailConfirmation_args.prototype.write = function(output) { output.writeStructBegin('TalkService_requestEmailConfirmation_args'); if (this.emailConfirmation !== null && this.emailConfirmation !== undefined) { output.writeFieldBegin('emailConfirmation', Thrift.Type.STRUCT, 2); this.emailConfirmation.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_requestEmailConfirmation_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.EmailConfirmationSession(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_requestEmailConfirmation_result.prototype = {}; TalkService_requestEmailConfirmation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.EmailConfirmationSession(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_requestEmailConfirmation_result.prototype.write = function(output) { output.writeStructBegin('TalkService_requestEmailConfirmation_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_requestIdentityUnbind_args = function(args) { this.provider = null; this.identifier = null; if (args) { if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } } }; TalkService_requestIdentityUnbind_args.prototype = {}; TalkService_requestIdentityUnbind_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 4: if (ftype == Thrift.Type.I32) { this.provider = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.identifier = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_requestIdentityUnbind_args.prototype.write = function(output) { output.writeStructBegin('TalkService_requestIdentityUnbind_args'); if (this.provider !== null && this.provider !== undefined) { output.writeFieldBegin('provider', Thrift.Type.I32, 4); output.writeI32(this.provider); output.writeFieldEnd(); } if (this.identifier !== null && this.identifier !== undefined) { output.writeFieldBegin('identifier', Thrift.Type.STRING, 2); output.writeString(this.identifier); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_requestIdentityUnbind_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_requestIdentityUnbind_result.prototype = {}; TalkService_requestIdentityUnbind_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_requestIdentityUnbind_result.prototype.write = function(output) { output.writeStructBegin('TalkService_requestIdentityUnbind_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_resendEmailConfirmation_args = function(args) { this.verifier = null; if (args) { if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } }; TalkService_resendEmailConfirmation_args.prototype = {}; TalkService_resendEmailConfirmation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.verifier = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_resendEmailConfirmation_args.prototype.write = function(output) { output.writeStructBegin('TalkService_resendEmailConfirmation_args'); if (this.verifier !== null && this.verifier !== undefined) { output.writeFieldBegin('verifier', Thrift.Type.STRING, 2); output.writeString(this.verifier); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_resendEmailConfirmation_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.EmailConfirmationSession(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_resendEmailConfirmation_result.prototype = {}; TalkService_resendEmailConfirmation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.EmailConfirmationSession(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_resendEmailConfirmation_result.prototype.write = function(output) { output.writeStructBegin('TalkService_resendEmailConfirmation_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_resendPinCode_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } }; TalkService_resendPinCode_args.prototype = {}; TalkService_resendPinCode_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_resendPinCode_args.prototype.write = function(output) { output.writeStructBegin('TalkService_resendPinCode_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_resendPinCode_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_resendPinCode_result.prototype = {}; TalkService_resendPinCode_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_resendPinCode_result.prototype.write = function(output) { output.writeStructBegin('TalkService_resendPinCode_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_resendPinCodeBySMS_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } }; TalkService_resendPinCodeBySMS_args.prototype = {}; TalkService_resendPinCodeBySMS_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_resendPinCodeBySMS_args.prototype.write = function(output) { output.writeStructBegin('TalkService_resendPinCodeBySMS_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_resendPinCodeBySMS_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_resendPinCodeBySMS_result.prototype = {}; TalkService_resendPinCodeBySMS_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_resendPinCodeBySMS_result.prototype.write = function(output) { output.writeStructBegin('TalkService_resendPinCodeBySMS_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendChatChecked_args = function(args) { this.seq = null; this.consumer = null; this.lastMessageId = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.consumer !== undefined && args.consumer !== null) { this.consumer = args.consumer; } if (args.lastMessageId !== undefined && args.lastMessageId !== null) { this.lastMessageId = args.lastMessageId; } } }; TalkService_sendChatChecked_args.prototype = {}; TalkService_sendChatChecked_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.consumer = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.lastMessageId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendChatChecked_args.prototype.write = function(output) { output.writeStructBegin('TalkService_sendChatChecked_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.consumer !== null && this.consumer !== undefined) { output.writeFieldBegin('consumer', Thrift.Type.STRING, 2); output.writeString(this.consumer); output.writeFieldEnd(); } if (this.lastMessageId !== null && this.lastMessageId !== undefined) { output.writeFieldBegin('lastMessageId', Thrift.Type.STRING, 3); output.writeString(this.lastMessageId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendChatChecked_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_sendChatChecked_result.prototype = {}; TalkService_sendChatChecked_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendChatChecked_result.prototype.write = function(output) { output.writeStructBegin('TalkService_sendChatChecked_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendMessageAwaitCommit_args = function(args) { this.seq = null; this.message = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.message !== undefined && args.message !== null) { this.message = new ttypes.Message(args.message); } } }; TalkService_sendMessageAwaitCommit_args.prototype = {}; TalkService_sendMessageAwaitCommit_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.message = new ttypes.Message(); this.message.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendMessageAwaitCommit_args.prototype.write = function(output) { output.writeStructBegin('TalkService_sendMessageAwaitCommit_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.message !== null && this.message !== undefined) { output.writeFieldBegin('message', Thrift.Type.STRUCT, 2); this.message.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendMessageAwaitCommit_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.CommitMessageResult(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_sendMessageAwaitCommit_result.prototype = {}; TalkService_sendMessageAwaitCommit_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.CommitMessageResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendMessageAwaitCommit_result.prototype.write = function(output) { output.writeStructBegin('TalkService_sendMessageAwaitCommit_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendChatRemoved_args = function(args) { this.seq = null; this.consumer = null; this.lastMessageId = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.consumer !== undefined && args.consumer !== null) { this.consumer = args.consumer; } if (args.lastMessageId !== undefined && args.lastMessageId !== null) { this.lastMessageId = args.lastMessageId; } } }; TalkService_sendChatRemoved_args.prototype = {}; TalkService_sendChatRemoved_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.consumer = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.lastMessageId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendChatRemoved_args.prototype.write = function(output) { output.writeStructBegin('TalkService_sendChatRemoved_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.consumer !== null && this.consumer !== undefined) { output.writeFieldBegin('consumer', Thrift.Type.STRING, 2); output.writeString(this.consumer); output.writeFieldEnd(); } if (this.lastMessageId !== null && this.lastMessageId !== undefined) { output.writeFieldBegin('lastMessageId', Thrift.Type.STRING, 3); output.writeString(this.lastMessageId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendChatRemoved_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_sendChatRemoved_result.prototype = {}; TalkService_sendChatRemoved_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendChatRemoved_result.prototype.write = function(output) { output.writeStructBegin('TalkService_sendChatRemoved_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendContentPreviewUpdated_args = function(args) { this.esq = null; this.messageId = null; this.receiverMids = null; if (args) { if (args.esq !== undefined && args.esq !== null) { this.esq = args.esq; } if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } if (args.receiverMids !== undefined && args.receiverMids !== null) { this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; TalkService_sendContentPreviewUpdated_args.prototype = {}; TalkService_sendContentPreviewUpdated_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.esq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.messageId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size2210 = 0; var _rtmp32214; this.receiverMids = []; var _etype2213 = 0; _rtmp32214 = input.readListBegin(); _etype2213 = _rtmp32214.etype; _size2210 = _rtmp32214.size; for (var _i2215 = 0; _i2215 < _size2210; ++_i2215) { var elem2216 = null; elem2216 = input.readString(); this.receiverMids.push(elem2216); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendContentPreviewUpdated_args.prototype.write = function(output) { output.writeStructBegin('TalkService_sendContentPreviewUpdated_args'); if (this.esq !== null && this.esq !== undefined) { output.writeFieldBegin('esq', Thrift.Type.I32, 1); output.writeI32(this.esq); output.writeFieldEnd(); } if (this.messageId !== null && this.messageId !== undefined) { output.writeFieldBegin('messageId', Thrift.Type.STRING, 2); output.writeString(this.messageId); output.writeFieldEnd(); } if (this.receiverMids !== null && this.receiverMids !== undefined) { output.writeFieldBegin('receiverMids', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.receiverMids.length); for (var iter2217 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter2217)) { iter2217 = this.receiverMids[iter2217]; output.writeString(iter2217); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendContentPreviewUpdated_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_sendContentPreviewUpdated_result.prototype = {}; TalkService_sendContentPreviewUpdated_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size2218 = 0; var _rtmp32222; this.success = {}; var _ktype2219 = 0; var _vtype2220 = 0; _rtmp32222 = input.readMapBegin(); _ktype2219 = _rtmp32222.ktype; _vtype2220 = _rtmp32222.vtype; _size2218 = _rtmp32222.size; for (var _i2223 = 0; _i2223 < _size2218; ++_i2223) { var key2224 = null; var val2225 = null; key2224 = input.readString(); val2225 = input.readString(); this.success[key2224] = val2225; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendContentPreviewUpdated_result.prototype.write = function(output) { output.writeStructBegin('TalkService_sendContentPreviewUpdated_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.success)); for (var kiter2226 in this.success) { if (this.success.hasOwnProperty(kiter2226)) { var viter2227 = this.success[kiter2226]; output.writeString(kiter2226); output.writeString(viter2227); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendContentReceipt_args = function(args) { this.seq = null; this.consumer = null; this.messageId = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.consumer !== undefined && args.consumer !== null) { this.consumer = args.consumer; } if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } } }; TalkService_sendContentReceipt_args.prototype = {}; TalkService_sendContentReceipt_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.consumer = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.messageId = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendContentReceipt_args.prototype.write = function(output) { output.writeStructBegin('TalkService_sendContentReceipt_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.consumer !== null && this.consumer !== undefined) { output.writeFieldBegin('consumer', Thrift.Type.STRING, 2); output.writeString(this.consumer); output.writeFieldEnd(); } if (this.messageId !== null && this.messageId !== undefined) { output.writeFieldBegin('messageId', Thrift.Type.STRING, 3); output.writeString(this.messageId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendContentReceipt_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_sendContentReceipt_result.prototype = {}; TalkService_sendContentReceipt_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendContentReceipt_result.prototype.write = function(output) { output.writeStructBegin('TalkService_sendContentReceipt_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendDummyPush_args = function(args) { }; TalkService_sendDummyPush_args.prototype = {}; TalkService_sendDummyPush_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendDummyPush_args.prototype.write = function(output) { output.writeStructBegin('TalkService_sendDummyPush_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendDummyPush_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_sendDummyPush_result.prototype = {}; TalkService_sendDummyPush_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendDummyPush_result.prototype.write = function(output) { output.writeStructBegin('TalkService_sendDummyPush_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeE2EEPublicKey_args = function(args) { this.publicKey = null; if (args) { if (args.publicKey !== undefined && args.publicKey !== null) { this.publicKey = new ttypes.E2EEPublicKey(args.publicKey); } } }; TalkService_removeE2EEPublicKey_args.prototype = {}; TalkService_removeE2EEPublicKey_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRUCT) { this.publicKey = new ttypes.E2EEPublicKey(); this.publicKey.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeE2EEPublicKey_args.prototype.write = function(output) { output.writeStructBegin('TalkService_removeE2EEPublicKey_args'); if (this.publicKey !== null && this.publicKey !== undefined) { output.writeFieldBegin('publicKey', Thrift.Type.STRUCT, 2); this.publicKey.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_removeE2EEPublicKey_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_removeE2EEPublicKey_result.prototype = {}; TalkService_removeE2EEPublicKey_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_removeE2EEPublicKey_result.prototype.write = function(output) { output.writeStructBegin('TalkService_removeE2EEPublicKey_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_negotiateE2EEPublicKey_args = function(args) { this.mid = null; if (args) { if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } } }; TalkService_negotiateE2EEPublicKey_args.prototype = {}; TalkService_negotiateE2EEPublicKey_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_negotiateE2EEPublicKey_args.prototype.write = function(output) { output.writeStructBegin('TalkService_negotiateE2EEPublicKey_args'); if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 2); output.writeString(this.mid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_negotiateE2EEPublicKey_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.E2EENegotiationResult(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_negotiateE2EEPublicKey_result.prototype = {}; TalkService_negotiateE2EEPublicKey_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.E2EENegotiationResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_negotiateE2EEPublicKey_result.prototype.write = function(output) { output.writeStructBegin('TalkService_negotiateE2EEPublicKey_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getE2EEPublicKey_args = function(args) { this.mid = null; this.version = null; this.keyId = null; if (args) { if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } if (args.version !== undefined && args.version !== null) { this.version = args.version; } if (args.keyId !== undefined && args.keyId !== null) { this.keyId = args.keyId; } } }; TalkService_getE2EEPublicKey_args.prototype = {}; TalkService_getE2EEPublicKey_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.version = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.keyId = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getE2EEPublicKey_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getE2EEPublicKey_args'); if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 2); output.writeString(this.mid); output.writeFieldEnd(); } if (this.version !== null && this.version !== undefined) { output.writeFieldBegin('version', Thrift.Type.I32, 3); output.writeI32(this.version); output.writeFieldEnd(); } if (this.keyId !== null && this.keyId !== undefined) { output.writeFieldBegin('keyId', Thrift.Type.I32, 4); output.writeI32(this.keyId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getE2EEPublicKey_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.E2EEPublicKey(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getE2EEPublicKey_result.prototype = {}; TalkService_getE2EEPublicKey_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.E2EEPublicKey(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getE2EEPublicKey_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getE2EEPublicKey_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_requestE2EEKeyExchange_args = function(args) { this.reqSeq = null; this.temporalPublicKey = null; this.publicKey = null; this.verifier = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.temporalPublicKey !== undefined && args.temporalPublicKey !== null) { this.temporalPublicKey = args.temporalPublicKey; } if (args.publicKey !== undefined && args.publicKey !== null) { this.publicKey = new ttypes.E2EEPublicKey(args.publicKey); } if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } }; TalkService_requestE2EEKeyExchange_args.prototype = {}; TalkService_requestE2EEKeyExchange_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.temporalPublicKey = input.readBinary(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.publicKey = new ttypes.E2EEPublicKey(); this.publicKey.read(input); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.verifier = input.readBinary(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_requestE2EEKeyExchange_args.prototype.write = function(output) { output.writeStructBegin('TalkService_requestE2EEKeyExchange_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.temporalPublicKey !== null && this.temporalPublicKey !== undefined) { output.writeFieldBegin('temporalPublicKey', Thrift.Type.STRING, 2); output.writeBinary(this.temporalPublicKey); output.writeFieldEnd(); } if (this.publicKey !== null && this.publicKey !== undefined) { output.writeFieldBegin('publicKey', Thrift.Type.STRUCT, 3); this.publicKey.write(output); output.writeFieldEnd(); } if (this.verifier !== null && this.verifier !== undefined) { output.writeFieldBegin('verifier', Thrift.Type.STRING, 4); output.writeBinary(this.verifier); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_requestE2EEKeyExchange_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_requestE2EEKeyExchange_result.prototype = {}; TalkService_requestE2EEKeyExchange_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_requestE2EEKeyExchange_result.prototype.write = function(output) { output.writeStructBegin('TalkService_requestE2EEKeyExchange_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getLastE2EEPublicKeys_args = function(args) { this.chatMid = null; if (args) { if (args.chatMid !== undefined && args.chatMid !== null) { this.chatMid = args.chatMid; } } }; TalkService_getLastE2EEPublicKeys_args.prototype = {}; TalkService_getLastE2EEPublicKeys_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.chatMid = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getLastE2EEPublicKeys_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getLastE2EEPublicKeys_args'); if (this.chatMid !== null && this.chatMid !== undefined) { output.writeFieldBegin('chatMid', Thrift.Type.STRING, 2); output.writeString(this.chatMid); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getLastE2EEPublicKeys_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [ttypes.E2EEPublicKey]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getLastE2EEPublicKeys_result.prototype = {}; TalkService_getLastE2EEPublicKeys_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size2228 = 0; var _rtmp32232; this.success = {}; var _ktype2229 = 0; var _vtype2230 = 0; _rtmp32232 = input.readMapBegin(); _ktype2229 = _rtmp32232.ktype; _vtype2230 = _rtmp32232.vtype; _size2228 = _rtmp32232.size; for (var _i2233 = 0; _i2233 < _size2228; ++_i2233) { var key2234 = null; var val2235 = null; key2234 = input.readString(); val2235 = new ttypes.E2EEPublicKey(); val2235.read(input); this.success[key2234] = val2235; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getLastE2EEPublicKeys_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getLastE2EEPublicKeys_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success)); for (var kiter2236 in this.success) { if (this.success.hasOwnProperty(kiter2236)) { var viter2237 = this.success[kiter2236]; output.writeString(kiter2236); viter2237.write(output); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerE2EEPublicKey_args = function(args) { this.reqSeq = null; this.publicKey = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.publicKey !== undefined && args.publicKey !== null) { this.publicKey = new ttypes.E2EEPublicKey(args.publicKey); } } }; TalkService_registerE2EEPublicKey_args.prototype = {}; TalkService_registerE2EEPublicKey_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.publicKey = new ttypes.E2EEPublicKey(); this.publicKey.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerE2EEPublicKey_args.prototype.write = function(output) { output.writeStructBegin('TalkService_registerE2EEPublicKey_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.publicKey !== null && this.publicKey !== undefined) { output.writeFieldBegin('publicKey', Thrift.Type.STRUCT, 2); this.publicKey.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_registerE2EEPublicKey_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.E2EEPublicKey(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_registerE2EEPublicKey_result.prototype = {}; TalkService_registerE2EEPublicKey_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.E2EEPublicKey(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_registerE2EEPublicKey_result.prototype.write = function(output) { output.writeStructBegin('TalkService_registerE2EEPublicKey_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getE2EEPublicKeys_args = function(args) { }; TalkService_getE2EEPublicKeys_args.prototype = {}; TalkService_getE2EEPublicKeys_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getE2EEPublicKeys_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getE2EEPublicKeys_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getE2EEPublicKeys_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.E2EEPublicKey]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getE2EEPublicKeys_result.prototype = {}; TalkService_getE2EEPublicKeys_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size2238 = 0; var _rtmp32242; this.success = []; var _etype2241 = 0; _rtmp32242 = input.readListBegin(); _etype2241 = _rtmp32242.etype; _size2238 = _rtmp32242.size; for (var _i2243 = 0; _i2243 < _size2238; ++_i2243) { var elem2244 = null; elem2244 = new ttypes.E2EEPublicKey(); elem2244.read(input); this.success.push(elem2244); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getE2EEPublicKeys_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getE2EEPublicKeys_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter2245 in this.success) { if (this.success.hasOwnProperty(iter2245)) { iter2245 = this.success[iter2245]; iter2245.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getE2EEPublicKeysEx_args = function(args) { this.ignoreE2EEStatus = null; if (args) { if (args.ignoreE2EEStatus !== undefined && args.ignoreE2EEStatus !== null) { this.ignoreE2EEStatus = args.ignoreE2EEStatus; } } }; TalkService_getE2EEPublicKeysEx_args.prototype = {}; TalkService_getE2EEPublicKeysEx_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.BOOL) { this.ignoreE2EEStatus = input.readBool(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getE2EEPublicKeysEx_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getE2EEPublicKeysEx_args'); if (this.ignoreE2EEStatus !== null && this.ignoreE2EEStatus !== undefined) { output.writeFieldBegin('ignoreE2EEStatus', Thrift.Type.BOOL, 2); output.writeBool(this.ignoreE2EEStatus); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getE2EEPublicKeysEx_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.E2EEPublicKey]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getE2EEPublicKeysEx_result.prototype = {}; TalkService_getE2EEPublicKeysEx_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size2246 = 0; var _rtmp32250; this.success = []; var _etype2249 = 0; _rtmp32250 = input.readListBegin(); _etype2249 = _rtmp32250.etype; _size2246 = _rtmp32250.size; for (var _i2251 = 0; _i2251 < _size2246; ++_i2251) { var elem2252 = null; elem2252 = new ttypes.E2EEPublicKey(); elem2252.read(input); this.success.push(elem2252); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getE2EEPublicKeysEx_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getE2EEPublicKeysEx_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter2253 in this.success) { if (this.success.hasOwnProperty(iter2253)) { iter2253 = this.success[iter2253]; iter2253.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getReadMessageOpsInBulk_args = function(args) { this.chatIds = null; if (args) { if (args.chatIds !== undefined && args.chatIds !== null) { this.chatIds = Thrift.copyList(args.chatIds, [null]); } } }; TalkService_getReadMessageOpsInBulk_args.prototype = {}; TalkService_getReadMessageOpsInBulk_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.LIST) { var _size2254 = 0; var _rtmp32258; this.chatIds = []; var _etype2257 = 0; _rtmp32258 = input.readListBegin(); _etype2257 = _rtmp32258.etype; _size2254 = _rtmp32258.size; for (var _i2259 = 0; _i2259 < _size2254; ++_i2259) { var elem2260 = null; elem2260 = input.readString(); this.chatIds.push(elem2260); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getReadMessageOpsInBulk_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getReadMessageOpsInBulk_args'); if (this.chatIds !== null && this.chatIds !== undefined) { output.writeFieldBegin('chatIds', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.chatIds.length); for (var iter2261 in this.chatIds) { if (this.chatIds.hasOwnProperty(iter2261)) { iter2261 = this.chatIds[iter2261]; output.writeString(iter2261); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getReadMessageOpsInBulk_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Operation]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getReadMessageOpsInBulk_result.prototype = {}; TalkService_getReadMessageOpsInBulk_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size2262 = 0; var _rtmp32266; this.success = []; var _etype2265 = 0; _rtmp32266 = input.readListBegin(); _etype2265 = _rtmp32266.etype; _size2262 = _rtmp32266.size; for (var _i2267 = 0; _i2267 < _size2262; ++_i2267) { var elem2268 = null; elem2268 = new ttypes.Operation(); elem2268.read(input); this.success.push(elem2268); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getReadMessageOpsInBulk_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getReadMessageOpsInBulk_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter2269 in this.success) { if (this.success.hasOwnProperty(iter2269)) { iter2269 = this.success[iter2269]; iter2269.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendEvent_args = function(args) { this.seq = null; this.message = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.message !== undefined && args.message !== null) { this.message = new ttypes.Message(args.message); } } }; TalkService_sendEvent_args.prototype = {}; TalkService_sendEvent_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.message = new ttypes.Message(); this.message.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendEvent_args.prototype.write = function(output) { output.writeStructBegin('TalkService_sendEvent_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.message !== null && this.message !== undefined) { output.writeFieldBegin('message', Thrift.Type.STRUCT, 2); this.message.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendEvent_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Message(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_sendEvent_result.prototype = {}; TalkService_sendEvent_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Message(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendEvent_result.prototype.write = function(output) { output.writeStructBegin('TalkService_sendEvent_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendMessage_args = function(args) { this.seq = null; this.message = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.message !== undefined && args.message !== null) { this.message = new ttypes.Message(args.message); } } }; TalkService_sendMessage_args.prototype = {}; TalkService_sendMessage_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.message = new ttypes.Message(); this.message.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendMessage_args.prototype.write = function(output) { output.writeStructBegin('TalkService_sendMessage_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.message !== null && this.message !== undefined) { output.writeFieldBegin('message', Thrift.Type.STRUCT, 2); this.message.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendMessage_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Message(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_sendMessage_result.prototype = {}; TalkService_sendMessage_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Message(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendMessage_result.prototype.write = function(output) { output.writeStructBegin('TalkService_sendMessage_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendMessageIgnored_args = function(args) { this.seq = null; this.consumer = null; this.messageIds = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.consumer !== undefined && args.consumer !== null) { this.consumer = args.consumer; } if (args.messageIds !== undefined && args.messageIds !== null) { this.messageIds = Thrift.copyList(args.messageIds, [null]); } } }; TalkService_sendMessageIgnored_args.prototype = {}; TalkService_sendMessageIgnored_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.consumer = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size2270 = 0; var _rtmp32274; this.messageIds = []; var _etype2273 = 0; _rtmp32274 = input.readListBegin(); _etype2273 = _rtmp32274.etype; _size2270 = _rtmp32274.size; for (var _i2275 = 0; _i2275 < _size2270; ++_i2275) { var elem2276 = null; elem2276 = input.readString(); this.messageIds.push(elem2276); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendMessageIgnored_args.prototype.write = function(output) { output.writeStructBegin('TalkService_sendMessageIgnored_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.consumer !== null && this.consumer !== undefined) { output.writeFieldBegin('consumer', Thrift.Type.STRING, 2); output.writeString(this.consumer); output.writeFieldEnd(); } if (this.messageIds !== null && this.messageIds !== undefined) { output.writeFieldBegin('messageIds', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.messageIds.length); for (var iter2277 in this.messageIds) { if (this.messageIds.hasOwnProperty(iter2277)) { iter2277 = this.messageIds[iter2277]; output.writeString(iter2277); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendMessageIgnored_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_sendMessageIgnored_result.prototype = {}; TalkService_sendMessageIgnored_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendMessageIgnored_result.prototype.write = function(output) { output.writeStructBegin('TalkService_sendMessageIgnored_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendMessageReceipt_args = function(args) { this.seq = null; this.consumer = null; this.messageIds = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.consumer !== undefined && args.consumer !== null) { this.consumer = args.consumer; } if (args.messageIds !== undefined && args.messageIds !== null) { this.messageIds = Thrift.copyList(args.messageIds, [null]); } } }; TalkService_sendMessageReceipt_args.prototype = {}; TalkService_sendMessageReceipt_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.consumer = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size2278 = 0; var _rtmp32282; this.messageIds = []; var _etype2281 = 0; _rtmp32282 = input.readListBegin(); _etype2281 = _rtmp32282.etype; _size2278 = _rtmp32282.size; for (var _i2283 = 0; _i2283 < _size2278; ++_i2283) { var elem2284 = null; elem2284 = input.readString(); this.messageIds.push(elem2284); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendMessageReceipt_args.prototype.write = function(output) { output.writeStructBegin('TalkService_sendMessageReceipt_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.consumer !== null && this.consumer !== undefined) { output.writeFieldBegin('consumer', Thrift.Type.STRING, 2); output.writeString(this.consumer); output.writeFieldEnd(); } if (this.messageIds !== null && this.messageIds !== undefined) { output.writeFieldBegin('messageIds', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.messageIds.length); for (var iter2285 in this.messageIds) { if (this.messageIds.hasOwnProperty(iter2285)) { iter2285 = this.messageIds[iter2285]; output.writeString(iter2285); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendMessageReceipt_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_sendMessageReceipt_result.prototype = {}; TalkService_sendMessageReceipt_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendMessageReceipt_result.prototype.write = function(output) { output.writeStructBegin('TalkService_sendMessageReceipt_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findContactByMetaTag_args = function(args) { this.userid = null; this.reference = null; if (args) { if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } if (args.reference !== undefined && args.reference !== null) { this.reference = args.reference; } } }; TalkService_findContactByMetaTag_args.prototype = {}; TalkService_findContactByMetaTag_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.userid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.reference = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findContactByMetaTag_args.prototype.write = function(output) { output.writeStructBegin('TalkService_findContactByMetaTag_args'); if (this.userid !== null && this.userid !== undefined) { output.writeFieldBegin('userid', Thrift.Type.STRING, 2); output.writeString(this.userid); output.writeFieldEnd(); } if (this.reference !== null && this.reference !== undefined) { output.writeFieldBegin('reference', Thrift.Type.STRING, 3); output.writeString(this.reference); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_findContactByMetaTag_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Contact(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_findContactByMetaTag_result.prototype = {}; TalkService_findContactByMetaTag_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Contact(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_findContactByMetaTag_result.prototype.write = function(output) { output.writeStructBegin('TalkService_findContactByMetaTag_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendMessageToMyHome_args = function(args) { this.seq = null; this.message = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.message !== undefined && args.message !== null) { this.message = new ttypes.Message(args.message); } } }; TalkService_sendMessageToMyHome_args.prototype = {}; TalkService_sendMessageToMyHome_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.message = new ttypes.Message(); this.message.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendMessageToMyHome_args.prototype.write = function(output) { output.writeStructBegin('TalkService_sendMessageToMyHome_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.message !== null && this.message !== undefined) { output.writeFieldBegin('message', Thrift.Type.STRUCT, 2); this.message.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_sendMessageToMyHome_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Message(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_sendMessageToMyHome_result.prototype = {}; TalkService_sendMessageToMyHome_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Message(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_sendMessageToMyHome_result.prototype.write = function(output) { output.writeStructBegin('TalkService_sendMessageToMyHome_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_setBuddyLocation_args = function(args) { this.mid = null; this.index = null; this.location = null; if (args) { if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } if (args.index !== undefined && args.index !== null) { this.index = args.index; } if (args.location !== undefined && args.location !== null) { this.location = new ttypes.Geolocation(args.location); } } }; TalkService_setBuddyLocation_args.prototype = {}; TalkService_setBuddyLocation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.index = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRUCT) { this.location = new ttypes.Geolocation(); this.location.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_setBuddyLocation_args.prototype.write = function(output) { output.writeStructBegin('TalkService_setBuddyLocation_args'); if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 2); output.writeString(this.mid); output.writeFieldEnd(); } if (this.index !== null && this.index !== undefined) { output.writeFieldBegin('index', Thrift.Type.I32, 3); output.writeI32(this.index); output.writeFieldEnd(); } if (this.location !== null && this.location !== undefined) { output.writeFieldBegin('location', Thrift.Type.STRUCT, 4); this.location.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_setBuddyLocation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_setBuddyLocation_result.prototype = {}; TalkService_setBuddyLocation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_setBuddyLocation_result.prototype.write = function(output) { output.writeStructBegin('TalkService_setBuddyLocation_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_setIdentityCredential_args = function(args) { this.identifier = null; this.verifier = null; this.provider = null; if (args) { if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } } }; TalkService_setIdentityCredential_args.prototype = {}; TalkService_setIdentityCredential_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.identifier = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.verifier = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.provider = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_setIdentityCredential_args.prototype.write = function(output) { output.writeStructBegin('TalkService_setIdentityCredential_args'); if (this.identifier !== null && this.identifier !== undefined) { output.writeFieldBegin('identifier', Thrift.Type.STRING, 2); output.writeString(this.identifier); output.writeFieldEnd(); } if (this.verifier !== null && this.verifier !== undefined) { output.writeFieldBegin('verifier', Thrift.Type.STRING, 3); output.writeString(this.verifier); output.writeFieldEnd(); } if (this.provider !== null && this.provider !== undefined) { output.writeFieldBegin('provider', Thrift.Type.I32, 4); output.writeI32(this.provider); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_setIdentityCredential_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_setIdentityCredential_result.prototype = {}; TalkService_setIdentityCredential_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_setIdentityCredential_result.prototype.write = function(output) { output.writeStructBegin('TalkService_setIdentityCredential_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_setNotificationsEnabled_args = function(args) { this.reqSeq = null; this.type = null; this.target = null; this.enablement = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.type !== undefined && args.type !== null) { this.type = args.type; } if (args.target !== undefined && args.target !== null) { this.target = args.target; } if (args.enablement !== undefined && args.enablement !== null) { this.enablement = args.enablement; } } }; TalkService_setNotificationsEnabled_args.prototype = {}; TalkService_setNotificationsEnabled_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { this.type = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.target = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.BOOL) { this.enablement = input.readBool(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_setNotificationsEnabled_args.prototype.write = function(output) { output.writeStructBegin('TalkService_setNotificationsEnabled_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.type !== null && this.type !== undefined) { output.writeFieldBegin('type', Thrift.Type.I32, 2); output.writeI32(this.type); output.writeFieldEnd(); } if (this.target !== null && this.target !== undefined) { output.writeFieldBegin('target', Thrift.Type.STRING, 3); output.writeString(this.target); output.writeFieldEnd(); } if (this.enablement !== null && this.enablement !== undefined) { output.writeFieldBegin('enablement', Thrift.Type.BOOL, 4); output.writeBool(this.enablement); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_setNotificationsEnabled_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_setNotificationsEnabled_result.prototype = {}; TalkService_setNotificationsEnabled_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_setNotificationsEnabled_result.prototype.write = function(output) { output.writeStructBegin('TalkService_setNotificationsEnabled_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_startUpdateVerification_args = function(args) { this.region = null; this.carrier = null; this.phone = null; this.udidHash = null; this.deviceInfo = null; this.networkCode = null; this.locale = null; if (args) { if (args.region !== undefined && args.region !== null) { this.region = args.region; } if (args.carrier !== undefined && args.carrier !== null) { this.carrier = args.carrier; } if (args.phone !== undefined && args.phone !== null) { this.phone = args.phone; } if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined && args.deviceInfo !== null) { this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } if (args.networkCode !== undefined && args.networkCode !== null) { this.networkCode = args.networkCode; } if (args.locale !== undefined && args.locale !== null) { this.locale = args.locale; } } }; TalkService_startUpdateVerification_args.prototype = {}; TalkService_startUpdateVerification_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.region = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.carrier = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.phone = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRUCT) { this.deviceInfo = new ttypes.DeviceInfo(); this.deviceInfo.read(input); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRING) { this.networkCode = input.readString(); } else { input.skip(ftype); } break; case 8: if (ftype == Thrift.Type.STRING) { this.locale = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_startUpdateVerification_args.prototype.write = function(output) { output.writeStructBegin('TalkService_startUpdateVerification_args'); if (this.region !== null && this.region !== undefined) { output.writeFieldBegin('region', Thrift.Type.STRING, 2); output.writeString(this.region); output.writeFieldEnd(); } if (this.carrier !== null && this.carrier !== undefined) { output.writeFieldBegin('carrier', Thrift.Type.I32, 3); output.writeI32(this.carrier); output.writeFieldEnd(); } if (this.phone !== null && this.phone !== undefined) { output.writeFieldBegin('phone', Thrift.Type.STRING, 4); output.writeString(this.phone); output.writeFieldEnd(); } if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 5); output.writeString(this.udidHash); output.writeFieldEnd(); } if (this.deviceInfo !== null && this.deviceInfo !== undefined) { output.writeFieldBegin('deviceInfo', Thrift.Type.STRUCT, 6); this.deviceInfo.write(output); output.writeFieldEnd(); } if (this.networkCode !== null && this.networkCode !== undefined) { output.writeFieldBegin('networkCode', Thrift.Type.STRING, 7); output.writeString(this.networkCode); output.writeFieldEnd(); } if (this.locale !== null && this.locale !== undefined) { output.writeFieldBegin('locale', Thrift.Type.STRING, 8); output.writeString(this.locale); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_startUpdateVerification_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.VerificationSessionData(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_startUpdateVerification_result.prototype = {}; TalkService_startUpdateVerification_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.VerificationSessionData(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_startUpdateVerification_result.prototype.write = function(output) { output.writeStructBegin('TalkService_startUpdateVerification_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_startVerification_args = function(args) { this.region = null; this.carrier = null; this.phone = null; this.udidHash = null; this.deviceInfo = null; this.networkCode = null; this.mid = null; this.locale = null; this.simInfo = null; this.oldUdidHash = null; if (args) { if (args.region !== undefined && args.region !== null) { this.region = args.region; } if (args.carrier !== undefined && args.carrier !== null) { this.carrier = args.carrier; } if (args.phone !== undefined && args.phone !== null) { this.phone = args.phone; } if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined && args.deviceInfo !== null) { this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } if (args.networkCode !== undefined && args.networkCode !== null) { this.networkCode = args.networkCode; } if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } if (args.locale !== undefined && args.locale !== null) { this.locale = args.locale; } if (args.simInfo !== undefined && args.simInfo !== null) { this.simInfo = new ttypes.SIMInfo(args.simInfo); } if (args.oldUdidHash !== undefined && args.oldUdidHash !== null) { this.oldUdidHash = args.oldUdidHash; } } }; TalkService_startVerification_args.prototype = {}; TalkService_startVerification_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.region = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.carrier = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.phone = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRUCT) { this.deviceInfo = new ttypes.DeviceInfo(); this.deviceInfo.read(input); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRING) { this.networkCode = input.readString(); } else { input.skip(ftype); } break; case 8: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; case 9: if (ftype == Thrift.Type.STRING) { this.locale = input.readString(); } else { input.skip(ftype); } break; case 10: if (ftype == Thrift.Type.STRUCT) { this.simInfo = new ttypes.SIMInfo(); this.simInfo.read(input); } else { input.skip(ftype); } break; case 11: if (ftype == Thrift.Type.STRING) { this.oldUdidHash = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_startVerification_args.prototype.write = function(output) { output.writeStructBegin('TalkService_startVerification_args'); if (this.region !== null && this.region !== undefined) { output.writeFieldBegin('region', Thrift.Type.STRING, 2); output.writeString(this.region); output.writeFieldEnd(); } if (this.carrier !== null && this.carrier !== undefined) { output.writeFieldBegin('carrier', Thrift.Type.I32, 3); output.writeI32(this.carrier); output.writeFieldEnd(); } if (this.phone !== null && this.phone !== undefined) { output.writeFieldBegin('phone', Thrift.Type.STRING, 4); output.writeString(this.phone); output.writeFieldEnd(); } if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 5); output.writeString(this.udidHash); output.writeFieldEnd(); } if (this.deviceInfo !== null && this.deviceInfo !== undefined) { output.writeFieldBegin('deviceInfo', Thrift.Type.STRUCT, 6); this.deviceInfo.write(output); output.writeFieldEnd(); } if (this.networkCode !== null && this.networkCode !== undefined) { output.writeFieldBegin('networkCode', Thrift.Type.STRING, 7); output.writeString(this.networkCode); output.writeFieldEnd(); } if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 8); output.writeString(this.mid); output.writeFieldEnd(); } if (this.locale !== null && this.locale !== undefined) { output.writeFieldBegin('locale', Thrift.Type.STRING, 9); output.writeString(this.locale); output.writeFieldEnd(); } if (this.simInfo !== null && this.simInfo !== undefined) { output.writeFieldBegin('simInfo', Thrift.Type.STRUCT, 10); this.simInfo.write(output); output.writeFieldEnd(); } if (this.oldUdidHash !== null && this.oldUdidHash !== undefined) { output.writeFieldBegin('oldUdidHash', Thrift.Type.STRING, 11); output.writeString(this.oldUdidHash); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_startVerification_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.VerificationSessionData(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_startVerification_result.prototype = {}; TalkService_startVerification_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.VerificationSessionData(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_startVerification_result.prototype.write = function(output) { output.writeStructBegin('TalkService_startVerification_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateGroupPreferenceAttribute_args = function(args) { this.reqSeq = null; this.groupMid = null; this.updatedAttrs = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.groupMid !== undefined && args.groupMid !== null) { this.groupMid = args.groupMid; } if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { this.updatedAttrs = Thrift.copyMap(args.updatedAttrs, [null]); } } }; TalkService_updateGroupPreferenceAttribute_args.prototype = {}; TalkService_updateGroupPreferenceAttribute_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.groupMid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.MAP) { var _size2286 = 0; var _rtmp32290; this.updatedAttrs = {}; var _ktype2287 = 0; var _vtype2288 = 0; _rtmp32290 = input.readMapBegin(); _ktype2287 = _rtmp32290.ktype; _vtype2288 = _rtmp32290.vtype; _size2286 = _rtmp32290.size; for (var _i2291 = 0; _i2291 < _size2286; ++_i2291) { var key2292 = null; var val2293 = null; key2292 = input.readI32(); val2293 = input.readString(); this.updatedAttrs[key2292] = val2293; } input.readMapEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateGroupPreferenceAttribute_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateGroupPreferenceAttribute_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.groupMid !== null && this.groupMid !== undefined) { output.writeFieldBegin('groupMid', Thrift.Type.STRING, 2); output.writeString(this.groupMid); output.writeFieldEnd(); } if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { output.writeFieldBegin('updatedAttrs', Thrift.Type.MAP, 3); output.writeMapBegin(Thrift.Type.I32, Thrift.Type.STRING, Thrift.objectLength(this.updatedAttrs)); for (var kiter2294 in this.updatedAttrs) { if (this.updatedAttrs.hasOwnProperty(kiter2294)) { var viter2295 = this.updatedAttrs[kiter2294]; output.writeI32(kiter2294); output.writeString(viter2295); } } output.writeMapEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateGroupPreferenceAttribute_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateGroupPreferenceAttribute_result.prototype = {}; TalkService_updateGroupPreferenceAttribute_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateGroupPreferenceAttribute_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateGroupPreferenceAttribute_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createRoomV2_args = function(args) { this.reqSeq = null; this.contactIds = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.contactIds !== undefined && args.contactIds !== null) { this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; TalkService_createRoomV2_args.prototype = {}; TalkService_createRoomV2_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size2296 = 0; var _rtmp32300; this.contactIds = []; var _etype2299 = 0; _rtmp32300 = input.readListBegin(); _etype2299 = _rtmp32300.etype; _size2296 = _rtmp32300.size; for (var _i2301 = 0; _i2301 < _size2296; ++_i2301) { var elem2302 = null; elem2302 = input.readString(); this.contactIds.push(elem2302); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createRoomV2_args.prototype.write = function(output) { output.writeStructBegin('TalkService_createRoomV2_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.contactIds !== null && this.contactIds !== undefined) { output.writeFieldBegin('contactIds', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.contactIds.length); for (var iter2303 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter2303)) { iter2303 = this.contactIds[iter2303]; output.writeString(iter2303); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_createRoomV2_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Room(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_createRoomV2_result.prototype = {}; TalkService_createRoomV2_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Room(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_createRoomV2_result.prototype.write = function(output) { output.writeStructBegin('TalkService_createRoomV2_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_storeUpdateProfileAttribute_args = function(args) { this.seq = null; this.profileAttribute = null; this.value = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.profileAttribute !== undefined && args.profileAttribute !== null) { this.profileAttribute = args.profileAttribute; } if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TalkService_storeUpdateProfileAttribute_args.prototype = {}; TalkService_storeUpdateProfileAttribute_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { this.profileAttribute = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.value = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_storeUpdateProfileAttribute_args.prototype.write = function(output) { output.writeStructBegin('TalkService_storeUpdateProfileAttribute_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.profileAttribute !== null && this.profileAttribute !== undefined) { output.writeFieldBegin('profileAttribute', Thrift.Type.I32, 2); output.writeI32(this.profileAttribute); output.writeFieldEnd(); } if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.STRING, 3); output.writeString(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_storeUpdateProfileAttribute_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_storeUpdateProfileAttribute_result.prototype = {}; TalkService_storeUpdateProfileAttribute_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_storeUpdateProfileAttribute_result.prototype.write = function(output) { output.writeStructBegin('TalkService_storeUpdateProfileAttribute_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_syncContactBySnsIds_args = function(args) { this.reqSeq = null; this.modifications = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.modifications !== undefined && args.modifications !== null) { this.modifications = Thrift.copyList(args.modifications, [ttypes.SnsFriendModification]); } } }; TalkService_syncContactBySnsIds_args.prototype = {}; TalkService_syncContactBySnsIds_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size2304 = 0; var _rtmp32308; this.modifications = []; var _etype2307 = 0; _rtmp32308 = input.readListBegin(); _etype2307 = _rtmp32308.etype; _size2304 = _rtmp32308.size; for (var _i2309 = 0; _i2309 < _size2304; ++_i2309) { var elem2310 = null; elem2310 = new ttypes.SnsFriendModification(); elem2310.read(input); this.modifications.push(elem2310); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_syncContactBySnsIds_args.prototype.write = function(output) { output.writeStructBegin('TalkService_syncContactBySnsIds_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.modifications !== null && this.modifications !== undefined) { output.writeFieldBegin('modifications', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.modifications.length); for (var iter2311 in this.modifications) { if (this.modifications.hasOwnProperty(iter2311)) { iter2311 = this.modifications[iter2311]; iter2311.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_syncContactBySnsIds_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.SnsFriendContactRegistration]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_syncContactBySnsIds_result.prototype = {}; TalkService_syncContactBySnsIds_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size2312 = 0; var _rtmp32316; this.success = []; var _etype2315 = 0; _rtmp32316 = input.readListBegin(); _etype2315 = _rtmp32316.etype; _size2312 = _rtmp32316.size; for (var _i2317 = 0; _i2317 < _size2312; ++_i2317) { var elem2318 = null; elem2318 = new ttypes.SnsFriendContactRegistration(); elem2318.read(input); this.success.push(elem2318); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_syncContactBySnsIds_result.prototype.write = function(output) { output.writeStructBegin('TalkService_syncContactBySnsIds_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter2319 in this.success) { if (this.success.hasOwnProperty(iter2319)) { iter2319 = this.success[iter2319]; iter2319.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_syncContacts_args = function(args) { this.reqSeq = null; this.localContacts = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.localContacts !== undefined && args.localContacts !== null) { this.localContacts = Thrift.copyList(args.localContacts, [ttypes.ContactModification]); } } }; TalkService_syncContacts_args.prototype = {}; TalkService_syncContacts_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size2320 = 0; var _rtmp32324; this.localContacts = []; var _etype2323 = 0; _rtmp32324 = input.readListBegin(); _etype2323 = _rtmp32324.etype; _size2320 = _rtmp32324.size; for (var _i2325 = 0; _i2325 < _size2320; ++_i2325) { var elem2326 = null; elem2326 = new ttypes.ContactModification(); elem2326.read(input); this.localContacts.push(elem2326); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_syncContacts_args.prototype.write = function(output) { output.writeStructBegin('TalkService_syncContacts_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.localContacts !== null && this.localContacts !== undefined) { output.writeFieldBegin('localContacts', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.localContacts.length); for (var iter2327 in this.localContacts) { if (this.localContacts.hasOwnProperty(iter2327)) { iter2327 = this.localContacts[iter2327]; iter2327.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_syncContacts_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [ttypes.ContactRegistration]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_syncContacts_result.prototype = {}; TalkService_syncContacts_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size2328 = 0; var _rtmp32332; this.success = {}; var _ktype2329 = 0; var _vtype2330 = 0; _rtmp32332 = input.readMapBegin(); _ktype2329 = _rtmp32332.ktype; _vtype2330 = _rtmp32332.vtype; _size2328 = _rtmp32332.size; for (var _i2333 = 0; _i2333 < _size2328; ++_i2333) { var key2334 = null; var val2335 = null; key2334 = input.readString(); val2335 = new ttypes.ContactRegistration(); val2335.read(input); this.success[key2334] = val2335; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_syncContacts_result.prototype.write = function(output) { output.writeStructBegin('TalkService_syncContacts_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success)); for (var kiter2336 in this.success) { if (this.success.hasOwnProperty(kiter2336)) { var viter2337 = this.success[kiter2336]; output.writeString(kiter2336); viter2337.write(output); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_trySendMessage_args = function(args) { this.seq = null; this.message = null; if (args) { if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } if (args.message !== undefined && args.message !== null) { this.message = new ttypes.Message(args.message); } } }; TalkService_trySendMessage_args.prototype = {}; TalkService_trySendMessage_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.seq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.message = new ttypes.Message(); this.message.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_trySendMessage_args.prototype.write = function(output) { output.writeStructBegin('TalkService_trySendMessage_args'); if (this.seq !== null && this.seq !== undefined) { output.writeFieldBegin('seq', Thrift.Type.I32, 1); output.writeI32(this.seq); output.writeFieldEnd(); } if (this.message !== null && this.message !== undefined) { output.writeFieldBegin('message', Thrift.Type.STRUCT, 2); this.message.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_trySendMessage_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Message(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_trySendMessage_result.prototype = {}; TalkService_trySendMessage_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Message(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_trySendMessage_result.prototype.write = function(output) { output.writeStructBegin('TalkService_trySendMessage_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getNextMessagesV2_args = function(args) { this.messageBoxId = null; this.startMessageId = null; this.messagesCount = null; if (args) { if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } if (args.startMessageId !== undefined && args.startMessageId !== null) { this.startMessageId = new ttypes.MessageBoxV2MessageId(args.startMessageId); } if (args.messagesCount !== undefined && args.messagesCount !== null) { this.messagesCount = args.messagesCount; } } }; TalkService_getNextMessagesV2_args.prototype = {}; TalkService_getNextMessagesV2_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.messageBoxId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.startMessageId = new ttypes.MessageBoxV2MessageId(); this.startMessageId.read(input); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.messagesCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getNextMessagesV2_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getNextMessagesV2_args'); if (this.messageBoxId !== null && this.messageBoxId !== undefined) { output.writeFieldBegin('messageBoxId', Thrift.Type.STRING, 2); output.writeString(this.messageBoxId); output.writeFieldEnd(); } if (this.startMessageId !== null && this.startMessageId !== undefined) { output.writeFieldBegin('startMessageId', Thrift.Type.STRUCT, 3); this.startMessageId.write(output); output.writeFieldEnd(); } if (this.messagesCount !== null && this.messagesCount !== undefined) { output.writeFieldBegin('messagesCount', Thrift.Type.I32, 4); output.writeI32(this.messagesCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getNextMessagesV2_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Message]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getNextMessagesV2_result.prototype = {}; TalkService_getNextMessagesV2_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size2338 = 0; var _rtmp32342; this.success = []; var _etype2341 = 0; _rtmp32342 = input.readListBegin(); _etype2341 = _rtmp32342.etype; _size2338 = _rtmp32342.size; for (var _i2343 = 0; _i2343 < _size2338; ++_i2343) { var elem2344 = null; elem2344 = new ttypes.Message(); elem2344.read(input); this.success.push(elem2344); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getNextMessagesV2_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getNextMessagesV2_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter2345 in this.success) { if (this.success.hasOwnProperty(iter2345)) { iter2345 = this.success[iter2345]; iter2345.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxCompactWrapUpV2_args = function(args) { this.messageBoxId = null; if (args) { if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } } }; TalkService_getMessageBoxCompactWrapUpV2_args.prototype = {}; TalkService_getMessageBoxCompactWrapUpV2_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.messageBoxId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxCompactWrapUpV2_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxCompactWrapUpV2_args'); if (this.messageBoxId !== null && this.messageBoxId !== undefined) { output.writeFieldBegin('messageBoxId', Thrift.Type.STRING, 2); output.writeString(this.messageBoxId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getMessageBoxCompactWrapUpV2_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.TMessageBoxWrapUp(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getMessageBoxCompactWrapUpV2_result.prototype = {}; TalkService_getMessageBoxCompactWrapUpV2_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.TMessageBoxWrapUp(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getMessageBoxCompactWrapUpV2_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getMessageBoxCompactWrapUpV2_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getRecentMessagesV2_args = function(args) { this.messageBoxId = null; this.messagesCount = null; if (args) { if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } if (args.messagesCount !== undefined && args.messagesCount !== null) { this.messagesCount = args.messagesCount; } } }; TalkService_getRecentMessagesV2_args.prototype = {}; TalkService_getRecentMessagesV2_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.messageBoxId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.messagesCount = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getRecentMessagesV2_args.prototype.write = function(output) { output.writeStructBegin('TalkService_getRecentMessagesV2_args'); if (this.messageBoxId !== null && this.messageBoxId !== undefined) { output.writeFieldBegin('messageBoxId', Thrift.Type.STRING, 2); output.writeString(this.messageBoxId); output.writeFieldEnd(); } if (this.messagesCount !== null && this.messagesCount !== undefined) { output.writeFieldBegin('messagesCount', Thrift.Type.I32, 3); output.writeI32(this.messagesCount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_getRecentMessagesV2_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.Message]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_getRecentMessagesV2_result.prototype = {}; TalkService_getRecentMessagesV2_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { var _size2346 = 0; var _rtmp32350; this.success = []; var _etype2349 = 0; _rtmp32350 = input.readListBegin(); _etype2349 = _rtmp32350.etype; _size2346 = _rtmp32350.size; for (var _i2351 = 0; _i2351 < _size2346; ++_i2351) { var elem2352 = null; elem2352 = new ttypes.Message(); elem2352.read(input); this.success.push(elem2352); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_getRecentMessagesV2_result.prototype.write = function(output) { output.writeStructBegin('TalkService_getRecentMessagesV2_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter2353 in this.success) { if (this.success.hasOwnProperty(iter2353)) { iter2353 = this.success[iter2353]; iter2353.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_validateContactsOnBot_args = function(args) { this.contacts = null; if (args) { if (args.contacts !== undefined && args.contacts !== null) { this.contacts = Thrift.copyList(args.contacts, [null]); } } }; TalkService_validateContactsOnBot_args.prototype = {}; TalkService_validateContactsOnBot_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.LIST) { var _size2354 = 0; var _rtmp32358; this.contacts = []; var _etype2357 = 0; _rtmp32358 = input.readListBegin(); _etype2357 = _rtmp32358.etype; _size2354 = _rtmp32358.size; for (var _i2359 = 0; _i2359 < _size2354; ++_i2359) { var elem2360 = null; elem2360 = input.readString(); this.contacts.push(elem2360); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_validateContactsOnBot_args.prototype.write = function(output) { output.writeStructBegin('TalkService_validateContactsOnBot_args'); if (this.contacts !== null && this.contacts !== undefined) { output.writeFieldBegin('contacts', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.contacts.length); for (var iter2361 in this.contacts) { if (this.contacts.hasOwnProperty(iter2361)) { iter2361 = this.contacts[iter2361]; output.writeString(iter2361); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_validateContactsOnBot_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [null]); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_validateContactsOnBot_result.prototype = {}; TalkService_validateContactsOnBot_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { var _size2362 = 0; var _rtmp32366; this.success = {}; var _ktype2363 = 0; var _vtype2364 = 0; _rtmp32366 = input.readMapBegin(); _ktype2363 = _rtmp32366.ktype; _vtype2364 = _rtmp32366.vtype; _size2362 = _rtmp32366.size; for (var _i2367 = 0; _i2367 < _size2362; ++_i2367) { var key2368 = null; var val2369 = null; key2368 = input.readString(); val2369 = input.readString(); this.success[key2368] = val2369; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_validateContactsOnBot_result.prototype.write = function(output) { output.writeStructBegin('TalkService_validateContactsOnBot_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.success)); for (var kiter2370 in this.success) { if (this.success.hasOwnProperty(kiter2370)) { var viter2371 = this.success[kiter2370]; output.writeString(kiter2370); output.writeString(viter2371); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_tryFriendRequest_args = function(args) { this.midOrEMid = null; this.method = null; this.friendRequestParams = null; if (args) { if (args.midOrEMid !== undefined && args.midOrEMid !== null) { this.midOrEMid = args.midOrEMid; } if (args.method !== undefined && args.method !== null) { this.method = args.method; } if (args.friendRequestParams !== undefined && args.friendRequestParams !== null) { this.friendRequestParams = args.friendRequestParams; } } }; TalkService_tryFriendRequest_args.prototype = {}; TalkService_tryFriendRequest_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.midOrEMid = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { this.method = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.friendRequestParams = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_tryFriendRequest_args.prototype.write = function(output) { output.writeStructBegin('TalkService_tryFriendRequest_args'); if (this.midOrEMid !== null && this.midOrEMid !== undefined) { output.writeFieldBegin('midOrEMid', Thrift.Type.STRING, 1); output.writeString(this.midOrEMid); output.writeFieldEnd(); } if (this.method !== null && this.method !== undefined) { output.writeFieldBegin('method', Thrift.Type.I32, 2); output.writeI32(this.method); output.writeFieldEnd(); } if (this.friendRequestParams !== null && this.friendRequestParams !== undefined) { output.writeFieldBegin('friendRequestParams', Thrift.Type.STRING, 3); output.writeString(this.friendRequestParams); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_tryFriendRequest_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_tryFriendRequest_result.prototype = {}; TalkService_tryFriendRequest_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_tryFriendRequest_result.prototype.write = function(output) { output.writeStructBegin('TalkService_tryFriendRequest_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_unblockContact_args = function(args) { this.reqSeq = null; this.id = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.id !== undefined && args.id !== null) { this.id = args.id; } } }; TalkService_unblockContact_args.prototype = {}; TalkService_unblockContact_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.id = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_unblockContact_args.prototype.write = function(output) { output.writeStructBegin('TalkService_unblockContact_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.id !== null && this.id !== undefined) { output.writeFieldBegin('id', Thrift.Type.STRING, 2); output.writeString(this.id); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_unblockContact_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_unblockContact_result.prototype = {}; TalkService_unblockContact_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_unblockContact_result.prototype.write = function(output) { output.writeStructBegin('TalkService_unblockContact_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_unblockRecommendation_args = function(args) { this.reqSeq = null; this.id = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.id !== undefined && args.id !== null) { this.id = args.id; } } }; TalkService_unblockRecommendation_args.prototype = {}; TalkService_unblockRecommendation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.id = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_unblockRecommendation_args.prototype.write = function(output) { output.writeStructBegin('TalkService_unblockRecommendation_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.id !== null && this.id !== undefined) { output.writeFieldBegin('id', Thrift.Type.STRING, 2); output.writeString(this.id); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_unblockRecommendation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_unblockRecommendation_result.prototype = {}; TalkService_unblockRecommendation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_unblockRecommendation_result.prototype.write = function(output) { output.writeStructBegin('TalkService_unblockRecommendation_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_unregisterUserAndDevice_args = function(args) { }; TalkService_unregisterUserAndDevice_args.prototype = {}; TalkService_unregisterUserAndDevice_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_unregisterUserAndDevice_args.prototype.write = function(output) { output.writeStructBegin('TalkService_unregisterUserAndDevice_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_unregisterUserAndDevice_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_unregisterUserAndDevice_result.prototype = {}; TalkService_unregisterUserAndDevice_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_unregisterUserAndDevice_result.prototype.write = function(output) { output.writeStructBegin('TalkService_unregisterUserAndDevice_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateApnsDeviceToken_args = function(args) { this.apnsDeviceToken = null; if (args) { if (args.apnsDeviceToken !== undefined && args.apnsDeviceToken !== null) { this.apnsDeviceToken = args.apnsDeviceToken; } } }; TalkService_updateApnsDeviceToken_args.prototype = {}; TalkService_updateApnsDeviceToken_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.apnsDeviceToken = input.readBinary(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateApnsDeviceToken_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateApnsDeviceToken_args'); if (this.apnsDeviceToken !== null && this.apnsDeviceToken !== undefined) { output.writeFieldBegin('apnsDeviceToken', Thrift.Type.STRING, 2); output.writeBinary(this.apnsDeviceToken); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateApnsDeviceToken_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateApnsDeviceToken_result.prototype = {}; TalkService_updateApnsDeviceToken_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateApnsDeviceToken_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateApnsDeviceToken_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateBuddySetting_args = function(args) { this.key = null; this.value = null; if (args) { if (args.key !== undefined && args.key !== null) { this.key = args.key; } if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TalkService_updateBuddySetting_args.prototype = {}; TalkService_updateBuddySetting_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.key = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.value = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateBuddySetting_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateBuddySetting_args'); if (this.key !== null && this.key !== undefined) { output.writeFieldBegin('key', Thrift.Type.STRING, 2); output.writeString(this.key); output.writeFieldEnd(); } if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.STRING, 3); output.writeString(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateBuddySetting_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateBuddySetting_result.prototype = {}; TalkService_updateBuddySetting_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateBuddySetting_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateBuddySetting_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateC2DMRegistrationId_args = function(args) { this.registrationId = null; if (args) { if (args.registrationId !== undefined && args.registrationId !== null) { this.registrationId = args.registrationId; } } }; TalkService_updateC2DMRegistrationId_args.prototype = {}; TalkService_updateC2DMRegistrationId_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.registrationId = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateC2DMRegistrationId_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateC2DMRegistrationId_args'); if (this.registrationId !== null && this.registrationId !== undefined) { output.writeFieldBegin('registrationId', Thrift.Type.STRING, 2); output.writeString(this.registrationId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateC2DMRegistrationId_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateC2DMRegistrationId_result.prototype = {}; TalkService_updateC2DMRegistrationId_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateC2DMRegistrationId_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateC2DMRegistrationId_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateContactSetting_args = function(args) { this.reqSeq = null; this.mid = null; this.flag = null; this.value = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } if (args.flag !== undefined && args.flag !== null) { this.flag = args.flag; } if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TalkService_updateContactSetting_args.prototype = {}; TalkService_updateContactSetting_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.mid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.flag = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.value = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateContactSetting_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateContactSetting_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.mid !== null && this.mid !== undefined) { output.writeFieldBegin('mid', Thrift.Type.STRING, 2); output.writeString(this.mid); output.writeFieldEnd(); } if (this.flag !== null && this.flag !== undefined) { output.writeFieldBegin('flag', Thrift.Type.I32, 3); output.writeI32(this.flag); output.writeFieldEnd(); } if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.STRING, 4); output.writeString(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateContactSetting_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateContactSetting_result.prototype = {}; TalkService_updateContactSetting_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateContactSetting_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateContactSetting_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateCustomModeSettings_args = function(args) { this.customMode = null; this.paramMap = null; if (args) { if (args.customMode !== undefined && args.customMode !== null) { this.customMode = args.customMode; } if (args.paramMap !== undefined && args.paramMap !== null) { this.paramMap = Thrift.copyMap(args.paramMap, [null]); } } }; TalkService_updateCustomModeSettings_args.prototype = {}; TalkService_updateCustomModeSettings_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.I32) { this.customMode = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.MAP) { var _size2372 = 0; var _rtmp32376; this.paramMap = {}; var _ktype2373 = 0; var _vtype2374 = 0; _rtmp32376 = input.readMapBegin(); _ktype2373 = _rtmp32376.ktype; _vtype2374 = _rtmp32376.vtype; _size2372 = _rtmp32376.size; for (var _i2377 = 0; _i2377 < _size2372; ++_i2377) { var key2378 = null; var val2379 = null; key2378 = input.readString(); val2379 = input.readString(); this.paramMap[key2378] = val2379; } input.readMapEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateCustomModeSettings_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateCustomModeSettings_args'); if (this.customMode !== null && this.customMode !== undefined) { output.writeFieldBegin('customMode', Thrift.Type.I32, 2); output.writeI32(this.customMode); output.writeFieldEnd(); } if (this.paramMap !== null && this.paramMap !== undefined) { output.writeFieldBegin('paramMap', Thrift.Type.MAP, 3); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.paramMap)); for (var kiter2380 in this.paramMap) { if (this.paramMap.hasOwnProperty(kiter2380)) { var viter2381 = this.paramMap[kiter2380]; output.writeString(kiter2380); output.writeString(viter2381); } } output.writeMapEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateCustomModeSettings_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateCustomModeSettings_result.prototype = {}; TalkService_updateCustomModeSettings_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateCustomModeSettings_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateCustomModeSettings_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateDeviceInfo_args = function(args) { this.deviceUid = null; this.deviceInfo = null; if (args) { if (args.deviceUid !== undefined && args.deviceUid !== null) { this.deviceUid = args.deviceUid; } if (args.deviceInfo !== undefined && args.deviceInfo !== null) { this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; TalkService_updateDeviceInfo_args.prototype = {}; TalkService_updateDeviceInfo_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.deviceUid = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.deviceInfo = new ttypes.DeviceInfo(); this.deviceInfo.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateDeviceInfo_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateDeviceInfo_args'); if (this.deviceUid !== null && this.deviceUid !== undefined) { output.writeFieldBegin('deviceUid', Thrift.Type.STRING, 2); output.writeString(this.deviceUid); output.writeFieldEnd(); } if (this.deviceInfo !== null && this.deviceInfo !== undefined) { output.writeFieldBegin('deviceInfo', Thrift.Type.STRUCT, 3); this.deviceInfo.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateDeviceInfo_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateDeviceInfo_result.prototype = {}; TalkService_updateDeviceInfo_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateDeviceInfo_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateDeviceInfo_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateGroup_args = function(args) { this.reqSeq = null; this.group = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.group !== undefined && args.group !== null) { this.group = new ttypes.Group(args.group); } } }; TalkService_updateGroup_args.prototype = {}; TalkService_updateGroup_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.group = new ttypes.Group(); this.group.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateGroup_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateGroup_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.group !== null && this.group !== undefined) { output.writeFieldBegin('group', Thrift.Type.STRUCT, 2); this.group.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateGroup_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateGroup_result.prototype = {}; TalkService_updateGroup_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateGroup_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateGroup_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateNotificationToken_args = function(args) { this.type = null; this.token = null; if (args) { if (args.type !== undefined && args.type !== null) { this.type = args.type; } if (args.token !== undefined && args.token !== null) { this.token = args.token; } } }; TalkService_updateNotificationToken_args.prototype = {}; TalkService_updateNotificationToken_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 3: if (ftype == Thrift.Type.I32) { this.type = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.token = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateNotificationToken_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateNotificationToken_args'); if (this.type !== null && this.type !== undefined) { output.writeFieldBegin('type', Thrift.Type.I32, 3); output.writeI32(this.type); output.writeFieldEnd(); } if (this.token !== null && this.token !== undefined) { output.writeFieldBegin('token', Thrift.Type.STRING, 2); output.writeString(this.token); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateNotificationToken_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateNotificationToken_result.prototype = {}; TalkService_updateNotificationToken_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateNotificationToken_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateNotificationToken_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateNotificationTokenWithBytes_args = function(args) { this.type = null; this.token = null; if (args) { if (args.type !== undefined && args.type !== null) { this.type = args.type; } if (args.token !== undefined && args.token !== null) { this.token = args.token; } } }; TalkService_updateNotificationTokenWithBytes_args.prototype = {}; TalkService_updateNotificationTokenWithBytes_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 3: if (ftype == Thrift.Type.I32) { this.type = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.token = input.readBinary(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateNotificationTokenWithBytes_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateNotificationTokenWithBytes_args'); if (this.type !== null && this.type !== undefined) { output.writeFieldBegin('type', Thrift.Type.I32, 3); output.writeI32(this.type); output.writeFieldEnd(); } if (this.token !== null && this.token !== undefined) { output.writeFieldBegin('token', Thrift.Type.STRING, 2); output.writeBinary(this.token); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateNotificationTokenWithBytes_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateNotificationTokenWithBytes_result.prototype = {}; TalkService_updateNotificationTokenWithBytes_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateNotificationTokenWithBytes_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateNotificationTokenWithBytes_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateProfile_args = function(args) { this.reqSeq = null; this.profile = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.profile !== undefined && args.profile !== null) { this.profile = new ttypes.Profile(args.profile); } } }; TalkService_updateProfile_args.prototype = {}; TalkService_updateProfile_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.profile = new ttypes.Profile(); this.profile.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateProfile_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateProfile_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.profile !== null && this.profile !== undefined) { output.writeFieldBegin('profile', Thrift.Type.STRUCT, 2); this.profile.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateProfile_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateProfile_result.prototype = {}; TalkService_updateProfile_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateProfile_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateProfile_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateProfileAttribute_args = function(args) { this.reqSeq = null; this.attr = null; this.value = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.attr !== undefined && args.attr !== null) { this.attr = args.attr; } if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TalkService_updateProfileAttribute_args.prototype = {}; TalkService_updateProfileAttribute_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { this.attr = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.value = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateProfileAttribute_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateProfileAttribute_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.attr !== null && this.attr !== undefined) { output.writeFieldBegin('attr', Thrift.Type.I32, 2); output.writeI32(this.attr); output.writeFieldEnd(); } if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.STRING, 3); output.writeString(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateProfileAttribute_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateProfileAttribute_result.prototype = {}; TalkService_updateProfileAttribute_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateProfileAttribute_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateProfileAttribute_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateRegion_args = function(args) { this.region = null; if (args) { if (args.region !== undefined && args.region !== null) { this.region = args.region; } } }; TalkService_updateRegion_args.prototype = {}; TalkService_updateRegion_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.region = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateRegion_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateRegion_args'); if (this.region !== null && this.region !== undefined) { output.writeFieldBegin('region', Thrift.Type.STRING, 2); output.writeString(this.region); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateRegion_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateRegion_result.prototype = {}; TalkService_updateRegion_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateRegion_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateRegion_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateSettings_args = function(args) { this.reqSeq = null; this.settings = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.settings !== undefined && args.settings !== null) { this.settings = new ttypes.Settings(args.settings); } } }; TalkService_updateSettings_args.prototype = {}; TalkService_updateSettings_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.settings = new ttypes.Settings(); this.settings.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateSettings_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateSettings_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.settings !== null && this.settings !== undefined) { output.writeFieldBegin('settings', Thrift.Type.STRUCT, 2); this.settings.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateSettings_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateSettings_result.prototype = {}; TalkService_updateSettings_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateSettings_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateSettings_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateSettings2_args = function(args) { this.reqSeq = null; this.settings = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.settings !== undefined && args.settings !== null) { this.settings = new ttypes.Settings(args.settings); } } }; TalkService_updateSettings2_args.prototype = {}; TalkService_updateSettings2_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.settings = new ttypes.Settings(); this.settings.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateSettings2_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateSettings2_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.settings !== null && this.settings !== undefined) { output.writeFieldBegin('settings', Thrift.Type.STRUCT, 2); this.settings.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateSettings2_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateSettings2_result.prototype = {}; TalkService_updateSettings2_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.I32) { this.success = input.readI32(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateSettings2_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateSettings2_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.I32, 0); output.writeI32(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateSettingsAttribute_args = function(args) { this.reqSeq = null; this.attr = null; this.value = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.attr !== undefined && args.attr !== null) { this.attr = args.attr; } if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TalkService_updateSettingsAttribute_args.prototype = {}; TalkService_updateSettingsAttribute_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { this.attr = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.value = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateSettingsAttribute_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateSettingsAttribute_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.attr !== null && this.attr !== undefined) { output.writeFieldBegin('attr', Thrift.Type.I32, 2); output.writeI32(this.attr); output.writeFieldEnd(); } if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.STRING, 3); output.writeString(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateSettingsAttribute_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateSettingsAttribute_result.prototype = {}; TalkService_updateSettingsAttribute_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateSettingsAttribute_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateSettingsAttribute_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateSettingsAttributes_args = function(args) { this.reqSeq = null; this.attrBitset = null; this.settings = null; if (args) { if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } if (args.attrBitset !== undefined && args.attrBitset !== null) { this.attrBitset = args.attrBitset; } if (args.settings !== undefined && args.settings !== null) { this.settings = new ttypes.Settings(args.settings); } } }; TalkService_updateSettingsAttributes_args.prototype = {}; TalkService_updateSettingsAttributes_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.reqSeq = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { this.attrBitset = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.settings = new ttypes.Settings(); this.settings.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateSettingsAttributes_args.prototype.write = function(output) { output.writeStructBegin('TalkService_updateSettingsAttributes_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } if (this.attrBitset !== null && this.attrBitset !== undefined) { output.writeFieldBegin('attrBitset', Thrift.Type.I32, 2); output.writeI32(this.attrBitset); output.writeFieldEnd(); } if (this.settings !== null && this.settings !== undefined) { output.writeFieldBegin('settings', Thrift.Type.STRUCT, 3); this.settings.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_updateSettingsAttributes_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_updateSettingsAttributes_result.prototype = {}; TalkService_updateSettingsAttributes_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.I32) { this.success = input.readI32(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_updateSettingsAttributes_result.prototype.write = function(output) { output.writeStructBegin('TalkService_updateSettingsAttributes_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.I32, 0); output.writeI32(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyIdentityCredential_args = function(args) { this.identityProvider = null; this.identifier = null; this.password = null; if (args) { if (args.identityProvider !== undefined && args.identityProvider !== null) { this.identityProvider = args.identityProvider; } if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } if (args.password !== undefined && args.password !== null) { this.password = args.password; } } }; TalkService_verifyIdentityCredential_args.prototype = {}; TalkService_verifyIdentityCredential_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 8: if (ftype == Thrift.Type.I32) { this.identityProvider = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.identifier = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.password = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyIdentityCredential_args.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyIdentityCredential_args'); if (this.identityProvider !== null && this.identityProvider !== undefined) { output.writeFieldBegin('identityProvider', Thrift.Type.I32, 8); output.writeI32(this.identityProvider); output.writeFieldEnd(); } if (this.identifier !== null && this.identifier !== undefined) { output.writeFieldBegin('identifier', Thrift.Type.STRING, 3); output.writeString(this.identifier); output.writeFieldEnd(); } if (this.password !== null && this.password !== undefined) { output.writeFieldBegin('password', Thrift.Type.STRING, 4); output.writeString(this.password); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyIdentityCredential_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_verifyIdentityCredential_result.prototype = {}; TalkService_verifyIdentityCredential_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyIdentityCredential_result.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyIdentityCredential_result'); if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyIdentityCredentialWithResult_args = function(args) { this.identityCredential = null; if (args) { if (args.identityCredential !== undefined && args.identityCredential !== null) { this.identityCredential = new ttypes.IdentityCredential(args.identityCredential); } } }; TalkService_verifyIdentityCredentialWithResult_args.prototype = {}; TalkService_verifyIdentityCredentialWithResult_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRUCT) { this.identityCredential = new ttypes.IdentityCredential(); this.identityCredential.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyIdentityCredentialWithResult_args.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyIdentityCredentialWithResult_args'); if (this.identityCredential !== null && this.identityCredential !== undefined) { output.writeFieldBegin('identityCredential', Thrift.Type.STRUCT, 2); this.identityCredential.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyIdentityCredentialWithResult_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.UserAuthStatus(args.success); } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_verifyIdentityCredentialWithResult_result.prototype = {}; TalkService_verifyIdentityCredentialWithResult_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.UserAuthStatus(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyIdentityCredentialWithResult_result.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyIdentityCredentialWithResult_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyPhone_args = function(args) { this.sessionId = null; this.pinCode = null; this.udidHash = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } if (args.pinCode !== undefined && args.pinCode !== null) { this.pinCode = args.pinCode; } if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } } }; TalkService_verifyPhone_args.prototype = {}; TalkService_verifyPhone_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.sessionId = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.pinCode = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.udidHash = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyPhone_args.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyPhone_args'); if (this.sessionId !== null && this.sessionId !== undefined) { output.writeFieldBegin('sessionId', Thrift.Type.STRING, 2); output.writeString(this.sessionId); output.writeFieldEnd(); } if (this.pinCode !== null && this.pinCode !== undefined) { output.writeFieldBegin('pinCode', Thrift.Type.STRING, 3); output.writeString(this.pinCode); output.writeFieldEnd(); } if (this.udidHash !== null && this.udidHash !== undefined) { output.writeFieldBegin('udidHash', Thrift.Type.STRING, 4); output.writeString(this.udidHash); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyPhone_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_verifyPhone_result.prototype = {}; TalkService_verifyPhone_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.I32) { this.success = input.readI32(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyPhone_result.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyPhone_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.I32, 0); output.writeI32(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyQrcode_args = function(args) { this.verifier = null; this.pinCode = null; if (args) { if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } if (args.pinCode !== undefined && args.pinCode !== null) { this.pinCode = args.pinCode; } } }; TalkService_verifyQrcode_args.prototype = {}; TalkService_verifyQrcode_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 2: if (ftype == Thrift.Type.STRING) { this.verifier = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.pinCode = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyQrcode_args.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyQrcode_args'); if (this.verifier !== null && this.verifier !== undefined) { output.writeFieldBegin('verifier', Thrift.Type.STRING, 2); output.writeString(this.verifier); output.writeFieldEnd(); } if (this.pinCode !== null && this.pinCode !== undefined) { output.writeFieldBegin('pinCode', Thrift.Type.STRING, 3); output.writeString(this.pinCode); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkService_verifyQrcode_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; TalkService_verifyQrcode_result.prototype = {}; TalkService_verifyQrcode_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); this.e.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_verifyQrcode_result.prototype.write = function(output) { output.writeStructBegin('TalkService_verifyQrcode_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TalkServiceClient = exports.Client = function(output, pClass) { this.output = output; this.pClass = pClass; this._seqid = 0; this._reqs = {}; }; TalkServiceClient.prototype = {}; TalkServiceClient.prototype.seqid = function() { return this._seqid; }; TalkServiceClient.prototype.new_seqid = function() { return this._seqid += 1; }; TalkServiceClient.prototype.getChatRoomAnnouncementsBulk = function(chatRoomMids, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getChatRoomAnnouncementsBulk(chatRoomMids); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getChatRoomAnnouncementsBulk(chatRoomMids); } }; TalkServiceClient.prototype.send_getChatRoomAnnouncementsBulk = function(chatRoomMids) { var output = new this.pClass(this.output); output.writeMessageBegin('getChatRoomAnnouncementsBulk', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getChatRoomAnnouncementsBulk_args(); args.chatRoomMids = chatRoomMids; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getChatRoomAnnouncementsBulk = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getChatRoomAnnouncementsBulk_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getChatRoomAnnouncementsBulk failed: unknown result'); }; TalkServiceClient.prototype.getChatRoomAnnouncements = function(chatRoomMid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getChatRoomAnnouncements(chatRoomMid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getChatRoomAnnouncements(chatRoomMid); } }; TalkServiceClient.prototype.send_getChatRoomAnnouncements = function(chatRoomMid) { var output = new this.pClass(this.output); output.writeMessageBegin('getChatRoomAnnouncements', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getChatRoomAnnouncements_args(); args.chatRoomMid = chatRoomMid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getChatRoomAnnouncements = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getChatRoomAnnouncements_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getChatRoomAnnouncements failed: unknown result'); }; TalkServiceClient.prototype.createChatRoomAnnouncement = function(reqSeq, chatRoomMid, type, contents, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_createChatRoomAnnouncement(reqSeq, chatRoomMid, type, contents); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_createChatRoomAnnouncement(reqSeq, chatRoomMid, type, contents); } }; TalkServiceClient.prototype.send_createChatRoomAnnouncement = function(reqSeq, chatRoomMid, type, contents) { var output = new this.pClass(this.output); output.writeMessageBegin('createChatRoomAnnouncement', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_createChatRoomAnnouncement_args(); args.reqSeq = reqSeq; args.chatRoomMid = chatRoomMid; args.type = type; args.contents = contents; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_createChatRoomAnnouncement = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_createChatRoomAnnouncement_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('createChatRoomAnnouncement failed: unknown result'); }; TalkServiceClient.prototype.removeChatRoomAnnouncement = function(reqSeq, chatRoomMid, announcementSeq, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_removeChatRoomAnnouncement(reqSeq, chatRoomMid, announcementSeq); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_removeChatRoomAnnouncement(reqSeq, chatRoomMid, announcementSeq); } }; TalkServiceClient.prototype.send_removeChatRoomAnnouncement = function(reqSeq, chatRoomMid, announcementSeq) { var output = new this.pClass(this.output); output.writeMessageBegin('removeChatRoomAnnouncement', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_removeChatRoomAnnouncement_args(); args.reqSeq = reqSeq; args.chatRoomMid = chatRoomMid; args.announcementSeq = announcementSeq; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_removeChatRoomAnnouncement = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_removeChatRoomAnnouncement_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.unsendMessage = function(seq, messageId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_unsendMessage(seq, messageId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_unsendMessage(seq, messageId); } }; TalkServiceClient.prototype.send_unsendMessage = function(seq, messageId) { var output = new this.pClass(this.output); output.writeMessageBegin('unsendMessage', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_unsendMessage_args(); args.seq = seq; args.messageId = messageId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_unsendMessage = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_unsendMessage_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.getGroupWithoutMembers = function(groupId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getGroupWithoutMembers(groupId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getGroupWithoutMembers(groupId); } }; TalkServiceClient.prototype.send_getGroupWithoutMembers = function(groupId) { var output = new this.pClass(this.output); output.writeMessageBegin('getGroupWithoutMembers', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getGroupWithoutMembers_args(); args.groupId = groupId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getGroupWithoutMembers = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getGroupWithoutMembers_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getGroupWithoutMembers failed: unknown result'); }; TalkServiceClient.prototype.requestResendMessage = function(reqSeq, senderMid, messageId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_requestResendMessage(reqSeq, senderMid, messageId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_requestResendMessage(reqSeq, senderMid, messageId); } }; TalkServiceClient.prototype.send_requestResendMessage = function(reqSeq, senderMid, messageId) { var output = new this.pClass(this.output); output.writeMessageBegin('requestResendMessage', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_requestResendMessage_args(); args.reqSeq = reqSeq; args.senderMid = senderMid; args.messageId = messageId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_requestResendMessage = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_requestResendMessage_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.respondResendMessage = function(reqSeq, receiverMid, originalMessageId, resendMessage, errorCode, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_respondResendMessage(reqSeq, receiverMid, originalMessageId, resendMessage, errorCode); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_respondResendMessage(reqSeq, receiverMid, originalMessageId, resendMessage, errorCode); } }; TalkServiceClient.prototype.send_respondResendMessage = function(reqSeq, receiverMid, originalMessageId, resendMessage, errorCode) { var output = new this.pClass(this.output); output.writeMessageBegin('respondResendMessage', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_respondResendMessage_args(); args.reqSeq = reqSeq; args.receiverMid = receiverMid; args.originalMessageId = originalMessageId; args.resendMessage = resendMessage; args.errorCode = errorCode; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_respondResendMessage = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_respondResendMessage_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.acceptGroupInvitation = function(reqSeq, groupId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_acceptGroupInvitation(reqSeq, groupId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_acceptGroupInvitation(reqSeq, groupId); } }; TalkServiceClient.prototype.send_acceptGroupInvitation = function(reqSeq, groupId) { var output = new this.pClass(this.output); output.writeMessageBegin('acceptGroupInvitation', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_acceptGroupInvitation_args(); args.reqSeq = reqSeq; args.groupId = groupId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_acceptGroupInvitation = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_acceptGroupInvitation_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.acceptGroupInvitationByTicket = function(reqSeq, GroupMid, ticketId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_acceptGroupInvitationByTicket(reqSeq, GroupMid, ticketId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_acceptGroupInvitationByTicket(reqSeq, GroupMid, ticketId); } }; TalkServiceClient.prototype.send_acceptGroupInvitationByTicket = function(reqSeq, GroupMid, ticketId) { var output = new this.pClass(this.output); output.writeMessageBegin('acceptGroupInvitationByTicket', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_acceptGroupInvitationByTicket_args(); args.reqSeq = reqSeq; args.GroupMid = GroupMid; args.ticketId = ticketId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_acceptGroupInvitationByTicket = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_acceptGroupInvitationByTicket_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.acceptProximityMatches = function(sessionId, ids, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_acceptProximityMatches(sessionId, ids); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_acceptProximityMatches(sessionId, ids); } }; TalkServiceClient.prototype.send_acceptProximityMatches = function(sessionId, ids) { var output = new this.pClass(this.output); output.writeMessageBegin('acceptProximityMatches', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_acceptProximityMatches_args(); args.sessionId = sessionId; args.ids = ids; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_acceptProximityMatches = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_acceptProximityMatches_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.acquireCallRoute = function(to, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_acquireCallRoute(to); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_acquireCallRoute(to); } }; TalkServiceClient.prototype.send_acquireCallRoute = function(to) { var output = new this.pClass(this.output); output.writeMessageBegin('acquireCallRoute', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_acquireCallRoute_args(); args.to = to; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_acquireCallRoute = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_acquireCallRoute_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('acquireCallRoute failed: unknown result'); }; TalkServiceClient.prototype.acquireCallTicket = function(to, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_acquireCallTicket(to); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_acquireCallTicket(to); } }; TalkServiceClient.prototype.send_acquireCallTicket = function(to) { var output = new this.pClass(this.output); output.writeMessageBegin('acquireCallTicket', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_acquireCallTicket_args(); args.to = to; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_acquireCallTicket = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_acquireCallTicket_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('acquireCallTicket failed: unknown result'); }; TalkServiceClient.prototype.acquireEncryptedAccessToken = function(featureType, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_acquireEncryptedAccessToken(featureType); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_acquireEncryptedAccessToken(featureType); } }; TalkServiceClient.prototype.send_acquireEncryptedAccessToken = function(featureType) { var output = new this.pClass(this.output); output.writeMessageBegin('acquireEncryptedAccessToken', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_acquireEncryptedAccessToken_args(); args.featureType = featureType; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_acquireEncryptedAccessToken = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_acquireEncryptedAccessToken_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('acquireEncryptedAccessToken failed: unknown result'); }; TalkServiceClient.prototype.addSnsId = function(snsIdType, snsAccessToken, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_addSnsId(snsIdType, snsAccessToken); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_addSnsId(snsIdType, snsAccessToken); } }; TalkServiceClient.prototype.send_addSnsId = function(snsIdType, snsAccessToken) { var output = new this.pClass(this.output); output.writeMessageBegin('addSnsId', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_addSnsId_args(); args.snsIdType = snsIdType; args.snsAccessToken = snsAccessToken; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_addSnsId = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_addSnsId_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('addSnsId failed: unknown result'); }; TalkServiceClient.prototype.blockContact = function(reqSeq, id, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_blockContact(reqSeq, id); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_blockContact(reqSeq, id); } }; TalkServiceClient.prototype.send_blockContact = function(reqSeq, id) { var output = new this.pClass(this.output); output.writeMessageBegin('blockContact', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_blockContact_args(); args.reqSeq = reqSeq; args.id = id; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_blockContact = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_blockContact_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.blockRecommendation = function(reqSeq, id, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_blockRecommendation(reqSeq, id); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_blockRecommendation(reqSeq, id); } }; TalkServiceClient.prototype.send_blockRecommendation = function(reqSeq, id) { var output = new this.pClass(this.output); output.writeMessageBegin('blockRecommendation', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_blockRecommendation_args(); args.reqSeq = reqSeq; args.id = id; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_blockRecommendation = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_blockRecommendation_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.cancelGroupInvitation = function(reqSeq, groupId, contactIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_cancelGroupInvitation(reqSeq, groupId, contactIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_cancelGroupInvitation(reqSeq, groupId, contactIds); } }; TalkServiceClient.prototype.send_cancelGroupInvitation = function(reqSeq, groupId, contactIds) { var output = new this.pClass(this.output); output.writeMessageBegin('cancelGroupInvitation', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_cancelGroupInvitation_args(); args.reqSeq = reqSeq; args.groupId = groupId; args.contactIds = contactIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_cancelGroupInvitation = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_cancelGroupInvitation_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.changeVerificationMethod = function(sessionId, method, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_changeVerificationMethod(sessionId, method); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_changeVerificationMethod(sessionId, method); } }; TalkServiceClient.prototype.send_changeVerificationMethod = function(sessionId, method) { var output = new this.pClass(this.output); output.writeMessageBegin('changeVerificationMethod', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_changeVerificationMethod_args(); args.sessionId = sessionId; args.method = method; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_changeVerificationMethod = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_changeVerificationMethod_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('changeVerificationMethod failed: unknown result'); }; TalkServiceClient.prototype.clearIdentityCredential = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_clearIdentityCredential(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_clearIdentityCredential(); } }; TalkServiceClient.prototype.send_clearIdentityCredential = function() { var output = new this.pClass(this.output); output.writeMessageBegin('clearIdentityCredential', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_clearIdentityCredential_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_clearIdentityCredential = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_clearIdentityCredential_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.clearMessageBox = function(channelId, messageBoxId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_clearMessageBox(channelId, messageBoxId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_clearMessageBox(channelId, messageBoxId); } }; TalkServiceClient.prototype.send_clearMessageBox = function(channelId, messageBoxId) { var output = new this.pClass(this.output); output.writeMessageBegin('clearMessageBox', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_clearMessageBox_args(); args.channelId = channelId; args.messageBoxId = messageBoxId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_clearMessageBox = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_clearMessageBox_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.closeProximityMatch = function(sessionId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_closeProximityMatch(sessionId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_closeProximityMatch(sessionId); } }; TalkServiceClient.prototype.send_closeProximityMatch = function(sessionId) { var output = new this.pClass(this.output); output.writeMessageBegin('closeProximityMatch', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_closeProximityMatch_args(); args.sessionId = sessionId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_closeProximityMatch = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_closeProximityMatch_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.commitSendMessage = function(seq, messageId, receiverMids, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_commitSendMessage(seq, messageId, receiverMids); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_commitSendMessage(seq, messageId, receiverMids); } }; TalkServiceClient.prototype.send_commitSendMessage = function(seq, messageId, receiverMids) { var output = new this.pClass(this.output); output.writeMessageBegin('commitSendMessage', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_commitSendMessage_args(); args.seq = seq; args.messageId = messageId; args.receiverMids = receiverMids; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_commitSendMessage = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_commitSendMessage_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('commitSendMessage failed: unknown result'); }; TalkServiceClient.prototype.commitSendMessages = function(seq, messageIds, receiverMids, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_commitSendMessages(seq, messageIds, receiverMids); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_commitSendMessages(seq, messageIds, receiverMids); } }; TalkServiceClient.prototype.send_commitSendMessages = function(seq, messageIds, receiverMids) { var output = new this.pClass(this.output); output.writeMessageBegin('commitSendMessages', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_commitSendMessages_args(); args.seq = seq; args.messageIds = messageIds; args.receiverMids = receiverMids; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_commitSendMessages = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_commitSendMessages_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('commitSendMessages failed: unknown result'); }; TalkServiceClient.prototype.commitUpdateProfile = function(seq, attrs, receiverMids, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_commitUpdateProfile(seq, attrs, receiverMids); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_commitUpdateProfile(seq, attrs, receiverMids); } }; TalkServiceClient.prototype.send_commitUpdateProfile = function(seq, attrs, receiverMids) { var output = new this.pClass(this.output); output.writeMessageBegin('commitUpdateProfile', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_commitUpdateProfile_args(); args.seq = seq; args.attrs = attrs; args.receiverMids = receiverMids; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_commitUpdateProfile = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_commitUpdateProfile_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('commitUpdateProfile failed: unknown result'); }; TalkServiceClient.prototype.confirmEmail = function(verifier, pinCode, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_confirmEmail(verifier, pinCode); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_confirmEmail(verifier, pinCode); } }; TalkServiceClient.prototype.send_confirmEmail = function(verifier, pinCode) { var output = new this.pClass(this.output); output.writeMessageBegin('confirmEmail', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_confirmEmail_args(); args.verifier = verifier; args.pinCode = pinCode; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_confirmEmail = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_confirmEmail_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.createGroup = function(seq, name, contactIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_createGroup(seq, name, contactIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_createGroup(seq, name, contactIds); } }; TalkServiceClient.prototype.send_createGroup = function(seq, name, contactIds) { var output = new this.pClass(this.output); output.writeMessageBegin('createGroup', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_createGroup_args(); args.seq = seq; args.name = name; args.contactIds = contactIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_createGroup = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_createGroup_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('createGroup failed: unknown result'); }; TalkServiceClient.prototype.createQrcodeBase64Image = function(url, characterSet, imageSize, x, y, width, height, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_createQrcodeBase64Image(url, characterSet, imageSize, x, y, width, height); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_createQrcodeBase64Image(url, characterSet, imageSize, x, y, width, height); } }; TalkServiceClient.prototype.send_createQrcodeBase64Image = function(url, characterSet, imageSize, x, y, width, height) { var output = new this.pClass(this.output); output.writeMessageBegin('createQrcodeBase64Image', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_createQrcodeBase64Image_args(); args.url = url; args.characterSet = characterSet; args.imageSize = imageSize; args.x = x; args.y = y; args.width = width; args.height = height; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_createQrcodeBase64Image = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_createQrcodeBase64Image_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('createQrcodeBase64Image failed: unknown result'); }; TalkServiceClient.prototype.createRoom = function(reqSeq, contactIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_createRoom(reqSeq, contactIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_createRoom(reqSeq, contactIds); } }; TalkServiceClient.prototype.send_createRoom = function(reqSeq, contactIds) { var output = new this.pClass(this.output); output.writeMessageBegin('createRoom', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_createRoom_args(); args.reqSeq = reqSeq; args.contactIds = contactIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_createRoom = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_createRoom_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('createRoom failed: unknown result'); }; TalkServiceClient.prototype.createSession = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_createSession(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_createSession(); } }; TalkServiceClient.prototype.send_createSession = function() { var output = new this.pClass(this.output); output.writeMessageBegin('createSession', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_createSession_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_createSession = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_createSession_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('createSession failed: unknown result'); }; TalkServiceClient.prototype.fetchAnnouncements = function(lastFetchedIndex, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_fetchAnnouncements(lastFetchedIndex); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_fetchAnnouncements(lastFetchedIndex); } }; TalkServiceClient.prototype.send_fetchAnnouncements = function(lastFetchedIndex) { var output = new this.pClass(this.output); output.writeMessageBegin('fetchAnnouncements', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_fetchAnnouncements_args(); args.lastFetchedIndex = lastFetchedIndex; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_fetchAnnouncements = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_fetchAnnouncements_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('fetchAnnouncements failed: unknown result'); }; TalkServiceClient.prototype.fetchMessages = function(localTs, count, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_fetchMessages(localTs, count); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_fetchMessages(localTs, count); } }; TalkServiceClient.prototype.send_fetchMessages = function(localTs, count) { var output = new this.pClass(this.output); output.writeMessageBegin('fetchMessages', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_fetchMessages_args(); args.localTs = localTs; args.count = count; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_fetchMessages = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_fetchMessages_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('fetchMessages failed: unknown result'); }; TalkServiceClient.prototype.fetchOperations = function(localRev, count, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_fetchOperations(localRev, count); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_fetchOperations(localRev, count); } }; TalkServiceClient.prototype.send_fetchOperations = function(localRev, count) { var output = new this.pClass(this.output); output.writeMessageBegin('fetchOperations', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_fetchOperations_args(); args.localRev = localRev; args.count = count; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_fetchOperations = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_fetchOperations_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('fetchOperations failed: unknown result'); }; TalkServiceClient.prototype.fetchOps = function(localRev, count, globalRev, individualRev, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_fetchOps(localRev, count, globalRev, individualRev); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_fetchOps(localRev, count, globalRev, individualRev); } }; TalkServiceClient.prototype.send_fetchOps = function(localRev, count, globalRev, individualRev) { var output = new this.pClass(this.output); output.writeMessageBegin('fetchOps', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_fetchOps_args(); args.localRev = localRev; args.count = count; args.globalRev = globalRev; args.individualRev = individualRev; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_fetchOps = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_fetchOps_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('fetchOps failed: unknown result'); }; TalkServiceClient.prototype.findAndAddContactsByEmail = function(reqSeq, emails, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findAndAddContactsByEmail(reqSeq, emails); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findAndAddContactsByEmail(reqSeq, emails); } }; TalkServiceClient.prototype.send_findAndAddContactsByEmail = function(reqSeq, emails) { var output = new this.pClass(this.output); output.writeMessageBegin('findAndAddContactsByEmail', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findAndAddContactsByEmail_args(); args.reqSeq = reqSeq; args.emails = emails; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findAndAddContactsByEmail = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findAndAddContactsByEmail_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findAndAddContactsByEmail failed: unknown result'); }; TalkServiceClient.prototype.findAndAddContactsByMid = function(reqSeq, mid, type, reference, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findAndAddContactsByMid(reqSeq, mid, type, reference); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findAndAddContactsByMid(reqSeq, mid, type, reference); } }; TalkServiceClient.prototype.send_findAndAddContactsByMid = function(reqSeq, mid, type, reference) { var output = new this.pClass(this.output); output.writeMessageBegin('findAndAddContactsByMid', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findAndAddContactsByMid_args(); args.reqSeq = reqSeq; args.mid = mid; args.type = type; args.reference = reference; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findAndAddContactsByMid = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findAndAddContactsByMid_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findAndAddContactsByMid failed: unknown result'); }; TalkServiceClient.prototype.findGroupByTicketV2 = function(ticketId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findGroupByTicketV2(ticketId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findGroupByTicketV2(ticketId); } }; TalkServiceClient.prototype.send_findGroupByTicketV2 = function(ticketId) { var output = new this.pClass(this.output); output.writeMessageBegin('findGroupByTicketV2', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findGroupByTicketV2_args(); args.ticketId = ticketId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findGroupByTicketV2 = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findGroupByTicketV2_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findGroupByTicketV2 failed: unknown result'); }; TalkServiceClient.prototype.findAndAddContactsByPhone = function(reqSeq, phones, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findAndAddContactsByPhone(reqSeq, phones); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findAndAddContactsByPhone(reqSeq, phones); } }; TalkServiceClient.prototype.send_findAndAddContactsByPhone = function(reqSeq, phones) { var output = new this.pClass(this.output); output.writeMessageBegin('findAndAddContactsByPhone', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findAndAddContactsByPhone_args(); args.reqSeq = reqSeq; args.phones = phones; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findAndAddContactsByPhone = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findAndAddContactsByPhone_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findAndAddContactsByPhone failed: unknown result'); }; TalkServiceClient.prototype.getFriendRequests = function(direction, lastSeenSeqId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getFriendRequests(direction, lastSeenSeqId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getFriendRequests(direction, lastSeenSeqId); } }; TalkServiceClient.prototype.send_getFriendRequests = function(direction, lastSeenSeqId) { var output = new this.pClass(this.output); output.writeMessageBegin('getFriendRequests', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getFriendRequests_args(); args.direction = direction; args.lastSeenSeqId = lastSeenSeqId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getFriendRequests = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getFriendRequests_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getFriendRequests failed: unknown result'); }; TalkServiceClient.prototype.removeFriendRequest = function(direction, midOrEMid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_removeFriendRequest(direction, midOrEMid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_removeFriendRequest(direction, midOrEMid); } }; TalkServiceClient.prototype.send_removeFriendRequest = function(direction, midOrEMid) { var output = new this.pClass(this.output); output.writeMessageBegin('removeFriendRequest', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_removeFriendRequest_args(); args.direction = direction; args.midOrEMid = midOrEMid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_removeFriendRequest = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_removeFriendRequest_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.findAndAddContactsByUserid = function(reqSeq, userid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findAndAddContactsByUserid(reqSeq, userid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findAndAddContactsByUserid(reqSeq, userid); } }; TalkServiceClient.prototype.send_findAndAddContactsByUserid = function(reqSeq, userid) { var output = new this.pClass(this.output); output.writeMessageBegin('findAndAddContactsByUserid', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findAndAddContactsByUserid_args(); args.reqSeq = reqSeq; args.userid = userid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findAndAddContactsByUserid = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findAndAddContactsByUserid_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findAndAddContactsByUserid failed: unknown result'); }; TalkServiceClient.prototype.findContactByUserid = function(userid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findContactByUserid(userid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findContactByUserid(userid); } }; TalkServiceClient.prototype.send_findContactByUserid = function(userid) { var output = new this.pClass(this.output); output.writeMessageBegin('findContactByUserid', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findContactByUserid_args(); args.userid = userid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findContactByUserid = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findContactByUserid_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findContactByUserid failed: unknown result'); }; TalkServiceClient.prototype.findContactByUserTicket = function(ticketIdWithTag, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findContactByUserTicket(ticketIdWithTag); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findContactByUserTicket(ticketIdWithTag); } }; TalkServiceClient.prototype.send_findContactByUserTicket = function(ticketIdWithTag) { var output = new this.pClass(this.output); output.writeMessageBegin('findContactByUserTicket', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findContactByUserTicket_args(); args.ticketIdWithTag = ticketIdWithTag; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findContactByUserTicket = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findContactByUserTicket_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findContactByUserTicket failed: unknown result'); }; TalkServiceClient.prototype.findContactsByEmail = function(emails, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findContactsByEmail(emails); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findContactsByEmail(emails); } }; TalkServiceClient.prototype.send_findContactsByEmail = function(emails) { var output = new this.pClass(this.output); output.writeMessageBegin('findContactsByEmail', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findContactsByEmail_args(); args.emails = emails; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findContactsByEmail = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findContactsByEmail_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findContactsByEmail failed: unknown result'); }; TalkServiceClient.prototype.findContactsByPhone = function(phones, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findContactsByPhone(phones); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findContactsByPhone(phones); } }; TalkServiceClient.prototype.send_findContactsByPhone = function(phones) { var output = new this.pClass(this.output); output.writeMessageBegin('findContactsByPhone', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findContactsByPhone_args(); args.phones = phones; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findContactsByPhone = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findContactsByPhone_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findContactsByPhone failed: unknown result'); }; TalkServiceClient.prototype.findSnsIdUserStatus = function(snsIdType, snsAccessToken, udidHash, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findSnsIdUserStatus(snsIdType, snsAccessToken, udidHash); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findSnsIdUserStatus(snsIdType, snsAccessToken, udidHash); } }; TalkServiceClient.prototype.send_findSnsIdUserStatus = function(snsIdType, snsAccessToken, udidHash) { var output = new this.pClass(this.output); output.writeMessageBegin('findSnsIdUserStatus', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findSnsIdUserStatus_args(); args.snsIdType = snsIdType; args.snsAccessToken = snsAccessToken; args.udidHash = udidHash; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findSnsIdUserStatus = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findSnsIdUserStatus_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findSnsIdUserStatus failed: unknown result'); }; TalkServiceClient.prototype.finishUpdateVerification = function(sessionId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_finishUpdateVerification(sessionId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_finishUpdateVerification(sessionId); } }; TalkServiceClient.prototype.send_finishUpdateVerification = function(sessionId) { var output = new this.pClass(this.output); output.writeMessageBegin('finishUpdateVerification', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_finishUpdateVerification_args(); args.sessionId = sessionId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_finishUpdateVerification = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_finishUpdateVerification_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.generateUserTicket = function(expirationTime, maxUseCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_generateUserTicket(expirationTime, maxUseCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_generateUserTicket(expirationTime, maxUseCount); } }; TalkServiceClient.prototype.send_generateUserTicket = function(expirationTime, maxUseCount) { var output = new this.pClass(this.output); output.writeMessageBegin('generateUserTicket', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_generateUserTicket_args(); args.expirationTime = expirationTime; args.maxUseCount = maxUseCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_generateUserTicket = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_generateUserTicket_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('generateUserTicket failed: unknown result'); }; TalkServiceClient.prototype.destroyMessage = function(seq, chatId, messageId, sessionId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_destroyMessage(seq, chatId, messageId, sessionId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_destroyMessage(seq, chatId, messageId, sessionId); } }; TalkServiceClient.prototype.send_destroyMessage = function(seq, chatId, messageId, sessionId) { var output = new this.pClass(this.output); output.writeMessageBegin('destroyMessage', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_destroyMessage_args(); args.seq = seq; args.chatId = chatId; args.messageId = messageId; args.sessionId = sessionId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_destroyMessage = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_destroyMessage_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.getAcceptedProximityMatches = function(sessionId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getAcceptedProximityMatches(sessionId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getAcceptedProximityMatches(sessionId); } }; TalkServiceClient.prototype.send_getAcceptedProximityMatches = function(sessionId) { var output = new this.pClass(this.output); output.writeMessageBegin('getAcceptedProximityMatches', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getAcceptedProximityMatches_args(); args.sessionId = sessionId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getAcceptedProximityMatches = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getAcceptedProximityMatches_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getAcceptedProximityMatches failed: unknown result'); }; TalkServiceClient.prototype.getActiveBuddySubscriberIds = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getActiveBuddySubscriberIds(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getActiveBuddySubscriberIds(); } }; TalkServiceClient.prototype.send_getActiveBuddySubscriberIds = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getActiveBuddySubscriberIds', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getActiveBuddySubscriberIds_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getActiveBuddySubscriberIds = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getActiveBuddySubscriberIds_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getActiveBuddySubscriberIds failed: unknown result'); }; TalkServiceClient.prototype.getAllContactIds = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getAllContactIds(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getAllContactIds(); } }; TalkServiceClient.prototype.send_getAllContactIds = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getAllContactIds', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getAllContactIds_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getAllContactIds = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getAllContactIds_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getAllContactIds failed: unknown result'); }; TalkServiceClient.prototype.getAuthQrcode = function(keepLoggedIn, systemName, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getAuthQrcode(keepLoggedIn, systemName); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getAuthQrcode(keepLoggedIn, systemName); } }; TalkServiceClient.prototype.send_getAuthQrcode = function(keepLoggedIn, systemName) { var output = new this.pClass(this.output); output.writeMessageBegin('getAuthQrcode', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getAuthQrcode_args(); args.keepLoggedIn = keepLoggedIn; args.systemName = systemName; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getAuthQrcode = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getAuthQrcode_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getAuthQrcode failed: unknown result'); }; TalkServiceClient.prototype.getBlockedContactIds = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getBlockedContactIds(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getBlockedContactIds(); } }; TalkServiceClient.prototype.send_getBlockedContactIds = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getBlockedContactIds', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getBlockedContactIds_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getBlockedContactIds = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getBlockedContactIds_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getBlockedContactIds failed: unknown result'); }; TalkServiceClient.prototype.registerWithPhoneNumber = function(sessionId, migrationPincodeSessionId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerWithPhoneNumber(sessionId, migrationPincodeSessionId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerWithPhoneNumber(sessionId, migrationPincodeSessionId); } }; TalkServiceClient.prototype.send_registerWithPhoneNumber = function(sessionId, migrationPincodeSessionId) { var output = new this.pClass(this.output); output.writeMessageBegin('registerWithPhoneNumber', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerWithPhoneNumber_args(); args.sessionId = sessionId; args.migrationPincodeSessionId = migrationPincodeSessionId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerWithPhoneNumber = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerWithPhoneNumber_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerWithPhoneNumber failed: unknown result'); }; TalkServiceClient.prototype.registerWithPhoneNumberAndPassword = function(sessionId, keynm, encrypted, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerWithPhoneNumberAndPassword(sessionId, keynm, encrypted); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerWithPhoneNumberAndPassword(sessionId, keynm, encrypted); } }; TalkServiceClient.prototype.send_registerWithPhoneNumberAndPassword = function(sessionId, keynm, encrypted) { var output = new this.pClass(this.output); output.writeMessageBegin('registerWithPhoneNumberAndPassword', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerWithPhoneNumberAndPassword_args(); args.sessionId = sessionId; args.keynm = keynm; args.encrypted = encrypted; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerWithPhoneNumberAndPassword = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerWithPhoneNumberAndPassword_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerWithPhoneNumberAndPassword failed: unknown result'); }; TalkServiceClient.prototype.getAnalyticsInfo = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getAnalyticsInfo(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getAnalyticsInfo(); } }; TalkServiceClient.prototype.send_getAnalyticsInfo = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getAnalyticsInfo', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getAnalyticsInfo_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getAnalyticsInfo = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getAnalyticsInfo_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getAnalyticsInfo failed: unknown result'); }; TalkServiceClient.prototype.reportClientStatistics = function(reqSeq, category, count, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_reportClientStatistics(reqSeq, category, count); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reportClientStatistics(reqSeq, category, count); } }; TalkServiceClient.prototype.send_reportClientStatistics = function(reqSeq, category, count) { var output = new this.pClass(this.output); output.writeMessageBegin('reportClientStatistics', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reportClientStatistics_args(); args.reqSeq = reqSeq; args.category = category; args.count = count; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_reportClientStatistics = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_reportClientStatistics_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.verifyPhoneNumberForLogin = function(verifierFromPhone, pinCodeForPhone, verifierFromLogin, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_verifyPhoneNumberForLogin(verifierFromPhone, pinCodeForPhone, verifierFromLogin); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_verifyPhoneNumberForLogin(verifierFromPhone, pinCodeForPhone, verifierFromLogin); } }; TalkServiceClient.prototype.send_verifyPhoneNumberForLogin = function(verifierFromPhone, pinCodeForPhone, verifierFromLogin) { var output = new this.pClass(this.output); output.writeMessageBegin('verifyPhoneNumberForLogin', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_verifyPhoneNumberForLogin_args(); args.verifierFromPhone = verifierFromPhone; args.pinCodeForPhone = pinCodeForPhone; args.verifierFromLogin = verifierFromLogin; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_verifyPhoneNumberForLogin = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_verifyPhoneNumberForLogin_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('verifyPhoneNumberForLogin failed: unknown result'); }; TalkServiceClient.prototype.verifyPhoneNumber = function(sessionId, pinCode, udidHash, migrationPincodeSessionId, oldUdidHash, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_verifyPhoneNumber(sessionId, pinCode, udidHash, migrationPincodeSessionId, oldUdidHash); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_verifyPhoneNumber(sessionId, pinCode, udidHash, migrationPincodeSessionId, oldUdidHash); } }; TalkServiceClient.prototype.send_verifyPhoneNumber = function(sessionId, pinCode, udidHash, migrationPincodeSessionId, oldUdidHash) { var output = new this.pClass(this.output); output.writeMessageBegin('verifyPhoneNumber', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_verifyPhoneNumber_args(); args.sessionId = sessionId; args.pinCode = pinCode; args.udidHash = udidHash; args.migrationPincodeSessionId = migrationPincodeSessionId; args.oldUdidHash = oldUdidHash; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_verifyPhoneNumber = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_verifyPhoneNumber_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('verifyPhoneNumber failed: unknown result'); }; TalkServiceClient.prototype.getBlockedContactIdsByRange = function(start, count, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getBlockedContactIdsByRange(start, count); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getBlockedContactIdsByRange(start, count); } }; TalkServiceClient.prototype.send_getBlockedContactIdsByRange = function(start, count) { var output = new this.pClass(this.output); output.writeMessageBegin('getBlockedContactIdsByRange', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getBlockedContactIdsByRange_args(); args.start = start; args.count = count; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getBlockedContactIdsByRange = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getBlockedContactIdsByRange_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getBlockedContactIdsByRange failed: unknown result'); }; TalkServiceClient.prototype.getBlockedRecommendationIds = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getBlockedRecommendationIds(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getBlockedRecommendationIds(); } }; TalkServiceClient.prototype.send_getBlockedRecommendationIds = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getBlockedRecommendationIds', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getBlockedRecommendationIds_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getBlockedRecommendationIds = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getBlockedRecommendationIds_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getBlockedRecommendationIds failed: unknown result'); }; TalkServiceClient.prototype.getBuddyBlockerIds = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getBuddyBlockerIds(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getBuddyBlockerIds(); } }; TalkServiceClient.prototype.send_getBuddyBlockerIds = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getBuddyBlockerIds', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getBuddyBlockerIds_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getBuddyBlockerIds = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getBuddyBlockerIds_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getBuddyBlockerIds failed: unknown result'); }; TalkServiceClient.prototype.getBuddyLocation = function(mid, index, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getBuddyLocation(mid, index); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getBuddyLocation(mid, index); } }; TalkServiceClient.prototype.send_getBuddyLocation = function(mid, index) { var output = new this.pClass(this.output); output.writeMessageBegin('getBuddyLocation', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getBuddyLocation_args(); args.mid = mid; args.index = index; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getBuddyLocation = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getBuddyLocation_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getBuddyLocation failed: unknown result'); }; TalkServiceClient.prototype.getCompactContactsModifiedSince = function(timestamp, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getCompactContactsModifiedSince(timestamp); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getCompactContactsModifiedSince(timestamp); } }; TalkServiceClient.prototype.send_getCompactContactsModifiedSince = function(timestamp) { var output = new this.pClass(this.output); output.writeMessageBegin('getCompactContactsModifiedSince', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getCompactContactsModifiedSince_args(); args.timestamp = timestamp; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getCompactContactsModifiedSince = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getCompactContactsModifiedSince_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getCompactContactsModifiedSince failed: unknown result'); }; TalkServiceClient.prototype.getCompactGroup = function(groupId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getCompactGroup(groupId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getCompactGroup(groupId); } }; TalkServiceClient.prototype.send_getCompactGroup = function(groupId) { var output = new this.pClass(this.output); output.writeMessageBegin('getCompactGroup', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getCompactGroup_args(); args.groupId = groupId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getCompactGroup = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getCompactGroup_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getCompactGroup failed: unknown result'); }; TalkServiceClient.prototype.getCompactRoom = function(roomId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getCompactRoom(roomId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getCompactRoom(roomId); } }; TalkServiceClient.prototype.send_getCompactRoom = function(roomId) { var output = new this.pClass(this.output); output.writeMessageBegin('getCompactRoom', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getCompactRoom_args(); args.roomId = roomId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getCompactRoom = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getCompactRoom_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getCompactRoom failed: unknown result'); }; TalkServiceClient.prototype.getContact = function(id, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getContact(id); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getContact(id); } }; TalkServiceClient.prototype.send_getContact = function(id) { var output = new this.pClass(this.output); output.writeMessageBegin('getContact', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getContact_args(); args.id = id; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getContact = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getContact_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getContact failed: unknown result'); }; TalkServiceClient.prototype.getContacts = function(ids, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getContacts(ids); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getContacts(ids); } }; TalkServiceClient.prototype.send_getContacts = function(ids) { var output = new this.pClass(this.output); output.writeMessageBegin('getContacts', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getContacts_args(); args.ids = ids; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getContacts = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getContacts_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getContacts failed: unknown result'); }; TalkServiceClient.prototype.getContactWithFriendRequestStatus = function(id, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getContactWithFriendRequestStatus(id); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getContactWithFriendRequestStatus(id); } }; TalkServiceClient.prototype.send_getContactWithFriendRequestStatus = function(id) { var output = new this.pClass(this.output); output.writeMessageBegin('getContactWithFriendRequestStatus', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getContactWithFriendRequestStatus_args(); args.id = id; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getContactWithFriendRequestStatus = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getContactWithFriendRequestStatus_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getContactWithFriendRequestStatus failed: unknown result'); }; TalkServiceClient.prototype.getCountryWithRequestIp = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getCountryWithRequestIp(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getCountryWithRequestIp(); } }; TalkServiceClient.prototype.send_getCountryWithRequestIp = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getCountryWithRequestIp', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getCountryWithRequestIp_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getCountryWithRequestIp = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getCountryWithRequestIp_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getCountryWithRequestIp failed: unknown result'); }; TalkServiceClient.prototype.getFavoriteMids = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getFavoriteMids(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getFavoriteMids(); } }; TalkServiceClient.prototype.send_getFavoriteMids = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getFavoriteMids', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getFavoriteMids_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getFavoriteMids = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getFavoriteMids_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getFavoriteMids failed: unknown result'); }; TalkServiceClient.prototype.getGroup = function(groupId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getGroup(groupId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getGroup(groupId); } }; TalkServiceClient.prototype.send_getGroup = function(groupId) { var output = new this.pClass(this.output); output.writeMessageBegin('getGroup', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getGroup_args(); args.groupId = groupId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getGroup = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getGroup_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getGroup failed: unknown result'); }; TalkServiceClient.prototype.getGroupIdsInvited = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getGroupIdsInvited(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getGroupIdsInvited(); } }; TalkServiceClient.prototype.send_getGroupIdsInvited = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getGroupIdsInvited', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getGroupIdsInvited_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getGroupIdsInvited = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getGroupIdsInvited_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getGroupIdsInvited failed: unknown result'); }; TalkServiceClient.prototype.getGroupIdsJoined = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getGroupIdsJoined(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getGroupIdsJoined(); } }; TalkServiceClient.prototype.send_getGroupIdsJoined = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getGroupIdsJoined', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getGroupIdsJoined_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getGroupIdsJoined = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getGroupIdsJoined_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getGroupIdsJoined failed: unknown result'); }; TalkServiceClient.prototype.getGroups = function(groupIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getGroups(groupIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getGroups(groupIds); } }; TalkServiceClient.prototype.send_getGroups = function(groupIds) { var output = new this.pClass(this.output); output.writeMessageBegin('getGroups', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getGroups_args(); args.groupIds = groupIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getGroups = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getGroups_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getGroups failed: unknown result'); }; TalkServiceClient.prototype.getHiddenContactMids = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getHiddenContactMids(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getHiddenContactMids(); } }; TalkServiceClient.prototype.send_getHiddenContactMids = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getHiddenContactMids', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getHiddenContactMids_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getHiddenContactMids = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getHiddenContactMids_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getHiddenContactMids failed: unknown result'); }; TalkServiceClient.prototype.getIdentityIdentifier = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getIdentityIdentifier(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getIdentityIdentifier(); } }; TalkServiceClient.prototype.send_getIdentityIdentifier = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getIdentityIdentifier', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getIdentityIdentifier_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getIdentityIdentifier = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getIdentityIdentifier_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getIdentityIdentifier failed: unknown result'); }; TalkServiceClient.prototype.getLastAnnouncementIndex = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getLastAnnouncementIndex(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getLastAnnouncementIndex(); } }; TalkServiceClient.prototype.send_getLastAnnouncementIndex = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getLastAnnouncementIndex', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getLastAnnouncementIndex_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getLastAnnouncementIndex = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getLastAnnouncementIndex_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getLastAnnouncementIndex failed: unknown result'); }; TalkServiceClient.prototype.getLastOpRevision = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getLastOpRevision(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getLastOpRevision(); } }; TalkServiceClient.prototype.send_getLastOpRevision = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getLastOpRevision', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getLastOpRevision_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getLastOpRevision = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getLastOpRevision_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getLastOpRevision failed: unknown result'); }; TalkServiceClient.prototype.getSuggestRevisions = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getSuggestRevisions(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getSuggestRevisions(); } }; TalkServiceClient.prototype.send_getSuggestRevisions = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getSuggestRevisions', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getSuggestRevisions_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getSuggestRevisions = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getSuggestRevisions_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getSuggestRevisions failed: unknown result'); }; TalkServiceClient.prototype.getPreviousMessagesV2WithReadCount = function(messageBoxId, endMessageId, messagesCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getPreviousMessagesV2WithReadCount(messageBoxId, endMessageId, messagesCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getPreviousMessagesV2WithReadCount(messageBoxId, endMessageId, messagesCount); } }; TalkServiceClient.prototype.send_getPreviousMessagesV2WithReadCount = function(messageBoxId, endMessageId, messagesCount) { var output = new this.pClass(this.output); output.writeMessageBegin('getPreviousMessagesV2WithReadCount', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getPreviousMessagesV2WithReadCount_args(); args.messageBoxId = messageBoxId; args.endMessageId = endMessageId; args.messagesCount = messagesCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getPreviousMessagesV2WithReadCount = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getPreviousMessagesV2WithReadCount_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getPreviousMessagesV2WithReadCount failed: unknown result'); }; TalkServiceClient.prototype.getMessageBox = function(channelId, messageBoxId, lastMessagesCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getMessageBox(channelId, messageBoxId, lastMessagesCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getMessageBox(channelId, messageBoxId, lastMessagesCount); } }; TalkServiceClient.prototype.send_getMessageBox = function(channelId, messageBoxId, lastMessagesCount) { var output = new this.pClass(this.output); output.writeMessageBegin('getMessageBox', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getMessageBox_args(); args.channelId = channelId; args.messageBoxId = messageBoxId; args.lastMessagesCount = lastMessagesCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getMessageBox = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getMessageBox_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getMessageBox failed: unknown result'); }; TalkServiceClient.prototype.getMessageBoxCompactWrapUp = function(mid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getMessageBoxCompactWrapUp(mid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getMessageBoxCompactWrapUp(mid); } }; TalkServiceClient.prototype.send_getMessageBoxCompactWrapUp = function(mid) { var output = new this.pClass(this.output); output.writeMessageBegin('getMessageBoxCompactWrapUp', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getMessageBoxCompactWrapUp_args(); args.mid = mid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getMessageBoxCompactWrapUp = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getMessageBoxCompactWrapUp_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getMessageBoxCompactWrapUp failed: unknown result'); }; TalkServiceClient.prototype.getMessageBoxCompactWrapUpList = function(start, messageBoxCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getMessageBoxCompactWrapUpList(start, messageBoxCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getMessageBoxCompactWrapUpList(start, messageBoxCount); } }; TalkServiceClient.prototype.send_getMessageBoxCompactWrapUpList = function(start, messageBoxCount) { var output = new this.pClass(this.output); output.writeMessageBegin('getMessageBoxCompactWrapUpList', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getMessageBoxCompactWrapUpList_args(); args.start = start; args.messageBoxCount = messageBoxCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getMessageBoxCompactWrapUpList = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getMessageBoxCompactWrapUpList_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getMessageBoxCompactWrapUpList failed: unknown result'); }; TalkServiceClient.prototype.getMessageBoxList = function(channelId, lastMessagesCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getMessageBoxList(channelId, lastMessagesCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getMessageBoxList(channelId, lastMessagesCount); } }; TalkServiceClient.prototype.send_getMessageBoxList = function(channelId, lastMessagesCount) { var output = new this.pClass(this.output); output.writeMessageBegin('getMessageBoxList', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getMessageBoxList_args(); args.channelId = channelId; args.lastMessagesCount = lastMessagesCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getMessageBoxList = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getMessageBoxList_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getMessageBoxList failed: unknown result'); }; TalkServiceClient.prototype.getMessageBoxListByStatus = function(channelId, lastMessagesCount, status, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getMessageBoxListByStatus(channelId, lastMessagesCount, status); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getMessageBoxListByStatus(channelId, lastMessagesCount, status); } }; TalkServiceClient.prototype.send_getMessageBoxListByStatus = function(channelId, lastMessagesCount, status) { var output = new this.pClass(this.output); output.writeMessageBegin('getMessageBoxListByStatus', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getMessageBoxListByStatus_args(); args.channelId = channelId; args.lastMessagesCount = lastMessagesCount; args.status = status; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getMessageBoxListByStatus = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getMessageBoxListByStatus_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getMessageBoxListByStatus failed: unknown result'); }; TalkServiceClient.prototype.getMessageBoxWrapUp = function(mid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getMessageBoxWrapUp(mid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getMessageBoxWrapUp(mid); } }; TalkServiceClient.prototype.send_getMessageBoxWrapUp = function(mid) { var output = new this.pClass(this.output); output.writeMessageBegin('getMessageBoxWrapUp', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getMessageBoxWrapUp_args(); args.mid = mid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getMessageBoxWrapUp = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getMessageBoxWrapUp_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getMessageBoxWrapUp failed: unknown result'); }; TalkServiceClient.prototype.getMessageBoxWrapUpList = function(start, messageBoxCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getMessageBoxWrapUpList(start, messageBoxCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getMessageBoxWrapUpList(start, messageBoxCount); } }; TalkServiceClient.prototype.send_getMessageBoxWrapUpList = function(start, messageBoxCount) { var output = new this.pClass(this.output); output.writeMessageBegin('getMessageBoxWrapUpList', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getMessageBoxWrapUpList_args(); args.start = start; args.messageBoxCount = messageBoxCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getMessageBoxWrapUpList = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getMessageBoxWrapUpList_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getMessageBoxWrapUpList failed: unknown result'); }; TalkServiceClient.prototype.getMessagesBySequenceNumber = function(channelId, messageBoxId, startSeq, endSeq, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getMessagesBySequenceNumber(channelId, messageBoxId, startSeq, endSeq); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getMessagesBySequenceNumber(channelId, messageBoxId, startSeq, endSeq); } }; TalkServiceClient.prototype.send_getMessagesBySequenceNumber = function(channelId, messageBoxId, startSeq, endSeq) { var output = new this.pClass(this.output); output.writeMessageBegin('getMessagesBySequenceNumber', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getMessagesBySequenceNumber_args(); args.channelId = channelId; args.messageBoxId = messageBoxId; args.startSeq = startSeq; args.endSeq = endSeq; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getMessagesBySequenceNumber = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getMessagesBySequenceNumber_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getMessagesBySequenceNumber failed: unknown result'); }; TalkServiceClient.prototype.getNextMessages = function(messageBoxId, startSeq, messagesCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getNextMessages(messageBoxId, startSeq, messagesCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getNextMessages(messageBoxId, startSeq, messagesCount); } }; TalkServiceClient.prototype.send_getNextMessages = function(messageBoxId, startSeq, messagesCount) { var output = new this.pClass(this.output); output.writeMessageBegin('getNextMessages', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getNextMessages_args(); args.messageBoxId = messageBoxId; args.startSeq = startSeq; args.messagesCount = messagesCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getNextMessages = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getNextMessages_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getNextMessages failed: unknown result'); }; TalkServiceClient.prototype.getNotificationPolicy = function(carrier, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getNotificationPolicy(carrier); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getNotificationPolicy(carrier); } }; TalkServiceClient.prototype.send_getNotificationPolicy = function(carrier) { var output = new this.pClass(this.output); output.writeMessageBegin('getNotificationPolicy', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getNotificationPolicy_args(); args.carrier = carrier; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getNotificationPolicy = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getNotificationPolicy_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getNotificationPolicy failed: unknown result'); }; TalkServiceClient.prototype.getPreviousMessages = function(messageBoxId, endSeq, messagesCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getPreviousMessages(messageBoxId, endSeq, messagesCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getPreviousMessages(messageBoxId, endSeq, messagesCount); } }; TalkServiceClient.prototype.send_getPreviousMessages = function(messageBoxId, endSeq, messagesCount) { var output = new this.pClass(this.output); output.writeMessageBegin('getPreviousMessages', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getPreviousMessages_args(); args.messageBoxId = messageBoxId; args.endSeq = endSeq; args.messagesCount = messagesCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getPreviousMessages = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getPreviousMessages_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getPreviousMessages failed: unknown result'); }; TalkServiceClient.prototype.getProfile = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getProfile(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getProfile(); } }; TalkServiceClient.prototype.send_getProfile = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getProfile', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getProfile_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getProfile = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getProfile_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getProfile failed: unknown result'); }; TalkServiceClient.prototype.getProximityMatchCandidateList = function(sessionId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getProximityMatchCandidateList(sessionId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getProximityMatchCandidateList(sessionId); } }; TalkServiceClient.prototype.send_getProximityMatchCandidateList = function(sessionId) { var output = new this.pClass(this.output); output.writeMessageBegin('getProximityMatchCandidateList', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getProximityMatchCandidateList_args(); args.sessionId = sessionId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getProximityMatchCandidateList = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getProximityMatchCandidateList_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getProximityMatchCandidateList failed: unknown result'); }; TalkServiceClient.prototype.getProximityMatchCandidates = function(sessionId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getProximityMatchCandidates(sessionId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getProximityMatchCandidates(sessionId); } }; TalkServiceClient.prototype.send_getProximityMatchCandidates = function(sessionId) { var output = new this.pClass(this.output); output.writeMessageBegin('getProximityMatchCandidates', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getProximityMatchCandidates_args(); args.sessionId = sessionId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getProximityMatchCandidates = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getProximityMatchCandidates_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getProximityMatchCandidates failed: unknown result'); }; TalkServiceClient.prototype.getRecentMessages = function(messageBoxId, messagesCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getRecentMessages(messageBoxId, messagesCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getRecentMessages(messageBoxId, messagesCount); } }; TalkServiceClient.prototype.send_getRecentMessages = function(messageBoxId, messagesCount) { var output = new this.pClass(this.output); output.writeMessageBegin('getRecentMessages', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getRecentMessages_args(); args.messageBoxId = messageBoxId; args.messagesCount = messagesCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getRecentMessages = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getRecentMessages_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getRecentMessages failed: unknown result'); }; TalkServiceClient.prototype.getRecommendationIds = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getRecommendationIds(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getRecommendationIds(); } }; TalkServiceClient.prototype.send_getRecommendationIds = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getRecommendationIds', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getRecommendationIds_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getRecommendationIds = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getRecommendationIds_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getRecommendationIds failed: unknown result'); }; TalkServiceClient.prototype.getRoom = function(roomId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getRoom(roomId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getRoom(roomId); } }; TalkServiceClient.prototype.send_getRoom = function(roomId) { var output = new this.pClass(this.output); output.writeMessageBegin('getRoom', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getRoom_args(); args.roomId = roomId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getRoom = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getRoom_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getRoom failed: unknown result'); }; TalkServiceClient.prototype.getRSAKeyInfo = function(provider, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getRSAKeyInfo(provider); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getRSAKeyInfo(provider); } }; TalkServiceClient.prototype.send_getRSAKeyInfo = function(provider) { var output = new this.pClass(this.output); output.writeMessageBegin('getRSAKeyInfo', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getRSAKeyInfo_args(); args.provider = provider; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getRSAKeyInfo = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getRSAKeyInfo_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getRSAKeyInfo failed: unknown result'); }; TalkServiceClient.prototype.getServerTime = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getServerTime(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getServerTime(); } }; TalkServiceClient.prototype.send_getServerTime = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getServerTime', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getServerTime_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getServerTime = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getServerTime_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getServerTime failed: unknown result'); }; TalkServiceClient.prototype.getSessions = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getSessions(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getSessions(); } }; TalkServiceClient.prototype.send_getSessions = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getSessions', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getSessions_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getSessions = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getSessions_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getSessions failed: unknown result'); }; TalkServiceClient.prototype.getSettings = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getSettings(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getSettings(); } }; TalkServiceClient.prototype.send_getSettings = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getSettings', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getSettings_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getSettings = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getSettings_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getSettings failed: unknown result'); }; TalkServiceClient.prototype.getGroupsV2 = function(groupIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getGroupsV2(groupIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getGroupsV2(groupIds); } }; TalkServiceClient.prototype.send_getGroupsV2 = function(groupIds) { var output = new this.pClass(this.output); output.writeMessageBegin('getGroupsV2', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getGroupsV2_args(); args.groupIds = groupIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getGroupsV2 = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getGroupsV2_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getGroupsV2 failed: unknown result'); }; TalkServiceClient.prototype.getSettingsAttributes = function(attrBitset, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getSettingsAttributes(attrBitset); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getSettingsAttributes(attrBitset); } }; TalkServiceClient.prototype.send_getSettingsAttributes = function(attrBitset) { var output = new this.pClass(this.output); output.writeMessageBegin('getSettingsAttributes', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getSettingsAttributes_args(); args.attrBitset = attrBitset; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getSettingsAttributes = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getSettingsAttributes_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getSettingsAttributes failed: unknown result'); }; TalkServiceClient.prototype.getSystemConfiguration = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getSystemConfiguration(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getSystemConfiguration(); } }; TalkServiceClient.prototype.send_getSystemConfiguration = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getSystemConfiguration', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getSystemConfiguration_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getSystemConfiguration = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getSystemConfiguration_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getSystemConfiguration failed: unknown result'); }; TalkServiceClient.prototype.getUserTicket = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getUserTicket(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getUserTicket(); } }; TalkServiceClient.prototype.send_getUserTicket = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getUserTicket', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getUserTicket_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getUserTicket = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getUserTicket_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getUserTicket failed: unknown result'); }; TalkServiceClient.prototype.getWapInvitation = function(invitationHash, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getWapInvitation(invitationHash); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getWapInvitation(invitationHash); } }; TalkServiceClient.prototype.send_getWapInvitation = function(invitationHash) { var output = new this.pClass(this.output); output.writeMessageBegin('getWapInvitation', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getWapInvitation_args(); args.invitationHash = invitationHash; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getWapInvitation = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getWapInvitation_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getWapInvitation failed: unknown result'); }; TalkServiceClient.prototype.invalidateUserTicket = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_invalidateUserTicket(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_invalidateUserTicket(); } }; TalkServiceClient.prototype.send_invalidateUserTicket = function() { var output = new this.pClass(this.output); output.writeMessageBegin('invalidateUserTicket', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_invalidateUserTicket_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_invalidateUserTicket = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_invalidateUserTicket_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.inviteFriendsBySms = function(phoneNumberList, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_inviteFriendsBySms(phoneNumberList); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_inviteFriendsBySms(phoneNumberList); } }; TalkServiceClient.prototype.send_inviteFriendsBySms = function(phoneNumberList) { var output = new this.pClass(this.output); output.writeMessageBegin('inviteFriendsBySms', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_inviteFriendsBySms_args(); args.phoneNumberList = phoneNumberList; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_inviteFriendsBySms = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_inviteFriendsBySms_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.inviteIntoGroup = function(reqSeq, groupId, contactIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_inviteIntoGroup(reqSeq, groupId, contactIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_inviteIntoGroup(reqSeq, groupId, contactIds); } }; TalkServiceClient.prototype.send_inviteIntoGroup = function(reqSeq, groupId, contactIds) { var output = new this.pClass(this.output); output.writeMessageBegin('inviteIntoGroup', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_inviteIntoGroup_args(); args.reqSeq = reqSeq; args.groupId = groupId; args.contactIds = contactIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_inviteIntoGroup = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_inviteIntoGroup_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.inviteIntoRoom = function(reqSeq, roomId, contactIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_inviteIntoRoom(reqSeq, roomId, contactIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_inviteIntoRoom(reqSeq, roomId, contactIds); } }; TalkServiceClient.prototype.send_inviteIntoRoom = function(reqSeq, roomId, contactIds) { var output = new this.pClass(this.output); output.writeMessageBegin('inviteIntoRoom', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_inviteIntoRoom_args(); args.reqSeq = reqSeq; args.roomId = roomId; args.contactIds = contactIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_inviteIntoRoom = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_inviteIntoRoom_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.inviteViaEmail = function(reqSeq, email, name, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_inviteViaEmail(reqSeq, email, name); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_inviteViaEmail(reqSeq, email, name); } }; TalkServiceClient.prototype.send_inviteViaEmail = function(reqSeq, email, name) { var output = new this.pClass(this.output); output.writeMessageBegin('inviteViaEmail', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_inviteViaEmail_args(); args.reqSeq = reqSeq; args.email = email; args.name = name; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_inviteViaEmail = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_inviteViaEmail_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.isIdentityIdentifierAvailable = function(provider, identifier, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_isIdentityIdentifierAvailable(provider, identifier); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_isIdentityIdentifierAvailable(provider, identifier); } }; TalkServiceClient.prototype.send_isIdentityIdentifierAvailable = function(provider, identifier) { var output = new this.pClass(this.output); output.writeMessageBegin('isIdentityIdentifierAvailable', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_isIdentityIdentifierAvailable_args(); args.provider = provider; args.identifier = identifier; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_isIdentityIdentifierAvailable = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_isIdentityIdentifierAvailable_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('isIdentityIdentifierAvailable failed: unknown result'); }; TalkServiceClient.prototype.isUseridAvailable = function(userid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_isUseridAvailable(userid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_isUseridAvailable(userid); } }; TalkServiceClient.prototype.send_isUseridAvailable = function(userid) { var output = new this.pClass(this.output); output.writeMessageBegin('isUseridAvailable', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_isUseridAvailable_args(); args.userid = userid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_isUseridAvailable = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_isUseridAvailable_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('isUseridAvailable failed: unknown result'); }; TalkServiceClient.prototype.kickoutFromGroup = function(reqSeq, groupId, contactIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_kickoutFromGroup(reqSeq, groupId, contactIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_kickoutFromGroup(reqSeq, groupId, contactIds); } }; TalkServiceClient.prototype.send_kickoutFromGroup = function(reqSeq, groupId, contactIds) { var output = new this.pClass(this.output); output.writeMessageBegin('kickoutFromGroup', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_kickoutFromGroup_args(); args.reqSeq = reqSeq; args.groupId = groupId; args.contactIds = contactIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_kickoutFromGroup = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_kickoutFromGroup_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.reissueGroupTicket = function(groupMid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_reissueGroupTicket(groupMid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reissueGroupTicket(groupMid); } }; TalkServiceClient.prototype.send_reissueGroupTicket = function(groupMid) { var output = new this.pClass(this.output); output.writeMessageBegin('reissueGroupTicket', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reissueGroupTicket_args(); args.groupMid = groupMid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_reissueGroupTicket = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_reissueGroupTicket_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('reissueGroupTicket failed: unknown result'); }; TalkServiceClient.prototype.findGroupByTicket = function(ticketId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findGroupByTicket(ticketId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findGroupByTicket(ticketId); } }; TalkServiceClient.prototype.send_findGroupByTicket = function(ticketId) { var output = new this.pClass(this.output); output.writeMessageBegin('findGroupByTicket', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findGroupByTicket_args(); args.ticketId = ticketId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findGroupByTicket = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findGroupByTicket_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findGroupByTicket failed: unknown result'); }; TalkServiceClient.prototype.leaveGroup = function(reqSeq, groupId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_leaveGroup(reqSeq, groupId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_leaveGroup(reqSeq, groupId); } }; TalkServiceClient.prototype.send_leaveGroup = function(reqSeq, groupId) { var output = new this.pClass(this.output); output.writeMessageBegin('leaveGroup', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_leaveGroup_args(); args.reqSeq = reqSeq; args.groupId = groupId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_leaveGroup = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_leaveGroup_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.leaveRoom = function(reqSeq, roomId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_leaveRoom(reqSeq, roomId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_leaveRoom(reqSeq, roomId); } }; TalkServiceClient.prototype.send_leaveRoom = function(reqSeq, roomId) { var output = new this.pClass(this.output); output.writeMessageBegin('leaveRoom', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_leaveRoom_args(); args.reqSeq = reqSeq; args.roomId = roomId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_leaveRoom = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_leaveRoom_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.loginWithIdentityCredential = function(identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_loginWithIdentityCredential(identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_loginWithIdentityCredential(identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate); } }; TalkServiceClient.prototype.send_loginWithIdentityCredential = function(identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate) { var output = new this.pClass(this.output); output.writeMessageBegin('loginWithIdentityCredential', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_loginWithIdentityCredential_args(); args.identityProvider = identityProvider; args.identifier = identifier; args.password = password; args.keepLoggedIn = keepLoggedIn; args.accessLocation = accessLocation; args.systemName = systemName; args.certificate = certificate; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_loginWithIdentityCredential = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_loginWithIdentityCredential_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('loginWithIdentityCredential failed: unknown result'); }; TalkServiceClient.prototype.loginWithIdentityCredentialForCertificate = function(identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_loginWithIdentityCredentialForCertificate(identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_loginWithIdentityCredentialForCertificate(identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate); } }; TalkServiceClient.prototype.send_loginWithIdentityCredentialForCertificate = function(identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate) { var output = new this.pClass(this.output); output.writeMessageBegin('loginWithIdentityCredentialForCertificate', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_loginWithIdentityCredentialForCertificate_args(); args.identityProvider = identityProvider; args.identifier = identifier; args.password = password; args.keepLoggedIn = keepLoggedIn; args.accessLocation = accessLocation; args.systemName = systemName; args.certificate = certificate; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_loginWithIdentityCredentialForCertificate = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_loginWithIdentityCredentialForCertificate_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('loginWithIdentityCredentialForCertificate failed: unknown result'); }; TalkServiceClient.prototype.loginWithVerifier = function(verifier, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_loginWithVerifier(verifier); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_loginWithVerifier(verifier); } }; TalkServiceClient.prototype.send_loginWithVerifier = function(verifier) { var output = new this.pClass(this.output); output.writeMessageBegin('loginWithVerifier', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_loginWithVerifier_args(); args.verifier = verifier; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_loginWithVerifier = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_loginWithVerifier_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('loginWithVerifier failed: unknown result'); }; TalkServiceClient.prototype.loginWithVerifierForCerificate = function(verifier, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_loginWithVerifierForCerificate(verifier); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_loginWithVerifierForCerificate(verifier); } }; TalkServiceClient.prototype.send_loginWithVerifierForCerificate = function(verifier) { var output = new this.pClass(this.output); output.writeMessageBegin('loginWithVerifierForCerificate', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_loginWithVerifierForCerificate_args(); args.verifier = verifier; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_loginWithVerifierForCerificate = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_loginWithVerifierForCerificate_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('loginWithVerifierForCerificate failed: unknown result'); }; TalkServiceClient.prototype.loginWithVerifierForCertificate = function(verifier, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_loginWithVerifierForCertificate(verifier); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_loginWithVerifierForCertificate(verifier); } }; TalkServiceClient.prototype.send_loginWithVerifierForCertificate = function(verifier) { var output = new this.pClass(this.output); output.writeMessageBegin('loginWithVerifierForCertificate', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_loginWithVerifierForCertificate_args(); args.verifier = verifier; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_loginWithVerifierForCertificate = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_loginWithVerifierForCertificate_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('loginWithVerifierForCertificate failed: unknown result'); }; TalkServiceClient.prototype.logout = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_logout(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_logout(); } }; TalkServiceClient.prototype.send_logout = function() { var output = new this.pClass(this.output); output.writeMessageBegin('logout', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_logout_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_logout = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_logout_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.logoutSession = function(tokenKey, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_logoutSession(tokenKey); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_logoutSession(tokenKey); } }; TalkServiceClient.prototype.send_logoutSession = function(tokenKey) { var output = new this.pClass(this.output); output.writeMessageBegin('logoutSession', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_logoutSession_args(); args.tokenKey = tokenKey; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_logoutSession = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_logoutSession_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.noop = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_noop(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_noop(); } }; TalkServiceClient.prototype.send_noop = function() { var output = new this.pClass(this.output); output.writeMessageBegin('noop', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_noop_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_noop = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_noop_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.notifiedRedirect = function(paramMap, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_notifiedRedirect(paramMap); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_notifiedRedirect(paramMap); } }; TalkServiceClient.prototype.send_notifiedRedirect = function(paramMap) { var output = new this.pClass(this.output); output.writeMessageBegin('notifiedRedirect', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_notifiedRedirect_args(); args.paramMap = paramMap; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_notifiedRedirect = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_notifiedRedirect_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.notifyBuddyOnAir = function(seq, receiverMids, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_notifyBuddyOnAir(seq, receiverMids); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_notifyBuddyOnAir(seq, receiverMids); } }; TalkServiceClient.prototype.send_notifyBuddyOnAir = function(seq, receiverMids) { var output = new this.pClass(this.output); output.writeMessageBegin('notifyBuddyOnAir', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_notifyBuddyOnAir_args(); args.seq = seq; args.receiverMids = receiverMids; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_notifyBuddyOnAir = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_notifyBuddyOnAir_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('notifyBuddyOnAir failed: unknown result'); }; TalkServiceClient.prototype.notifyIndividualEvent = function(notificationStatus, receiverMids, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_notifyIndividualEvent(notificationStatus, receiverMids); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_notifyIndividualEvent(notificationStatus, receiverMids); } }; TalkServiceClient.prototype.send_notifyIndividualEvent = function(notificationStatus, receiverMids) { var output = new this.pClass(this.output); output.writeMessageBegin('notifyIndividualEvent', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_notifyIndividualEvent_args(); args.notificationStatus = notificationStatus; args.receiverMids = receiverMids; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_notifyIndividualEvent = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_notifyIndividualEvent_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.notifyInstalled = function(udidHash, applicationTypeWithExtensions, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_notifyInstalled(udidHash, applicationTypeWithExtensions); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_notifyInstalled(udidHash, applicationTypeWithExtensions); } }; TalkServiceClient.prototype.send_notifyInstalled = function(udidHash, applicationTypeWithExtensions) { var output = new this.pClass(this.output); output.writeMessageBegin('notifyInstalled', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_notifyInstalled_args(); args.udidHash = udidHash; args.applicationTypeWithExtensions = applicationTypeWithExtensions; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_notifyInstalled = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_notifyInstalled_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.notifyRegistrationComplete = function(udidHash, applicationTypeWithExtensions, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_notifyRegistrationComplete(udidHash, applicationTypeWithExtensions); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_notifyRegistrationComplete(udidHash, applicationTypeWithExtensions); } }; TalkServiceClient.prototype.send_notifyRegistrationComplete = function(udidHash, applicationTypeWithExtensions) { var output = new this.pClass(this.output); output.writeMessageBegin('notifyRegistrationComplete', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_notifyRegistrationComplete_args(); args.udidHash = udidHash; args.applicationTypeWithExtensions = applicationTypeWithExtensions; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_notifyRegistrationComplete = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_notifyRegistrationComplete_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.notifySleep = function(lastRev, badge, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_notifySleep(lastRev, badge); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_notifySleep(lastRev, badge); } }; TalkServiceClient.prototype.send_notifySleep = function(lastRev, badge) { var output = new this.pClass(this.output); output.writeMessageBegin('notifySleep', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_notifySleep_args(); args.lastRev = lastRev; args.badge = badge; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_notifySleep = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_notifySleep_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.notifyUpdated = function(lastRev, deviceInfo, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_notifyUpdated(lastRev, deviceInfo); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_notifyUpdated(lastRev, deviceInfo); } }; TalkServiceClient.prototype.send_notifyUpdated = function(lastRev, deviceInfo) { var output = new this.pClass(this.output); output.writeMessageBegin('notifyUpdated', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_notifyUpdated_args(); args.lastRev = lastRev; args.deviceInfo = deviceInfo; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_notifyUpdated = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_notifyUpdated_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.openProximityMatch = function(location, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_openProximityMatch(location); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_openProximityMatch(location); } }; TalkServiceClient.prototype.send_openProximityMatch = function(location) { var output = new this.pClass(this.output); output.writeMessageBegin('openProximityMatch', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_openProximityMatch_args(); args.location = location; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_openProximityMatch = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_openProximityMatch_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('openProximityMatch failed: unknown result'); }; TalkServiceClient.prototype.registerBuddyUser = function(buddyId, registrarPassword, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerBuddyUser(buddyId, registrarPassword); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerBuddyUser(buddyId, registrarPassword); } }; TalkServiceClient.prototype.send_registerBuddyUser = function(buddyId, registrarPassword) { var output = new this.pClass(this.output); output.writeMessageBegin('registerBuddyUser', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerBuddyUser_args(); args.buddyId = buddyId; args.registrarPassword = registrarPassword; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerBuddyUser = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerBuddyUser_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerBuddyUser failed: unknown result'); }; TalkServiceClient.prototype.registerBuddyUserid = function(seq, userid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerBuddyUserid(seq, userid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerBuddyUserid(seq, userid); } }; TalkServiceClient.prototype.send_registerBuddyUserid = function(seq, userid) { var output = new this.pClass(this.output); output.writeMessageBegin('registerBuddyUserid', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerBuddyUserid_args(); args.seq = seq; args.userid = userid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerBuddyUserid = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerBuddyUserid_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.registerDevice = function(sessionId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerDevice(sessionId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerDevice(sessionId); } }; TalkServiceClient.prototype.send_registerDevice = function(sessionId) { var output = new this.pClass(this.output); output.writeMessageBegin('registerDevice', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerDevice_args(); args.sessionId = sessionId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerDevice = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerDevice_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerDevice failed: unknown result'); }; TalkServiceClient.prototype.registerDeviceWithIdentityCredential = function(sessionId, provider, identifier, verifier, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerDeviceWithIdentityCredential(sessionId, provider, identifier, verifier); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerDeviceWithIdentityCredential(sessionId, provider, identifier, verifier); } }; TalkServiceClient.prototype.send_registerDeviceWithIdentityCredential = function(sessionId, provider, identifier, verifier) { var output = new this.pClass(this.output); output.writeMessageBegin('registerDeviceWithIdentityCredential', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerDeviceWithIdentityCredential_args(); args.sessionId = sessionId; args.provider = provider; args.identifier = identifier; args.verifier = verifier; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerDeviceWithIdentityCredential = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerDeviceWithIdentityCredential_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerDeviceWithIdentityCredential failed: unknown result'); }; TalkServiceClient.prototype.registerDeviceWithoutPhoneNumber = function(region, udidHash, deviceInfo, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerDeviceWithoutPhoneNumber(region, udidHash, deviceInfo); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerDeviceWithoutPhoneNumber(region, udidHash, deviceInfo); } }; TalkServiceClient.prototype.send_registerDeviceWithoutPhoneNumber = function(region, udidHash, deviceInfo) { var output = new this.pClass(this.output); output.writeMessageBegin('registerDeviceWithoutPhoneNumber', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerDeviceWithoutPhoneNumber_args(); args.region = region; args.udidHash = udidHash; args.deviceInfo = deviceInfo; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerDeviceWithoutPhoneNumber = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerDeviceWithoutPhoneNumber_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerDeviceWithoutPhoneNumber failed: unknown result'); }; TalkServiceClient.prototype.registerDeviceWithoutPhoneNumberWithIdentityCredential = function(region, udidHash, deviceInfo, provider, identifier, verifier, mid, migrationPincodeSessionId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerDeviceWithoutPhoneNumberWithIdentityCredential(region, udidHash, deviceInfo, provider, identifier, verifier, mid, migrationPincodeSessionId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerDeviceWithoutPhoneNumberWithIdentityCredential(region, udidHash, deviceInfo, provider, identifier, verifier, mid, migrationPincodeSessionId); } }; TalkServiceClient.prototype.send_registerDeviceWithoutPhoneNumberWithIdentityCredential = function(region, udidHash, deviceInfo, provider, identifier, verifier, mid, migrationPincodeSessionId) { var output = new this.pClass(this.output); output.writeMessageBegin('registerDeviceWithoutPhoneNumberWithIdentityCredential', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_args(); args.region = region; args.udidHash = udidHash; args.deviceInfo = deviceInfo; args.provider = provider; args.identifier = identifier; args.verifier = verifier; args.mid = mid; args.migrationPincodeSessionId = migrationPincodeSessionId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerDeviceWithoutPhoneNumberWithIdentityCredential = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerDeviceWithoutPhoneNumberWithIdentityCredential failed: unknown result'); }; TalkServiceClient.prototype.registerUserid = function(reqSeq, userid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerUserid(reqSeq, userid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerUserid(reqSeq, userid); } }; TalkServiceClient.prototype.send_registerUserid = function(reqSeq, userid) { var output = new this.pClass(this.output); output.writeMessageBegin('registerUserid', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerUserid_args(); args.reqSeq = reqSeq; args.userid = userid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerUserid = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerUserid_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerUserid failed: unknown result'); }; TalkServiceClient.prototype.registerWapDevice = function(invitationHash, guidHash, email, deviceInfo, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerWapDevice(invitationHash, guidHash, email, deviceInfo); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerWapDevice(invitationHash, guidHash, email, deviceInfo); } }; TalkServiceClient.prototype.send_registerWapDevice = function(invitationHash, guidHash, email, deviceInfo) { var output = new this.pClass(this.output); output.writeMessageBegin('registerWapDevice', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerWapDevice_args(); args.invitationHash = invitationHash; args.guidHash = guidHash; args.email = email; args.deviceInfo = deviceInfo; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerWapDevice = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerWapDevice_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerWapDevice failed: unknown result'); }; TalkServiceClient.prototype.registerWithExistingSnsIdAndIdentityCredential = function(identityCredential, region, udidHash, deviceInfo, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerWithExistingSnsIdAndIdentityCredential(identityCredential, region, udidHash, deviceInfo); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerWithExistingSnsIdAndIdentityCredential(identityCredential, region, udidHash, deviceInfo); } }; TalkServiceClient.prototype.send_registerWithExistingSnsIdAndIdentityCredential = function(identityCredential, region, udidHash, deviceInfo) { var output = new this.pClass(this.output); output.writeMessageBegin('registerWithExistingSnsIdAndIdentityCredential', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerWithExistingSnsIdAndIdentityCredential_args(); args.identityCredential = identityCredential; args.region = region; args.udidHash = udidHash; args.deviceInfo = deviceInfo; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerWithExistingSnsIdAndIdentityCredential = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerWithExistingSnsIdAndIdentityCredential_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerWithExistingSnsIdAndIdentityCredential failed: unknown result'); }; TalkServiceClient.prototype.registerWithSnsId = function(snsIdType, snsAccessToken, region, udidHash, deviceInfo, mid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerWithSnsId(snsIdType, snsAccessToken, region, udidHash, deviceInfo, mid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerWithSnsId(snsIdType, snsAccessToken, region, udidHash, deviceInfo, mid); } }; TalkServiceClient.prototype.send_registerWithSnsId = function(snsIdType, snsAccessToken, region, udidHash, deviceInfo, mid) { var output = new this.pClass(this.output); output.writeMessageBegin('registerWithSnsId', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerWithSnsId_args(); args.snsIdType = snsIdType; args.snsAccessToken = snsAccessToken; args.region = region; args.udidHash = udidHash; args.deviceInfo = deviceInfo; args.mid = mid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerWithSnsId = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerWithSnsId_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerWithSnsId failed: unknown result'); }; TalkServiceClient.prototype.registerWithSnsIdAndIdentityCredential = function(snsIdType, snsAccessToken, identityCredential, region, udidHash, deviceInfo, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerWithSnsIdAndIdentityCredential(snsIdType, snsAccessToken, identityCredential, region, udidHash, deviceInfo); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerWithSnsIdAndIdentityCredential(snsIdType, snsAccessToken, identityCredential, region, udidHash, deviceInfo); } }; TalkServiceClient.prototype.send_registerWithSnsIdAndIdentityCredential = function(snsIdType, snsAccessToken, identityCredential, region, udidHash, deviceInfo) { var output = new this.pClass(this.output); output.writeMessageBegin('registerWithSnsIdAndIdentityCredential', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerWithSnsIdAndIdentityCredential_args(); args.snsIdType = snsIdType; args.snsAccessToken = snsAccessToken; args.identityCredential = identityCredential; args.region = region; args.udidHash = udidHash; args.deviceInfo = deviceInfo; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerWithSnsIdAndIdentityCredential = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerWithSnsIdAndIdentityCredential_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerWithSnsIdAndIdentityCredential failed: unknown result'); }; TalkServiceClient.prototype.reissueDeviceCredential = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_reissueDeviceCredential(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reissueDeviceCredential(); } }; TalkServiceClient.prototype.send_reissueDeviceCredential = function() { var output = new this.pClass(this.output); output.writeMessageBegin('reissueDeviceCredential', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reissueDeviceCredential_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_reissueDeviceCredential = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_reissueDeviceCredential_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('reissueDeviceCredential failed: unknown result'); }; TalkServiceClient.prototype.reissueUserTicket = function(expirationTime, maxUseCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_reissueUserTicket(expirationTime, maxUseCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reissueUserTicket(expirationTime, maxUseCount); } }; TalkServiceClient.prototype.send_reissueUserTicket = function(expirationTime, maxUseCount) { var output = new this.pClass(this.output); output.writeMessageBegin('reissueUserTicket', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reissueUserTicket_args(); args.expirationTime = expirationTime; args.maxUseCount = maxUseCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_reissueUserTicket = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_reissueUserTicket_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('reissueUserTicket failed: unknown result'); }; TalkServiceClient.prototype.getMessageReadRange = function(chatIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getMessageReadRange(chatIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getMessageReadRange(chatIds); } }; TalkServiceClient.prototype.send_getMessageReadRange = function(chatIds) { var output = new this.pClass(this.output); output.writeMessageBegin('getMessageReadRange', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getMessageReadRange_args(); args.chatIds = chatIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getMessageReadRange = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getMessageReadRange_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getMessageReadRange failed: unknown result'); }; TalkServiceClient.prototype.rejectGroupInvitation = function(reqSeq, groupId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_rejectGroupInvitation(reqSeq, groupId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_rejectGroupInvitation(reqSeq, groupId); } }; TalkServiceClient.prototype.send_rejectGroupInvitation = function(reqSeq, groupId) { var output = new this.pClass(this.output); output.writeMessageBegin('rejectGroupInvitation', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_rejectGroupInvitation_args(); args.reqSeq = reqSeq; args.groupId = groupId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_rejectGroupInvitation = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_rejectGroupInvitation_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.releaseSession = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_releaseSession(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_releaseSession(); } }; TalkServiceClient.prototype.send_releaseSession = function() { var output = new this.pClass(this.output); output.writeMessageBegin('releaseSession', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_releaseSession_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_releaseSession = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_releaseSession_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.removeAllMessages = function(seq, lastMessageId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_removeAllMessages(seq, lastMessageId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_removeAllMessages(seq, lastMessageId); } }; TalkServiceClient.prototype.send_removeAllMessages = function(seq, lastMessageId) { var output = new this.pClass(this.output); output.writeMessageBegin('removeAllMessages', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_removeAllMessages_args(); args.seq = seq; args.lastMessageId = lastMessageId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_removeAllMessages = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_removeAllMessages_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.removeBuddyLocation = function(mid, index, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_removeBuddyLocation(mid, index); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_removeBuddyLocation(mid, index); } }; TalkServiceClient.prototype.send_removeBuddyLocation = function(mid, index) { var output = new this.pClass(this.output); output.writeMessageBegin('removeBuddyLocation', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_removeBuddyLocation_args(); args.mid = mid; args.index = index; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_removeBuddyLocation = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_removeBuddyLocation_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.removeMessage = function(messageId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_removeMessage(messageId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_removeMessage(messageId); } }; TalkServiceClient.prototype.send_removeMessage = function(messageId) { var output = new this.pClass(this.output); output.writeMessageBegin('removeMessage', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_removeMessage_args(); args.messageId = messageId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_removeMessage = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_removeMessage_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('removeMessage failed: unknown result'); }; TalkServiceClient.prototype.makeUserAddMyselfAsContact = function(contactOwnerMid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_makeUserAddMyselfAsContact(contactOwnerMid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_makeUserAddMyselfAsContact(contactOwnerMid); } }; TalkServiceClient.prototype.send_makeUserAddMyselfAsContact = function(contactOwnerMid) { var output = new this.pClass(this.output); output.writeMessageBegin('makeUserAddMyselfAsContact', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_makeUserAddMyselfAsContact_args(); args.contactOwnerMid = contactOwnerMid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_makeUserAddMyselfAsContact = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_makeUserAddMyselfAsContact_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('makeUserAddMyselfAsContact failed: unknown result'); }; TalkServiceClient.prototype.removeMessageFromMyHome = function(messageId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_removeMessageFromMyHome(messageId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_removeMessageFromMyHome(messageId); } }; TalkServiceClient.prototype.send_removeMessageFromMyHome = function(messageId) { var output = new this.pClass(this.output); output.writeMessageBegin('removeMessageFromMyHome', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_removeMessageFromMyHome_args(); args.messageId = messageId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_removeMessageFromMyHome = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_removeMessageFromMyHome_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('removeMessageFromMyHome failed: unknown result'); }; TalkServiceClient.prototype.removeSnsId = function(snsIdType, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_removeSnsId(snsIdType); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_removeSnsId(snsIdType); } }; TalkServiceClient.prototype.send_removeSnsId = function(snsIdType) { var output = new this.pClass(this.output); output.writeMessageBegin('removeSnsId', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_removeSnsId_args(); args.snsIdType = snsIdType; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_removeSnsId = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_removeSnsId_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('removeSnsId failed: unknown result'); }; TalkServiceClient.prototype.report = function(syncOpRevision, category, report, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_report(syncOpRevision, category, report); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_report(syncOpRevision, category, report); } }; TalkServiceClient.prototype.send_report = function(syncOpRevision, category, report) { var output = new this.pClass(this.output); output.writeMessageBegin('report', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_report_args(); args.syncOpRevision = syncOpRevision; args.category = category; args.report = report; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_report = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_report_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.reportContacts = function(syncOpRevision, category, contactReports, actionType, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_reportContacts(syncOpRevision, category, contactReports, actionType); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reportContacts(syncOpRevision, category, contactReports, actionType); } }; TalkServiceClient.prototype.send_reportContacts = function(syncOpRevision, category, contactReports, actionType) { var output = new this.pClass(this.output); output.writeMessageBegin('reportContacts', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reportContacts_args(); args.syncOpRevision = syncOpRevision; args.category = category; args.contactReports = contactReports; args.actionType = actionType; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_reportContacts = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_reportContacts_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('reportContacts failed: unknown result'); }; TalkServiceClient.prototype.reportGroups = function(syncOpRevision, groups, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_reportGroups(syncOpRevision, groups); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reportGroups(syncOpRevision, groups); } }; TalkServiceClient.prototype.send_reportGroups = function(syncOpRevision, groups) { var output = new this.pClass(this.output); output.writeMessageBegin('reportGroups', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reportGroups_args(); args.syncOpRevision = syncOpRevision; args.groups = groups; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_reportGroups = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_reportGroups_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.reportProfile = function(syncOpRevision, profile, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_reportProfile(syncOpRevision, profile); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reportProfile(syncOpRevision, profile); } }; TalkServiceClient.prototype.send_reportProfile = function(syncOpRevision, profile) { var output = new this.pClass(this.output); output.writeMessageBegin('reportProfile', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reportProfile_args(); args.syncOpRevision = syncOpRevision; args.profile = profile; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_reportProfile = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_reportProfile_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.reportRooms = function(syncOpRevision, rooms, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_reportRooms(syncOpRevision, rooms); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reportRooms(syncOpRevision, rooms); } }; TalkServiceClient.prototype.send_reportRooms = function(syncOpRevision, rooms) { var output = new this.pClass(this.output); output.writeMessageBegin('reportRooms', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reportRooms_args(); args.syncOpRevision = syncOpRevision; args.rooms = rooms; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_reportRooms = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_reportRooms_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.findAndAddContactByMetaTag = function(reqSeq, userid, reference, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findAndAddContactByMetaTag(reqSeq, userid, reference); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findAndAddContactByMetaTag(reqSeq, userid, reference); } }; TalkServiceClient.prototype.send_findAndAddContactByMetaTag = function(reqSeq, userid, reference) { var output = new this.pClass(this.output); output.writeMessageBegin('findAndAddContactByMetaTag', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findAndAddContactByMetaTag_args(); args.reqSeq = reqSeq; args.userid = userid; args.reference = reference; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findAndAddContactByMetaTag = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findAndAddContactByMetaTag_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findAndAddContactByMetaTag failed: unknown result'); }; TalkServiceClient.prototype.reportSettings = function(syncOpRevision, settings, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_reportSettings(syncOpRevision, settings); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reportSettings(syncOpRevision, settings); } }; TalkServiceClient.prototype.send_reportSettings = function(syncOpRevision, settings) { var output = new this.pClass(this.output); output.writeMessageBegin('reportSettings', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reportSettings_args(); args.syncOpRevision = syncOpRevision; args.settings = settings; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_reportSettings = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_reportSettings_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.reportSpam = function(chatMid, memberMids, spammerReasons, senderMids, spamMessageIds, spamMessages, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_reportSpam(chatMid, memberMids, spammerReasons, senderMids, spamMessageIds, spamMessages); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reportSpam(chatMid, memberMids, spammerReasons, senderMids, spamMessageIds, spamMessages); } }; TalkServiceClient.prototype.send_reportSpam = function(chatMid, memberMids, spammerReasons, senderMids, spamMessageIds, spamMessages) { var output = new this.pClass(this.output); output.writeMessageBegin('reportSpam', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reportSpam_args(); args.chatMid = chatMid; args.memberMids = memberMids; args.spammerReasons = spammerReasons; args.senderMids = senderMids; args.spamMessageIds = spamMessageIds; args.spamMessages = spamMessages; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_reportSpam = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_reportSpam_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.reportSpammer = function(spammerMid, spammerReasons, spamMessageIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_reportSpammer(spammerMid, spammerReasons, spamMessageIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reportSpammer(spammerMid, spammerReasons, spamMessageIds); } }; TalkServiceClient.prototype.send_reportSpammer = function(spammerMid, spammerReasons, spamMessageIds) { var output = new this.pClass(this.output); output.writeMessageBegin('reportSpammer', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reportSpammer_args(); args.spammerMid = spammerMid; args.spammerReasons = spammerReasons; args.spamMessageIds = spamMessageIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_reportSpammer = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_reportSpammer_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.requestAccountPasswordReset = function(provider, identifier, locale, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_requestAccountPasswordReset(provider, identifier, locale); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_requestAccountPasswordReset(provider, identifier, locale); } }; TalkServiceClient.prototype.send_requestAccountPasswordReset = function(provider, identifier, locale) { var output = new this.pClass(this.output); output.writeMessageBegin('requestAccountPasswordReset', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_requestAccountPasswordReset_args(); args.provider = provider; args.identifier = identifier; args.locale = locale; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_requestAccountPasswordReset = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_requestAccountPasswordReset_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.requestEmailConfirmation = function(emailConfirmation, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_requestEmailConfirmation(emailConfirmation); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_requestEmailConfirmation(emailConfirmation); } }; TalkServiceClient.prototype.send_requestEmailConfirmation = function(emailConfirmation) { var output = new this.pClass(this.output); output.writeMessageBegin('requestEmailConfirmation', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_requestEmailConfirmation_args(); args.emailConfirmation = emailConfirmation; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_requestEmailConfirmation = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_requestEmailConfirmation_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('requestEmailConfirmation failed: unknown result'); }; TalkServiceClient.prototype.requestIdentityUnbind = function(provider, identifier, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_requestIdentityUnbind(provider, identifier); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_requestIdentityUnbind(provider, identifier); } }; TalkServiceClient.prototype.send_requestIdentityUnbind = function(provider, identifier) { var output = new this.pClass(this.output); output.writeMessageBegin('requestIdentityUnbind', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_requestIdentityUnbind_args(); args.provider = provider; args.identifier = identifier; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_requestIdentityUnbind = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_requestIdentityUnbind_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.resendEmailConfirmation = function(verifier, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_resendEmailConfirmation(verifier); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_resendEmailConfirmation(verifier); } }; TalkServiceClient.prototype.send_resendEmailConfirmation = function(verifier) { var output = new this.pClass(this.output); output.writeMessageBegin('resendEmailConfirmation', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_resendEmailConfirmation_args(); args.verifier = verifier; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_resendEmailConfirmation = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_resendEmailConfirmation_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('resendEmailConfirmation failed: unknown result'); }; TalkServiceClient.prototype.resendPinCode = function(sessionId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_resendPinCode(sessionId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_resendPinCode(sessionId); } }; TalkServiceClient.prototype.send_resendPinCode = function(sessionId) { var output = new this.pClass(this.output); output.writeMessageBegin('resendPinCode', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_resendPinCode_args(); args.sessionId = sessionId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_resendPinCode = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_resendPinCode_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.resendPinCodeBySMS = function(sessionId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_resendPinCodeBySMS(sessionId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_resendPinCodeBySMS(sessionId); } }; TalkServiceClient.prototype.send_resendPinCodeBySMS = function(sessionId) { var output = new this.pClass(this.output); output.writeMessageBegin('resendPinCodeBySMS', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_resendPinCodeBySMS_args(); args.sessionId = sessionId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_resendPinCodeBySMS = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_resendPinCodeBySMS_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.sendChatChecked = function(seq, consumer, lastMessageId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_sendChatChecked(seq, consumer, lastMessageId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_sendChatChecked(seq, consumer, lastMessageId); } }; TalkServiceClient.prototype.send_sendChatChecked = function(seq, consumer, lastMessageId) { var output = new this.pClass(this.output); output.writeMessageBegin('sendChatChecked', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_sendChatChecked_args(); args.seq = seq; args.consumer = consumer; args.lastMessageId = lastMessageId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_sendChatChecked = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_sendChatChecked_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.sendMessageAwaitCommit = function(seq, message, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_sendMessageAwaitCommit(seq, message); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_sendMessageAwaitCommit(seq, message); } }; TalkServiceClient.prototype.send_sendMessageAwaitCommit = function(seq, message) { var output = new this.pClass(this.output); output.writeMessageBegin('sendMessageAwaitCommit', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_sendMessageAwaitCommit_args(); args.seq = seq; args.message = message; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_sendMessageAwaitCommit = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_sendMessageAwaitCommit_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('sendMessageAwaitCommit failed: unknown result'); }; TalkServiceClient.prototype.sendChatRemoved = function(seq, consumer, lastMessageId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_sendChatRemoved(seq, consumer, lastMessageId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_sendChatRemoved(seq, consumer, lastMessageId); } }; TalkServiceClient.prototype.send_sendChatRemoved = function(seq, consumer, lastMessageId) { var output = new this.pClass(this.output); output.writeMessageBegin('sendChatRemoved', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_sendChatRemoved_args(); args.seq = seq; args.consumer = consumer; args.lastMessageId = lastMessageId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_sendChatRemoved = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_sendChatRemoved_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.sendContentPreviewUpdated = function(esq, messageId, receiverMids, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_sendContentPreviewUpdated(esq, messageId, receiverMids); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_sendContentPreviewUpdated(esq, messageId, receiverMids); } }; TalkServiceClient.prototype.send_sendContentPreviewUpdated = function(esq, messageId, receiverMids) { var output = new this.pClass(this.output); output.writeMessageBegin('sendContentPreviewUpdated', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_sendContentPreviewUpdated_args(); args.esq = esq; args.messageId = messageId; args.receiverMids = receiverMids; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_sendContentPreviewUpdated = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_sendContentPreviewUpdated_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('sendContentPreviewUpdated failed: unknown result'); }; TalkServiceClient.prototype.sendContentReceipt = function(seq, consumer, messageId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_sendContentReceipt(seq, consumer, messageId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_sendContentReceipt(seq, consumer, messageId); } }; TalkServiceClient.prototype.send_sendContentReceipt = function(seq, consumer, messageId) { var output = new this.pClass(this.output); output.writeMessageBegin('sendContentReceipt', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_sendContentReceipt_args(); args.seq = seq; args.consumer = consumer; args.messageId = messageId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_sendContentReceipt = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_sendContentReceipt_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.sendDummyPush = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_sendDummyPush(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_sendDummyPush(); } }; TalkServiceClient.prototype.send_sendDummyPush = function() { var output = new this.pClass(this.output); output.writeMessageBegin('sendDummyPush', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_sendDummyPush_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_sendDummyPush = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_sendDummyPush_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.removeE2EEPublicKey = function(publicKey, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_removeE2EEPublicKey(publicKey); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_removeE2EEPublicKey(publicKey); } }; TalkServiceClient.prototype.send_removeE2EEPublicKey = function(publicKey) { var output = new this.pClass(this.output); output.writeMessageBegin('removeE2EEPublicKey', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_removeE2EEPublicKey_args(); args.publicKey = publicKey; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_removeE2EEPublicKey = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_removeE2EEPublicKey_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.negotiateE2EEPublicKey = function(mid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_negotiateE2EEPublicKey(mid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_negotiateE2EEPublicKey(mid); } }; TalkServiceClient.prototype.send_negotiateE2EEPublicKey = function(mid) { var output = new this.pClass(this.output); output.writeMessageBegin('negotiateE2EEPublicKey', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_negotiateE2EEPublicKey_args(); args.mid = mid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_negotiateE2EEPublicKey = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_negotiateE2EEPublicKey_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('negotiateE2EEPublicKey failed: unknown result'); }; TalkServiceClient.prototype.getE2EEPublicKey = function(mid, version, keyId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getE2EEPublicKey(mid, version, keyId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getE2EEPublicKey(mid, version, keyId); } }; TalkServiceClient.prototype.send_getE2EEPublicKey = function(mid, version, keyId) { var output = new this.pClass(this.output); output.writeMessageBegin('getE2EEPublicKey', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getE2EEPublicKey_args(); args.mid = mid; args.version = version; args.keyId = keyId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getE2EEPublicKey = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getE2EEPublicKey_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getE2EEPublicKey failed: unknown result'); }; TalkServiceClient.prototype.requestE2EEKeyExchange = function(reqSeq, temporalPublicKey, publicKey, verifier, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_requestE2EEKeyExchange(reqSeq, temporalPublicKey, publicKey, verifier); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_requestE2EEKeyExchange(reqSeq, temporalPublicKey, publicKey, verifier); } }; TalkServiceClient.prototype.send_requestE2EEKeyExchange = function(reqSeq, temporalPublicKey, publicKey, verifier) { var output = new this.pClass(this.output); output.writeMessageBegin('requestE2EEKeyExchange', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_requestE2EEKeyExchange_args(); args.reqSeq = reqSeq; args.temporalPublicKey = temporalPublicKey; args.publicKey = publicKey; args.verifier = verifier; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_requestE2EEKeyExchange = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_requestE2EEKeyExchange_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.getLastE2EEPublicKeys = function(chatMid, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getLastE2EEPublicKeys(chatMid); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getLastE2EEPublicKeys(chatMid); } }; TalkServiceClient.prototype.send_getLastE2EEPublicKeys = function(chatMid) { var output = new this.pClass(this.output); output.writeMessageBegin('getLastE2EEPublicKeys', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getLastE2EEPublicKeys_args(); args.chatMid = chatMid; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getLastE2EEPublicKeys = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getLastE2EEPublicKeys_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getLastE2EEPublicKeys failed: unknown result'); }; TalkServiceClient.prototype.registerE2EEPublicKey = function(reqSeq, publicKey, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_registerE2EEPublicKey(reqSeq, publicKey); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerE2EEPublicKey(reqSeq, publicKey); } }; TalkServiceClient.prototype.send_registerE2EEPublicKey = function(reqSeq, publicKey) { var output = new this.pClass(this.output); output.writeMessageBegin('registerE2EEPublicKey', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_registerE2EEPublicKey_args(); args.reqSeq = reqSeq; args.publicKey = publicKey; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_registerE2EEPublicKey = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_registerE2EEPublicKey_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('registerE2EEPublicKey failed: unknown result'); }; TalkServiceClient.prototype.getE2EEPublicKeys = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getE2EEPublicKeys(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getE2EEPublicKeys(); } }; TalkServiceClient.prototype.send_getE2EEPublicKeys = function() { var output = new this.pClass(this.output); output.writeMessageBegin('getE2EEPublicKeys', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getE2EEPublicKeys_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getE2EEPublicKeys = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getE2EEPublicKeys_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getE2EEPublicKeys failed: unknown result'); }; TalkServiceClient.prototype.getE2EEPublicKeysEx = function(ignoreE2EEStatus, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getE2EEPublicKeysEx(ignoreE2EEStatus); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getE2EEPublicKeysEx(ignoreE2EEStatus); } }; TalkServiceClient.prototype.send_getE2EEPublicKeysEx = function(ignoreE2EEStatus) { var output = new this.pClass(this.output); output.writeMessageBegin('getE2EEPublicKeysEx', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getE2EEPublicKeysEx_args(); args.ignoreE2EEStatus = ignoreE2EEStatus; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getE2EEPublicKeysEx = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getE2EEPublicKeysEx_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getE2EEPublicKeysEx failed: unknown result'); }; TalkServiceClient.prototype.getReadMessageOpsInBulk = function(chatIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getReadMessageOpsInBulk(chatIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getReadMessageOpsInBulk(chatIds); } }; TalkServiceClient.prototype.send_getReadMessageOpsInBulk = function(chatIds) { var output = new this.pClass(this.output); output.writeMessageBegin('getReadMessageOpsInBulk', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getReadMessageOpsInBulk_args(); args.chatIds = chatIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getReadMessageOpsInBulk = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getReadMessageOpsInBulk_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getReadMessageOpsInBulk failed: unknown result'); }; TalkServiceClient.prototype.sendEvent = function(seq, message, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_sendEvent(seq, message); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_sendEvent(seq, message); } }; TalkServiceClient.prototype.send_sendEvent = function(seq, message) { var output = new this.pClass(this.output); output.writeMessageBegin('sendEvent', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_sendEvent_args(); args.seq = seq; args.message = message; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_sendEvent = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_sendEvent_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('sendEvent failed: unknown result'); }; TalkServiceClient.prototype.sendMessage = function(seq, message, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_sendMessage(seq, message); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_sendMessage(seq, message); } }; TalkServiceClient.prototype.send_sendMessage = function(seq, message) { var output = new this.pClass(this.output); output.writeMessageBegin('sendMessage', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_sendMessage_args(); args.seq = seq; args.message = message; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_sendMessage = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_sendMessage_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('sendMessage failed: unknown result'); }; TalkServiceClient.prototype.sendMessageIgnored = function(seq, consumer, messageIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_sendMessageIgnored(seq, consumer, messageIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_sendMessageIgnored(seq, consumer, messageIds); } }; TalkServiceClient.prototype.send_sendMessageIgnored = function(seq, consumer, messageIds) { var output = new this.pClass(this.output); output.writeMessageBegin('sendMessageIgnored', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_sendMessageIgnored_args(); args.seq = seq; args.consumer = consumer; args.messageIds = messageIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_sendMessageIgnored = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_sendMessageIgnored_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.sendMessageReceipt = function(seq, consumer, messageIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_sendMessageReceipt(seq, consumer, messageIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_sendMessageReceipt(seq, consumer, messageIds); } }; TalkServiceClient.prototype.send_sendMessageReceipt = function(seq, consumer, messageIds) { var output = new this.pClass(this.output); output.writeMessageBegin('sendMessageReceipt', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_sendMessageReceipt_args(); args.seq = seq; args.consumer = consumer; args.messageIds = messageIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_sendMessageReceipt = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_sendMessageReceipt_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.findContactByMetaTag = function(userid, reference, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_findContactByMetaTag(userid, reference); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findContactByMetaTag(userid, reference); } }; TalkServiceClient.prototype.send_findContactByMetaTag = function(userid, reference) { var output = new this.pClass(this.output); output.writeMessageBegin('findContactByMetaTag', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findContactByMetaTag_args(); args.userid = userid; args.reference = reference; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_findContactByMetaTag = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_findContactByMetaTag_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('findContactByMetaTag failed: unknown result'); }; TalkServiceClient.prototype.sendMessageToMyHome = function(seq, message, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_sendMessageToMyHome(seq, message); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_sendMessageToMyHome(seq, message); } }; TalkServiceClient.prototype.send_sendMessageToMyHome = function(seq, message) { var output = new this.pClass(this.output); output.writeMessageBegin('sendMessageToMyHome', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_sendMessageToMyHome_args(); args.seq = seq; args.message = message; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_sendMessageToMyHome = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_sendMessageToMyHome_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('sendMessageToMyHome failed: unknown result'); }; TalkServiceClient.prototype.setBuddyLocation = function(mid, index, location, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_setBuddyLocation(mid, index, location); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_setBuddyLocation(mid, index, location); } }; TalkServiceClient.prototype.send_setBuddyLocation = function(mid, index, location) { var output = new this.pClass(this.output); output.writeMessageBegin('setBuddyLocation', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_setBuddyLocation_args(); args.mid = mid; args.index = index; args.location = location; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_setBuddyLocation = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_setBuddyLocation_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.setIdentityCredential = function(identifier, verifier, provider, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_setIdentityCredential(identifier, verifier, provider); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_setIdentityCredential(identifier, verifier, provider); } }; TalkServiceClient.prototype.send_setIdentityCredential = function(identifier, verifier, provider) { var output = new this.pClass(this.output); output.writeMessageBegin('setIdentityCredential', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_setIdentityCredential_args(); args.identifier = identifier; args.verifier = verifier; args.provider = provider; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_setIdentityCredential = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_setIdentityCredential_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.setNotificationsEnabled = function(reqSeq, type, target, enablement, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_setNotificationsEnabled(reqSeq, type, target, enablement); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_setNotificationsEnabled(reqSeq, type, target, enablement); } }; TalkServiceClient.prototype.send_setNotificationsEnabled = function(reqSeq, type, target, enablement) { var output = new this.pClass(this.output); output.writeMessageBegin('setNotificationsEnabled', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_setNotificationsEnabled_args(); args.reqSeq = reqSeq; args.type = type; args.target = target; args.enablement = enablement; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_setNotificationsEnabled = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_setNotificationsEnabled_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.startUpdateVerification = function(region, carrier, phone, udidHash, deviceInfo, networkCode, locale, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_startUpdateVerification(region, carrier, phone, udidHash, deviceInfo, networkCode, locale); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_startUpdateVerification(region, carrier, phone, udidHash, deviceInfo, networkCode, locale); } }; TalkServiceClient.prototype.send_startUpdateVerification = function(region, carrier, phone, udidHash, deviceInfo, networkCode, locale) { var output = new this.pClass(this.output); output.writeMessageBegin('startUpdateVerification', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_startUpdateVerification_args(); args.region = region; args.carrier = carrier; args.phone = phone; args.udidHash = udidHash; args.deviceInfo = deviceInfo; args.networkCode = networkCode; args.locale = locale; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_startUpdateVerification = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_startUpdateVerification_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('startUpdateVerification failed: unknown result'); }; TalkServiceClient.prototype.startVerification = function(region, carrier, phone, udidHash, deviceInfo, networkCode, mid, locale, simInfo, oldUdidHash, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_startVerification(region, carrier, phone, udidHash, deviceInfo, networkCode, mid, locale, simInfo, oldUdidHash); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_startVerification(region, carrier, phone, udidHash, deviceInfo, networkCode, mid, locale, simInfo, oldUdidHash); } }; TalkServiceClient.prototype.send_startVerification = function(region, carrier, phone, udidHash, deviceInfo, networkCode, mid, locale, simInfo, oldUdidHash) { var output = new this.pClass(this.output); output.writeMessageBegin('startVerification', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_startVerification_args(); args.region = region; args.carrier = carrier; args.phone = phone; args.udidHash = udidHash; args.deviceInfo = deviceInfo; args.networkCode = networkCode; args.mid = mid; args.locale = locale; args.simInfo = simInfo; args.oldUdidHash = oldUdidHash; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_startVerification = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_startVerification_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('startVerification failed: unknown result'); }; TalkServiceClient.prototype.updateGroupPreferenceAttribute = function(reqSeq, groupMid, updatedAttrs, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateGroupPreferenceAttribute(reqSeq, groupMid, updatedAttrs); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateGroupPreferenceAttribute(reqSeq, groupMid, updatedAttrs); } }; TalkServiceClient.prototype.send_updateGroupPreferenceAttribute = function(reqSeq, groupMid, updatedAttrs) { var output = new this.pClass(this.output); output.writeMessageBegin('updateGroupPreferenceAttribute', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateGroupPreferenceAttribute_args(); args.reqSeq = reqSeq; args.groupMid = groupMid; args.updatedAttrs = updatedAttrs; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateGroupPreferenceAttribute = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateGroupPreferenceAttribute_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.createRoomV2 = function(reqSeq, contactIds, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_createRoomV2(reqSeq, contactIds); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_createRoomV2(reqSeq, contactIds); } }; TalkServiceClient.prototype.send_createRoomV2 = function(reqSeq, contactIds) { var output = new this.pClass(this.output); output.writeMessageBegin('createRoomV2', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_createRoomV2_args(); args.reqSeq = reqSeq; args.contactIds = contactIds; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_createRoomV2 = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_createRoomV2_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('createRoomV2 failed: unknown result'); }; TalkServiceClient.prototype.storeUpdateProfileAttribute = function(seq, profileAttribute, value, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_storeUpdateProfileAttribute(seq, profileAttribute, value); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_storeUpdateProfileAttribute(seq, profileAttribute, value); } }; TalkServiceClient.prototype.send_storeUpdateProfileAttribute = function(seq, profileAttribute, value) { var output = new this.pClass(this.output); output.writeMessageBegin('storeUpdateProfileAttribute', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_storeUpdateProfileAttribute_args(); args.seq = seq; args.profileAttribute = profileAttribute; args.value = value; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_storeUpdateProfileAttribute = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_storeUpdateProfileAttribute_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.syncContactBySnsIds = function(reqSeq, modifications, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_syncContactBySnsIds(reqSeq, modifications); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_syncContactBySnsIds(reqSeq, modifications); } }; TalkServiceClient.prototype.send_syncContactBySnsIds = function(reqSeq, modifications) { var output = new this.pClass(this.output); output.writeMessageBegin('syncContactBySnsIds', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_syncContactBySnsIds_args(); args.reqSeq = reqSeq; args.modifications = modifications; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_syncContactBySnsIds = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_syncContactBySnsIds_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('syncContactBySnsIds failed: unknown result'); }; TalkServiceClient.prototype.syncContacts = function(reqSeq, localContacts, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_syncContacts(reqSeq, localContacts); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_syncContacts(reqSeq, localContacts); } }; TalkServiceClient.prototype.send_syncContacts = function(reqSeq, localContacts) { var output = new this.pClass(this.output); output.writeMessageBegin('syncContacts', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_syncContacts_args(); args.reqSeq = reqSeq; args.localContacts = localContacts; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_syncContacts = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_syncContacts_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('syncContacts failed: unknown result'); }; TalkServiceClient.prototype.trySendMessage = function(seq, message, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_trySendMessage(seq, message); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_trySendMessage(seq, message); } }; TalkServiceClient.prototype.send_trySendMessage = function(seq, message) { var output = new this.pClass(this.output); output.writeMessageBegin('trySendMessage', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_trySendMessage_args(); args.seq = seq; args.message = message; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_trySendMessage = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_trySendMessage_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('trySendMessage failed: unknown result'); }; TalkServiceClient.prototype.getNextMessagesV2 = function(messageBoxId, startMessageId, messagesCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getNextMessagesV2(messageBoxId, startMessageId, messagesCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getNextMessagesV2(messageBoxId, startMessageId, messagesCount); } }; TalkServiceClient.prototype.send_getNextMessagesV2 = function(messageBoxId, startMessageId, messagesCount) { var output = new this.pClass(this.output); output.writeMessageBegin('getNextMessagesV2', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getNextMessagesV2_args(); args.messageBoxId = messageBoxId; args.startMessageId = startMessageId; args.messagesCount = messagesCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getNextMessagesV2 = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getNextMessagesV2_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getNextMessagesV2 failed: unknown result'); }; TalkServiceClient.prototype.getMessageBoxCompactWrapUpV2 = function(messageBoxId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getMessageBoxCompactWrapUpV2(messageBoxId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getMessageBoxCompactWrapUpV2(messageBoxId); } }; TalkServiceClient.prototype.send_getMessageBoxCompactWrapUpV2 = function(messageBoxId) { var output = new this.pClass(this.output); output.writeMessageBegin('getMessageBoxCompactWrapUpV2', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getMessageBoxCompactWrapUpV2_args(); args.messageBoxId = messageBoxId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getMessageBoxCompactWrapUpV2 = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getMessageBoxCompactWrapUpV2_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getMessageBoxCompactWrapUpV2 failed: unknown result'); }; TalkServiceClient.prototype.getRecentMessagesV2 = function(messageBoxId, messagesCount, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_getRecentMessagesV2(messageBoxId, messagesCount); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_getRecentMessagesV2(messageBoxId, messagesCount); } }; TalkServiceClient.prototype.send_getRecentMessagesV2 = function(messageBoxId, messagesCount) { var output = new this.pClass(this.output); output.writeMessageBegin('getRecentMessagesV2', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_getRecentMessagesV2_args(); args.messageBoxId = messageBoxId; args.messagesCount = messagesCount; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_getRecentMessagesV2 = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_getRecentMessagesV2_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('getRecentMessagesV2 failed: unknown result'); }; TalkServiceClient.prototype.validateContactsOnBot = function(contacts, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_validateContactsOnBot(contacts); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_validateContactsOnBot(contacts); } }; TalkServiceClient.prototype.send_validateContactsOnBot = function(contacts) { var output = new this.pClass(this.output); output.writeMessageBegin('validateContactsOnBot', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_validateContactsOnBot_args(); args.contacts = contacts; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_validateContactsOnBot = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_validateContactsOnBot_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('validateContactsOnBot failed: unknown result'); }; TalkServiceClient.prototype.tryFriendRequest = function(midOrEMid, method, friendRequestParams, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_tryFriendRequest(midOrEMid, method, friendRequestParams); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_tryFriendRequest(midOrEMid, method, friendRequestParams); } }; TalkServiceClient.prototype.send_tryFriendRequest = function(midOrEMid, method, friendRequestParams) { var output = new this.pClass(this.output); output.writeMessageBegin('tryFriendRequest', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_tryFriendRequest_args(); args.midOrEMid = midOrEMid; args.method = method; args.friendRequestParams = friendRequestParams; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_tryFriendRequest = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_tryFriendRequest_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.unblockContact = function(reqSeq, id, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_unblockContact(reqSeq, id); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_unblockContact(reqSeq, id); } }; TalkServiceClient.prototype.send_unblockContact = function(reqSeq, id) { var output = new this.pClass(this.output); output.writeMessageBegin('unblockContact', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_unblockContact_args(); args.reqSeq = reqSeq; args.id = id; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_unblockContact = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_unblockContact_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.unblockRecommendation = function(reqSeq, id, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_unblockRecommendation(reqSeq, id); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_unblockRecommendation(reqSeq, id); } }; TalkServiceClient.prototype.send_unblockRecommendation = function(reqSeq, id) { var output = new this.pClass(this.output); output.writeMessageBegin('unblockRecommendation', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_unblockRecommendation_args(); args.reqSeq = reqSeq; args.id = id; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_unblockRecommendation = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_unblockRecommendation_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.unregisterUserAndDevice = function(callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_unregisterUserAndDevice(); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_unregisterUserAndDevice(); } }; TalkServiceClient.prototype.send_unregisterUserAndDevice = function() { var output = new this.pClass(this.output); output.writeMessageBegin('unregisterUserAndDevice', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_unregisterUserAndDevice_args(); args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_unregisterUserAndDevice = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_unregisterUserAndDevice_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('unregisterUserAndDevice failed: unknown result'); }; TalkServiceClient.prototype.updateApnsDeviceToken = function(apnsDeviceToken, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateApnsDeviceToken(apnsDeviceToken); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateApnsDeviceToken(apnsDeviceToken); } }; TalkServiceClient.prototype.send_updateApnsDeviceToken = function(apnsDeviceToken) { var output = new this.pClass(this.output); output.writeMessageBegin('updateApnsDeviceToken', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateApnsDeviceToken_args(); args.apnsDeviceToken = apnsDeviceToken; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateApnsDeviceToken = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateApnsDeviceToken_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateBuddySetting = function(key, value, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateBuddySetting(key, value); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateBuddySetting(key, value); } }; TalkServiceClient.prototype.send_updateBuddySetting = function(key, value) { var output = new this.pClass(this.output); output.writeMessageBegin('updateBuddySetting', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateBuddySetting_args(); args.key = key; args.value = value; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateBuddySetting = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateBuddySetting_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateC2DMRegistrationId = function(registrationId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateC2DMRegistrationId(registrationId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateC2DMRegistrationId(registrationId); } }; TalkServiceClient.prototype.send_updateC2DMRegistrationId = function(registrationId) { var output = new this.pClass(this.output); output.writeMessageBegin('updateC2DMRegistrationId', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateC2DMRegistrationId_args(); args.registrationId = registrationId; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateC2DMRegistrationId = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateC2DMRegistrationId_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateContactSetting = function(reqSeq, mid, flag, value, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateContactSetting(reqSeq, mid, flag, value); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateContactSetting(reqSeq, mid, flag, value); } }; TalkServiceClient.prototype.send_updateContactSetting = function(reqSeq, mid, flag, value) { var output = new this.pClass(this.output); output.writeMessageBegin('updateContactSetting', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateContactSetting_args(); args.reqSeq = reqSeq; args.mid = mid; args.flag = flag; args.value = value; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateContactSetting = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateContactSetting_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateCustomModeSettings = function(customMode, paramMap, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateCustomModeSettings(customMode, paramMap); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateCustomModeSettings(customMode, paramMap); } }; TalkServiceClient.prototype.send_updateCustomModeSettings = function(customMode, paramMap) { var output = new this.pClass(this.output); output.writeMessageBegin('updateCustomModeSettings', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateCustomModeSettings_args(); args.customMode = customMode; args.paramMap = paramMap; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateCustomModeSettings = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateCustomModeSettings_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateDeviceInfo = function(deviceUid, deviceInfo, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateDeviceInfo(deviceUid, deviceInfo); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateDeviceInfo(deviceUid, deviceInfo); } }; TalkServiceClient.prototype.send_updateDeviceInfo = function(deviceUid, deviceInfo) { var output = new this.pClass(this.output); output.writeMessageBegin('updateDeviceInfo', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateDeviceInfo_args(); args.deviceUid = deviceUid; args.deviceInfo = deviceInfo; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateDeviceInfo = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateDeviceInfo_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateGroup = function(reqSeq, group, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateGroup(reqSeq, group); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateGroup(reqSeq, group); } }; TalkServiceClient.prototype.send_updateGroup = function(reqSeq, group) { var output = new this.pClass(this.output); output.writeMessageBegin('updateGroup', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateGroup_args(); args.reqSeq = reqSeq; args.group = group; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateGroup = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateGroup_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateNotificationToken = function(type, token, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateNotificationToken(type, token); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateNotificationToken(type, token); } }; TalkServiceClient.prototype.send_updateNotificationToken = function(type, token) { var output = new this.pClass(this.output); output.writeMessageBegin('updateNotificationToken', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateNotificationToken_args(); args.type = type; args.token = token; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateNotificationToken = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateNotificationToken_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateNotificationTokenWithBytes = function(type, token, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateNotificationTokenWithBytes(type, token); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateNotificationTokenWithBytes(type, token); } }; TalkServiceClient.prototype.send_updateNotificationTokenWithBytes = function(type, token) { var output = new this.pClass(this.output); output.writeMessageBegin('updateNotificationTokenWithBytes', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateNotificationTokenWithBytes_args(); args.type = type; args.token = token; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateNotificationTokenWithBytes = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateNotificationTokenWithBytes_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateProfile = function(reqSeq, profile, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateProfile(reqSeq, profile); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateProfile(reqSeq, profile); } }; TalkServiceClient.prototype.send_updateProfile = function(reqSeq, profile) { var output = new this.pClass(this.output); output.writeMessageBegin('updateProfile', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateProfile_args(); args.reqSeq = reqSeq; args.profile = profile; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateProfile = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateProfile_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateProfileAttribute = function(reqSeq, attr, value, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateProfileAttribute(reqSeq, attr, value); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateProfileAttribute(reqSeq, attr, value); } }; TalkServiceClient.prototype.send_updateProfileAttribute = function(reqSeq, attr, value) { var output = new this.pClass(this.output); output.writeMessageBegin('updateProfileAttribute', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateProfileAttribute_args(); args.reqSeq = reqSeq; args.attr = attr; args.value = value; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateProfileAttribute = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateProfileAttribute_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateRegion = function(region, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateRegion(region); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateRegion(region); } }; TalkServiceClient.prototype.send_updateRegion = function(region) { var output = new this.pClass(this.output); output.writeMessageBegin('updateRegion', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateRegion_args(); args.region = region; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateRegion = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateRegion_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateSettings = function(reqSeq, settings, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateSettings(reqSeq, settings); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateSettings(reqSeq, settings); } }; TalkServiceClient.prototype.send_updateSettings = function(reqSeq, settings) { var output = new this.pClass(this.output); output.writeMessageBegin('updateSettings', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateSettings_args(); args.reqSeq = reqSeq; args.settings = settings; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateSettings = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateSettings_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateSettings2 = function(reqSeq, settings, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateSettings2(reqSeq, settings); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateSettings2(reqSeq, settings); } }; TalkServiceClient.prototype.send_updateSettings2 = function(reqSeq, settings) { var output = new this.pClass(this.output); output.writeMessageBegin('updateSettings2', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateSettings2_args(); args.reqSeq = reqSeq; args.settings = settings; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateSettings2 = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateSettings2_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('updateSettings2 failed: unknown result'); }; TalkServiceClient.prototype.updateSettingsAttribute = function(reqSeq, attr, value, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateSettingsAttribute(reqSeq, attr, value); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateSettingsAttribute(reqSeq, attr, value); } }; TalkServiceClient.prototype.send_updateSettingsAttribute = function(reqSeq, attr, value) { var output = new this.pClass(this.output); output.writeMessageBegin('updateSettingsAttribute', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateSettingsAttribute_args(); args.reqSeq = reqSeq; args.attr = attr; args.value = value; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateSettingsAttribute = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateSettingsAttribute_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.updateSettingsAttributes = function(reqSeq, attrBitset, settings, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_updateSettingsAttributes(reqSeq, attrBitset, settings); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_updateSettingsAttributes(reqSeq, attrBitset, settings); } }; TalkServiceClient.prototype.send_updateSettingsAttributes = function(reqSeq, attrBitset, settings) { var output = new this.pClass(this.output); output.writeMessageBegin('updateSettingsAttributes', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_updateSettingsAttributes_args(); args.reqSeq = reqSeq; args.attrBitset = attrBitset; args.settings = settings; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_updateSettingsAttributes = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_updateSettingsAttributes_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('updateSettingsAttributes failed: unknown result'); }; TalkServiceClient.prototype.verifyIdentityCredential = function(identityProvider, identifier, password, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_verifyIdentityCredential(identityProvider, identifier, password); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_verifyIdentityCredential(identityProvider, identifier, password); } }; TalkServiceClient.prototype.send_verifyIdentityCredential = function(identityProvider, identifier, password) { var output = new this.pClass(this.output); output.writeMessageBegin('verifyIdentityCredential', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_verifyIdentityCredential_args(); args.identityProvider = identityProvider; args.identifier = identifier; args.password = password; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_verifyIdentityCredential = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_verifyIdentityCredential_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } callback(null); }; TalkServiceClient.prototype.verifyIdentityCredentialWithResult = function(identityCredential, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_verifyIdentityCredentialWithResult(identityCredential); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_verifyIdentityCredentialWithResult(identityCredential); } }; TalkServiceClient.prototype.send_verifyIdentityCredentialWithResult = function(identityCredential) { var output = new this.pClass(this.output); output.writeMessageBegin('verifyIdentityCredentialWithResult', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_verifyIdentityCredentialWithResult_args(); args.identityCredential = identityCredential; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_verifyIdentityCredentialWithResult = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_verifyIdentityCredentialWithResult_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('verifyIdentityCredentialWithResult failed: unknown result'); }; TalkServiceClient.prototype.verifyPhone = function(sessionId, pinCode, udidHash, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_verifyPhone(sessionId, pinCode, udidHash); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_verifyPhone(sessionId, pinCode, udidHash); } }; TalkServiceClient.prototype.send_verifyPhone = function(sessionId, pinCode, udidHash) { var output = new this.pClass(this.output); output.writeMessageBegin('verifyPhone', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_verifyPhone_args(); args.sessionId = sessionId; args.pinCode = pinCode; args.udidHash = udidHash; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_verifyPhone = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_verifyPhone_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('verifyPhone failed: unknown result'); }; TalkServiceClient.prototype.verifyQrcode = function(verifier, pinCode, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { var _defer = Q.defer(); this._reqs[this.seqid()] = function(error, result) { if (error) { _defer.reject(error); } else { _defer.resolve(result); } }; this.send_verifyQrcode(verifier, pinCode); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_verifyQrcode(verifier, pinCode); } }; TalkServiceClient.prototype.send_verifyQrcode = function(verifier, pinCode) { var output = new this.pClass(this.output); output.writeMessageBegin('verifyQrcode', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_verifyQrcode_args(); args.verifier = verifier; args.pinCode = pinCode; args.write(output); output.writeMessageEnd(); return this.output.flush(); }; TalkServiceClient.prototype.recv_verifyQrcode = function(input,mtype,rseqid) { var callback = this._reqs[rseqid] || function() {}; delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(input); input.readMessageEnd(); return callback(x); } var result = new TalkService_verifyQrcode_result(); result.read(input); input.readMessageEnd(); if (null !== result.e) { return callback(result.e); } if (null !== result.success) { return callback(null, result.success); } return callback('verifyQrcode failed: unknown result'); }; var TalkServiceProcessor = exports.Processor = function(handler) { this._handler = handler; } ; TalkServiceProcessor.prototype.process = function(input, output) { var r = input.readMessageBegin(); if (this['process_' + r.fname]) { return this['process_' + r.fname].call(this, r.rseqid, input, output); } else { input.skip(Thrift.Type.STRUCT); input.readMessageEnd(); var x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname); output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid); x.write(output); output.writeMessageEnd(); output.flush(); } } ; TalkServiceProcessor.prototype.process_getChatRoomAnnouncementsBulk = function(seqid, input, output) { var args = new TalkService_getChatRoomAnnouncementsBulk_args(); args.read(input); input.readMessageEnd(); if (this._handler.getChatRoomAnnouncementsBulk.length === 1) { Q.fcall(this._handler.getChatRoomAnnouncementsBulk, args.chatRoomMids) .then(function(result) { var result_obj = new TalkService_getChatRoomAnnouncementsBulk_result({success: result}); output.writeMessageBegin("getChatRoomAnnouncementsBulk", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getChatRoomAnnouncementsBulk_result(err); output.writeMessageBegin("getChatRoomAnnouncementsBulk", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getChatRoomAnnouncementsBulk", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getChatRoomAnnouncementsBulk(args.chatRoomMids, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getChatRoomAnnouncementsBulk_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getChatRoomAnnouncementsBulk", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getChatRoomAnnouncementsBulk", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getChatRoomAnnouncements = function(seqid, input, output) { var args = new TalkService_getChatRoomAnnouncements_args(); args.read(input); input.readMessageEnd(); if (this._handler.getChatRoomAnnouncements.length === 1) { Q.fcall(this._handler.getChatRoomAnnouncements, args.chatRoomMid) .then(function(result) { var result_obj = new TalkService_getChatRoomAnnouncements_result({success: result}); output.writeMessageBegin("getChatRoomAnnouncements", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getChatRoomAnnouncements_result(err); output.writeMessageBegin("getChatRoomAnnouncements", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getChatRoomAnnouncements", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getChatRoomAnnouncements(args.chatRoomMid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getChatRoomAnnouncements_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getChatRoomAnnouncements", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getChatRoomAnnouncements", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_createChatRoomAnnouncement = function(seqid, input, output) { var args = new TalkService_createChatRoomAnnouncement_args(); args.read(input); input.readMessageEnd(); if (this._handler.createChatRoomAnnouncement.length === 4) { Q.fcall(this._handler.createChatRoomAnnouncement, args.reqSeq, args.chatRoomMid, args.type, args.contents) .then(function(result) { var result_obj = new TalkService_createChatRoomAnnouncement_result({success: result}); output.writeMessageBegin("createChatRoomAnnouncement", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_createChatRoomAnnouncement_result(err); output.writeMessageBegin("createChatRoomAnnouncement", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createChatRoomAnnouncement", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.createChatRoomAnnouncement(args.reqSeq, args.chatRoomMid, args.type, args.contents, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_createChatRoomAnnouncement_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("createChatRoomAnnouncement", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createChatRoomAnnouncement", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_removeChatRoomAnnouncement = function(seqid, input, output) { var args = new TalkService_removeChatRoomAnnouncement_args(); args.read(input); input.readMessageEnd(); if (this._handler.removeChatRoomAnnouncement.length === 3) { Q.fcall(this._handler.removeChatRoomAnnouncement, args.reqSeq, args.chatRoomMid, args.announcementSeq) .then(function(result) { var result_obj = new TalkService_removeChatRoomAnnouncement_result({success: result}); output.writeMessageBegin("removeChatRoomAnnouncement", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_removeChatRoomAnnouncement_result(err); output.writeMessageBegin("removeChatRoomAnnouncement", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeChatRoomAnnouncement", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeChatRoomAnnouncement(args.reqSeq, args.chatRoomMid, args.announcementSeq, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_removeChatRoomAnnouncement_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("removeChatRoomAnnouncement", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeChatRoomAnnouncement", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_unsendMessage = function(seqid, input, output) { var args = new TalkService_unsendMessage_args(); args.read(input); input.readMessageEnd(); if (this._handler.unsendMessage.length === 2) { Q.fcall(this._handler.unsendMessage, args.seq, args.messageId) .then(function(result) { var result_obj = new TalkService_unsendMessage_result({success: result}); output.writeMessageBegin("unsendMessage", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_unsendMessage_result(err); output.writeMessageBegin("unsendMessage", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("unsendMessage", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.unsendMessage(args.seq, args.messageId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_unsendMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("unsendMessage", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("unsendMessage", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getGroupWithoutMembers = function(seqid, input, output) { var args = new TalkService_getGroupWithoutMembers_args(); args.read(input); input.readMessageEnd(); if (this._handler.getGroupWithoutMembers.length === 1) { Q.fcall(this._handler.getGroupWithoutMembers, args.groupId) .then(function(result) { var result_obj = new TalkService_getGroupWithoutMembers_result({success: result}); output.writeMessageBegin("getGroupWithoutMembers", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getGroupWithoutMembers_result(err); output.writeMessageBegin("getGroupWithoutMembers", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroupWithoutMembers", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getGroupWithoutMembers(args.groupId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getGroupWithoutMembers_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getGroupWithoutMembers", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroupWithoutMembers", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_requestResendMessage = function(seqid, input, output) { var args = new TalkService_requestResendMessage_args(); args.read(input); input.readMessageEnd(); if (this._handler.requestResendMessage.length === 3) { Q.fcall(this._handler.requestResendMessage, args.reqSeq, args.senderMid, args.messageId) .then(function(result) { var result_obj = new TalkService_requestResendMessage_result({success: result}); output.writeMessageBegin("requestResendMessage", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_requestResendMessage_result(err); output.writeMessageBegin("requestResendMessage", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("requestResendMessage", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.requestResendMessage(args.reqSeq, args.senderMid, args.messageId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_requestResendMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("requestResendMessage", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("requestResendMessage", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_respondResendMessage = function(seqid, input, output) { var args = new TalkService_respondResendMessage_args(); args.read(input); input.readMessageEnd(); if (this._handler.respondResendMessage.length === 5) { Q.fcall(this._handler.respondResendMessage, args.reqSeq, args.receiverMid, args.originalMessageId, args.resendMessage, args.errorCode) .then(function(result) { var result_obj = new TalkService_respondResendMessage_result({success: result}); output.writeMessageBegin("respondResendMessage", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_respondResendMessage_result(err); output.writeMessageBegin("respondResendMessage", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("respondResendMessage", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.respondResendMessage(args.reqSeq, args.receiverMid, args.originalMessageId, args.resendMessage, args.errorCode, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_respondResendMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("respondResendMessage", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("respondResendMessage", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_acceptGroupInvitation = function(seqid, input, output) { var args = new TalkService_acceptGroupInvitation_args(); args.read(input); input.readMessageEnd(); if (this._handler.acceptGroupInvitation.length === 2) { Q.fcall(this._handler.acceptGroupInvitation, args.reqSeq, args.groupId) .then(function(result) { var result_obj = new TalkService_acceptGroupInvitation_result({success: result}); output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_acceptGroupInvitation_result(err); output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acceptGroupInvitation(args.reqSeq, args.groupId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_acceptGroupInvitation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_acceptGroupInvitationByTicket = function(seqid, input, output) { var args = new TalkService_acceptGroupInvitationByTicket_args(); args.read(input); input.readMessageEnd(); if (this._handler.acceptGroupInvitationByTicket.length === 3) { Q.fcall(this._handler.acceptGroupInvitationByTicket, args.reqSeq, args.GroupMid, args.ticketId) .then(function(result) { var result_obj = new TalkService_acceptGroupInvitationByTicket_result({success: result}); output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_acceptGroupInvitationByTicket_result(err); output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acceptGroupInvitationByTicket(args.reqSeq, args.GroupMid, args.ticketId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_acceptGroupInvitationByTicket_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_acceptProximityMatches = function(seqid, input, output) { var args = new TalkService_acceptProximityMatches_args(); args.read(input); input.readMessageEnd(); if (this._handler.acceptProximityMatches.length === 2) { Q.fcall(this._handler.acceptProximityMatches, args.sessionId, args.ids) .then(function(result) { var result_obj = new TalkService_acceptProximityMatches_result({success: result}); output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_acceptProximityMatches_result(err); output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acceptProximityMatches(args.sessionId, args.ids, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_acceptProximityMatches_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_acquireCallRoute = function(seqid, input, output) { var args = new TalkService_acquireCallRoute_args(); args.read(input); input.readMessageEnd(); if (this._handler.acquireCallRoute.length === 1) { Q.fcall(this._handler.acquireCallRoute, args.to) .then(function(result) { var result_obj = new TalkService_acquireCallRoute_result({success: result}); output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_acquireCallRoute_result(err); output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acquireCallRoute(args.to, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_acquireCallRoute_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_acquireCallTicket = function(seqid, input, output) { var args = new TalkService_acquireCallTicket_args(); args.read(input); input.readMessageEnd(); if (this._handler.acquireCallTicket.length === 1) { Q.fcall(this._handler.acquireCallTicket, args.to) .then(function(result) { var result_obj = new TalkService_acquireCallTicket_result({success: result}); output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_acquireCallTicket_result(err); output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acquireCallTicket(args.to, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_acquireCallTicket_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_acquireEncryptedAccessToken = function(seqid, input, output) { var args = new TalkService_acquireEncryptedAccessToken_args(); args.read(input); input.readMessageEnd(); if (this._handler.acquireEncryptedAccessToken.length === 1) { Q.fcall(this._handler.acquireEncryptedAccessToken, args.featureType) .then(function(result) { var result_obj = new TalkService_acquireEncryptedAccessToken_result({success: result}); output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_acquireEncryptedAccessToken_result(err); output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acquireEncryptedAccessToken(args.featureType, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_acquireEncryptedAccessToken_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_addSnsId = function(seqid, input, output) { var args = new TalkService_addSnsId_args(); args.read(input); input.readMessageEnd(); if (this._handler.addSnsId.length === 2) { Q.fcall(this._handler.addSnsId, args.snsIdType, args.snsAccessToken) .then(function(result) { var result_obj = new TalkService_addSnsId_result({success: result}); output.writeMessageBegin("addSnsId", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_addSnsId_result(err); output.writeMessageBegin("addSnsId", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("addSnsId", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.addSnsId(args.snsIdType, args.snsAccessToken, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_addSnsId_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("addSnsId", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("addSnsId", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_blockContact = function(seqid, input, output) { var args = new TalkService_blockContact_args(); args.read(input); input.readMessageEnd(); if (this._handler.blockContact.length === 2) { Q.fcall(this._handler.blockContact, args.reqSeq, args.id) .then(function(result) { var result_obj = new TalkService_blockContact_result({success: result}); output.writeMessageBegin("blockContact", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_blockContact_result(err); output.writeMessageBegin("blockContact", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("blockContact", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.blockContact(args.reqSeq, args.id, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_blockContact_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("blockContact", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("blockContact", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_blockRecommendation = function(seqid, input, output) { var args = new TalkService_blockRecommendation_args(); args.read(input); input.readMessageEnd(); if (this._handler.blockRecommendation.length === 2) { Q.fcall(this._handler.blockRecommendation, args.reqSeq, args.id) .then(function(result) { var result_obj = new TalkService_blockRecommendation_result({success: result}); output.writeMessageBegin("blockRecommendation", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_blockRecommendation_result(err); output.writeMessageBegin("blockRecommendation", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("blockRecommendation", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.blockRecommendation(args.reqSeq, args.id, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_blockRecommendation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("blockRecommendation", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("blockRecommendation", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_cancelGroupInvitation = function(seqid, input, output) { var args = new TalkService_cancelGroupInvitation_args(); args.read(input); input.readMessageEnd(); if (this._handler.cancelGroupInvitation.length === 3) { Q.fcall(this._handler.cancelGroupInvitation, args.reqSeq, args.groupId, args.contactIds) .then(function(result) { var result_obj = new TalkService_cancelGroupInvitation_result({success: result}); output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_cancelGroupInvitation_result(err); output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.cancelGroupInvitation(args.reqSeq, args.groupId, args.contactIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_cancelGroupInvitation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_changeVerificationMethod = function(seqid, input, output) { var args = new TalkService_changeVerificationMethod_args(); args.read(input); input.readMessageEnd(); if (this._handler.changeVerificationMethod.length === 2) { Q.fcall(this._handler.changeVerificationMethod, args.sessionId, args.method) .then(function(result) { var result_obj = new TalkService_changeVerificationMethod_result({success: result}); output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_changeVerificationMethod_result(err); output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.changeVerificationMethod(args.sessionId, args.method, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_changeVerificationMethod_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_clearIdentityCredential = function(seqid, input, output) { var args = new TalkService_clearIdentityCredential_args(); args.read(input); input.readMessageEnd(); if (this._handler.clearIdentityCredential.length === 0) { Q.fcall(this._handler.clearIdentityCredential) .then(function(result) { var result_obj = new TalkService_clearIdentityCredential_result({success: result}); output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_clearIdentityCredential_result(err); output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.clearIdentityCredential(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_clearIdentityCredential_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_clearMessageBox = function(seqid, input, output) { var args = new TalkService_clearMessageBox_args(); args.read(input); input.readMessageEnd(); if (this._handler.clearMessageBox.length === 2) { Q.fcall(this._handler.clearMessageBox, args.channelId, args.messageBoxId) .then(function(result) { var result_obj = new TalkService_clearMessageBox_result({success: result}); output.writeMessageBegin("clearMessageBox", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_clearMessageBox_result(err); output.writeMessageBegin("clearMessageBox", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("clearMessageBox", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.clearMessageBox(args.channelId, args.messageBoxId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_clearMessageBox_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("clearMessageBox", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("clearMessageBox", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_closeProximityMatch = function(seqid, input, output) { var args = new TalkService_closeProximityMatch_args(); args.read(input); input.readMessageEnd(); if (this._handler.closeProximityMatch.length === 1) { Q.fcall(this._handler.closeProximityMatch, args.sessionId) .then(function(result) { var result_obj = new TalkService_closeProximityMatch_result({success: result}); output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_closeProximityMatch_result(err); output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.closeProximityMatch(args.sessionId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_closeProximityMatch_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_commitSendMessage = function(seqid, input, output) { var args = new TalkService_commitSendMessage_args(); args.read(input); input.readMessageEnd(); if (this._handler.commitSendMessage.length === 3) { Q.fcall(this._handler.commitSendMessage, args.seq, args.messageId, args.receiverMids) .then(function(result) { var result_obj = new TalkService_commitSendMessage_result({success: result}); output.writeMessageBegin("commitSendMessage", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_commitSendMessage_result(err); output.writeMessageBegin("commitSendMessage", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("commitSendMessage", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.commitSendMessage(args.seq, args.messageId, args.receiverMids, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_commitSendMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("commitSendMessage", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("commitSendMessage", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_commitSendMessages = function(seqid, input, output) { var args = new TalkService_commitSendMessages_args(); args.read(input); input.readMessageEnd(); if (this._handler.commitSendMessages.length === 3) { Q.fcall(this._handler.commitSendMessages, args.seq, args.messageIds, args.receiverMids) .then(function(result) { var result_obj = new TalkService_commitSendMessages_result({success: result}); output.writeMessageBegin("commitSendMessages", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_commitSendMessages_result(err); output.writeMessageBegin("commitSendMessages", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("commitSendMessages", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.commitSendMessages(args.seq, args.messageIds, args.receiverMids, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_commitSendMessages_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("commitSendMessages", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("commitSendMessages", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_commitUpdateProfile = function(seqid, input, output) { var args = new TalkService_commitUpdateProfile_args(); args.read(input); input.readMessageEnd(); if (this._handler.commitUpdateProfile.length === 3) { Q.fcall(this._handler.commitUpdateProfile, args.seq, args.attrs, args.receiverMids) .then(function(result) { var result_obj = new TalkService_commitUpdateProfile_result({success: result}); output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_commitUpdateProfile_result(err); output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.commitUpdateProfile(args.seq, args.attrs, args.receiverMids, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_commitUpdateProfile_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_confirmEmail = function(seqid, input, output) { var args = new TalkService_confirmEmail_args(); args.read(input); input.readMessageEnd(); if (this._handler.confirmEmail.length === 2) { Q.fcall(this._handler.confirmEmail, args.verifier, args.pinCode) .then(function(result) { var result_obj = new TalkService_confirmEmail_result({success: result}); output.writeMessageBegin("confirmEmail", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_confirmEmail_result(err); output.writeMessageBegin("confirmEmail", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("confirmEmail", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.confirmEmail(args.verifier, args.pinCode, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_confirmEmail_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("confirmEmail", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("confirmEmail", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_createGroup = function(seqid, input, output) { var args = new TalkService_createGroup_args(); args.read(input); input.readMessageEnd(); if (this._handler.createGroup.length === 3) { Q.fcall(this._handler.createGroup, args.seq, args.name, args.contactIds) .then(function(result) { var result_obj = new TalkService_createGroup_result({success: result}); output.writeMessageBegin("createGroup", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_createGroup_result(err); output.writeMessageBegin("createGroup", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createGroup", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.createGroup(args.seq, args.name, args.contactIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_createGroup_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("createGroup", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createGroup", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_createQrcodeBase64Image = function(seqid, input, output) { var args = new TalkService_createQrcodeBase64Image_args(); args.read(input); input.readMessageEnd(); if (this._handler.createQrcodeBase64Image.length === 7) { Q.fcall(this._handler.createQrcodeBase64Image, args.url, args.characterSet, args.imageSize, args.x, args.y, args.width, args.height) .then(function(result) { var result_obj = new TalkService_createQrcodeBase64Image_result({success: result}); output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_createQrcodeBase64Image_result(err); output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.createQrcodeBase64Image(args.url, args.characterSet, args.imageSize, args.x, args.y, args.width, args.height, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_createQrcodeBase64Image_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_createRoom = function(seqid, input, output) { var args = new TalkService_createRoom_args(); args.read(input); input.readMessageEnd(); if (this._handler.createRoom.length === 2) { Q.fcall(this._handler.createRoom, args.reqSeq, args.contactIds) .then(function(result) { var result_obj = new TalkService_createRoom_result({success: result}); output.writeMessageBegin("createRoom", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_createRoom_result(err); output.writeMessageBegin("createRoom", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createRoom", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.createRoom(args.reqSeq, args.contactIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_createRoom_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("createRoom", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createRoom", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_createSession = function(seqid, input, output) { var args = new TalkService_createSession_args(); args.read(input); input.readMessageEnd(); if (this._handler.createSession.length === 0) { Q.fcall(this._handler.createSession) .then(function(result) { var result_obj = new TalkService_createSession_result({success: result}); output.writeMessageBegin("createSession", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_createSession_result(err); output.writeMessageBegin("createSession", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createSession", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.createSession(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_createSession_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("createSession", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createSession", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_fetchAnnouncements = function(seqid, input, output) { var args = new TalkService_fetchAnnouncements_args(); args.read(input); input.readMessageEnd(); if (this._handler.fetchAnnouncements.length === 1) { Q.fcall(this._handler.fetchAnnouncements, args.lastFetchedIndex) .then(function(result) { var result_obj = new TalkService_fetchAnnouncements_result({success: result}); output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_fetchAnnouncements_result(err); output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.fetchAnnouncements(args.lastFetchedIndex, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_fetchAnnouncements_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_fetchMessages = function(seqid, input, output) { var args = new TalkService_fetchMessages_args(); args.read(input); input.readMessageEnd(); if (this._handler.fetchMessages.length === 2) { Q.fcall(this._handler.fetchMessages, args.localTs, args.count) .then(function(result) { var result_obj = new TalkService_fetchMessages_result({success: result}); output.writeMessageBegin("fetchMessages", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_fetchMessages_result(err); output.writeMessageBegin("fetchMessages", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("fetchMessages", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.fetchMessages(args.localTs, args.count, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_fetchMessages_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("fetchMessages", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("fetchMessages", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_fetchOperations = function(seqid, input, output) { var args = new TalkService_fetchOperations_args(); args.read(input); input.readMessageEnd(); if (this._handler.fetchOperations.length === 2) { Q.fcall(this._handler.fetchOperations, args.localRev, args.count) .then(function(result) { var result_obj = new TalkService_fetchOperations_result({success: result}); output.writeMessageBegin("fetchOperations", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.ShouldSyncException) { result = new TalkService_fetchOperations_result(err); output.writeMessageBegin("fetchOperations", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("fetchOperations", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.fetchOperations(args.localRev, args.count, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.ShouldSyncException) { result_obj = new TalkService_fetchOperations_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("fetchOperations", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("fetchOperations", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_fetchOps = function(seqid, input, output) { var args = new TalkService_fetchOps_args(); args.read(input); input.readMessageEnd(); if (this._handler.fetchOps.length === 4) { Q.fcall(this._handler.fetchOps, args.localRev, args.count, args.globalRev, args.individualRev) .then(function(result) { var result_obj = new TalkService_fetchOps_result({success: result}); output.writeMessageBegin("fetchOps", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.ShouldSyncException) { result = new TalkService_fetchOps_result(err); output.writeMessageBegin("fetchOps", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("fetchOps", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.fetchOps(args.localRev, args.count, args.globalRev, args.individualRev, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.ShouldSyncException) { result_obj = new TalkService_fetchOps_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("fetchOps", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("fetchOps", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findAndAddContactsByEmail = function(seqid, input, output) { var args = new TalkService_findAndAddContactsByEmail_args(); args.read(input); input.readMessageEnd(); if (this._handler.findAndAddContactsByEmail.length === 2) { Q.fcall(this._handler.findAndAddContactsByEmail, args.reqSeq, args.emails) .then(function(result) { var result_obj = new TalkService_findAndAddContactsByEmail_result({success: result}); output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findAndAddContactsByEmail_result(err); output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findAndAddContactsByEmail(args.reqSeq, args.emails, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findAndAddContactsByEmail_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findAndAddContactsByMid = function(seqid, input, output) { var args = new TalkService_findAndAddContactsByMid_args(); args.read(input); input.readMessageEnd(); if (this._handler.findAndAddContactsByMid.length === 4) { Q.fcall(this._handler.findAndAddContactsByMid, args.reqSeq, args.mid, args.type, args.reference) .then(function(result) { var result_obj = new TalkService_findAndAddContactsByMid_result({success: result}); output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findAndAddContactsByMid_result(err); output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findAndAddContactsByMid(args.reqSeq, args.mid, args.type, args.reference, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findAndAddContactsByMid_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findGroupByTicketV2 = function(seqid, input, output) { var args = new TalkService_findGroupByTicketV2_args(); args.read(input); input.readMessageEnd(); if (this._handler.findGroupByTicketV2.length === 1) { Q.fcall(this._handler.findGroupByTicketV2, args.ticketId) .then(function(result) { var result_obj = new TalkService_findGroupByTicketV2_result({success: result}); output.writeMessageBegin("findGroupByTicketV2", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findGroupByTicketV2_result(err); output.writeMessageBegin("findGroupByTicketV2", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findGroupByTicketV2", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findGroupByTicketV2(args.ticketId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findGroupByTicketV2_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findGroupByTicketV2", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findGroupByTicketV2", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findAndAddContactsByPhone = function(seqid, input, output) { var args = new TalkService_findAndAddContactsByPhone_args(); args.read(input); input.readMessageEnd(); if (this._handler.findAndAddContactsByPhone.length === 2) { Q.fcall(this._handler.findAndAddContactsByPhone, args.reqSeq, args.phones) .then(function(result) { var result_obj = new TalkService_findAndAddContactsByPhone_result({success: result}); output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findAndAddContactsByPhone_result(err); output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findAndAddContactsByPhone(args.reqSeq, args.phones, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findAndAddContactsByPhone_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getFriendRequests = function(seqid, input, output) { var args = new TalkService_getFriendRequests_args(); args.read(input); input.readMessageEnd(); if (this._handler.getFriendRequests.length === 2) { Q.fcall(this._handler.getFriendRequests, args.direction, args.lastSeenSeqId) .then(function(result) { var result_obj = new TalkService_getFriendRequests_result({success: result}); output.writeMessageBegin("getFriendRequests", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getFriendRequests_result(err); output.writeMessageBegin("getFriendRequests", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getFriendRequests", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getFriendRequests(args.direction, args.lastSeenSeqId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getFriendRequests_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getFriendRequests", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getFriendRequests", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_removeFriendRequest = function(seqid, input, output) { var args = new TalkService_removeFriendRequest_args(); args.read(input); input.readMessageEnd(); if (this._handler.removeFriendRequest.length === 2) { Q.fcall(this._handler.removeFriendRequest, args.direction, args.midOrEMid) .then(function(result) { var result_obj = new TalkService_removeFriendRequest_result({success: result}); output.writeMessageBegin("removeFriendRequest", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_removeFriendRequest_result(err); output.writeMessageBegin("removeFriendRequest", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeFriendRequest", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeFriendRequest(args.direction, args.midOrEMid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_removeFriendRequest_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("removeFriendRequest", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeFriendRequest", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findAndAddContactsByUserid = function(seqid, input, output) { var args = new TalkService_findAndAddContactsByUserid_args(); args.read(input); input.readMessageEnd(); if (this._handler.findAndAddContactsByUserid.length === 2) { Q.fcall(this._handler.findAndAddContactsByUserid, args.reqSeq, args.userid) .then(function(result) { var result_obj = new TalkService_findAndAddContactsByUserid_result({success: result}); output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findAndAddContactsByUserid_result(err); output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findAndAddContactsByUserid(args.reqSeq, args.userid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findAndAddContactsByUserid_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findContactByUserid = function(seqid, input, output) { var args = new TalkService_findContactByUserid_args(); args.read(input); input.readMessageEnd(); if (this._handler.findContactByUserid.length === 1) { Q.fcall(this._handler.findContactByUserid, args.userid) .then(function(result) { var result_obj = new TalkService_findContactByUserid_result({success: result}); output.writeMessageBegin("findContactByUserid", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findContactByUserid_result(err); output.writeMessageBegin("findContactByUserid", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findContactByUserid", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findContactByUserid(args.userid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findContactByUserid_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findContactByUserid", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findContactByUserid", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findContactByUserTicket = function(seqid, input, output) { var args = new TalkService_findContactByUserTicket_args(); args.read(input); input.readMessageEnd(); if (this._handler.findContactByUserTicket.length === 1) { Q.fcall(this._handler.findContactByUserTicket, args.ticketIdWithTag) .then(function(result) { var result_obj = new TalkService_findContactByUserTicket_result({success: result}); output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findContactByUserTicket_result(err); output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findContactByUserTicket(args.ticketIdWithTag, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findContactByUserTicket_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findContactsByEmail = function(seqid, input, output) { var args = new TalkService_findContactsByEmail_args(); args.read(input); input.readMessageEnd(); if (this._handler.findContactsByEmail.length === 1) { Q.fcall(this._handler.findContactsByEmail, args.emails) .then(function(result) { var result_obj = new TalkService_findContactsByEmail_result({success: result}); output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findContactsByEmail_result(err); output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findContactsByEmail(args.emails, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findContactsByEmail_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findContactsByPhone = function(seqid, input, output) { var args = new TalkService_findContactsByPhone_args(); args.read(input); input.readMessageEnd(); if (this._handler.findContactsByPhone.length === 1) { Q.fcall(this._handler.findContactsByPhone, args.phones) .then(function(result) { var result_obj = new TalkService_findContactsByPhone_result({success: result}); output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findContactsByPhone_result(err); output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findContactsByPhone(args.phones, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findContactsByPhone_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findSnsIdUserStatus = function(seqid, input, output) { var args = new TalkService_findSnsIdUserStatus_args(); args.read(input); input.readMessageEnd(); if (this._handler.findSnsIdUserStatus.length === 3) { Q.fcall(this._handler.findSnsIdUserStatus, args.snsIdType, args.snsAccessToken, args.udidHash) .then(function(result) { var result_obj = new TalkService_findSnsIdUserStatus_result({success: result}); output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findSnsIdUserStatus_result(err); output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findSnsIdUserStatus(args.snsIdType, args.snsAccessToken, args.udidHash, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findSnsIdUserStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_finishUpdateVerification = function(seqid, input, output) { var args = new TalkService_finishUpdateVerification_args(); args.read(input); input.readMessageEnd(); if (this._handler.finishUpdateVerification.length === 1) { Q.fcall(this._handler.finishUpdateVerification, args.sessionId) .then(function(result) { var result_obj = new TalkService_finishUpdateVerification_result({success: result}); output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_finishUpdateVerification_result(err); output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.finishUpdateVerification(args.sessionId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_finishUpdateVerification_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_generateUserTicket = function(seqid, input, output) { var args = new TalkService_generateUserTicket_args(); args.read(input); input.readMessageEnd(); if (this._handler.generateUserTicket.length === 2) { Q.fcall(this._handler.generateUserTicket, args.expirationTime, args.maxUseCount) .then(function(result) { var result_obj = new TalkService_generateUserTicket_result({success: result}); output.writeMessageBegin("generateUserTicket", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_generateUserTicket_result(err); output.writeMessageBegin("generateUserTicket", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("generateUserTicket", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.generateUserTicket(args.expirationTime, args.maxUseCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_generateUserTicket_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("generateUserTicket", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("generateUserTicket", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_destroyMessage = function(seqid, input, output) { var args = new TalkService_destroyMessage_args(); args.read(input); input.readMessageEnd(); if (this._handler.destroyMessage.length === 4) { Q.fcall(this._handler.destroyMessage, args.seq, args.chatId, args.messageId, args.sessionId) .then(function(result) { var result_obj = new TalkService_destroyMessage_result({success: result}); output.writeMessageBegin("destroyMessage", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_destroyMessage_result(err); output.writeMessageBegin("destroyMessage", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("destroyMessage", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.destroyMessage(args.seq, args.chatId, args.messageId, args.sessionId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_destroyMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("destroyMessage", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("destroyMessage", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getAcceptedProximityMatches = function(seqid, input, output) { var args = new TalkService_getAcceptedProximityMatches_args(); args.read(input); input.readMessageEnd(); if (this._handler.getAcceptedProximityMatches.length === 1) { Q.fcall(this._handler.getAcceptedProximityMatches, args.sessionId) .then(function(result) { var result_obj = new TalkService_getAcceptedProximityMatches_result({success: result}); output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getAcceptedProximityMatches_result(err); output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getAcceptedProximityMatches(args.sessionId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getAcceptedProximityMatches_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getActiveBuddySubscriberIds = function(seqid, input, output) { var args = new TalkService_getActiveBuddySubscriberIds_args(); args.read(input); input.readMessageEnd(); if (this._handler.getActiveBuddySubscriberIds.length === 0) { Q.fcall(this._handler.getActiveBuddySubscriberIds) .then(function(result) { var result_obj = new TalkService_getActiveBuddySubscriberIds_result({success: result}); output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getActiveBuddySubscriberIds_result(err); output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getActiveBuddySubscriberIds(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getActiveBuddySubscriberIds_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getAllContactIds = function(seqid, input, output) { var args = new TalkService_getAllContactIds_args(); args.read(input); input.readMessageEnd(); if (this._handler.getAllContactIds.length === 0) { Q.fcall(this._handler.getAllContactIds) .then(function(result) { var result_obj = new TalkService_getAllContactIds_result({success: result}); output.writeMessageBegin("getAllContactIds", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getAllContactIds_result(err); output.writeMessageBegin("getAllContactIds", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getAllContactIds", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getAllContactIds(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getAllContactIds_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getAllContactIds", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getAllContactIds", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getAuthQrcode = function(seqid, input, output) { var args = new TalkService_getAuthQrcode_args(); args.read(input); input.readMessageEnd(); if (this._handler.getAuthQrcode.length === 2) { Q.fcall(this._handler.getAuthQrcode, args.keepLoggedIn, args.systemName) .then(function(result) { var result_obj = new TalkService_getAuthQrcode_result({success: result}); output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getAuthQrcode_result(err); output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getAuthQrcode(args.keepLoggedIn, args.systemName, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getAuthQrcode_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getBlockedContactIds = function(seqid, input, output) { var args = new TalkService_getBlockedContactIds_args(); args.read(input); input.readMessageEnd(); if (this._handler.getBlockedContactIds.length === 0) { Q.fcall(this._handler.getBlockedContactIds) .then(function(result) { var result_obj = new TalkService_getBlockedContactIds_result({success: result}); output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getBlockedContactIds_result(err); output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getBlockedContactIds(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getBlockedContactIds_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerWithPhoneNumber = function(seqid, input, output) { var args = new TalkService_registerWithPhoneNumber_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerWithPhoneNumber.length === 2) { Q.fcall(this._handler.registerWithPhoneNumber, args.sessionId, args.migrationPincodeSessionId) .then(function(result) { var result_obj = new TalkService_registerWithPhoneNumber_result({success: result}); output.writeMessageBegin("registerWithPhoneNumber", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerWithPhoneNumber_result(err); output.writeMessageBegin("registerWithPhoneNumber", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWithPhoneNumber", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerWithPhoneNumber(args.sessionId, args.migrationPincodeSessionId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerWithPhoneNumber_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerWithPhoneNumber", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWithPhoneNumber", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerWithPhoneNumberAndPassword = function(seqid, input, output) { var args = new TalkService_registerWithPhoneNumberAndPassword_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerWithPhoneNumberAndPassword.length === 3) { Q.fcall(this._handler.registerWithPhoneNumberAndPassword, args.sessionId, args.keynm, args.encrypted) .then(function(result) { var result_obj = new TalkService_registerWithPhoneNumberAndPassword_result({success: result}); output.writeMessageBegin("registerWithPhoneNumberAndPassword", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerWithPhoneNumberAndPassword_result(err); output.writeMessageBegin("registerWithPhoneNumberAndPassword", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWithPhoneNumberAndPassword", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerWithPhoneNumberAndPassword(args.sessionId, args.keynm, args.encrypted, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerWithPhoneNumberAndPassword_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerWithPhoneNumberAndPassword", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWithPhoneNumberAndPassword", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getAnalyticsInfo = function(seqid, input, output) { var args = new TalkService_getAnalyticsInfo_args(); args.read(input); input.readMessageEnd(); if (this._handler.getAnalyticsInfo.length === 0) { Q.fcall(this._handler.getAnalyticsInfo) .then(function(result) { var result_obj = new TalkService_getAnalyticsInfo_result({success: result}); output.writeMessageBegin("getAnalyticsInfo", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getAnalyticsInfo_result(err); output.writeMessageBegin("getAnalyticsInfo", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getAnalyticsInfo", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getAnalyticsInfo(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getAnalyticsInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getAnalyticsInfo", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getAnalyticsInfo", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_reportClientStatistics = function(seqid, input, output) { var args = new TalkService_reportClientStatistics_args(); args.read(input); input.readMessageEnd(); if (this._handler.reportClientStatistics.length === 3) { Q.fcall(this._handler.reportClientStatistics, args.reqSeq, args.category, args.count) .then(function(result) { var result_obj = new TalkService_reportClientStatistics_result({success: result}); output.writeMessageBegin("reportClientStatistics", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_reportClientStatistics_result(err); output.writeMessageBegin("reportClientStatistics", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportClientStatistics", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportClientStatistics(args.reqSeq, args.category, args.count, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_reportClientStatistics_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("reportClientStatistics", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportClientStatistics", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_verifyPhoneNumberForLogin = function(seqid, input, output) { var args = new TalkService_verifyPhoneNumberForLogin_args(); args.read(input); input.readMessageEnd(); if (this._handler.verifyPhoneNumberForLogin.length === 3) { Q.fcall(this._handler.verifyPhoneNumberForLogin, args.verifierFromPhone, args.pinCodeForPhone, args.verifierFromLogin) .then(function(result) { var result_obj = new TalkService_verifyPhoneNumberForLogin_result({success: result}); output.writeMessageBegin("verifyPhoneNumberForLogin", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_verifyPhoneNumberForLogin_result(err); output.writeMessageBegin("verifyPhoneNumberForLogin", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyPhoneNumberForLogin", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.verifyPhoneNumberForLogin(args.verifierFromPhone, args.pinCodeForPhone, args.verifierFromLogin, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_verifyPhoneNumberForLogin_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("verifyPhoneNumberForLogin", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyPhoneNumberForLogin", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_verifyPhoneNumber = function(seqid, input, output) { var args = new TalkService_verifyPhoneNumber_args(); args.read(input); input.readMessageEnd(); if (this._handler.verifyPhoneNumber.length === 5) { Q.fcall(this._handler.verifyPhoneNumber, args.sessionId, args.pinCode, args.udidHash, args.migrationPincodeSessionId, args.oldUdidHash) .then(function(result) { var result_obj = new TalkService_verifyPhoneNumber_result({success: result}); output.writeMessageBegin("verifyPhoneNumber", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_verifyPhoneNumber_result(err); output.writeMessageBegin("verifyPhoneNumber", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyPhoneNumber", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.verifyPhoneNumber(args.sessionId, args.pinCode, args.udidHash, args.migrationPincodeSessionId, args.oldUdidHash, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_verifyPhoneNumber_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("verifyPhoneNumber", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyPhoneNumber", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getBlockedContactIdsByRange = function(seqid, input, output) { var args = new TalkService_getBlockedContactIdsByRange_args(); args.read(input); input.readMessageEnd(); if (this._handler.getBlockedContactIdsByRange.length === 2) { Q.fcall(this._handler.getBlockedContactIdsByRange, args.start, args.count) .then(function(result) { var result_obj = new TalkService_getBlockedContactIdsByRange_result({success: result}); output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getBlockedContactIdsByRange_result(err); output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getBlockedContactIdsByRange(args.start, args.count, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getBlockedContactIdsByRange_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getBlockedRecommendationIds = function(seqid, input, output) { var args = new TalkService_getBlockedRecommendationIds_args(); args.read(input); input.readMessageEnd(); if (this._handler.getBlockedRecommendationIds.length === 0) { Q.fcall(this._handler.getBlockedRecommendationIds) .then(function(result) { var result_obj = new TalkService_getBlockedRecommendationIds_result({success: result}); output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getBlockedRecommendationIds_result(err); output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getBlockedRecommendationIds(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getBlockedRecommendationIds_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getBuddyBlockerIds = function(seqid, input, output) { var args = new TalkService_getBuddyBlockerIds_args(); args.read(input); input.readMessageEnd(); if (this._handler.getBuddyBlockerIds.length === 0) { Q.fcall(this._handler.getBuddyBlockerIds) .then(function(result) { var result_obj = new TalkService_getBuddyBlockerIds_result({success: result}); output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getBuddyBlockerIds_result(err); output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getBuddyBlockerIds(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getBuddyBlockerIds_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getBuddyLocation = function(seqid, input, output) { var args = new TalkService_getBuddyLocation_args(); args.read(input); input.readMessageEnd(); if (this._handler.getBuddyLocation.length === 2) { Q.fcall(this._handler.getBuddyLocation, args.mid, args.index) .then(function(result) { var result_obj = new TalkService_getBuddyLocation_result({success: result}); output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getBuddyLocation_result(err); output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getBuddyLocation(args.mid, args.index, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getBuddyLocation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getCompactContactsModifiedSince = function(seqid, input, output) { var args = new TalkService_getCompactContactsModifiedSince_args(); args.read(input); input.readMessageEnd(); if (this._handler.getCompactContactsModifiedSince.length === 1) { Q.fcall(this._handler.getCompactContactsModifiedSince, args.timestamp) .then(function(result) { var result_obj = new TalkService_getCompactContactsModifiedSince_result({success: result}); output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getCompactContactsModifiedSince_result(err); output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getCompactContactsModifiedSince(args.timestamp, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getCompactContactsModifiedSince_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getCompactGroup = function(seqid, input, output) { var args = new TalkService_getCompactGroup_args(); args.read(input); input.readMessageEnd(); if (this._handler.getCompactGroup.length === 1) { Q.fcall(this._handler.getCompactGroup, args.groupId) .then(function(result) { var result_obj = new TalkService_getCompactGroup_result({success: result}); output.writeMessageBegin("getCompactGroup", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getCompactGroup_result(err); output.writeMessageBegin("getCompactGroup", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getCompactGroup", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getCompactGroup(args.groupId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getCompactGroup_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getCompactGroup", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getCompactGroup", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getCompactRoom = function(seqid, input, output) { var args = new TalkService_getCompactRoom_args(); args.read(input); input.readMessageEnd(); if (this._handler.getCompactRoom.length === 1) { Q.fcall(this._handler.getCompactRoom, args.roomId) .then(function(result) { var result_obj = new TalkService_getCompactRoom_result({success: result}); output.writeMessageBegin("getCompactRoom", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getCompactRoom_result(err); output.writeMessageBegin("getCompactRoom", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getCompactRoom", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getCompactRoom(args.roomId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getCompactRoom_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getCompactRoom", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getCompactRoom", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getContact = function(seqid, input, output) { var args = new TalkService_getContact_args(); args.read(input); input.readMessageEnd(); if (this._handler.getContact.length === 1) { Q.fcall(this._handler.getContact, args.id) .then(function(result) { var result_obj = new TalkService_getContact_result({success: result}); output.writeMessageBegin("getContact", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getContact_result(err); output.writeMessageBegin("getContact", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getContact", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getContact(args.id, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getContact_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getContact", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getContact", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getContacts = function(seqid, input, output) { var args = new TalkService_getContacts_args(); args.read(input); input.readMessageEnd(); if (this._handler.getContacts.length === 1) { Q.fcall(this._handler.getContacts, args.ids) .then(function(result) { var result_obj = new TalkService_getContacts_result({success: result}); output.writeMessageBegin("getContacts", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getContacts_result(err); output.writeMessageBegin("getContacts", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getContacts", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getContacts(args.ids, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getContacts_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getContacts", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getContacts", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getContactWithFriendRequestStatus = function(seqid, input, output) { var args = new TalkService_getContactWithFriendRequestStatus_args(); args.read(input); input.readMessageEnd(); if (this._handler.getContactWithFriendRequestStatus.length === 1) { Q.fcall(this._handler.getContactWithFriendRequestStatus, args.id) .then(function(result) { var result_obj = new TalkService_getContactWithFriendRequestStatus_result({success: result}); output.writeMessageBegin("getContactWithFriendRequestStatus", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getContactWithFriendRequestStatus_result(err); output.writeMessageBegin("getContactWithFriendRequestStatus", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getContactWithFriendRequestStatus", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getContactWithFriendRequestStatus(args.id, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getContactWithFriendRequestStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getContactWithFriendRequestStatus", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getContactWithFriendRequestStatus", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getCountryWithRequestIp = function(seqid, input, output) { var args = new TalkService_getCountryWithRequestIp_args(); args.read(input); input.readMessageEnd(); if (this._handler.getCountryWithRequestIp.length === 0) { Q.fcall(this._handler.getCountryWithRequestIp) .then(function(result) { var result_obj = new TalkService_getCountryWithRequestIp_result({success: result}); output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getCountryWithRequestIp_result(err); output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getCountryWithRequestIp(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getCountryWithRequestIp_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getFavoriteMids = function(seqid, input, output) { var args = new TalkService_getFavoriteMids_args(); args.read(input); input.readMessageEnd(); if (this._handler.getFavoriteMids.length === 0) { Q.fcall(this._handler.getFavoriteMids) .then(function(result) { var result_obj = new TalkService_getFavoriteMids_result({success: result}); output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getFavoriteMids_result(err); output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getFavoriteMids(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getFavoriteMids_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getGroup = function(seqid, input, output) { var args = new TalkService_getGroup_args(); args.read(input); input.readMessageEnd(); if (this._handler.getGroup.length === 1) { Q.fcall(this._handler.getGroup, args.groupId) .then(function(result) { var result_obj = new TalkService_getGroup_result({success: result}); output.writeMessageBegin("getGroup", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getGroup_result(err); output.writeMessageBegin("getGroup", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroup", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getGroup(args.groupId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getGroup_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getGroup", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroup", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getGroupIdsInvited = function(seqid, input, output) { var args = new TalkService_getGroupIdsInvited_args(); args.read(input); input.readMessageEnd(); if (this._handler.getGroupIdsInvited.length === 0) { Q.fcall(this._handler.getGroupIdsInvited) .then(function(result) { var result_obj = new TalkService_getGroupIdsInvited_result({success: result}); output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getGroupIdsInvited_result(err); output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getGroupIdsInvited(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getGroupIdsInvited_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getGroupIdsJoined = function(seqid, input, output) { var args = new TalkService_getGroupIdsJoined_args(); args.read(input); input.readMessageEnd(); if (this._handler.getGroupIdsJoined.length === 0) { Q.fcall(this._handler.getGroupIdsJoined) .then(function(result) { var result_obj = new TalkService_getGroupIdsJoined_result({success: result}); output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getGroupIdsJoined_result(err); output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getGroupIdsJoined(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getGroupIdsJoined_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getGroups = function(seqid, input, output) { var args = new TalkService_getGroups_args(); args.read(input); input.readMessageEnd(); if (this._handler.getGroups.length === 1) { Q.fcall(this._handler.getGroups, args.groupIds) .then(function(result) { var result_obj = new TalkService_getGroups_result({success: result}); output.writeMessageBegin("getGroups", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getGroups_result(err); output.writeMessageBegin("getGroups", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroups", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getGroups(args.groupIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getGroups_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getGroups", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroups", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getHiddenContactMids = function(seqid, input, output) { var args = new TalkService_getHiddenContactMids_args(); args.read(input); input.readMessageEnd(); if (this._handler.getHiddenContactMids.length === 0) { Q.fcall(this._handler.getHiddenContactMids) .then(function(result) { var result_obj = new TalkService_getHiddenContactMids_result({success: result}); output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getHiddenContactMids_result(err); output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getHiddenContactMids(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getHiddenContactMids_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getIdentityIdentifier = function(seqid, input, output) { var args = new TalkService_getIdentityIdentifier_args(); args.read(input); input.readMessageEnd(); if (this._handler.getIdentityIdentifier.length === 0) { Q.fcall(this._handler.getIdentityIdentifier) .then(function(result) { var result_obj = new TalkService_getIdentityIdentifier_result({success: result}); output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getIdentityIdentifier_result(err); output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getIdentityIdentifier(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getIdentityIdentifier_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getLastAnnouncementIndex = function(seqid, input, output) { var args = new TalkService_getLastAnnouncementIndex_args(); args.read(input); input.readMessageEnd(); if (this._handler.getLastAnnouncementIndex.length === 0) { Q.fcall(this._handler.getLastAnnouncementIndex) .then(function(result) { var result_obj = new TalkService_getLastAnnouncementIndex_result({success: result}); output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getLastAnnouncementIndex_result(err); output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getLastAnnouncementIndex(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getLastAnnouncementIndex_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getLastOpRevision = function(seqid, input, output) { var args = new TalkService_getLastOpRevision_args(); args.read(input); input.readMessageEnd(); if (this._handler.getLastOpRevision.length === 0) { Q.fcall(this._handler.getLastOpRevision) .then(function(result) { var result_obj = new TalkService_getLastOpRevision_result({success: result}); output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getLastOpRevision_result(err); output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getLastOpRevision(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getLastOpRevision_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getSuggestRevisions = function(seqid, input, output) { var args = new TalkService_getSuggestRevisions_args(); args.read(input); input.readMessageEnd(); if (this._handler.getSuggestRevisions.length === 0) { Q.fcall(this._handler.getSuggestRevisions) .then(function(result) { var result_obj = new TalkService_getSuggestRevisions_result({success: result}); output.writeMessageBegin("getSuggestRevisions", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getSuggestRevisions_result(err); output.writeMessageBegin("getSuggestRevisions", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getSuggestRevisions", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getSuggestRevisions(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getSuggestRevisions_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getSuggestRevisions", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getSuggestRevisions", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getPreviousMessagesV2WithReadCount = function(seqid, input, output) { var args = new TalkService_getPreviousMessagesV2WithReadCount_args(); args.read(input); input.readMessageEnd(); if (this._handler.getPreviousMessagesV2WithReadCount.length === 3) { Q.fcall(this._handler.getPreviousMessagesV2WithReadCount, args.messageBoxId, args.endMessageId, args.messagesCount) .then(function(result) { var result_obj = new TalkService_getPreviousMessagesV2WithReadCount_result({success: result}); output.writeMessageBegin("getPreviousMessagesV2WithReadCount", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getPreviousMessagesV2WithReadCount_result(err); output.writeMessageBegin("getPreviousMessagesV2WithReadCount", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getPreviousMessagesV2WithReadCount", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getPreviousMessagesV2WithReadCount(args.messageBoxId, args.endMessageId, args.messagesCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getPreviousMessagesV2WithReadCount_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getPreviousMessagesV2WithReadCount", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getPreviousMessagesV2WithReadCount", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getMessageBox = function(seqid, input, output) { var args = new TalkService_getMessageBox_args(); args.read(input); input.readMessageEnd(); if (this._handler.getMessageBox.length === 3) { Q.fcall(this._handler.getMessageBox, args.channelId, args.messageBoxId, args.lastMessagesCount) .then(function(result) { var result_obj = new TalkService_getMessageBox_result({success: result}); output.writeMessageBegin("getMessageBox", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getMessageBox_result(err); output.writeMessageBegin("getMessageBox", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBox", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBox(args.channelId, args.messageBoxId, args.lastMessagesCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getMessageBox_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getMessageBox", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBox", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getMessageBoxCompactWrapUp = function(seqid, input, output) { var args = new TalkService_getMessageBoxCompactWrapUp_args(); args.read(input); input.readMessageEnd(); if (this._handler.getMessageBoxCompactWrapUp.length === 1) { Q.fcall(this._handler.getMessageBoxCompactWrapUp, args.mid) .then(function(result) { var result_obj = new TalkService_getMessageBoxCompactWrapUp_result({success: result}); output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getMessageBoxCompactWrapUp_result(err); output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxCompactWrapUp(args.mid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getMessageBoxCompactWrapUp_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getMessageBoxCompactWrapUpList = function(seqid, input, output) { var args = new TalkService_getMessageBoxCompactWrapUpList_args(); args.read(input); input.readMessageEnd(); if (this._handler.getMessageBoxCompactWrapUpList.length === 2) { Q.fcall(this._handler.getMessageBoxCompactWrapUpList, args.start, args.messageBoxCount) .then(function(result) { var result_obj = new TalkService_getMessageBoxCompactWrapUpList_result({success: result}); output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getMessageBoxCompactWrapUpList_result(err); output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxCompactWrapUpList(args.start, args.messageBoxCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getMessageBoxCompactWrapUpList_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getMessageBoxList = function(seqid, input, output) { var args = new TalkService_getMessageBoxList_args(); args.read(input); input.readMessageEnd(); if (this._handler.getMessageBoxList.length === 2) { Q.fcall(this._handler.getMessageBoxList, args.channelId, args.lastMessagesCount) .then(function(result) { var result_obj = new TalkService_getMessageBoxList_result({success: result}); output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getMessageBoxList_result(err); output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxList(args.channelId, args.lastMessagesCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getMessageBoxList_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getMessageBoxListByStatus = function(seqid, input, output) { var args = new TalkService_getMessageBoxListByStatus_args(); args.read(input); input.readMessageEnd(); if (this._handler.getMessageBoxListByStatus.length === 3) { Q.fcall(this._handler.getMessageBoxListByStatus, args.channelId, args.lastMessagesCount, args.status) .then(function(result) { var result_obj = new TalkService_getMessageBoxListByStatus_result({success: result}); output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getMessageBoxListByStatus_result(err); output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxListByStatus(args.channelId, args.lastMessagesCount, args.status, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getMessageBoxListByStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getMessageBoxWrapUp = function(seqid, input, output) { var args = new TalkService_getMessageBoxWrapUp_args(); args.read(input); input.readMessageEnd(); if (this._handler.getMessageBoxWrapUp.length === 1) { Q.fcall(this._handler.getMessageBoxWrapUp, args.mid) .then(function(result) { var result_obj = new TalkService_getMessageBoxWrapUp_result({success: result}); output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getMessageBoxWrapUp_result(err); output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxWrapUp(args.mid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getMessageBoxWrapUp_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getMessageBoxWrapUpList = function(seqid, input, output) { var args = new TalkService_getMessageBoxWrapUpList_args(); args.read(input); input.readMessageEnd(); if (this._handler.getMessageBoxWrapUpList.length === 2) { Q.fcall(this._handler.getMessageBoxWrapUpList, args.start, args.messageBoxCount) .then(function(result) { var result_obj = new TalkService_getMessageBoxWrapUpList_result({success: result}); output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getMessageBoxWrapUpList_result(err); output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxWrapUpList(args.start, args.messageBoxCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getMessageBoxWrapUpList_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getMessagesBySequenceNumber = function(seqid, input, output) { var args = new TalkService_getMessagesBySequenceNumber_args(); args.read(input); input.readMessageEnd(); if (this._handler.getMessagesBySequenceNumber.length === 4) { Q.fcall(this._handler.getMessagesBySequenceNumber, args.channelId, args.messageBoxId, args.startSeq, args.endSeq) .then(function(result) { var result_obj = new TalkService_getMessagesBySequenceNumber_result({success: result}); output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getMessagesBySequenceNumber_result(err); output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessagesBySequenceNumber(args.channelId, args.messageBoxId, args.startSeq, args.endSeq, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getMessagesBySequenceNumber_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getNextMessages = function(seqid, input, output) { var args = new TalkService_getNextMessages_args(); args.read(input); input.readMessageEnd(); if (this._handler.getNextMessages.length === 3) { Q.fcall(this._handler.getNextMessages, args.messageBoxId, args.startSeq, args.messagesCount) .then(function(result) { var result_obj = new TalkService_getNextMessages_result({success: result}); output.writeMessageBegin("getNextMessages", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getNextMessages_result(err); output.writeMessageBegin("getNextMessages", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getNextMessages", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getNextMessages(args.messageBoxId, args.startSeq, args.messagesCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getNextMessages_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getNextMessages", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getNextMessages", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getNotificationPolicy = function(seqid, input, output) { var args = new TalkService_getNotificationPolicy_args(); args.read(input); input.readMessageEnd(); if (this._handler.getNotificationPolicy.length === 1) { Q.fcall(this._handler.getNotificationPolicy, args.carrier) .then(function(result) { var result_obj = new TalkService_getNotificationPolicy_result({success: result}); output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getNotificationPolicy_result(err); output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getNotificationPolicy(args.carrier, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getNotificationPolicy_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getPreviousMessages = function(seqid, input, output) { var args = new TalkService_getPreviousMessages_args(); args.read(input); input.readMessageEnd(); if (this._handler.getPreviousMessages.length === 3) { Q.fcall(this._handler.getPreviousMessages, args.messageBoxId, args.endSeq, args.messagesCount) .then(function(result) { var result_obj = new TalkService_getPreviousMessages_result({success: result}); output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getPreviousMessages_result(err); output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getPreviousMessages(args.messageBoxId, args.endSeq, args.messagesCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getPreviousMessages_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getProfile = function(seqid, input, output) { var args = new TalkService_getProfile_args(); args.read(input); input.readMessageEnd(); if (this._handler.getProfile.length === 0) { Q.fcall(this._handler.getProfile) .then(function(result) { var result_obj = new TalkService_getProfile_result({success: result}); output.writeMessageBegin("getProfile", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getProfile_result(err); output.writeMessageBegin("getProfile", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getProfile", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getProfile(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getProfile_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getProfile", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getProfile", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getProximityMatchCandidateList = function(seqid, input, output) { var args = new TalkService_getProximityMatchCandidateList_args(); args.read(input); input.readMessageEnd(); if (this._handler.getProximityMatchCandidateList.length === 1) { Q.fcall(this._handler.getProximityMatchCandidateList, args.sessionId) .then(function(result) { var result_obj = new TalkService_getProximityMatchCandidateList_result({success: result}); output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getProximityMatchCandidateList_result(err); output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getProximityMatchCandidateList(args.sessionId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getProximityMatchCandidateList_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getProximityMatchCandidates = function(seqid, input, output) { var args = new TalkService_getProximityMatchCandidates_args(); args.read(input); input.readMessageEnd(); if (this._handler.getProximityMatchCandidates.length === 1) { Q.fcall(this._handler.getProximityMatchCandidates, args.sessionId) .then(function(result) { var result_obj = new TalkService_getProximityMatchCandidates_result({success: result}); output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getProximityMatchCandidates_result(err); output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getProximityMatchCandidates(args.sessionId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getProximityMatchCandidates_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getRecentMessages = function(seqid, input, output) { var args = new TalkService_getRecentMessages_args(); args.read(input); input.readMessageEnd(); if (this._handler.getRecentMessages.length === 2) { Q.fcall(this._handler.getRecentMessages, args.messageBoxId, args.messagesCount) .then(function(result) { var result_obj = new TalkService_getRecentMessages_result({success: result}); output.writeMessageBegin("getRecentMessages", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getRecentMessages_result(err); output.writeMessageBegin("getRecentMessages", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getRecentMessages", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getRecentMessages(args.messageBoxId, args.messagesCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getRecentMessages_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getRecentMessages", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getRecentMessages", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getRecommendationIds = function(seqid, input, output) { var args = new TalkService_getRecommendationIds_args(); args.read(input); input.readMessageEnd(); if (this._handler.getRecommendationIds.length === 0) { Q.fcall(this._handler.getRecommendationIds) .then(function(result) { var result_obj = new TalkService_getRecommendationIds_result({success: result}); output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getRecommendationIds_result(err); output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getRecommendationIds(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getRecommendationIds_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getRoom = function(seqid, input, output) { var args = new TalkService_getRoom_args(); args.read(input); input.readMessageEnd(); if (this._handler.getRoom.length === 1) { Q.fcall(this._handler.getRoom, args.roomId) .then(function(result) { var result_obj = new TalkService_getRoom_result({success: result}); output.writeMessageBegin("getRoom", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getRoom_result(err); output.writeMessageBegin("getRoom", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getRoom", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getRoom(args.roomId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getRoom_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getRoom", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getRoom", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getRSAKeyInfo = function(seqid, input, output) { var args = new TalkService_getRSAKeyInfo_args(); args.read(input); input.readMessageEnd(); if (this._handler.getRSAKeyInfo.length === 1) { Q.fcall(this._handler.getRSAKeyInfo, args.provider) .then(function(result) { var result_obj = new TalkService_getRSAKeyInfo_result({success: result}); output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getRSAKeyInfo_result(err); output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getRSAKeyInfo(args.provider, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getRSAKeyInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getServerTime = function(seqid, input, output) { var args = new TalkService_getServerTime_args(); args.read(input); input.readMessageEnd(); if (this._handler.getServerTime.length === 0) { Q.fcall(this._handler.getServerTime) .then(function(result) { var result_obj = new TalkService_getServerTime_result({success: result}); output.writeMessageBegin("getServerTime", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getServerTime_result(err); output.writeMessageBegin("getServerTime", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getServerTime", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getServerTime(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getServerTime_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getServerTime", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getServerTime", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getSessions = function(seqid, input, output) { var args = new TalkService_getSessions_args(); args.read(input); input.readMessageEnd(); if (this._handler.getSessions.length === 0) { Q.fcall(this._handler.getSessions) .then(function(result) { var result_obj = new TalkService_getSessions_result({success: result}); output.writeMessageBegin("getSessions", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getSessions_result(err); output.writeMessageBegin("getSessions", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getSessions", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getSessions(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getSessions_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getSessions", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getSessions", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getSettings = function(seqid, input, output) { var args = new TalkService_getSettings_args(); args.read(input); input.readMessageEnd(); if (this._handler.getSettings.length === 0) { Q.fcall(this._handler.getSettings) .then(function(result) { var result_obj = new TalkService_getSettings_result({success: result}); output.writeMessageBegin("getSettings", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getSettings_result(err); output.writeMessageBegin("getSettings", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getSettings", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getSettings(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getSettings_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getSettings", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getSettings", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getGroupsV2 = function(seqid, input, output) { var args = new TalkService_getGroupsV2_args(); args.read(input); input.readMessageEnd(); if (this._handler.getGroupsV2.length === 1) { Q.fcall(this._handler.getGroupsV2, args.groupIds) .then(function(result) { var result_obj = new TalkService_getGroupsV2_result({success: result}); output.writeMessageBegin("getGroupsV2", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getGroupsV2_result(err); output.writeMessageBegin("getGroupsV2", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroupsV2", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getGroupsV2(args.groupIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getGroupsV2_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getGroupsV2", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getGroupsV2", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getSettingsAttributes = function(seqid, input, output) { var args = new TalkService_getSettingsAttributes_args(); args.read(input); input.readMessageEnd(); if (this._handler.getSettingsAttributes.length === 1) { Q.fcall(this._handler.getSettingsAttributes, args.attrBitset) .then(function(result) { var result_obj = new TalkService_getSettingsAttributes_result({success: result}); output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getSettingsAttributes_result(err); output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getSettingsAttributes(args.attrBitset, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getSettingsAttributes_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getSystemConfiguration = function(seqid, input, output) { var args = new TalkService_getSystemConfiguration_args(); args.read(input); input.readMessageEnd(); if (this._handler.getSystemConfiguration.length === 0) { Q.fcall(this._handler.getSystemConfiguration) .then(function(result) { var result_obj = new TalkService_getSystemConfiguration_result({success: result}); output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getSystemConfiguration_result(err); output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getSystemConfiguration(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getSystemConfiguration_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getUserTicket = function(seqid, input, output) { var args = new TalkService_getUserTicket_args(); args.read(input); input.readMessageEnd(); if (this._handler.getUserTicket.length === 0) { Q.fcall(this._handler.getUserTicket) .then(function(result) { var result_obj = new TalkService_getUserTicket_result({success: result}); output.writeMessageBegin("getUserTicket", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getUserTicket_result(err); output.writeMessageBegin("getUserTicket", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getUserTicket", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getUserTicket(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getUserTicket_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getUserTicket", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getUserTicket", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getWapInvitation = function(seqid, input, output) { var args = new TalkService_getWapInvitation_args(); args.read(input); input.readMessageEnd(); if (this._handler.getWapInvitation.length === 1) { Q.fcall(this._handler.getWapInvitation, args.invitationHash) .then(function(result) { var result_obj = new TalkService_getWapInvitation_result({success: result}); output.writeMessageBegin("getWapInvitation", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getWapInvitation_result(err); output.writeMessageBegin("getWapInvitation", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getWapInvitation", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getWapInvitation(args.invitationHash, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getWapInvitation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getWapInvitation", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getWapInvitation", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_invalidateUserTicket = function(seqid, input, output) { var args = new TalkService_invalidateUserTicket_args(); args.read(input); input.readMessageEnd(); if (this._handler.invalidateUserTicket.length === 0) { Q.fcall(this._handler.invalidateUserTicket) .then(function(result) { var result_obj = new TalkService_invalidateUserTicket_result({success: result}); output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_invalidateUserTicket_result(err); output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.invalidateUserTicket(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_invalidateUserTicket_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_inviteFriendsBySms = function(seqid, input, output) { var args = new TalkService_inviteFriendsBySms_args(); args.read(input); input.readMessageEnd(); if (this._handler.inviteFriendsBySms.length === 1) { Q.fcall(this._handler.inviteFriendsBySms, args.phoneNumberList) .then(function(result) { var result_obj = new TalkService_inviteFriendsBySms_result({success: result}); output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_inviteFriendsBySms_result(err); output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.inviteFriendsBySms(args.phoneNumberList, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_inviteFriendsBySms_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_inviteIntoGroup = function(seqid, input, output) { var args = new TalkService_inviteIntoGroup_args(); args.read(input); input.readMessageEnd(); if (this._handler.inviteIntoGroup.length === 3) { Q.fcall(this._handler.inviteIntoGroup, args.reqSeq, args.groupId, args.contactIds) .then(function(result) { var result_obj = new TalkService_inviteIntoGroup_result({success: result}); output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_inviteIntoGroup_result(err); output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.inviteIntoGroup(args.reqSeq, args.groupId, args.contactIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_inviteIntoGroup_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_inviteIntoRoom = function(seqid, input, output) { var args = new TalkService_inviteIntoRoom_args(); args.read(input); input.readMessageEnd(); if (this._handler.inviteIntoRoom.length === 3) { Q.fcall(this._handler.inviteIntoRoom, args.reqSeq, args.roomId, args.contactIds) .then(function(result) { var result_obj = new TalkService_inviteIntoRoom_result({success: result}); output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_inviteIntoRoom_result(err); output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.inviteIntoRoom(args.reqSeq, args.roomId, args.contactIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_inviteIntoRoom_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_inviteViaEmail = function(seqid, input, output) { var args = new TalkService_inviteViaEmail_args(); args.read(input); input.readMessageEnd(); if (this._handler.inviteViaEmail.length === 3) { Q.fcall(this._handler.inviteViaEmail, args.reqSeq, args.email, args.name) .then(function(result) { var result_obj = new TalkService_inviteViaEmail_result({success: result}); output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_inviteViaEmail_result(err); output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.inviteViaEmail(args.reqSeq, args.email, args.name, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_inviteViaEmail_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_isIdentityIdentifierAvailable = function(seqid, input, output) { var args = new TalkService_isIdentityIdentifierAvailable_args(); args.read(input); input.readMessageEnd(); if (this._handler.isIdentityIdentifierAvailable.length === 2) { Q.fcall(this._handler.isIdentityIdentifierAvailable, args.provider, args.identifier) .then(function(result) { var result_obj = new TalkService_isIdentityIdentifierAvailable_result({success: result}); output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_isIdentityIdentifierAvailable_result(err); output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.isIdentityIdentifierAvailable(args.provider, args.identifier, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_isIdentityIdentifierAvailable_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_isUseridAvailable = function(seqid, input, output) { var args = new TalkService_isUseridAvailable_args(); args.read(input); input.readMessageEnd(); if (this._handler.isUseridAvailable.length === 1) { Q.fcall(this._handler.isUseridAvailable, args.userid) .then(function(result) { var result_obj = new TalkService_isUseridAvailable_result({success: result}); output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_isUseridAvailable_result(err); output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.isUseridAvailable(args.userid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_isUseridAvailable_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_kickoutFromGroup = function(seqid, input, output) { var args = new TalkService_kickoutFromGroup_args(); args.read(input); input.readMessageEnd(); if (this._handler.kickoutFromGroup.length === 3) { Q.fcall(this._handler.kickoutFromGroup, args.reqSeq, args.groupId, args.contactIds) .then(function(result) { var result_obj = new TalkService_kickoutFromGroup_result({success: result}); output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_kickoutFromGroup_result(err); output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.kickoutFromGroup(args.reqSeq, args.groupId, args.contactIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_kickoutFromGroup_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_reissueGroupTicket = function(seqid, input, output) { var args = new TalkService_reissueGroupTicket_args(); args.read(input); input.readMessageEnd(); if (this._handler.reissueGroupTicket.length === 1) { Q.fcall(this._handler.reissueGroupTicket, args.groupMid) .then(function(result) { var result_obj = new TalkService_reissueGroupTicket_result({success: result}); output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_reissueGroupTicket_result(err); output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reissueGroupTicket(args.groupMid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_reissueGroupTicket_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findGroupByTicket = function(seqid, input, output) { var args = new TalkService_findGroupByTicket_args(); args.read(input); input.readMessageEnd(); if (this._handler.findGroupByTicket.length === 1) { Q.fcall(this._handler.findGroupByTicket, args.ticketId) .then(function(result) { var result_obj = new TalkService_findGroupByTicket_result({success: result}); output.writeMessageBegin("findGroupByTicket", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findGroupByTicket_result(err); output.writeMessageBegin("findGroupByTicket", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findGroupByTicket", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findGroupByTicket(args.ticketId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findGroupByTicket_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findGroupByTicket", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findGroupByTicket", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_leaveGroup = function(seqid, input, output) { var args = new TalkService_leaveGroup_args(); args.read(input); input.readMessageEnd(); if (this._handler.leaveGroup.length === 2) { Q.fcall(this._handler.leaveGroup, args.reqSeq, args.groupId) .then(function(result) { var result_obj = new TalkService_leaveGroup_result({success: result}); output.writeMessageBegin("leaveGroup", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_leaveGroup_result(err); output.writeMessageBegin("leaveGroup", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("leaveGroup", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.leaveGroup(args.reqSeq, args.groupId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_leaveGroup_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("leaveGroup", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("leaveGroup", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_leaveRoom = function(seqid, input, output) { var args = new TalkService_leaveRoom_args(); args.read(input); input.readMessageEnd(); if (this._handler.leaveRoom.length === 2) { Q.fcall(this._handler.leaveRoom, args.reqSeq, args.roomId) .then(function(result) { var result_obj = new TalkService_leaveRoom_result({success: result}); output.writeMessageBegin("leaveRoom", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_leaveRoom_result(err); output.writeMessageBegin("leaveRoom", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("leaveRoom", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.leaveRoom(args.reqSeq, args.roomId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_leaveRoom_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("leaveRoom", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("leaveRoom", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_loginWithIdentityCredential = function(seqid, input, output) { var args = new TalkService_loginWithIdentityCredential_args(); args.read(input); input.readMessageEnd(); if (this._handler.loginWithIdentityCredential.length === 7) { Q.fcall(this._handler.loginWithIdentityCredential, args.identityProvider, args.identifier, args.password, args.keepLoggedIn, args.accessLocation, args.systemName, args.certificate) .then(function(result) { var result_obj = new TalkService_loginWithIdentityCredential_result({success: result}); output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_loginWithIdentityCredential_result(err); output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.loginWithIdentityCredential(args.identityProvider, args.identifier, args.password, args.keepLoggedIn, args.accessLocation, args.systemName, args.certificate, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_loginWithIdentityCredential_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_loginWithIdentityCredentialForCertificate = function(seqid, input, output) { var args = new TalkService_loginWithIdentityCredentialForCertificate_args(); args.read(input); input.readMessageEnd(); if (this._handler.loginWithIdentityCredentialForCertificate.length === 7) { Q.fcall(this._handler.loginWithIdentityCredentialForCertificate, args.identityProvider, args.identifier, args.password, args.keepLoggedIn, args.accessLocation, args.systemName, args.certificate) .then(function(result) { var result_obj = new TalkService_loginWithIdentityCredentialForCertificate_result({success: result}); output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_loginWithIdentityCredentialForCertificate_result(err); output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.loginWithIdentityCredentialForCertificate(args.identityProvider, args.identifier, args.password, args.keepLoggedIn, args.accessLocation, args.systemName, args.certificate, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_loginWithIdentityCredentialForCertificate_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_loginWithVerifier = function(seqid, input, output) { var args = new TalkService_loginWithVerifier_args(); args.read(input); input.readMessageEnd(); if (this._handler.loginWithVerifier.length === 1) { Q.fcall(this._handler.loginWithVerifier, args.verifier) .then(function(result) { var result_obj = new TalkService_loginWithVerifier_result({success: result}); output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_loginWithVerifier_result(err); output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.loginWithVerifier(args.verifier, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_loginWithVerifier_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_loginWithVerifierForCerificate = function(seqid, input, output) { var args = new TalkService_loginWithVerifierForCerificate_args(); args.read(input); input.readMessageEnd(); if (this._handler.loginWithVerifierForCerificate.length === 1) { Q.fcall(this._handler.loginWithVerifierForCerificate, args.verifier) .then(function(result) { var result_obj = new TalkService_loginWithVerifierForCerificate_result({success: result}); output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_loginWithVerifierForCerificate_result(err); output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.loginWithVerifierForCerificate(args.verifier, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_loginWithVerifierForCerificate_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_loginWithVerifierForCertificate = function(seqid, input, output) { var args = new TalkService_loginWithVerifierForCertificate_args(); args.read(input); input.readMessageEnd(); if (this._handler.loginWithVerifierForCertificate.length === 1) { Q.fcall(this._handler.loginWithVerifierForCertificate, args.verifier) .then(function(result) { var result_obj = new TalkService_loginWithVerifierForCertificate_result({success: result}); output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_loginWithVerifierForCertificate_result(err); output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.loginWithVerifierForCertificate(args.verifier, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_loginWithVerifierForCertificate_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_logout = function(seqid, input, output) { var args = new TalkService_logout_args(); args.read(input); input.readMessageEnd(); if (this._handler.logout.length === 0) { Q.fcall(this._handler.logout) .then(function(result) { var result_obj = new TalkService_logout_result({success: result}); output.writeMessageBegin("logout", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_logout_result(err); output.writeMessageBegin("logout", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("logout", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.logout(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_logout_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("logout", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("logout", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_logoutSession = function(seqid, input, output) { var args = new TalkService_logoutSession_args(); args.read(input); input.readMessageEnd(); if (this._handler.logoutSession.length === 1) { Q.fcall(this._handler.logoutSession, args.tokenKey) .then(function(result) { var result_obj = new TalkService_logoutSession_result({success: result}); output.writeMessageBegin("logoutSession", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_logoutSession_result(err); output.writeMessageBegin("logoutSession", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("logoutSession", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.logoutSession(args.tokenKey, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_logoutSession_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("logoutSession", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("logoutSession", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_noop = function(seqid, input, output) { var args = new TalkService_noop_args(); args.read(input); input.readMessageEnd(); if (this._handler.noop.length === 0) { Q.fcall(this._handler.noop) .then(function(result) { var result_obj = new TalkService_noop_result({success: result}); output.writeMessageBegin("noop", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_noop_result(err); output.writeMessageBegin("noop", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("noop", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.noop(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_noop_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("noop", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("noop", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_notifiedRedirect = function(seqid, input, output) { var args = new TalkService_notifiedRedirect_args(); args.read(input); input.readMessageEnd(); if (this._handler.notifiedRedirect.length === 1) { Q.fcall(this._handler.notifiedRedirect, args.paramMap) .then(function(result) { var result_obj = new TalkService_notifiedRedirect_result({success: result}); output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_notifiedRedirect_result(err); output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifiedRedirect(args.paramMap, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_notifiedRedirect_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_notifyBuddyOnAir = function(seqid, input, output) { var args = new TalkService_notifyBuddyOnAir_args(); args.read(input); input.readMessageEnd(); if (this._handler.notifyBuddyOnAir.length === 2) { Q.fcall(this._handler.notifyBuddyOnAir, args.seq, args.receiverMids) .then(function(result) { var result_obj = new TalkService_notifyBuddyOnAir_result({success: result}); output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_notifyBuddyOnAir_result(err); output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifyBuddyOnAir(args.seq, args.receiverMids, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_notifyBuddyOnAir_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_notifyIndividualEvent = function(seqid, input, output) { var args = new TalkService_notifyIndividualEvent_args(); args.read(input); input.readMessageEnd(); if (this._handler.notifyIndividualEvent.length === 2) { Q.fcall(this._handler.notifyIndividualEvent, args.notificationStatus, args.receiverMids) .then(function(result) { var result_obj = new TalkService_notifyIndividualEvent_result({success: result}); output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_notifyIndividualEvent_result(err); output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifyIndividualEvent(args.notificationStatus, args.receiverMids, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_notifyIndividualEvent_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_notifyInstalled = function(seqid, input, output) { var args = new TalkService_notifyInstalled_args(); args.read(input); input.readMessageEnd(); if (this._handler.notifyInstalled.length === 2) { Q.fcall(this._handler.notifyInstalled, args.udidHash, args.applicationTypeWithExtensions) .then(function(result) { var result_obj = new TalkService_notifyInstalled_result({success: result}); output.writeMessageBegin("notifyInstalled", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_notifyInstalled_result(err); output.writeMessageBegin("notifyInstalled", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifyInstalled", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifyInstalled(args.udidHash, args.applicationTypeWithExtensions, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_notifyInstalled_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("notifyInstalled", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifyInstalled", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_notifyRegistrationComplete = function(seqid, input, output) { var args = new TalkService_notifyRegistrationComplete_args(); args.read(input); input.readMessageEnd(); if (this._handler.notifyRegistrationComplete.length === 2) { Q.fcall(this._handler.notifyRegistrationComplete, args.udidHash, args.applicationTypeWithExtensions) .then(function(result) { var result_obj = new TalkService_notifyRegistrationComplete_result({success: result}); output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_notifyRegistrationComplete_result(err); output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifyRegistrationComplete(args.udidHash, args.applicationTypeWithExtensions, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_notifyRegistrationComplete_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_notifySleep = function(seqid, input, output) { var args = new TalkService_notifySleep_args(); args.read(input); input.readMessageEnd(); if (this._handler.notifySleep.length === 2) { Q.fcall(this._handler.notifySleep, args.lastRev, args.badge) .then(function(result) { var result_obj = new TalkService_notifySleep_result({success: result}); output.writeMessageBegin("notifySleep", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_notifySleep_result(err); output.writeMessageBegin("notifySleep", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifySleep", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifySleep(args.lastRev, args.badge, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_notifySleep_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("notifySleep", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifySleep", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_notifyUpdated = function(seqid, input, output) { var args = new TalkService_notifyUpdated_args(); args.read(input); input.readMessageEnd(); if (this._handler.notifyUpdated.length === 2) { Q.fcall(this._handler.notifyUpdated, args.lastRev, args.deviceInfo) .then(function(result) { var result_obj = new TalkService_notifyUpdated_result({success: result}); output.writeMessageBegin("notifyUpdated", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_notifyUpdated_result(err); output.writeMessageBegin("notifyUpdated", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifyUpdated", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifyUpdated(args.lastRev, args.deviceInfo, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_notifyUpdated_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("notifyUpdated", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("notifyUpdated", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_openProximityMatch = function(seqid, input, output) { var args = new TalkService_openProximityMatch_args(); args.read(input); input.readMessageEnd(); if (this._handler.openProximityMatch.length === 1) { Q.fcall(this._handler.openProximityMatch, args.location) .then(function(result) { var result_obj = new TalkService_openProximityMatch_result({success: result}); output.writeMessageBegin("openProximityMatch", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_openProximityMatch_result(err); output.writeMessageBegin("openProximityMatch", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("openProximityMatch", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.openProximityMatch(args.location, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_openProximityMatch_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("openProximityMatch", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("openProximityMatch", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerBuddyUser = function(seqid, input, output) { var args = new TalkService_registerBuddyUser_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerBuddyUser.length === 2) { Q.fcall(this._handler.registerBuddyUser, args.buddyId, args.registrarPassword) .then(function(result) { var result_obj = new TalkService_registerBuddyUser_result({success: result}); output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerBuddyUser_result(err); output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerBuddyUser(args.buddyId, args.registrarPassword, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerBuddyUser_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerBuddyUserid = function(seqid, input, output) { var args = new TalkService_registerBuddyUserid_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerBuddyUserid.length === 2) { Q.fcall(this._handler.registerBuddyUserid, args.seq, args.userid) .then(function(result) { var result_obj = new TalkService_registerBuddyUserid_result({success: result}); output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerBuddyUserid_result(err); output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerBuddyUserid(args.seq, args.userid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerBuddyUserid_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerDevice = function(seqid, input, output) { var args = new TalkService_registerDevice_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerDevice.length === 1) { Q.fcall(this._handler.registerDevice, args.sessionId) .then(function(result) { var result_obj = new TalkService_registerDevice_result({success: result}); output.writeMessageBegin("registerDevice", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerDevice_result(err); output.writeMessageBegin("registerDevice", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerDevice", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerDevice(args.sessionId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerDevice_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerDevice", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerDevice", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerDeviceWithIdentityCredential = function(seqid, input, output) { var args = new TalkService_registerDeviceWithIdentityCredential_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerDeviceWithIdentityCredential.length === 4) { Q.fcall(this._handler.registerDeviceWithIdentityCredential, args.sessionId, args.provider, args.identifier, args.verifier) .then(function(result) { var result_obj = new TalkService_registerDeviceWithIdentityCredential_result({success: result}); output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerDeviceWithIdentityCredential_result(err); output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerDeviceWithIdentityCredential(args.sessionId, args.provider, args.identifier, args.verifier, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerDeviceWithIdentityCredential_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerDeviceWithoutPhoneNumber = function(seqid, input, output) { var args = new TalkService_registerDeviceWithoutPhoneNumber_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerDeviceWithoutPhoneNumber.length === 3) { Q.fcall(this._handler.registerDeviceWithoutPhoneNumber, args.region, args.udidHash, args.deviceInfo) .then(function(result) { var result_obj = new TalkService_registerDeviceWithoutPhoneNumber_result({success: result}); output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerDeviceWithoutPhoneNumber_result(err); output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerDeviceWithoutPhoneNumber(args.region, args.udidHash, args.deviceInfo, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerDeviceWithoutPhoneNumber_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerDeviceWithoutPhoneNumberWithIdentityCredential = function(seqid, input, output) { var args = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerDeviceWithoutPhoneNumberWithIdentityCredential.length === 8) { Q.fcall(this._handler.registerDeviceWithoutPhoneNumberWithIdentityCredential, args.region, args.udidHash, args.deviceInfo, args.provider, args.identifier, args.verifier, args.mid, args.migrationPincodeSessionId) .then(function(result) { var result_obj = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result({success: result}); output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result(err); output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerDeviceWithoutPhoneNumberWithIdentityCredential(args.region, args.udidHash, args.deviceInfo, args.provider, args.identifier, args.verifier, args.mid, args.migrationPincodeSessionId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerUserid = function(seqid, input, output) { var args = new TalkService_registerUserid_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerUserid.length === 2) { Q.fcall(this._handler.registerUserid, args.reqSeq, args.userid) .then(function(result) { var result_obj = new TalkService_registerUserid_result({success: result}); output.writeMessageBegin("registerUserid", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerUserid_result(err); output.writeMessageBegin("registerUserid", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerUserid", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerUserid(args.reqSeq, args.userid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerUserid_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerUserid", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerUserid", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerWapDevice = function(seqid, input, output) { var args = new TalkService_registerWapDevice_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerWapDevice.length === 4) { Q.fcall(this._handler.registerWapDevice, args.invitationHash, args.guidHash, args.email, args.deviceInfo) .then(function(result) { var result_obj = new TalkService_registerWapDevice_result({success: result}); output.writeMessageBegin("registerWapDevice", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerWapDevice_result(err); output.writeMessageBegin("registerWapDevice", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWapDevice", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerWapDevice(args.invitationHash, args.guidHash, args.email, args.deviceInfo, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerWapDevice_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerWapDevice", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWapDevice", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerWithExistingSnsIdAndIdentityCredential = function(seqid, input, output) { var args = new TalkService_registerWithExistingSnsIdAndIdentityCredential_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerWithExistingSnsIdAndIdentityCredential.length === 4) { Q.fcall(this._handler.registerWithExistingSnsIdAndIdentityCredential, args.identityCredential, args.region, args.udidHash, args.deviceInfo) .then(function(result) { var result_obj = new TalkService_registerWithExistingSnsIdAndIdentityCredential_result({success: result}); output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerWithExistingSnsIdAndIdentityCredential_result(err); output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerWithExistingSnsIdAndIdentityCredential(args.identityCredential, args.region, args.udidHash, args.deviceInfo, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerWithExistingSnsIdAndIdentityCredential_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerWithSnsId = function(seqid, input, output) { var args = new TalkService_registerWithSnsId_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerWithSnsId.length === 6) { Q.fcall(this._handler.registerWithSnsId, args.snsIdType, args.snsAccessToken, args.region, args.udidHash, args.deviceInfo, args.mid) .then(function(result) { var result_obj = new TalkService_registerWithSnsId_result({success: result}); output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerWithSnsId_result(err); output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerWithSnsId(args.snsIdType, args.snsAccessToken, args.region, args.udidHash, args.deviceInfo, args.mid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerWithSnsId_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerWithSnsIdAndIdentityCredential = function(seqid, input, output) { var args = new TalkService_registerWithSnsIdAndIdentityCredential_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerWithSnsIdAndIdentityCredential.length === 6) { Q.fcall(this._handler.registerWithSnsIdAndIdentityCredential, args.snsIdType, args.snsAccessToken, args.identityCredential, args.region, args.udidHash, args.deviceInfo) .then(function(result) { var result_obj = new TalkService_registerWithSnsIdAndIdentityCredential_result({success: result}); output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerWithSnsIdAndIdentityCredential_result(err); output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerWithSnsIdAndIdentityCredential(args.snsIdType, args.snsAccessToken, args.identityCredential, args.region, args.udidHash, args.deviceInfo, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerWithSnsIdAndIdentityCredential_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_reissueDeviceCredential = function(seqid, input, output) { var args = new TalkService_reissueDeviceCredential_args(); args.read(input); input.readMessageEnd(); if (this._handler.reissueDeviceCredential.length === 0) { Q.fcall(this._handler.reissueDeviceCredential) .then(function(result) { var result_obj = new TalkService_reissueDeviceCredential_result({success: result}); output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_reissueDeviceCredential_result(err); output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reissueDeviceCredential(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_reissueDeviceCredential_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_reissueUserTicket = function(seqid, input, output) { var args = new TalkService_reissueUserTicket_args(); args.read(input); input.readMessageEnd(); if (this._handler.reissueUserTicket.length === 2) { Q.fcall(this._handler.reissueUserTicket, args.expirationTime, args.maxUseCount) .then(function(result) { var result_obj = new TalkService_reissueUserTicket_result({success: result}); output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_reissueUserTicket_result(err); output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reissueUserTicket(args.expirationTime, args.maxUseCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_reissueUserTicket_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getMessageReadRange = function(seqid, input, output) { var args = new TalkService_getMessageReadRange_args(); args.read(input); input.readMessageEnd(); if (this._handler.getMessageReadRange.length === 1) { Q.fcall(this._handler.getMessageReadRange, args.chatIds) .then(function(result) { var result_obj = new TalkService_getMessageReadRange_result({success: result}); output.writeMessageBegin("getMessageReadRange", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getMessageReadRange_result(err); output.writeMessageBegin("getMessageReadRange", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageReadRange", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageReadRange(args.chatIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getMessageReadRange_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getMessageReadRange", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageReadRange", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_rejectGroupInvitation = function(seqid, input, output) { var args = new TalkService_rejectGroupInvitation_args(); args.read(input); input.readMessageEnd(); if (this._handler.rejectGroupInvitation.length === 2) { Q.fcall(this._handler.rejectGroupInvitation, args.reqSeq, args.groupId) .then(function(result) { var result_obj = new TalkService_rejectGroupInvitation_result({success: result}); output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_rejectGroupInvitation_result(err); output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.rejectGroupInvitation(args.reqSeq, args.groupId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_rejectGroupInvitation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_releaseSession = function(seqid, input, output) { var args = new TalkService_releaseSession_args(); args.read(input); input.readMessageEnd(); if (this._handler.releaseSession.length === 0) { Q.fcall(this._handler.releaseSession) .then(function(result) { var result_obj = new TalkService_releaseSession_result({success: result}); output.writeMessageBegin("releaseSession", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_releaseSession_result(err); output.writeMessageBegin("releaseSession", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("releaseSession", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.releaseSession(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_releaseSession_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("releaseSession", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("releaseSession", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_removeAllMessages = function(seqid, input, output) { var args = new TalkService_removeAllMessages_args(); args.read(input); input.readMessageEnd(); if (this._handler.removeAllMessages.length === 2) { Q.fcall(this._handler.removeAllMessages, args.seq, args.lastMessageId) .then(function(result) { var result_obj = new TalkService_removeAllMessages_result({success: result}); output.writeMessageBegin("removeAllMessages", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_removeAllMessages_result(err); output.writeMessageBegin("removeAllMessages", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeAllMessages", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeAllMessages(args.seq, args.lastMessageId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_removeAllMessages_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("removeAllMessages", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeAllMessages", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_removeBuddyLocation = function(seqid, input, output) { var args = new TalkService_removeBuddyLocation_args(); args.read(input); input.readMessageEnd(); if (this._handler.removeBuddyLocation.length === 2) { Q.fcall(this._handler.removeBuddyLocation, args.mid, args.index) .then(function(result) { var result_obj = new TalkService_removeBuddyLocation_result({success: result}); output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_removeBuddyLocation_result(err); output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeBuddyLocation(args.mid, args.index, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_removeBuddyLocation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_removeMessage = function(seqid, input, output) { var args = new TalkService_removeMessage_args(); args.read(input); input.readMessageEnd(); if (this._handler.removeMessage.length === 1) { Q.fcall(this._handler.removeMessage, args.messageId) .then(function(result) { var result_obj = new TalkService_removeMessage_result({success: result}); output.writeMessageBegin("removeMessage", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_removeMessage_result(err); output.writeMessageBegin("removeMessage", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeMessage", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeMessage(args.messageId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_removeMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("removeMessage", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeMessage", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_makeUserAddMyselfAsContact = function(seqid, input, output) { var args = new TalkService_makeUserAddMyselfAsContact_args(); args.read(input); input.readMessageEnd(); if (this._handler.makeUserAddMyselfAsContact.length === 1) { Q.fcall(this._handler.makeUserAddMyselfAsContact, args.contactOwnerMid) .then(function(result) { var result_obj = new TalkService_makeUserAddMyselfAsContact_result({success: result}); output.writeMessageBegin("makeUserAddMyselfAsContact", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_makeUserAddMyselfAsContact_result(err); output.writeMessageBegin("makeUserAddMyselfAsContact", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("makeUserAddMyselfAsContact", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.makeUserAddMyselfAsContact(args.contactOwnerMid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_makeUserAddMyselfAsContact_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("makeUserAddMyselfAsContact", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("makeUserAddMyselfAsContact", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_removeMessageFromMyHome = function(seqid, input, output) { var args = new TalkService_removeMessageFromMyHome_args(); args.read(input); input.readMessageEnd(); if (this._handler.removeMessageFromMyHome.length === 1) { Q.fcall(this._handler.removeMessageFromMyHome, args.messageId) .then(function(result) { var result_obj = new TalkService_removeMessageFromMyHome_result({success: result}); output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_removeMessageFromMyHome_result(err); output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeMessageFromMyHome(args.messageId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_removeMessageFromMyHome_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_removeSnsId = function(seqid, input, output) { var args = new TalkService_removeSnsId_args(); args.read(input); input.readMessageEnd(); if (this._handler.removeSnsId.length === 1) { Q.fcall(this._handler.removeSnsId, args.snsIdType) .then(function(result) { var result_obj = new TalkService_removeSnsId_result({success: result}); output.writeMessageBegin("removeSnsId", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_removeSnsId_result(err); output.writeMessageBegin("removeSnsId", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeSnsId", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeSnsId(args.snsIdType, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_removeSnsId_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("removeSnsId", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeSnsId", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_report = function(seqid, input, output) { var args = new TalkService_report_args(); args.read(input); input.readMessageEnd(); if (this._handler.report.length === 3) { Q.fcall(this._handler.report, args.syncOpRevision, args.category, args.report) .then(function(result) { var result_obj = new TalkService_report_result({success: result}); output.writeMessageBegin("report", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_report_result(err); output.writeMessageBegin("report", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("report", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.report(args.syncOpRevision, args.category, args.report, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_report_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("report", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("report", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_reportContacts = function(seqid, input, output) { var args = new TalkService_reportContacts_args(); args.read(input); input.readMessageEnd(); if (this._handler.reportContacts.length === 4) { Q.fcall(this._handler.reportContacts, args.syncOpRevision, args.category, args.contactReports, args.actionType) .then(function(result) { var result_obj = new TalkService_reportContacts_result({success: result}); output.writeMessageBegin("reportContacts", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_reportContacts_result(err); output.writeMessageBegin("reportContacts", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportContacts", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportContacts(args.syncOpRevision, args.category, args.contactReports, args.actionType, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_reportContacts_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("reportContacts", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportContacts", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_reportGroups = function(seqid, input, output) { var args = new TalkService_reportGroups_args(); args.read(input); input.readMessageEnd(); if (this._handler.reportGroups.length === 2) { Q.fcall(this._handler.reportGroups, args.syncOpRevision, args.groups) .then(function(result) { var result_obj = new TalkService_reportGroups_result({success: result}); output.writeMessageBegin("reportGroups", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_reportGroups_result(err); output.writeMessageBegin("reportGroups", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportGroups", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportGroups(args.syncOpRevision, args.groups, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_reportGroups_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("reportGroups", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportGroups", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_reportProfile = function(seqid, input, output) { var args = new TalkService_reportProfile_args(); args.read(input); input.readMessageEnd(); if (this._handler.reportProfile.length === 2) { Q.fcall(this._handler.reportProfile, args.syncOpRevision, args.profile) .then(function(result) { var result_obj = new TalkService_reportProfile_result({success: result}); output.writeMessageBegin("reportProfile", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_reportProfile_result(err); output.writeMessageBegin("reportProfile", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportProfile", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportProfile(args.syncOpRevision, args.profile, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_reportProfile_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("reportProfile", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportProfile", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_reportRooms = function(seqid, input, output) { var args = new TalkService_reportRooms_args(); args.read(input); input.readMessageEnd(); if (this._handler.reportRooms.length === 2) { Q.fcall(this._handler.reportRooms, args.syncOpRevision, args.rooms) .then(function(result) { var result_obj = new TalkService_reportRooms_result({success: result}); output.writeMessageBegin("reportRooms", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_reportRooms_result(err); output.writeMessageBegin("reportRooms", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportRooms", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportRooms(args.syncOpRevision, args.rooms, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_reportRooms_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("reportRooms", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportRooms", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findAndAddContactByMetaTag = function(seqid, input, output) { var args = new TalkService_findAndAddContactByMetaTag_args(); args.read(input); input.readMessageEnd(); if (this._handler.findAndAddContactByMetaTag.length === 3) { Q.fcall(this._handler.findAndAddContactByMetaTag, args.reqSeq, args.userid, args.reference) .then(function(result) { var result_obj = new TalkService_findAndAddContactByMetaTag_result({success: result}); output.writeMessageBegin("findAndAddContactByMetaTag", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findAndAddContactByMetaTag_result(err); output.writeMessageBegin("findAndAddContactByMetaTag", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findAndAddContactByMetaTag", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findAndAddContactByMetaTag(args.reqSeq, args.userid, args.reference, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findAndAddContactByMetaTag_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findAndAddContactByMetaTag", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findAndAddContactByMetaTag", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_reportSettings = function(seqid, input, output) { var args = new TalkService_reportSettings_args(); args.read(input); input.readMessageEnd(); if (this._handler.reportSettings.length === 2) { Q.fcall(this._handler.reportSettings, args.syncOpRevision, args.settings) .then(function(result) { var result_obj = new TalkService_reportSettings_result({success: result}); output.writeMessageBegin("reportSettings", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_reportSettings_result(err); output.writeMessageBegin("reportSettings", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportSettings", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportSettings(args.syncOpRevision, args.settings, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_reportSettings_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("reportSettings", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportSettings", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_reportSpam = function(seqid, input, output) { var args = new TalkService_reportSpam_args(); args.read(input); input.readMessageEnd(); if (this._handler.reportSpam.length === 6) { Q.fcall(this._handler.reportSpam, args.chatMid, args.memberMids, args.spammerReasons, args.senderMids, args.spamMessageIds, args.spamMessages) .then(function(result) { var result_obj = new TalkService_reportSpam_result({success: result}); output.writeMessageBegin("reportSpam", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_reportSpam_result(err); output.writeMessageBegin("reportSpam", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportSpam", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportSpam(args.chatMid, args.memberMids, args.spammerReasons, args.senderMids, args.spamMessageIds, args.spamMessages, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_reportSpam_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("reportSpam", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportSpam", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_reportSpammer = function(seqid, input, output) { var args = new TalkService_reportSpammer_args(); args.read(input); input.readMessageEnd(); if (this._handler.reportSpammer.length === 3) { Q.fcall(this._handler.reportSpammer, args.spammerMid, args.spammerReasons, args.spamMessageIds) .then(function(result) { var result_obj = new TalkService_reportSpammer_result({success: result}); output.writeMessageBegin("reportSpammer", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_reportSpammer_result(err); output.writeMessageBegin("reportSpammer", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportSpammer", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportSpammer(args.spammerMid, args.spammerReasons, args.spamMessageIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_reportSpammer_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("reportSpammer", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("reportSpammer", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_requestAccountPasswordReset = function(seqid, input, output) { var args = new TalkService_requestAccountPasswordReset_args(); args.read(input); input.readMessageEnd(); if (this._handler.requestAccountPasswordReset.length === 3) { Q.fcall(this._handler.requestAccountPasswordReset, args.provider, args.identifier, args.locale) .then(function(result) { var result_obj = new TalkService_requestAccountPasswordReset_result({success: result}); output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_requestAccountPasswordReset_result(err); output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.requestAccountPasswordReset(args.provider, args.identifier, args.locale, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_requestAccountPasswordReset_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_requestEmailConfirmation = function(seqid, input, output) { var args = new TalkService_requestEmailConfirmation_args(); args.read(input); input.readMessageEnd(); if (this._handler.requestEmailConfirmation.length === 1) { Q.fcall(this._handler.requestEmailConfirmation, args.emailConfirmation) .then(function(result) { var result_obj = new TalkService_requestEmailConfirmation_result({success: result}); output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_requestEmailConfirmation_result(err); output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.requestEmailConfirmation(args.emailConfirmation, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_requestEmailConfirmation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_requestIdentityUnbind = function(seqid, input, output) { var args = new TalkService_requestIdentityUnbind_args(); args.read(input); input.readMessageEnd(); if (this._handler.requestIdentityUnbind.length === 2) { Q.fcall(this._handler.requestIdentityUnbind, args.provider, args.identifier) .then(function(result) { var result_obj = new TalkService_requestIdentityUnbind_result({success: result}); output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_requestIdentityUnbind_result(err); output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.requestIdentityUnbind(args.provider, args.identifier, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_requestIdentityUnbind_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_resendEmailConfirmation = function(seqid, input, output) { var args = new TalkService_resendEmailConfirmation_args(); args.read(input); input.readMessageEnd(); if (this._handler.resendEmailConfirmation.length === 1) { Q.fcall(this._handler.resendEmailConfirmation, args.verifier) .then(function(result) { var result_obj = new TalkService_resendEmailConfirmation_result({success: result}); output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_resendEmailConfirmation_result(err); output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.resendEmailConfirmation(args.verifier, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_resendEmailConfirmation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_resendPinCode = function(seqid, input, output) { var args = new TalkService_resendPinCode_args(); args.read(input); input.readMessageEnd(); if (this._handler.resendPinCode.length === 1) { Q.fcall(this._handler.resendPinCode, args.sessionId) .then(function(result) { var result_obj = new TalkService_resendPinCode_result({success: result}); output.writeMessageBegin("resendPinCode", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_resendPinCode_result(err); output.writeMessageBegin("resendPinCode", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("resendPinCode", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.resendPinCode(args.sessionId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_resendPinCode_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("resendPinCode", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("resendPinCode", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_resendPinCodeBySMS = function(seqid, input, output) { var args = new TalkService_resendPinCodeBySMS_args(); args.read(input); input.readMessageEnd(); if (this._handler.resendPinCodeBySMS.length === 1) { Q.fcall(this._handler.resendPinCodeBySMS, args.sessionId) .then(function(result) { var result_obj = new TalkService_resendPinCodeBySMS_result({success: result}); output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_resendPinCodeBySMS_result(err); output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.resendPinCodeBySMS(args.sessionId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_resendPinCodeBySMS_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_sendChatChecked = function(seqid, input, output) { var args = new TalkService_sendChatChecked_args(); args.read(input); input.readMessageEnd(); if (this._handler.sendChatChecked.length === 3) { Q.fcall(this._handler.sendChatChecked, args.seq, args.consumer, args.lastMessageId) .then(function(result) { var result_obj = new TalkService_sendChatChecked_result({success: result}); output.writeMessageBegin("sendChatChecked", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_sendChatChecked_result(err); output.writeMessageBegin("sendChatChecked", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendChatChecked", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendChatChecked(args.seq, args.consumer, args.lastMessageId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_sendChatChecked_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("sendChatChecked", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendChatChecked", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_sendMessageAwaitCommit = function(seqid, input, output) { var args = new TalkService_sendMessageAwaitCommit_args(); args.read(input); input.readMessageEnd(); if (this._handler.sendMessageAwaitCommit.length === 2) { Q.fcall(this._handler.sendMessageAwaitCommit, args.seq, args.message) .then(function(result) { var result_obj = new TalkService_sendMessageAwaitCommit_result({success: result}); output.writeMessageBegin("sendMessageAwaitCommit", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_sendMessageAwaitCommit_result(err); output.writeMessageBegin("sendMessageAwaitCommit", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendMessageAwaitCommit", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendMessageAwaitCommit(args.seq, args.message, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_sendMessageAwaitCommit_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("sendMessageAwaitCommit", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendMessageAwaitCommit", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_sendChatRemoved = function(seqid, input, output) { var args = new TalkService_sendChatRemoved_args(); args.read(input); input.readMessageEnd(); if (this._handler.sendChatRemoved.length === 3) { Q.fcall(this._handler.sendChatRemoved, args.seq, args.consumer, args.lastMessageId) .then(function(result) { var result_obj = new TalkService_sendChatRemoved_result({success: result}); output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_sendChatRemoved_result(err); output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendChatRemoved(args.seq, args.consumer, args.lastMessageId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_sendChatRemoved_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_sendContentPreviewUpdated = function(seqid, input, output) { var args = new TalkService_sendContentPreviewUpdated_args(); args.read(input); input.readMessageEnd(); if (this._handler.sendContentPreviewUpdated.length === 3) { Q.fcall(this._handler.sendContentPreviewUpdated, args.esq, args.messageId, args.receiverMids) .then(function(result) { var result_obj = new TalkService_sendContentPreviewUpdated_result({success: result}); output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_sendContentPreviewUpdated_result(err); output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendContentPreviewUpdated(args.esq, args.messageId, args.receiverMids, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_sendContentPreviewUpdated_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_sendContentReceipt = function(seqid, input, output) { var args = new TalkService_sendContentReceipt_args(); args.read(input); input.readMessageEnd(); if (this._handler.sendContentReceipt.length === 3) { Q.fcall(this._handler.sendContentReceipt, args.seq, args.consumer, args.messageId) .then(function(result) { var result_obj = new TalkService_sendContentReceipt_result({success: result}); output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_sendContentReceipt_result(err); output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendContentReceipt(args.seq, args.consumer, args.messageId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_sendContentReceipt_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_sendDummyPush = function(seqid, input, output) { var args = new TalkService_sendDummyPush_args(); args.read(input); input.readMessageEnd(); if (this._handler.sendDummyPush.length === 0) { Q.fcall(this._handler.sendDummyPush) .then(function(result) { var result_obj = new TalkService_sendDummyPush_result({success: result}); output.writeMessageBegin("sendDummyPush", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_sendDummyPush_result(err); output.writeMessageBegin("sendDummyPush", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendDummyPush", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendDummyPush(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_sendDummyPush_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("sendDummyPush", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendDummyPush", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_removeE2EEPublicKey = function(seqid, input, output) { var args = new TalkService_removeE2EEPublicKey_args(); args.read(input); input.readMessageEnd(); if (this._handler.removeE2EEPublicKey.length === 1) { Q.fcall(this._handler.removeE2EEPublicKey, args.publicKey) .then(function(result) { var result_obj = new TalkService_removeE2EEPublicKey_result({success: result}); output.writeMessageBegin("removeE2EEPublicKey", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_removeE2EEPublicKey_result(err); output.writeMessageBegin("removeE2EEPublicKey", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeE2EEPublicKey", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeE2EEPublicKey(args.publicKey, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_removeE2EEPublicKey_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("removeE2EEPublicKey", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("removeE2EEPublicKey", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_negotiateE2EEPublicKey = function(seqid, input, output) { var args = new TalkService_negotiateE2EEPublicKey_args(); args.read(input); input.readMessageEnd(); if (this._handler.negotiateE2EEPublicKey.length === 1) { Q.fcall(this._handler.negotiateE2EEPublicKey, args.mid) .then(function(result) { var result_obj = new TalkService_negotiateE2EEPublicKey_result({success: result}); output.writeMessageBegin("negotiateE2EEPublicKey", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_negotiateE2EEPublicKey_result(err); output.writeMessageBegin("negotiateE2EEPublicKey", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("negotiateE2EEPublicKey", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.negotiateE2EEPublicKey(args.mid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_negotiateE2EEPublicKey_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("negotiateE2EEPublicKey", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("negotiateE2EEPublicKey", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getE2EEPublicKey = function(seqid, input, output) { var args = new TalkService_getE2EEPublicKey_args(); args.read(input); input.readMessageEnd(); if (this._handler.getE2EEPublicKey.length === 3) { Q.fcall(this._handler.getE2EEPublicKey, args.mid, args.version, args.keyId) .then(function(result) { var result_obj = new TalkService_getE2EEPublicKey_result({success: result}); output.writeMessageBegin("getE2EEPublicKey", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getE2EEPublicKey_result(err); output.writeMessageBegin("getE2EEPublicKey", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getE2EEPublicKey", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getE2EEPublicKey(args.mid, args.version, args.keyId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getE2EEPublicKey_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getE2EEPublicKey", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getE2EEPublicKey", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_requestE2EEKeyExchange = function(seqid, input, output) { var args = new TalkService_requestE2EEKeyExchange_args(); args.read(input); input.readMessageEnd(); if (this._handler.requestE2EEKeyExchange.length === 4) { Q.fcall(this._handler.requestE2EEKeyExchange, args.reqSeq, args.temporalPublicKey, args.publicKey, args.verifier) .then(function(result) { var result_obj = new TalkService_requestE2EEKeyExchange_result({success: result}); output.writeMessageBegin("requestE2EEKeyExchange", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_requestE2EEKeyExchange_result(err); output.writeMessageBegin("requestE2EEKeyExchange", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("requestE2EEKeyExchange", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.requestE2EEKeyExchange(args.reqSeq, args.temporalPublicKey, args.publicKey, args.verifier, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_requestE2EEKeyExchange_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("requestE2EEKeyExchange", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("requestE2EEKeyExchange", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getLastE2EEPublicKeys = function(seqid, input, output) { var args = new TalkService_getLastE2EEPublicKeys_args(); args.read(input); input.readMessageEnd(); if (this._handler.getLastE2EEPublicKeys.length === 1) { Q.fcall(this._handler.getLastE2EEPublicKeys, args.chatMid) .then(function(result) { var result_obj = new TalkService_getLastE2EEPublicKeys_result({success: result}); output.writeMessageBegin("getLastE2EEPublicKeys", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getLastE2EEPublicKeys_result(err); output.writeMessageBegin("getLastE2EEPublicKeys", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getLastE2EEPublicKeys", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getLastE2EEPublicKeys(args.chatMid, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getLastE2EEPublicKeys_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getLastE2EEPublicKeys", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getLastE2EEPublicKeys", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_registerE2EEPublicKey = function(seqid, input, output) { var args = new TalkService_registerE2EEPublicKey_args(); args.read(input); input.readMessageEnd(); if (this._handler.registerE2EEPublicKey.length === 2) { Q.fcall(this._handler.registerE2EEPublicKey, args.reqSeq, args.publicKey) .then(function(result) { var result_obj = new TalkService_registerE2EEPublicKey_result({success: result}); output.writeMessageBegin("registerE2EEPublicKey", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_registerE2EEPublicKey_result(err); output.writeMessageBegin("registerE2EEPublicKey", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerE2EEPublicKey", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerE2EEPublicKey(args.reqSeq, args.publicKey, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_registerE2EEPublicKey_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("registerE2EEPublicKey", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("registerE2EEPublicKey", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getE2EEPublicKeys = function(seqid, input, output) { var args = new TalkService_getE2EEPublicKeys_args(); args.read(input); input.readMessageEnd(); if (this._handler.getE2EEPublicKeys.length === 0) { Q.fcall(this._handler.getE2EEPublicKeys) .then(function(result) { var result_obj = new TalkService_getE2EEPublicKeys_result({success: result}); output.writeMessageBegin("getE2EEPublicKeys", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getE2EEPublicKeys_result(err); output.writeMessageBegin("getE2EEPublicKeys", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getE2EEPublicKeys", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getE2EEPublicKeys(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getE2EEPublicKeys_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getE2EEPublicKeys", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getE2EEPublicKeys", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getE2EEPublicKeysEx = function(seqid, input, output) { var args = new TalkService_getE2EEPublicKeysEx_args(); args.read(input); input.readMessageEnd(); if (this._handler.getE2EEPublicKeysEx.length === 1) { Q.fcall(this._handler.getE2EEPublicKeysEx, args.ignoreE2EEStatus) .then(function(result) { var result_obj = new TalkService_getE2EEPublicKeysEx_result({success: result}); output.writeMessageBegin("getE2EEPublicKeysEx", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getE2EEPublicKeysEx_result(err); output.writeMessageBegin("getE2EEPublicKeysEx", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getE2EEPublicKeysEx", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getE2EEPublicKeysEx(args.ignoreE2EEStatus, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getE2EEPublicKeysEx_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getE2EEPublicKeysEx", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getE2EEPublicKeysEx", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getReadMessageOpsInBulk = function(seqid, input, output) { var args = new TalkService_getReadMessageOpsInBulk_args(); args.read(input); input.readMessageEnd(); if (this._handler.getReadMessageOpsInBulk.length === 1) { Q.fcall(this._handler.getReadMessageOpsInBulk, args.chatIds) .then(function(result) { var result_obj = new TalkService_getReadMessageOpsInBulk_result({success: result}); output.writeMessageBegin("getReadMessageOpsInBulk", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getReadMessageOpsInBulk_result(err); output.writeMessageBegin("getReadMessageOpsInBulk", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getReadMessageOpsInBulk", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getReadMessageOpsInBulk(args.chatIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getReadMessageOpsInBulk_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getReadMessageOpsInBulk", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getReadMessageOpsInBulk", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_sendEvent = function(seqid, input, output) { var args = new TalkService_sendEvent_args(); args.read(input); input.readMessageEnd(); if (this._handler.sendEvent.length === 2) { Q.fcall(this._handler.sendEvent, args.seq, args.message) .then(function(result) { var result_obj = new TalkService_sendEvent_result({success: result}); output.writeMessageBegin("sendEvent", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_sendEvent_result(err); output.writeMessageBegin("sendEvent", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendEvent", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendEvent(args.seq, args.message, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_sendEvent_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("sendEvent", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendEvent", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_sendMessage = function(seqid, input, output) { var args = new TalkService_sendMessage_args(); args.read(input); input.readMessageEnd(); if (this._handler.sendMessage.length === 2) { Q.fcall(this._handler.sendMessage, args.seq, args.message) .then(function(result) { var result_obj = new TalkService_sendMessage_result({success: result}); output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_sendMessage_result(err); output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendMessage", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendMessage(args.seq, args.message, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_sendMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendMessage", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_sendMessageIgnored = function(seqid, input, output) { var args = new TalkService_sendMessageIgnored_args(); args.read(input); input.readMessageEnd(); if (this._handler.sendMessageIgnored.length === 3) { Q.fcall(this._handler.sendMessageIgnored, args.seq, args.consumer, args.messageIds) .then(function(result) { var result_obj = new TalkService_sendMessageIgnored_result({success: result}); output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_sendMessageIgnored_result(err); output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendMessageIgnored(args.seq, args.consumer, args.messageIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_sendMessageIgnored_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_sendMessageReceipt = function(seqid, input, output) { var args = new TalkService_sendMessageReceipt_args(); args.read(input); input.readMessageEnd(); if (this._handler.sendMessageReceipt.length === 3) { Q.fcall(this._handler.sendMessageReceipt, args.seq, args.consumer, args.messageIds) .then(function(result) { var result_obj = new TalkService_sendMessageReceipt_result({success: result}); output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_sendMessageReceipt_result(err); output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendMessageReceipt(args.seq, args.consumer, args.messageIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_sendMessageReceipt_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_findContactByMetaTag = function(seqid, input, output) { var args = new TalkService_findContactByMetaTag_args(); args.read(input); input.readMessageEnd(); if (this._handler.findContactByMetaTag.length === 2) { Q.fcall(this._handler.findContactByMetaTag, args.userid, args.reference) .then(function(result) { var result_obj = new TalkService_findContactByMetaTag_result({success: result}); output.writeMessageBegin("findContactByMetaTag", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_findContactByMetaTag_result(err); output.writeMessageBegin("findContactByMetaTag", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findContactByMetaTag", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findContactByMetaTag(args.userid, args.reference, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_findContactByMetaTag_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("findContactByMetaTag", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("findContactByMetaTag", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_sendMessageToMyHome = function(seqid, input, output) { var args = new TalkService_sendMessageToMyHome_args(); args.read(input); input.readMessageEnd(); if (this._handler.sendMessageToMyHome.length === 2) { Q.fcall(this._handler.sendMessageToMyHome, args.seq, args.message) .then(function(result) { var result_obj = new TalkService_sendMessageToMyHome_result({success: result}); output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_sendMessageToMyHome_result(err); output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendMessageToMyHome(args.seq, args.message, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_sendMessageToMyHome_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_setBuddyLocation = function(seqid, input, output) { var args = new TalkService_setBuddyLocation_args(); args.read(input); input.readMessageEnd(); if (this._handler.setBuddyLocation.length === 3) { Q.fcall(this._handler.setBuddyLocation, args.mid, args.index, args.location) .then(function(result) { var result_obj = new TalkService_setBuddyLocation_result({success: result}); output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_setBuddyLocation_result(err); output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.setBuddyLocation(args.mid, args.index, args.location, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_setBuddyLocation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_setIdentityCredential = function(seqid, input, output) { var args = new TalkService_setIdentityCredential_args(); args.read(input); input.readMessageEnd(); if (this._handler.setIdentityCredential.length === 3) { Q.fcall(this._handler.setIdentityCredential, args.identifier, args.verifier, args.provider) .then(function(result) { var result_obj = new TalkService_setIdentityCredential_result({success: result}); output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_setIdentityCredential_result(err); output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.setIdentityCredential(args.identifier, args.verifier, args.provider, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_setIdentityCredential_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_setNotificationsEnabled = function(seqid, input, output) { var args = new TalkService_setNotificationsEnabled_args(); args.read(input); input.readMessageEnd(); if (this._handler.setNotificationsEnabled.length === 4) { Q.fcall(this._handler.setNotificationsEnabled, args.reqSeq, args.type, args.target, args.enablement) .then(function(result) { var result_obj = new TalkService_setNotificationsEnabled_result({success: result}); output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_setNotificationsEnabled_result(err); output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.setNotificationsEnabled(args.reqSeq, args.type, args.target, args.enablement, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_setNotificationsEnabled_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_startUpdateVerification = function(seqid, input, output) { var args = new TalkService_startUpdateVerification_args(); args.read(input); input.readMessageEnd(); if (this._handler.startUpdateVerification.length === 7) { Q.fcall(this._handler.startUpdateVerification, args.region, args.carrier, args.phone, args.udidHash, args.deviceInfo, args.networkCode, args.locale) .then(function(result) { var result_obj = new TalkService_startUpdateVerification_result({success: result}); output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_startUpdateVerification_result(err); output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.startUpdateVerification(args.region, args.carrier, args.phone, args.udidHash, args.deviceInfo, args.networkCode, args.locale, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_startUpdateVerification_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_startVerification = function(seqid, input, output) { var args = new TalkService_startVerification_args(); args.read(input); input.readMessageEnd(); if (this._handler.startVerification.length === 10) { Q.fcall(this._handler.startVerification, args.region, args.carrier, args.phone, args.udidHash, args.deviceInfo, args.networkCode, args.mid, args.locale, args.simInfo, args.oldUdidHash) .then(function(result) { var result_obj = new TalkService_startVerification_result({success: result}); output.writeMessageBegin("startVerification", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_startVerification_result(err); output.writeMessageBegin("startVerification", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("startVerification", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.startVerification(args.region, args.carrier, args.phone, args.udidHash, args.deviceInfo, args.networkCode, args.mid, args.locale, args.simInfo, args.oldUdidHash, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_startVerification_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("startVerification", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("startVerification", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateGroupPreferenceAttribute = function(seqid, input, output) { var args = new TalkService_updateGroupPreferenceAttribute_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateGroupPreferenceAttribute.length === 3) { Q.fcall(this._handler.updateGroupPreferenceAttribute, args.reqSeq, args.groupMid, args.updatedAttrs) .then(function(result) { var result_obj = new TalkService_updateGroupPreferenceAttribute_result({success: result}); output.writeMessageBegin("updateGroupPreferenceAttribute", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateGroupPreferenceAttribute_result(err); output.writeMessageBegin("updateGroupPreferenceAttribute", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateGroupPreferenceAttribute", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateGroupPreferenceAttribute(args.reqSeq, args.groupMid, args.updatedAttrs, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateGroupPreferenceAttribute_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateGroupPreferenceAttribute", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateGroupPreferenceAttribute", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_createRoomV2 = function(seqid, input, output) { var args = new TalkService_createRoomV2_args(); args.read(input); input.readMessageEnd(); if (this._handler.createRoomV2.length === 2) { Q.fcall(this._handler.createRoomV2, args.reqSeq, args.contactIds) .then(function(result) { var result_obj = new TalkService_createRoomV2_result({success: result}); output.writeMessageBegin("createRoomV2", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_createRoomV2_result(err); output.writeMessageBegin("createRoomV2", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createRoomV2", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.createRoomV2(args.reqSeq, args.contactIds, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_createRoomV2_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("createRoomV2", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("createRoomV2", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_storeUpdateProfileAttribute = function(seqid, input, output) { var args = new TalkService_storeUpdateProfileAttribute_args(); args.read(input); input.readMessageEnd(); if (this._handler.storeUpdateProfileAttribute.length === 3) { Q.fcall(this._handler.storeUpdateProfileAttribute, args.seq, args.profileAttribute, args.value) .then(function(result) { var result_obj = new TalkService_storeUpdateProfileAttribute_result({success: result}); output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_storeUpdateProfileAttribute_result(err); output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.storeUpdateProfileAttribute(args.seq, args.profileAttribute, args.value, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_storeUpdateProfileAttribute_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_syncContactBySnsIds = function(seqid, input, output) { var args = new TalkService_syncContactBySnsIds_args(); args.read(input); input.readMessageEnd(); if (this._handler.syncContactBySnsIds.length === 2) { Q.fcall(this._handler.syncContactBySnsIds, args.reqSeq, args.modifications) .then(function(result) { var result_obj = new TalkService_syncContactBySnsIds_result({success: result}); output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_syncContactBySnsIds_result(err); output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.syncContactBySnsIds(args.reqSeq, args.modifications, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_syncContactBySnsIds_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_syncContacts = function(seqid, input, output) { var args = new TalkService_syncContacts_args(); args.read(input); input.readMessageEnd(); if (this._handler.syncContacts.length === 2) { Q.fcall(this._handler.syncContacts, args.reqSeq, args.localContacts) .then(function(result) { var result_obj = new TalkService_syncContacts_result({success: result}); output.writeMessageBegin("syncContacts", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_syncContacts_result(err); output.writeMessageBegin("syncContacts", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("syncContacts", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.syncContacts(args.reqSeq, args.localContacts, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_syncContacts_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("syncContacts", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("syncContacts", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_trySendMessage = function(seqid, input, output) { var args = new TalkService_trySendMessage_args(); args.read(input); input.readMessageEnd(); if (this._handler.trySendMessage.length === 2) { Q.fcall(this._handler.trySendMessage, args.seq, args.message) .then(function(result) { var result_obj = new TalkService_trySendMessage_result({success: result}); output.writeMessageBegin("trySendMessage", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_trySendMessage_result(err); output.writeMessageBegin("trySendMessage", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("trySendMessage", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.trySendMessage(args.seq, args.message, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_trySendMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("trySendMessage", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("trySendMessage", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getNextMessagesV2 = function(seqid, input, output) { var args = new TalkService_getNextMessagesV2_args(); args.read(input); input.readMessageEnd(); if (this._handler.getNextMessagesV2.length === 3) { Q.fcall(this._handler.getNextMessagesV2, args.messageBoxId, args.startMessageId, args.messagesCount) .then(function(result) { var result_obj = new TalkService_getNextMessagesV2_result({success: result}); output.writeMessageBegin("getNextMessagesV2", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getNextMessagesV2_result(err); output.writeMessageBegin("getNextMessagesV2", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getNextMessagesV2", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getNextMessagesV2(args.messageBoxId, args.startMessageId, args.messagesCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getNextMessagesV2_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getNextMessagesV2", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getNextMessagesV2", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getMessageBoxCompactWrapUpV2 = function(seqid, input, output) { var args = new TalkService_getMessageBoxCompactWrapUpV2_args(); args.read(input); input.readMessageEnd(); if (this._handler.getMessageBoxCompactWrapUpV2.length === 1) { Q.fcall(this._handler.getMessageBoxCompactWrapUpV2, args.messageBoxId) .then(function(result) { var result_obj = new TalkService_getMessageBoxCompactWrapUpV2_result({success: result}); output.writeMessageBegin("getMessageBoxCompactWrapUpV2", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getMessageBoxCompactWrapUpV2_result(err); output.writeMessageBegin("getMessageBoxCompactWrapUpV2", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxCompactWrapUpV2", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxCompactWrapUpV2(args.messageBoxId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getMessageBoxCompactWrapUpV2_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getMessageBoxCompactWrapUpV2", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getMessageBoxCompactWrapUpV2", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_getRecentMessagesV2 = function(seqid, input, output) { var args = new TalkService_getRecentMessagesV2_args(); args.read(input); input.readMessageEnd(); if (this._handler.getRecentMessagesV2.length === 2) { Q.fcall(this._handler.getRecentMessagesV2, args.messageBoxId, args.messagesCount) .then(function(result) { var result_obj = new TalkService_getRecentMessagesV2_result({success: result}); output.writeMessageBegin("getRecentMessagesV2", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_getRecentMessagesV2_result(err); output.writeMessageBegin("getRecentMessagesV2", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getRecentMessagesV2", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getRecentMessagesV2(args.messageBoxId, args.messagesCount, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_getRecentMessagesV2_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("getRecentMessagesV2", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("getRecentMessagesV2", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_validateContactsOnBot = function(seqid, input, output) { var args = new TalkService_validateContactsOnBot_args(); args.read(input); input.readMessageEnd(); if (this._handler.validateContactsOnBot.length === 1) { Q.fcall(this._handler.validateContactsOnBot, args.contacts) .then(function(result) { var result_obj = new TalkService_validateContactsOnBot_result({success: result}); output.writeMessageBegin("validateContactsOnBot", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_validateContactsOnBot_result(err); output.writeMessageBegin("validateContactsOnBot", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("validateContactsOnBot", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.validateContactsOnBot(args.contacts, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_validateContactsOnBot_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("validateContactsOnBot", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("validateContactsOnBot", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_tryFriendRequest = function(seqid, input, output) { var args = new TalkService_tryFriendRequest_args(); args.read(input); input.readMessageEnd(); if (this._handler.tryFriendRequest.length === 3) { Q.fcall(this._handler.tryFriendRequest, args.midOrEMid, args.method, args.friendRequestParams) .then(function(result) { var result_obj = new TalkService_tryFriendRequest_result({success: result}); output.writeMessageBegin("tryFriendRequest", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_tryFriendRequest_result(err); output.writeMessageBegin("tryFriendRequest", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("tryFriendRequest", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.tryFriendRequest(args.midOrEMid, args.method, args.friendRequestParams, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_tryFriendRequest_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("tryFriendRequest", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("tryFriendRequest", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_unblockContact = function(seqid, input, output) { var args = new TalkService_unblockContact_args(); args.read(input); input.readMessageEnd(); if (this._handler.unblockContact.length === 2) { Q.fcall(this._handler.unblockContact, args.reqSeq, args.id) .then(function(result) { var result_obj = new TalkService_unblockContact_result({success: result}); output.writeMessageBegin("unblockContact", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_unblockContact_result(err); output.writeMessageBegin("unblockContact", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("unblockContact", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.unblockContact(args.reqSeq, args.id, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_unblockContact_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("unblockContact", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("unblockContact", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_unblockRecommendation = function(seqid, input, output) { var args = new TalkService_unblockRecommendation_args(); args.read(input); input.readMessageEnd(); if (this._handler.unblockRecommendation.length === 2) { Q.fcall(this._handler.unblockRecommendation, args.reqSeq, args.id) .then(function(result) { var result_obj = new TalkService_unblockRecommendation_result({success: result}); output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_unblockRecommendation_result(err); output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.unblockRecommendation(args.reqSeq, args.id, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_unblockRecommendation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_unregisterUserAndDevice = function(seqid, input, output) { var args = new TalkService_unregisterUserAndDevice_args(); args.read(input); input.readMessageEnd(); if (this._handler.unregisterUserAndDevice.length === 0) { Q.fcall(this._handler.unregisterUserAndDevice) .then(function(result) { var result_obj = new TalkService_unregisterUserAndDevice_result({success: result}); output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_unregisterUserAndDevice_result(err); output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.unregisterUserAndDevice(function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_unregisterUserAndDevice_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateApnsDeviceToken = function(seqid, input, output) { var args = new TalkService_updateApnsDeviceToken_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateApnsDeviceToken.length === 1) { Q.fcall(this._handler.updateApnsDeviceToken, args.apnsDeviceToken) .then(function(result) { var result_obj = new TalkService_updateApnsDeviceToken_result({success: result}); output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateApnsDeviceToken_result(err); output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateApnsDeviceToken(args.apnsDeviceToken, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateApnsDeviceToken_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateBuddySetting = function(seqid, input, output) { var args = new TalkService_updateBuddySetting_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateBuddySetting.length === 2) { Q.fcall(this._handler.updateBuddySetting, args.key, args.value) .then(function(result) { var result_obj = new TalkService_updateBuddySetting_result({success: result}); output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateBuddySetting_result(err); output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateBuddySetting(args.key, args.value, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateBuddySetting_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateC2DMRegistrationId = function(seqid, input, output) { var args = new TalkService_updateC2DMRegistrationId_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateC2DMRegistrationId.length === 1) { Q.fcall(this._handler.updateC2DMRegistrationId, args.registrationId) .then(function(result) { var result_obj = new TalkService_updateC2DMRegistrationId_result({success: result}); output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateC2DMRegistrationId_result(err); output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateC2DMRegistrationId(args.registrationId, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateC2DMRegistrationId_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateContactSetting = function(seqid, input, output) { var args = new TalkService_updateContactSetting_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateContactSetting.length === 4) { Q.fcall(this._handler.updateContactSetting, args.reqSeq, args.mid, args.flag, args.value) .then(function(result) { var result_obj = new TalkService_updateContactSetting_result({success: result}); output.writeMessageBegin("updateContactSetting", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateContactSetting_result(err); output.writeMessageBegin("updateContactSetting", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateContactSetting", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateContactSetting(args.reqSeq, args.mid, args.flag, args.value, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateContactSetting_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateContactSetting", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateContactSetting", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateCustomModeSettings = function(seqid, input, output) { var args = new TalkService_updateCustomModeSettings_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateCustomModeSettings.length === 2) { Q.fcall(this._handler.updateCustomModeSettings, args.customMode, args.paramMap) .then(function(result) { var result_obj = new TalkService_updateCustomModeSettings_result({success: result}); output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateCustomModeSettings_result(err); output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateCustomModeSettings(args.customMode, args.paramMap, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateCustomModeSettings_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateDeviceInfo = function(seqid, input, output) { var args = new TalkService_updateDeviceInfo_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateDeviceInfo.length === 2) { Q.fcall(this._handler.updateDeviceInfo, args.deviceUid, args.deviceInfo) .then(function(result) { var result_obj = new TalkService_updateDeviceInfo_result({success: result}); output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateDeviceInfo_result(err); output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateDeviceInfo(args.deviceUid, args.deviceInfo, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateDeviceInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateGroup = function(seqid, input, output) { var args = new TalkService_updateGroup_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateGroup.length === 2) { Q.fcall(this._handler.updateGroup, args.reqSeq, args.group) .then(function(result) { var result_obj = new TalkService_updateGroup_result({success: result}); output.writeMessageBegin("updateGroup", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateGroup_result(err); output.writeMessageBegin("updateGroup", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateGroup", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateGroup(args.reqSeq, args.group, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateGroup_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateGroup", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateGroup", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateNotificationToken = function(seqid, input, output) { var args = new TalkService_updateNotificationToken_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateNotificationToken.length === 2) { Q.fcall(this._handler.updateNotificationToken, args.type, args.token) .then(function(result) { var result_obj = new TalkService_updateNotificationToken_result({success: result}); output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateNotificationToken_result(err); output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateNotificationToken(args.type, args.token, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateNotificationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateNotificationTokenWithBytes = function(seqid, input, output) { var args = new TalkService_updateNotificationTokenWithBytes_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateNotificationTokenWithBytes.length === 2) { Q.fcall(this._handler.updateNotificationTokenWithBytes, args.type, args.token) .then(function(result) { var result_obj = new TalkService_updateNotificationTokenWithBytes_result({success: result}); output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateNotificationTokenWithBytes_result(err); output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateNotificationTokenWithBytes(args.type, args.token, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateNotificationTokenWithBytes_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateProfile = function(seqid, input, output) { var args = new TalkService_updateProfile_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateProfile.length === 2) { Q.fcall(this._handler.updateProfile, args.reqSeq, args.profile) .then(function(result) { var result_obj = new TalkService_updateProfile_result({success: result}); output.writeMessageBegin("updateProfile", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateProfile_result(err); output.writeMessageBegin("updateProfile", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateProfile", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateProfile(args.reqSeq, args.profile, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateProfile_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateProfile", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateProfile", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateProfileAttribute = function(seqid, input, output) { var args = new TalkService_updateProfileAttribute_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateProfileAttribute.length === 3) { Q.fcall(this._handler.updateProfileAttribute, args.reqSeq, args.attr, args.value) .then(function(result) { var result_obj = new TalkService_updateProfileAttribute_result({success: result}); output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateProfileAttribute_result(err); output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateProfileAttribute(args.reqSeq, args.attr, args.value, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateProfileAttribute_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateRegion = function(seqid, input, output) { var args = new TalkService_updateRegion_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateRegion.length === 1) { Q.fcall(this._handler.updateRegion, args.region) .then(function(result) { var result_obj = new TalkService_updateRegion_result({success: result}); output.writeMessageBegin("updateRegion", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateRegion_result(err); output.writeMessageBegin("updateRegion", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateRegion", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateRegion(args.region, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateRegion_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateRegion", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateRegion", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateSettings = function(seqid, input, output) { var args = new TalkService_updateSettings_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateSettings.length === 2) { Q.fcall(this._handler.updateSettings, args.reqSeq, args.settings) .then(function(result) { var result_obj = new TalkService_updateSettings_result({success: result}); output.writeMessageBegin("updateSettings", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateSettings_result(err); output.writeMessageBegin("updateSettings", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateSettings", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateSettings(args.reqSeq, args.settings, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateSettings_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateSettings", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateSettings", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateSettings2 = function(seqid, input, output) { var args = new TalkService_updateSettings2_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateSettings2.length === 2) { Q.fcall(this._handler.updateSettings2, args.reqSeq, args.settings) .then(function(result) { var result_obj = new TalkService_updateSettings2_result({success: result}); output.writeMessageBegin("updateSettings2", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateSettings2_result(err); output.writeMessageBegin("updateSettings2", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateSettings2", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateSettings2(args.reqSeq, args.settings, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateSettings2_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateSettings2", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateSettings2", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateSettingsAttribute = function(seqid, input, output) { var args = new TalkService_updateSettingsAttribute_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateSettingsAttribute.length === 3) { Q.fcall(this._handler.updateSettingsAttribute, args.reqSeq, args.attr, args.value) .then(function(result) { var result_obj = new TalkService_updateSettingsAttribute_result({success: result}); output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateSettingsAttribute_result(err); output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateSettingsAttribute(args.reqSeq, args.attr, args.value, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateSettingsAttribute_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_updateSettingsAttributes = function(seqid, input, output) { var args = new TalkService_updateSettingsAttributes_args(); args.read(input); input.readMessageEnd(); if (this._handler.updateSettingsAttributes.length === 3) { Q.fcall(this._handler.updateSettingsAttributes, args.reqSeq, args.attrBitset, args.settings) .then(function(result) { var result_obj = new TalkService_updateSettingsAttributes_result({success: result}); output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_updateSettingsAttributes_result(err); output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateSettingsAttributes(args.reqSeq, args.attrBitset, args.settings, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_updateSettingsAttributes_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_verifyIdentityCredential = function(seqid, input, output) { var args = new TalkService_verifyIdentityCredential_args(); args.read(input); input.readMessageEnd(); if (this._handler.verifyIdentityCredential.length === 3) { Q.fcall(this._handler.verifyIdentityCredential, args.identityProvider, args.identifier, args.password) .then(function(result) { var result_obj = new TalkService_verifyIdentityCredential_result({success: result}); output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_verifyIdentityCredential_result(err); output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.verifyIdentityCredential(args.identityProvider, args.identifier, args.password, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_verifyIdentityCredential_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_verifyIdentityCredentialWithResult = function(seqid, input, output) { var args = new TalkService_verifyIdentityCredentialWithResult_args(); args.read(input); input.readMessageEnd(); if (this._handler.verifyIdentityCredentialWithResult.length === 1) { Q.fcall(this._handler.verifyIdentityCredentialWithResult, args.identityCredential) .then(function(result) { var result_obj = new TalkService_verifyIdentityCredentialWithResult_result({success: result}); output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_verifyIdentityCredentialWithResult_result(err); output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.verifyIdentityCredentialWithResult(args.identityCredential, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_verifyIdentityCredentialWithResult_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_verifyPhone = function(seqid, input, output) { var args = new TalkService_verifyPhone_args(); args.read(input); input.readMessageEnd(); if (this._handler.verifyPhone.length === 3) { Q.fcall(this._handler.verifyPhone, args.sessionId, args.pinCode, args.udidHash) .then(function(result) { var result_obj = new TalkService_verifyPhone_result({success: result}); output.writeMessageBegin("verifyPhone", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_verifyPhone_result(err); output.writeMessageBegin("verifyPhone", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyPhone", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.verifyPhone(args.sessionId, args.pinCode, args.udidHash, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_verifyPhone_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("verifyPhone", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyPhone", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } }; TalkServiceProcessor.prototype.process_verifyQrcode = function(seqid, input, output) { var args = new TalkService_verifyQrcode_args(); args.read(input); input.readMessageEnd(); if (this._handler.verifyQrcode.length === 2) { Q.fcall(this._handler.verifyQrcode, args.verifier, args.pinCode) .then(function(result) { var result_obj = new TalkService_verifyQrcode_result({success: result}); output.writeMessageBegin("verifyQrcode", Thrift.MessageType.REPLY, seqid); result_obj.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result; if (err instanceof ttypes.TalkException) { result = new TalkService_verifyQrcode_result(err); output.writeMessageBegin("verifyQrcode", Thrift.MessageType.REPLY, seqid); } else { result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyQrcode", Thrift.MessageType.EXCEPTION, seqid); } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.verifyQrcode(args.verifier, args.pinCode, function (err, result) { var result_obj; if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) { result_obj = new TalkService_verifyQrcode_result((err !== null || typeof err === 'undefined') ? err : {success: result}); output.writeMessageBegin("verifyQrcode", Thrift.MessageType.REPLY, seqid); } else { result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); output.writeMessageBegin("verifyQrcode", Thrift.MessageType.EXCEPTION, seqid); } result_obj.write(output); output.writeMessageEnd(); output.flush(); }); } };