Bundle-ManifestVersion: 2
Bundle-Name: Tizen Event Injector Telephony Call
Bundle-SymbolicName: org.tizen.telephony.call;singleton:=true
-Bundle-Version: 1.3.20.qualifier
-Bundle-Vendor: Tizen
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: Samsung
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.forms;bundle-version="3.3.103",
import org.tizen.injector.provider.AbstractInjectorPage;
import org.tizen.injector.receiver.AbstractInjectorReceiver;
import org.tizen.injector.socket.TelephonySocket;
+import org.tizen.injector.view.InjectorView;
import org.tizen.telephony.call.TelephonyCall;
import org.tizen.telephony.call.model.CallListVO;
import org.tizen.telephony.call.protocol.G01A07;
}
protected void createContents() {
- ConnectionPlugin.getDefault().addSelectionListener(this);
+ InjectorView.getDefault().addSelectionListener(this);
currentDevice = ConnectionPlugin.getDefault().getCurrentDevice();
createMTCallSection();
createCallListInformationSection();
// add(30,"no network service");
// add(0,"Phone failure");
- add(1,"CALL Not Available");
+// add(1,"CALL Not Available");
// add(2,"Phone-adapter link reserved");
// add(3,"Operation not allowed");
// add(4,"Operation not supported");
<feature
id="org.tizen.telephony.feature"
label="Tizen Telephony"
- version="1.1.0.qualifier"
- provider-name="Tizen">
+ version="1.0.0.qualifier"
+ provider-name="Samsung">
<description>
%description
Bundle-ManifestVersion: 2
Bundle-Name: Tizen Event Injector Telephony Sms
Bundle-SymbolicName: org.tizen.telephony.sms;singleton:=true
-Bundle-Version: 1.3.20.qualifier
-Bundle-Vendor: Tizen
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: Samsung
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.tizen.common,
}
/* TP UDL */
- tpdu_submit.udl = pPDU[position];
+ tpdu_submit.udl = pPDU[position] & 0x00FF;
if(tpdu_submit.udl > EnumConstants.TAPI_NETTEXT_SMDATA_SIZE_MAX)
tpdu_submit.udl = EnumConstants.TAPI_NETTEXT_SMDATA_SIZE_MAX;
if(tpdu_submit.udhi)
{
udhl = pPDU[position];
- position+=udhl;
+ int fillbits = 7 - ((pPDU[position] * 8) % 7);
+ position += udhl;
+ udhl += fillbits;
if(pPDU[position] == 1)
{
}
}
+ int i = 0;
tpdu_submit.userData = new char[EnumConstants.TAPI_NETTEXT_SMDATA_SIZE_MAX+1];
//System.out.println("Position : " + position);
if(tpdu_submit.dcs.alphabetType == EnumConstants.TAPI_NETTEXT_ALPHABET_DEFAULT) {
char[] inData = new char[EnumConstants.TAPI_NETTEXT_SMDATA_SIZE_MAX+1];
- for(int i = 0; i < tpdu_submit.udl; i++) {
- if(tpdu_submit.udl == 255)
- {
- // relayed sms
- if(tpdu_submit.udhi == true && i > 152 && (char)(pPDU[position + i]) == '@')
+ for(i = 0; i < tpdu_submit.udl; i++) {
+ inData[i] = (char)(pPDU[position + i] & 0xff);
+ if(relay_cnt == 1) // last or single sms
+ {
+ if(i == tpdu_submit.udl - udhl)
break;
}
else
{
- // relayed sms
- if(tpdu_submit.udhi == true && i > tpdu_submit.udl && (char)(pPDU[position + i]) == '@')
- break;
+ if(tpdu_submit.udhi == true)
+ {
+ if(i == tpdu_submit.udl - udhl)
+ break;
+ }
+ else
+ {
+ if(i == tpdu_submit.udl)
+ break;
+ }
}
-
- inData[i] = (char)(pPDU[position + i] & 0xff);
- if(inData[i] == '@' && i == tpdu_submit.udl - (udhl + 2)) // last dregs data
- inData[i] = '\0';
}
- for(int i = 0; i < tpdu_submit.udl; i++) {
- tpdu_submit.userData[i] = inData[i];
+ inData[i] = '\0';
+
+ for(int j = 0; j < i; j++) {
+ tpdu_submit.userData[j] = inData[j];
}
if(relayedsms)
else if(tpdu_submit.dcs.alphabetType == EnumConstants.TAPI_NETTEXT_ALPHABET_UCS2)
{
byte[] inData = new byte[EnumConstants.TAPI_NETTEXT_SMDATA_SIZE_MAX+1];
- for(int i = 0; i < tpdu_submit.udl; i++) {
- if(tpdu_submit.udl == 255)
- {
- // relayed sms
- if(tpdu_submit.udhi == true && i > 152 && (char)(pPDU[position + i]) == '@')
+ for(i = 0; i < tpdu_submit.udl; i++) {
+ inData[i] = (byte)(pPDU[position + i] & 0xff);
+ if(relay_cnt == 1) // last or single sms
+ {
+ if(i == tpdu_submit.udl - udhl + 1)
break;
}
else
{
- // relayed sms
- if(tpdu_submit.udhi == true && i > tpdu_submit.udl && (char)(pPDU[position + i]) == '@')
- break;
+ if(tpdu_submit.udhi == true)
+ {
+ if(i == tpdu_submit.udl - udhl)
+ break;
+ }
+ else
+ {
+ if(i == tpdu_submit.udl)
+ break;
+ }
}
-
- inData[i] = (byte)(pPDU[position + i] & 0xff);
}
try {
- tpdu_submit.userData = ucs2ToUTF8(inData);
+ inData[i] = '\0';
+ tpdu_submit.userData = ucs2ToUTF16(inData, i/2);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
-
- /* System.out.println("Msg Type: TPDU_SUBMIT");
- if(tpdu_submit.rd)
- System.out.println("RD: Reject Duplicate");
- else
- System.out.println("RD: Accept Duplicate");
- */
+
if(tpdu_submit.srr)
{
// System.out.println("SRR: A status report is requested");
// System.out.println("SRR: A status report is not requested");
deliveryReport = false;
}
- /*
- if(tpdu_submit.udhi)
- System.out.println("UDHI: Contains a Header in addition to the short message.");
- else
- System.out.println("UDHI: Only Short Message");
-
- if(tpdu_submit.rp)
- System.out.println("RP: Set Reply Path");
- else
- System.out.println("RP: Not set Reply Path");
-
- System.out.print("SCA Addr: ");
- System.out.println(scaAddr);
- System.out.print("To : ");
- System.out.println(destAddr);
- System.out.println(tpdu_submit.destAddr.diallingNum);
- System.out.println("Message : ");
- if(relayedsms)
- System.out.println(smsbuffer);
- else
- System.out.println(tpdu_submit.userData);
- */
}
private char[] getCharArray(char[] org, int start) {
}
}
- public char[] ucs2ToUTF8(byte[] ucs2Bytes) throws UnsupportedEncodingException{
+ public char[] ucs2ToUTF16(byte[] ucs2Bytes, int length) throws UnsupportedEncodingException{
String unicode = new String(ucs2Bytes, "UTF-16");
char[] str = unicode.toCharArray();
-
+
String tmp1 = new String(smsbuffer);
- String tmp2 = new String(str);
+ String tmp2 = unicode.substring(0, length);
String tmp3 = tmp1.trim() + tmp2.trim();
smsbuffer = tmp3.toCharArray();
switch(tpdu_deliver.dcs.alphabetType) {
case EnumConstants.TAPI_NETTEXT_ALPHABET_DEFAULT:
/* UDL */
- packet[index++] = (char) tpdu_deliver.userData.length;
- SmsUtilPackGSMCode(packet, tpdu_deliver.userData,
- tpdu_deliver.userData.length);
+ packet[index++] = (char) tpdu_deliver.userData.data.length;
+ SmsUtilPackGSMCode(packet, new String(tpdu_deliver.userData.data).toCharArray(),
+ tpdu_deliver.userData.data.length);
break;
case EnumConstants.TAPI_NETTEXT_ALPHABET_8BIT:
- packet[index++] = (char) tpdu_deliver.userData.length;
- SmsUtilPackGSM8Code(packet, tpdu_deliver.userData,
- tpdu_deliver.userData.length);
+ packet[index++] = (char) tpdu_deliver.userData.data.length;
+ SmsUtilPackGSM8Code(packet, new String(tpdu_deliver.userData.data).toCharArray(),
+ tpdu_deliver.userData.data.length);
break;
case EnumConstants.TAPI_NETTEXT_ALPHABET_UCS2:
- try {
- String str = new String(tpdu_deliver.userData);
- byte[] byte_buf = str.getBytes("ISO-10646-UCS-2");
- packet[index++] = (char)byte_buf.length;
- for(int ind = 0; ind < byte_buf.length; ind++)
- packet[index++] = (char)byte_buf[ind];
- } catch (UnsupportedEncodingException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ int udhl = 0;
+ int fillBits = 0;
+ int tempIndex = index;
+
+ if (tpdu_deliver.userData.headerCnt > 0)
+ index = index + 2;
+ else
+ index = index + 1;
+
+ // setting HEADER
+ int headerLen = 6;
+ for (i = 0; i < tpdu_deliver.userData.headerCnt; i++)
+ {
+ packet[index++] = 0x08; // SMS_UDH_CONCAT_16BIT;
+ packet[index++] = 0x04; // offset
+ packet[index++] = (char)(tpdu_deliver.userData.smsUDH.msgRef >> 8);
+ packet[index++] = (char)(tpdu_deliver.userData.smsUDH.msgRef & 0x00FF);
+ packet[index++] = tpdu_deliver.userData.smsUDH.totalSeg;
+ packet[index++] = tpdu_deliver.userData.smsUDH.seqNum;
+ udhl += headerLen;
+ }
+
+ if (udhl > 0) {
+ packet[tempIndex] = (char)((udhl+1) + fillBits + tpdu_deliver.userData.length);
+ packet[tempIndex+ 1] = (char)udhl;
+ } else {
+ packet[tempIndex] = (char)(tpdu_deliver.userData.length);
+ }
+
+ for(int ind = 0; ind < tpdu_deliver.userData.length; ind++) {
+ packet[index++] = (char)tpdu_deliver.userData.data[ind];
}
break;
// throw new NullPointerException(Messages.EncodeMsg_0);
--- /dev/null
+package org.tizen.telephony.sms.encription;
+
+public class SMS_USERDATA {
+ public SMS_USERDATA() {
+ smsUDH = new SMS_UDH();
+ }
+ public void setSMSUDH(char type, short ref, char seg, char num)
+ {
+ smsUDH.udhType = type;
+ smsUDH.msgRef = ref;
+ smsUDH.totalSeg = seg;
+ smsUDH.seqNum = num;
+ }
+ public int headerCnt;
+ public SMS_UDH smsUDH;
+ public int length;
+ public byte[] data;
+}
+class SMS_UDH {
+ public char udhType;
+ public short msgRef;
+ public char totalSeg;
+ public char seqNum;
+}
\ No newline at end of file
public TmDateTime scts;
public TapiNetTextCodingScheme dcs;
public int udl; // UINT
- public char[] userData; // byte *
-
+ //public char[] userData; // byte *
+ public SMS_USERDATA userData;
public TPDU_SMS_DELIVER() {
orgAddr = new SmsAddressInfo();
scts = new TmDateTime();
package org.tizen.telephony.sms.page;
+import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Date;
import org.eclipse.swt.SWT;
import org.tizen.injector.provider.AbstractInjectorItem;
import org.tizen.injector.provider.AbstractInjectorPage;
import org.tizen.injector.receiver.AbstractInjectorReceiver;
+import org.tizen.injector.view.InjectorView;
import org.tizen.telephony.sms.encription.DecodeMsg;
import org.tizen.telephony.sms.encription.EncodeMsg;
import org.tizen.telephony.sms.encription.EnumConstants;
+import org.tizen.telephony.sms.encription.SMS_USERDATA;
import org.tizen.telephony.sms.encription.SmsAddressInfo;
import org.tizen.telephony.sms.encription.TPDU_SMS_DELIVER;
import org.tizen.telephony.sms.encription.TPDU_SMS_SUBMIT;
private IDevice currentDevice;
protected void createContents() {
- ConnectionPlugin.getDefault().addSelectionListener(this);
+ InjectorView.getDefault().addSelectionListener(this);
currentDevice = ConnectionPlugin.getDefault().getCurrentDevice();
createSentStatusSection();
createMobileTerminateSection();
tpdu_deliver.scts = tm;
tpdu_deliver.dcs = scheme;
tpdu_deliver.udl = 0;
-// tpdu_deliver.userData = String.format(
-// txtMobileTerminateMessageText.getText()).toCharArray();
- tpdu_deliver.userData = txtMobileTerminateMessageText.getText().toCharArray();
-
- int packet_len = encode.EncodeSmsDeliverTpdu(SCA, tpdu_deliver, packet,
- pid, dcs);
- final byte[] data = convertToByte(packet, packet_len);
-
- G04A01 ga = new G04A01() {
- protected void makeBody() {
- StructureGA ga = getBody();
- ga.addByteArrayItem("DATA", data.length); //$NON-NLS-1$
+
+ ArrayList<SMS_USERDATA> dataArray = getUserData(txtMobileTerminateMessageText.getText());
+ if (dataArray.size() > 1) {
+ tpdu_deliver.udhi = true;
+ }
+
+ for (SMS_USERDATA userData : dataArray) {
+ tpdu_deliver.userData = userData;
+ int packet_len = encode.EncodeSmsDeliverTpdu(SCA, tpdu_deliver, packet,
+ pid, dcs);
+ final byte[] data = convertToByte(packet, packet_len);
+
+ G04A01 ga = new G04A01() {
+ protected void makeBody() {
+ StructureGA ga = getBody();
+ ga.addByteArrayItem("DATA", data.length); //$NON-NLS-1$
+ }
+ };
+ ga.intialize();
+
+ StructureGA sga = ga.getBody();
+ sga.setByteArray("DATA", data); //$NON-NLS-1$
+
+ try {
+ injectorSocket.send(ga);
+ } catch (Exception e) {
+ e.printStackTrace();
}
- };
- ga.intialize();
- StructureGA sga = ga.getBody();
- sga.setByteArray("DATA", data); //$NON-NLS-1$
+ }
+ }
- try {
- injectorSocket.send(ga);
- } catch (Exception e) {
- e.printStackTrace();
+ private ArrayList<SMS_USERDATA> getUserData(String message) {
+ ArrayList<SMS_USERDATA> list = new ArrayList<SMS_USERDATA>();
+ int length = 60; //temp length
+ int count = message.length() / length;
+ count = count + 1;
+ int index = 0;
+ SMS_USERDATA userData;
+
+ for (int i = 0; i < count; i++) {
+ userData = new SMS_USERDATA();
+ try {
+ int len = index+length > (message.length() - index) ? (message.length() - index)
+ : index + length;
+ userData.data = message.substring(index, index + len).getBytes("ISO-10646-UCS-2");
+ userData.length = userData.data.length;
+ userData.headerCnt = 1;
+ userData.setSMSUDH((char)0x00, (short)0x0000, (char)count, (char)(i+1));
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ continue;
+ }
+ if (count == 1) {
+ userData.headerCnt = 0;
+ }
+ list.add(userData);
+ index = index + length;
}
+ return list;
}
private byte[] convertToByte(char[] buf, int length) {
tpdu_deliver.dcs = scheme;
tpdu_deliver.udl = 0;
String msg = "Message delivered.";
- tpdu_deliver.userData = msg.toCharArray();
-
+ SMS_USERDATA userData1 = new SMS_USERDATA();
+ try {
+ userData1.data = msg.getBytes("ISO-10646-UCS-2");
+ userData1.length = userData1.data.length;
+ userData1.headerCnt = 0;
+ userData1.setSMSUDH((char)0x00, (short)0x0000, (char)2, (char)1);
+ tpdu_deliver.userData = userData1;
+ } catch (UnsupportedEncodingException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
int packet_len = encode.EncodeSmsDeliverTpdu(SCA, tpdu_deliver, packet,
pid, dcs);
final byte[] data = convertToByte(packet, packet_len);
Package:telephony-eplugin
-Version:0.2.4
+Version:0.2.10
OS:linux
Build-host-os:linux
Maintainer:yeongkyoon Lee <yeongkyoon.lee@samsung.com>, sungmin Ha <sungmin82.ha@samsung.com>
Description:Telephony for EventInjector
Build-dependency:indigo-pde[linux], common-eplugin[linux], eventinjector-eplugin[linux]
-Install-dependency:base-ide-product[linux]
+Install-dependency:common-eplugin[linux], base-ide-product[linux]
Source:telephony-eplugin
Package:telephony-eplugin
-Version:0.2.4
+Version:0.2.10
OS:windows
Build-host-os:linux
Maintainer:yeongkyoon Lee <yeongkyoon.lee@samsung.com>, sungmin Ha <sungmin82.ha@samsung.com>
Description:Telephony for EventInjector
Build-dependency:indigo-winpde[windows], common-eplugin[linux], eventinjector-eplugin[linux]
-Install-dependency:base-ide-product[windows]
+Install-dependency:common-eplugin[windows], base-ide-product[windows]
Source:telephony-eplugin