org.tizen.injector.telephony.sms_1.0.0.201310291329

ier = formUtil.createText(localComposite2, "");
    Composite localComposite3 = formUtil.createExpandable(localComposite1, Messages.CellBroadcasting_12, 3);
    cmbLanguage = formUtil.createCombo(localComposite3);
    formUtil.addComboItem(cmbLanguage, LANGUAGE_LIST);
    formUtil.createLabel(localComposite3, Messages.CellBroadcasting_13);
    txtDCS = formUtil.createText(localComposite3, "");
    Composite localComposite4 = formUtil.createExpandable(localComposite1, Messages.CellBroadcasting_15, 4);
    formUtil.createLabel(localComposite4, Messages.CellBroadcasting_16);
    cmbGeographical = formUtil.createCombo(localComposite4);
    formUtil.addComboItem(cmbGeographical, GEOGRAPHICAL_LIST);
    formUtil.createLabel(localComposite4, Messages.CellBroadcasting_17);
    txtUpdateNumber = formUtil.createText(localComposite4, "");
    Composite localComposite5 = formUtil.createExpandable(localComposite1, Messages.CellBroadcasting_19, 2);
    formUtil.createLabel(localComposite5, Messages.CellBroadcasting_20);
    txtPageNumber = formUtil.createText(localComposite5, "");
    Composite localComposite6 = formUtil.createExpandable(localComposite1, Messages.CellBroadcasting_22);
    txtMessage = formUtil.createText(localComposite6, "");
    formUtil.setWidth(txtMessage, 350);
    Composite localComposite7 = formUtil.createComposite(localComposite1);
    butSend = formUtil.createButton(localComposite7, Messages.CellBroadcasting_24, 8);
    butSend.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        super.widgetSelected(paramAnonymousSelectionEvent);
      }
    });
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.CellBroadcasting
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.page;

import org.eclipse.osgi.util.NLS;

