Modify flora license version.
[platform/core/messaging/msg-service.git] / plugin / sms_plugin / include / SmsPluginTpduCodec.h
1 /*
2 * Copyright 2012-2013  Samsung Electronics Co., Ltd
3 *
4 * Licensed under the Flora License, Version 1.1 (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
7 *
8 *    http://floralicense.org/license/
9 *
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.
15 */
16
17 #ifndef SMS_PLUGIN_TPDU_CODEC_H
18 #define SMS_PLUGIN_TPDU_CODEC_H
19
20
21 /*==================================================================================================
22                                          INCLUDE FILES
23 ==================================================================================================*/
24 #include "SmsPluginTypes.h"
25
26
27 /*==================================================================================================
28                                      CLASS DEFINITIONS
29 ==================================================================================================*/
30 class SmsPluginTpduCodec
31 {
32 public:
33         SmsPluginTpduCodec();
34         virtual ~SmsPluginTpduCodec();
35
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);
38
39 private:
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);
44
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);
48 };
49
50 #endif //SMS_PLUGIN_TPDU_CODEC_H
51