📄 smppencoder.java
字号:
// FrontEnd Plus for JAD
// DeCompiled : smppEncoder.class
package sms;
import utils.*;
// Referenced classes of package sms:
// Message, Customer, smDL, param,
// messageId, smppHeader, Address, listDLResponse,
// queryAllResponse, Binding, DLName, modDL,
// viewDLresponse, AddressError, queryAll, Member
class smppEncoder extends encoder
{
public void cancel(Message message)
throws encoderException
{
String s = null;
try
{
if(message == null)
throw new encoderException("missing.cancel.");
s = "service.";
if(message.service != null)
asciiz(message.service, 6);
else
int8(0);
s = "id.";
if(message.id != null)
asciiz(message.id, 9);
else
int8(0);
s = "from.";
Address(message.from);
s = "to.";
Address(message.to);
return;
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
public void modifyCustomer(Customer customer)
throws encoderException
{
String s = null;
try
{
if(customer == null)
throw new encoderException("missing.modifyCustomer.");
s = "id.";
if(customer.id != null)
asciiz(customer.id, 21);
else
int8(0);
s = "name.";
if(customer.name != null)
asciiz(customer.name, 21);
else
int8(0);
s = "streetAddress.";
if(customer.streetAddress != null)
asciiz(customer.streetAddress, 31);
else
int8(0);
s = "smsAddress.";
Address(customer.smsAddress);
s = "serviceLevel.";
int32(customer.serviceLevel);
s = "smsAllowed.";
int8(!customer.smsAllowed ? 0 : 1);
s = "ocos.";
int32(customer.ocos);
s = "tcos.";
int32(customer.tcos);
s = "password.";
if(customer.password != null)
{
asciiz(customer.password, 9);
return;
} else
{
int8(0);
return;
}
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
public void submitResponse(Message message)
throws encoderException
{
String s = null;
try
{
if(message == null)
throw new encoderException("missing.submitResponse.");
s = "id.";
if(message.id != null)
{
asciiz(message.id, 9);
return;
} else
{
int8(0);
return;
}
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
public void addDL(smDL smdl)
throws encoderException
{
String s = null;
try
{
if(smdl == null)
throw new encoderException("missing.addDL.");
s = "source.";
Address(smdl.source);
s = "name.";
if(smdl.name != null)
{
asciiz(smdl.name, 21);
return;
} else
{
int8(0);
return;
}
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
public void paramGet(param param1)
throws encoderException
{
String s = null;
try
{
if(param1 == null)
throw new encoderException("missing.paramGet.");
s = "name.";
if(param1.name != null)
{
asciiz(param1.name, 32);
return;
} else
{
int8(0);
return;
}
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
public void messageId(messageId messageid)
throws encoderException
{
String s = null;
try
{
if(messageid == null)
throw new encoderException("missing.messageId.");
s = "id.";
if(messageid.id != null)
{
asciiz(messageid.id, 9);
return;
} else
{
int8(0);
return;
}
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
public void viewDL(smDL smdl)
throws encoderException
{
String s = null;
try
{
if(smdl == null)
throw new encoderException("missing.viewDL.");
s = "source.";
Address(smdl.source);
s = "name.";
if(smdl.name != null)
{
asciiz(smdl.name, 21);
return;
} else
{
int8(0);
return;
}
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
public void smppHeader(smppHeader smppheader)
throws encoderException
{
String s = null;
try
{
if(smppheader == null)
{
throw new encoderException("missing.smppHeader.");
} else
{
s = "length.";
int32(smppheader.length);
s = "command.";
int32(smppheader.command);
s = "status.";
int32(smppheader.status);
s = "sequence.";
int32(smppheader.sequence);
return;
}
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
public void Address(Address address)
throws encoderException
{
String s = null;
try
{
if(address == null)
throw new encoderException("missing.Address.");
s = "ton.";
int8(address.ton);
s = "npi.";
int8(address.npi);
s = "msisdn.";
if(address.msisdn != null)
{
asciiz(address.msisdn, 21);
return;
} else
{
int8(0);
return;
}
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
smppEncoder()
{
}
public void listDLResponse(listDLResponse listdlresponse)
throws encoderException
{
String s = null;
try
{
if(listdlresponse == null)
throw new encoderException("missing.listDLResponse.");
s = "names_len.";
int8(listdlresponse.names_len);
s = "names.";
for(int i = 0; i < lenfix(listdlresponse.names_len); i++)
DLName(listdlresponse.names[i]);
return;
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
public void queryAllResponse(queryAllResponse queryallresponse)
throws encoderException
{
String s = null;
try
{
if(queryallresponse == null)
throw new encoderException("missing.queryAllResponse.");
s = "ids_len.";
int8(queryallresponse.ids_len);
s = "ids.";
for(int i = 0; i < lenfix(queryallresponse.ids_len); i++)
messageId(queryallresponse.ids[i]);
return;
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
public void paramRet(param param1)
throws encoderException
{
String s = null;
try
{
if(param1 == null)
throw new encoderException("missing.paramRet.");
s = "value.";
if(param1.value != null)
{
asciiz(param1.value, 101);
return;
} else
{
int8(0);
return;
}
}
catch(encoderException encoderexception)
{
if(s != null)
throw new encoderException(encoderexception + s);
else
throw encoderexception;
}
}
public void bind(Binding binding)
throws encoderException
{
String s = null;
try
{
if(binding == null)
throw new encoderException("missing.bind.");
s = "sysid.";
if(binding.sysid != null)
asciiz(binding.sysid, 16);
else
int8(0);
s = "password.";
if(binding.password != null)
asciiz(binding.password, 9);
else
int8(0);
s = "systype.";
if(binding.systype != null)
asciiz(binding.systype, 13);
else
int8(0);
s = "version.";
int8(binding.version);
s = "ton.";
int8(binding.ton);
s = "npi.";
int8(binding.npi);
s = "range.";
if(binding.range != null)
{
asciiz(binding.range, 41);
return;
} else
{
int8(0);
return;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -