2 * Copyright 2012-2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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://floralicense.org
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_TPDU_CODEC_H
18 #define SMS_PLUGIN_TPDU_CODEC_H
21 /*==================================================================================================
23 ==================================================================================================*/
24 #include "SmsPluginTypes.h"
27 /*==================================================================================================
29 ==================================================================================================*/
30 class SmsPluginTpduCodec
34 virtual ~SmsPluginTpduCodec();
36 static int encodeTpdu(const SMS_TPDU_S *pSmsTpdu, char *pTpdu);
37 static int decodeTpdu(const unsigned char *pTpdu, int TpduLen, SMS_TPDU_S *pSmsTpdu);
40 static int encodeSubmit(const SMS_SUBMIT_S *pSubmit, char *pTpdu);
41 static int encodeDeliver(const SMS_DELIVER_S *pDeliver, char *pTpdu);
42 static int encodeDeliverReport(const SMS_DELIVER_REPORT_S *pDeliverRep, char *pTpdu);
43 static int encodeStatusReport(const SMS_STATUS_REPORT_S *pStatusRep, char *pTpdu);
45 static int decodeSubmit(const unsigned char *pTpdu, int TpduLen, SMS_SUBMIT_S *pSubmit);
46 static int decodeDeliver(const unsigned char *pTpdu, int TpduLen, SMS_DELIVER_S *pDeliver);
47 static int decodeStatusReport(const unsigned char *pTpdu, int TpduLen, SMS_STATUS_REPORT_S *pStatusRep);
50 #endif //SMS_PLUGIN_TPDU_CODEC_H