LINE-KickBot1/curve-thrift/CallService.js
2019-07-13 09:41:46 +08:00

16384 lines
505 KiB
JavaScript

//
// Autogenerated by Thrift Compiler (0.10.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
"use strict";
var thrift = require('thrift');
var Thrift = thrift.Thrift;
var Q = thrift.Q;
var ttypes = require('./line_types');
//HELPER FUNCTIONS AND STRUCTURES
var CallService_getUserStatus_args = function(args) {
this.mid = null;
if (args) {
if (args.mid !== undefined && args.mid !== null) {
this.mid = args.mid;
}
}
};
CallService_getUserStatus_args.prototype = {};
CallService_getUserStatus_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.mid = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getUserStatus_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserStatus_args');
if (this.mid !== null && this.mid !== undefined) {
output.writeFieldBegin('mid', Thrift.Type.STRING, 1);
output.writeString(this.mid);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserStatus_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getUserStatus_result.prototype = {};
CallService_getUserStatus_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_getUserStatus_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserStatus_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.I32, 0);
output.writeI32(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_updateProfileAttributeForChannel_args = function(args) {
this.profileAttribute = null;
this.value = null;
if (args) {
if (args.profileAttribute !== undefined && args.profileAttribute !== null) {
this.profileAttribute = args.profileAttribute;
}
if (args.value !== undefined && args.value !== null) {
this.value = args.value;
}
}
};
CallService_updateProfileAttributeForChannel_args.prototype = {};
CallService_updateProfileAttributeForChannel_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.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;
};
CallService_updateProfileAttributeForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_updateProfileAttributeForChannel_args');
if (this.profileAttribute !== null && this.profileAttribute !== undefined) {
output.writeFieldBegin('profileAttribute', Thrift.Type.I32, 2);
output.writeI32(this.profileAttribute);
output.writeFieldEnd();
}
if (this.value !== null && this.value !== undefined) {
output.writeFieldBegin('value', Thrift.Type.STRING, 3);
output.writeString(this.value);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_updateProfileAttributeForChannel_result = function(args) {
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_updateProfileAttributeForChannel_result.prototype = {};
CallService_updateProfileAttributeForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_updateProfileAttributeForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_updateProfileAttributeForChannel_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_updateExtendedProfileAttribute_args = function(args) {
this.attr = null;
this.extendedProfile = null;
if (args) {
if (args.attr !== undefined && args.attr !== null) {
this.attr = args.attr;
}
if (args.extendedProfile !== undefined && args.extendedProfile !== null) {
this.extendedProfile = new ttypes.ExtendedProfile(args.extendedProfile);
}
}
};
CallService_updateExtendedProfileAttribute_args.prototype = {};
CallService_updateExtendedProfileAttribute_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.attr = input.readI32();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.extendedProfile = new ttypes.ExtendedProfile();
this.extendedProfile.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_updateExtendedProfileAttribute_args.prototype.write = function(output) {
output.writeStructBegin('CallService_updateExtendedProfileAttribute_args');
if (this.attr !== null && this.attr !== undefined) {
output.writeFieldBegin('attr', Thrift.Type.I32, 1);
output.writeI32(this.attr);
output.writeFieldEnd();
}
if (this.extendedProfile !== null && this.extendedProfile !== undefined) {
output.writeFieldBegin('extendedProfile', Thrift.Type.STRUCT, 2);
this.extendedProfile.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_updateExtendedProfileAttribute_result = function(args) {
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_updateExtendedProfileAttribute_result.prototype = {};
CallService_updateExtendedProfileAttribute_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_updateExtendedProfileAttribute_result.prototype.write = function(output) {
output.writeStructBegin('CallService_updateExtendedProfileAttribute_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getAllSimpleChannelContacts_args = function(args) {
this.statusSticonFallbackDisabled = null;
if (args) {
if (args.statusSticonFallbackDisabled !== undefined && args.statusSticonFallbackDisabled !== null) {
this.statusSticonFallbackDisabled = args.statusSticonFallbackDisabled;
}
}
};
CallService_getAllSimpleChannelContacts_args.prototype = {};
CallService_getAllSimpleChannelContacts_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.BOOL) {
this.statusSticonFallbackDisabled = input.readBool();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getAllSimpleChannelContacts_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getAllSimpleChannelContacts_args');
if (this.statusSticonFallbackDisabled !== null && this.statusSticonFallbackDisabled !== undefined) {
output.writeFieldBegin('statusSticonFallbackDisabled', Thrift.Type.BOOL, 1);
output.writeBool(this.statusSticonFallbackDisabled);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getAllSimpleChannelContacts_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.SimpleChannelContact]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getAllSimpleChannelContacts_result.prototype = {};
CallService_getAllSimpleChannelContacts_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2382 = 0;
var _rtmp32386;
this.success = [];
var _etype2385 = 0;
_rtmp32386 = input.readListBegin();
_etype2385 = _rtmp32386.etype;
_size2382 = _rtmp32386.size;
for (var _i2387 = 0; _i2387 < _size2382; ++_i2387)
{
var elem2388 = null;
elem2388 = new ttypes.SimpleChannelContact();
elem2388.read(input);
this.success.push(elem2388);
}
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;
};
CallService_getAllSimpleChannelContacts_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getAllSimpleChannelContacts_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 iter2389 in this.success)
{
if (this.success.hasOwnProperty(iter2389))
{
iter2389 = this.success[iter2389];
iter2389.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserIdentities_args = function(args) {
};
CallService_getUserIdentities_args.prototype = {};
CallService_getUserIdentities_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getUserIdentities_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserIdentities_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserIdentities_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyMap(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getUserIdentities_result.prototype = {};
CallService_getUserIdentities_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2390 = 0;
var _rtmp32394;
this.success = {};
var _ktype2391 = 0;
var _vtype2392 = 0;
_rtmp32394 = input.readMapBegin();
_ktype2391 = _rtmp32394.ktype;
_vtype2392 = _rtmp32394.vtype;
_size2390 = _rtmp32394.size;
for (var _i2395 = 0; _i2395 < _size2390; ++_i2395)
{
var key2396 = null;
var val2397 = null;
key2396 = input.readI32();
val2397 = input.readString();
this.success[key2396] = val2397;
}
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;
};
CallService_getUserIdentities_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserIdentities_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.MAP, 0);
output.writeMapBegin(Thrift.Type.I32, Thrift.Type.STRING, Thrift.objectLength(this.success));
for (var kiter2398 in this.success)
{
if (this.success.hasOwnProperty(kiter2398))
{
var viter2399 = this.success[kiter2398];
output.writeI32(kiter2398);
output.writeString(viter2399);
}
}
output.writeMapEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_markPaidCallAd_args = function(args) {
this.dialedNumber = null;
this.language = null;
this.disableCallerId = null;
if (args) {
if (args.dialedNumber !== undefined && args.dialedNumber !== null) {
this.dialedNumber = args.dialedNumber;
}
if (args.language !== undefined && args.language !== null) {
this.language = args.language;
}
if (args.disableCallerId !== undefined && args.disableCallerId !== null) {
this.disableCallerId = args.disableCallerId;
}
}
};
CallService_markPaidCallAd_args.prototype = {};
CallService_markPaidCallAd_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.dialedNumber = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.language = input.readString();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.BOOL) {
this.disableCallerId = input.readBool();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_markPaidCallAd_args.prototype.write = function(output) {
output.writeStructBegin('CallService_markPaidCallAd_args');
if (this.dialedNumber !== null && this.dialedNumber !== undefined) {
output.writeFieldBegin('dialedNumber', Thrift.Type.STRING, 2);
output.writeString(this.dialedNumber);
output.writeFieldEnd();
}
if (this.language !== null && this.language !== undefined) {
output.writeFieldBegin('language', Thrift.Type.STRING, 3);
output.writeString(this.language);
output.writeFieldEnd();
}
if (this.disableCallerId !== null && this.disableCallerId !== undefined) {
output.writeFieldBegin('disableCallerId', Thrift.Type.BOOL, 4);
output.writeBool(this.disableCallerId);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_markPaidCallAd_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.PaidCallDialing(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_markPaidCallAd_result.prototype = {};
CallService_markPaidCallAd_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.PaidCallDialing();
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;
};
CallService_markPaidCallAd_result.prototype.write = function(output) {
output.writeStructBegin('CallService_markPaidCallAd_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_isGroupMember_args = function(args) {
this.groupId = null;
if (args) {
if (args.groupId !== undefined && args.groupId !== null) {
this.groupId = args.groupId;
}
}
};
CallService_isGroupMember_args.prototype = {};
CallService_isGroupMember_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_isGroupMember_args.prototype.write = function(output) {
output.writeStructBegin('CallService_isGroupMember_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;
};
var CallService_isGroupMember_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_isGroupMember_result.prototype = {};
CallService_isGroupMember_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_isGroupMember_result.prototype.write = function(output) {
output.writeStructBegin('CallService_isGroupMember_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.BOOL, 0);
output.writeBool(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPhoneInfoFromPhoneNumber_args = function(args) {
this.region = null;
this.phoneNumber = null;
if (args) {
if (args.region !== undefined && args.region !== null) {
this.region = args.region;
}
if (args.phoneNumber !== undefined && args.phoneNumber !== null) {
this.phoneNumber = args.phoneNumber;
}
}
};
CallService_getPhoneInfoFromPhoneNumber_args.prototype = {};
CallService_getPhoneInfoFromPhoneNumber_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.region = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.phoneNumber = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getPhoneInfoFromPhoneNumber_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getPhoneInfoFromPhoneNumber_args');
if (this.region !== null && this.region !== undefined) {
output.writeFieldBegin('region', Thrift.Type.STRING, 1);
output.writeString(this.region);
output.writeFieldEnd();
}
if (this.phoneNumber !== null && this.phoneNumber !== undefined) {
output.writeFieldBegin('phoneNumber', Thrift.Type.STRING, 2);
output.writeString(this.phoneNumber);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPhoneInfoFromPhoneNumber_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.PhoneInfoForChannel(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getPhoneInfoFromPhoneNumber_result.prototype = {};
CallService_getPhoneInfoFromPhoneNumber_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.PhoneInfoForChannel();
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;
};
CallService_getPhoneInfoFromPhoneNumber_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getPhoneInfoFromPhoneNumber_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_redeemPaidCallVoucher_args = function(args) {
this.serial = null;
this.language = null;
if (args) {
if (args.serial !== undefined && args.serial !== null) {
this.serial = args.serial;
}
if (args.language !== undefined && args.language !== null) {
this.language = args.language;
}
}
};
CallService_redeemPaidCallVoucher_args.prototype = {};
CallService_redeemPaidCallVoucher_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.serial = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.language = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_redeemPaidCallVoucher_args.prototype.write = function(output) {
output.writeStructBegin('CallService_redeemPaidCallVoucher_args');
if (this.serial !== null && this.serial !== undefined) {
output.writeFieldBegin('serial', Thrift.Type.STRING, 2);
output.writeString(this.serial);
output.writeFieldEnd();
}
if (this.language !== null && this.language !== undefined) {
output.writeFieldBegin('language', Thrift.Type.STRING, 3);
output.writeString(this.language);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_redeemPaidCallVoucher_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.PaidCallRedeemResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_redeemPaidCallVoucher_result.prototype = {};
CallService_redeemPaidCallVoucher_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.PaidCallRedeemResult();
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;
};
CallService_redeemPaidCallVoucher_result.prototype.write = function(output) {
output.writeStructBegin('CallService_redeemPaidCallVoucher_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPreferredDisplayName_args = function(args) {
this.mids = null;
if (args) {
if (args.mids !== undefined && args.mids !== null) {
this.mids = Thrift.copyList(args.mids, [null]);
}
}
};
CallService_getPreferredDisplayName_args.prototype = {};
CallService_getPreferredDisplayName_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.LIST) {
var _size2400 = 0;
var _rtmp32404;
this.mids = [];
var _etype2403 = 0;
_rtmp32404 = input.readListBegin();
_etype2403 = _rtmp32404.etype;
_size2400 = _rtmp32404.size;
for (var _i2405 = 0; _i2405 < _size2400; ++_i2405)
{
var elem2406 = null;
elem2406 = input.readString();
this.mids.push(elem2406);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getPreferredDisplayName_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getPreferredDisplayName_args');
if (this.mids !== null && this.mids !== undefined) {
output.writeFieldBegin('mids', Thrift.Type.LIST, 1);
output.writeListBegin(Thrift.Type.STRING, this.mids.length);
for (var iter2407 in this.mids)
{
if (this.mids.hasOwnProperty(iter2407))
{
iter2407 = this.mids[iter2407];
output.writeString(iter2407);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPreferredDisplayName_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyMap(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getPreferredDisplayName_result.prototype = {};
CallService_getPreferredDisplayName_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2408 = 0;
var _rtmp32412;
this.success = {};
var _ktype2409 = 0;
var _vtype2410 = 0;
_rtmp32412 = input.readMapBegin();
_ktype2409 = _rtmp32412.ktype;
_vtype2410 = _rtmp32412.vtype;
_size2408 = _rtmp32412.size;
for (var _i2413 = 0; _i2413 < _size2408; ++_i2413)
{
var key2414 = null;
var val2415 = null;
key2414 = input.readString();
val2415 = input.readString();
this.success[key2414] = val2415;
}
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;
};
CallService_getPreferredDisplayName_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getPreferredDisplayName_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 kiter2416 in this.success)
{
if (this.success.hasOwnProperty(kiter2416))
{
var viter2417 = this.success[kiter2416];
output.writeString(kiter2416);
output.writeString(viter2417);
}
}
output.writeMapEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getContactsForChannel_args = function(args) {
this.ids = null;
if (args) {
if (args.ids !== undefined && args.ids !== null) {
this.ids = Thrift.copyList(args.ids, [null]);
}
}
};
CallService_getContactsForChannel_args.prototype = {};
CallService_getContactsForChannel_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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 _size2418 = 0;
var _rtmp32422;
this.ids = [];
var _etype2421 = 0;
_rtmp32422 = input.readListBegin();
_etype2421 = _rtmp32422.etype;
_size2418 = _rtmp32422.size;
for (var _i2423 = 0; _i2423 < _size2418; ++_i2423)
{
var elem2424 = null;
elem2424 = input.readString();
this.ids.push(elem2424);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getContactsForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getContactsForChannel_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 iter2425 in this.ids)
{
if (this.ids.hasOwnProperty(iter2425))
{
iter2425 = this.ids[iter2425];
output.writeString(iter2425);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getContactsForChannel_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.Contact]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getContactsForChannel_result.prototype = {};
CallService_getContactsForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2426 = 0;
var _rtmp32430;
this.success = [];
var _etype2429 = 0;
_rtmp32430 = input.readListBegin();
_etype2429 = _rtmp32430.etype;
_size2426 = _rtmp32430.size;
for (var _i2431 = 0; _i2431 < _size2426; ++_i2431)
{
var elem2432 = null;
elem2432 = new ttypes.Contact();
elem2432.read(input);
this.success.push(elem2432);
}
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;
};
CallService_getContactsForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getContactsForChannel_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 iter2433 in this.success)
{
if (this.success.hasOwnProperty(iter2433))
{
iter2433 = this.success[iter2433];
iter2433.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getCallCreditProducts_args = function(args) {
this.appStoreCode = null;
this.pgCode = null;
this.country = null;
this.language = null;
if (args) {
if (args.appStoreCode !== undefined && args.appStoreCode !== null) {
this.appStoreCode = args.appStoreCode;
}
if (args.pgCode !== undefined && args.pgCode !== null) {
this.pgCode = args.pgCode;
}
if (args.country !== undefined && args.country !== null) {
this.country = args.country;
}
if (args.language !== undefined && args.language !== null) {
this.language = args.language;
}
}
};
CallService_getCallCreditProducts_args.prototype = {};
CallService_getCallCreditProducts_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.appStoreCode = input.readI32();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I32) {
this.pgCode = input.readI32();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRING) {
this.country = input.readString();
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRING) {
this.language = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getCallCreditProducts_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getCallCreditProducts_args');
if (this.appStoreCode !== null && this.appStoreCode !== undefined) {
output.writeFieldBegin('appStoreCode', Thrift.Type.I32, 2);
output.writeI32(this.appStoreCode);
output.writeFieldEnd();
}
if (this.pgCode !== null && this.pgCode !== undefined) {
output.writeFieldBegin('pgCode', Thrift.Type.I32, 3);
output.writeI32(this.pgCode);
output.writeFieldEnd();
}
if (this.country !== null && this.country !== undefined) {
output.writeFieldBegin('country', Thrift.Type.STRING, 4);
output.writeString(this.country);
output.writeFieldEnd();
}
if (this.language !== null && this.language !== undefined) {
output.writeFieldBegin('language', Thrift.Type.STRING, 5);
output.writeString(this.language);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getCallCreditProducts_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.CoinProductItem]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getCallCreditProducts_result.prototype = {};
CallService_getCallCreditProducts_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2434 = 0;
var _rtmp32438;
this.success = [];
var _etype2437 = 0;
_rtmp32438 = input.readListBegin();
_etype2437 = _rtmp32438.etype;
_size2434 = _rtmp32438.size;
for (var _i2439 = 0; _i2439 < _size2434; ++_i2439)
{
var elem2440 = null;
elem2440 = new ttypes.CoinProductItem();
elem2440.read(input);
this.success.push(elem2440);
}
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;
};
CallService_getCallCreditProducts_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getCallCreditProducts_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 iter2441 in this.success)
{
if (this.success.hasOwnProperty(iter2441))
{
iter2441 = this.success[iter2441];
iter2441.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getCompactContacts_args = function(args) {
this.lastModifiedTimestamp = null;
if (args) {
if (args.lastModifiedTimestamp !== undefined && args.lastModifiedTimestamp !== null) {
this.lastModifiedTimestamp = args.lastModifiedTimestamp;
}
}
};
CallService_getCompactContacts_args.prototype = {};
CallService_getCompactContacts_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.lastModifiedTimestamp = input.readI64();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getCompactContacts_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getCompactContacts_args');
if (this.lastModifiedTimestamp !== null && this.lastModifiedTimestamp !== undefined) {
output.writeFieldBegin('lastModifiedTimestamp', Thrift.Type.I64, 2);
output.writeI64(this.lastModifiedTimestamp);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getCompactContacts_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.CompactContact]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getCompactContacts_result.prototype = {};
CallService_getCompactContacts_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2442 = 0;
var _rtmp32446;
this.success = [];
var _etype2445 = 0;
_rtmp32446 = input.readListBegin();
_etype2445 = _rtmp32446.etype;
_size2442 = _rtmp32446.size;
for (var _i2447 = 0; _i2447 < _size2442; ++_i2447)
{
var elem2448 = null;
elem2448 = new ttypes.CompactContact();
elem2448.read(input);
this.success.push(elem2448);
}
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;
};
CallService_getCompactContacts_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getCompactContacts_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 iter2449 in this.success)
{
if (this.success.hasOwnProperty(iter2449))
{
iter2449 = this.success[iter2449];
iter2449.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_notifyNotiCenterEvent_args = function(args) {
this.event = null;
if (args) {
if (args.event !== undefined && args.event !== null) {
this.event = new ttypes.NotiCenterEventData(args.event);
}
}
};
CallService_notifyNotiCenterEvent_args.prototype = {};
CallService_notifyNotiCenterEvent_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.event = new ttypes.NotiCenterEventData();
this.event.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_notifyNotiCenterEvent_args.prototype.write = function(output) {
output.writeStructBegin('CallService_notifyNotiCenterEvent_args');
if (this.event !== null && this.event !== undefined) {
output.writeFieldBegin('event', Thrift.Type.STRUCT, 1);
this.event.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_notifyNotiCenterEvent_result = function(args) {
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_notifyNotiCenterEvent_result.prototype = {};
CallService_notifyNotiCenterEvent_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_notifyNotiCenterEvent_result.prototype.write = function(output) {
output.writeStructBegin('CallService_notifyNotiCenterEvent_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_isInContact_args = function(args) {
this.mid = null;
if (args) {
if (args.mid !== undefined && args.mid !== null) {
this.mid = args.mid;
}
}
};
CallService_isInContact_args.prototype = {};
CallService_isInContact_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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;
};
CallService_isInContact_args.prototype.write = function(output) {
output.writeStructBegin('CallService_isInContact_args');
if (this.mid !== null && this.mid !== undefined) {
output.writeFieldBegin('mid', Thrift.Type.STRING, 2);
output.writeString(this.mid);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_isInContact_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_isInContact_result.prototype = {};
CallService_isInContact_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_isInContact_result.prototype.write = function(output) {
output.writeStructBegin('CallService_isInContact_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.BOOL, 0);
output.writeBool(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_lookupGroupMembers_args = function(args) {
this.groupId = null;
this.mids = null;
if (args) {
if (args.groupId !== undefined && args.groupId !== null) {
this.groupId = args.groupId;
}
if (args.mids !== undefined && args.mids !== null) {
this.mids = Thrift.copyList(args.mids, [null]);
}
}
};
CallService_lookupGroupMembers_args.prototype = {};
CallService_lookupGroupMembers_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 2:
if (ftype == Thrift.Type.LIST) {
var _size2450 = 0;
var _rtmp32454;
this.mids = [];
var _etype2453 = 0;
_rtmp32454 = input.readListBegin();
_etype2453 = _rtmp32454.etype;
_size2450 = _rtmp32454.size;
for (var _i2455 = 0; _i2455 < _size2450; ++_i2455)
{
var elem2456 = null;
elem2456 = input.readString();
this.mids.push(elem2456);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_lookupGroupMembers_args.prototype.write = function(output) {
output.writeStructBegin('CallService_lookupGroupMembers_args');
if (this.groupId !== null && this.groupId !== undefined) {
output.writeFieldBegin('groupId', Thrift.Type.STRING, 1);
output.writeString(this.groupId);
output.writeFieldEnd();
}
if (this.mids !== null && this.mids !== undefined) {
output.writeFieldBegin('mids', Thrift.Type.LIST, 2);
output.writeListBegin(Thrift.Type.STRING, this.mids.length);
for (var iter2457 in this.mids)
{
if (this.mids.hasOwnProperty(iter2457))
{
iter2457 = this.mids[iter2457];
output.writeString(iter2457);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_lookupGroupMembers_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.SimpleChannelContact]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_lookupGroupMembers_result.prototype = {};
CallService_lookupGroupMembers_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2458 = 0;
var _rtmp32462;
this.success = [];
var _etype2461 = 0;
_rtmp32462 = input.readListBegin();
_etype2461 = _rtmp32462.etype;
_size2458 = _rtmp32462.size;
for (var _i2463 = 0; _i2463 < _size2458; ++_i2463)
{
var elem2464 = null;
elem2464 = new ttypes.SimpleChannelContact();
elem2464.read(input);
this.success.push(elem2464);
}
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;
};
CallService_lookupGroupMembers_result.prototype.write = function(output) {
output.writeStructBegin('CallService_lookupGroupMembers_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 iter2465 in this.success)
{
if (this.success.hasOwnProperty(iter2465))
{
iter2465 = this.success[iter2465];
iter2465.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getRoomInformation_args = function(args) {
this.roomMid = null;
if (args) {
if (args.roomMid !== undefined && args.roomMid !== null) {
this.roomMid = args.roomMid;
}
}
};
CallService_getRoomInformation_args.prototype = {};
CallService_getRoomInformation_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.roomMid = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getRoomInformation_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getRoomInformation_args');
if (this.roomMid !== null && this.roomMid !== undefined) {
output.writeFieldBegin('roomMid', Thrift.Type.STRING, 1);
output.writeString(this.roomMid);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getRoomInformation_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.Room(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getRoomInformation_result.prototype = {};
CallService_getRoomInformation_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_getRoomInformation_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getRoomInformation_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getGroupCall_args = function(args) {
this.chatMid = null;
if (args) {
if (args.chatMid !== undefined && args.chatMid !== null) {
this.chatMid = args.chatMid;
}
}
};
CallService_getGroupCall_args.prototype = {};
CallService_getGroupCall_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 2:
if (ftype == Thrift.Type.STRING) {
this.chatMid = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getGroupCall_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getGroupCall_args');
if (this.chatMid !== null && this.chatMid !== undefined) {
output.writeFieldBegin('chatMid', Thrift.Type.STRING, 2);
output.writeString(this.chatMid);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getGroupCall_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GroupCall(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getGroupCall_result.prototype = {};
CallService_getGroupCall_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.GroupCall();
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;
};
CallService_getGroupCall_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getGroupCall_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_isAllowSecondaryDeviceLogin_args = function(args) {
};
CallService_isAllowSecondaryDeviceLogin_args.prototype = {};
CallService_isAllowSecondaryDeviceLogin_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_isAllowSecondaryDeviceLogin_args.prototype.write = function(output) {
output.writeStructBegin('CallService_isAllowSecondaryDeviceLogin_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_isAllowSecondaryDeviceLogin_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_isAllowSecondaryDeviceLogin_result.prototype = {};
CallService_isAllowSecondaryDeviceLogin_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_isAllowSecondaryDeviceLogin_result.prototype.write = function(output) {
output.writeStructBegin('CallService_isAllowSecondaryDeviceLogin_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.BOOL, 0);
output.writeBool(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPrimaryClientForChannel_args = function(args) {
};
CallService_getPrimaryClientForChannel_args.prototype = {};
CallService_getPrimaryClientForChannel_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getPrimaryClientForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getPrimaryClientForChannel_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPrimaryClientForChannel_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.SimpleChannelClient(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getPrimaryClientForChannel_result.prototype = {};
CallService_getPrimaryClientForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.SimpleChannelClient();
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;
};
CallService_getPrimaryClientForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getPrimaryClientForChannel_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_createRoomWithBuddy_args = function(args) {
this.reqSeq = null;
this.buddyMid = null;
this.contactIds = null;
if (args) {
if (args.reqSeq !== undefined && args.reqSeq !== null) {
this.reqSeq = args.reqSeq;
}
if (args.buddyMid !== undefined && args.buddyMid !== null) {
this.buddyMid = args.buddyMid;
}
if (args.contactIds !== undefined && args.contactIds !== null) {
this.contactIds = Thrift.copyList(args.contactIds, [null]);
}
}
};
CallService_createRoomWithBuddy_args.prototype = {};
CallService_createRoomWithBuddy_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.buddyMid = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.LIST) {
var _size2466 = 0;
var _rtmp32470;
this.contactIds = [];
var _etype2469 = 0;
_rtmp32470 = input.readListBegin();
_etype2469 = _rtmp32470.etype;
_size2466 = _rtmp32470.size;
for (var _i2471 = 0; _i2471 < _size2466; ++_i2471)
{
var elem2472 = null;
elem2472 = input.readString();
this.contactIds.push(elem2472);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_createRoomWithBuddy_args.prototype.write = function(output) {
output.writeStructBegin('CallService_createRoomWithBuddy_args');
if (this.reqSeq !== null && this.reqSeq !== undefined) {
output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1);
output.writeI32(this.reqSeq);
output.writeFieldEnd();
}
if (this.buddyMid !== null && this.buddyMid !== undefined) {
output.writeFieldBegin('buddyMid', Thrift.Type.STRING, 2);
output.writeString(this.buddyMid);
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 iter2473 in this.contactIds)
{
if (this.contactIds.hasOwnProperty(iter2473))
{
iter2473 = this.contactIds[iter2473];
output.writeString(iter2473);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_createRoomWithBuddy_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.Room(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_createRoomWithBuddy_result.prototype = {};
CallService_createRoomWithBuddy_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_createRoomWithBuddy_result.prototype.write = function(output) {
output.writeStructBegin('CallService_createRoomWithBuddy_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getDisplayName_args = function(args) {
this.mid = null;
if (args) {
if (args.mid !== undefined && args.mid !== null) {
this.mid = args.mid;
}
}
};
CallService_getDisplayName_args.prototype = {};
CallService_getDisplayName_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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;
};
CallService_getDisplayName_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getDisplayName_args');
if (this.mid !== null && this.mid !== undefined) {
output.writeFieldBegin('mid', Thrift.Type.STRING, 2);
output.writeString(this.mid);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getDisplayName_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getDisplayName_result.prototype = {};
CallService_getDisplayName_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_getDisplayName_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getDisplayName_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRING, 0);
output.writeString(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPaidCallMetadata_args = function(args) {
this.language = null;
if (args) {
if (args.language !== undefined && args.language !== null) {
this.language = args.language;
}
}
};
CallService_getPaidCallMetadata_args.prototype = {};
CallService_getPaidCallMetadata_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.language = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getPaidCallMetadata_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getPaidCallMetadata_args');
if (this.language !== null && this.language !== undefined) {
output.writeFieldBegin('language', Thrift.Type.STRING, 2);
output.writeString(this.language);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPaidCallMetadata_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.PaidCallMetadataResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getPaidCallMetadata_result.prototype = {};
CallService_getPaidCallMetadata_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.PaidCallMetadataResult();
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;
};
CallService_getPaidCallMetadata_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getPaidCallMetadata_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getMid_args = function(args) {
};
CallService_getMid_args.prototype = {};
CallService_getMid_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getMid_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getMid_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getMid_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getMid_result.prototype = {};
CallService_getMid_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_getMid_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getMid_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRING, 0);
output.writeString(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserCountryForBilling_args = function(args) {
this.country = null;
this.remoteIp = null;
if (args) {
if (args.country !== undefined && args.country !== null) {
this.country = args.country;
}
if (args.remoteIp !== undefined && args.remoteIp !== null) {
this.remoteIp = args.remoteIp;
}
}
};
CallService_getUserCountryForBilling_args.prototype = {};
CallService_getUserCountryForBilling_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.country = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.remoteIp = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getUserCountryForBilling_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserCountryForBilling_args');
if (this.country !== null && this.country !== undefined) {
output.writeFieldBegin('country', Thrift.Type.STRING, 2);
output.writeString(this.country);
output.writeFieldEnd();
}
if (this.remoteIp !== null && this.remoteIp !== undefined) {
output.writeFieldBegin('remoteIp', Thrift.Type.STRING, 3);
output.writeString(this.remoteIp);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserCountryForBilling_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getUserCountryForBilling_result.prototype = {};
CallService_getUserCountryForBilling_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_getUserCountryForBilling_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserCountryForBilling_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRING, 0);
output.writeString(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getFavoriteGroupIdsForChannel_args = function(args) {
};
CallService_getFavoriteGroupIdsForChannel_args.prototype = {};
CallService_getFavoriteGroupIdsForChannel_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getFavoriteGroupIdsForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getFavoriteGroupIdsForChannel_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getFavoriteGroupIdsForChannel_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getFavoriteGroupIdsForChannel_result.prototype = {};
CallService_getFavoriteGroupIdsForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2474 = 0;
var _rtmp32478;
this.success = [];
var _etype2477 = 0;
_rtmp32478 = input.readListBegin();
_etype2477 = _rtmp32478.etype;
_size2474 = _rtmp32478.size;
for (var _i2479 = 0; _i2479 < _size2474; ++_i2479)
{
var elem2480 = null;
elem2480 = input.readString();
this.success.push(elem2480);
}
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;
};
CallService_getFavoriteGroupIdsForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getFavoriteGroupIdsForChannel_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 iter2481 in this.success)
{
if (this.success.hasOwnProperty(iter2481))
{
iter2481 = this.success[iter2481];
output.writeString(iter2481);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPaidCallHistory_args = function(args) {
this.start = null;
this.size = null;
this.language = null;
if (args) {
if (args.start !== undefined && args.start !== null) {
this.start = args.start;
}
if (args.size !== undefined && args.size !== null) {
this.size = args.size;
}
if (args.language !== undefined && args.language !== null) {
this.language = args.language;
}
}
};
CallService_getPaidCallHistory_args.prototype = {};
CallService_getPaidCallHistory_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.start = input.readI64();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I32) {
this.size = input.readI32();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRING) {
this.language = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getPaidCallHistory_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getPaidCallHistory_args');
if (this.start !== null && this.start !== undefined) {
output.writeFieldBegin('start', Thrift.Type.I64, 2);
output.writeI64(this.start);
output.writeFieldEnd();
}
if (this.size !== null && this.size !== undefined) {
output.writeFieldBegin('size', Thrift.Type.I32, 3);
output.writeI32(this.size);
output.writeFieldEnd();
}
if (this.language !== null && this.language !== undefined) {
output.writeFieldBegin('language', Thrift.Type.STRING, 4);
output.writeString(this.language);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPaidCallHistory_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.PaidCallHistoryResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getPaidCallHistory_result.prototype = {};
CallService_getPaidCallHistory_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.PaidCallHistoryResult();
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;
};
CallService_getPaidCallHistory_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getPaidCallHistory_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_sendPinCodeOperation_args = function(args) {
this.verifier = null;
if (args) {
if (args.verifier !== undefined && args.verifier !== null) {
this.verifier = args.verifier;
}
}
};
CallService_sendPinCodeOperation_args.prototype = {};
CallService_sendPinCodeOperation_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.verifier = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_sendPinCodeOperation_args.prototype.write = function(output) {
output.writeStructBegin('CallService_sendPinCodeOperation_args');
if (this.verifier !== null && this.verifier !== undefined) {
output.writeFieldBegin('verifier', Thrift.Type.STRING, 1);
output.writeString(this.verifier);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_sendPinCodeOperation_result = function(args) {
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_sendPinCodeOperation_result.prototype = {};
CallService_sendPinCodeOperation_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_sendPinCodeOperation_result.prototype.write = function(output) {
output.writeStructBegin('CallService_sendPinCodeOperation_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_inviteIntoGroupCall_args = function(args) {
this.chatMid = null;
this.memberMids = null;
this.mediaType = null;
if (args) {
if (args.chatMid !== undefined && args.chatMid !== null) {
this.chatMid = args.chatMid;
}
if (args.memberMids !== undefined && args.memberMids !== null) {
this.memberMids = Thrift.copyList(args.memberMids, [null]);
}
if (args.mediaType !== undefined && args.mediaType !== null) {
this.mediaType = args.mediaType;
}
}
};
CallService_inviteIntoGroupCall_args.prototype = {};
CallService_inviteIntoGroupCall_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 2:
if (ftype == Thrift.Type.STRING) {
this.chatMid = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.LIST) {
var _size2482 = 0;
var _rtmp32486;
this.memberMids = [];
var _etype2485 = 0;
_rtmp32486 = input.readListBegin();
_etype2485 = _rtmp32486.etype;
_size2482 = _rtmp32486.size;
for (var _i2487 = 0; _i2487 < _size2482; ++_i2487)
{
var elem2488 = null;
elem2488 = input.readString();
this.memberMids.push(elem2488);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.I32) {
this.mediaType = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_inviteIntoGroupCall_args.prototype.write = function(output) {
output.writeStructBegin('CallService_inviteIntoGroupCall_args');
if (this.chatMid !== null && this.chatMid !== undefined) {
output.writeFieldBegin('chatMid', Thrift.Type.STRING, 2);
output.writeString(this.chatMid);
output.writeFieldEnd();
}
if (this.memberMids !== null && this.memberMids !== undefined) {
output.writeFieldBegin('memberMids', Thrift.Type.LIST, 3);
output.writeListBegin(Thrift.Type.STRING, this.memberMids.length);
for (var iter2489 in this.memberMids)
{
if (this.memberMids.hasOwnProperty(iter2489))
{
iter2489 = this.memberMids[iter2489];
output.writeString(iter2489);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.mediaType !== null && this.mediaType !== undefined) {
output.writeFieldBegin('mediaType', Thrift.Type.I32, 4);
output.writeI32(this.mediaType);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_inviteIntoGroupCall_result = function(args) {
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_inviteIntoGroupCall_result.prototype = {};
CallService_inviteIntoGroupCall_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_inviteIntoGroupCall_result.prototype.write = function(output) {
output.writeStructBegin('CallService_inviteIntoGroupCall_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getFriendMids_args = function(args) {
};
CallService_getFriendMids_args.prototype = {};
CallService_getFriendMids_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getFriendMids_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getFriendMids_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getFriendMids_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getFriendMids_result.prototype = {};
CallService_getFriendMids_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2490 = 0;
var _rtmp32494;
this.success = [];
var _etype2493 = 0;
_rtmp32494 = input.readListBegin();
_etype2493 = _rtmp32494.etype;
_size2490 = _rtmp32494.size;
for (var _i2495 = 0; _i2495 < _size2490; ++_i2495)
{
var elem2496 = null;
elem2496 = input.readString();
this.success.push(elem2496);
}
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;
};
CallService_getFriendMids_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getFriendMids_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 iter2497 in this.success)
{
if (this.success.hasOwnProperty(iter2497))
{
iter2497 = this.success[iter2497];
output.writeString(iter2497);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getMetaProfile_args = function(args) {
};
CallService_getMetaProfile_args.prototype = {};
CallService_getMetaProfile_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getMetaProfile_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getMetaProfile_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getMetaProfile_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.MetaProfile(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getMetaProfile_result.prototype = {};
CallService_getMetaProfile_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.MetaProfile();
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;
};
CallService_getMetaProfile_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getMetaProfile_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_sendMessageForChannel_args = function(args) {
this.message = null;
if (args) {
if (args.message !== undefined && args.message !== null) {
this.message = new ttypes.Message(args.message);
}
}
};
CallService_sendMessageForChannel_args.prototype = {};
CallService_sendMessageForChannel_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.message = new ttypes.Message();
this.message.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_sendMessageForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_sendMessageForChannel_args');
if (this.message !== null && this.message !== undefined) {
output.writeFieldBegin('message', Thrift.Type.STRUCT, 2);
this.message.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_sendMessageForChannel_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.Message(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_sendMessageForChannel_result.prototype = {};
CallService_sendMessageForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_sendMessageForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_sendMessageForChannel_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_activeBuddySubscriberCount_args = function(args) {
};
CallService_activeBuddySubscriberCount_args.prototype = {};
CallService_activeBuddySubscriberCount_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_activeBuddySubscriberCount_args.prototype.write = function(output) {
output.writeStructBegin('CallService_activeBuddySubscriberCount_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_activeBuddySubscriberCount_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_activeBuddySubscriberCount_result.prototype = {};
CallService_activeBuddySubscriberCount_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_activeBuddySubscriberCount_result.prototype.write = function(output) {
output.writeStructBegin('CallService_activeBuddySubscriberCount_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.I64, 0);
output.writeI64(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getCallCreditPurchaseHistory_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.CoinHistoryCondition(args.request);
}
}
};
CallService_getCallCreditPurchaseHistory_args.prototype = {};
CallService_getCallCreditPurchaseHistory_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.request = new ttypes.CoinHistoryCondition();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getCallCreditPurchaseHistory_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getCallCreditPurchaseHistory_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 2);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getCallCreditPurchaseHistory_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.CoinHistoryResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getCallCreditPurchaseHistory_result.prototype = {};
CallService_getCallCreditPurchaseHistory_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.CoinHistoryResult();
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;
};
CallService_getCallCreditPurchaseHistory_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getCallCreditPurchaseHistory_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_isRoomMember_args = function(args) {
this.roomId = null;
if (args) {
if (args.roomId !== undefined && args.roomId !== null) {
this.roomId = args.roomId;
}
}
};
CallService_isRoomMember_args.prototype = {};
CallService_isRoomMember_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.roomId = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_isRoomMember_args.prototype.write = function(output) {
output.writeStructBegin('CallService_isRoomMember_args');
if (this.roomId !== null && this.roomId !== undefined) {
output.writeFieldBegin('roomId', Thrift.Type.STRING, 1);
output.writeString(this.roomId);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_isRoomMember_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_isRoomMember_result.prototype = {};
CallService_isRoomMember_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_isRoomMember_result.prototype.write = function(output) {
output.writeStructBegin('CallService_isRoomMember_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.BOOL, 0);
output.writeBool(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_sendSystemOAMessage_args = function(args) {
this.message = null;
if (args) {
if (args.message !== undefined && args.message !== null) {
this.message = new ttypes.Message(args.message);
}
}
};
CallService_sendSystemOAMessage_args.prototype = {};
CallService_sendSystemOAMessage_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.message = new ttypes.Message();
this.message.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_sendSystemOAMessage_args.prototype.write = function(output) {
output.writeStructBegin('CallService_sendSystemOAMessage_args');
if (this.message !== null && this.message !== undefined) {
output.writeFieldBegin('message', Thrift.Type.STRUCT, 1);
this.message.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_sendSystemOAMessage_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.Message(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_sendSystemOAMessage_result.prototype = {};
CallService_sendSystemOAMessage_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_sendSystemOAMessage_result.prototype.write = function(output) {
output.writeStructBegin('CallService_sendSystemOAMessage_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_acquirePaidCallRoute_args = function(args) {
this.paidCallType = null;
this.dialedNumber = null;
this.language = null;
this.networkCode = null;
this.disableCallerId = null;
this.referer = null;
this.adSessionId = null;
if (args) {
if (args.paidCallType !== undefined && args.paidCallType !== null) {
this.paidCallType = args.paidCallType;
}
if (args.dialedNumber !== undefined && args.dialedNumber !== null) {
this.dialedNumber = args.dialedNumber;
}
if (args.language !== undefined && args.language !== null) {
this.language = args.language;
}
if (args.networkCode !== undefined && args.networkCode !== null) {
this.networkCode = args.networkCode;
}
if (args.disableCallerId !== undefined && args.disableCallerId !== null) {
this.disableCallerId = args.disableCallerId;
}
if (args.referer !== undefined && args.referer !== null) {
this.referer = args.referer;
}
if (args.adSessionId !== undefined && args.adSessionId !== null) {
this.adSessionId = args.adSessionId;
}
}
};
CallService_acquirePaidCallRoute_args.prototype = {};
CallService_acquirePaidCallRoute_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.paidCallType = input.readI32();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.dialedNumber = input.readString();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRING) {
this.language = input.readString();
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRING) {
this.networkCode = input.readString();
} else {
input.skip(ftype);
}
break;
case 6:
if (ftype == Thrift.Type.BOOL) {
this.disableCallerId = input.readBool();
} else {
input.skip(ftype);
}
break;
case 7:
if (ftype == Thrift.Type.STRING) {
this.referer = input.readString();
} else {
input.skip(ftype);
}
break;
case 8:
if (ftype == Thrift.Type.STRING) {
this.adSessionId = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_acquirePaidCallRoute_args.prototype.write = function(output) {
output.writeStructBegin('CallService_acquirePaidCallRoute_args');
if (this.paidCallType !== null && this.paidCallType !== undefined) {
output.writeFieldBegin('paidCallType', Thrift.Type.I32, 2);
output.writeI32(this.paidCallType);
output.writeFieldEnd();
}
if (this.dialedNumber !== null && this.dialedNumber !== undefined) {
output.writeFieldBegin('dialedNumber', Thrift.Type.STRING, 3);
output.writeString(this.dialedNumber);
output.writeFieldEnd();
}
if (this.language !== null && this.language !== undefined) {
output.writeFieldBegin('language', Thrift.Type.STRING, 4);
output.writeString(this.language);
output.writeFieldEnd();
}
if (this.networkCode !== null && this.networkCode !== undefined) {
output.writeFieldBegin('networkCode', Thrift.Type.STRING, 5);
output.writeString(this.networkCode);
output.writeFieldEnd();
}
if (this.disableCallerId !== null && this.disableCallerId !== undefined) {
output.writeFieldBegin('disableCallerId', Thrift.Type.BOOL, 6);
output.writeBool(this.disableCallerId);
output.writeFieldEnd();
}
if (this.referer !== null && this.referer !== undefined) {
output.writeFieldBegin('referer', Thrift.Type.STRING, 7);
output.writeString(this.referer);
output.writeFieldEnd();
}
if (this.adSessionId !== null && this.adSessionId !== undefined) {
output.writeFieldBegin('adSessionId', Thrift.Type.STRING, 8);
output.writeString(this.adSessionId);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_acquirePaidCallRoute_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.PaidCallResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_acquirePaidCallRoute_result.prototype = {};
CallService_acquirePaidCallRoute_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.PaidCallResponse();
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;
};
CallService_acquirePaidCallRoute_result.prototype.write = function(output) {
output.writeStructBegin('CallService_acquirePaidCallRoute_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getGroupsForChannel_args = function(args) {
this.groupIds = null;
if (args) {
if (args.groupIds !== undefined && args.groupIds !== null) {
this.groupIds = Thrift.copyList(args.groupIds, [null]);
}
}
};
CallService_getGroupsForChannel_args.prototype = {};
CallService_getGroupsForChannel_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.LIST) {
var _size2498 = 0;
var _rtmp32502;
this.groupIds = [];
var _etype2501 = 0;
_rtmp32502 = input.readListBegin();
_etype2501 = _rtmp32502.etype;
_size2498 = _rtmp32502.size;
for (var _i2503 = 0; _i2503 < _size2498; ++_i2503)
{
var elem2504 = null;
elem2504 = input.readString();
this.groupIds.push(elem2504);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getGroupsForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getGroupsForChannel_args');
if (this.groupIds !== null && this.groupIds !== undefined) {
output.writeFieldBegin('groupIds', Thrift.Type.LIST, 1);
output.writeListBegin(Thrift.Type.STRING, this.groupIds.length);
for (var iter2505 in this.groupIds)
{
if (this.groupIds.hasOwnProperty(iter2505))
{
iter2505 = this.groupIds[iter2505];
output.writeString(iter2505);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getGroupsForChannel_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.Group]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getGroupsForChannel_result.prototype = {};
CallService_getGroupsForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2506 = 0;
var _rtmp32510;
this.success = [];
var _etype2509 = 0;
_rtmp32510 = input.readListBegin();
_etype2509 = _rtmp32510.etype;
_size2506 = _rtmp32510.size;
for (var _i2511 = 0; _i2511 < _size2506; ++_i2511)
{
var elem2512 = null;
elem2512 = new ttypes.Group();
elem2512.read(input);
this.success.push(elem2512);
}
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;
};
CallService_getGroupsForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getGroupsForChannel_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 iter2513 in this.success)
{
if (this.success.hasOwnProperty(iter2513))
{
iter2513 = this.success[iter2513];
iter2513.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserCreateTime_args = function(args) {
};
CallService_getUserCreateTime_args.prototype = {};
CallService_getUserCreateTime_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getUserCreateTime_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserCreateTime_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserCreateTime_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getUserCreateTime_result.prototype = {};
CallService_getUserCreateTime_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_getUserCreateTime_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserCreateTime_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.I64, 0);
output.writeI64(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_registerChannelCP_args = function(args) {
this.cpId = null;
this.registerPassword = null;
if (args) {
if (args.cpId !== undefined && args.cpId !== null) {
this.cpId = args.cpId;
}
if (args.registerPassword !== undefined && args.registerPassword !== null) {
this.registerPassword = args.registerPassword;
}
}
};
CallService_registerChannelCP_args.prototype = {};
CallService_registerChannelCP_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.cpId = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.registerPassword = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_registerChannelCP_args.prototype.write = function(output) {
output.writeStructBegin('CallService_registerChannelCP_args');
if (this.cpId !== null && this.cpId !== undefined) {
output.writeFieldBegin('cpId', Thrift.Type.STRING, 2);
output.writeString(this.cpId);
output.writeFieldEnd();
}
if (this.registerPassword !== null && this.registerPassword !== undefined) {
output.writeFieldBegin('registerPassword', Thrift.Type.STRING, 3);
output.writeString(this.registerPassword);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_registerChannelCP_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_registerChannelCP_result.prototype = {};
CallService_registerChannelCP_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_registerChannelCP_result.prototype.write = function(output) {
output.writeStructBegin('CallService_registerChannelCP_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRING, 0);
output.writeString(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_reserveCallCreditPurchase_args = function(args) {
this.request = null;
if (args) {
if (args.request !== undefined && args.request !== null) {
this.request = new ttypes.CoinPurchaseReservation(args.request);
}
}
};
CallService_reserveCallCreditPurchase_args.prototype = {};
CallService_reserveCallCreditPurchase_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.request = new ttypes.CoinPurchaseReservation();
this.request.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_reserveCallCreditPurchase_args.prototype.write = function(output) {
output.writeStructBegin('CallService_reserveCallCreditPurchase_args');
if (this.request !== null && this.request !== undefined) {
output.writeFieldBegin('request', Thrift.Type.STRUCT, 2);
this.request.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_reserveCallCreditPurchase_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.PaymentReservationResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_reserveCallCreditPurchase_result.prototype = {};
CallService_reserveCallCreditPurchase_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.PaymentReservationResult();
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;
};
CallService_reserveCallCreditPurchase_result.prototype.write = function(output) {
output.writeStructBegin('CallService_reserveCallCreditPurchase_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_acquirePaidCallCurrencyExchangeRate_args = function(args) {
this.language = null;
if (args) {
if (args.language !== undefined && args.language !== null) {
this.language = args.language;
}
}
};
CallService_acquirePaidCallCurrencyExchangeRate_args.prototype = {};
CallService_acquirePaidCallCurrencyExchangeRate_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.language = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_acquirePaidCallCurrencyExchangeRate_args.prototype.write = function(output) {
output.writeStructBegin('CallService_acquirePaidCallCurrencyExchangeRate_args');
if (this.language !== null && this.language !== undefined) {
output.writeFieldBegin('language', Thrift.Type.STRING, 2);
output.writeString(this.language);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_acquirePaidCallCurrencyExchangeRate_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.PaidCallCurrencyExchangeRate]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_acquirePaidCallCurrencyExchangeRate_result.prototype = {};
CallService_acquirePaidCallCurrencyExchangeRate_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2514 = 0;
var _rtmp32518;
this.success = [];
var _etype2517 = 0;
_rtmp32518 = input.readListBegin();
_etype2517 = _rtmp32518.etype;
_size2514 = _rtmp32518.size;
for (var _i2519 = 0; _i2519 < _size2514; ++_i2519)
{
var elem2520 = null;
elem2520 = new ttypes.PaidCallCurrencyExchangeRate();
elem2520.read(input);
this.success.push(elem2520);
}
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;
};
CallService_acquirePaidCallCurrencyExchangeRate_result.prototype.write = function(output) {
output.writeStructBegin('CallService_acquirePaidCallCurrencyExchangeRate_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 iter2521 in this.success)
{
if (this.success.hasOwnProperty(iter2521))
{
iter2521 = this.success[iter2521];
iter2521.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getRoomMemberMidsForAppPlatform_args = function(args) {
this.roomId = null;
if (args) {
if (args.roomId !== undefined && args.roomId !== null) {
this.roomId = args.roomId;
}
}
};
CallService_getRoomMemberMidsForAppPlatform_args.prototype = {};
CallService_getRoomMemberMidsForAppPlatform_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.roomId = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getRoomMemberMidsForAppPlatform_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getRoomMemberMidsForAppPlatform_args');
if (this.roomId !== null && this.roomId !== undefined) {
output.writeFieldBegin('roomId', Thrift.Type.STRING, 1);
output.writeString(this.roomId);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getRoomMemberMidsForAppPlatform_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getRoomMemberMidsForAppPlatform_result.prototype = {};
CallService_getRoomMemberMidsForAppPlatform_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2522 = 0;
var _rtmp32526;
this.success = [];
var _etype2525 = 0;
_rtmp32526 = input.readListBegin();
_etype2525 = _rtmp32526.etype;
_size2522 = _rtmp32526.size;
for (var _i2527 = 0; _i2527 < _size2522; ++_i2527)
{
var elem2528 = null;
elem2528 = input.readString();
this.success.push(elem2528);
}
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;
};
CallService_getRoomMemberMidsForAppPlatform_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getRoomMemberMidsForAppPlatform_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 iter2529 in this.success)
{
if (this.success.hasOwnProperty(iter2529))
{
iter2529 = this.success[iter2529];
output.writeString(iter2529);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPaidCallBalanceList_args = function(args) {
this.language = null;
if (args) {
if (args.language !== undefined && args.language !== null) {
this.language = args.language;
}
}
};
CallService_getPaidCallBalanceList_args.prototype = {};
CallService_getPaidCallBalanceList_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.language = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getPaidCallBalanceList_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getPaidCallBalanceList_args');
if (this.language !== null && this.language !== undefined) {
output.writeFieldBegin('language', Thrift.Type.STRING, 2);
output.writeString(this.language);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPaidCallBalanceList_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.PaidCallBalance]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getPaidCallBalanceList_result.prototype = {};
CallService_getPaidCallBalanceList_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2530 = 0;
var _rtmp32534;
this.success = [];
var _etype2533 = 0;
_rtmp32534 = input.readListBegin();
_etype2533 = _rtmp32534.etype;
_size2530 = _rtmp32534.size;
for (var _i2535 = 0; _i2535 < _size2530; ++_i2535)
{
var elem2536 = null;
elem2536 = new ttypes.PaidCallBalance();
elem2536.read(input);
this.success.push(elem2536);
}
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;
};
CallService_getPaidCallBalanceList_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getPaidCallBalanceList_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 iter2537 in this.success)
{
if (this.success.hasOwnProperty(iter2537))
{
iter2537 = this.success[iter2537];
iter2537.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPersonalInfos_args = function(args) {
this.requiredPersonalInfos = null;
if (args) {
if (args.requiredPersonalInfos !== undefined && args.requiredPersonalInfos !== null) {
this.requiredPersonalInfos = Thrift.copyList(args.requiredPersonalInfos, [null]);
}
}
};
CallService_getPersonalInfos_args.prototype = {};
CallService_getPersonalInfos_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.SET) {
var _size2538 = 0;
var _rtmp32542;
this.requiredPersonalInfos = [];
var _etype2541 = 0;
_rtmp32542 = input.readSetBegin();
_etype2541 = _rtmp32542.etype;
_size2538 = _rtmp32542.size;
for (var _i2543 = 0; _i2543 < _size2538; ++_i2543)
{
var elem2544 = null;
elem2544 = input.readI32();
this.requiredPersonalInfos.push(elem2544);
}
input.readSetEnd();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getPersonalInfos_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getPersonalInfos_args');
if (this.requiredPersonalInfos !== null && this.requiredPersonalInfos !== undefined) {
output.writeFieldBegin('requiredPersonalInfos', Thrift.Type.SET, 1);
output.writeSetBegin(Thrift.Type.I32, this.requiredPersonalInfos.length);
for (var iter2545 in this.requiredPersonalInfos)
{
if (this.requiredPersonalInfos.hasOwnProperty(iter2545))
{
iter2545 = this.requiredPersonalInfos[iter2545];
output.writeI32(iter2545);
}
}
output.writeSetEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPersonalInfos_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyMap(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getPersonalInfos_result.prototype = {};
CallService_getPersonalInfos_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2546 = 0;
var _rtmp32550;
this.success = {};
var _ktype2547 = 0;
var _vtype2548 = 0;
_rtmp32550 = input.readMapBegin();
_ktype2547 = _rtmp32550.ktype;
_vtype2548 = _rtmp32550.vtype;
_size2546 = _rtmp32550.size;
for (var _i2551 = 0; _i2551 < _size2546; ++_i2551)
{
var key2552 = null;
var val2553 = null;
key2552 = input.readI32();
val2553 = input.readString();
this.success[key2552] = val2553;
}
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;
};
CallService_getPersonalInfos_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getPersonalInfos_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.MAP, 0);
output.writeMapBegin(Thrift.Type.I32, Thrift.Type.STRING, Thrift.objectLength(this.success));
for (var kiter2554 in this.success)
{
if (this.success.hasOwnProperty(kiter2554))
{
var viter2555 = this.success[kiter2554];
output.writeI32(kiter2554);
output.writeString(viter2555);
}
}
output.writeMapEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPrimaryClientsForChannel_args = function(args) {
this.userMids = null;
if (args) {
if (args.userMids !== undefined && args.userMids !== null) {
this.userMids = Thrift.copyList(args.userMids, [null]);
}
}
};
CallService_getPrimaryClientsForChannel_args.prototype = {};
CallService_getPrimaryClientsForChannel_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.LIST) {
var _size2556 = 0;
var _rtmp32560;
this.userMids = [];
var _etype2559 = 0;
_rtmp32560 = input.readListBegin();
_etype2559 = _rtmp32560.etype;
_size2556 = _rtmp32560.size;
for (var _i2561 = 0; _i2561 < _size2556; ++_i2561)
{
var elem2562 = null;
elem2562 = input.readString();
this.userMids.push(elem2562);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getPrimaryClientsForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getPrimaryClientsForChannel_args');
if (this.userMids !== null && this.userMids !== undefined) {
output.writeFieldBegin('userMids', Thrift.Type.LIST, 1);
output.writeListBegin(Thrift.Type.STRING, this.userMids.length);
for (var iter2563 in this.userMids)
{
if (this.userMids.hasOwnProperty(iter2563))
{
iter2563 = this.userMids[iter2563];
output.writeString(iter2563);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPrimaryClientsForChannel_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.SimpleChannelClient]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getPrimaryClientsForChannel_result.prototype = {};
CallService_getPrimaryClientsForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2564 = 0;
var _rtmp32568;
this.success = [];
var _etype2567 = 0;
_rtmp32568 = input.readListBegin();
_etype2567 = _rtmp32568.etype;
_size2564 = _rtmp32568.size;
for (var _i2569 = 0; _i2569 < _size2564; ++_i2569)
{
var elem2570 = null;
elem2570 = new ttypes.SimpleChannelClient();
elem2570.read(input);
this.success.push(elem2570);
}
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;
};
CallService_getPrimaryClientsForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getPrimaryClientsForChannel_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 iter2571 in this.success)
{
if (this.success.hasOwnProperty(iter2571))
{
iter2571 = this.success[iter2571];
iter2571.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_addBuddyToContact_args = function(args) {
this.buddyMid = null;
if (args) {
if (args.buddyMid !== undefined && args.buddyMid !== null) {
this.buddyMid = args.buddyMid;
}
}
};
CallService_addBuddyToContact_args.prototype = {};
CallService_addBuddyToContact_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.buddyMid = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_addBuddyToContact_args.prototype.write = function(output) {
output.writeStructBegin('CallService_addBuddyToContact_args');
if (this.buddyMid !== null && this.buddyMid !== undefined) {
output.writeFieldBegin('buddyMid', Thrift.Type.STRING, 1);
output.writeString(this.buddyMid);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_addBuddyToContact_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.ContactTransition(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_addBuddyToContact_result.prototype = {};
CallService_addBuddyToContact_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.ContactTransition();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TalkException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_addBuddyToContact_result.prototype.write = function(output) {
output.writeStructBegin('CallService_addBuddyToContact_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getGroupMemberMidsForAppPlatform_args = function(args) {
this.groupId = null;
if (args) {
if (args.groupId !== undefined && args.groupId !== null) {
this.groupId = args.groupId;
}
}
};
CallService_getGroupMemberMidsForAppPlatform_args.prototype = {};
CallService_getGroupMemberMidsForAppPlatform_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_getGroupMemberMidsForAppPlatform_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getGroupMemberMidsForAppPlatform_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;
};
var CallService_getGroupMemberMidsForAppPlatform_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getGroupMemberMidsForAppPlatform_result.prototype = {};
CallService_getGroupMemberMidsForAppPlatform_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2572 = 0;
var _rtmp32576;
this.success = [];
var _etype2575 = 0;
_rtmp32576 = input.readListBegin();
_etype2575 = _rtmp32576.etype;
_size2572 = _rtmp32576.size;
for (var _i2577 = 0; _i2577 < _size2572; ++_i2577)
{
var elem2578 = null;
elem2578 = input.readString();
this.success.push(elem2578);
}
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;
};
CallService_getGroupMemberMidsForAppPlatform_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getGroupMemberMidsForAppPlatform_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 iter2579 in this.success)
{
if (this.success.hasOwnProperty(iter2579))
{
iter2579 = this.success[iter2579];
output.writeString(iter2579);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserLanguage_args = function(args) {
};
CallService_getUserLanguage_args.prototype = {};
CallService_getUserLanguage_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getUserLanguage_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserLanguage_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserLanguage_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getUserLanguage_result.prototype = {};
CallService_getUserLanguage_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_getUserLanguage_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserLanguage_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRING, 0);
output.writeString(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_lookupPaidCall_args = function(args) {
this.dialedNumber = null;
this.language = null;
this.referer = null;
if (args) {
if (args.dialedNumber !== undefined && args.dialedNumber !== null) {
this.dialedNumber = args.dialedNumber;
}
if (args.language !== undefined && args.language !== null) {
this.language = args.language;
}
if (args.referer !== undefined && args.referer !== null) {
this.referer = args.referer;
}
}
};
CallService_lookupPaidCall_args.prototype = {};
CallService_lookupPaidCall_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.dialedNumber = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.language = input.readString();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRING) {
this.referer = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_lookupPaidCall_args.prototype.write = function(output) {
output.writeStructBegin('CallService_lookupPaidCall_args');
if (this.dialedNumber !== null && this.dialedNumber !== undefined) {
output.writeFieldBegin('dialedNumber', Thrift.Type.STRING, 2);
output.writeString(this.dialedNumber);
output.writeFieldEnd();
}
if (this.language !== null && this.language !== undefined) {
output.writeFieldBegin('language', Thrift.Type.STRING, 3);
output.writeString(this.language);
output.writeFieldEnd();
}
if (this.referer !== null && this.referer !== undefined) {
output.writeFieldBegin('referer', Thrift.Type.STRING, 4);
output.writeString(this.referer);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_lookupPaidCall_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.PaidCallResponse(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_lookupPaidCall_result.prototype = {};
CallService_lookupPaidCall_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.PaidCallResponse();
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;
};
CallService_lookupPaidCall_result.prototype.write = function(output) {
output.writeStructBegin('CallService_lookupPaidCall_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getExtendedProfile_args = function(args) {
};
CallService_getExtendedProfile_args.prototype = {};
CallService_getExtendedProfile_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getExtendedProfile_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getExtendedProfile_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getExtendedProfile_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.ExtendedProfile(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getExtendedProfile_result.prototype = {};
CallService_getExtendedProfile_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.ExtendedProfile();
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;
};
CallService_getExtendedProfile_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getExtendedProfile_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getReverseCompactContacts_args = function(args) {
this.ids = null;
if (args) {
if (args.ids !== undefined && args.ids !== null) {
this.ids = Thrift.copyList(args.ids, [null]);
}
}
};
CallService_getReverseCompactContacts_args.prototype = {};
CallService_getReverseCompactContacts_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.LIST) {
var _size2580 = 0;
var _rtmp32584;
this.ids = [];
var _etype2583 = 0;
_rtmp32584 = input.readListBegin();
_etype2583 = _rtmp32584.etype;
_size2580 = _rtmp32584.size;
for (var _i2585 = 0; _i2585 < _size2580; ++_i2585)
{
var elem2586 = null;
elem2586 = input.readString();
this.ids.push(elem2586);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getReverseCompactContacts_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getReverseCompactContacts_args');
if (this.ids !== null && this.ids !== undefined) {
output.writeFieldBegin('ids', Thrift.Type.LIST, 1);
output.writeListBegin(Thrift.Type.STRING, this.ids.length);
for (var iter2587 in this.ids)
{
if (this.ids.hasOwnProperty(iter2587))
{
iter2587 = this.ids[iter2587];
output.writeString(iter2587);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getReverseCompactContacts_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyMap(args.success, [ttypes.CompactContact]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getReverseCompactContacts_result.prototype = {};
CallService_getReverseCompactContacts_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2588 = 0;
var _rtmp32592;
this.success = {};
var _ktype2589 = 0;
var _vtype2590 = 0;
_rtmp32592 = input.readMapBegin();
_ktype2589 = _rtmp32592.ktype;
_vtype2590 = _rtmp32592.vtype;
_size2588 = _rtmp32592.size;
for (var _i2593 = 0; _i2593 < _size2588; ++_i2593)
{
var key2594 = null;
var val2595 = null;
key2594 = input.readString();
val2595 = new ttypes.CompactContact();
val2595.read(input);
this.success[key2594] = val2595;
}
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;
};
CallService_getReverseCompactContacts_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getReverseCompactContacts_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 kiter2596 in this.success)
{
if (this.success.hasOwnProperty(kiter2596))
{
var viter2597 = this.success[kiter2596];
output.writeString(kiter2596);
viter2597.write(output);
}
}
output.writeMapEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPaidCallAdStatus_args = function(args) {
};
CallService_getPaidCallAdStatus_args.prototype = {};
CallService_getPaidCallAdStatus_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getPaidCallAdStatus_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getPaidCallAdStatus_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getPaidCallAdStatus_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.PaidCallAdResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getPaidCallAdStatus_result.prototype = {};
CallService_getPaidCallAdStatus_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.PaidCallAdResult();
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;
};
CallService_getPaidCallAdStatus_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getPaidCallAdStatus_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_findContactByUseridWithoutAbuseBlockForChannel_args = function(args) {
this.userid = null;
if (args) {
if (args.userid !== undefined && args.userid !== null) {
this.userid = args.userid;
}
}
};
CallService_findContactByUseridWithoutAbuseBlockForChannel_args.prototype = {};
CallService_findContactByUseridWithoutAbuseBlockForChannel_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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;
};
CallService_findContactByUseridWithoutAbuseBlockForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_findContactByUseridWithoutAbuseBlockForChannel_args');
if (this.userid !== null && this.userid !== undefined) {
output.writeFieldBegin('userid', Thrift.Type.STRING, 2);
output.writeString(this.userid);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_findContactByUseridWithoutAbuseBlockForChannel_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.Contact(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_findContactByUseridWithoutAbuseBlockForChannel_result.prototype = {};
CallService_findContactByUseridWithoutAbuseBlockForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_findContactByUseridWithoutAbuseBlockForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_findContactByUseridWithoutAbuseBlockForChannel_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getGroupMemberMids_args = function(args) {
this.groupId = null;
if (args) {
if (args.groupId !== undefined && args.groupId !== null) {
this.groupId = args.groupId;
}
}
};
CallService_getGroupMemberMids_args.prototype = {};
CallService_getGroupMemberMids_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_getGroupMemberMids_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getGroupMemberMids_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;
};
var CallService_getGroupMemberMids_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getGroupMemberMids_result.prototype = {};
CallService_getGroupMemberMids_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2598 = 0;
var _rtmp32602;
this.success = [];
var _etype2601 = 0;
_rtmp32602 = input.readListBegin();
_etype2601 = _rtmp32602.etype;
_size2598 = _rtmp32602.size;
for (var _i2603 = 0; _i2603 < _size2598; ++_i2603)
{
var elem2604 = null;
elem2604 = input.readString();
this.success.push(elem2604);
}
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;
};
CallService_getGroupMemberMids_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getGroupMemberMids_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 iter2605 in this.success)
{
if (this.success.hasOwnProperty(iter2605))
{
iter2605 = this.success[iter2605];
output.writeString(iter2605);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_sendMessageWithoutRelationship_args = function(args) {
this.message = null;
if (args) {
if (args.message !== undefined && args.message !== null) {
this.message = new ttypes.Message(args.message);
}
}
};
CallService_sendMessageWithoutRelationship_args.prototype = {};
CallService_sendMessageWithoutRelationship_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.message = new ttypes.Message();
this.message.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_sendMessageWithoutRelationship_args.prototype.write = function(output) {
output.writeStructBegin('CallService_sendMessageWithoutRelationship_args');
if (this.message !== null && this.message !== undefined) {
output.writeFieldBegin('message', Thrift.Type.STRUCT, 2);
this.message.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_sendMessageWithoutRelationship_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.Message(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_sendMessageWithoutRelationship_result.prototype = {};
CallService_sendMessageWithoutRelationship_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_sendMessageWithoutRelationship_result.prototype.write = function(output) {
output.writeStructBegin('CallService_sendMessageWithoutRelationship_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_displayBuddySubscriberCountInBulk_args = function(args) {
this.mids = null;
if (args) {
if (args.mids !== undefined && args.mids !== null) {
this.mids = Thrift.copyList(args.mids, [null]);
}
}
};
CallService_displayBuddySubscriberCountInBulk_args.prototype = {};
CallService_displayBuddySubscriberCountInBulk_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.LIST) {
var _size2606 = 0;
var _rtmp32610;
this.mids = [];
var _etype2609 = 0;
_rtmp32610 = input.readListBegin();
_etype2609 = _rtmp32610.etype;
_size2606 = _rtmp32610.size;
for (var _i2611 = 0; _i2611 < _size2606; ++_i2611)
{
var elem2612 = null;
elem2612 = input.readString();
this.mids.push(elem2612);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_displayBuddySubscriberCountInBulk_args.prototype.write = function(output) {
output.writeStructBegin('CallService_displayBuddySubscriberCountInBulk_args');
if (this.mids !== null && this.mids !== undefined) {
output.writeFieldBegin('mids', Thrift.Type.LIST, 1);
output.writeListBegin(Thrift.Type.STRING, this.mids.length);
for (var iter2613 in this.mids)
{
if (this.mids.hasOwnProperty(iter2613))
{
iter2613 = this.mids[iter2613];
output.writeString(iter2613);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_displayBuddySubscriberCountInBulk_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyMap(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_displayBuddySubscriberCountInBulk_result.prototype = {};
CallService_displayBuddySubscriberCountInBulk_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2614 = 0;
var _rtmp32618;
this.success = {};
var _ktype2615 = 0;
var _vtype2616 = 0;
_rtmp32618 = input.readMapBegin();
_ktype2615 = _rtmp32618.ktype;
_vtype2616 = _rtmp32618.vtype;
_size2614 = _rtmp32618.size;
for (var _i2619 = 0; _i2619 < _size2614; ++_i2619)
{
var key2620 = null;
var val2621 = null;
key2620 = input.readString();
val2621 = input.readI64();
this.success[key2620] = val2621;
}
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;
};
CallService_displayBuddySubscriberCountInBulk_result.prototype.write = function(output) {
output.writeStructBegin('CallService_displayBuddySubscriberCountInBulk_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.MAP, 0);
output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.I64, Thrift.objectLength(this.success));
for (var kiter2622 in this.success)
{
if (this.success.hasOwnProperty(kiter2622))
{
var viter2623 = this.success[kiter2622];
output.writeString(kiter2622);
output.writeI64(viter2623);
}
}
output.writeMapEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_lookupRoomMembers_args = function(args) {
this.roomId = null;
this.mids = null;
if (args) {
if (args.roomId !== undefined && args.roomId !== null) {
this.roomId = args.roomId;
}
if (args.mids !== undefined && args.mids !== null) {
this.mids = Thrift.copyList(args.mids, [null]);
}
}
};
CallService_lookupRoomMembers_args.prototype = {};
CallService_lookupRoomMembers_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.roomId = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.LIST) {
var _size2624 = 0;
var _rtmp32628;
this.mids = [];
var _etype2627 = 0;
_rtmp32628 = input.readListBegin();
_etype2627 = _rtmp32628.etype;
_size2624 = _rtmp32628.size;
for (var _i2629 = 0; _i2629 < _size2624; ++_i2629)
{
var elem2630 = null;
elem2630 = input.readString();
this.mids.push(elem2630);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_lookupRoomMembers_args.prototype.write = function(output) {
output.writeStructBegin('CallService_lookupRoomMembers_args');
if (this.roomId !== null && this.roomId !== undefined) {
output.writeFieldBegin('roomId', Thrift.Type.STRING, 1);
output.writeString(this.roomId);
output.writeFieldEnd();
}
if (this.mids !== null && this.mids !== undefined) {
output.writeFieldBegin('mids', Thrift.Type.LIST, 2);
output.writeListBegin(Thrift.Type.STRING, this.mids.length);
for (var iter2631 in this.mids)
{
if (this.mids.hasOwnProperty(iter2631))
{
iter2631 = this.mids[iter2631];
output.writeString(iter2631);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_lookupRoomMembers_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.SimpleChannelContact]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_lookupRoomMembers_result.prototype = {};
CallService_lookupRoomMembers_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2632 = 0;
var _rtmp32636;
this.success = [];
var _etype2635 = 0;
_rtmp32636 = input.readListBegin();
_etype2635 = _rtmp32636.etype;
_size2632 = _rtmp32636.size;
for (var _i2637 = 0; _i2637 < _size2632; ++_i2637)
{
var elem2638 = null;
elem2638 = new ttypes.SimpleChannelContact();
elem2638.read(input);
this.success.push(elem2638);
}
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;
};
CallService_lookupRoomMembers_result.prototype.write = function(output) {
output.writeStructBegin('CallService_lookupRoomMembers_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 iter2639 in this.success)
{
if (this.success.hasOwnProperty(iter2639))
{
iter2639 = this.success[iter2639];
iter2639.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getFavoriteMidsForChannel_args = function(args) {
};
CallService_getFavoriteMidsForChannel_args.prototype = {};
CallService_getFavoriteMidsForChannel_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getFavoriteMidsForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getFavoriteMidsForChannel_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getFavoriteMidsForChannel_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getFavoriteMidsForChannel_result.prototype = {};
CallService_getFavoriteMidsForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2640 = 0;
var _rtmp32644;
this.success = [];
var _etype2643 = 0;
_rtmp32644 = input.readListBegin();
_etype2643 = _rtmp32644.etype;
_size2640 = _rtmp32644.size;
for (var _i2645 = 0; _i2645 < _size2640; ++_i2645)
{
var elem2646 = null;
elem2646 = input.readString();
this.success.push(elem2646);
}
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;
};
CallService_getFavoriteMidsForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getFavoriteMidsForChannel_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 iter2647 in this.success)
{
if (this.success.hasOwnProperty(iter2647))
{
iter2647 = this.success[iter2647];
output.writeString(iter2647);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getAllContactIdsForChannel_args = function(args) {
};
CallService_getAllContactIdsForChannel_args.prototype = {};
CallService_getAllContactIdsForChannel_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getAllContactIdsForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getAllContactIdsForChannel_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getAllContactIdsForChannel_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getAllContactIdsForChannel_result.prototype = {};
CallService_getAllContactIdsForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2648 = 0;
var _rtmp32652;
this.success = [];
var _etype2651 = 0;
_rtmp32652 = input.readListBegin();
_etype2651 = _rtmp32652.etype;
_size2648 = _rtmp32652.size;
for (var _i2653 = 0; _i2653 < _size2648; ++_i2653)
{
var elem2654 = null;
elem2654 = input.readString();
this.success.push(elem2654);
}
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;
};
CallService_getAllContactIdsForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getAllContactIdsForChannel_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 iter2655 in this.success)
{
if (this.success.hasOwnProperty(iter2655))
{
iter2655 = this.success[iter2655];
output.writeString(iter2655);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_displayBuddySubscriberCount_args = function(args) {
};
CallService_displayBuddySubscriberCount_args.prototype = {};
CallService_displayBuddySubscriberCount_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_displayBuddySubscriberCount_args.prototype.write = function(output) {
output.writeStructBegin('CallService_displayBuddySubscriberCount_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_displayBuddySubscriberCount_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_displayBuddySubscriberCount_result.prototype = {};
CallService_displayBuddySubscriberCount_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_displayBuddySubscriberCount_result.prototype.write = function(output) {
output.writeStructBegin('CallService_displayBuddySubscriberCount_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.I64, 0);
output.writeI64(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getProfileForChannel_args = function(args) {
};
CallService_getProfileForChannel_args.prototype = {};
CallService_getProfileForChannel_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getProfileForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getProfileForChannel_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getProfileForChannel_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.Profile(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getProfileForChannel_result.prototype = {};
CallService_getProfileForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_getProfileForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getProfileForChannel_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserTickets_args = function(args) {
this.userMids = null;
if (args) {
if (args.userMids !== undefined && args.userMids !== null) {
this.userMids = Thrift.copyList(args.userMids, [null]);
}
}
};
CallService_getUserTickets_args.prototype = {};
CallService_getUserTickets_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.LIST) {
var _size2656 = 0;
var _rtmp32660;
this.userMids = [];
var _etype2659 = 0;
_rtmp32660 = input.readListBegin();
_etype2659 = _rtmp32660.etype;
_size2656 = _rtmp32660.size;
for (var _i2661 = 0; _i2661 < _size2656; ++_i2661)
{
var elem2662 = null;
elem2662 = input.readString();
this.userMids.push(elem2662);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getUserTickets_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserTickets_args');
if (this.userMids !== null && this.userMids !== undefined) {
output.writeFieldBegin('userMids', Thrift.Type.LIST, 1);
output.writeListBegin(Thrift.Type.STRING, this.userMids.length);
for (var iter2663 in this.userMids)
{
if (this.userMids.hasOwnProperty(iter2663))
{
iter2663 = this.userMids[iter2663];
output.writeString(iter2663);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserTickets_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.UserTicketResponse]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getUserTickets_result.prototype = {};
CallService_getUserTickets_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2664 = 0;
var _rtmp32668;
this.success = [];
var _etype2667 = 0;
_rtmp32668 = input.readListBegin();
_etype2667 = _rtmp32668.etype;
_size2664 = _rtmp32668.size;
for (var _i2669 = 0; _i2669 < _size2664; ++_i2669)
{
var elem2670 = null;
elem2670 = new ttypes.UserTicketResponse();
elem2670.read(input);
this.success.push(elem2670);
}
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;
};
CallService_getUserTickets_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserTickets_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 iter2671 in this.success)
{
if (this.success.hasOwnProperty(iter2671))
{
iter2671 = this.success[iter2671];
iter2671.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getOAFriendMids_args = function(args) {
};
CallService_getOAFriendMids_args.prototype = {};
CallService_getOAFriendMids_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getOAFriendMids_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getOAFriendMids_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getOAFriendMids_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getOAFriendMids_result.prototype = {};
CallService_getOAFriendMids_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2672 = 0;
var _rtmp32676;
this.success = [];
var _etype2675 = 0;
_rtmp32676 = input.readListBegin();
_etype2675 = _rtmp32676.etype;
_size2672 = _rtmp32676.size;
for (var _i2677 = 0; _i2677 < _size2672; ++_i2677)
{
var elem2678 = null;
elem2678 = input.readString();
this.success.push(elem2678);
}
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;
};
CallService_getOAFriendMids_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getOAFriendMids_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 iter2679 in this.success)
{
if (this.success.hasOwnProperty(iter2679))
{
iter2679 = this.success[iter2679];
output.writeString(iter2679);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_searchPaidCallUserRate_args = function(args) {
this.countryCode = null;
this.language = null;
if (args) {
if (args.countryCode !== undefined && args.countryCode !== null) {
this.countryCode = args.countryCode;
}
if (args.language !== undefined && args.language !== null) {
this.language = args.language;
}
}
};
CallService_searchPaidCallUserRate_args.prototype = {};
CallService_searchPaidCallUserRate_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var 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.countryCode = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.language = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_searchPaidCallUserRate_args.prototype.write = function(output) {
output.writeStructBegin('CallService_searchPaidCallUserRate_args');
if (this.countryCode !== null && this.countryCode !== undefined) {
output.writeFieldBegin('countryCode', Thrift.Type.STRING, 2);
output.writeString(this.countryCode);
output.writeFieldEnd();
}
if (this.language !== null && this.language !== undefined) {
output.writeFieldBegin('language', Thrift.Type.STRING, 3);
output.writeString(this.language);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_searchPaidCallUserRate_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.PaidCallUserRate]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_searchPaidCallUserRate_result.prototype = {};
CallService_searchPaidCallUserRate_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2680 = 0;
var _rtmp32684;
this.success = [];
var _etype2683 = 0;
_rtmp32684 = input.readListBegin();
_etype2683 = _rtmp32684.etype;
_size2680 = _rtmp32684.size;
for (var _i2685 = 0; _i2685 < _size2680; ++_i2685)
{
var elem2686 = null;
elem2686 = new ttypes.PaidCallUserRate();
elem2686.read(input);
this.success.push(elem2686);
}
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;
};
CallService_searchPaidCallUserRate_result.prototype.write = function(output) {
output.writeStructBegin('CallService_searchPaidCallUserRate_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 iter2687 in this.success)
{
if (this.success.hasOwnProperty(iter2687))
{
iter2687 = this.success[iter2687];
iter2687.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getJoinedGroupIdsForChannel_args = function(args) {
};
CallService_getJoinedGroupIdsForChannel_args.prototype = {};
CallService_getJoinedGroupIdsForChannel_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getJoinedGroupIdsForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getJoinedGroupIdsForChannel_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getJoinedGroupIdsForChannel_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getJoinedGroupIdsForChannel_result.prototype = {};
CallService_getJoinedGroupIdsForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2688 = 0;
var _rtmp32692;
this.success = [];
var _etype2691 = 0;
_rtmp32692 = input.readListBegin();
_etype2691 = _rtmp32692.etype;
_size2688 = _rtmp32692.size;
for (var _i2693 = 0; _i2693 < _size2688; ++_i2693)
{
var elem2694 = null;
elem2694 = input.readString();
this.success.push(elem2694);
}
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;
};
CallService_getJoinedGroupIdsForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getJoinedGroupIdsForChannel_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 iter2695 in this.success)
{
if (this.success.hasOwnProperty(iter2695))
{
iter2695 = this.success[iter2695];
output.writeString(iter2695);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_acquireGroupCallRoute_args = function(args) {
this.chatMid = null;
this.mediaType = null;
if (args) {
if (args.chatMid !== undefined && args.chatMid !== null) {
this.chatMid = args.chatMid;
}
if (args.mediaType !== undefined && args.mediaType !== null) {
this.mediaType = args.mediaType;
}
}
};
CallService_acquireGroupCallRoute_args.prototype = {};
CallService_acquireGroupCallRoute_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 2:
if (ftype == Thrift.Type.STRING) {
this.chatMid = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I32) {
this.mediaType = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_acquireGroupCallRoute_args.prototype.write = function(output) {
output.writeStructBegin('CallService_acquireGroupCallRoute_args');
if (this.chatMid !== null && this.chatMid !== undefined) {
output.writeFieldBegin('chatMid', Thrift.Type.STRING, 2);
output.writeString(this.chatMid);
output.writeFieldEnd();
}
if (this.mediaType !== null && this.mediaType !== undefined) {
output.writeFieldBegin('mediaType', Thrift.Type.I32, 3);
output.writeI32(this.mediaType);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_acquireGroupCallRoute_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.GroupCallRoute(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_acquireGroupCallRoute_result.prototype = {};
CallService_acquireGroupCallRoute_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.GroupCallRoute();
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;
};
CallService_acquireGroupCallRoute_result.prototype.write = function(output) {
output.writeStructBegin('CallService_acquireGroupCallRoute_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserMidsWhoAddedMe_args = function(args) {
};
CallService_getUserMidsWhoAddedMe_args.prototype = {};
CallService_getUserMidsWhoAddedMe_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getUserMidsWhoAddedMe_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserMidsWhoAddedMe_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserMidsWhoAddedMe_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getUserMidsWhoAddedMe_result.prototype = {};
CallService_getUserMidsWhoAddedMe_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2696 = 0;
var _rtmp32700;
this.success = [];
var _etype2699 = 0;
_rtmp32700 = input.readListBegin();
_etype2699 = _rtmp32700.etype;
_size2696 = _rtmp32700.size;
for (var _i2701 = 0; _i2701 < _size2696; ++_i2701)
{
var elem2702 = null;
elem2702 = input.readString();
this.success.push(elem2702);
}
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;
};
CallService_getUserMidsWhoAddedMe_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserMidsWhoAddedMe_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 iter2703 in this.success)
{
if (this.success.hasOwnProperty(iter2703))
{
iter2703 = this.success[iter2703];
output.writeString(iter2703);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getIdentityCredential_args = function(args) {
};
CallService_getIdentityCredential_args.prototype = {};
CallService_getIdentityCredential_args.prototype.read = function(input) {
input.readStructBegin();
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;
};
CallService_getIdentityCredential_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getIdentityCredential_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getIdentityCredential_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.IdentityCredential(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getIdentityCredential_result.prototype = {};
CallService_getIdentityCredential_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.IdentityCredential();
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;
};
CallService_getIdentityCredential_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getIdentityCredential_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_addOperationForChannel_args = function(args) {
this.opType = null;
this.param1 = null;
this.param2 = null;
this.param3 = null;
if (args) {
if (args.opType !== undefined && args.opType !== null) {
this.opType = args.opType;
}
if (args.param1 !== undefined && args.param1 !== null) {
this.param1 = args.param1;
}
if (args.param2 !== undefined && args.param2 !== null) {
this.param2 = args.param2;
}
if (args.param3 !== undefined && args.param3 !== null) {
this.param3 = args.param3;
}
}
};
CallService_addOperationForChannel_args.prototype = {};
CallService_addOperationForChannel_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.opType = input.readI32();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.param1 = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.param2 = input.readString();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRING) {
this.param3 = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_addOperationForChannel_args.prototype.write = function(output) {
output.writeStructBegin('CallService_addOperationForChannel_args');
if (this.opType !== null && this.opType !== undefined) {
output.writeFieldBegin('opType', Thrift.Type.I32, 1);
output.writeI32(this.opType);
output.writeFieldEnd();
}
if (this.param1 !== null && this.param1 !== undefined) {
output.writeFieldBegin('param1', Thrift.Type.STRING, 2);
output.writeString(this.param1);
output.writeFieldEnd();
}
if (this.param2 !== null && this.param2 !== undefined) {
output.writeFieldBegin('param2', Thrift.Type.STRING, 3);
output.writeString(this.param2);
output.writeFieldEnd();
}
if (this.param3 !== null && this.param3 !== undefined) {
output.writeFieldBegin('param3', Thrift.Type.STRING, 4);
output.writeString(this.param3);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_addOperationForChannel_result = function(args) {
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_addOperationForChannel_result.prototype = {};
CallService_addOperationForChannel_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_addOperationForChannel_result.prototype.write = function(output) {
output.writeStructBegin('CallService_addOperationForChannel_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getSimpleChannelContacts_args = function(args) {
this.ids = null;
this.statusSticonFallbackDisabled = null;
if (args) {
if (args.ids !== undefined && args.ids !== null) {
this.ids = Thrift.copyList(args.ids, [null]);
}
if (args.statusSticonFallbackDisabled !== undefined && args.statusSticonFallbackDisabled !== null) {
this.statusSticonFallbackDisabled = args.statusSticonFallbackDisabled;
}
}
};
CallService_getSimpleChannelContacts_args.prototype = {};
CallService_getSimpleChannelContacts_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.LIST) {
var _size2704 = 0;
var _rtmp32708;
this.ids = [];
var _etype2707 = 0;
_rtmp32708 = input.readListBegin();
_etype2707 = _rtmp32708.etype;
_size2704 = _rtmp32708.size;
for (var _i2709 = 0; _i2709 < _size2704; ++_i2709)
{
var elem2710 = null;
elem2710 = input.readString();
this.ids.push(elem2710);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.BOOL) {
this.statusSticonFallbackDisabled = input.readBool();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getSimpleChannelContacts_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getSimpleChannelContacts_args');
if (this.ids !== null && this.ids !== undefined) {
output.writeFieldBegin('ids', Thrift.Type.LIST, 1);
output.writeListBegin(Thrift.Type.STRING, this.ids.length);
for (var iter2711 in this.ids)
{
if (this.ids.hasOwnProperty(iter2711))
{
iter2711 = this.ids[iter2711];
output.writeString(iter2711);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.statusSticonFallbackDisabled !== null && this.statusSticonFallbackDisabled !== undefined) {
output.writeFieldBegin('statusSticonFallbackDisabled', Thrift.Type.BOOL, 2);
output.writeBool(this.statusSticonFallbackDisabled);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getSimpleChannelContacts_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.SimpleChannelContact]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getSimpleChannelContacts_result.prototype = {};
CallService_getSimpleChannelContacts_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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 _size2712 = 0;
var _rtmp32716;
this.success = [];
var _etype2715 = 0;
_rtmp32716 = input.readListBegin();
_etype2715 = _rtmp32716.etype;
_size2712 = _rtmp32716.size;
for (var _i2717 = 0; _i2717 < _size2712; ++_i2717)
{
var elem2718 = null;
elem2718 = new ttypes.SimpleChannelContact();
elem2718.read(input);
this.success.push(elem2718);
}
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;
};
CallService_getSimpleChannelContacts_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getSimpleChannelContacts_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 iter2719 in this.success)
{
if (this.success.hasOwnProperty(iter2719))
{
iter2719 = this.success[iter2719];
iter2719.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserLastSentMessageTimeStamp_args = function(args) {
this.mid = null;
if (args) {
if (args.mid !== undefined && args.mid !== null) {
this.mid = args.mid;
}
}
};
CallService_getUserLastSentMessageTimeStamp_args.prototype = {};
CallService_getUserLastSentMessageTimeStamp_args.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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.mid = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
CallService_getUserLastSentMessageTimeStamp_args.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserLastSentMessageTimeStamp_args');
if (this.mid !== null && this.mid !== undefined) {
output.writeFieldBegin('mid', Thrift.Type.STRING, 1);
output.writeString(this.mid);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallService_getUserLastSentMessageTimeStamp_result = function(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TalkException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
CallService_getUserLastSentMessageTimeStamp_result.prototype = {};
CallService_getUserLastSentMessageTimeStamp_result.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = 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;
};
CallService_getUserLastSentMessageTimeStamp_result.prototype.write = function(output) {
output.writeStructBegin('CallService_getUserLastSentMessageTimeStamp_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.I64, 0);
output.writeI64(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var CallServiceClient = exports.Client = function(output, pClass) {
this.output = output;
this.pClass = pClass;
this._seqid = 0;
this._reqs = {};
};
CallServiceClient.prototype = {};
CallServiceClient.prototype.seqid = function() { return this._seqid; };
CallServiceClient.prototype.new_seqid = function() { return this._seqid += 1; };
CallServiceClient.prototype.getUserStatus = 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_getUserStatus(mid);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getUserStatus(mid);
}
};
CallServiceClient.prototype.send_getUserStatus = function(mid) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getUserStatus', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getUserStatus_args();
args.mid = mid;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getUserStatus = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getUserStatus_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getUserStatus failed: unknown result');
};
CallServiceClient.prototype.updateProfileAttributeForChannel = function(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_updateProfileAttributeForChannel(profileAttribute, value);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_updateProfileAttributeForChannel(profileAttribute, value);
}
};
CallServiceClient.prototype.send_updateProfileAttributeForChannel = function(profileAttribute, value) {
var output = new this.pClass(this.output);
output.writeMessageBegin('updateProfileAttributeForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_updateProfileAttributeForChannel_args();
args.profileAttribute = profileAttribute;
args.value = value;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_updateProfileAttributeForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_updateProfileAttributeForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
CallServiceClient.prototype.updateExtendedProfileAttribute = function(attr, extendedProfile, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_updateExtendedProfileAttribute(attr, extendedProfile);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_updateExtendedProfileAttribute(attr, extendedProfile);
}
};
CallServiceClient.prototype.send_updateExtendedProfileAttribute = function(attr, extendedProfile) {
var output = new this.pClass(this.output);
output.writeMessageBegin('updateExtendedProfileAttribute', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_updateExtendedProfileAttribute_args();
args.attr = attr;
args.extendedProfile = extendedProfile;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_updateExtendedProfileAttribute = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_updateExtendedProfileAttribute_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
CallServiceClient.prototype.getAllSimpleChannelContacts = function(statusSticonFallbackDisabled, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getAllSimpleChannelContacts(statusSticonFallbackDisabled);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getAllSimpleChannelContacts(statusSticonFallbackDisabled);
}
};
CallServiceClient.prototype.send_getAllSimpleChannelContacts = function(statusSticonFallbackDisabled) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getAllSimpleChannelContacts', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getAllSimpleChannelContacts_args();
args.statusSticonFallbackDisabled = statusSticonFallbackDisabled;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getAllSimpleChannelContacts = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getAllSimpleChannelContacts_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getAllSimpleChannelContacts failed: unknown result');
};
CallServiceClient.prototype.getUserIdentities = 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_getUserIdentities();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getUserIdentities();
}
};
CallServiceClient.prototype.send_getUserIdentities = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getUserIdentities', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getUserIdentities_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getUserIdentities = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getUserIdentities_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getUserIdentities failed: unknown result');
};
CallServiceClient.prototype.markPaidCallAd = function(dialedNumber, language, disableCallerId, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_markPaidCallAd(dialedNumber, language, disableCallerId);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_markPaidCallAd(dialedNumber, language, disableCallerId);
}
};
CallServiceClient.prototype.send_markPaidCallAd = function(dialedNumber, language, disableCallerId) {
var output = new this.pClass(this.output);
output.writeMessageBegin('markPaidCallAd', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_markPaidCallAd_args();
args.dialedNumber = dialedNumber;
args.language = language;
args.disableCallerId = disableCallerId;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_markPaidCallAd = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_markPaidCallAd_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('markPaidCallAd failed: unknown result');
};
CallServiceClient.prototype.isGroupMember = 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_isGroupMember(groupId);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_isGroupMember(groupId);
}
};
CallServiceClient.prototype.send_isGroupMember = function(groupId) {
var output = new this.pClass(this.output);
output.writeMessageBegin('isGroupMember', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_isGroupMember_args();
args.groupId = groupId;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_isGroupMember = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_isGroupMember_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('isGroupMember failed: unknown result');
};
CallServiceClient.prototype.getPhoneInfoFromPhoneNumber = function(region, phoneNumber, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getPhoneInfoFromPhoneNumber(region, phoneNumber);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getPhoneInfoFromPhoneNumber(region, phoneNumber);
}
};
CallServiceClient.prototype.send_getPhoneInfoFromPhoneNumber = function(region, phoneNumber) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getPhoneInfoFromPhoneNumber', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getPhoneInfoFromPhoneNumber_args();
args.region = region;
args.phoneNumber = phoneNumber;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getPhoneInfoFromPhoneNumber = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getPhoneInfoFromPhoneNumber_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getPhoneInfoFromPhoneNumber failed: unknown result');
};
CallServiceClient.prototype.redeemPaidCallVoucher = function(serial, language, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_redeemPaidCallVoucher(serial, language);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_redeemPaidCallVoucher(serial, language);
}
};
CallServiceClient.prototype.send_redeemPaidCallVoucher = function(serial, language) {
var output = new this.pClass(this.output);
output.writeMessageBegin('redeemPaidCallVoucher', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_redeemPaidCallVoucher_args();
args.serial = serial;
args.language = language;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_redeemPaidCallVoucher = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_redeemPaidCallVoucher_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('redeemPaidCallVoucher failed: unknown result');
};
CallServiceClient.prototype.getPreferredDisplayName = function(mids, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getPreferredDisplayName(mids);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getPreferredDisplayName(mids);
}
};
CallServiceClient.prototype.send_getPreferredDisplayName = function(mids) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getPreferredDisplayName', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getPreferredDisplayName_args();
args.mids = mids;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getPreferredDisplayName = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getPreferredDisplayName_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getPreferredDisplayName failed: unknown result');
};
CallServiceClient.prototype.getContactsForChannel = 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_getContactsForChannel(ids);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getContactsForChannel(ids);
}
};
CallServiceClient.prototype.send_getContactsForChannel = function(ids) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getContactsForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getContactsForChannel_args();
args.ids = ids;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getContactsForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getContactsForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getContactsForChannel failed: unknown result');
};
CallServiceClient.prototype.getCallCreditProducts = function(appStoreCode, pgCode, country, language, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getCallCreditProducts(appStoreCode, pgCode, country, language);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getCallCreditProducts(appStoreCode, pgCode, country, language);
}
};
CallServiceClient.prototype.send_getCallCreditProducts = function(appStoreCode, pgCode, country, language) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getCallCreditProducts', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getCallCreditProducts_args();
args.appStoreCode = appStoreCode;
args.pgCode = pgCode;
args.country = country;
args.language = language;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getCallCreditProducts = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getCallCreditProducts_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getCallCreditProducts failed: unknown result');
};
CallServiceClient.prototype.getCompactContacts = function(lastModifiedTimestamp, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getCompactContacts(lastModifiedTimestamp);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getCompactContacts(lastModifiedTimestamp);
}
};
CallServiceClient.prototype.send_getCompactContacts = function(lastModifiedTimestamp) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getCompactContacts', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getCompactContacts_args();
args.lastModifiedTimestamp = lastModifiedTimestamp;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getCompactContacts = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getCompactContacts_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getCompactContacts failed: unknown result');
};
CallServiceClient.prototype.notifyNotiCenterEvent = function(event, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_notifyNotiCenterEvent(event);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_notifyNotiCenterEvent(event);
}
};
CallServiceClient.prototype.send_notifyNotiCenterEvent = function(event) {
var output = new this.pClass(this.output);
output.writeMessageBegin('notifyNotiCenterEvent', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_notifyNotiCenterEvent_args();
args.event = event;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_notifyNotiCenterEvent = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_notifyNotiCenterEvent_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
CallServiceClient.prototype.isInContact = 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_isInContact(mid);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_isInContact(mid);
}
};
CallServiceClient.prototype.send_isInContact = function(mid) {
var output = new this.pClass(this.output);
output.writeMessageBegin('isInContact', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_isInContact_args();
args.mid = mid;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_isInContact = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_isInContact_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('isInContact failed: unknown result');
};
CallServiceClient.prototype.lookupGroupMembers = function(groupId, mids, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_lookupGroupMembers(groupId, mids);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_lookupGroupMembers(groupId, mids);
}
};
CallServiceClient.prototype.send_lookupGroupMembers = function(groupId, mids) {
var output = new this.pClass(this.output);
output.writeMessageBegin('lookupGroupMembers', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_lookupGroupMembers_args();
args.groupId = groupId;
args.mids = mids;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_lookupGroupMembers = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_lookupGroupMembers_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('lookupGroupMembers failed: unknown result');
};
CallServiceClient.prototype.getRoomInformation = function(roomMid, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getRoomInformation(roomMid);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getRoomInformation(roomMid);
}
};
CallServiceClient.prototype.send_getRoomInformation = function(roomMid) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getRoomInformation', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getRoomInformation_args();
args.roomMid = roomMid;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getRoomInformation = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getRoomInformation_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getRoomInformation failed: unknown result');
};
CallServiceClient.prototype.getGroupCall = function(chatMid, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getGroupCall(chatMid);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getGroupCall(chatMid);
}
};
CallServiceClient.prototype.send_getGroupCall = function(chatMid) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getGroupCall', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getGroupCall_args();
args.chatMid = chatMid;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getGroupCall = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getGroupCall_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getGroupCall failed: unknown result');
};
CallServiceClient.prototype.isAllowSecondaryDeviceLogin = 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_isAllowSecondaryDeviceLogin();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_isAllowSecondaryDeviceLogin();
}
};
CallServiceClient.prototype.send_isAllowSecondaryDeviceLogin = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('isAllowSecondaryDeviceLogin', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_isAllowSecondaryDeviceLogin_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_isAllowSecondaryDeviceLogin = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_isAllowSecondaryDeviceLogin_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('isAllowSecondaryDeviceLogin failed: unknown result');
};
CallServiceClient.prototype.getPrimaryClientForChannel = 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_getPrimaryClientForChannel();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getPrimaryClientForChannel();
}
};
CallServiceClient.prototype.send_getPrimaryClientForChannel = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getPrimaryClientForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getPrimaryClientForChannel_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getPrimaryClientForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getPrimaryClientForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getPrimaryClientForChannel failed: unknown result');
};
CallServiceClient.prototype.createRoomWithBuddy = function(reqSeq, buddyMid, 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_createRoomWithBuddy(reqSeq, buddyMid, contactIds);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_createRoomWithBuddy(reqSeq, buddyMid, contactIds);
}
};
CallServiceClient.prototype.send_createRoomWithBuddy = function(reqSeq, buddyMid, contactIds) {
var output = new this.pClass(this.output);
output.writeMessageBegin('createRoomWithBuddy', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_createRoomWithBuddy_args();
args.reqSeq = reqSeq;
args.buddyMid = buddyMid;
args.contactIds = contactIds;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_createRoomWithBuddy = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_createRoomWithBuddy_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('createRoomWithBuddy failed: unknown result');
};
CallServiceClient.prototype.getDisplayName = 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_getDisplayName(mid);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getDisplayName(mid);
}
};
CallServiceClient.prototype.send_getDisplayName = function(mid) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getDisplayName', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getDisplayName_args();
args.mid = mid;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getDisplayName = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getDisplayName_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getDisplayName failed: unknown result');
};
CallServiceClient.prototype.getPaidCallMetadata = function(language, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getPaidCallMetadata(language);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getPaidCallMetadata(language);
}
};
CallServiceClient.prototype.send_getPaidCallMetadata = function(language) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getPaidCallMetadata', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getPaidCallMetadata_args();
args.language = language;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getPaidCallMetadata = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getPaidCallMetadata_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getPaidCallMetadata failed: unknown result');
};
CallServiceClient.prototype.getMid = 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_getMid();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getMid();
}
};
CallServiceClient.prototype.send_getMid = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getMid', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getMid_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getMid = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getMid_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getMid failed: unknown result');
};
CallServiceClient.prototype.getUserCountryForBilling = function(country, remoteIp, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getUserCountryForBilling(country, remoteIp);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getUserCountryForBilling(country, remoteIp);
}
};
CallServiceClient.prototype.send_getUserCountryForBilling = function(country, remoteIp) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getUserCountryForBilling', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getUserCountryForBilling_args();
args.country = country;
args.remoteIp = remoteIp;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getUserCountryForBilling = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getUserCountryForBilling_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getUserCountryForBilling failed: unknown result');
};
CallServiceClient.prototype.getFavoriteGroupIdsForChannel = 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_getFavoriteGroupIdsForChannel();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getFavoriteGroupIdsForChannel();
}
};
CallServiceClient.prototype.send_getFavoriteGroupIdsForChannel = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getFavoriteGroupIdsForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getFavoriteGroupIdsForChannel_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getFavoriteGroupIdsForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getFavoriteGroupIdsForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getFavoriteGroupIdsForChannel failed: unknown result');
};
CallServiceClient.prototype.getPaidCallHistory = function(start, size, language, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getPaidCallHistory(start, size, language);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getPaidCallHistory(start, size, language);
}
};
CallServiceClient.prototype.send_getPaidCallHistory = function(start, size, language) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getPaidCallHistory', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getPaidCallHistory_args();
args.start = start;
args.size = size;
args.language = language;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getPaidCallHistory = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getPaidCallHistory_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getPaidCallHistory failed: unknown result');
};
CallServiceClient.prototype.sendPinCodeOperation = 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_sendPinCodeOperation(verifier);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_sendPinCodeOperation(verifier);
}
};
CallServiceClient.prototype.send_sendPinCodeOperation = function(verifier) {
var output = new this.pClass(this.output);
output.writeMessageBegin('sendPinCodeOperation', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_sendPinCodeOperation_args();
args.verifier = verifier;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_sendPinCodeOperation = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_sendPinCodeOperation_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
CallServiceClient.prototype.inviteIntoGroupCall = function(chatMid, memberMids, mediaType, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_inviteIntoGroupCall(chatMid, memberMids, mediaType);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_inviteIntoGroupCall(chatMid, memberMids, mediaType);
}
};
CallServiceClient.prototype.send_inviteIntoGroupCall = function(chatMid, memberMids, mediaType) {
var output = new this.pClass(this.output);
output.writeMessageBegin('inviteIntoGroupCall', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_inviteIntoGroupCall_args();
args.chatMid = chatMid;
args.memberMids = memberMids;
args.mediaType = mediaType;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_inviteIntoGroupCall = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_inviteIntoGroupCall_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
CallServiceClient.prototype.getFriendMids = 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_getFriendMids();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getFriendMids();
}
};
CallServiceClient.prototype.send_getFriendMids = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getFriendMids', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getFriendMids_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getFriendMids = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getFriendMids_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getFriendMids failed: unknown result');
};
CallServiceClient.prototype.getMetaProfile = 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_getMetaProfile();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getMetaProfile();
}
};
CallServiceClient.prototype.send_getMetaProfile = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getMetaProfile', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getMetaProfile_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getMetaProfile = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getMetaProfile_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getMetaProfile failed: unknown result');
};
CallServiceClient.prototype.sendMessageForChannel = function(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_sendMessageForChannel(message);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_sendMessageForChannel(message);
}
};
CallServiceClient.prototype.send_sendMessageForChannel = function(message) {
var output = new this.pClass(this.output);
output.writeMessageBegin('sendMessageForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_sendMessageForChannel_args();
args.message = message;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_sendMessageForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_sendMessageForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('sendMessageForChannel failed: unknown result');
};
CallServiceClient.prototype.activeBuddySubscriberCount = 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_activeBuddySubscriberCount();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_activeBuddySubscriberCount();
}
};
CallServiceClient.prototype.send_activeBuddySubscriberCount = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('activeBuddySubscriberCount', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_activeBuddySubscriberCount_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_activeBuddySubscriberCount = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_activeBuddySubscriberCount_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('activeBuddySubscriberCount failed: unknown result');
};
CallServiceClient.prototype.getCallCreditPurchaseHistory = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getCallCreditPurchaseHistory(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getCallCreditPurchaseHistory(request);
}
};
CallServiceClient.prototype.send_getCallCreditPurchaseHistory = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getCallCreditPurchaseHistory', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getCallCreditPurchaseHistory_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getCallCreditPurchaseHistory = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getCallCreditPurchaseHistory_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getCallCreditPurchaseHistory failed: unknown result');
};
CallServiceClient.prototype.isRoomMember = 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_isRoomMember(roomId);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_isRoomMember(roomId);
}
};
CallServiceClient.prototype.send_isRoomMember = function(roomId) {
var output = new this.pClass(this.output);
output.writeMessageBegin('isRoomMember', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_isRoomMember_args();
args.roomId = roomId;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_isRoomMember = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_isRoomMember_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('isRoomMember failed: unknown result');
};
CallServiceClient.prototype.sendSystemOAMessage = function(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_sendSystemOAMessage(message);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_sendSystemOAMessage(message);
}
};
CallServiceClient.prototype.send_sendSystemOAMessage = function(message) {
var output = new this.pClass(this.output);
output.writeMessageBegin('sendSystemOAMessage', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_sendSystemOAMessage_args();
args.message = message;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_sendSystemOAMessage = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_sendSystemOAMessage_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('sendSystemOAMessage failed: unknown result');
};
CallServiceClient.prototype.acquirePaidCallRoute = function(paidCallType, dialedNumber, language, networkCode, disableCallerId, referer, adSessionId, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_acquirePaidCallRoute(paidCallType, dialedNumber, language, networkCode, disableCallerId, referer, adSessionId);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_acquirePaidCallRoute(paidCallType, dialedNumber, language, networkCode, disableCallerId, referer, adSessionId);
}
};
CallServiceClient.prototype.send_acquirePaidCallRoute = function(paidCallType, dialedNumber, language, networkCode, disableCallerId, referer, adSessionId) {
var output = new this.pClass(this.output);
output.writeMessageBegin('acquirePaidCallRoute', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_acquirePaidCallRoute_args();
args.paidCallType = paidCallType;
args.dialedNumber = dialedNumber;
args.language = language;
args.networkCode = networkCode;
args.disableCallerId = disableCallerId;
args.referer = referer;
args.adSessionId = adSessionId;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_acquirePaidCallRoute = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_acquirePaidCallRoute_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('acquirePaidCallRoute failed: unknown result');
};
CallServiceClient.prototype.getGroupsForChannel = 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_getGroupsForChannel(groupIds);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getGroupsForChannel(groupIds);
}
};
CallServiceClient.prototype.send_getGroupsForChannel = function(groupIds) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getGroupsForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getGroupsForChannel_args();
args.groupIds = groupIds;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getGroupsForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getGroupsForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getGroupsForChannel failed: unknown result');
};
CallServiceClient.prototype.getUserCreateTime = 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_getUserCreateTime();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getUserCreateTime();
}
};
CallServiceClient.prototype.send_getUserCreateTime = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getUserCreateTime', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getUserCreateTime_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getUserCreateTime = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getUserCreateTime_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getUserCreateTime failed: unknown result');
};
CallServiceClient.prototype.registerChannelCP = function(cpId, registerPassword, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_registerChannelCP(cpId, registerPassword);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_registerChannelCP(cpId, registerPassword);
}
};
CallServiceClient.prototype.send_registerChannelCP = function(cpId, registerPassword) {
var output = new this.pClass(this.output);
output.writeMessageBegin('registerChannelCP', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_registerChannelCP_args();
args.cpId = cpId;
args.registerPassword = registerPassword;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_registerChannelCP = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_registerChannelCP_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('registerChannelCP failed: unknown result');
};
CallServiceClient.prototype.reserveCallCreditPurchase = function(request, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_reserveCallCreditPurchase(request);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_reserveCallCreditPurchase(request);
}
};
CallServiceClient.prototype.send_reserveCallCreditPurchase = function(request) {
var output = new this.pClass(this.output);
output.writeMessageBegin('reserveCallCreditPurchase', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_reserveCallCreditPurchase_args();
args.request = request;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_reserveCallCreditPurchase = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_reserveCallCreditPurchase_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('reserveCallCreditPurchase failed: unknown result');
};
CallServiceClient.prototype.acquirePaidCallCurrencyExchangeRate = function(language, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_acquirePaidCallCurrencyExchangeRate(language);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_acquirePaidCallCurrencyExchangeRate(language);
}
};
CallServiceClient.prototype.send_acquirePaidCallCurrencyExchangeRate = function(language) {
var output = new this.pClass(this.output);
output.writeMessageBegin('acquirePaidCallCurrencyExchangeRate', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_acquirePaidCallCurrencyExchangeRate_args();
args.language = language;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_acquirePaidCallCurrencyExchangeRate = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_acquirePaidCallCurrencyExchangeRate_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('acquirePaidCallCurrencyExchangeRate failed: unknown result');
};
CallServiceClient.prototype.getRoomMemberMidsForAppPlatform = 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_getRoomMemberMidsForAppPlatform(roomId);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getRoomMemberMidsForAppPlatform(roomId);
}
};
CallServiceClient.prototype.send_getRoomMemberMidsForAppPlatform = function(roomId) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getRoomMemberMidsForAppPlatform', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getRoomMemberMidsForAppPlatform_args();
args.roomId = roomId;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getRoomMemberMidsForAppPlatform = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getRoomMemberMidsForAppPlatform_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getRoomMemberMidsForAppPlatform failed: unknown result');
};
CallServiceClient.prototype.getPaidCallBalanceList = function(language, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getPaidCallBalanceList(language);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getPaidCallBalanceList(language);
}
};
CallServiceClient.prototype.send_getPaidCallBalanceList = function(language) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getPaidCallBalanceList', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getPaidCallBalanceList_args();
args.language = language;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getPaidCallBalanceList = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getPaidCallBalanceList_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getPaidCallBalanceList failed: unknown result');
};
CallServiceClient.prototype.getPersonalInfos = function(requiredPersonalInfos, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getPersonalInfos(requiredPersonalInfos);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getPersonalInfos(requiredPersonalInfos);
}
};
CallServiceClient.prototype.send_getPersonalInfos = function(requiredPersonalInfos) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getPersonalInfos', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getPersonalInfos_args();
args.requiredPersonalInfos = requiredPersonalInfos;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getPersonalInfos = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getPersonalInfos_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getPersonalInfos failed: unknown result');
};
CallServiceClient.prototype.getPrimaryClientsForChannel = function(userMids, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getPrimaryClientsForChannel(userMids);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getPrimaryClientsForChannel(userMids);
}
};
CallServiceClient.prototype.send_getPrimaryClientsForChannel = function(userMids) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getPrimaryClientsForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getPrimaryClientsForChannel_args();
args.userMids = userMids;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getPrimaryClientsForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getPrimaryClientsForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getPrimaryClientsForChannel failed: unknown result');
};
CallServiceClient.prototype.addBuddyToContact = function(buddyMid, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_addBuddyToContact(buddyMid);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_addBuddyToContact(buddyMid);
}
};
CallServiceClient.prototype.send_addBuddyToContact = function(buddyMid) {
var output = new this.pClass(this.output);
output.writeMessageBegin('addBuddyToContact', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_addBuddyToContact_args();
args.buddyMid = buddyMid;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_addBuddyToContact = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_addBuddyToContact_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('addBuddyToContact failed: unknown result');
};
CallServiceClient.prototype.getGroupMemberMidsForAppPlatform = 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_getGroupMemberMidsForAppPlatform(groupId);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getGroupMemberMidsForAppPlatform(groupId);
}
};
CallServiceClient.prototype.send_getGroupMemberMidsForAppPlatform = function(groupId) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getGroupMemberMidsForAppPlatform', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getGroupMemberMidsForAppPlatform_args();
args.groupId = groupId;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getGroupMemberMidsForAppPlatform = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getGroupMemberMidsForAppPlatform_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getGroupMemberMidsForAppPlatform failed: unknown result');
};
CallServiceClient.prototype.getUserLanguage = 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_getUserLanguage();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getUserLanguage();
}
};
CallServiceClient.prototype.send_getUserLanguage = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getUserLanguage', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getUserLanguage_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getUserLanguage = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getUserLanguage_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getUserLanguage failed: unknown result');
};
CallServiceClient.prototype.lookupPaidCall = function(dialedNumber, language, referer, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_lookupPaidCall(dialedNumber, language, referer);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_lookupPaidCall(dialedNumber, language, referer);
}
};
CallServiceClient.prototype.send_lookupPaidCall = function(dialedNumber, language, referer) {
var output = new this.pClass(this.output);
output.writeMessageBegin('lookupPaidCall', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_lookupPaidCall_args();
args.dialedNumber = dialedNumber;
args.language = language;
args.referer = referer;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_lookupPaidCall = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_lookupPaidCall_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('lookupPaidCall failed: unknown result');
};
CallServiceClient.prototype.getExtendedProfile = 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_getExtendedProfile();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getExtendedProfile();
}
};
CallServiceClient.prototype.send_getExtendedProfile = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getExtendedProfile', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getExtendedProfile_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getExtendedProfile = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getExtendedProfile_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getExtendedProfile failed: unknown result');
};
CallServiceClient.prototype.getReverseCompactContacts = 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_getReverseCompactContacts(ids);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getReverseCompactContacts(ids);
}
};
CallServiceClient.prototype.send_getReverseCompactContacts = function(ids) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getReverseCompactContacts', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getReverseCompactContacts_args();
args.ids = ids;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getReverseCompactContacts = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getReverseCompactContacts_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getReverseCompactContacts failed: unknown result');
};
CallServiceClient.prototype.getPaidCallAdStatus = 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_getPaidCallAdStatus();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getPaidCallAdStatus();
}
};
CallServiceClient.prototype.send_getPaidCallAdStatus = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getPaidCallAdStatus', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getPaidCallAdStatus_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getPaidCallAdStatus = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getPaidCallAdStatus_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getPaidCallAdStatus failed: unknown result');
};
CallServiceClient.prototype.findContactByUseridWithoutAbuseBlockForChannel = 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_findContactByUseridWithoutAbuseBlockForChannel(userid);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_findContactByUseridWithoutAbuseBlockForChannel(userid);
}
};
CallServiceClient.prototype.send_findContactByUseridWithoutAbuseBlockForChannel = function(userid) {
var output = new this.pClass(this.output);
output.writeMessageBegin('findContactByUseridWithoutAbuseBlockForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_findContactByUseridWithoutAbuseBlockForChannel_args();
args.userid = userid;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_findContactByUseridWithoutAbuseBlockForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_findContactByUseridWithoutAbuseBlockForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('findContactByUseridWithoutAbuseBlockForChannel failed: unknown result');
};
CallServiceClient.prototype.getGroupMemberMids = 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_getGroupMemberMids(groupId);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getGroupMemberMids(groupId);
}
};
CallServiceClient.prototype.send_getGroupMemberMids = function(groupId) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getGroupMemberMids', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getGroupMemberMids_args();
args.groupId = groupId;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getGroupMemberMids = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getGroupMemberMids_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getGroupMemberMids failed: unknown result');
};
CallServiceClient.prototype.sendMessageWithoutRelationship = function(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_sendMessageWithoutRelationship(message);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_sendMessageWithoutRelationship(message);
}
};
CallServiceClient.prototype.send_sendMessageWithoutRelationship = function(message) {
var output = new this.pClass(this.output);
output.writeMessageBegin('sendMessageWithoutRelationship', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_sendMessageWithoutRelationship_args();
args.message = message;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_sendMessageWithoutRelationship = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_sendMessageWithoutRelationship_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('sendMessageWithoutRelationship failed: unknown result');
};
CallServiceClient.prototype.displayBuddySubscriberCountInBulk = function(mids, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_displayBuddySubscriberCountInBulk(mids);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_displayBuddySubscriberCountInBulk(mids);
}
};
CallServiceClient.prototype.send_displayBuddySubscriberCountInBulk = function(mids) {
var output = new this.pClass(this.output);
output.writeMessageBegin('displayBuddySubscriberCountInBulk', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_displayBuddySubscriberCountInBulk_args();
args.mids = mids;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_displayBuddySubscriberCountInBulk = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_displayBuddySubscriberCountInBulk_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('displayBuddySubscriberCountInBulk failed: unknown result');
};
CallServiceClient.prototype.lookupRoomMembers = function(roomId, mids, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_lookupRoomMembers(roomId, mids);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_lookupRoomMembers(roomId, mids);
}
};
CallServiceClient.prototype.send_lookupRoomMembers = function(roomId, mids) {
var output = new this.pClass(this.output);
output.writeMessageBegin('lookupRoomMembers', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_lookupRoomMembers_args();
args.roomId = roomId;
args.mids = mids;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_lookupRoomMembers = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_lookupRoomMembers_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('lookupRoomMembers failed: unknown result');
};
CallServiceClient.prototype.getFavoriteMidsForChannel = 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_getFavoriteMidsForChannel();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getFavoriteMidsForChannel();
}
};
CallServiceClient.prototype.send_getFavoriteMidsForChannel = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getFavoriteMidsForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getFavoriteMidsForChannel_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getFavoriteMidsForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getFavoriteMidsForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getFavoriteMidsForChannel failed: unknown result');
};
CallServiceClient.prototype.getAllContactIdsForChannel = 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_getAllContactIdsForChannel();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getAllContactIdsForChannel();
}
};
CallServiceClient.prototype.send_getAllContactIdsForChannel = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getAllContactIdsForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getAllContactIdsForChannel_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getAllContactIdsForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getAllContactIdsForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getAllContactIdsForChannel failed: unknown result');
};
CallServiceClient.prototype.displayBuddySubscriberCount = 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_displayBuddySubscriberCount();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_displayBuddySubscriberCount();
}
};
CallServiceClient.prototype.send_displayBuddySubscriberCount = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('displayBuddySubscriberCount', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_displayBuddySubscriberCount_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_displayBuddySubscriberCount = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_displayBuddySubscriberCount_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('displayBuddySubscriberCount failed: unknown result');
};
CallServiceClient.prototype.getProfileForChannel = 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_getProfileForChannel();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getProfileForChannel();
}
};
CallServiceClient.prototype.send_getProfileForChannel = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getProfileForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getProfileForChannel_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getProfileForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getProfileForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getProfileForChannel failed: unknown result');
};
CallServiceClient.prototype.getUserTickets = function(userMids, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getUserTickets(userMids);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getUserTickets(userMids);
}
};
CallServiceClient.prototype.send_getUserTickets = function(userMids) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getUserTickets', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getUserTickets_args();
args.userMids = userMids;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getUserTickets = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getUserTickets_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getUserTickets failed: unknown result');
};
CallServiceClient.prototype.getOAFriendMids = 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_getOAFriendMids();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getOAFriendMids();
}
};
CallServiceClient.prototype.send_getOAFriendMids = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getOAFriendMids', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getOAFriendMids_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getOAFriendMids = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getOAFriendMids_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getOAFriendMids failed: unknown result');
};
CallServiceClient.prototype.searchPaidCallUserRate = function(countryCode, language, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_searchPaidCallUserRate(countryCode, language);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_searchPaidCallUserRate(countryCode, language);
}
};
CallServiceClient.prototype.send_searchPaidCallUserRate = function(countryCode, language) {
var output = new this.pClass(this.output);
output.writeMessageBegin('searchPaidCallUserRate', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_searchPaidCallUserRate_args();
args.countryCode = countryCode;
args.language = language;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_searchPaidCallUserRate = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_searchPaidCallUserRate_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('searchPaidCallUserRate failed: unknown result');
};
CallServiceClient.prototype.getJoinedGroupIdsForChannel = 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_getJoinedGroupIdsForChannel();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getJoinedGroupIdsForChannel();
}
};
CallServiceClient.prototype.send_getJoinedGroupIdsForChannel = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getJoinedGroupIdsForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getJoinedGroupIdsForChannel_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getJoinedGroupIdsForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getJoinedGroupIdsForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getJoinedGroupIdsForChannel failed: unknown result');
};
CallServiceClient.prototype.acquireGroupCallRoute = function(chatMid, mediaType, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_acquireGroupCallRoute(chatMid, mediaType);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_acquireGroupCallRoute(chatMid, mediaType);
}
};
CallServiceClient.prototype.send_acquireGroupCallRoute = function(chatMid, mediaType) {
var output = new this.pClass(this.output);
output.writeMessageBegin('acquireGroupCallRoute', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_acquireGroupCallRoute_args();
args.chatMid = chatMid;
args.mediaType = mediaType;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_acquireGroupCallRoute = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_acquireGroupCallRoute_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('acquireGroupCallRoute failed: unknown result');
};
CallServiceClient.prototype.getUserMidsWhoAddedMe = 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_getUserMidsWhoAddedMe();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getUserMidsWhoAddedMe();
}
};
CallServiceClient.prototype.send_getUserMidsWhoAddedMe = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getUserMidsWhoAddedMe', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getUserMidsWhoAddedMe_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getUserMidsWhoAddedMe = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getUserMidsWhoAddedMe_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getUserMidsWhoAddedMe failed: unknown result');
};
CallServiceClient.prototype.getIdentityCredential = 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_getIdentityCredential();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getIdentityCredential();
}
};
CallServiceClient.prototype.send_getIdentityCredential = function() {
var output = new this.pClass(this.output);
output.writeMessageBegin('getIdentityCredential', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getIdentityCredential_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getIdentityCredential = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getIdentityCredential_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getIdentityCredential failed: unknown result');
};
CallServiceClient.prototype.addOperationForChannel = function(opType, param1, param2, param3, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_addOperationForChannel(opType, param1, param2, param3);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_addOperationForChannel(opType, param1, param2, param3);
}
};
CallServiceClient.prototype.send_addOperationForChannel = function(opType, param1, param2, param3) {
var output = new this.pClass(this.output);
output.writeMessageBegin('addOperationForChannel', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_addOperationForChannel_args();
args.opType = opType;
args.param1 = param1;
args.param2 = param2;
args.param3 = param3;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_addOperationForChannel = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_addOperationForChannel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
CallServiceClient.prototype.getSimpleChannelContacts = function(ids, statusSticonFallbackDisabled, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function(error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_getSimpleChannelContacts(ids, statusSticonFallbackDisabled);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getSimpleChannelContacts(ids, statusSticonFallbackDisabled);
}
};
CallServiceClient.prototype.send_getSimpleChannelContacts = function(ids, statusSticonFallbackDisabled) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getSimpleChannelContacts', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getSimpleChannelContacts_args();
args.ids = ids;
args.statusSticonFallbackDisabled = statusSticonFallbackDisabled;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getSimpleChannelContacts = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getSimpleChannelContacts_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getSimpleChannelContacts failed: unknown result');
};
CallServiceClient.prototype.getUserLastSentMessageTimeStamp = 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_getUserLastSentMessageTimeStamp(mid);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_getUserLastSentMessageTimeStamp(mid);
}
};
CallServiceClient.prototype.send_getUserLastSentMessageTimeStamp = function(mid) {
var output = new this.pClass(this.output);
output.writeMessageBegin('getUserLastSentMessageTimeStamp', Thrift.MessageType.CALL, this.seqid());
var args = new CallService_getUserLastSentMessageTimeStamp_args();
args.mid = mid;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
CallServiceClient.prototype.recv_getUserLastSentMessageTimeStamp = function(input,mtype,rseqid) {
var callback = this._reqs[rseqid] || function() {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new CallService_getUserLastSentMessageTimeStamp_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('getUserLastSentMessageTimeStamp failed: unknown result');
};
var CallServiceProcessor = exports.Processor = function(handler) {
this._handler = handler;
}
;
CallServiceProcessor.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();
}
}
;
CallServiceProcessor.prototype.process_getUserStatus = function(seqid, input, output) {
var args = new CallService_getUserStatus_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getUserStatus.length === 1) {
Q.fcall(this._handler.getUserStatus, args.mid)
.then(function(result) {
var result_obj = new CallService_getUserStatus_result({success: result});
output.writeMessageBegin("getUserStatus", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getUserStatus_result(err);
output.writeMessageBegin("getUserStatus", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserStatus", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getUserStatus(args.mid, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getUserStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getUserStatus", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserStatus", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_updateProfileAttributeForChannel = function(seqid, input, output) {
var args = new CallService_updateProfileAttributeForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.updateProfileAttributeForChannel.length === 2) {
Q.fcall(this._handler.updateProfileAttributeForChannel, args.profileAttribute, args.value)
.then(function(result) {
var result_obj = new CallService_updateProfileAttributeForChannel_result({success: result});
output.writeMessageBegin("updateProfileAttributeForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_updateProfileAttributeForChannel_result(err);
output.writeMessageBegin("updateProfileAttributeForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateProfileAttributeForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.updateProfileAttributeForChannel(args.profileAttribute, args.value, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_updateProfileAttributeForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("updateProfileAttributeForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateProfileAttributeForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_updateExtendedProfileAttribute = function(seqid, input, output) {
var args = new CallService_updateExtendedProfileAttribute_args();
args.read(input);
input.readMessageEnd();
if (this._handler.updateExtendedProfileAttribute.length === 2) {
Q.fcall(this._handler.updateExtendedProfileAttribute, args.attr, args.extendedProfile)
.then(function(result) {
var result_obj = new CallService_updateExtendedProfileAttribute_result({success: result});
output.writeMessageBegin("updateExtendedProfileAttribute", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_updateExtendedProfileAttribute_result(err);
output.writeMessageBegin("updateExtendedProfileAttribute", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateExtendedProfileAttribute", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.updateExtendedProfileAttribute(args.attr, args.extendedProfile, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_updateExtendedProfileAttribute_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("updateExtendedProfileAttribute", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("updateExtendedProfileAttribute", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getAllSimpleChannelContacts = function(seqid, input, output) {
var args = new CallService_getAllSimpleChannelContacts_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getAllSimpleChannelContacts.length === 1) {
Q.fcall(this._handler.getAllSimpleChannelContacts, args.statusSticonFallbackDisabled)
.then(function(result) {
var result_obj = new CallService_getAllSimpleChannelContacts_result({success: result});
output.writeMessageBegin("getAllSimpleChannelContacts", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getAllSimpleChannelContacts_result(err);
output.writeMessageBegin("getAllSimpleChannelContacts", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getAllSimpleChannelContacts", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getAllSimpleChannelContacts(args.statusSticonFallbackDisabled, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getAllSimpleChannelContacts_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getAllSimpleChannelContacts", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getAllSimpleChannelContacts", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getUserIdentities = function(seqid, input, output) {
var args = new CallService_getUserIdentities_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getUserIdentities.length === 0) {
Q.fcall(this._handler.getUserIdentities)
.then(function(result) {
var result_obj = new CallService_getUserIdentities_result({success: result});
output.writeMessageBegin("getUserIdentities", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getUserIdentities_result(err);
output.writeMessageBegin("getUserIdentities", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserIdentities", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getUserIdentities(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getUserIdentities_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getUserIdentities", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserIdentities", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_markPaidCallAd = function(seqid, input, output) {
var args = new CallService_markPaidCallAd_args();
args.read(input);
input.readMessageEnd();
if (this._handler.markPaidCallAd.length === 3) {
Q.fcall(this._handler.markPaidCallAd, args.dialedNumber, args.language, args.disableCallerId)
.then(function(result) {
var result_obj = new CallService_markPaidCallAd_result({success: result});
output.writeMessageBegin("markPaidCallAd", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_markPaidCallAd_result(err);
output.writeMessageBegin("markPaidCallAd", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("markPaidCallAd", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.markPaidCallAd(args.dialedNumber, args.language, args.disableCallerId, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_markPaidCallAd_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("markPaidCallAd", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("markPaidCallAd", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_isGroupMember = function(seqid, input, output) {
var args = new CallService_isGroupMember_args();
args.read(input);
input.readMessageEnd();
if (this._handler.isGroupMember.length === 1) {
Q.fcall(this._handler.isGroupMember, args.groupId)
.then(function(result) {
var result_obj = new CallService_isGroupMember_result({success: result});
output.writeMessageBegin("isGroupMember", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_isGroupMember_result(err);
output.writeMessageBegin("isGroupMember", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("isGroupMember", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.isGroupMember(args.groupId, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_isGroupMember_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("isGroupMember", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("isGroupMember", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getPhoneInfoFromPhoneNumber = function(seqid, input, output) {
var args = new CallService_getPhoneInfoFromPhoneNumber_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getPhoneInfoFromPhoneNumber.length === 2) {
Q.fcall(this._handler.getPhoneInfoFromPhoneNumber, args.region, args.phoneNumber)
.then(function(result) {
var result_obj = new CallService_getPhoneInfoFromPhoneNumber_result({success: result});
output.writeMessageBegin("getPhoneInfoFromPhoneNumber", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getPhoneInfoFromPhoneNumber_result(err);
output.writeMessageBegin("getPhoneInfoFromPhoneNumber", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPhoneInfoFromPhoneNumber", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getPhoneInfoFromPhoneNumber(args.region, args.phoneNumber, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getPhoneInfoFromPhoneNumber_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getPhoneInfoFromPhoneNumber", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPhoneInfoFromPhoneNumber", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_redeemPaidCallVoucher = function(seqid, input, output) {
var args = new CallService_redeemPaidCallVoucher_args();
args.read(input);
input.readMessageEnd();
if (this._handler.redeemPaidCallVoucher.length === 2) {
Q.fcall(this._handler.redeemPaidCallVoucher, args.serial, args.language)
.then(function(result) {
var result_obj = new CallService_redeemPaidCallVoucher_result({success: result});
output.writeMessageBegin("redeemPaidCallVoucher", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_redeemPaidCallVoucher_result(err);
output.writeMessageBegin("redeemPaidCallVoucher", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("redeemPaidCallVoucher", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.redeemPaidCallVoucher(args.serial, args.language, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_redeemPaidCallVoucher_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("redeemPaidCallVoucher", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("redeemPaidCallVoucher", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getPreferredDisplayName = function(seqid, input, output) {
var args = new CallService_getPreferredDisplayName_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getPreferredDisplayName.length === 1) {
Q.fcall(this._handler.getPreferredDisplayName, args.mids)
.then(function(result) {
var result_obj = new CallService_getPreferredDisplayName_result({success: result});
output.writeMessageBegin("getPreferredDisplayName", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getPreferredDisplayName_result(err);
output.writeMessageBegin("getPreferredDisplayName", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPreferredDisplayName", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getPreferredDisplayName(args.mids, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getPreferredDisplayName_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getPreferredDisplayName", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPreferredDisplayName", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getContactsForChannel = function(seqid, input, output) {
var args = new CallService_getContactsForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getContactsForChannel.length === 1) {
Q.fcall(this._handler.getContactsForChannel, args.ids)
.then(function(result) {
var result_obj = new CallService_getContactsForChannel_result({success: result});
output.writeMessageBegin("getContactsForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getContactsForChannel_result(err);
output.writeMessageBegin("getContactsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getContactsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getContactsForChannel(args.ids, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getContactsForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getContactsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getContactsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getCallCreditProducts = function(seqid, input, output) {
var args = new CallService_getCallCreditProducts_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getCallCreditProducts.length === 4) {
Q.fcall(this._handler.getCallCreditProducts, args.appStoreCode, args.pgCode, args.country, args.language)
.then(function(result) {
var result_obj = new CallService_getCallCreditProducts_result({success: result});
output.writeMessageBegin("getCallCreditProducts", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getCallCreditProducts_result(err);
output.writeMessageBegin("getCallCreditProducts", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getCallCreditProducts", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getCallCreditProducts(args.appStoreCode, args.pgCode, args.country, args.language, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getCallCreditProducts_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getCallCreditProducts", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getCallCreditProducts", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getCompactContacts = function(seqid, input, output) {
var args = new CallService_getCompactContacts_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getCompactContacts.length === 1) {
Q.fcall(this._handler.getCompactContacts, args.lastModifiedTimestamp)
.then(function(result) {
var result_obj = new CallService_getCompactContacts_result({success: result});
output.writeMessageBegin("getCompactContacts", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getCompactContacts_result(err);
output.writeMessageBegin("getCompactContacts", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getCompactContacts", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getCompactContacts(args.lastModifiedTimestamp, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getCompactContacts_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getCompactContacts", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getCompactContacts", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_notifyNotiCenterEvent = function(seqid, input, output) {
var args = new CallService_notifyNotiCenterEvent_args();
args.read(input);
input.readMessageEnd();
if (this._handler.notifyNotiCenterEvent.length === 1) {
Q.fcall(this._handler.notifyNotiCenterEvent, args.event)
.then(function(result) {
var result_obj = new CallService_notifyNotiCenterEvent_result({success: result});
output.writeMessageBegin("notifyNotiCenterEvent", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_notifyNotiCenterEvent_result(err);
output.writeMessageBegin("notifyNotiCenterEvent", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("notifyNotiCenterEvent", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.notifyNotiCenterEvent(args.event, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_notifyNotiCenterEvent_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("notifyNotiCenterEvent", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("notifyNotiCenterEvent", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_isInContact = function(seqid, input, output) {
var args = new CallService_isInContact_args();
args.read(input);
input.readMessageEnd();
if (this._handler.isInContact.length === 1) {
Q.fcall(this._handler.isInContact, args.mid)
.then(function(result) {
var result_obj = new CallService_isInContact_result({success: result});
output.writeMessageBegin("isInContact", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_isInContact_result(err);
output.writeMessageBegin("isInContact", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("isInContact", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.isInContact(args.mid, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_isInContact_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("isInContact", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("isInContact", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_lookupGroupMembers = function(seqid, input, output) {
var args = new CallService_lookupGroupMembers_args();
args.read(input);
input.readMessageEnd();
if (this._handler.lookupGroupMembers.length === 2) {
Q.fcall(this._handler.lookupGroupMembers, args.groupId, args.mids)
.then(function(result) {
var result_obj = new CallService_lookupGroupMembers_result({success: result});
output.writeMessageBegin("lookupGroupMembers", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_lookupGroupMembers_result(err);
output.writeMessageBegin("lookupGroupMembers", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("lookupGroupMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.lookupGroupMembers(args.groupId, args.mids, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_lookupGroupMembers_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("lookupGroupMembers", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("lookupGroupMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getRoomInformation = function(seqid, input, output) {
var args = new CallService_getRoomInformation_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getRoomInformation.length === 1) {
Q.fcall(this._handler.getRoomInformation, args.roomMid)
.then(function(result) {
var result_obj = new CallService_getRoomInformation_result({success: result});
output.writeMessageBegin("getRoomInformation", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getRoomInformation_result(err);
output.writeMessageBegin("getRoomInformation", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getRoomInformation", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getRoomInformation(args.roomMid, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getRoomInformation_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getRoomInformation", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getRoomInformation", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getGroupCall = function(seqid, input, output) {
var args = new CallService_getGroupCall_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getGroupCall.length === 1) {
Q.fcall(this._handler.getGroupCall, args.chatMid)
.then(function(result) {
var result_obj = new CallService_getGroupCall_result({success: result});
output.writeMessageBegin("getGroupCall", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getGroupCall_result(err);
output.writeMessageBegin("getGroupCall", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getGroupCall", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getGroupCall(args.chatMid, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getGroupCall_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getGroupCall", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getGroupCall", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_isAllowSecondaryDeviceLogin = function(seqid, input, output) {
var args = new CallService_isAllowSecondaryDeviceLogin_args();
args.read(input);
input.readMessageEnd();
if (this._handler.isAllowSecondaryDeviceLogin.length === 0) {
Q.fcall(this._handler.isAllowSecondaryDeviceLogin)
.then(function(result) {
var result_obj = new CallService_isAllowSecondaryDeviceLogin_result({success: result});
output.writeMessageBegin("isAllowSecondaryDeviceLogin", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_isAllowSecondaryDeviceLogin_result(err);
output.writeMessageBegin("isAllowSecondaryDeviceLogin", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("isAllowSecondaryDeviceLogin", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.isAllowSecondaryDeviceLogin(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_isAllowSecondaryDeviceLogin_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("isAllowSecondaryDeviceLogin", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("isAllowSecondaryDeviceLogin", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getPrimaryClientForChannel = function(seqid, input, output) {
var args = new CallService_getPrimaryClientForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getPrimaryClientForChannel.length === 0) {
Q.fcall(this._handler.getPrimaryClientForChannel)
.then(function(result) {
var result_obj = new CallService_getPrimaryClientForChannel_result({success: result});
output.writeMessageBegin("getPrimaryClientForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getPrimaryClientForChannel_result(err);
output.writeMessageBegin("getPrimaryClientForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPrimaryClientForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getPrimaryClientForChannel(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getPrimaryClientForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getPrimaryClientForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPrimaryClientForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_createRoomWithBuddy = function(seqid, input, output) {
var args = new CallService_createRoomWithBuddy_args();
args.read(input);
input.readMessageEnd();
if (this._handler.createRoomWithBuddy.length === 3) {
Q.fcall(this._handler.createRoomWithBuddy, args.reqSeq, args.buddyMid, args.contactIds)
.then(function(result) {
var result_obj = new CallService_createRoomWithBuddy_result({success: result});
output.writeMessageBegin("createRoomWithBuddy", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_createRoomWithBuddy_result(err);
output.writeMessageBegin("createRoomWithBuddy", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("createRoomWithBuddy", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.createRoomWithBuddy(args.reqSeq, args.buddyMid, args.contactIds, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_createRoomWithBuddy_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("createRoomWithBuddy", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("createRoomWithBuddy", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getDisplayName = function(seqid, input, output) {
var args = new CallService_getDisplayName_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getDisplayName.length === 1) {
Q.fcall(this._handler.getDisplayName, args.mid)
.then(function(result) {
var result_obj = new CallService_getDisplayName_result({success: result});
output.writeMessageBegin("getDisplayName", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getDisplayName_result(err);
output.writeMessageBegin("getDisplayName", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getDisplayName", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getDisplayName(args.mid, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getDisplayName_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getDisplayName", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getDisplayName", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getPaidCallMetadata = function(seqid, input, output) {
var args = new CallService_getPaidCallMetadata_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getPaidCallMetadata.length === 1) {
Q.fcall(this._handler.getPaidCallMetadata, args.language)
.then(function(result) {
var result_obj = new CallService_getPaidCallMetadata_result({success: result});
output.writeMessageBegin("getPaidCallMetadata", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getPaidCallMetadata_result(err);
output.writeMessageBegin("getPaidCallMetadata", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPaidCallMetadata", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getPaidCallMetadata(args.language, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getPaidCallMetadata_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getPaidCallMetadata", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPaidCallMetadata", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getMid = function(seqid, input, output) {
var args = new CallService_getMid_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getMid.length === 0) {
Q.fcall(this._handler.getMid)
.then(function(result) {
var result_obj = new CallService_getMid_result({success: result});
output.writeMessageBegin("getMid", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getMid_result(err);
output.writeMessageBegin("getMid", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getMid", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getMid(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getMid_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getMid", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getMid", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getUserCountryForBilling = function(seqid, input, output) {
var args = new CallService_getUserCountryForBilling_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getUserCountryForBilling.length === 2) {
Q.fcall(this._handler.getUserCountryForBilling, args.country, args.remoteIp)
.then(function(result) {
var result_obj = new CallService_getUserCountryForBilling_result({success: result});
output.writeMessageBegin("getUserCountryForBilling", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getUserCountryForBilling_result(err);
output.writeMessageBegin("getUserCountryForBilling", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserCountryForBilling", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getUserCountryForBilling(args.country, args.remoteIp, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getUserCountryForBilling_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getUserCountryForBilling", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserCountryForBilling", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getFavoriteGroupIdsForChannel = function(seqid, input, output) {
var args = new CallService_getFavoriteGroupIdsForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getFavoriteGroupIdsForChannel.length === 0) {
Q.fcall(this._handler.getFavoriteGroupIdsForChannel)
.then(function(result) {
var result_obj = new CallService_getFavoriteGroupIdsForChannel_result({success: result});
output.writeMessageBegin("getFavoriteGroupIdsForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getFavoriteGroupIdsForChannel_result(err);
output.writeMessageBegin("getFavoriteGroupIdsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getFavoriteGroupIdsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getFavoriteGroupIdsForChannel(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getFavoriteGroupIdsForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getFavoriteGroupIdsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getFavoriteGroupIdsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getPaidCallHistory = function(seqid, input, output) {
var args = new CallService_getPaidCallHistory_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getPaidCallHistory.length === 3) {
Q.fcall(this._handler.getPaidCallHistory, args.start, args.size, args.language)
.then(function(result) {
var result_obj = new CallService_getPaidCallHistory_result({success: result});
output.writeMessageBegin("getPaidCallHistory", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getPaidCallHistory_result(err);
output.writeMessageBegin("getPaidCallHistory", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPaidCallHistory", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getPaidCallHistory(args.start, args.size, args.language, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getPaidCallHistory_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getPaidCallHistory", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPaidCallHistory", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_sendPinCodeOperation = function(seqid, input, output) {
var args = new CallService_sendPinCodeOperation_args();
args.read(input);
input.readMessageEnd();
if (this._handler.sendPinCodeOperation.length === 1) {
Q.fcall(this._handler.sendPinCodeOperation, args.verifier)
.then(function(result) {
var result_obj = new CallService_sendPinCodeOperation_result({success: result});
output.writeMessageBegin("sendPinCodeOperation", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_sendPinCodeOperation_result(err);
output.writeMessageBegin("sendPinCodeOperation", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("sendPinCodeOperation", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.sendPinCodeOperation(args.verifier, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_sendPinCodeOperation_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("sendPinCodeOperation", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("sendPinCodeOperation", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_inviteIntoGroupCall = function(seqid, input, output) {
var args = new CallService_inviteIntoGroupCall_args();
args.read(input);
input.readMessageEnd();
if (this._handler.inviteIntoGroupCall.length === 3) {
Q.fcall(this._handler.inviteIntoGroupCall, args.chatMid, args.memberMids, args.mediaType)
.then(function(result) {
var result_obj = new CallService_inviteIntoGroupCall_result({success: result});
output.writeMessageBegin("inviteIntoGroupCall", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_inviteIntoGroupCall_result(err);
output.writeMessageBegin("inviteIntoGroupCall", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("inviteIntoGroupCall", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.inviteIntoGroupCall(args.chatMid, args.memberMids, args.mediaType, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_inviteIntoGroupCall_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("inviteIntoGroupCall", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("inviteIntoGroupCall", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getFriendMids = function(seqid, input, output) {
var args = new CallService_getFriendMids_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getFriendMids.length === 0) {
Q.fcall(this._handler.getFriendMids)
.then(function(result) {
var result_obj = new CallService_getFriendMids_result({success: result});
output.writeMessageBegin("getFriendMids", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getFriendMids_result(err);
output.writeMessageBegin("getFriendMids", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getFriendMids", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getFriendMids(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getFriendMids_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getFriendMids", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getFriendMids", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getMetaProfile = function(seqid, input, output) {
var args = new CallService_getMetaProfile_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getMetaProfile.length === 0) {
Q.fcall(this._handler.getMetaProfile)
.then(function(result) {
var result_obj = new CallService_getMetaProfile_result({success: result});
output.writeMessageBegin("getMetaProfile", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getMetaProfile_result(err);
output.writeMessageBegin("getMetaProfile", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getMetaProfile", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getMetaProfile(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getMetaProfile_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getMetaProfile", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getMetaProfile", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_sendMessageForChannel = function(seqid, input, output) {
var args = new CallService_sendMessageForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.sendMessageForChannel.length === 1) {
Q.fcall(this._handler.sendMessageForChannel, args.message)
.then(function(result) {
var result_obj = new CallService_sendMessageForChannel_result({success: result});
output.writeMessageBegin("sendMessageForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_sendMessageForChannel_result(err);
output.writeMessageBegin("sendMessageForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("sendMessageForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.sendMessageForChannel(args.message, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_sendMessageForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("sendMessageForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("sendMessageForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_activeBuddySubscriberCount = function(seqid, input, output) {
var args = new CallService_activeBuddySubscriberCount_args();
args.read(input);
input.readMessageEnd();
if (this._handler.activeBuddySubscriberCount.length === 0) {
Q.fcall(this._handler.activeBuddySubscriberCount)
.then(function(result) {
var result_obj = new CallService_activeBuddySubscriberCount_result({success: result});
output.writeMessageBegin("activeBuddySubscriberCount", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_activeBuddySubscriberCount_result(err);
output.writeMessageBegin("activeBuddySubscriberCount", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("activeBuddySubscriberCount", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.activeBuddySubscriberCount(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_activeBuddySubscriberCount_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("activeBuddySubscriberCount", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("activeBuddySubscriberCount", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getCallCreditPurchaseHistory = function(seqid, input, output) {
var args = new CallService_getCallCreditPurchaseHistory_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getCallCreditPurchaseHistory.length === 1) {
Q.fcall(this._handler.getCallCreditPurchaseHistory, args.request)
.then(function(result) {
var result_obj = new CallService_getCallCreditPurchaseHistory_result({success: result});
output.writeMessageBegin("getCallCreditPurchaseHistory", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getCallCreditPurchaseHistory_result(err);
output.writeMessageBegin("getCallCreditPurchaseHistory", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getCallCreditPurchaseHistory", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getCallCreditPurchaseHistory(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getCallCreditPurchaseHistory_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getCallCreditPurchaseHistory", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getCallCreditPurchaseHistory", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_isRoomMember = function(seqid, input, output) {
var args = new CallService_isRoomMember_args();
args.read(input);
input.readMessageEnd();
if (this._handler.isRoomMember.length === 1) {
Q.fcall(this._handler.isRoomMember, args.roomId)
.then(function(result) {
var result_obj = new CallService_isRoomMember_result({success: result});
output.writeMessageBegin("isRoomMember", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_isRoomMember_result(err);
output.writeMessageBegin("isRoomMember", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("isRoomMember", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.isRoomMember(args.roomId, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_isRoomMember_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("isRoomMember", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("isRoomMember", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_sendSystemOAMessage = function(seqid, input, output) {
var args = new CallService_sendSystemOAMessage_args();
args.read(input);
input.readMessageEnd();
if (this._handler.sendSystemOAMessage.length === 1) {
Q.fcall(this._handler.sendSystemOAMessage, args.message)
.then(function(result) {
var result_obj = new CallService_sendSystemOAMessage_result({success: result});
output.writeMessageBegin("sendSystemOAMessage", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_sendSystemOAMessage_result(err);
output.writeMessageBegin("sendSystemOAMessage", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("sendSystemOAMessage", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.sendSystemOAMessage(args.message, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_sendSystemOAMessage_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("sendSystemOAMessage", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("sendSystemOAMessage", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_acquirePaidCallRoute = function(seqid, input, output) {
var args = new CallService_acquirePaidCallRoute_args();
args.read(input);
input.readMessageEnd();
if (this._handler.acquirePaidCallRoute.length === 7) {
Q.fcall(this._handler.acquirePaidCallRoute, args.paidCallType, args.dialedNumber, args.language, args.networkCode, args.disableCallerId, args.referer, args.adSessionId)
.then(function(result) {
var result_obj = new CallService_acquirePaidCallRoute_result({success: result});
output.writeMessageBegin("acquirePaidCallRoute", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_acquirePaidCallRoute_result(err);
output.writeMessageBegin("acquirePaidCallRoute", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("acquirePaidCallRoute", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.acquirePaidCallRoute(args.paidCallType, args.dialedNumber, args.language, args.networkCode, args.disableCallerId, args.referer, args.adSessionId, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_acquirePaidCallRoute_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("acquirePaidCallRoute", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("acquirePaidCallRoute", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getGroupsForChannel = function(seqid, input, output) {
var args = new CallService_getGroupsForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getGroupsForChannel.length === 1) {
Q.fcall(this._handler.getGroupsForChannel, args.groupIds)
.then(function(result) {
var result_obj = new CallService_getGroupsForChannel_result({success: result});
output.writeMessageBegin("getGroupsForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getGroupsForChannel_result(err);
output.writeMessageBegin("getGroupsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getGroupsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getGroupsForChannel(args.groupIds, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getGroupsForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getGroupsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getGroupsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getUserCreateTime = function(seqid, input, output) {
var args = new CallService_getUserCreateTime_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getUserCreateTime.length === 0) {
Q.fcall(this._handler.getUserCreateTime)
.then(function(result) {
var result_obj = new CallService_getUserCreateTime_result({success: result});
output.writeMessageBegin("getUserCreateTime", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getUserCreateTime_result(err);
output.writeMessageBegin("getUserCreateTime", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserCreateTime", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getUserCreateTime(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getUserCreateTime_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getUserCreateTime", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserCreateTime", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_registerChannelCP = function(seqid, input, output) {
var args = new CallService_registerChannelCP_args();
args.read(input);
input.readMessageEnd();
if (this._handler.registerChannelCP.length === 2) {
Q.fcall(this._handler.registerChannelCP, args.cpId, args.registerPassword)
.then(function(result) {
var result_obj = new CallService_registerChannelCP_result({success: result});
output.writeMessageBegin("registerChannelCP", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_registerChannelCP_result(err);
output.writeMessageBegin("registerChannelCP", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("registerChannelCP", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.registerChannelCP(args.cpId, args.registerPassword, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_registerChannelCP_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("registerChannelCP", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("registerChannelCP", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_reserveCallCreditPurchase = function(seqid, input, output) {
var args = new CallService_reserveCallCreditPurchase_args();
args.read(input);
input.readMessageEnd();
if (this._handler.reserveCallCreditPurchase.length === 1) {
Q.fcall(this._handler.reserveCallCreditPurchase, args.request)
.then(function(result) {
var result_obj = new CallService_reserveCallCreditPurchase_result({success: result});
output.writeMessageBegin("reserveCallCreditPurchase", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_reserveCallCreditPurchase_result(err);
output.writeMessageBegin("reserveCallCreditPurchase", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("reserveCallCreditPurchase", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.reserveCallCreditPurchase(args.request, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_reserveCallCreditPurchase_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("reserveCallCreditPurchase", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("reserveCallCreditPurchase", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_acquirePaidCallCurrencyExchangeRate = function(seqid, input, output) {
var args = new CallService_acquirePaidCallCurrencyExchangeRate_args();
args.read(input);
input.readMessageEnd();
if (this._handler.acquirePaidCallCurrencyExchangeRate.length === 1) {
Q.fcall(this._handler.acquirePaidCallCurrencyExchangeRate, args.language)
.then(function(result) {
var result_obj = new CallService_acquirePaidCallCurrencyExchangeRate_result({success: result});
output.writeMessageBegin("acquirePaidCallCurrencyExchangeRate", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_acquirePaidCallCurrencyExchangeRate_result(err);
output.writeMessageBegin("acquirePaidCallCurrencyExchangeRate", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("acquirePaidCallCurrencyExchangeRate", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.acquirePaidCallCurrencyExchangeRate(args.language, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_acquirePaidCallCurrencyExchangeRate_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("acquirePaidCallCurrencyExchangeRate", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("acquirePaidCallCurrencyExchangeRate", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getRoomMemberMidsForAppPlatform = function(seqid, input, output) {
var args = new CallService_getRoomMemberMidsForAppPlatform_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getRoomMemberMidsForAppPlatform.length === 1) {
Q.fcall(this._handler.getRoomMemberMidsForAppPlatform, args.roomId)
.then(function(result) {
var result_obj = new CallService_getRoomMemberMidsForAppPlatform_result({success: result});
output.writeMessageBegin("getRoomMemberMidsForAppPlatform", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getRoomMemberMidsForAppPlatform_result(err);
output.writeMessageBegin("getRoomMemberMidsForAppPlatform", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getRoomMemberMidsForAppPlatform", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getRoomMemberMidsForAppPlatform(args.roomId, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getRoomMemberMidsForAppPlatform_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getRoomMemberMidsForAppPlatform", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getRoomMemberMidsForAppPlatform", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getPaidCallBalanceList = function(seqid, input, output) {
var args = new CallService_getPaidCallBalanceList_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getPaidCallBalanceList.length === 1) {
Q.fcall(this._handler.getPaidCallBalanceList, args.language)
.then(function(result) {
var result_obj = new CallService_getPaidCallBalanceList_result({success: result});
output.writeMessageBegin("getPaidCallBalanceList", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getPaidCallBalanceList_result(err);
output.writeMessageBegin("getPaidCallBalanceList", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPaidCallBalanceList", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getPaidCallBalanceList(args.language, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getPaidCallBalanceList_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getPaidCallBalanceList", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPaidCallBalanceList", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getPersonalInfos = function(seqid, input, output) {
var args = new CallService_getPersonalInfos_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getPersonalInfos.length === 1) {
Q.fcall(this._handler.getPersonalInfos, args.requiredPersonalInfos)
.then(function(result) {
var result_obj = new CallService_getPersonalInfos_result({success: result});
output.writeMessageBegin("getPersonalInfos", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getPersonalInfos_result(err);
output.writeMessageBegin("getPersonalInfos", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPersonalInfos", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getPersonalInfos(args.requiredPersonalInfos, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getPersonalInfos_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getPersonalInfos", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPersonalInfos", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getPrimaryClientsForChannel = function(seqid, input, output) {
var args = new CallService_getPrimaryClientsForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getPrimaryClientsForChannel.length === 1) {
Q.fcall(this._handler.getPrimaryClientsForChannel, args.userMids)
.then(function(result) {
var result_obj = new CallService_getPrimaryClientsForChannel_result({success: result});
output.writeMessageBegin("getPrimaryClientsForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getPrimaryClientsForChannel_result(err);
output.writeMessageBegin("getPrimaryClientsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPrimaryClientsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getPrimaryClientsForChannel(args.userMids, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getPrimaryClientsForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getPrimaryClientsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPrimaryClientsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_addBuddyToContact = function(seqid, input, output) {
var args = new CallService_addBuddyToContact_args();
args.read(input);
input.readMessageEnd();
if (this._handler.addBuddyToContact.length === 1) {
Q.fcall(this._handler.addBuddyToContact, args.buddyMid)
.then(function(result) {
var result_obj = new CallService_addBuddyToContact_result({success: result});
output.writeMessageBegin("addBuddyToContact", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_addBuddyToContact_result(err);
output.writeMessageBegin("addBuddyToContact", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("addBuddyToContact", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.addBuddyToContact(args.buddyMid, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_addBuddyToContact_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("addBuddyToContact", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("addBuddyToContact", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getGroupMemberMidsForAppPlatform = function(seqid, input, output) {
var args = new CallService_getGroupMemberMidsForAppPlatform_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getGroupMemberMidsForAppPlatform.length === 1) {
Q.fcall(this._handler.getGroupMemberMidsForAppPlatform, args.groupId)
.then(function(result) {
var result_obj = new CallService_getGroupMemberMidsForAppPlatform_result({success: result});
output.writeMessageBegin("getGroupMemberMidsForAppPlatform", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getGroupMemberMidsForAppPlatform_result(err);
output.writeMessageBegin("getGroupMemberMidsForAppPlatform", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getGroupMemberMidsForAppPlatform", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getGroupMemberMidsForAppPlatform(args.groupId, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getGroupMemberMidsForAppPlatform_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getGroupMemberMidsForAppPlatform", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getGroupMemberMidsForAppPlatform", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getUserLanguage = function(seqid, input, output) {
var args = new CallService_getUserLanguage_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getUserLanguage.length === 0) {
Q.fcall(this._handler.getUserLanguage)
.then(function(result) {
var result_obj = new CallService_getUserLanguage_result({success: result});
output.writeMessageBegin("getUserLanguage", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getUserLanguage_result(err);
output.writeMessageBegin("getUserLanguage", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserLanguage", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getUserLanguage(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getUserLanguage_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getUserLanguage", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserLanguage", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_lookupPaidCall = function(seqid, input, output) {
var args = new CallService_lookupPaidCall_args();
args.read(input);
input.readMessageEnd();
if (this._handler.lookupPaidCall.length === 3) {
Q.fcall(this._handler.lookupPaidCall, args.dialedNumber, args.language, args.referer)
.then(function(result) {
var result_obj = new CallService_lookupPaidCall_result({success: result});
output.writeMessageBegin("lookupPaidCall", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_lookupPaidCall_result(err);
output.writeMessageBegin("lookupPaidCall", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("lookupPaidCall", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.lookupPaidCall(args.dialedNumber, args.language, args.referer, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_lookupPaidCall_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("lookupPaidCall", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("lookupPaidCall", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getExtendedProfile = function(seqid, input, output) {
var args = new CallService_getExtendedProfile_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getExtendedProfile.length === 0) {
Q.fcall(this._handler.getExtendedProfile)
.then(function(result) {
var result_obj = new CallService_getExtendedProfile_result({success: result});
output.writeMessageBegin("getExtendedProfile", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getExtendedProfile_result(err);
output.writeMessageBegin("getExtendedProfile", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getExtendedProfile", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getExtendedProfile(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getExtendedProfile_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getExtendedProfile", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getExtendedProfile", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getReverseCompactContacts = function(seqid, input, output) {
var args = new CallService_getReverseCompactContacts_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getReverseCompactContacts.length === 1) {
Q.fcall(this._handler.getReverseCompactContacts, args.ids)
.then(function(result) {
var result_obj = new CallService_getReverseCompactContacts_result({success: result});
output.writeMessageBegin("getReverseCompactContacts", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getReverseCompactContacts_result(err);
output.writeMessageBegin("getReverseCompactContacts", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getReverseCompactContacts", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getReverseCompactContacts(args.ids, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getReverseCompactContacts_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getReverseCompactContacts", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getReverseCompactContacts", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getPaidCallAdStatus = function(seqid, input, output) {
var args = new CallService_getPaidCallAdStatus_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getPaidCallAdStatus.length === 0) {
Q.fcall(this._handler.getPaidCallAdStatus)
.then(function(result) {
var result_obj = new CallService_getPaidCallAdStatus_result({success: result});
output.writeMessageBegin("getPaidCallAdStatus", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getPaidCallAdStatus_result(err);
output.writeMessageBegin("getPaidCallAdStatus", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPaidCallAdStatus", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getPaidCallAdStatus(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getPaidCallAdStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getPaidCallAdStatus", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getPaidCallAdStatus", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_findContactByUseridWithoutAbuseBlockForChannel = function(seqid, input, output) {
var args = new CallService_findContactByUseridWithoutAbuseBlockForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.findContactByUseridWithoutAbuseBlockForChannel.length === 1) {
Q.fcall(this._handler.findContactByUseridWithoutAbuseBlockForChannel, args.userid)
.then(function(result) {
var result_obj = new CallService_findContactByUseridWithoutAbuseBlockForChannel_result({success: result});
output.writeMessageBegin("findContactByUseridWithoutAbuseBlockForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_findContactByUseridWithoutAbuseBlockForChannel_result(err);
output.writeMessageBegin("findContactByUseridWithoutAbuseBlockForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("findContactByUseridWithoutAbuseBlockForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.findContactByUseridWithoutAbuseBlockForChannel(args.userid, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_findContactByUseridWithoutAbuseBlockForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("findContactByUseridWithoutAbuseBlockForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("findContactByUseridWithoutAbuseBlockForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getGroupMemberMids = function(seqid, input, output) {
var args = new CallService_getGroupMemberMids_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getGroupMemberMids.length === 1) {
Q.fcall(this._handler.getGroupMemberMids, args.groupId)
.then(function(result) {
var result_obj = new CallService_getGroupMemberMids_result({success: result});
output.writeMessageBegin("getGroupMemberMids", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getGroupMemberMids_result(err);
output.writeMessageBegin("getGroupMemberMids", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getGroupMemberMids", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getGroupMemberMids(args.groupId, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getGroupMemberMids_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getGroupMemberMids", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getGroupMemberMids", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_sendMessageWithoutRelationship = function(seqid, input, output) {
var args = new CallService_sendMessageWithoutRelationship_args();
args.read(input);
input.readMessageEnd();
if (this._handler.sendMessageWithoutRelationship.length === 1) {
Q.fcall(this._handler.sendMessageWithoutRelationship, args.message)
.then(function(result) {
var result_obj = new CallService_sendMessageWithoutRelationship_result({success: result});
output.writeMessageBegin("sendMessageWithoutRelationship", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_sendMessageWithoutRelationship_result(err);
output.writeMessageBegin("sendMessageWithoutRelationship", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("sendMessageWithoutRelationship", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.sendMessageWithoutRelationship(args.message, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_sendMessageWithoutRelationship_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("sendMessageWithoutRelationship", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("sendMessageWithoutRelationship", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_displayBuddySubscriberCountInBulk = function(seqid, input, output) {
var args = new CallService_displayBuddySubscriberCountInBulk_args();
args.read(input);
input.readMessageEnd();
if (this._handler.displayBuddySubscriberCountInBulk.length === 1) {
Q.fcall(this._handler.displayBuddySubscriberCountInBulk, args.mids)
.then(function(result) {
var result_obj = new CallService_displayBuddySubscriberCountInBulk_result({success: result});
output.writeMessageBegin("displayBuddySubscriberCountInBulk", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_displayBuddySubscriberCountInBulk_result(err);
output.writeMessageBegin("displayBuddySubscriberCountInBulk", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("displayBuddySubscriberCountInBulk", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.displayBuddySubscriberCountInBulk(args.mids, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_displayBuddySubscriberCountInBulk_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("displayBuddySubscriberCountInBulk", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("displayBuddySubscriberCountInBulk", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_lookupRoomMembers = function(seqid, input, output) {
var args = new CallService_lookupRoomMembers_args();
args.read(input);
input.readMessageEnd();
if (this._handler.lookupRoomMembers.length === 2) {
Q.fcall(this._handler.lookupRoomMembers, args.roomId, args.mids)
.then(function(result) {
var result_obj = new CallService_lookupRoomMembers_result({success: result});
output.writeMessageBegin("lookupRoomMembers", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_lookupRoomMembers_result(err);
output.writeMessageBegin("lookupRoomMembers", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("lookupRoomMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.lookupRoomMembers(args.roomId, args.mids, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_lookupRoomMembers_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("lookupRoomMembers", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("lookupRoomMembers", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getFavoriteMidsForChannel = function(seqid, input, output) {
var args = new CallService_getFavoriteMidsForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getFavoriteMidsForChannel.length === 0) {
Q.fcall(this._handler.getFavoriteMidsForChannel)
.then(function(result) {
var result_obj = new CallService_getFavoriteMidsForChannel_result({success: result});
output.writeMessageBegin("getFavoriteMidsForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getFavoriteMidsForChannel_result(err);
output.writeMessageBegin("getFavoriteMidsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getFavoriteMidsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getFavoriteMidsForChannel(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getFavoriteMidsForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getFavoriteMidsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getFavoriteMidsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getAllContactIdsForChannel = function(seqid, input, output) {
var args = new CallService_getAllContactIdsForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getAllContactIdsForChannel.length === 0) {
Q.fcall(this._handler.getAllContactIdsForChannel)
.then(function(result) {
var result_obj = new CallService_getAllContactIdsForChannel_result({success: result});
output.writeMessageBegin("getAllContactIdsForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getAllContactIdsForChannel_result(err);
output.writeMessageBegin("getAllContactIdsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getAllContactIdsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getAllContactIdsForChannel(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getAllContactIdsForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getAllContactIdsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getAllContactIdsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_displayBuddySubscriberCount = function(seqid, input, output) {
var args = new CallService_displayBuddySubscriberCount_args();
args.read(input);
input.readMessageEnd();
if (this._handler.displayBuddySubscriberCount.length === 0) {
Q.fcall(this._handler.displayBuddySubscriberCount)
.then(function(result) {
var result_obj = new CallService_displayBuddySubscriberCount_result({success: result});
output.writeMessageBegin("displayBuddySubscriberCount", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_displayBuddySubscriberCount_result(err);
output.writeMessageBegin("displayBuddySubscriberCount", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("displayBuddySubscriberCount", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.displayBuddySubscriberCount(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_displayBuddySubscriberCount_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("displayBuddySubscriberCount", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("displayBuddySubscriberCount", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getProfileForChannel = function(seqid, input, output) {
var args = new CallService_getProfileForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getProfileForChannel.length === 0) {
Q.fcall(this._handler.getProfileForChannel)
.then(function(result) {
var result_obj = new CallService_getProfileForChannel_result({success: result});
output.writeMessageBegin("getProfileForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getProfileForChannel_result(err);
output.writeMessageBegin("getProfileForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getProfileForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getProfileForChannel(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getProfileForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getProfileForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getProfileForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getUserTickets = function(seqid, input, output) {
var args = new CallService_getUserTickets_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getUserTickets.length === 1) {
Q.fcall(this._handler.getUserTickets, args.userMids)
.then(function(result) {
var result_obj = new CallService_getUserTickets_result({success: result});
output.writeMessageBegin("getUserTickets", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getUserTickets_result(err);
output.writeMessageBegin("getUserTickets", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserTickets", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getUserTickets(args.userMids, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getUserTickets_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getUserTickets", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserTickets", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getOAFriendMids = function(seqid, input, output) {
var args = new CallService_getOAFriendMids_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getOAFriendMids.length === 0) {
Q.fcall(this._handler.getOAFriendMids)
.then(function(result) {
var result_obj = new CallService_getOAFriendMids_result({success: result});
output.writeMessageBegin("getOAFriendMids", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getOAFriendMids_result(err);
output.writeMessageBegin("getOAFriendMids", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getOAFriendMids", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getOAFriendMids(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getOAFriendMids_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getOAFriendMids", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getOAFriendMids", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_searchPaidCallUserRate = function(seqid, input, output) {
var args = new CallService_searchPaidCallUserRate_args();
args.read(input);
input.readMessageEnd();
if (this._handler.searchPaidCallUserRate.length === 2) {
Q.fcall(this._handler.searchPaidCallUserRate, args.countryCode, args.language)
.then(function(result) {
var result_obj = new CallService_searchPaidCallUserRate_result({success: result});
output.writeMessageBegin("searchPaidCallUserRate", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_searchPaidCallUserRate_result(err);
output.writeMessageBegin("searchPaidCallUserRate", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("searchPaidCallUserRate", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.searchPaidCallUserRate(args.countryCode, args.language, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_searchPaidCallUserRate_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("searchPaidCallUserRate", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("searchPaidCallUserRate", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getJoinedGroupIdsForChannel = function(seqid, input, output) {
var args = new CallService_getJoinedGroupIdsForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getJoinedGroupIdsForChannel.length === 0) {
Q.fcall(this._handler.getJoinedGroupIdsForChannel)
.then(function(result) {
var result_obj = new CallService_getJoinedGroupIdsForChannel_result({success: result});
output.writeMessageBegin("getJoinedGroupIdsForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getJoinedGroupIdsForChannel_result(err);
output.writeMessageBegin("getJoinedGroupIdsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getJoinedGroupIdsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getJoinedGroupIdsForChannel(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getJoinedGroupIdsForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getJoinedGroupIdsForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getJoinedGroupIdsForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_acquireGroupCallRoute = function(seqid, input, output) {
var args = new CallService_acquireGroupCallRoute_args();
args.read(input);
input.readMessageEnd();
if (this._handler.acquireGroupCallRoute.length === 2) {
Q.fcall(this._handler.acquireGroupCallRoute, args.chatMid, args.mediaType)
.then(function(result) {
var result_obj = new CallService_acquireGroupCallRoute_result({success: result});
output.writeMessageBegin("acquireGroupCallRoute", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_acquireGroupCallRoute_result(err);
output.writeMessageBegin("acquireGroupCallRoute", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("acquireGroupCallRoute", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.acquireGroupCallRoute(args.chatMid, args.mediaType, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_acquireGroupCallRoute_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("acquireGroupCallRoute", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("acquireGroupCallRoute", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getUserMidsWhoAddedMe = function(seqid, input, output) {
var args = new CallService_getUserMidsWhoAddedMe_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getUserMidsWhoAddedMe.length === 0) {
Q.fcall(this._handler.getUserMidsWhoAddedMe)
.then(function(result) {
var result_obj = new CallService_getUserMidsWhoAddedMe_result({success: result});
output.writeMessageBegin("getUserMidsWhoAddedMe", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getUserMidsWhoAddedMe_result(err);
output.writeMessageBegin("getUserMidsWhoAddedMe", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserMidsWhoAddedMe", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getUserMidsWhoAddedMe(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getUserMidsWhoAddedMe_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getUserMidsWhoAddedMe", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserMidsWhoAddedMe", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getIdentityCredential = function(seqid, input, output) {
var args = new CallService_getIdentityCredential_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getIdentityCredential.length === 0) {
Q.fcall(this._handler.getIdentityCredential)
.then(function(result) {
var result_obj = new CallService_getIdentityCredential_result({success: result});
output.writeMessageBegin("getIdentityCredential", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getIdentityCredential_result(err);
output.writeMessageBegin("getIdentityCredential", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getIdentityCredential", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getIdentityCredential(function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getIdentityCredential_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getIdentityCredential", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getIdentityCredential", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_addOperationForChannel = function(seqid, input, output) {
var args = new CallService_addOperationForChannel_args();
args.read(input);
input.readMessageEnd();
if (this._handler.addOperationForChannel.length === 4) {
Q.fcall(this._handler.addOperationForChannel, args.opType, args.param1, args.param2, args.param3)
.then(function(result) {
var result_obj = new CallService_addOperationForChannel_result({success: result});
output.writeMessageBegin("addOperationForChannel", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_addOperationForChannel_result(err);
output.writeMessageBegin("addOperationForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("addOperationForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.addOperationForChannel(args.opType, args.param1, args.param2, args.param3, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_addOperationForChannel_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("addOperationForChannel", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("addOperationForChannel", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getSimpleChannelContacts = function(seqid, input, output) {
var args = new CallService_getSimpleChannelContacts_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getSimpleChannelContacts.length === 2) {
Q.fcall(this._handler.getSimpleChannelContacts, args.ids, args.statusSticonFallbackDisabled)
.then(function(result) {
var result_obj = new CallService_getSimpleChannelContacts_result({success: result});
output.writeMessageBegin("getSimpleChannelContacts", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getSimpleChannelContacts_result(err);
output.writeMessageBegin("getSimpleChannelContacts", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSimpleChannelContacts", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getSimpleChannelContacts(args.ids, args.statusSticonFallbackDisabled, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getSimpleChannelContacts_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getSimpleChannelContacts", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getSimpleChannelContacts", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};
CallServiceProcessor.prototype.process_getUserLastSentMessageTimeStamp = function(seqid, input, output) {
var args = new CallService_getUserLastSentMessageTimeStamp_args();
args.read(input);
input.readMessageEnd();
if (this._handler.getUserLastSentMessageTimeStamp.length === 1) {
Q.fcall(this._handler.getUserLastSentMessageTimeStamp, args.mid)
.then(function(result) {
var result_obj = new CallService_getUserLastSentMessageTimeStamp_result({success: result});
output.writeMessageBegin("getUserLastSentMessageTimeStamp", Thrift.MessageType.REPLY, seqid);
result_obj.write(output);
output.writeMessageEnd();
output.flush();
}, function (err) {
var result;
if (err instanceof ttypes.TalkException) {
result = new CallService_getUserLastSentMessageTimeStamp_result(err);
output.writeMessageBegin("getUserLastSentMessageTimeStamp", Thrift.MessageType.REPLY, seqid);
} else {
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserLastSentMessageTimeStamp", Thrift.MessageType.EXCEPTION, seqid);
}
result.write(output);
output.writeMessageEnd();
output.flush();
});
} else {
this._handler.getUserLastSentMessageTimeStamp(args.mid, function (err, result) {
var result_obj;
if ((err === null || typeof err === 'undefined') || err instanceof ttypes.TalkException) {
result_obj = new CallService_getUserLastSentMessageTimeStamp_result((err !== null || typeof err === 'undefined') ? err : {success: result});
output.writeMessageBegin("getUserLastSentMessageTimeStamp", Thrift.MessageType.REPLY, seqid);
} else {
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
output.writeMessageBegin("getUserLastSentMessageTimeStamp", Thrift.MessageType.EXCEPTION, seqid);
}
result_obj.write(output);
output.writeMessageEnd();
output.flush();
});
}
};