2 * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef SMS_PLUGIN_TRANSPORT_H
18 #define SMS_PLUGIN_TRANSPORT_H
21 /*==================================================================================================
23 ==================================================================================================*/
25 #include "MsgTextConvert.h"
26 #include "MsgTransportTypes.h"
27 #include "MsgSettingTypes.h"
28 #include "SmsPluginTypes.h"
29 #include "MsgInternalTypes.h"
36 /*==================================================================================================
38 ==================================================================================================*/
39 class SmsPluginTransport
42 static SmsPluginTransport* instance();
44 void submitRequest(SMS_REQUEST_INFO_S *pReqInfo);
45 void sendDeliverReport(struct tapi_handle *handle, msg_error_t err);
46 void sendClass0DeliverReport(struct tapi_handle *handle, msg_error_t err);
48 void setSmscOptions(int simIndex, SMS_ADDRESS_S *pSmsc);
50 void msgInfoToSubmitData(const MSG_MESSAGE_INFO_S *pMsgInfo, SMS_SUBMIT_DATA_S *pData, SMS_CODING_SCHEME_T *pCharType, int addrIndex);
51 void setConcatHeader(SMS_UDH_S *pSrcHeader, SMS_UDH_S *pDstHeader);
53 void setNetStatus(SMS_NETWORK_STATUS_T sentStatus);
54 SMS_NETWORK_STATUS_T getNetStatus();
56 void setMoCtrlStatus(TelSatMoSmCtrlIndData_t *moCtrlData);
57 int getMoCtrlStatus();
59 unsigned char getMsgRef();
63 ~SmsPluginTransport();
65 void getSmsSendOption(int simIndex, SMS_SUBMIT_S *pSubmit);
66 void setSmsSendOption(SMS_REQUEST_INFO_S *pReqInfo, SMS_TPDU_S* pSmsTpdu);
67 void setSmsDcsOption(SMS_REQUEST_INFO_S *pReqInfo, SMS_TPDU_S* pSmsTpdu);
68 void setSmsReportOption(SMS_REQUEST_INFO_S *pReqInfo, SMS_TPDU_S* pSmsTpdu);
70 int getSegmentSize(SMS_CODING_SCHEME_T CodingScheme, int DataLen, bool bPortNum, MSG_LANGUAGE_ID_T LangId, int ReplyAddrLen);
71 SMS_PID_T convertPid(MSG_SMS_PID_T pid);
73 static SmsPluginTransport* pInstance;
77 unsigned char msgRef8bit;
78 unsigned short msgRef16bit;
80 SMS_NETWORK_STATUS_T curStatus;
81 TelSatMoSmCtrlIndData_t curMoCtrlData;
87 #endif /* SMS_PLUGIN_TRANSPORT_H */