public class Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.tizen.injector.telephony.sms.page.messages";
  public static String CellBroadcasting_0;
  public static String CellBroadcasting_1;
  public static String CellBroadcasting_10;
  public static String CellBroadcasting_12;
  public static String CellBroadcasting_13;
  public static String CellBroadcasting_15;
  public static String CellBroadcasting_16;
  public static String CellBroadcasting_17;
  public static String CellBroadcasting_19;
  public static String CellBroadcasting_2;
  public static String CellBroadcasting_20;
  public static String CellBroadcasting_22;
  public static String CellBroadcasting_24;
  public static String CellBroadcasting_3;
  public static String CellBroadcasting_8;
  public static String CellBroadcasting_9;
  public static String SMS_0;
  public static String SMS_1;
  public static String SMS_10;
  public static String SMS_11;
  public static String SMS_12;
  public static String SMS_13;
  public static String SMS_14;
  public static String SMS_15;
  public static String SMS_16;
  public static String SMS_17;
  public static String SMS_18;
  public static String SMS_19;
  public static String SMS_2;
  public static String SMS_20;
  public static String SMS_21;
  public static String SMS_22;
  public static String SMS_23;
  public static String SMS_24;
  public static String SMS_25;
  public static String SMS_26;
  public static String SMS_27;
  public static String SMS_28;
  public static String SMS_29;
  public static String SMS_3;
  public static String SMS_31;
  public static String SMS_35;
  public static String SMS_37;
  public static String SMS_38;
  public static String SMS_39;
  public static String SMS_4;
  public static String SMS_5;
  public static String SMS_6;
  public static String SMS_7;
  public static String SMS_8;
  public static String SMS_9;
  public static String MMS_0;
  public static String MMS_1;
  
  static
  {
    NLS.initializeMessages("org.tizen.injector.telephony.sms.page.messages", Messages.class);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.Messages
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.page;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;

class SMS$1
  extends SelectionAdapter
{
  SMS$1(SMS paramSMS) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    this$0.sendMsg(Boolean.valueOf(SMS.access$3(this$0).getSelection()));
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.SMS.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.page;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Text;

class SMS$2
  extends SelectionAdapter
{
  SMS$2(SMS paramSMS) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    if (SMS.access$3(this$0).getSelection()) {
      SMS.access$4(this$0).setEnabled(true);
    } else {
      SMS.access$4(this$0).setEnabled(false);
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.SMS.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.page;

import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.widgets.Text;

class SMS$3
  implements KeyListener
{
  SMS$3(SMS paramSMS) {}
  
  public void keyReleased(KeyEvent paramKeyEvent)
  {
    if (character == '-')
    {
      this$0.showDialog("You cannot use minus value.");
      SMS.access$4(this$0).setText("");
      return;
    }
    try
    {
      if (Integer.parseInt(SMS.access$4(this$0).getText()) > 65535)
      {
        this$0.showDialog("Port range : 0~65535");
        SMS.access$4(this$0).setText("");
        return;
      }
    }
    catch (NumberFormatException localNumberFormatException)
    {
      if (!SMS.access$4(this$0).getText().equals(""))
      {
        this$0.showDialog("Please input only number");
        SMS.access$4(this$0).setText("");
        return;
      }
    }
  }
  
  public void keyPressed(KeyEvent paramKeyEvent) {}
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.SMS.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.page;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class SMS$4
  extends SelectionAdapter
{
  SMS$4(SMS paramSMS) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    this$0.sendstatus();
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.SMS.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.page;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class SMS$5
  extends SelectionAdapter
{
  SMS$5(SMS paramSMS) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    this$0.sendstatusMMS();
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.SMS.5
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.page;

import org.tizen.injector.protocol.StructureGA;
import org.tizen.injector.telephony.sms.protocol.G04A01;

class SMS$6
  extends G04A01
{
  SMS$6(SMS paramSMS, byte[] paramArrayOfByte) {}
  
  protected void makeBody()
  {
    StructureGA localStructureGA = getBody();
    localStructureGA.addByteArrayItem("DATA", val$data.length);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.SMS.6
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.page;

import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.tizen.injector.socket.TelephonySocket;

class SMS$7
  implements IRunnableWithProgress
{
  SMS$7(SMS paramSMS) {}
  
  public void run(IProgressMonitor paramIProgressMonitor)
    throws InvocationTargetException, InterruptedException
  {
    for (this$0.sleepCnt = 0; this$0.sleepCnt <= 100; this$0.sleepCnt += 1)
    {
      this$0.isMsgReceived = TelephonySocket.getInstance().getMsgReceived();
      if (this$0.isMsgReceived) {
        break;
      }
      Thread.sleep(100L);
    }
    TelephonySocket.getInstance().setMsgReceived(false);
    this$0.isMsgReceived = false;
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.SMS.7
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.page;

import org.tizen.injector.protocol.StructureGA;
import org.tizen.injector.telephony.sms.protocol.G04A01;

class SMS$8
  extends G04A01
{
  SMS$8(SMS paramSMS, byte[] paramArrayOfByte) {}
  
  protected void makeBody()
  {
    StructureGA localStructureGA = getBody();
    localStructureGA.addByteArrayItem("DATA", val$data.length);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.SMS.8
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.page;

import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.tizen.injector.protocol.AbstractGA;
import org.tizen.injector.protocol.StructureGA;
import org.tizen.injector.receiver.AbstractInjectorReceiver;
import org.tizen.injector.telephony.sms.encription.DecodeMsg;
import org.tizen.injector.telephony.sms.encription.SmsAddressInfo;
import org.tizen.injector.telephony.sms.encription.TPDU_SMS_SUBMIT;
import org.tizen.injector.telephony.sms.protocol.G04A01;

public class SMS$SimDBReceiver
  extends AbstractInjectorReceiver
{
  public SMS$SimDBReceiver(SMS paramSMS) {}
  
  public void run(AbstractGA paramAbstractGA)
  {
    StructureGA localStructureGA = paramAbstractGA.getBody();
    TPDU_SMS_SUBMIT localTPDU_SMS_SUBMIT = new TPDU_SMS_SUBMIT();
    byte[] arrayOfByte = localStructureGA.getByteArray("DATA");
    char[] arrayOfChar = SMS.access$0(this$0, arrayOfByte, 3, arrayOfByte.length - 3);
    DecodeMsg localDecodeMsg = new DecodeMsg();
    localDecodeMsg.DecodeSmsSubmitTpdu(localTPDU_SMS_SUBMIT, 500, arrayOfChar);
    SMS.access$1(this$0).setText(String.valueOf(destAddr.diallingNum).trim());
    if (DecodeMsg.relayedsms)
    {
      SMS.access$2(this$0).setText(String.valueOf(DecodeMsg.smsbuffer).trim());
      DecodeMsg.relay_cnt -= 1;
      if (DecodeMsg.relay_cnt == 0)
      {
        for (int i = 0; i < DecodeMsg.smsbuffer_index; i++) {
          DecodeMsg.smsbuffer[i] = '\000';
        }
        DecodeMsg.smsbuffer_index = 0;
        DecodeMsg.relayedsms = false;
      }
    }
    else
    {
      SMS.access$2(this$0).setText(String.valueOf(userData).trim());
    }
    if (DecodeMsg.deliveryReport) {
      if (DecodeMsg.relayedsms)
      {
        if (udl < 255) {
          this$0.sendDeliveryReport();
        }
      }
      else {
        this$0.sendDeliveryReport();
      }
    }
  }
  
  public AbstractGA createTransferObject()
  {
    return new G04A01();
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.SMS.SimDBReceiver
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.page;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.tizen.common.connection.ConnectionPlugin;
import org.tizen.common.connection.ConnectionPlugin.ISelectionListener;
import org.tizen.injector.InjectorDialog;
import org.tizen.injector.protocol.AbstractGA;
import org.tizen.injector.protocol.StructureGA;
import org.tizen.injector.provider.AbstractInjectorItem;
import org.tizen.injector.provider.AbstractInjectorPage;
import org.tizen.injector.receiver.AbstractInjectorReceiver;
import org.tizen.injector.socket.TelephonySocket;
import org.tizen.injector.telephony.call.TelephonyCall;
import org.tizen.injector.telephony.call.page.MOMTCall;
import org.tizen.injector.telephony.sms.encription.DecodeMsg;
import org.tizen.injector.telephony.sms.encription.EncodeMsg;
import org.tizen.injector.telephony.sms.encription.SMS_USERDATA;
import org.tizen.injector.telephony.sms.encription.SmsAddressInfo;
import org.tizen.injector.telephony.sms.encription.TPDU_SMS_DELIVER;
import org.tizen.injector.telephony.sms.encription.TPDU_SMS_SUBMIT;
import org.tizen.injector.telephony.sms.encription.TapiNetTextCodingScheme;
import org.tizen.injector.telephony.sms.encription.TmDateTime;
import org.tizen.injector.telephony.sms.protocol.G04A01;
import org.tizen.injector.telephony.sms.protocol.G04A05;
import org.tizen.injector.util.FormPageUtil;
import org.tizen.injector.view.InjectorView;
import org.tizen.sdblib.IDevice;
import org.tizen.sdblib.service.FileEntry;

public class SMS
  extends AbstractInjectorPage
  implements ConnectionPlugin.ISelectionListener
{
  private final String[] SENDING_STATUS_VALUE_SMS = { Messages.SMS_0, Messages.SMS_2 };
  private final String[] SENDING_STATUS_VALUE_MMS = { Messages.MMS_0, Messages.MMS_1 };
  private final String[] USE_SMSC_LIST = { "+821091111" };
  private final char[] SMSC_NUM = { '\b', '\002', '\001', '\000', '\t', '\001', '\001', '\001', '\001' };
  private final String[] ORIGINATING_ADDRESS_LIST = { "+821030014180" };
  private final String[] CLASS_TYPE_LIST = { Messages.SMS_11, Messages.SMS_12, Messages.SMS_15, Messages.SMS_16, Messages.SMS_17 };
  private Combo cmbSentStatusSendingStatus;
  private Combo cmbSentStatusMMSSendingStatus;
  private Button butSentStatusSet;
  private Combo cmbMobileTerminateUseSMSC;
  private Combo cmbMobileTerminateOriginatingAddress;
  private Combo cmbMobileTerminateClassType;
  private Button butMobileTerminateSMSCconfigured;
  private Button butMobileTerminateSendMsg;
  private Button butMobileTerminatePort;
  private Text txtMobileTerminatePID;
  private Text txtMobileTerminateDCS;
  private Text txtMobileTerminateMessageText;
  private Text txtMobileTerminateReceivedMessage;
  private Text txtMobileTerminatePort;
  private Label lblMobileTerminateMessageLength;
  private Label lblMobileTerminateReceivedMessage;
  private Label lblMobileTerminateReceivedNumber;
  private Label txtMobileTerminateReceivedNumber;
  private Label lblMobileTerminatePortBlank;
  private IDevice currentDevice;
  public boolean isMsgReceived = false;
  public int sleepCnt = 0;
  
  public SMS(AbstractInjectorItem paramAbstractInjectorItem, String paramString)
  {
    super(paramAbstractInjectorItem, paramString);
  }
  
  protected void createContents()
  {
    InjectorView.getDefault().addSelectionListener(this);
    currentDevice = ConnectionPlugin.getDefault().getCurrentDevice();
    createSendSection();
    createReceiveSection();
    createMMSSection();
  }
  
  protected void registerReceivers()
  {
    registerReceiver(new SimDBReceiver());
  }
  
  protected int get_error_code_from_ui_index(int paramInt)
  {
    if (paramInt <= 17) {
      return paramInt;
    }
    switch (paramInt)
    {
    case 18: 
      return 32769;
    case 19: 
      return 32776;
    case 20: 
      return 32778;
    case 21: 
      return 32789;
    case 22: 
      return 32790;
    case 23: 
      return 32795;
    case 24: 
      return 32796;
    case 25: 
      return 32797;
    case 26: 
      return 32798;
    case 27: 
      return 32806;
    case 28: 
      return 32809;
    case 29: 
      return 32810;
    case 30: 
      return 32815;
    case 31: 
      return 32818;
    case 32: 
      return 32837;
    case 33: 
      return 32849;
    case 34: 
      return 32864;
    case 35: 
      return 32865;
    case 36: 
      return 32866;
    case 37: 
      return 32867;
    case 38: 
      return 32879;
    case 39: 
      return 32895;
    case 40: 
      return 33041;
    case 41: 
      return 33062;
    case 42: 
      return 33068;
    }
    return 0;
  }
  
  private void createSendSection()
  {
    Composite localComposite1 = formUtil.createSection(parent, Messages.SMS_23);
    Composite localComposite2 = formUtil.createExpandable(localComposite1, Messages.SMS_24, 3);
    GridData localGridData = new GridData(4, 4, false, true);
    widthHint = 560;
    localComposite2.setLayoutData(localGridData);
    formUtil.createLabel(localComposite2, Messages.SMS_27);
    cmbMobileTerminateOriginatingAddress = formUtil.createEditableCombo(localComposite2, 2);
    formUtil.addComboItem(cmbMobileTerminateOriginatingAddress, ORIGINATING_ADDRESS_LIST);
    Composite localComposite3 = formUtil.createExpandable(localComposite1, Messages.SMS_13, 3);
    formUtil.createLabel(localComposite3, Messages.SMS_35);
    txtMobileTerminateMessageText = formUtil.createText(localComposite3, "");
    txtMobileTerminateMessageText.setTextLimit(80);
    formUtil.setWidth(txtMobileTerminateMessageText, 354);
    butMobileTerminateSendMsg = formUtil.createButton(localComposite3, Messages.SMS_37, 8);
    localGridData = new GridData(4, 4, false, true);
    widthHint = 100;
    butMobileTerminateSendMsg.setLayoutData(localGridData);
    butMobileTerminateSendMsg.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        sendMsg(Boolean.valueOf(butMobileTerminatePort.getSelection()));
      }
    });
    formUtil.createLabel(localComposite3, "");
    Composite localComposite4 = formUtil.createComposite(localComposite3, 3);
    lblMobileTerminatePortBlank = formUtil.createLabel(localComposite4, "");
    localGridData = new GridData(4, 4, false, true);
    widthHint = 255;
    lblMobileTerminatePortBlank.setLayoutData(localGridData);
    butMobileTerminatePort = formUtil.createButton(localComposite4, Messages.SMS_39, 32);
    butMobileTerminatePort.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        if (butMobileTerminatePort.getSelection()) {
          txtMobileTerminatePort.setEnabled(true);
        } else {
          txtMobileTerminatePort.setEnabled(false);
        }
      }
    });
    txtMobileTerminatePort = formUtil.createText(localComposite4, "");
    txtMobileTerminatePort.setTextLimit(5);
    localGridData = new GridData(4, 4, false, true);
    widthHint = 40;
    txtMobileTerminatePort.setLayoutData(localGridData);
    txtMobileTerminatePort.setEnabled(false);
    txtMobileTerminatePort.addKeyListener(new KeyListener()
    {
      public void keyReleased(KeyEvent paramAnonymousKeyEvent)
      {
        if (character == '-')
        {
          showDialog("You cannot use minus value.");
          txtMobileTerminatePort.setText("");
          return;
        }
        try
        {
          if (Integer.parseInt(txtMobileTerminatePort.getText()) > 65535)
          {
            showDialog("Port range : 0~65535");
            txtMobileTerminatePort.setText("");
            return;
          }
        }
        catch (NumberFormatException localNumberFormatException)
        {
          if (!txtMobileTerminatePort.getText().equals(""))
          {
            showDialog("Please input only number");
            txtMobileTerminatePort.setText("");
            return;
          }
        }
      }
      
      public void keyPressed(KeyEvent paramAnonymousKeyEvent) {}
    });
  }
  
  private void createReceiveSection()
  {
    Composite localComposite1 = formUtil.createSection(parent, Messages.SMS_18);
    GridData localGridData = new GridData(4, 4, false, true);
    widthHint = 560;
    localComposite1.setLayoutData(localGridData);
    Composite localComposite2 = formUtil.createExpandable(localComposite1, Messages.SMS_31, 3);
    formUtil.createLabel(localComposite2, Messages.SMS_19);
    cmbSentStatusSendingStatus = formUtil.createCombo(localComposite2);
    localGridData = new GridData(4, 4, false, true);
    widthHint = 312;
    cmbSentStatusSendingStatus.setLayoutData(localGridData);
    formUtil.addComboItem(cmbSentStatusSendingStatus, SENDING_STATUS_VALUE_SMS);
    butSentStatusSet = formUtil.createButton(localComposite2, Messages.SMS_20, 8);
    localGridData = new GridData(4, 4, false, true);
    widthHint = 100;
    butSentStatusSet.setLayoutData(localGridData);
    butSentStatusSet.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        sendstatus();
      }
    });
    Composite localComposite3 = formUtil.createExpandable(localComposite1, Messages.SMS_38, 2);
    lblMobileTerminateReceivedNumber = formUtil.createLabel(localComposite3, "Call Number : ");
    txtMobileTerminateReceivedNumber = formUtil.createLabel(localComposite3, "");
    formUtil.setWidth(txtMobileTerminateReceivedNumber, 350);
    lblMobileTerminateReceivedMessage = formUtil.createLabel(localComposite3, "Message     : \n\n\n\n\n");
    txtMobileTerminateReceivedMessage = formUtil.createTextArea(localComposite3, "\n\n\n\n\n");
  }
  
  private void createMMSSection()
  {
    Composite localComposite1 = formUtil.createSection(parent, Messages.SMS_22);
    GridData localGridData = new GridData(4, 4, false, true);
    widthHint = 560;
    localComposite1.setLayoutData(localGridData);
    Composite localComposite2 = formUtil.createComposite(localComposite1, 3);
    formUtil.createLabel(localComposite2, Messages.SMS_19);
    cmbSentStatusMMSSendingStatus = formUtil.createCombo(localComposite2);
    localGridData = new GridData(4, 4, false, true);
    widthHint = 312;
    cmbSentStatusMMSSendingStatus.setLayoutData(localGridData);
    formUtil.addComboItem(cmbSentStatusMMSSendingStatus, SENDING_STATUS_VALUE_MMS);
    butSentStatusSet = formUtil.createButton(localComposite2, Messages.SMS_20, 8);
    localGridData = new GridData(4, 4, false, true);
    widthHint = 100;
    butSentStatusSet.setLayoutData(localGridData);
    butSentStatusSet.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        sendstatusMMS();
      }
    });
  }
  
  protected void sendstatus()
  {
    int i = get_error_code_from_ui_index(cmbSentStatusSendingStatus.getSelectionIndex());
    int j = i & 0xFF;
    int k = i >> 8 & 0xFF;
    G04A05 localG04A05 = new G04A05();
    localG04A05.intialize();
    StructureGA localStructureGA = localG04A05.getBody();
    localStructureGA.setInt("DATA1", j);
    localStructureGA.setInt("DATA2", k);
    try
    {
      injectorSocket.send(localG04A05);
    }
    catch (IOException localIOException)
    {
      localIOException.printStackTrace();
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }
  
  protected void sendstatusMMS()
  {
    int i = get_error_code_from_ui_index(cmbSentStatusMMSSendingStatus.getSelectionIndex());
    int j = i + 10 & 0xFF;
    int k = i + 10 >> 8 & 0xFF;
    G04A05 localG04A05 = new G04A05();
    localG04A05.intialize();
    StructureGA localStructureGA = localG04A05.getBody();
    localStructureGA.setInt("DATA1", j);
    localStructureGA.setInt("DATA2", k);
    try
    {
      injectorSocket.send(localG04A05);
    }
    catch (IOException localIOException)
    {
      localIOException.printStackTrace();
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }
  
  public void showDialog(String paramString)
  {
    Shell localShell = parent.getShell();
    InjectorDialog.openInfoDialog(localShell, InjectorDialog.TITLE, paramString);
  }
  
  protected void sendMsg(Boolean paramBoolean)
  {
    if (txtMobileTerminateMessageText.getText().equals(""))
    {
      showDialog("Please input the message");
      txtMobileTerminateMessageText.setFocus();
      return;
    }
    if ((paramBoolean.booleanValue()) && (txtMobileTerminatePort.getText().equals("")))
    {
      showDialog("Please input the port value");
      txtMobileTerminatePort.setFocus();
      return;
    }
    if (!TelephonyCall.getinstance().getRssiStatus())
    {
      showDialog("RSSI level is zero.\nPlease try again later.");
      return;
    }
    String str1 = cmbMobileTerminateOriginatingAddress.getText().trim();
    if ((str1 == null) || (str1.length() == 0))
    {
      localObject = parent.getShell();
      InjectorDialog.openInfoDialog((Shell)localObject, InjectorDialog.TITLE, "Input phone number.");
      return;
    }
    if (str1.length() > 15)
    {
      localObject = parent.getShell();
      InjectorDialog.openInfoDialog((Shell)localObject, InjectorDialog.TITLE, "The maximum length of phone number is 15.");
      return;
    }
    if (checkNumberFormat(str1))
    {
      localObject = parent.getShell();
      InjectorDialog.openInfoDialog((Shell)localObject, InjectorDialog.TITLE, "This is invalid number. (" + str1 + ")");
      return;
    }
    Object localObject = new char['?'];
    int i = 0;
    int j = 240;
    EncodeMsg localEncodeMsg = new EncodeMsg();
    SmsAddressInfo localSmsAddressInfo1 = new SmsAddressInfo();
    diallingNum = SMSC_NUM;
    dialnumlen = diallingNum.length;
    Date localDate = new Date();
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy");
    String str2 = localSimpleDateFormat.format(localDate);
    localSimpleDateFormat = new SimpleDateFormat("MM");
    String str3 = localSimpleDateFormat.format(localDate);
    localSimpleDateFormat = new SimpleDateFormat("dd");
    String str4 = localSimpleDateFormat.format(localDate);
    localSimpleDateFormat = new SimpleDateFormat("HH");
    String str5 = localSimpleDateFormat.format(localDate);
    localSimpleDateFormat = new SimpleDateFormat("mm");
    String str6 = localSimpleDateFormat.format(localDate);
    localSimpleDateFormat = new SimpleDateFormat("ss");
    String str7 = localSimpleDateFormat.format(localDate);
    TmDateTime localTmDateTime = new TmDateTime();
    year = Integer.parseInt(str2.trim());
    month = Integer.parseInt(str3.trim());
    day = Integer.parseInt(str4.trim());
    hour = Integer.parseInt(str5.trim());
    minute = Integer.parseInt(str6.trim());
    second = Integer.parseInt(str7.trim());
    TapiNetTextCodingScheme localTapiNetTextCodingScheme = new TapiNetTextCodingScheme();
    bCompressed = false;
    bMsgClassSet = false;
    bMsgIndActive = false;
    codingGroupType = 0;
    waitingType = 0;
    alphabetType = 2;
    classType = 0;
    codingGroup = 0;
    code = 0;
    TPDU_SMS_DELIVER localTPDU_SMS_DELIVER = new TPDU_SMS_DELIVER();
    msgType = 0;
    mms = false;
    rp = false;
    udhi = false;
    sri = false;
    if (paramBoolean.booleanValue())
    {
      ported = paramBoolean.booleanValue();
      port = Short.parseShort(txtMobileTerminatePort.getText());
    }
    else
    {
      ported = false;
      port = -1;
    }
    SmsAddressInfo localSmsAddressInfo2 = new SmsAddressInfo();
    diallingNum = str1.toCharArray();
    dialnumlen = diallingNum.length;
    orgAddr = localSmsAddressInfo2;
    pId = 0;
    scts = localTmDateTime;
    dcs = localTapiNetTextCodingScheme;
    udl = 0;
    ArrayList localArrayList = null;
    if ((paramBoolean.booleanValue()) && (txtMobileTerminateMessageText.getText().length() > 60)) {
      localArrayList = getUserData(txtMobileTerminateMessageText.getText().substring(0, 59));
    } else {
      localArrayList = getUserData(txtMobileTerminateMessageText.getText());
    }
    if ((localArrayList.size() > 1) || (ported)) {
      udhi = true;
    }
    Iterator localIterator = localArrayList.iterator();
    while (localIterator.hasNext())
    {
      SMS_USERDATA localSMS_USERDATA = (SMS_USERDATA)localIterator.next();
      userData = localSMS_USERDATA;
      int k = localEncodeMsg.EncodeSmsDeliverTpdu(localSmsAddressInfo1, localTPDU_SMS_DELIVER, (char[])localObject, i, j);
      final byte[] arrayOfByte = convertToByte((char[])localObject, k);
      G04A01 local6 = new G04A01()
      {
        protected void makeBody()
        {
          StructureGA localStructureGA = getBody();
          localStructureGA.addByteArrayItem("DATA", arrayOfByte.length);
        }
      };
      local6.intialize();
      StructureGA localStructureGA = local6.getBody();
      localStructureGA.setByteArray("DATA", arrayOfByte);
      try
      {
        injectorSocket.send(local6);
      }
      catch (IOException localIOException)
      {
        localIOException.printStackTrace();
      }
      catch (Exception localException2)
      {
        localException2.printStackTrace();
      }
    }
    try
    {
      new ProgressMonitorDialog(parent.getShell()).run(true, false, new IRunnableWithProgress()
      {
        public void run(IProgressMonitor paramAnonymousIProgressMonitor)
          throws InvocationTargetException, InterruptedException
        {
          for (sleepCnt = 0; sleepCnt <= 100; sleepCnt += 1)
          {
            isMsgReceived = TelephonySocket.getInstance().getMsgReceived();
            if (isMsgReceived) {
              break;
            }
            Thread.sleep(100L);
          }
          TelephonySocket.getInstance().setMsgReceived(false);
          isMsgReceived = false;
        }
      });
    }
    catch (InterruptedException localInterruptedException)
    {
      localInterruptedException.printStackTrace();
    }
    catch (Exception localException1)
    {
      localException1.printStackTrace();
    }
  }
  
  private static boolean checkNumberFormat(String paramString)
  {
    int i = paramString.charAt(0) == '+' ? 4 : 3;
    Pattern localPattern = Pattern.compile("[^0-9++]");
    Matcher localMatcher = localPattern.matcher(paramString);
    return (localMatcher.find()) || (paramString.length() < i);
  }
  
  private ArrayList<SMS_USERDATA> getUserData(String paramString)
  {
    ArrayList localArrayList = new ArrayList();
    int i = 60;
    int j = paramString.length() / i;
    j++;
    int k = 0;
    for (int m = 0; m < j; m++)
    {
      SMS_USERDATA localSMS_USERDATA = new SMS_USERDATA();
      try
      {
        int n = k + i > paramString.length() - k ? paramString.length() - k : k + i;
        data = paramString.substring(k, k + n).getBytes("ISO-10646-UCS-2");
        length = data.length;
        headerCnt = 1;
        localSMS_USERDATA.setSMSUDH('\000', (short)0, (char)j, (char)(m + 1));
      }
      catch (UnsupportedEncodingException localUnsupportedEncodingException)
      {
        localUnsupportedEncodingException.printStackTrace();
        continue;
      }
      if (j == 1) {
        headerCnt = 0;
      }
      localArrayList.add(localSMS_USERDATA);
      k += i;
    }
    return localArrayList;
  }
  
  private byte[] convertToByte(char[] paramArrayOfChar, int paramInt)
  {
    byte[] arrayOfByte = new byte[paramInt];
    for (int i = 0; i < paramInt; i++) {
      arrayOfByte[i] = ((byte)paramArrayOfChar[i]);
    }
    return arrayOfByte;
  }
  
  public void MatrixTime(int paramInt)
  {
    long l1 = System.currentTimeMillis();
    for (long l2 = 0L; l2 - l1 < paramInt; l2 = System.currentTimeMillis()) {}
  }
  
  public void sendDeliveryReport()
  {
    char[] arrayOfChar = new char['?'];
    int i = 0;
    int j = 240;
    EncodeMsg localEncodeMsg = new EncodeMsg();
    SmsAddressInfo localSmsAddressInfo1 = new SmsAddressInfo();
    diallingNum = SMSC_NUM;
    dialnumlen = diallingNum.length;
    Date localDate = new Date();
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy");
    String str1 = localSimpleDateFormat.format(localDate);
    localSimpleDateFormat = new SimpleDateFormat("MM");
    String str2 = localSimpleDateFormat.format(localDate);
    localSimpleDateFormat = new SimpleDateFormat("dd");
    String str3 = localSimpleDateFormat.format(localDate);
    localSimpleDateFormat = new SimpleDateFormat("HH");
    String str4 = localSimpleDateFormat.format(localDate);
    localSimpleDateFormat = new SimpleDateFormat("mm");
    String str5 = localSimpleDateFormat.format(localDate);
    localSimpleDateFormat = new SimpleDateFormat("ss");
    String str6 = localSimpleDateFormat.format(localDate);
    TmDateTime localTmDateTime = new TmDateTime();
    year = Integer.parseInt(str1.trim());
    month = Integer.parseInt(str2.trim());
    day = Integer.parseInt(str3.trim());
    hour = Integer.parseInt(str4.trim());
    minute = Integer.parseInt(str5.trim());
    second = Integer.parseInt(str6.trim());
    TapiNetTextCodingScheme localTapiNetTextCodingScheme = new TapiNetTextCodingScheme();
    bCompressed = false;
    bMsgClassSet = false;
    bMsgIndActive = false;
    codingGroupType = 0;
    waitingType = 0;
    alphabetType = 2;
    classType = 0;
    codingGroup = 0;
    code = 0;
    TPDU_SMS_DELIVER localTPDU_SMS_DELIVER = new TPDU_SMS_DELIVER();
    msgType = 0;
    mms = false;
    rp = false;
    udhi = false;
    sri = false;
    SmsAddressInfo localSmsAddressInfo2 = new SmsAddressInfo();
    String str7 = (String)DecodeMsg.deliveryReportNum_set.iterator().next();
    DecodeMsg.deliveryReportNum_set.remove(str7);
    diallingNum = String.format(str7, new Object[0]).toCharArray();
    dialnumlen = diallingNum.length;
    orgAddr = localSmsAddressInfo2;
    pId = 0;
    scts = localTmDateTime;
    dcs = localTapiNetTextCodingScheme;
    udl = 0;
    String str8 = "Message delivered.";
    SMS_USERDATA localSMS_USERDATA = new SMS_USERDATA();
    try
    {
      data = str8.getBytes("ISO-10646-UCS-2");
      length = data.length;
      headerCnt = 0;
      localSMS_USERDATA.setSMSUDH('\000', (short)0, '\002', '\001');
      userData = localSMS_USERDATA;
    }
    catch (UnsupportedEncodingException localUnsupportedEncodingException)
    {
      localUnsupportedEncodingException.printStackTrace();
    }
    int k = localEncodeMsg.EncodeSmsDeliverTpdu(localSmsAddressInfo1, localTPDU_SMS_DELIVER, arrayOfChar, i, j);
    final byte[] arrayOfByte = convertToByte(arrayOfChar, k);
    G04A01 local8 = new G04A01()
    {
      protected void makeBody()
      {
        StructureGA localStructureGA = getBody();
        localStructureGA.addByteArrayItem("DATA", arrayOfByte.length);
      }
    };
    local8.intialize();
    StructureGA localStructureGA = local8.getBody();
    localStructureGA.setByteArray("DATA", arrayOfByte);
    try
    {
      MatrixTime(1200);
      injectorSocket.send(local8);
    }
    catch (IOException localIOException)
    {
      localIOException.printStackTrace();
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }
  
  private char[] convertToChar(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
  {
    char[] arrayOfChar = new char[paramInt2];
    int i = 0;
    for (int j = 0; j < paramArrayOfByte.length; j++) {
      if (j >= paramInt1)
      {
        arrayOfChar[(i++)] = ((char)paramArrayOfByte[j]);
        if (i >= paramInt2) {
          break;
        }
      }
    }
    return arrayOfChar;
  }
  
  public void selectionChanged(FileEntry paramFileEntry)
  {
    if (paramFileEntry == null) {
      return;
    }
    if ((currentDevice != null) && (currentDevice.getSerialNumber() != paramFileEntry.getName()))
    {
      txtMobileTerminateMessageText.setText("");
      txtMobileTerminateReceivedNumber.setText("");
      txtMobileTerminateReceivedMessage.setText("");
    }
    currentDevice = ConnectionPlugin.getDefault().getCurrentDevice();
  }
  
  public class SimDBReceiver
    extends AbstractInjectorReceiver
  {
    public SimDBReceiver() {}
    
    public void run(AbstractGA paramAbstractGA)
    {
      StructureGA localStructureGA = paramAbstractGA.getBody();
      TPDU_SMS_SUBMIT localTPDU_SMS_SUBMIT = new TPDU_SMS_SUBMIT();
      byte[] arrayOfByte = localStructureGA.getByteArray("DATA");
      char[] arrayOfChar = SMS.this.convertToChar(arrayOfByte, 3, arrayOfByte.length - 3);
      DecodeMsg localDecodeMsg = new DecodeMsg();
      localDecodeMsg.DecodeSmsSubmitTpdu(localTPDU_SMS_SUBMIT, 500, arrayOfChar);
      txtMobileTerminateReceivedNumber.setText(String.valueOf(destAddr.diallingNum).trim());
      if (DecodeMsg.relayedsms)
      {
        txtMobileTerminateReceivedMessage.setText(String.valueOf(DecodeMsg.smsbuffer).trim());
        DecodeMsg.relay_cnt -= 1;
        if (DecodeMsg.relay_cnt == 0)
        {
          for (int i = 0; i < DecodeMsg.smsbuffer_index; i++) {
            DecodeMsg.smsbuffer[i] = '\000';
          }
          DecodeMsg.smsbuffer_index = 0;
          DecodeMsg.relayedsms = false;
        }
      }
      else
      {
        txtMobileTerminateReceivedMessage.setText(String.valueOf(userData).trim());
      }
      if (DecodeMsg.deliveryReport) {
        if (DecodeMsg.relayedsms)
        {
          if (udl < 255) {
            sendDeliveryReport();
          }
        }
        else {
          sendDeliveryReport();
        }
      }
    }
    
    public AbstractGA createTransferObject()
    {
      return new G04A01();
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.page.SMS
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.protocol;

import org.tizen.injector.protocol.AbstractGA;
import org.tizen.injector.protocol.StructureGA;

public class G04A01
  extends AbstractGA
{
  public G04A01()
  {
    super(4, 1);
  }
  
  protected void makeBody()
  {
    StructureGA localStructureGA = getBody();
    localStructureGA.addByteArrayItem("DATA", 500);
  }
  
  protected void makeHeader() {}
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.protocol.G04A01
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.telephony.sms.protocol;

import org.tizen.injector.protocol.AbstractGA;
import org.tizen.injector.protocol.StructureGA;

public class G04A05
  extends AbstractGA
{
  public G04A05()
  {
    super(4, 5);
  }
  
  protected void makeBody()
  {
    StructureGA localStructureGA = getBody();
    localStructureGA.addByteItem("DATA1");
    localStructureGA.addByteItem("DATA2");
  }
  
  protected void makeHeader() {}
}

/* Location:
 * Qualified Name:     org.tizen.injector.telephony.sms.protocol.G04A05
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
1 2

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd