// // Autogenerated by Thrift Compiler (0.9.2) // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // var thrift = require('thrift'); var Thrift = thrift.Thrift; var Q = thrift.Q; var ttypes = require('./line_types'); //HELPER FUNCTIONS AND STRUCTURES TalkService_acceptGroupInvitation_args = function(args) { this.reqSeq = null; this.groupId = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined) { 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; }; TalkService_acceptGroupInvitation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_acceptGroupInvitationByTicket_args = function(args) { this.reqSeq = null; this.groupId = null; this.ticketId = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined) { this.groupId = args.groupId; } if (args.ticketId !== undefined) { 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.groupId = 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.groupId !== null && this.groupId !== undefined) { output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); output.writeString(this.groupId); 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; }; TalkService_acceptGroupInvitationByTicket_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_acceptProximityMatches_args = function(args) { this.sessionId = null; this.ids = null; if (args) { if (args.sessionId !== undefined) { this.sessionId = args.sessionId; } if (args.ids !== undefined) { this.ids = args.ids; } } }; 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 _size800 = 0; var _rtmp3804; this.ids = []; var _etype803 = 0; _rtmp3804 = input.readSetBegin(); _etype803 = _rtmp3804.etype; _size800 = _rtmp3804.size; for (var _i805 = 0; _i805 < _size800; ++_i805) { var elem806 = null; elem806 = input.readString(); this.ids.push(elem806); } 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 iter807 in this.ids) { if (this.ids.hasOwnProperty(iter807)) { iter807 = this.ids[iter807]; output.writeString(iter807); } } output.writeSetEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_acceptProximityMatches_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_acquireCallRoute_args = function(args) { this.to = null; if (args) { if (args.to !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size808 = 0; var _rtmp3812; this.success = []; var _etype811 = 0; _rtmp3812 = input.readListBegin(); _etype811 = _rtmp3812.etype; _size808 = _rtmp3812.size; for (var _i813 = 0; _i813 < _size808; ++_i813) { var elem814 = null; elem814 = input.readString(); this.success.push(elem814); } 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 iter815 in this.success) { if (this.success.hasOwnProperty(iter815)) { iter815 = this.success[iter815]; output.writeString(iter815); } } 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; }; TalkService_acquireCallTicket_args = function(args) { this.to = null; if (args) { if (args.to !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_acquireEncryptedAccessToken_args = function(args) { this.featureType = null; if (args) { if (args.featureType !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_addSnsId_args = function(args) { this.snsIdType = null; this.snsAccessToken = null; if (args) { if (args.snsIdType !== undefined) { this.snsIdType = args.snsIdType; } if (args.snsAccessToken !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_blockContact_args = function(args) { this.reqSeq = null; this.id = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.id !== undefined) { 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; }; TalkService_blockContact_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_blockRecommendation_args = function(args) { this.reqSeq = null; this.id = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.id !== undefined) { 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; }; TalkService_blockRecommendation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_cancelGroupInvitation_args = function(args) { this.reqSeq = null; this.groupId = null; this.contactIds = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined) { this.groupId = args.groupId; } if (args.contactIds !== undefined) { this.contactIds = args.contactIds; } } }; 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 _size816 = 0; var _rtmp3820; this.contactIds = []; var _etype819 = 0; _rtmp3820 = input.readListBegin(); _etype819 = _rtmp3820.etype; _size816 = _rtmp3820.size; for (var _i821 = 0; _i821 < _size816; ++_i821) { var elem822 = null; elem822 = input.readString(); this.contactIds.push(elem822); } 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 iter823 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter823)) { iter823 = this.contactIds[iter823]; output.writeString(iter823); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_cancelGroupInvitation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_changeVerificationMethod_args = function(args) { this.sessionId = null; this.method = null; if (args) { if (args.sessionId !== undefined) { this.sessionId = args.sessionId; } if (args.method !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; TalkService_clearIdentityCredential_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_clearMessageBox_args = function(args) { this.channelId = null; this.messageBoxId = null; if (args) { if (args.channelId !== undefined) { this.channelId = args.channelId; } if (args.messageBoxId !== undefined) { 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; }; TalkService_clearMessageBox_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_closeProximityMatch_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined) { 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; }; TalkService_closeProximityMatch_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_commitSendMessage_args = function(args) { this.seq = null; this.messageId = null; this.receiverMids = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.messageId !== undefined) { this.messageId = args.messageId; } if (args.receiverMids !== undefined) { this.receiverMids = args.receiverMids; } } }; 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 _size824 = 0; var _rtmp3828; this.receiverMids = []; var _etype827 = 0; _rtmp3828 = input.readListBegin(); _etype827 = _rtmp3828.etype; _size824 = _rtmp3828.size; for (var _i829 = 0; _i829 < _size824; ++_i829) { var elem830 = null; elem830 = input.readString(); this.receiverMids.push(elem830); } 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 iter831 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter831)) { iter831 = this.receiverMids[iter831]; output.writeString(iter831); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size832 = 0; var _rtmp3836; this.success = {}; var _ktype833 = 0; var _vtype834 = 0; _rtmp3836 = input.readMapBegin(); _ktype833 = _rtmp3836.ktype; _vtype834 = _rtmp3836.vtype; _size832 = _rtmp3836.size; for (var _i837 = 0; _i837 < _size832; ++_i837) { var key838 = null; var val839 = null; key838 = input.readString(); val839 = input.readString(); this.success[key838] = val839; } 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 kiter840 in this.success) { if (this.success.hasOwnProperty(kiter840)) { var viter841 = this.success[kiter840]; output.writeString(kiter840); output.writeString(viter841); } } 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; }; TalkService_commitSendMessages_args = function(args) { this.seq = null; this.messageIds = null; this.receiverMids = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.messageIds !== undefined) { this.messageIds = args.messageIds; } if (args.receiverMids !== undefined) { this.receiverMids = args.receiverMids; } } }; 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 _size842 = 0; var _rtmp3846; this.messageIds = []; var _etype845 = 0; _rtmp3846 = input.readListBegin(); _etype845 = _rtmp3846.etype; _size842 = _rtmp3846.size; for (var _i847 = 0; _i847 < _size842; ++_i847) { var elem848 = null; elem848 = input.readString(); this.messageIds.push(elem848); } input.readListEnd(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size849 = 0; var _rtmp3853; this.receiverMids = []; var _etype852 = 0; _rtmp3853 = input.readListBegin(); _etype852 = _rtmp3853.etype; _size849 = _rtmp3853.size; for (var _i854 = 0; _i854 < _size849; ++_i854) { var elem855 = null; elem855 = input.readString(); this.receiverMids.push(elem855); } 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 iter856 in this.messageIds) { if (this.messageIds.hasOwnProperty(iter856)) { iter856 = this.messageIds[iter856]; output.writeString(iter856); } } 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 iter857 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter857)) { iter857 = this.receiverMids[iter857]; output.writeString(iter857); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size858 = 0; var _rtmp3862; this.success = {}; var _ktype859 = 0; var _vtype860 = 0; _rtmp3862 = input.readMapBegin(); _ktype859 = _rtmp3862.ktype; _vtype860 = _rtmp3862.vtype; _size858 = _rtmp3862.size; for (var _i863 = 0; _i863 < _size858; ++_i863) { var key864 = null; var val865 = null; key864 = input.readString(); val865 = input.readString(); this.success[key864] = val865; } 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 kiter866 in this.success) { if (this.success.hasOwnProperty(kiter866)) { var viter867 = this.success[kiter866]; output.writeString(kiter866); output.writeString(viter867); } } 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; }; TalkService_commitUpdateProfile_args = function(args) { this.seq = null; this.attrs = null; this.receiverMids = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.attrs !== undefined) { this.attrs = args.attrs; } if (args.receiverMids !== undefined) { this.receiverMids = args.receiverMids; } } }; 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 _size868 = 0; var _rtmp3872; this.attrs = []; var _etype871 = 0; _rtmp3872 = input.readListBegin(); _etype871 = _rtmp3872.etype; _size868 = _rtmp3872.size; for (var _i873 = 0; _i873 < _size868; ++_i873) { var elem874 = null; elem874 = input.readI32(); this.attrs.push(elem874); } input.readListEnd(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size875 = 0; var _rtmp3879; this.receiverMids = []; var _etype878 = 0; _rtmp3879 = input.readListBegin(); _etype878 = _rtmp3879.etype; _size875 = _rtmp3879.size; for (var _i880 = 0; _i880 < _size875; ++_i880) { var elem881 = null; elem881 = input.readString(); this.receiverMids.push(elem881); } 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 iter882 in this.attrs) { if (this.attrs.hasOwnProperty(iter882)) { iter882 = this.attrs[iter882]; output.writeI32(iter882); } } 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 iter883 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter883)) { iter883 = this.receiverMids[iter883]; output.writeString(iter883); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size884 = 0; var _rtmp3888; this.success = {}; var _ktype885 = 0; var _vtype886 = 0; _rtmp3888 = input.readMapBegin(); _ktype885 = _rtmp3888.ktype; _vtype886 = _rtmp3888.vtype; _size884 = _rtmp3888.size; for (var _i889 = 0; _i889 < _size884; ++_i889) { var key890 = null; var val891 = null; key890 = input.readString(); val891 = input.readString(); this.success[key890] = val891; } 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 kiter892 in this.success) { if (this.success.hasOwnProperty(kiter892)) { var viter893 = this.success[kiter892]; output.writeString(kiter892); output.writeString(viter893); } } 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; }; TalkService_confirmEmail_args = function(args) { this.verifier = null; this.pinCode = null; if (args) { if (args.verifier !== undefined) { this.verifier = args.verifier; } if (args.pinCode !== undefined) { 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; }; TalkService_confirmEmail_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_createGroup_args = function(args) { this.seq = null; this.name = null; this.contactIds = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.name !== undefined) { this.name = args.name; } if (args.contactIds !== undefined) { this.contactIds = args.contactIds; } } }; 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 _size894 = 0; var _rtmp3898; this.contactIds = []; var _etype897 = 0; _rtmp3898 = input.readListBegin(); _etype897 = _rtmp3898.etype; _size894 = _rtmp3898.size; for (var _i899 = 0; _i899 < _size894; ++_i899) { var elem900 = null; elem900 = input.readString(); this.contactIds.push(elem900); } 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 iter901 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter901)) { iter901 = this.contactIds[iter901]; output.writeString(iter901); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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) { this.url = args.url; } if (args.characterSet !== undefined) { this.characterSet = args.characterSet; } if (args.imageSize !== undefined) { this.imageSize = args.imageSize; } if (args.x !== undefined) { this.x = args.x; } if (args.y !== undefined) { this.y = args.y; } if (args.width !== undefined) { this.width = args.width; } if (args.height !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_createRoom_args = function(args) { this.reqSeq = null; this.contactIds = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.contactIds !== undefined) { this.contactIds = args.contactIds; } } }; 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 _size902 = 0; var _rtmp3906; this.contactIds = []; var _etype905 = 0; _rtmp3906 = input.readListBegin(); _etype905 = _rtmp3906.etype; _size902 = _rtmp3906.size; for (var _i907 = 0; _i907 < _size902; ++_i907) { var elem908 = null; elem908 = input.readString(); this.contactIds.push(elem908); } 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 iter909 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter909)) { iter909 = this.contactIds[iter909]; output.writeString(iter909); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_fetchAnnouncements_args = function(args) { this.lastFetchedIndex = null; if (args) { if (args.lastFetchedIndex !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size910 = 0; var _rtmp3914; this.success = []; var _etype913 = 0; _rtmp3914 = input.readListBegin(); _etype913 = _rtmp3914.etype; _size910 = _rtmp3914.size; for (var _i915 = 0; _i915 < _size910; ++_i915) { var elem916 = null; elem916 = new ttypes.Announcement(); elem916.read(input); this.success.push(elem916); } 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 iter917 in this.success) { if (this.success.hasOwnProperty(iter917)) { iter917 = this.success[iter917]; iter917.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; }; TalkService_fetchMessages_args = function(args) { this.localTs = null; this.count = null; if (args) { if (args.localTs !== undefined) { this.localTs = args.localTs; } if (args.count !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size918 = 0; var _rtmp3922; this.success = []; var _etype921 = 0; _rtmp3922 = input.readListBegin(); _etype921 = _rtmp3922.etype; _size918 = _rtmp3922.size; for (var _i923 = 0; _i923 < _size918; ++_i923) { var elem924 = null; elem924 = new ttypes.Message(); elem924.read(input); this.success.push(elem924); } 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 iter925 in this.success) { if (this.success.hasOwnProperty(iter925)) { iter925 = this.success[iter925]; iter925.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; }; TalkService_fetchOperations_args = function(args) { this.localRev = null; this.count = null; if (args) { if (args.localRev !== undefined) { this.localRev = args.localRev; } if (args.count !== undefined) { 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; }; TalkService_fetchOperations_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.e !== undefined) { 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 _size926 = 0; var _rtmp3930; this.success = []; var _etype929 = 0; _rtmp3930 = input.readListBegin(); _etype929 = _rtmp3930.etype; _size926 = _rtmp3930.size; for (var _i931 = 0; _i931 < _size926; ++_i931) { var elem932 = null; elem932 = new ttypes.Operation(); elem932.read(input); this.success.push(elem932); } 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_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 iter933 in this.success) { if (this.success.hasOwnProperty(iter933)) { iter933 = this.success[iter933]; iter933.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; }; TalkService_fetchOps_args = function(args) { this.localRev = null; this.count = null; this.globalRev = null; this.individualRev = null; if (args) { if (args.localRev !== undefined) { this.localRev = args.localRev; } if (args.count !== undefined) { this.count = args.count; } if (args.globalRev !== undefined) { this.globalRev = args.globalRev; } if (args.individualRev !== undefined) { 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; }; TalkService_fetchOps_result = function(args) { this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.e !== undefined) { 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 _size934 = 0; var _rtmp3938; this.success = []; var _etype937 = 0; _rtmp3938 = input.readListBegin(); _etype937 = _rtmp3938.etype; _size934 = _rtmp3938.size; for (var _i939 = 0; _i939 < _size934; ++_i939) { var elem940 = null; elem940 = new ttypes.Operation(); elem940.read(input); this.success.push(elem940); } 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_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 iter941 in this.success) { if (this.success.hasOwnProperty(iter941)) { iter941 = this.success[iter941]; iter941.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; }; TalkService_findAndAddContactsByEmail_args = function(args) { this.reqSeq = null; this.emails = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.emails !== undefined) { this.emails = args.emails; } } }; 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 _size942 = 0; var _rtmp3946; this.emails = []; var _etype945 = 0; _rtmp3946 = input.readSetBegin(); _etype945 = _rtmp3946.etype; _size942 = _rtmp3946.size; for (var _i947 = 0; _i947 < _size942; ++_i947) { var elem948 = null; elem948 = input.readString(); this.emails.push(elem948); } 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 iter949 in this.emails) { if (this.emails.hasOwnProperty(iter949)) { iter949 = this.emails[iter949]; output.writeString(iter949); } } output.writeSetEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size950 = 0; var _rtmp3954; this.success = {}; var _ktype951 = 0; var _vtype952 = 0; _rtmp3954 = input.readMapBegin(); _ktype951 = _rtmp3954.ktype; _vtype952 = _rtmp3954.vtype; _size950 = _rtmp3954.size; for (var _i955 = 0; _i955 < _size950; ++_i955) { var key956 = null; var val957 = null; key956 = input.readString(); val957 = new ttypes.Contact(); val957.read(input); this.success[key956] = val957; } 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 kiter958 in this.success) { if (this.success.hasOwnProperty(kiter958)) { var viter959 = this.success[kiter958]; output.writeString(kiter958); viter959.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; }; TalkService_findAndAddContactsByMid_args = function(args) { this.reqSeq = null; this.mid = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.mid !== undefined) { this.mid = args.mid; } } }; 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; 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(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size960 = 0; var _rtmp3964; this.success = {}; var _ktype961 = 0; var _vtype962 = 0; _rtmp3964 = input.readMapBegin(); _ktype961 = _rtmp3964.ktype; _vtype962 = _rtmp3964.vtype; _size960 = _rtmp3964.size; for (var _i965 = 0; _i965 < _size960; ++_i965) { var key966 = null; var val967 = null; key966 = input.readString(); val967 = new ttypes.Contact(); val967.read(input); this.success[key966] = val967; } 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 kiter968 in this.success) { if (this.success.hasOwnProperty(kiter968)) { var viter969 = this.success[kiter968]; output.writeString(kiter968); viter969.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; }; TalkService_findAndAddContactsByPhone_args = function(args) { this.reqSeq = null; this.phones = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.phones !== undefined) { this.phones = args.phones; } } }; 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 _size970 = 0; var _rtmp3974; this.phones = []; var _etype973 = 0; _rtmp3974 = input.readSetBegin(); _etype973 = _rtmp3974.etype; _size970 = _rtmp3974.size; for (var _i975 = 0; _i975 < _size970; ++_i975) { var elem976 = null; elem976 = input.readString(); this.phones.push(elem976); } 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 iter977 in this.phones) { if (this.phones.hasOwnProperty(iter977)) { iter977 = this.phones[iter977]; output.writeString(iter977); } } output.writeSetEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size978 = 0; var _rtmp3982; this.success = {}; var _ktype979 = 0; var _vtype980 = 0; _rtmp3982 = input.readMapBegin(); _ktype979 = _rtmp3982.ktype; _vtype980 = _rtmp3982.vtype; _size978 = _rtmp3982.size; for (var _i983 = 0; _i983 < _size978; ++_i983) { var key984 = null; var val985 = null; key984 = input.readString(); val985 = new ttypes.Contact(); val985.read(input); this.success[key984] = val985; } 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 kiter986 in this.success) { if (this.success.hasOwnProperty(kiter986)) { var viter987 = this.success[kiter986]; output.writeString(kiter986); viter987.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; }; TalkService_findAndAddContactsByUserid_args = function(args) { this.reqSeq = null; this.userid = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.userid !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size988 = 0; var _rtmp3992; this.success = {}; var _ktype989 = 0; var _vtype990 = 0; _rtmp3992 = input.readMapBegin(); _ktype989 = _rtmp3992.ktype; _vtype990 = _rtmp3992.vtype; _size988 = _rtmp3992.size; for (var _i993 = 0; _i993 < _size988; ++_i993) { var key994 = null; var val995 = null; key994 = input.readString(); val995 = new ttypes.Contact(); val995.read(input); this.success[key994] = val995; } 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 kiter996 in this.success) { if (this.success.hasOwnProperty(kiter996)) { var viter997 = this.success[kiter996]; output.writeString(kiter996); viter997.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; }; TalkService_findContactByUserid_args = function(args) { this.userid = null; if (args) { if (args.userid !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_findContactByUserTicket_args = function(args) { this.ticketId = null; if (args) { if (args.ticketId !== undefined) { this.ticketId = args.ticketId; } } }; 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.ticketId = 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.ticketId !== null && this.ticketId !== undefined) { output.writeFieldBegin('ticketId', Thrift.Type.STRING, 2); output.writeString(this.ticketId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_findGroupByTicket_args = function(args) { this.ticketId = null; if (args) { if (args.ticketId !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_findContactsByEmail_args = function(args) { this.emails = null; if (args) { if (args.emails !== undefined) { this.emails = args.emails; } } }; 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 _size998 = 0; var _rtmp31002; this.emails = []; var _etype1001 = 0; _rtmp31002 = input.readSetBegin(); _etype1001 = _rtmp31002.etype; _size998 = _rtmp31002.size; for (var _i1003 = 0; _i1003 < _size998; ++_i1003) { var elem1004 = null; elem1004 = input.readString(); this.emails.push(elem1004); } 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 iter1005 in this.emails) { if (this.emails.hasOwnProperty(iter1005)) { iter1005 = this.emails[iter1005]; output.writeString(iter1005); } } output.writeSetEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1006 = 0; var _rtmp31010; this.success = {}; var _ktype1007 = 0; var _vtype1008 = 0; _rtmp31010 = input.readMapBegin(); _ktype1007 = _rtmp31010.ktype; _vtype1008 = _rtmp31010.vtype; _size1006 = _rtmp31010.size; for (var _i1011 = 0; _i1011 < _size1006; ++_i1011) { var key1012 = null; var val1013 = null; key1012 = input.readString(); val1013 = new ttypes.Contact(); val1013.read(input); this.success[key1012] = val1013; } 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 kiter1014 in this.success) { if (this.success.hasOwnProperty(kiter1014)) { var viter1015 = this.success[kiter1014]; output.writeString(kiter1014); viter1015.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; }; TalkService_findContactsByPhone_args = function(args) { this.phones = null; if (args) { if (args.phones !== undefined) { this.phones = args.phones; } } }; 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 _size1016 = 0; var _rtmp31020; this.phones = []; var _etype1019 = 0; _rtmp31020 = input.readSetBegin(); _etype1019 = _rtmp31020.etype; _size1016 = _rtmp31020.size; for (var _i1021 = 0; _i1021 < _size1016; ++_i1021) { var elem1022 = null; elem1022 = input.readString(); this.phones.push(elem1022); } 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 iter1023 in this.phones) { if (this.phones.hasOwnProperty(iter1023)) { iter1023 = this.phones[iter1023]; output.writeString(iter1023); } } output.writeSetEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1024 = 0; var _rtmp31028; this.success = {}; var _ktype1025 = 0; var _vtype1026 = 0; _rtmp31028 = input.readMapBegin(); _ktype1025 = _rtmp31028.ktype; _vtype1026 = _rtmp31028.vtype; _size1024 = _rtmp31028.size; for (var _i1029 = 0; _i1029 < _size1024; ++_i1029) { var key1030 = null; var val1031 = null; key1030 = input.readString(); val1031 = new ttypes.Contact(); val1031.read(input); this.success[key1030] = val1031; } 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 kiter1032 in this.success) { if (this.success.hasOwnProperty(kiter1032)) { var viter1033 = this.success[kiter1032]; output.writeString(kiter1032); viter1033.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; }; TalkService_findSnsIdUserStatus_args = function(args) { this.snsIdType = null; this.snsAccessToken = null; this.udidHash = null; if (args) { if (args.snsIdType !== undefined) { this.snsIdType = args.snsIdType; } if (args.snsAccessToken !== undefined) { this.snsAccessToken = args.snsAccessToken; } if (args.udidHash !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_finishUpdateVerification_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined) { 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; }; TalkService_finishUpdateVerification_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_generateUserTicket_args = function(args) { this.expirationTime = null; this.maxUseCount = null; if (args) { if (args.expirationTime !== undefined) { this.expirationTime = args.expirationTime; } if (args.maxUseCount !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getAcceptedProximityMatches_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1034 = 0; var _rtmp31038; this.success = []; var _etype1037 = 0; _rtmp31038 = input.readSetBegin(); _etype1037 = _rtmp31038.etype; _size1034 = _rtmp31038.size; for (var _i1039 = 0; _i1039 < _size1034; ++_i1039) { var elem1040 = null; elem1040 = input.readString(); this.success.push(elem1040); } 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 iter1041 in this.success) { if (this.success.hasOwnProperty(iter1041)) { iter1041 = this.success[iter1041]; output.writeString(iter1041); } } 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1042 = 0; var _rtmp31046; this.success = []; var _etype1045 = 0; _rtmp31046 = input.readListBegin(); _etype1045 = _rtmp31046.etype; _size1042 = _rtmp31046.size; for (var _i1047 = 0; _i1047 < _size1042; ++_i1047) { var elem1048 = null; elem1048 = input.readString(); this.success.push(elem1048); } 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 iter1049 in this.success) { if (this.success.hasOwnProperty(iter1049)) { iter1049 = this.success[iter1049]; output.writeString(iter1049); } } 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1050 = 0; var _rtmp31054; this.success = []; var _etype1053 = 0; _rtmp31054 = input.readListBegin(); _etype1053 = _rtmp31054.etype; _size1050 = _rtmp31054.size; for (var _i1055 = 0; _i1055 < _size1050; ++_i1055) { var elem1056 = null; elem1056 = input.readString(); this.success.push(elem1056); } 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 iter1057 in this.success) { if (this.success.hasOwnProperty(iter1057)) { iter1057 = this.success[iter1057]; output.writeString(iter1057); } } 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; }; TalkService_getAuthQrcode_args = function(args) { this.keepLoggedIn = null; this.systemName = null; if (args) { if (args.keepLoggedIn !== undefined) { this.keepLoggedIn = args.keepLoggedIn; } if (args.systemName !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1058 = 0; var _rtmp31062; this.success = []; var _etype1061 = 0; _rtmp31062 = input.readListBegin(); _etype1061 = _rtmp31062.etype; _size1058 = _rtmp31062.size; for (var _i1063 = 0; _i1063 < _size1058; ++_i1063) { var elem1064 = null; elem1064 = input.readString(); this.success.push(elem1064); } 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 iter1065 in this.success) { if (this.success.hasOwnProperty(iter1065)) { iter1065 = this.success[iter1065]; output.writeString(iter1065); } } 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; }; TalkService_getBlockedContactIdsByRange_args = function(args) { this.start = null; this.count = null; if (args) { if (args.start !== undefined) { this.start = args.start; } if (args.count !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1066 = 0; var _rtmp31070; this.success = []; var _etype1069 = 0; _rtmp31070 = input.readListBegin(); _etype1069 = _rtmp31070.etype; _size1066 = _rtmp31070.size; for (var _i1071 = 0; _i1071 < _size1066; ++_i1071) { var elem1072 = null; elem1072 = input.readString(); this.success.push(elem1072); } 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 iter1073 in this.success) { if (this.success.hasOwnProperty(iter1073)) { iter1073 = this.success[iter1073]; output.writeString(iter1073); } } 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1074 = 0; var _rtmp31078; this.success = []; var _etype1077 = 0; _rtmp31078 = input.readListBegin(); _etype1077 = _rtmp31078.etype; _size1074 = _rtmp31078.size; for (var _i1079 = 0; _i1079 < _size1074; ++_i1079) { var elem1080 = null; elem1080 = input.readString(); this.success.push(elem1080); } 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 iter1081 in this.success) { if (this.success.hasOwnProperty(iter1081)) { iter1081 = this.success[iter1081]; output.writeString(iter1081); } } 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1082 = 0; var _rtmp31086; this.success = []; var _etype1085 = 0; _rtmp31086 = input.readListBegin(); _etype1085 = _rtmp31086.etype; _size1082 = _rtmp31086.size; for (var _i1087 = 0; _i1087 < _size1082; ++_i1087) { var elem1088 = null; elem1088 = input.readString(); this.success.push(elem1088); } 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 iter1089 in this.success) { if (this.success.hasOwnProperty(iter1089)) { iter1089 = this.success[iter1089]; output.writeString(iter1089); } } 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; }; TalkService_getBuddyLocation_args = function(args) { this.mid = null; this.index = null; if (args) { if (args.mid !== undefined) { this.mid = args.mid; } if (args.index !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getCompactContactsModifiedSince_args = function(args) { this.timestamp = null; if (args) { if (args.timestamp !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1090 = 0; var _rtmp31094; this.success = []; var _etype1093 = 0; _rtmp31094 = input.readListBegin(); _etype1093 = _rtmp31094.etype; _size1090 = _rtmp31094.size; for (var _i1095 = 0; _i1095 < _size1090; ++_i1095) { var elem1096 = null; elem1096 = new ttypes.CompactContact(); elem1096.read(input); this.success.push(elem1096); } 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 iter1097 in this.success) { if (this.success.hasOwnProperty(iter1097)) { iter1097 = this.success[iter1097]; iter1097.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; }; TalkService_getCompactGroup_args = function(args) { this.groupId = null; if (args) { if (args.groupId !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getCompactRoom_args = function(args) { this.roomId = null; if (args) { if (args.roomId !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getContact_args = function(args) { this.id = null; if (args) { if (args.id !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getContacts_args = function(args) { this.ids = null; if (args) { if (args.ids !== undefined) { this.ids = args.ids; } } }; 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 _size1098 = 0; var _rtmp31102; this.ids = []; var _etype1101 = 0; _rtmp31102 = input.readListBegin(); _etype1101 = _rtmp31102.etype; _size1098 = _rtmp31102.size; for (var _i1103 = 0; _i1103 < _size1098; ++_i1103) { var elem1104 = null; elem1104 = input.readString(); this.ids.push(elem1104); } 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 iter1105 in this.ids) { if (this.ids.hasOwnProperty(iter1105)) { iter1105 = this.ids[iter1105]; output.writeString(iter1105); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1106 = 0; var _rtmp31110; this.success = []; var _etype1109 = 0; _rtmp31110 = input.readListBegin(); _etype1109 = _rtmp31110.etype; _size1106 = _rtmp31110.size; for (var _i1111 = 0; _i1111 < _size1106; ++_i1111) { var elem1112 = null; elem1112 = new ttypes.Contact(); elem1112.read(input); this.success.push(elem1112); } 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 iter1113 in this.success) { if (this.success.hasOwnProperty(iter1113)) { iter1113 = this.success[iter1113]; iter1113.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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1114 = 0; var _rtmp31118; this.success = []; var _etype1117 = 0; _rtmp31118 = input.readListBegin(); _etype1117 = _rtmp31118.etype; _size1114 = _rtmp31118.size; for (var _i1119 = 0; _i1119 < _size1114; ++_i1119) { var elem1120 = null; elem1120 = input.readString(); this.success.push(elem1120); } 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 iter1121 in this.success) { if (this.success.hasOwnProperty(iter1121)) { iter1121 = this.success[iter1121]; output.writeString(iter1121); } } 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; }; TalkService_getGroup_args = function(args) { this.groupId = null; if (args) { if (args.groupId !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1122 = 0; var _rtmp31126; this.success = []; var _etype1125 = 0; _rtmp31126 = input.readListBegin(); _etype1125 = _rtmp31126.etype; _size1122 = _rtmp31126.size; for (var _i1127 = 0; _i1127 < _size1122; ++_i1127) { var elem1128 = null; elem1128 = input.readString(); this.success.push(elem1128); } 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 iter1129 in this.success) { if (this.success.hasOwnProperty(iter1129)) { iter1129 = this.success[iter1129]; output.writeString(iter1129); } } 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1130 = 0; var _rtmp31134; this.success = []; var _etype1133 = 0; _rtmp31134 = input.readListBegin(); _etype1133 = _rtmp31134.etype; _size1130 = _rtmp31134.size; for (var _i1135 = 0; _i1135 < _size1130; ++_i1135) { var elem1136 = null; elem1136 = input.readString(); this.success.push(elem1136); } 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 iter1137 in this.success) { if (this.success.hasOwnProperty(iter1137)) { iter1137 = this.success[iter1137]; output.writeString(iter1137); } } 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; }; TalkService_getGroups_args = function(args) { this.groupIds = null; if (args) { if (args.groupIds !== undefined) { this.groupIds = args.groupIds; } } }; 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 _size1138 = 0; var _rtmp31142; this.groupIds = []; var _etype1141 = 0; _rtmp31142 = input.readListBegin(); _etype1141 = _rtmp31142.etype; _size1138 = _rtmp31142.size; for (var _i1143 = 0; _i1143 < _size1138; ++_i1143) { var elem1144 = null; elem1144 = input.readString(); this.groupIds.push(elem1144); } 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 iter1145 in this.groupIds) { if (this.groupIds.hasOwnProperty(iter1145)) { iter1145 = this.groupIds[iter1145]; output.writeString(iter1145); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1146 = 0; var _rtmp31150; this.success = []; var _etype1149 = 0; _rtmp31150 = input.readListBegin(); _etype1149 = _rtmp31150.etype; _size1146 = _rtmp31150.size; for (var _i1151 = 0; _i1151 < _size1146; ++_i1151) { var elem1152 = null; elem1152 = new ttypes.Group(); elem1152.read(input); this.success.push(elem1152); } 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 iter1153 in this.success) { if (this.success.hasOwnProperty(iter1153)) { iter1153 = this.success[iter1153]; iter1153.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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1154 = 0; var _rtmp31158; this.success = []; var _etype1157 = 0; _rtmp31158 = input.readListBegin(); _etype1157 = _rtmp31158.etype; _size1154 = _rtmp31158.size; for (var _i1159 = 0; _i1159 < _size1154; ++_i1159) { var elem1160 = null; elem1160 = input.readString(); this.success.push(elem1160); } 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 iter1161 in this.success) { if (this.success.hasOwnProperty(iter1161)) { iter1161 = this.success[iter1161]; output.writeString(iter1161); } } 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getMessageBox_args = function(args) { this.channelId = null; this.messageBoxId = null; this.lastMessagesCount = null; if (args) { if (args.channelId !== undefined) { this.channelId = args.channelId; } if (args.messageBoxId !== undefined) { this.messageBoxId = args.messageBoxId; } if (args.lastMessagesCount !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getMessageBoxCompactWrapUp_args = function(args) { this.mid = null; if (args) { if (args.mid !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getMessageBoxCompactWrapUpList_args = function(args) { this.start = null; this.messageBoxCount = null; if (args) { if (args.start !== undefined) { this.start = args.start; } if (args.messageBoxCount !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getMessageBoxList_args = function(args) { this.channelId = null; this.lastMessagesCount = null; if (args) { if (args.channelId !== undefined) { this.channelId = args.channelId; } if (args.lastMessagesCount !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1162 = 0; var _rtmp31166; this.success = []; var _etype1165 = 0; _rtmp31166 = input.readListBegin(); _etype1165 = _rtmp31166.etype; _size1162 = _rtmp31166.size; for (var _i1167 = 0; _i1167 < _size1162; ++_i1167) { var elem1168 = null; elem1168 = new ttypes.TMessageBox(); elem1168.read(input); this.success.push(elem1168); } 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 iter1169 in this.success) { if (this.success.hasOwnProperty(iter1169)) { iter1169 = this.success[iter1169]; iter1169.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; }; TalkService_getMessageBoxListByStatus_args = function(args) { this.channelId = null; this.lastMessagesCount = null; this.status = null; if (args) { if (args.channelId !== undefined) { this.channelId = args.channelId; } if (args.lastMessagesCount !== undefined) { this.lastMessagesCount = args.lastMessagesCount; } if (args.status !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1170 = 0; var _rtmp31174; this.success = []; var _etype1173 = 0; _rtmp31174 = input.readListBegin(); _etype1173 = _rtmp31174.etype; _size1170 = _rtmp31174.size; for (var _i1175 = 0; _i1175 < _size1170; ++_i1175) { var elem1176 = null; elem1176 = new ttypes.TMessageBox(); elem1176.read(input); this.success.push(elem1176); } 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 iter1177 in this.success) { if (this.success.hasOwnProperty(iter1177)) { iter1177 = this.success[iter1177]; iter1177.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; }; TalkService_getMessageBoxWrapUp_args = function(args) { this.mid = null; if (args) { if (args.mid !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getMessageBoxWrapUpList_args = function(args) { this.start = null; this.messageBoxCount = null; if (args) { if (args.start !== undefined) { this.start = args.start; } if (args.messageBoxCount !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getMessagesBySequenceNumber_args = function(args) { this.channelId = null; this.messageBoxId = null; this.startSeq = null; this.endSeq = null; if (args) { if (args.channelId !== undefined) { this.channelId = args.channelId; } if (args.messageBoxId !== undefined) { this.messageBoxId = args.messageBoxId; } if (args.startSeq !== undefined) { this.startSeq = args.startSeq; } if (args.endSeq !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1178 = 0; var _rtmp31182; this.success = []; var _etype1181 = 0; _rtmp31182 = input.readListBegin(); _etype1181 = _rtmp31182.etype; _size1178 = _rtmp31182.size; for (var _i1183 = 0; _i1183 < _size1178; ++_i1183) { var elem1184 = null; elem1184 = new ttypes.Message(); elem1184.read(input); this.success.push(elem1184); } 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 iter1185 in this.success) { if (this.success.hasOwnProperty(iter1185)) { iter1185 = this.success[iter1185]; iter1185.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; }; TalkService_getNextMessages_args = function(args) { this.messageBoxId = null; this.startSeq = null; this.messagesCount = null; if (args) { if (args.messageBoxId !== undefined) { this.messageBoxId = args.messageBoxId; } if (args.startSeq !== undefined) { this.startSeq = args.startSeq; } if (args.messagesCount !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1186 = 0; var _rtmp31190; this.success = []; var _etype1189 = 0; _rtmp31190 = input.readListBegin(); _etype1189 = _rtmp31190.etype; _size1186 = _rtmp31190.size; for (var _i1191 = 0; _i1191 < _size1186; ++_i1191) { var elem1192 = null; elem1192 = new ttypes.Message(); elem1192.read(input); this.success.push(elem1192); } 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 iter1193 in this.success) { if (this.success.hasOwnProperty(iter1193)) { iter1193 = this.success[iter1193]; iter1193.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; }; TalkService_getNotificationPolicy_args = function(args) { this.carrier = null; if (args) { if (args.carrier !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1194 = 0; var _rtmp31198; this.success = []; var _etype1197 = 0; _rtmp31198 = input.readListBegin(); _etype1197 = _rtmp31198.etype; _size1194 = _rtmp31198.size; for (var _i1199 = 0; _i1199 < _size1194; ++_i1199) { var elem1200 = null; elem1200 = input.readI32(); this.success.push(elem1200); } 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 iter1201 in this.success) { if (this.success.hasOwnProperty(iter1201)) { iter1201 = this.success[iter1201]; output.writeI32(iter1201); } } 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; }; TalkService_getPreviousMessages_args = function(args) { this.messageBoxId = null; this.endSeq = null; this.messagesCount = null; if (args) { if (args.messageBoxId !== undefined) { this.messageBoxId = args.messageBoxId; } if (args.endSeq !== undefined) { this.endSeq = args.endSeq; } if (args.messagesCount !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1202 = 0; var _rtmp31206; this.success = []; var _etype1205 = 0; _rtmp31206 = input.readListBegin(); _etype1205 = _rtmp31206.etype; _size1202 = _rtmp31206.size; for (var _i1207 = 0; _i1207 < _size1202; ++_i1207) { var elem1208 = null; elem1208 = new ttypes.Message(); elem1208.read(input); this.success.push(elem1208); } 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 iter1209 in this.success) { if (this.success.hasOwnProperty(iter1209)) { iter1209 = this.success[iter1209]; iter1209.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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getProximityMatchCandidateList_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getProximityMatchCandidates_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1210 = 0; var _rtmp31214; this.success = []; var _etype1213 = 0; _rtmp31214 = input.readSetBegin(); _etype1213 = _rtmp31214.etype; _size1210 = _rtmp31214.size; for (var _i1215 = 0; _i1215 < _size1210; ++_i1215) { var elem1216 = null; elem1216 = new ttypes.Contact(); elem1216.read(input); this.success.push(elem1216); } 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 iter1217 in this.success) { if (this.success.hasOwnProperty(iter1217)) { iter1217 = this.success[iter1217]; iter1217.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; }; TalkService_getRecentMessages_args = function(args) { this.messageBoxId = null; this.messagesCount = null; if (args) { if (args.messageBoxId !== undefined) { this.messageBoxId = args.messageBoxId; } if (args.messagesCount !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1218 = 0; var _rtmp31222; this.success = []; var _etype1221 = 0; _rtmp31222 = input.readListBegin(); _etype1221 = _rtmp31222.etype; _size1218 = _rtmp31222.size; for (var _i1223 = 0; _i1223 < _size1218; ++_i1223) { var elem1224 = null; elem1224 = new ttypes.Message(); elem1224.read(input); this.success.push(elem1224); } 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 iter1225 in this.success) { if (this.success.hasOwnProperty(iter1225)) { iter1225 = this.success[iter1225]; iter1225.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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1226 = 0; var _rtmp31230; this.success = []; var _etype1229 = 0; _rtmp31230 = input.readListBegin(); _etype1229 = _rtmp31230.etype; _size1226 = _rtmp31230.size; for (var _i1231 = 0; _i1231 < _size1226; ++_i1231) { var elem1232 = null; elem1232 = input.readString(); this.success.push(elem1232); } 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 iter1233 in this.success) { if (this.success.hasOwnProperty(iter1233)) { iter1233 = this.success[iter1233]; output.writeString(iter1233); } } 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; }; TalkService_getRoom_args = function(args) { this.roomId = null; if (args) { if (args.roomId !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getRSAKeyInfo_args = function(args) { this.provider = null; if (args) { if (args.provider !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1234 = 0; var _rtmp31238; this.success = []; var _etype1237 = 0; _rtmp31238 = input.readListBegin(); _etype1237 = _rtmp31238.etype; _size1234 = _rtmp31238.size; for (var _i1239 = 0; _i1239 < _size1234; ++_i1239) { var elem1240 = null; elem1240 = new ttypes.LoginSession(); elem1240.read(input); this.success.push(elem1240); } 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 iter1241 in this.success) { if (this.success.hasOwnProperty(iter1241)) { iter1241 = this.success[iter1241]; iter1241.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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getSettingsAttributes_args = function(args) { this.attrBitset = null; if (args) { if (args.attrBitset !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_getWapInvitation_args = function(args) { this.invitationHash = null; if (args) { if (args.invitationHash !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; TalkService_invalidateUserTicket_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_inviteFriendsBySms_args = function(args) { this.phoneNumberList = null; if (args) { if (args.phoneNumberList !== undefined) { this.phoneNumberList = args.phoneNumberList; } } }; 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 _size1242 = 0; var _rtmp31246; this.phoneNumberList = []; var _etype1245 = 0; _rtmp31246 = input.readListBegin(); _etype1245 = _rtmp31246.etype; _size1242 = _rtmp31246.size; for (var _i1247 = 0; _i1247 < _size1242; ++_i1247) { var elem1248 = null; elem1248 = input.readString(); this.phoneNumberList.push(elem1248); } 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 iter1249 in this.phoneNumberList) { if (this.phoneNumberList.hasOwnProperty(iter1249)) { iter1249 = this.phoneNumberList[iter1249]; output.writeString(iter1249); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_inviteFriendsBySms_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_inviteIntoGroup_args = function(args) { this.reqSeq = null; this.groupId = null; this.contactIds = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined) { this.groupId = args.groupId; } if (args.contactIds !== undefined) { this.contactIds = args.contactIds; } } }; 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 _size1250 = 0; var _rtmp31254; this.contactIds = []; var _etype1253 = 0; _rtmp31254 = input.readListBegin(); _etype1253 = _rtmp31254.etype; _size1250 = _rtmp31254.size; for (var _i1255 = 0; _i1255 < _size1250; ++_i1255) { var elem1256 = null; elem1256 = input.readString(); this.contactIds.push(elem1256); } 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 iter1257 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter1257)) { iter1257 = this.contactIds[iter1257]; output.writeString(iter1257); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_inviteIntoGroup_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_inviteIntoRoom_args = function(args) { this.reqSeq = null; this.roomId = null; this.contactIds = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.roomId !== undefined) { this.roomId = args.roomId; } if (args.contactIds !== undefined) { this.contactIds = args.contactIds; } } }; 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 _size1258 = 0; var _rtmp31262; this.contactIds = []; var _etype1261 = 0; _rtmp31262 = input.readListBegin(); _etype1261 = _rtmp31262.etype; _size1258 = _rtmp31262.size; for (var _i1263 = 0; _i1263 < _size1258; ++_i1263) { var elem1264 = null; elem1264 = input.readString(); this.contactIds.push(elem1264); } 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 iter1265 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter1265)) { iter1265 = this.contactIds[iter1265]; output.writeString(iter1265); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_inviteIntoRoom_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_inviteViaEmail_args = function(args) { this.reqSeq = null; this.email = null; this.name = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.email !== undefined) { this.email = args.email; } if (args.name !== undefined) { 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; }; TalkService_inviteViaEmail_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_isIdentityIdentifierAvailable_args = function(args) { this.provider = null; this.identifier = null; if (args) { if (args.provider !== undefined) { this.provider = args.provider; } if (args.identifier !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_isUseridAvailable_args = function(args) { this.userid = null; if (args) { if (args.userid !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_kickoutFromGroup_args = function(args) { this.reqSeq = null; this.groupId = null; this.contactIds = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined) { this.groupId = args.groupId; } if (args.contactIds !== undefined) { this.contactIds = args.contactIds; } } }; 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 _size1266 = 0; var _rtmp31270; this.contactIds = []; var _etype1269 = 0; _rtmp31270 = input.readListBegin(); _etype1269 = _rtmp31270.etype; _size1266 = _rtmp31270.size; for (var _i1271 = 0; _i1271 < _size1266; ++_i1271) { var elem1272 = null; elem1272 = input.readString(); this.contactIds.push(elem1272); } 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 iter1273 in this.contactIds) { if (this.contactIds.hasOwnProperty(iter1273)) { iter1273 = this.contactIds[iter1273]; output.writeString(iter1273); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_kickoutFromGroup_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_reissueGroupTicket_args = function(args) { this.groupId = null; if (args) { if (args.groupId !== undefined) { this.groupId = args.groupId; } } }; 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.groupId = 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.groupId !== null && this.groupId !== undefined) { output.writeFieldBegin('groupId', Thrift.Type.STRING, 1); output.writeString(this.groupId); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_leaveGroup_args = function(args) { this.reqSeq = null; this.groupId = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined) { 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; }; TalkService_leaveGroup_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_leaveRoom_args = function(args) { this.reqSeq = null; this.roomId = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.roomId !== undefined) { 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; }; TalkService_leaveRoom_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; 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) { this.identityProvider = args.identityProvider; } if (args.identifier !== undefined) { this.identifier = args.identifier; } if (args.password !== undefined) { this.password = args.password; } if (args.keepLoggedIn !== undefined) { this.keepLoggedIn = args.keepLoggedIn; } if (args.accessLocation !== undefined) { this.accessLocation = args.accessLocation; } if (args.systemName !== undefined) { this.systemName = args.systemName; } if (args.certificate !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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) { this.identityProvider = args.identityProvider; } if (args.identifier !== undefined) { this.identifier = args.identifier; } if (args.password !== undefined) { this.password = args.password; } if (args.keepLoggedIn !== undefined) { this.keepLoggedIn = args.keepLoggedIn; } if (args.accessLocation !== undefined) { this.accessLocation = args.accessLocation; } if (args.systemName !== undefined) { this.systemName = args.systemName; } if (args.certificate !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_loginWithVerifier_args = function(args) { this.verifier = null; if (args) { if (args.verifier !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_loginWithVerifierForCerificate_args = function(args) { this.verifier = null; if (args) { if (args.verifier !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_loginWithVerifierForCertificate_args = function(args) { this.verifier = null; if (args) { if (args.verifier !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; TalkService_logout_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_logoutSession_args = function(args) { this.tokenKey = null; if (args) { if (args.tokenKey !== undefined) { 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; }; TalkService_logoutSession_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; 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; }; TalkService_noop_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_notifiedRedirect_args = function(args) { this.paramMap = null; if (args) { if (args.paramMap !== undefined) { this.paramMap = args.paramMap; } } }; 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 _size1274 = 0; var _rtmp31278; this.paramMap = {}; var _ktype1275 = 0; var _vtype1276 = 0; _rtmp31278 = input.readMapBegin(); _ktype1275 = _rtmp31278.ktype; _vtype1276 = _rtmp31278.vtype; _size1274 = _rtmp31278.size; for (var _i1279 = 0; _i1279 < _size1274; ++_i1279) { var key1280 = null; var val1281 = null; key1280 = input.readString(); val1281 = input.readString(); this.paramMap[key1280] = val1281; } 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 kiter1282 in this.paramMap) { if (this.paramMap.hasOwnProperty(kiter1282)) { var viter1283 = this.paramMap[kiter1282]; output.writeString(kiter1282); output.writeString(viter1283); } } output.writeMapEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_notifiedRedirect_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_notifyBuddyOnAir_args = function(args) { this.seq = null; this.receiverMids = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.receiverMids !== undefined) { this.receiverMids = args.receiverMids; } } }; 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 _size1284 = 0; var _rtmp31288; this.receiverMids = []; var _etype1287 = 0; _rtmp31288 = input.readListBegin(); _etype1287 = _rtmp31288.etype; _size1284 = _rtmp31288.size; for (var _i1289 = 0; _i1289 < _size1284; ++_i1289) { var elem1290 = null; elem1290 = input.readString(); this.receiverMids.push(elem1290); } 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 iter1291 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter1291)) { iter1291 = this.receiverMids[iter1291]; output.writeString(iter1291); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1292 = 0; var _rtmp31296; this.success = {}; var _ktype1293 = 0; var _vtype1294 = 0; _rtmp31296 = input.readMapBegin(); _ktype1293 = _rtmp31296.ktype; _vtype1294 = _rtmp31296.vtype; _size1292 = _rtmp31296.size; for (var _i1297 = 0; _i1297 < _size1292; ++_i1297) { var key1298 = null; var val1299 = null; key1298 = input.readString(); val1299 = input.readString(); this.success[key1298] = val1299; } 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 kiter1300 in this.success) { if (this.success.hasOwnProperty(kiter1300)) { var viter1301 = this.success[kiter1300]; output.writeString(kiter1300); output.writeString(viter1301); } } 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; }; TalkService_notifyIndividualEvent_args = function(args) { this.notificationStatus = null; this.receiverMids = null; if (args) { if (args.notificationStatus !== undefined) { this.notificationStatus = args.notificationStatus; } if (args.receiverMids !== undefined) { this.receiverMids = args.receiverMids; } } }; 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 _size1302 = 0; var _rtmp31306; this.receiverMids = []; var _etype1305 = 0; _rtmp31306 = input.readListBegin(); _etype1305 = _rtmp31306.etype; _size1302 = _rtmp31306.size; for (var _i1307 = 0; _i1307 < _size1302; ++_i1307) { var elem1308 = null; elem1308 = input.readString(); this.receiverMids.push(elem1308); } 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 iter1309 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter1309)) { iter1309 = this.receiverMids[iter1309]; output.writeString(iter1309); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_notifyIndividualEvent_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_notifyInstalled_args = function(args) { this.udidHash = null; this.applicationTypeWithExtensions = null; if (args) { if (args.udidHash !== undefined) { this.udidHash = args.udidHash; } if (args.applicationTypeWithExtensions !== undefined) { 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; }; TalkService_notifyInstalled_result = function(args) { }; 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; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyInstalled_result.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyInstalled_result'); output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_notifyRegistrationComplete_args = function(args) { this.udidHash = null; this.applicationTypeWithExtensions = null; if (args) { if (args.udidHash !== undefined) { this.udidHash = args.udidHash; } if (args.applicationTypeWithExtensions !== undefined) { 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; }; TalkService_notifyRegistrationComplete_result = function(args) { }; 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; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; TalkService_notifyRegistrationComplete_result.prototype.write = function(output) { output.writeStructBegin('TalkService_notifyRegistrationComplete_result'); output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_notifySleep_args = function(args) { this.lastRev = null; this.badge = null; if (args) { if (args.lastRev !== undefined) { this.lastRev = args.lastRev; } if (args.badge !== undefined) { 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; }; TalkService_notifySleep_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_notifyUpdated_args = function(args) { this.lastRev = null; this.deviceInfo = null; if (args) { if (args.lastRev !== undefined) { this.lastRev = args.lastRev; } if (args.deviceInfo !== undefined) { this.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; }; TalkService_notifyUpdated_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_openProximityMatch_args = function(args) { this.location = null; if (args) { if (args.location !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_registerBuddyUser_args = function(args) { this.buddyId = null; this.registrarPassword = null; if (args) { if (args.buddyId !== undefined) { this.buddyId = args.buddyId; } if (args.registrarPassword !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_registerBuddyUserid_args = function(args) { this.seq = null; this.userid = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.userid !== undefined) { 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; }; TalkService_registerBuddyUserid_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_registerDevice_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_registerDeviceWithIdentityCredential_args = function(args) { this.sessionId = null; this.provider = null; this.identifier = null; this.verifier = null; if (args) { if (args.sessionId !== undefined) { this.sessionId = args.sessionId; } if (args.provider !== undefined) { this.provider = args.provider; } if (args.identifier !== undefined) { this.identifier = args.identifier; } if (args.verifier !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_registerDeviceWithoutPhoneNumber_args = function(args) { this.region = null; this.udidHash = null; this.deviceInfo = null; if (args) { if (args.region !== undefined) { this.region = args.region; } if (args.udidHash !== undefined) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; if (args) { if (args.region !== undefined) { this.region = args.region; } if (args.udidHash !== undefined) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined) { this.deviceInfo = args.deviceInfo; } if (args.provider !== undefined) { this.provider = args.provider; } if (args.identifier !== undefined) { this.identifier = args.identifier; } if (args.verifier !== undefined) { this.verifier = args.verifier; } if (args.mid !== undefined) { this.mid = args.mid; } } }; 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; 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(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_registerUserid_args = function(args) { this.reqSeq = null; this.userid = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.userid !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_registerWapDevice_args = function(args) { this.invitationHash = null; this.guidHash = null; this.email = null; this.deviceInfo = null; if (args) { if (args.invitationHash !== undefined) { this.invitationHash = args.invitationHash; } if (args.guidHash !== undefined) { this.guidHash = args.guidHash; } if (args.email !== undefined) { this.email = args.email; } if (args.deviceInfo !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_registerWithExistingSnsIdAndIdentityCredential_args = function(args) { this.identityCredential = null; this.region = null; this.udidHash = null; this.deviceInfo = null; if (args) { if (args.identityCredential !== undefined) { this.identityCredential = args.identityCredential; } if (args.region !== undefined) { this.region = args.region; } if (args.udidHash !== undefined) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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) { this.snsIdType = args.snsIdType; } if (args.snsAccessToken !== undefined) { this.snsAccessToken = args.snsAccessToken; } if (args.region !== undefined) { this.region = args.region; } if (args.udidHash !== undefined) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined) { this.deviceInfo = args.deviceInfo; } if (args.mid !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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) { this.snsIdType = args.snsIdType; } if (args.snsAccessToken !== undefined) { this.snsAccessToken = args.snsAccessToken; } if (args.identityCredential !== undefined) { this.identityCredential = args.identityCredential; } if (args.region !== undefined) { this.region = args.region; } if (args.udidHash !== undefined) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_reissueUserTicket_args = function(args) { this.expirationTime = null; this.maxUseCount = null; if (args) { if (args.expirationTime !== undefined) { this.expirationTime = args.expirationTime; } if (args.maxUseCount !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_rejectGroupInvitation_args = function(args) { this.reqSeq = null; this.groupId = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.groupId !== undefined) { 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; }; TalkService_rejectGroupInvitation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; 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; }; TalkService_releaseSession_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_removeAllMessages_args = function(args) { this.seq = null; this.lastMessageId = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.lastMessageId !== undefined) { 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; }; TalkService_removeAllMessages_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_removeBuddyLocation_args = function(args) { this.mid = null; this.index = null; if (args) { if (args.mid !== undefined) { this.mid = args.mid; } if (args.index !== undefined) { 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; }; TalkService_removeBuddyLocation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_removeMessage_args = function(args) { this.messageId = null; if (args) { if (args.messageId !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_removeMessageFromMyHome_args = function(args) { this.messageId = null; if (args) { if (args.messageId !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_removeSnsId_args = function(args) { this.snsIdType = null; if (args) { if (args.snsIdType !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_report_args = function(args) { this.syncOpRevision = null; this.category = null; this.report = null; if (args) { if (args.syncOpRevision !== undefined) { this.syncOpRevision = args.syncOpRevision; } if (args.category !== undefined) { this.category = args.category; } if (args.report !== undefined) { 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; }; TalkService_report_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_reportContacts_args = function(args) { this.syncOpRevision = null; this.category = null; this.contactReports = null; this.actionType = null; if (args) { if (args.syncOpRevision !== undefined) { this.syncOpRevision = args.syncOpRevision; } if (args.category !== undefined) { this.category = args.category; } if (args.contactReports !== undefined) { this.contactReports = args.contactReports; } if (args.actionType !== undefined) { 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 _size1310 = 0; var _rtmp31314; this.contactReports = []; var _etype1313 = 0; _rtmp31314 = input.readListBegin(); _etype1313 = _rtmp31314.etype; _size1310 = _rtmp31314.size; for (var _i1315 = 0; _i1315 < _size1310; ++_i1315) { var elem1316 = null; elem1316 = new ttypes.ContactReport(); elem1316.read(input); this.contactReports.push(elem1316); } 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 iter1317 in this.contactReports) { if (this.contactReports.hasOwnProperty(iter1317)) { iter1317 = this.contactReports[iter1317]; iter1317.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1318 = 0; var _rtmp31322; this.success = []; var _etype1321 = 0; _rtmp31322 = input.readListBegin(); _etype1321 = _rtmp31322.etype; _size1318 = _rtmp31322.size; for (var _i1323 = 0; _i1323 < _size1318; ++_i1323) { var elem1324 = null; elem1324 = new ttypes.ContactReportResult(); elem1324.read(input); this.success.push(elem1324); } 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 iter1325 in this.success) { if (this.success.hasOwnProperty(iter1325)) { iter1325 = this.success[iter1325]; iter1325.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; }; TalkService_reportGroups_args = function(args) { this.syncOpRevision = null; this.groups = null; if (args) { if (args.syncOpRevision !== undefined) { this.syncOpRevision = args.syncOpRevision; } if (args.groups !== undefined) { this.groups = args.groups; } } }; 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 _size1326 = 0; var _rtmp31330; this.groups = []; var _etype1329 = 0; _rtmp31330 = input.readListBegin(); _etype1329 = _rtmp31330.etype; _size1326 = _rtmp31330.size; for (var _i1331 = 0; _i1331 < _size1326; ++_i1331) { var elem1332 = null; elem1332 = new ttypes.Group(); elem1332.read(input); this.groups.push(elem1332); } 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 iter1333 in this.groups) { if (this.groups.hasOwnProperty(iter1333)) { iter1333 = this.groups[iter1333]; iter1333.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_reportGroups_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_reportProfile_args = function(args) { this.syncOpRevision = null; this.profile = null; if (args) { if (args.syncOpRevision !== undefined) { this.syncOpRevision = args.syncOpRevision; } if (args.profile !== undefined) { this.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; }; TalkService_reportProfile_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_reportRooms_args = function(args) { this.syncOpRevision = null; this.rooms = null; if (args) { if (args.syncOpRevision !== undefined) { this.syncOpRevision = args.syncOpRevision; } if (args.rooms !== undefined) { this.rooms = args.rooms; } } }; 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 _size1334 = 0; var _rtmp31338; this.rooms = []; var _etype1337 = 0; _rtmp31338 = input.readListBegin(); _etype1337 = _rtmp31338.etype; _size1334 = _rtmp31338.size; for (var _i1339 = 0; _i1339 < _size1334; ++_i1339) { var elem1340 = null; elem1340 = new ttypes.Room(); elem1340.read(input); this.rooms.push(elem1340); } 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 iter1341 in this.rooms) { if (this.rooms.hasOwnProperty(iter1341)) { iter1341 = this.rooms[iter1341]; iter1341.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_reportRooms_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_reportSettings_args = function(args) { this.syncOpRevision = null; this.settings = null; if (args) { if (args.syncOpRevision !== undefined) { this.syncOpRevision = args.syncOpRevision; } if (args.settings !== undefined) { this.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; }; TalkService_reportSettings_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_reportSpammer_args = function(args) { this.spammerMid = null; this.spammerReasons = null; this.spamMessageIds = null; if (args) { if (args.spammerMid !== undefined) { this.spammerMid = args.spammerMid; } if (args.spammerReasons !== undefined) { this.spammerReasons = args.spammerReasons; } if (args.spamMessageIds !== undefined) { this.spamMessageIds = args.spamMessageIds; } } }; 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 _size1342 = 0; var _rtmp31346; this.spammerReasons = []; var _etype1345 = 0; _rtmp31346 = input.readListBegin(); _etype1345 = _rtmp31346.etype; _size1342 = _rtmp31346.size; for (var _i1347 = 0; _i1347 < _size1342; ++_i1347) { var elem1348 = null; elem1348 = input.readI32(); this.spammerReasons.push(elem1348); } input.readListEnd(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.LIST) { var _size1349 = 0; var _rtmp31353; this.spamMessageIds = []; var _etype1352 = 0; _rtmp31353 = input.readListBegin(); _etype1352 = _rtmp31353.etype; _size1349 = _rtmp31353.size; for (var _i1354 = 0; _i1354 < _size1349; ++_i1354) { var elem1355 = null; elem1355 = input.readString(); this.spamMessageIds.push(elem1355); } 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 iter1356 in this.spammerReasons) { if (this.spammerReasons.hasOwnProperty(iter1356)) { iter1356 = this.spammerReasons[iter1356]; output.writeI32(iter1356); } } 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 iter1357 in this.spamMessageIds) { if (this.spamMessageIds.hasOwnProperty(iter1357)) { iter1357 = this.spamMessageIds[iter1357]; output.writeString(iter1357); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_reportSpammer_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_requestAccountPasswordReset_args = function(args) { this.provider = null; this.identifier = null; this.locale = null; if (args) { if (args.provider !== undefined) { this.provider = args.provider; } if (args.identifier !== undefined) { this.identifier = args.identifier; } if (args.locale !== undefined) { 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; }; TalkService_requestAccountPasswordReset_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_requestEmailConfirmation_args = function(args) { this.emailConfirmation = null; if (args) { if (args.emailConfirmation !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_requestIdentityUnbind_args = function(args) { this.provider = null; this.identifier = null; if (args) { if (args.provider !== undefined) { this.provider = args.provider; } if (args.identifier !== undefined) { 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; }; TalkService_requestIdentityUnbind_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_resendEmailConfirmation_args = function(args) { this.verifier = null; if (args) { if (args.verifier !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_resendPinCode_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined) { 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; }; TalkService_resendPinCode_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_resendPinCodeBySMS_args = function(args) { this.sessionId = null; if (args) { if (args.sessionId !== undefined) { 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; }; TalkService_resendPinCodeBySMS_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_sendChatChecked_args = function(args) { this.seq = null; this.consumer = null; this.lastMessageId = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.consumer !== undefined) { this.consumer = args.consumer; } if (args.lastMessageId !== undefined) { 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; }; TalkService_sendChatChecked_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_sendChatRemoved_args = function(args) { this.seq = null; this.consumer = null; this.lastMessageId = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.consumer !== undefined) { this.consumer = args.consumer; } if (args.lastMessageId !== undefined) { 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; }; TalkService_sendChatRemoved_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_sendContentPreviewUpdated_args = function(args) { this.esq = null; this.messageId = null; this.receiverMids = null; if (args) { if (args.esq !== undefined) { this.esq = args.esq; } if (args.messageId !== undefined) { this.messageId = args.messageId; } if (args.receiverMids !== undefined) { this.receiverMids = args.receiverMids; } } }; 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 _size1358 = 0; var _rtmp31362; this.receiverMids = []; var _etype1361 = 0; _rtmp31362 = input.readListBegin(); _etype1361 = _rtmp31362.etype; _size1358 = _rtmp31362.size; for (var _i1363 = 0; _i1363 < _size1358; ++_i1363) { var elem1364 = null; elem1364 = input.readString(); this.receiverMids.push(elem1364); } 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 iter1365 in this.receiverMids) { if (this.receiverMids.hasOwnProperty(iter1365)) { iter1365 = this.receiverMids[iter1365]; output.writeString(iter1365); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1366 = 0; var _rtmp31370; this.success = {}; var _ktype1367 = 0; var _vtype1368 = 0; _rtmp31370 = input.readMapBegin(); _ktype1367 = _rtmp31370.ktype; _vtype1368 = _rtmp31370.vtype; _size1366 = _rtmp31370.size; for (var _i1371 = 0; _i1371 < _size1366; ++_i1371) { var key1372 = null; var val1373 = null; key1372 = input.readString(); val1373 = input.readString(); this.success[key1372] = val1373; } 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 kiter1374 in this.success) { if (this.success.hasOwnProperty(kiter1374)) { var viter1375 = this.success[kiter1374]; output.writeString(kiter1374); output.writeString(viter1375); } } 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; }; TalkService_sendContentReceipt_args = function(args) { this.seq = null; this.consumer = null; this.messageId = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.consumer !== undefined) { this.consumer = args.consumer; } if (args.messageId !== undefined) { 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; }; TalkService_sendContentReceipt_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; 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; }; TalkService_sendDummyPush_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_sendEvent_args = function(args) { this.seq = null; this.message = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.message !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_sendMessage_args = function(args) { this.seq = null; this.message = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.message !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_sendMessageIgnored_args = function(args) { this.seq = null; this.consumer = null; this.messageIds = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.consumer !== undefined) { this.consumer = args.consumer; } if (args.messageIds !== undefined) { this.messageIds = args.messageIds; } } }; 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 _size1376 = 0; var _rtmp31380; this.messageIds = []; var _etype1379 = 0; _rtmp31380 = input.readListBegin(); _etype1379 = _rtmp31380.etype; _size1376 = _rtmp31380.size; for (var _i1381 = 0; _i1381 < _size1376; ++_i1381) { var elem1382 = null; elem1382 = input.readString(); this.messageIds.push(elem1382); } 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 iter1383 in this.messageIds) { if (this.messageIds.hasOwnProperty(iter1383)) { iter1383 = this.messageIds[iter1383]; output.writeString(iter1383); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_sendMessageIgnored_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_sendMessageReceipt_args = function(args) { this.seq = null; this.consumer = null; this.messageIds = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.consumer !== undefined) { this.consumer = args.consumer; } if (args.messageIds !== undefined) { this.messageIds = args.messageIds; } } }; 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 _size1384 = 0; var _rtmp31388; this.messageIds = []; var _etype1387 = 0; _rtmp31388 = input.readListBegin(); _etype1387 = _rtmp31388.etype; _size1384 = _rtmp31388.size; for (var _i1389 = 0; _i1389 < _size1384; ++_i1389) { var elem1390 = null; elem1390 = input.readString(); this.messageIds.push(elem1390); } 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 iter1391 in this.messageIds) { if (this.messageIds.hasOwnProperty(iter1391)) { iter1391 = this.messageIds[iter1391]; output.writeString(iter1391); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_sendMessageReceipt_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_sendMessageToMyHome_args = function(args) { this.seq = null; this.message = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.message !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_setBuddyLocation_args = function(args) { this.mid = null; this.index = null; this.location = null; if (args) { if (args.mid !== undefined) { this.mid = args.mid; } if (args.index !== undefined) { this.index = args.index; } if (args.location !== undefined) { this.location = 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; }; TalkService_setBuddyLocation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_setIdentityCredential_args = function(args) { this.provider = null; this.identifier = null; this.verifier = null; if (args) { if (args.provider !== undefined) { this.provider = args.provider; } if (args.identifier !== undefined) { this.identifier = args.identifier; } if (args.verifier !== undefined) { this.verifier = args.verifier; } } }; 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 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 3: if (ftype == Thrift.Type.STRING) { this.verifier = input.readString(); } 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.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.verifier !== null && this.verifier !== undefined) { output.writeFieldBegin('verifier', Thrift.Type.STRING, 3); output.writeString(this.verifier); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_setIdentityCredential_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_setNotificationsEnabled_args = function(args) { this.reqSeq = null; this.type = null; this.target = null; this.enablement = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.type !== undefined) { this.type = args.type; } if (args.target !== undefined) { this.target = args.target; } if (args.enablement !== undefined) { 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; }; TalkService_setNotificationsEnabled_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; 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) { this.region = args.region; } if (args.carrier !== undefined) { this.carrier = args.carrier; } if (args.phone !== undefined) { this.phone = args.phone; } if (args.udidHash !== undefined) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined) { this.deviceInfo = args.deviceInfo; } if (args.networkCode !== undefined) { this.networkCode = args.networkCode; } if (args.locale !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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; if (args) { if (args.region !== undefined) { this.region = args.region; } if (args.carrier !== undefined) { this.carrier = args.carrier; } if (args.phone !== undefined) { this.phone = args.phone; } if (args.udidHash !== undefined) { this.udidHash = args.udidHash; } if (args.deviceInfo !== undefined) { this.deviceInfo = args.deviceInfo; } if (args.networkCode !== undefined) { this.networkCode = args.networkCode; } if (args.mid !== undefined) { this.mid = args.mid; } if (args.locale !== undefined) { this.locale = args.locale; } } }; 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; 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(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_storeUpdateProfileAttribute_args = function(args) { this.seq = null; this.profileAttribute = null; this.value = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.profileAttribute !== undefined) { this.profileAttribute = args.profileAttribute; } if (args.value !== undefined) { 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; }; TalkService_storeUpdateProfileAttribute_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_syncContactBySnsIds_args = function(args) { this.reqSeq = null; this.modifications = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.modifications !== undefined) { this.modifications = args.modifications; } } }; 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 _size1392 = 0; var _rtmp31396; this.modifications = []; var _etype1395 = 0; _rtmp31396 = input.readListBegin(); _etype1395 = _rtmp31396.etype; _size1392 = _rtmp31396.size; for (var _i1397 = 0; _i1397 < _size1392; ++_i1397) { var elem1398 = null; elem1398 = new ttypes.SnsFriendModification(); elem1398.read(input); this.modifications.push(elem1398); } 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 iter1399 in this.modifications) { if (this.modifications.hasOwnProperty(iter1399)) { iter1399 = this.modifications[iter1399]; iter1399.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1400 = 0; var _rtmp31404; this.success = []; var _etype1403 = 0; _rtmp31404 = input.readListBegin(); _etype1403 = _rtmp31404.etype; _size1400 = _rtmp31404.size; for (var _i1405 = 0; _i1405 < _size1400; ++_i1405) { var elem1406 = null; elem1406 = new ttypes.SnsFriendContactRegistration(); elem1406.read(input); this.success.push(elem1406); } 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 iter1407 in this.success) { if (this.success.hasOwnProperty(iter1407)) { iter1407 = this.success[iter1407]; iter1407.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; }; TalkService_syncContacts_args = function(args) { this.reqSeq = null; this.localContacts = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.localContacts !== undefined) { this.localContacts = args.localContacts; } } }; 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 _size1408 = 0; var _rtmp31412; this.localContacts = []; var _etype1411 = 0; _rtmp31412 = input.readListBegin(); _etype1411 = _rtmp31412.etype; _size1408 = _rtmp31412.size; for (var _i1413 = 0; _i1413 < _size1408; ++_i1413) { var elem1414 = null; elem1414 = new ttypes.ContactModification(); elem1414.read(input); this.localContacts.push(elem1414); } 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 iter1415 in this.localContacts) { if (this.localContacts.hasOwnProperty(iter1415)) { iter1415 = this.localContacts[iter1415]; iter1415.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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 _size1416 = 0; var _rtmp31420; this.success = {}; var _ktype1417 = 0; var _vtype1418 = 0; _rtmp31420 = input.readMapBegin(); _ktype1417 = _rtmp31420.ktype; _vtype1418 = _rtmp31420.vtype; _size1416 = _rtmp31420.size; for (var _i1421 = 0; _i1421 < _size1416; ++_i1421) { var key1422 = null; var val1423 = null; key1422 = input.readString(); val1423 = new ttypes.ContactRegistration(); val1423.read(input); this.success[key1422] = val1423; } 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 kiter1424 in this.success) { if (this.success.hasOwnProperty(kiter1424)) { var viter1425 = this.success[kiter1424]; output.writeString(kiter1424); viter1425.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; }; TalkService_trySendMessage_args = function(args) { this.seq = null; this.message = null; if (args) { if (args.seq !== undefined) { this.seq = args.seq; } if (args.message !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_unblockContact_args = function(args) { this.reqSeq = null; this.id = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.id !== undefined) { 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; }; TalkService_unblockContact_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_unblockRecommendation_args = function(args) { this.reqSeq = null; this.id = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.id !== undefined) { 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; }; TalkService_unblockRecommendation_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_updateApnsDeviceToken_args = function(args) { this.apnsDeviceToken = null; if (args) { if (args.apnsDeviceToken !== undefined) { 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; }; TalkService_updateApnsDeviceToken_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateBuddySetting_args = function(args) { this.key = null; this.value = null; if (args) { if (args.key !== undefined) { this.key = args.key; } if (args.value !== undefined) { 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; }; TalkService_updateBuddySetting_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateC2DMRegistrationId_args = function(args) { this.registrationId = null; if (args) { if (args.registrationId !== undefined) { 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; }; TalkService_updateC2DMRegistrationId_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateContactSetting_args = function(args) { this.reqSeq = null; this.mid = null; this.flag = null; this.value = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.mid !== undefined) { this.mid = args.mid; } if (args.flag !== undefined) { this.flag = args.flag; } if (args.value !== undefined) { 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; }; TalkService_updateContactSetting_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateCustomModeSettings_args = function(args) { this.customMode = null; this.paramMap = null; if (args) { if (args.customMode !== undefined) { this.customMode = args.customMode; } if (args.paramMap !== undefined) { this.paramMap = args.paramMap; } } }; 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 _size1426 = 0; var _rtmp31430; this.paramMap = {}; var _ktype1427 = 0; var _vtype1428 = 0; _rtmp31430 = input.readMapBegin(); _ktype1427 = _rtmp31430.ktype; _vtype1428 = _rtmp31430.vtype; _size1426 = _rtmp31430.size; for (var _i1431 = 0; _i1431 < _size1426; ++_i1431) { var key1432 = null; var val1433 = null; key1432 = input.readString(); val1433 = input.readString(); this.paramMap[key1432] = val1433; } 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 kiter1434 in this.paramMap) { if (this.paramMap.hasOwnProperty(kiter1434)) { var viter1435 = this.paramMap[kiter1434]; output.writeString(kiter1434); output.writeString(viter1435); } } output.writeMapEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TalkService_updateCustomModeSettings_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateDeviceInfo_args = function(args) { this.deviceUid = null; this.deviceInfo = null; if (args) { if (args.deviceUid !== undefined) { this.deviceUid = args.deviceUid; } if (args.deviceInfo !== undefined) { this.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; }; TalkService_updateDeviceInfo_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateGroup_args = function(args) { this.reqSeq = null; this.group = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.group !== undefined) { this.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; }; TalkService_updateGroup_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateNotificationToken_args = function(args) { this.type = null; this.token = null; if (args) { if (args.type !== undefined) { this.type = args.type; } if (args.token !== undefined) { 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; }; TalkService_updateNotificationToken_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateNotificationTokenWithBytes_args = function(args) { this.type = null; this.token = null; if (args) { if (args.type !== undefined) { this.type = args.type; } if (args.token !== undefined) { 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; }; TalkService_updateNotificationTokenWithBytes_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateProfile_args = function(args) { this.reqSeq = null; this.profile = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.profile !== undefined) { this.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; }; TalkService_updateProfile_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateProfileAttribute_args = function(args) { this.reqSeq = null; this.attr = null; this.value = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.attr !== undefined) { this.attr = args.attr; } if (args.value !== undefined) { 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; }; TalkService_updateProfileAttribute_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateRegion_args = function(args) { this.region = null; if (args) { if (args.region !== undefined) { 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; }; TalkService_updateRegion_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateSettings_args = function(args) { this.reqSeq = null; this.settings = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.settings !== undefined) { this.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; }; TalkService_updateSettings_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateSettings2_args = function(args) { this.reqSeq = null; this.settings = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.settings !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_updateSettingsAttribute_args = function(args) { this.reqSeq = null; this.attr = null; this.value = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.attr !== undefined) { this.attr = args.attr; } if (args.value !== undefined) { 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; }; TalkService_updateSettingsAttribute_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_updateSettingsAttributes_args = function(args) { this.reqSeq = null; this.attrBitset = null; this.settings = null; if (args) { if (args.reqSeq !== undefined) { this.reqSeq = args.reqSeq; } if (args.attrBitset !== undefined) { this.attrBitset = args.attrBitset; } if (args.settings !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_verifyIdentityCredential_args = function(args) { this.identityProvider = null; this.identifier = null; this.password = null; if (args) { if (args.identityProvider !== undefined) { this.identityProvider = args.identityProvider; } if (args.identifier !== undefined) { this.identifier = args.identifier; } if (args.password !== undefined) { 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; }; TalkService_verifyIdentityCredential_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { if (args.e !== undefined) { 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; }; TalkService_verifyIdentityCredentialWithResult_args = function(args) { this.identityCredential = null; if (args) { if (args.identityCredential !== undefined) { this.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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_verifyPhone_args = function(args) { this.sessionId = null; this.pinCode = null; this.udidHash = null; if (args) { if (args.sessionId !== undefined) { this.sessionId = args.sessionId; } if (args.pinCode !== undefined) { this.pinCode = args.pinCode; } if (args.udidHash !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; TalkService_verifyQrcode_args = function(args) { this.verifier = null; this.pinCode = null; if (args) { if (args.verifier !== undefined) { this.verifier = args.verifier; } if (args.pinCode !== undefined) { 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; }; 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) { this.success = args.success; } if (args.e !== undefined) { 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; }; 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.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, groupId, 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, groupId, ticketId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_acceptGroupInvitationByTicket(reqSeq, groupId, ticketId); } }; TalkServiceClient.prototype.send_acceptGroupInvitationByTicket = function(reqSeq, groupId, 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.groupId = groupId; 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, 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); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findAndAddContactsByMid(reqSeq, mid); } }; TalkServiceClient.prototype.send_findAndAddContactsByMid = function(reqSeq, mid) { 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.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.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.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(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_findContactByUserTicket(ticketId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_findContactByUserTicket(ticketId); } }; TalkServiceClient.prototype.send_findContactByUserTicket = function(ticketId) { var output = new this.pClass(this.output); output.writeMessageBegin('findContactByUserTicket', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_findContactByUserTicket_args(); args.ticketId = ticketId; 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.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.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.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.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.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.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.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(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_reissueGroupTicket(groupId); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_reissueGroupTicket(groupId); } }; TalkServiceClient.prototype.send_reissueGroupTicket = function(groupId) { var output = new this.pClass(this.output); output.writeMessageBegin('reissueGroupTicket', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_reissueGroupTicket_args(); args.groupId = groupId; 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.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(); 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(); 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, 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); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_registerDeviceWithoutPhoneNumberWithIdentityCredential(region, udidHash, deviceInfo, provider, identifier, verifier, mid); } }; TalkServiceClient.prototype.send_registerDeviceWithoutPhoneNumberWithIdentityCredential = function(region, udidHash, deviceInfo, provider, identifier, verifier, mid) { 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.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.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.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.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.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.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.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.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(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_setIdentityCredential(provider, identifier, verifier); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_setIdentityCredential(provider, identifier, verifier); } }; TalkServiceClient.prototype.send_setIdentityCredential = function(provider, identifier, verifier) { var output = new this.pClass(this.output); output.writeMessageBegin('setIdentityCredential', Thrift.MessageType.CALL, this.seqid()); var args = new TalkService_setIdentityCredential_args(); args.provider = provider; args.identifier = identifier; args.verifier = verifier; 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, 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); return _defer.promise; } else { this._reqs[this.seqid()] = callback; this.send_startVerification(region, carrier, phone, udidHash, deviceInfo, networkCode, mid, locale); } }; TalkServiceClient.prototype.send_startVerification = function(region, carrier, phone, udidHash, deviceInfo, networkCode, mid, locale) { 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.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.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.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'); }; 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_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 = new TalkService_acceptGroupInvitation_result({success: result}); output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_acceptGroupInvitation_result(err); output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acceptGroupInvitation(args.reqSeq, args.groupId, function (err, result) { var result = new TalkService_acceptGroupInvitation_result((err != null ? err : {success: result})); output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.REPLY, seqid); result.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.groupId, args.ticketId) .then(function(result) { var result = new TalkService_acceptGroupInvitationByTicket_result({success: result}); output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_acceptGroupInvitationByTicket_result(err); output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acceptGroupInvitationByTicket(args.reqSeq, args.groupId, args.ticketId, function (err, result) { var result = new TalkService_acceptGroupInvitationByTicket_result((err != null ? err : {success: result})); output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_acceptProximityMatches_result({success: result}); output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_acceptProximityMatches_result(err); output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acceptProximityMatches(args.sessionId, args.ids, function (err, result) { var result = new TalkService_acceptProximityMatches_result((err != null ? err : {success: result})); output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_acquireCallRoute_result({success: result}); output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_acquireCallRoute_result(err); output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acquireCallRoute(args.to, function (err, result) { var result = new TalkService_acquireCallRoute_result((err != null ? err : {success: result})); output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_acquireCallTicket_result({success: result}); output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_acquireCallTicket_result(err); output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acquireCallTicket(args.to, function (err, result) { var result = new TalkService_acquireCallTicket_result((err != null ? err : {success: result})); output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_acquireEncryptedAccessToken_result({success: result}); output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_acquireEncryptedAccessToken_result(err); output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.acquireEncryptedAccessToken(args.featureType, function (err, result) { var result = new TalkService_acquireEncryptedAccessToken_result((err != null ? err : {success: result})); output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_addSnsId_result({success: result}); output.writeMessageBegin("addSnsId", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_addSnsId_result(err); output.writeMessageBegin("addSnsId", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.addSnsId(args.snsIdType, args.snsAccessToken, function (err, result) { var result = new TalkService_addSnsId_result((err != null ? err : {success: result})); output.writeMessageBegin("addSnsId", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_blockContact_result({success: result}); output.writeMessageBegin("blockContact", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_blockContact_result(err); output.writeMessageBegin("blockContact", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.blockContact(args.reqSeq, args.id, function (err, result) { var result = new TalkService_blockContact_result((err != null ? err : {success: result})); output.writeMessageBegin("blockContact", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_blockRecommendation_result({success: result}); output.writeMessageBegin("blockRecommendation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_blockRecommendation_result(err); output.writeMessageBegin("blockRecommendation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.blockRecommendation(args.reqSeq, args.id, function (err, result) { var result = new TalkService_blockRecommendation_result((err != null ? err : {success: result})); output.writeMessageBegin("blockRecommendation", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_cancelGroupInvitation_result({success: result}); output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_cancelGroupInvitation_result(err); output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.cancelGroupInvitation(args.reqSeq, args.groupId, args.contactIds, function (err, result) { var result = new TalkService_cancelGroupInvitation_result((err != null ? err : {success: result})); output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_changeVerificationMethod_result({success: result}); output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_changeVerificationMethod_result(err); output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.changeVerificationMethod(args.sessionId, args.method, function (err, result) { var result = new TalkService_changeVerificationMethod_result((err != null ? err : {success: result})); output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_clearIdentityCredential_result({success: result}); output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_clearIdentityCredential_result(err); output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.clearIdentityCredential( function (err, result) { var result = new TalkService_clearIdentityCredential_result((err != null ? err : {success: result})); output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_clearMessageBox_result({success: result}); output.writeMessageBegin("clearMessageBox", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_clearMessageBox_result(err); output.writeMessageBegin("clearMessageBox", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.clearMessageBox(args.channelId, args.messageBoxId, function (err, result) { var result = new TalkService_clearMessageBox_result((err != null ? err : {success: result})); output.writeMessageBegin("clearMessageBox", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_closeProximityMatch_result({success: result}); output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_closeProximityMatch_result(err); output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.closeProximityMatch(args.sessionId, function (err, result) { var result = new TalkService_closeProximityMatch_result((err != null ? err : {success: result})); output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_commitSendMessage_result({success: result}); output.writeMessageBegin("commitSendMessage", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_commitSendMessage_result(err); output.writeMessageBegin("commitSendMessage", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.commitSendMessage(args.seq, args.messageId, args.receiverMids, function (err, result) { var result = new TalkService_commitSendMessage_result((err != null ? err : {success: result})); output.writeMessageBegin("commitSendMessage", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_commitSendMessages_result({success: result}); output.writeMessageBegin("commitSendMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_commitSendMessages_result(err); output.writeMessageBegin("commitSendMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.commitSendMessages(args.seq, args.messageIds, args.receiverMids, function (err, result) { var result = new TalkService_commitSendMessages_result((err != null ? err : {success: result})); output.writeMessageBegin("commitSendMessages", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_commitUpdateProfile_result({success: result}); output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_commitUpdateProfile_result(err); output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.commitUpdateProfile(args.seq, args.attrs, args.receiverMids, function (err, result) { var result = new TalkService_commitUpdateProfile_result((err != null ? err : {success: result})); output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_confirmEmail_result({success: result}); output.writeMessageBegin("confirmEmail", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_confirmEmail_result(err); output.writeMessageBegin("confirmEmail", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.confirmEmail(args.verifier, args.pinCode, function (err, result) { var result = new TalkService_confirmEmail_result((err != null ? err : {success: result})); output.writeMessageBegin("confirmEmail", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_createGroup_result({success: result}); output.writeMessageBegin("createGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_createGroup_result(err); output.writeMessageBegin("createGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.createGroup(args.seq, args.name, args.contactIds, function (err, result) { var result = new TalkService_createGroup_result((err != null ? err : {success: result})); output.writeMessageBegin("createGroup", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_createQrcodeBase64Image_result({success: result}); output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_createQrcodeBase64Image_result(err); output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.REPLY, 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 = new TalkService_createQrcodeBase64Image_result((err != null ? err : {success: result})); output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_createRoom_result({success: result}); output.writeMessageBegin("createRoom", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_createRoom_result(err); output.writeMessageBegin("createRoom", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.createRoom(args.reqSeq, args.contactIds, function (err, result) { var result = new TalkService_createRoom_result((err != null ? err : {success: result})); output.writeMessageBegin("createRoom", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_createSession_result({success: result}); output.writeMessageBegin("createSession", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_createSession_result(err); output.writeMessageBegin("createSession", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.createSession( function (err, result) { var result = new TalkService_createSession_result((err != null ? err : {success: result})); output.writeMessageBegin("createSession", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_fetchAnnouncements_result({success: result}); output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_fetchAnnouncements_result(err); output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.fetchAnnouncements(args.lastFetchedIndex, function (err, result) { var result = new TalkService_fetchAnnouncements_result((err != null ? err : {success: result})); output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_fetchMessages_result({success: result}); output.writeMessageBegin("fetchMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_fetchMessages_result(err); output.writeMessageBegin("fetchMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.fetchMessages(args.localTs, args.count, function (err, result) { var result = new TalkService_fetchMessages_result((err != null ? err : {success: result})); output.writeMessageBegin("fetchMessages", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_fetchOperations_result({success: result}); output.writeMessageBegin("fetchOperations", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_fetchOperations_result(err); output.writeMessageBegin("fetchOperations", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.fetchOperations(args.localRev, args.count, function (err, result) { var result = new TalkService_fetchOperations_result((err != null ? err : {success: result})); output.writeMessageBegin("fetchOperations", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_fetchOps_result({success: result}); output.writeMessageBegin("fetchOps", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_fetchOps_result(err); output.writeMessageBegin("fetchOps", Thrift.MessageType.REPLY, 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 = new TalkService_fetchOps_result((err != null ? err : {success: result})); output.writeMessageBegin("fetchOps", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_findAndAddContactsByEmail_result({success: result}); output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_findAndAddContactsByEmail_result(err); output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findAndAddContactsByEmail(args.reqSeq, args.emails, function (err, result) { var result = new TalkService_findAndAddContactsByEmail_result((err != null ? err : {success: result})); output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.REPLY, seqid); result.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 === 2) { Q.fcall(this._handler.findAndAddContactsByMid, args.reqSeq, args.mid) .then(function(result) { var result = new TalkService_findAndAddContactsByMid_result({success: result}); output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_findAndAddContactsByMid_result(err); output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findAndAddContactsByMid(args.reqSeq, args.mid, function (err, result) { var result = new TalkService_findAndAddContactsByMid_result((err != null ? err : {success: result})); output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_findAndAddContactsByPhone_result({success: result}); output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_findAndAddContactsByPhone_result(err); output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findAndAddContactsByPhone(args.reqSeq, args.phones, function (err, result) { var result = new TalkService_findAndAddContactsByPhone_result((err != null ? err : {success: result})); output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_findAndAddContactsByUserid_result({success: result}); output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_findAndAddContactsByUserid_result(err); output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findAndAddContactsByUserid(args.reqSeq, args.userid, function (err, result) { var result = new TalkService_findAndAddContactsByUserid_result((err != null ? err : {success: result})); output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_findContactByUserid_result({success: result}); output.writeMessageBegin("findContactByUserid", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_findContactByUserid_result(err); output.writeMessageBegin("findContactByUserid", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findContactByUserid(args.userid, function (err, result) { var result = new TalkService_findContactByUserid_result((err != null ? err : {success: result})); output.writeMessageBegin("findContactByUserid", Thrift.MessageType.REPLY, seqid); result.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.ticketId) .then(function(result) { var result = new TalkService_findContactByUserTicket_result({success: result}); output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_findContactByUserTicket_result(err); output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findContactByUserTicket(args.ticketId, function (err, result) { var result = new TalkService_findContactByUserTicket_result((err != null ? err : {success: result})); output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_findGroupByTicket_result({success: result}); output.writeMessageBegin("findGroupByTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_findGroupByTicket_result(err); output.writeMessageBegin("findGroupByTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findGroupByTicket(args.ticketId, function (err, result) { var result = new TalkService_findGroupByTicket_result((err != null ? err : {success: result})); output.writeMessageBegin("findGroupByTicket", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_findContactsByEmail_result({success: result}); output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_findContactsByEmail_result(err); output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findContactsByEmail(args.emails, function (err, result) { var result = new TalkService_findContactsByEmail_result((err != null ? err : {success: result})); output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_findContactsByPhone_result({success: result}); output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_findContactsByPhone_result(err); output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findContactsByPhone(args.phones, function (err, result) { var result = new TalkService_findContactsByPhone_result((err != null ? err : {success: result})); output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_findSnsIdUserStatus_result({success: result}); output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_findSnsIdUserStatus_result(err); output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.findSnsIdUserStatus(args.snsIdType, args.snsAccessToken, args.udidHash, function (err, result) { var result = new TalkService_findSnsIdUserStatus_result((err != null ? err : {success: result})); output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_finishUpdateVerification_result({success: result}); output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_finishUpdateVerification_result(err); output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.finishUpdateVerification(args.sessionId, function (err, result) { var result = new TalkService_finishUpdateVerification_result((err != null ? err : {success: result})); output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_generateUserTicket_result({success: result}); output.writeMessageBegin("generateUserTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_generateUserTicket_result(err); output.writeMessageBegin("generateUserTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.generateUserTicket(args.expirationTime, args.maxUseCount, function (err, result) { var result = new TalkService_generateUserTicket_result((err != null ? err : {success: result})); output.writeMessageBegin("generateUserTicket", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getAcceptedProximityMatches_result({success: result}); output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getAcceptedProximityMatches_result(err); output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getAcceptedProximityMatches(args.sessionId, function (err, result) { var result = new TalkService_getAcceptedProximityMatches_result((err != null ? err : {success: result})); output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getActiveBuddySubscriberIds_result({success: result}); output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getActiveBuddySubscriberIds_result(err); output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getActiveBuddySubscriberIds( function (err, result) { var result = new TalkService_getActiveBuddySubscriberIds_result((err != null ? err : {success: result})); output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getAllContactIds_result({success: result}); output.writeMessageBegin("getAllContactIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getAllContactIds_result(err); output.writeMessageBegin("getAllContactIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getAllContactIds( function (err, result) { var result = new TalkService_getAllContactIds_result((err != null ? err : {success: result})); output.writeMessageBegin("getAllContactIds", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getAuthQrcode_result({success: result}); output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getAuthQrcode_result(err); output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getAuthQrcode(args.keepLoggedIn, args.systemName, function (err, result) { var result = new TalkService_getAuthQrcode_result((err != null ? err : {success: result})); output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getBlockedContactIds_result({success: result}); output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getBlockedContactIds_result(err); output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getBlockedContactIds( function (err, result) { var result = new TalkService_getBlockedContactIds_result((err != null ? err : {success: result})); output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getBlockedContactIdsByRange_result({success: result}); output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getBlockedContactIdsByRange_result(err); output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getBlockedContactIdsByRange(args.start, args.count, function (err, result) { var result = new TalkService_getBlockedContactIdsByRange_result((err != null ? err : {success: result})); output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getBlockedRecommendationIds_result({success: result}); output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getBlockedRecommendationIds_result(err); output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getBlockedRecommendationIds( function (err, result) { var result = new TalkService_getBlockedRecommendationIds_result((err != null ? err : {success: result})); output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getBuddyBlockerIds_result({success: result}); output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getBuddyBlockerIds_result(err); output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getBuddyBlockerIds( function (err, result) { var result = new TalkService_getBuddyBlockerIds_result((err != null ? err : {success: result})); output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getBuddyLocation_result({success: result}); output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getBuddyLocation_result(err); output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getBuddyLocation(args.mid, args.index, function (err, result) { var result = new TalkService_getBuddyLocation_result((err != null ? err : {success: result})); output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getCompactContactsModifiedSince_result({success: result}); output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getCompactContactsModifiedSince_result(err); output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getCompactContactsModifiedSince(args.timestamp, function (err, result) { var result = new TalkService_getCompactContactsModifiedSince_result((err != null ? err : {success: result})); output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getCompactGroup_result({success: result}); output.writeMessageBegin("getCompactGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getCompactGroup_result(err); output.writeMessageBegin("getCompactGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getCompactGroup(args.groupId, function (err, result) { var result = new TalkService_getCompactGroup_result((err != null ? err : {success: result})); output.writeMessageBegin("getCompactGroup", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getCompactRoom_result({success: result}); output.writeMessageBegin("getCompactRoom", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getCompactRoom_result(err); output.writeMessageBegin("getCompactRoom", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getCompactRoom(args.roomId, function (err, result) { var result = new TalkService_getCompactRoom_result((err != null ? err : {success: result})); output.writeMessageBegin("getCompactRoom", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getContact_result({success: result}); output.writeMessageBegin("getContact", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getContact_result(err); output.writeMessageBegin("getContact", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getContact(args.id, function (err, result) { var result = new TalkService_getContact_result((err != null ? err : {success: result})); output.writeMessageBegin("getContact", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getContacts_result({success: result}); output.writeMessageBegin("getContacts", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getContacts_result(err); output.writeMessageBegin("getContacts", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getContacts(args.ids, function (err, result) { var result = new TalkService_getContacts_result((err != null ? err : {success: result})); output.writeMessageBegin("getContacts", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getCountryWithRequestIp_result({success: result}); output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getCountryWithRequestIp_result(err); output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getCountryWithRequestIp( function (err, result) { var result = new TalkService_getCountryWithRequestIp_result((err != null ? err : {success: result})); output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getFavoriteMids_result({success: result}); output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getFavoriteMids_result(err); output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getFavoriteMids( function (err, result) { var result = new TalkService_getFavoriteMids_result((err != null ? err : {success: result})); output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getGroup_result({success: result}); output.writeMessageBegin("getGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getGroup_result(err); output.writeMessageBegin("getGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getGroup(args.groupId, function (err, result) { var result = new TalkService_getGroup_result((err != null ? err : {success: result})); output.writeMessageBegin("getGroup", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getGroupIdsInvited_result({success: result}); output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getGroupIdsInvited_result(err); output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getGroupIdsInvited( function (err, result) { var result = new TalkService_getGroupIdsInvited_result((err != null ? err : {success: result})); output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getGroupIdsJoined_result({success: result}); output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getGroupIdsJoined_result(err); output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getGroupIdsJoined( function (err, result) { var result = new TalkService_getGroupIdsJoined_result((err != null ? err : {success: result})); output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getGroups_result({success: result}); output.writeMessageBegin("getGroups", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getGroups_result(err); output.writeMessageBegin("getGroups", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getGroups(args.groupIds, function (err, result) { var result = new TalkService_getGroups_result((err != null ? err : {success: result})); output.writeMessageBegin("getGroups", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getHiddenContactMids_result({success: result}); output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getHiddenContactMids_result(err); output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getHiddenContactMids( function (err, result) { var result = new TalkService_getHiddenContactMids_result((err != null ? err : {success: result})); output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getIdentityIdentifier_result({success: result}); output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getIdentityIdentifier_result(err); output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getIdentityIdentifier( function (err, result) { var result = new TalkService_getIdentityIdentifier_result((err != null ? err : {success: result})); output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getLastAnnouncementIndex_result({success: result}); output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getLastAnnouncementIndex_result(err); output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getLastAnnouncementIndex( function (err, result) { var result = new TalkService_getLastAnnouncementIndex_result((err != null ? err : {success: result})); output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getLastOpRevision_result({success: result}); output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getLastOpRevision_result(err); output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getLastOpRevision( function (err, result) { var result = new TalkService_getLastOpRevision_result((err != null ? err : {success: result})); output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getMessageBox_result({success: result}); output.writeMessageBegin("getMessageBox", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getMessageBox_result(err); output.writeMessageBegin("getMessageBox", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBox(args.channelId, args.messageBoxId, args.lastMessagesCount, function (err, result) { var result = new TalkService_getMessageBox_result((err != null ? err : {success: result})); output.writeMessageBegin("getMessageBox", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getMessageBoxCompactWrapUp_result({success: result}); output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getMessageBoxCompactWrapUp_result(err); output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxCompactWrapUp(args.mid, function (err, result) { var result = new TalkService_getMessageBoxCompactWrapUp_result((err != null ? err : {success: result})); output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getMessageBoxCompactWrapUpList_result({success: result}); output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getMessageBoxCompactWrapUpList_result(err); output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxCompactWrapUpList(args.start, args.messageBoxCount, function (err, result) { var result = new TalkService_getMessageBoxCompactWrapUpList_result((err != null ? err : {success: result})); output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getMessageBoxList_result({success: result}); output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getMessageBoxList_result(err); output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxList(args.channelId, args.lastMessagesCount, function (err, result) { var result = new TalkService_getMessageBoxList_result((err != null ? err : {success: result})); output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getMessageBoxListByStatus_result({success: result}); output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getMessageBoxListByStatus_result(err); output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxListByStatus(args.channelId, args.lastMessagesCount, args.status, function (err, result) { var result = new TalkService_getMessageBoxListByStatus_result((err != null ? err : {success: result})); output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getMessageBoxWrapUp_result({success: result}); output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getMessageBoxWrapUp_result(err); output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxWrapUp(args.mid, function (err, result) { var result = new TalkService_getMessageBoxWrapUp_result((err != null ? err : {success: result})); output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getMessageBoxWrapUpList_result({success: result}); output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getMessageBoxWrapUpList_result(err); output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getMessageBoxWrapUpList(args.start, args.messageBoxCount, function (err, result) { var result = new TalkService_getMessageBoxWrapUpList_result((err != null ? err : {success: result})); output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getMessagesBySequenceNumber_result({success: result}); output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getMessagesBySequenceNumber_result(err); output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.REPLY, 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 = new TalkService_getMessagesBySequenceNumber_result((err != null ? err : {success: result})); output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getNextMessages_result({success: result}); output.writeMessageBegin("getNextMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getNextMessages_result(err); output.writeMessageBegin("getNextMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getNextMessages(args.messageBoxId, args.startSeq, args.messagesCount, function (err, result) { var result = new TalkService_getNextMessages_result((err != null ? err : {success: result})); output.writeMessageBegin("getNextMessages", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getNotificationPolicy_result({success: result}); output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getNotificationPolicy_result(err); output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getNotificationPolicy(args.carrier, function (err, result) { var result = new TalkService_getNotificationPolicy_result((err != null ? err : {success: result})); output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getPreviousMessages_result({success: result}); output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getPreviousMessages_result(err); output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getPreviousMessages(args.messageBoxId, args.endSeq, args.messagesCount, function (err, result) { var result = new TalkService_getPreviousMessages_result((err != null ? err : {success: result})); output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getProfile_result({success: result}); output.writeMessageBegin("getProfile", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getProfile_result(err); output.writeMessageBegin("getProfile", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getProfile( function (err, result) { var result = new TalkService_getProfile_result((err != null ? err : {success: result})); output.writeMessageBegin("getProfile", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getProximityMatchCandidateList_result({success: result}); output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getProximityMatchCandidateList_result(err); output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getProximityMatchCandidateList(args.sessionId, function (err, result) { var result = new TalkService_getProximityMatchCandidateList_result((err != null ? err : {success: result})); output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getProximityMatchCandidates_result({success: result}); output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getProximityMatchCandidates_result(err); output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getProximityMatchCandidates(args.sessionId, function (err, result) { var result = new TalkService_getProximityMatchCandidates_result((err != null ? err : {success: result})); output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getRecentMessages_result({success: result}); output.writeMessageBegin("getRecentMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getRecentMessages_result(err); output.writeMessageBegin("getRecentMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getRecentMessages(args.messageBoxId, args.messagesCount, function (err, result) { var result = new TalkService_getRecentMessages_result((err != null ? err : {success: result})); output.writeMessageBegin("getRecentMessages", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getRecommendationIds_result({success: result}); output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getRecommendationIds_result(err); output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getRecommendationIds( function (err, result) { var result = new TalkService_getRecommendationIds_result((err != null ? err : {success: result})); output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getRoom_result({success: result}); output.writeMessageBegin("getRoom", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getRoom_result(err); output.writeMessageBegin("getRoom", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getRoom(args.roomId, function (err, result) { var result = new TalkService_getRoom_result((err != null ? err : {success: result})); output.writeMessageBegin("getRoom", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getRSAKeyInfo_result({success: result}); output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getRSAKeyInfo_result(err); output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getRSAKeyInfo(args.provider, function (err, result) { var result = new TalkService_getRSAKeyInfo_result((err != null ? err : {success: result})); output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getServerTime_result({success: result}); output.writeMessageBegin("getServerTime", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getServerTime_result(err); output.writeMessageBegin("getServerTime", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getServerTime( function (err, result) { var result = new TalkService_getServerTime_result((err != null ? err : {success: result})); output.writeMessageBegin("getServerTime", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getSessions_result({success: result}); output.writeMessageBegin("getSessions", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getSessions_result(err); output.writeMessageBegin("getSessions", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getSessions( function (err, result) { var result = new TalkService_getSessions_result((err != null ? err : {success: result})); output.writeMessageBegin("getSessions", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getSettings_result({success: result}); output.writeMessageBegin("getSettings", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getSettings_result(err); output.writeMessageBegin("getSettings", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getSettings( function (err, result) { var result = new TalkService_getSettings_result((err != null ? err : {success: result})); output.writeMessageBegin("getSettings", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getSettingsAttributes_result({success: result}); output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getSettingsAttributes_result(err); output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getSettingsAttributes(args.attrBitset, function (err, result) { var result = new TalkService_getSettingsAttributes_result((err != null ? err : {success: result})); output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getSystemConfiguration_result({success: result}); output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getSystemConfiguration_result(err); output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getSystemConfiguration( function (err, result) { var result = new TalkService_getSystemConfiguration_result((err != null ? err : {success: result})); output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getUserTicket_result({success: result}); output.writeMessageBegin("getUserTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getUserTicket_result(err); output.writeMessageBegin("getUserTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getUserTicket( function (err, result) { var result = new TalkService_getUserTicket_result((err != null ? err : {success: result})); output.writeMessageBegin("getUserTicket", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_getWapInvitation_result({success: result}); output.writeMessageBegin("getWapInvitation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_getWapInvitation_result(err); output.writeMessageBegin("getWapInvitation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.getWapInvitation(args.invitationHash, function (err, result) { var result = new TalkService_getWapInvitation_result((err != null ? err : {success: result})); output.writeMessageBegin("getWapInvitation", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_invalidateUserTicket_result({success: result}); output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_invalidateUserTicket_result(err); output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.invalidateUserTicket( function (err, result) { var result = new TalkService_invalidateUserTicket_result((err != null ? err : {success: result})); output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_inviteFriendsBySms_result({success: result}); output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_inviteFriendsBySms_result(err); output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.inviteFriendsBySms(args.phoneNumberList, function (err, result) { var result = new TalkService_inviteFriendsBySms_result((err != null ? err : {success: result})); output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_inviteIntoGroup_result({success: result}); output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_inviteIntoGroup_result(err); output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.inviteIntoGroup(args.reqSeq, args.groupId, args.contactIds, function (err, result) { var result = new TalkService_inviteIntoGroup_result((err != null ? err : {success: result})); output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_inviteIntoRoom_result({success: result}); output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_inviteIntoRoom_result(err); output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.inviteIntoRoom(args.reqSeq, args.roomId, args.contactIds, function (err, result) { var result = new TalkService_inviteIntoRoom_result((err != null ? err : {success: result})); output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_inviteViaEmail_result({success: result}); output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_inviteViaEmail_result(err); output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.inviteViaEmail(args.reqSeq, args.email, args.name, function (err, result) { var result = new TalkService_inviteViaEmail_result((err != null ? err : {success: result})); output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_isIdentityIdentifierAvailable_result({success: result}); output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_isIdentityIdentifierAvailable_result(err); output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.isIdentityIdentifierAvailable(args.provider, args.identifier, function (err, result) { var result = new TalkService_isIdentityIdentifierAvailable_result((err != null ? err : {success: result})); output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_isUseridAvailable_result({success: result}); output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_isUseridAvailable_result(err); output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.isUseridAvailable(args.userid, function (err, result) { var result = new TalkService_isUseridAvailable_result((err != null ? err : {success: result})); output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_kickoutFromGroup_result({success: result}); output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_kickoutFromGroup_result(err); output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.kickoutFromGroup(args.reqSeq, args.groupId, args.contactIds, function (err, result) { var result = new TalkService_kickoutFromGroup_result((err != null ? err : {success: result})); output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.REPLY, seqid); result.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.groupId) .then(function(result) { var result = new TalkService_reissueGroupTicket_result({success: result}); output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_reissueGroupTicket_result(err); output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reissueGroupTicket(args.groupId, function (err, result) { var result = new TalkService_reissueGroupTicket_result((err != null ? err : {success: result})); output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_leaveGroup_result({success: result}); output.writeMessageBegin("leaveGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_leaveGroup_result(err); output.writeMessageBegin("leaveGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.leaveGroup(args.reqSeq, args.groupId, function (err, result) { var result = new TalkService_leaveGroup_result((err != null ? err : {success: result})); output.writeMessageBegin("leaveGroup", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_leaveRoom_result({success: result}); output.writeMessageBegin("leaveRoom", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_leaveRoom_result(err); output.writeMessageBegin("leaveRoom", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.leaveRoom(args.reqSeq, args.roomId, function (err, result) { var result = new TalkService_leaveRoom_result((err != null ? err : {success: result})); output.writeMessageBegin("leaveRoom", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_loginWithIdentityCredential_result({success: result}); output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_loginWithIdentityCredential_result(err); output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.REPLY, 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 = new TalkService_loginWithIdentityCredential_result((err != null ? err : {success: result})); output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_loginWithIdentityCredentialForCertificate_result({success: result}); output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_loginWithIdentityCredentialForCertificate_result(err); output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.REPLY, 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 = new TalkService_loginWithIdentityCredentialForCertificate_result((err != null ? err : {success: result})); output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_loginWithVerifier_result({success: result}); output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_loginWithVerifier_result(err); output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.loginWithVerifier(args.verifier, function (err, result) { var result = new TalkService_loginWithVerifier_result((err != null ? err : {success: result})); output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_loginWithVerifierForCerificate_result({success: result}); output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_loginWithVerifierForCerificate_result(err); output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.loginWithVerifierForCerificate(args.verifier, function (err, result) { var result = new TalkService_loginWithVerifierForCerificate_result((err != null ? err : {success: result})); output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_loginWithVerifierForCertificate_result({success: result}); output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_loginWithVerifierForCertificate_result(err); output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.loginWithVerifierForCertificate(args.verifier, function (err, result) { var result = new TalkService_loginWithVerifierForCertificate_result((err != null ? err : {success: result})); output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_logout_result({success: result}); output.writeMessageBegin("logout", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_logout_result(err); output.writeMessageBegin("logout", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.logout( function (err, result) { var result = new TalkService_logout_result((err != null ? err : {success: result})); output.writeMessageBegin("logout", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_logoutSession_result({success: result}); output.writeMessageBegin("logoutSession", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_logoutSession_result(err); output.writeMessageBegin("logoutSession", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.logoutSession(args.tokenKey, function (err, result) { var result = new TalkService_logoutSession_result((err != null ? err : {success: result})); output.writeMessageBegin("logoutSession", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_noop_result({success: result}); output.writeMessageBegin("noop", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_noop_result(err); output.writeMessageBegin("noop", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.noop( function (err, result) { var result = new TalkService_noop_result((err != null ? err : {success: result})); output.writeMessageBegin("noop", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_notifiedRedirect_result({success: result}); output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_notifiedRedirect_result(err); output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifiedRedirect(args.paramMap, function (err, result) { var result = new TalkService_notifiedRedirect_result((err != null ? err : {success: result})); output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_notifyBuddyOnAir_result({success: result}); output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_notifyBuddyOnAir_result(err); output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifyBuddyOnAir(args.seq, args.receiverMids, function (err, result) { var result = new TalkService_notifyBuddyOnAir_result((err != null ? err : {success: result})); output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_notifyIndividualEvent_result({success: result}); output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_notifyIndividualEvent_result(err); output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifyIndividualEvent(args.notificationStatus, args.receiverMids, function (err, result) { var result = new TalkService_notifyIndividualEvent_result((err != null ? err : {success: result})); output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_notifyInstalled_result({success: result}); output.writeMessageBegin("notifyInstalled", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_notifyInstalled_result(err); output.writeMessageBegin("notifyInstalled", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifyInstalled(args.udidHash, args.applicationTypeWithExtensions, function (err, result) { var result = new TalkService_notifyInstalled_result((err != null ? err : {success: result})); output.writeMessageBegin("notifyInstalled", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_notifyRegistrationComplete_result({success: result}); output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_notifyRegistrationComplete_result(err); output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifyRegistrationComplete(args.udidHash, args.applicationTypeWithExtensions, function (err, result) { var result = new TalkService_notifyRegistrationComplete_result((err != null ? err : {success: result})); output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_notifySleep_result({success: result}); output.writeMessageBegin("notifySleep", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_notifySleep_result(err); output.writeMessageBegin("notifySleep", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifySleep(args.lastRev, args.badge, function (err, result) { var result = new TalkService_notifySleep_result((err != null ? err : {success: result})); output.writeMessageBegin("notifySleep", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_notifyUpdated_result({success: result}); output.writeMessageBegin("notifyUpdated", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_notifyUpdated_result(err); output.writeMessageBegin("notifyUpdated", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.notifyUpdated(args.lastRev, args.deviceInfo, function (err, result) { var result = new TalkService_notifyUpdated_result((err != null ? err : {success: result})); output.writeMessageBegin("notifyUpdated", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_openProximityMatch_result({success: result}); output.writeMessageBegin("openProximityMatch", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_openProximityMatch_result(err); output.writeMessageBegin("openProximityMatch", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.openProximityMatch(args.location, function (err, result) { var result = new TalkService_openProximityMatch_result((err != null ? err : {success: result})); output.writeMessageBegin("openProximityMatch", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_registerBuddyUser_result({success: result}); output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_registerBuddyUser_result(err); output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerBuddyUser(args.buddyId, args.registrarPassword, function (err, result) { var result = new TalkService_registerBuddyUser_result((err != null ? err : {success: result})); output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_registerBuddyUserid_result({success: result}); output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_registerBuddyUserid_result(err); output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerBuddyUserid(args.seq, args.userid, function (err, result) { var result = new TalkService_registerBuddyUserid_result((err != null ? err : {success: result})); output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_registerDevice_result({success: result}); output.writeMessageBegin("registerDevice", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_registerDevice_result(err); output.writeMessageBegin("registerDevice", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerDevice(args.sessionId, function (err, result) { var result = new TalkService_registerDevice_result((err != null ? err : {success: result})); output.writeMessageBegin("registerDevice", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_registerDeviceWithIdentityCredential_result({success: result}); output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_registerDeviceWithIdentityCredential_result(err); output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.REPLY, 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 = new TalkService_registerDeviceWithIdentityCredential_result((err != null ? err : {success: result})); output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_registerDeviceWithoutPhoneNumber_result({success: result}); output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_registerDeviceWithoutPhoneNumber_result(err); output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerDeviceWithoutPhoneNumber(args.region, args.udidHash, args.deviceInfo, function (err, result) { var result = new TalkService_registerDeviceWithoutPhoneNumber_result((err != null ? err : {success: result})); output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.REPLY, seqid); result.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 === 7) { Q.fcall(this._handler.registerDeviceWithoutPhoneNumberWithIdentityCredential, args.region, args.udidHash, args.deviceInfo, args.provider, args.identifier, args.verifier, args.mid) .then(function(result) { var result = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result({success: result}); output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result(err); output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.REPLY, 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, function (err, result) { var result = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result((err != null ? err : {success: result})); output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_registerUserid_result({success: result}); output.writeMessageBegin("registerUserid", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_registerUserid_result(err); output.writeMessageBegin("registerUserid", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.registerUserid(args.reqSeq, args.userid, function (err, result) { var result = new TalkService_registerUserid_result((err != null ? err : {success: result})); output.writeMessageBegin("registerUserid", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_registerWapDevice_result({success: result}); output.writeMessageBegin("registerWapDevice", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_registerWapDevice_result(err); output.writeMessageBegin("registerWapDevice", Thrift.MessageType.REPLY, 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 = new TalkService_registerWapDevice_result((err != null ? err : {success: result})); output.writeMessageBegin("registerWapDevice", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_registerWithExistingSnsIdAndIdentityCredential_result({success: result}); output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_registerWithExistingSnsIdAndIdentityCredential_result(err); output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, 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 = new TalkService_registerWithExistingSnsIdAndIdentityCredential_result((err != null ? err : {success: result})); output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_registerWithSnsId_result({success: result}); output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_registerWithSnsId_result(err); output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.REPLY, 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 = new TalkService_registerWithSnsId_result((err != null ? err : {success: result})); output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_registerWithSnsIdAndIdentityCredential_result({success: result}); output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_registerWithSnsIdAndIdentityCredential_result(err); output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, 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 = new TalkService_registerWithSnsIdAndIdentityCredential_result((err != null ? err : {success: result})); output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_reissueDeviceCredential_result({success: result}); output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_reissueDeviceCredential_result(err); output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reissueDeviceCredential( function (err, result) { var result = new TalkService_reissueDeviceCredential_result((err != null ? err : {success: result})); output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_reissueUserTicket_result({success: result}); output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_reissueUserTicket_result(err); output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reissueUserTicket(args.expirationTime, args.maxUseCount, function (err, result) { var result = new TalkService_reissueUserTicket_result((err != null ? err : {success: result})); output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_rejectGroupInvitation_result({success: result}); output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_rejectGroupInvitation_result(err); output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.rejectGroupInvitation(args.reqSeq, args.groupId, function (err, result) { var result = new TalkService_rejectGroupInvitation_result((err != null ? err : {success: result})); output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_releaseSession_result({success: result}); output.writeMessageBegin("releaseSession", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_releaseSession_result(err); output.writeMessageBegin("releaseSession", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.releaseSession( function (err, result) { var result = new TalkService_releaseSession_result((err != null ? err : {success: result})); output.writeMessageBegin("releaseSession", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_removeAllMessages_result({success: result}); output.writeMessageBegin("removeAllMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_removeAllMessages_result(err); output.writeMessageBegin("removeAllMessages", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeAllMessages(args.seq, args.lastMessageId, function (err, result) { var result = new TalkService_removeAllMessages_result((err != null ? err : {success: result})); output.writeMessageBegin("removeAllMessages", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_removeBuddyLocation_result({success: result}); output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_removeBuddyLocation_result(err); output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeBuddyLocation(args.mid, args.index, function (err, result) { var result = new TalkService_removeBuddyLocation_result((err != null ? err : {success: result})); output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_removeMessage_result({success: result}); output.writeMessageBegin("removeMessage", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_removeMessage_result(err); output.writeMessageBegin("removeMessage", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeMessage(args.messageId, function (err, result) { var result = new TalkService_removeMessage_result((err != null ? err : {success: result})); output.writeMessageBegin("removeMessage", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_removeMessageFromMyHome_result({success: result}); output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_removeMessageFromMyHome_result(err); output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeMessageFromMyHome(args.messageId, function (err, result) { var result = new TalkService_removeMessageFromMyHome_result((err != null ? err : {success: result})); output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_removeSnsId_result({success: result}); output.writeMessageBegin("removeSnsId", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_removeSnsId_result(err); output.writeMessageBegin("removeSnsId", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.removeSnsId(args.snsIdType, function (err, result) { var result = new TalkService_removeSnsId_result((err != null ? err : {success: result})); output.writeMessageBegin("removeSnsId", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_report_result({success: result}); output.writeMessageBegin("report", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_report_result(err); output.writeMessageBegin("report", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.report(args.syncOpRevision, args.category, args.report, function (err, result) { var result = new TalkService_report_result((err != null ? err : {success: result})); output.writeMessageBegin("report", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_reportContacts_result({success: result}); output.writeMessageBegin("reportContacts", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_reportContacts_result(err); output.writeMessageBegin("reportContacts", Thrift.MessageType.REPLY, 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 = new TalkService_reportContacts_result((err != null ? err : {success: result})); output.writeMessageBegin("reportContacts", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_reportGroups_result({success: result}); output.writeMessageBegin("reportGroups", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_reportGroups_result(err); output.writeMessageBegin("reportGroups", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportGroups(args.syncOpRevision, args.groups, function (err, result) { var result = new TalkService_reportGroups_result((err != null ? err : {success: result})); output.writeMessageBegin("reportGroups", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_reportProfile_result({success: result}); output.writeMessageBegin("reportProfile", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_reportProfile_result(err); output.writeMessageBegin("reportProfile", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportProfile(args.syncOpRevision, args.profile, function (err, result) { var result = new TalkService_reportProfile_result((err != null ? err : {success: result})); output.writeMessageBegin("reportProfile", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_reportRooms_result({success: result}); output.writeMessageBegin("reportRooms", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_reportRooms_result(err); output.writeMessageBegin("reportRooms", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportRooms(args.syncOpRevision, args.rooms, function (err, result) { var result = new TalkService_reportRooms_result((err != null ? err : {success: result})); output.writeMessageBegin("reportRooms", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_reportSettings_result({success: result}); output.writeMessageBegin("reportSettings", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_reportSettings_result(err); output.writeMessageBegin("reportSettings", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportSettings(args.syncOpRevision, args.settings, function (err, result) { var result = new TalkService_reportSettings_result((err != null ? err : {success: result})); output.writeMessageBegin("reportSettings", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_reportSpammer_result({success: result}); output.writeMessageBegin("reportSpammer", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_reportSpammer_result(err); output.writeMessageBegin("reportSpammer", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.reportSpammer(args.spammerMid, args.spammerReasons, args.spamMessageIds, function (err, result) { var result = new TalkService_reportSpammer_result((err != null ? err : {success: result})); output.writeMessageBegin("reportSpammer", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_requestAccountPasswordReset_result({success: result}); output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_requestAccountPasswordReset_result(err); output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.requestAccountPasswordReset(args.provider, args.identifier, args.locale, function (err, result) { var result = new TalkService_requestAccountPasswordReset_result((err != null ? err : {success: result})); output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_requestEmailConfirmation_result({success: result}); output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_requestEmailConfirmation_result(err); output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.requestEmailConfirmation(args.emailConfirmation, function (err, result) { var result = new TalkService_requestEmailConfirmation_result((err != null ? err : {success: result})); output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_requestIdentityUnbind_result({success: result}); output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_requestIdentityUnbind_result(err); output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.requestIdentityUnbind(args.provider, args.identifier, function (err, result) { var result = new TalkService_requestIdentityUnbind_result((err != null ? err : {success: result})); output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_resendEmailConfirmation_result({success: result}); output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_resendEmailConfirmation_result(err); output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.resendEmailConfirmation(args.verifier, function (err, result) { var result = new TalkService_resendEmailConfirmation_result((err != null ? err : {success: result})); output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_resendPinCode_result({success: result}); output.writeMessageBegin("resendPinCode", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_resendPinCode_result(err); output.writeMessageBegin("resendPinCode", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.resendPinCode(args.sessionId, function (err, result) { var result = new TalkService_resendPinCode_result((err != null ? err : {success: result})); output.writeMessageBegin("resendPinCode", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_resendPinCodeBySMS_result({success: result}); output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_resendPinCodeBySMS_result(err); output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.resendPinCodeBySMS(args.sessionId, function (err, result) { var result = new TalkService_resendPinCodeBySMS_result((err != null ? err : {success: result})); output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_sendChatChecked_result({success: result}); output.writeMessageBegin("sendChatChecked", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_sendChatChecked_result(err); output.writeMessageBegin("sendChatChecked", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendChatChecked(args.seq, args.consumer, args.lastMessageId, function (err, result) { var result = new TalkService_sendChatChecked_result((err != null ? err : {success: result})); output.writeMessageBegin("sendChatChecked", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_sendChatRemoved_result({success: result}); output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_sendChatRemoved_result(err); output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendChatRemoved(args.seq, args.consumer, args.lastMessageId, function (err, result) { var result = new TalkService_sendChatRemoved_result((err != null ? err : {success: result})); output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_sendContentPreviewUpdated_result({success: result}); output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_sendContentPreviewUpdated_result(err); output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendContentPreviewUpdated(args.esq, args.messageId, args.receiverMids, function (err, result) { var result = new TalkService_sendContentPreviewUpdated_result((err != null ? err : {success: result})); output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_sendContentReceipt_result({success: result}); output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_sendContentReceipt_result(err); output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendContentReceipt(args.seq, args.consumer, args.messageId, function (err, result) { var result = new TalkService_sendContentReceipt_result((err != null ? err : {success: result})); output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_sendDummyPush_result({success: result}); output.writeMessageBegin("sendDummyPush", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_sendDummyPush_result(err); output.writeMessageBegin("sendDummyPush", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendDummyPush( function (err, result) { var result = new TalkService_sendDummyPush_result((err != null ? err : {success: result})); output.writeMessageBegin("sendDummyPush", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_sendEvent_result({success: result}); output.writeMessageBegin("sendEvent", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_sendEvent_result(err); output.writeMessageBegin("sendEvent", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendEvent(args.seq, args.message, function (err, result) { var result = new TalkService_sendEvent_result((err != null ? err : {success: result})); output.writeMessageBegin("sendEvent", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_sendMessage_result({success: result}); output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_sendMessage_result(err); output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendMessage(args.seq, args.message, function (err, result) { var result = new TalkService_sendMessage_result((err != null ? err : {success: result})); output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_sendMessageIgnored_result({success: result}); output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_sendMessageIgnored_result(err); output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendMessageIgnored(args.seq, args.consumer, args.messageIds, function (err, result) { var result = new TalkService_sendMessageIgnored_result((err != null ? err : {success: result})); output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_sendMessageReceipt_result({success: result}); output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_sendMessageReceipt_result(err); output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendMessageReceipt(args.seq, args.consumer, args.messageIds, function (err, result) { var result = new TalkService_sendMessageReceipt_result((err != null ? err : {success: result})); output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_sendMessageToMyHome_result({success: result}); output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_sendMessageToMyHome_result(err); output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.sendMessageToMyHome(args.seq, args.message, function (err, result) { var result = new TalkService_sendMessageToMyHome_result((err != null ? err : {success: result})); output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_setBuddyLocation_result({success: result}); output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_setBuddyLocation_result(err); output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.setBuddyLocation(args.mid, args.index, args.location, function (err, result) { var result = new TalkService_setBuddyLocation_result((err != null ? err : {success: result})); output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.REPLY, seqid); result.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.provider, args.identifier, args.verifier) .then(function(result) { var result = new TalkService_setIdentityCredential_result({success: result}); output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_setIdentityCredential_result(err); output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.setIdentityCredential(args.provider, args.identifier, args.verifier, function (err, result) { var result = new TalkService_setIdentityCredential_result((err != null ? err : {success: result})); output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_setNotificationsEnabled_result({success: result}); output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_setNotificationsEnabled_result(err); output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.REPLY, 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 = new TalkService_setNotificationsEnabled_result((err != null ? err : {success: result})); output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_startUpdateVerification_result({success: result}); output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_startUpdateVerification_result(err); output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.REPLY, 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 = new TalkService_startUpdateVerification_result((err != null ? err : {success: result})); output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.REPLY, seqid); result.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 === 8) { Q.fcall(this._handler.startVerification, args.region, args.carrier, args.phone, args.udidHash, args.deviceInfo, args.networkCode, args.mid, args.locale) .then(function(result) { var result = new TalkService_startVerification_result({success: result}); output.writeMessageBegin("startVerification", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_startVerification_result(err); output.writeMessageBegin("startVerification", Thrift.MessageType.REPLY, 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, function (err, result) { var result = new TalkService_startVerification_result((err != null ? err : {success: result})); output.writeMessageBegin("startVerification", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_storeUpdateProfileAttribute_result({success: result}); output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_storeUpdateProfileAttribute_result(err); output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.storeUpdateProfileAttribute(args.seq, args.profileAttribute, args.value, function (err, result) { var result = new TalkService_storeUpdateProfileAttribute_result((err != null ? err : {success: result})); output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_syncContactBySnsIds_result({success: result}); output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_syncContactBySnsIds_result(err); output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.syncContactBySnsIds(args.reqSeq, args.modifications, function (err, result) { var result = new TalkService_syncContactBySnsIds_result((err != null ? err : {success: result})); output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_syncContacts_result({success: result}); output.writeMessageBegin("syncContacts", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_syncContacts_result(err); output.writeMessageBegin("syncContacts", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.syncContacts(args.reqSeq, args.localContacts, function (err, result) { var result = new TalkService_syncContacts_result((err != null ? err : {success: result})); output.writeMessageBegin("syncContacts", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_trySendMessage_result({success: result}); output.writeMessageBegin("trySendMessage", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_trySendMessage_result(err); output.writeMessageBegin("trySendMessage", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.trySendMessage(args.seq, args.message, function (err, result) { var result = new TalkService_trySendMessage_result((err != null ? err : {success: result})); output.writeMessageBegin("trySendMessage", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_unblockContact_result({success: result}); output.writeMessageBegin("unblockContact", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_unblockContact_result(err); output.writeMessageBegin("unblockContact", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.unblockContact(args.reqSeq, args.id, function (err, result) { var result = new TalkService_unblockContact_result((err != null ? err : {success: result})); output.writeMessageBegin("unblockContact", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_unblockRecommendation_result({success: result}); output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_unblockRecommendation_result(err); output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.unblockRecommendation(args.reqSeq, args.id, function (err, result) { var result = new TalkService_unblockRecommendation_result((err != null ? err : {success: result})); output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_unregisterUserAndDevice_result({success: result}); output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_unregisterUserAndDevice_result(err); output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.unregisterUserAndDevice( function (err, result) { var result = new TalkService_unregisterUserAndDevice_result((err != null ? err : {success: result})); output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateApnsDeviceToken_result({success: result}); output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateApnsDeviceToken_result(err); output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateApnsDeviceToken(args.apnsDeviceToken, function (err, result) { var result = new TalkService_updateApnsDeviceToken_result((err != null ? err : {success: result})); output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateBuddySetting_result({success: result}); output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateBuddySetting_result(err); output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateBuddySetting(args.key, args.value, function (err, result) { var result = new TalkService_updateBuddySetting_result((err != null ? err : {success: result})); output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateC2DMRegistrationId_result({success: result}); output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateC2DMRegistrationId_result(err); output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateC2DMRegistrationId(args.registrationId, function (err, result) { var result = new TalkService_updateC2DMRegistrationId_result((err != null ? err : {success: result})); output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateContactSetting_result({success: result}); output.writeMessageBegin("updateContactSetting", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateContactSetting_result(err); output.writeMessageBegin("updateContactSetting", Thrift.MessageType.REPLY, 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 = new TalkService_updateContactSetting_result((err != null ? err : {success: result})); output.writeMessageBegin("updateContactSetting", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateCustomModeSettings_result({success: result}); output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateCustomModeSettings_result(err); output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateCustomModeSettings(args.customMode, args.paramMap, function (err, result) { var result = new TalkService_updateCustomModeSettings_result((err != null ? err : {success: result})); output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateDeviceInfo_result({success: result}); output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateDeviceInfo_result(err); output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateDeviceInfo(args.deviceUid, args.deviceInfo, function (err, result) { var result = new TalkService_updateDeviceInfo_result((err != null ? err : {success: result})); output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateGroup_result({success: result}); output.writeMessageBegin("updateGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateGroup_result(err); output.writeMessageBegin("updateGroup", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateGroup(args.reqSeq, args.group, function (err, result) { var result = new TalkService_updateGroup_result((err != null ? err : {success: result})); output.writeMessageBegin("updateGroup", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateNotificationToken_result({success: result}); output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateNotificationToken_result(err); output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateNotificationToken(args.type, args.token, function (err, result) { var result = new TalkService_updateNotificationToken_result((err != null ? err : {success: result})); output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateNotificationTokenWithBytes_result({success: result}); output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateNotificationTokenWithBytes_result(err); output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateNotificationTokenWithBytes(args.type, args.token, function (err, result) { var result = new TalkService_updateNotificationTokenWithBytes_result((err != null ? err : {success: result})); output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateProfile_result({success: result}); output.writeMessageBegin("updateProfile", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateProfile_result(err); output.writeMessageBegin("updateProfile", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateProfile(args.reqSeq, args.profile, function (err, result) { var result = new TalkService_updateProfile_result((err != null ? err : {success: result})); output.writeMessageBegin("updateProfile", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateProfileAttribute_result({success: result}); output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateProfileAttribute_result(err); output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateProfileAttribute(args.reqSeq, args.attr, args.value, function (err, result) { var result = new TalkService_updateProfileAttribute_result((err != null ? err : {success: result})); output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateRegion_result({success: result}); output.writeMessageBegin("updateRegion", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateRegion_result(err); output.writeMessageBegin("updateRegion", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateRegion(args.region, function (err, result) { var result = new TalkService_updateRegion_result((err != null ? err : {success: result})); output.writeMessageBegin("updateRegion", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateSettings_result({success: result}); output.writeMessageBegin("updateSettings", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateSettings_result(err); output.writeMessageBegin("updateSettings", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateSettings(args.reqSeq, args.settings, function (err, result) { var result = new TalkService_updateSettings_result((err != null ? err : {success: result})); output.writeMessageBegin("updateSettings", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateSettings2_result({success: result}); output.writeMessageBegin("updateSettings2", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateSettings2_result(err); output.writeMessageBegin("updateSettings2", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateSettings2(args.reqSeq, args.settings, function (err, result) { var result = new TalkService_updateSettings2_result((err != null ? err : {success: result})); output.writeMessageBegin("updateSettings2", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateSettingsAttribute_result({success: result}); output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateSettingsAttribute_result(err); output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateSettingsAttribute(args.reqSeq, args.attr, args.value, function (err, result) { var result = new TalkService_updateSettingsAttribute_result((err != null ? err : {success: result})); output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_updateSettingsAttributes_result({success: result}); output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_updateSettingsAttributes_result(err); output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.updateSettingsAttributes(args.reqSeq, args.attrBitset, args.settings, function (err, result) { var result = new TalkService_updateSettingsAttributes_result((err != null ? err : {success: result})); output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_verifyIdentityCredential_result({success: result}); output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_verifyIdentityCredential_result(err); output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.verifyIdentityCredential(args.identityProvider, args.identifier, args.password, function (err, result) { var result = new TalkService_verifyIdentityCredential_result((err != null ? err : {success: result})); output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_verifyIdentityCredentialWithResult_result({success: result}); output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_verifyIdentityCredentialWithResult_result(err); output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.verifyIdentityCredentialWithResult(args.identityCredential, function (err, result) { var result = new TalkService_verifyIdentityCredentialWithResult_result((err != null ? err : {success: result})); output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_verifyPhone_result({success: result}); output.writeMessageBegin("verifyPhone", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_verifyPhone_result(err); output.writeMessageBegin("verifyPhone", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.verifyPhone(args.sessionId, args.pinCode, args.udidHash, function (err, result) { var result = new TalkService_verifyPhone_result((err != null ? err : {success: result})); output.writeMessageBegin("verifyPhone", Thrift.MessageType.REPLY, seqid); result.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 = new TalkService_verifyQrcode_result({success: result}); output.writeMessageBegin("verifyQrcode", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }, function (err) { var result = new TalkService_verifyQrcode_result(err); output.writeMessageBegin("verifyQrcode", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { this._handler.verifyQrcode(args.verifier, args.pinCode, function (err, result) { var result = new TalkService_verifyQrcode_result((err != null ? err : {success: result})); output.writeMessageBegin("verifyQrcode", Thrift.MessageType.REPLY, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } }