3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
5 * This file is part of msg-service.
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
8 * Sangkoo Kim <sangkoo.kim@samsung.com>
9 * Seunghwan Lee <sh.cat.lee@samsung.com>
10 * SoonMin Jung <sm0415.jung@samsung.com>
11 * Jae-Young Lee <jy4710.lee@samsung.com>
12 * KeeBum Kim <keebum.kim@samsung.com>
14 * PROPRIETARY/CONFIDENTIAL
16 * This software is the confidential and proprietary information of
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
18 * disclose such Confidential Information and shall use it only in
19 * accordance with the terms of the license agreement you entered
20 * into with SAMSUNG ELECTRONICS.
22 * SAMSUNG make no representations or warranties about the suitability
23 * of the software, either express or implied, including but not limited
24 * to the implied warranties of merchantability, fitness for a particular
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
26 * damages suffered by licensee as a result of using, modifying or
27 * distributing this software or its derivatives.
31 #ifndef SMS_PLUGIN_PARAMCODEC_H
32 #define SMS_PLUGIN_PARAMCODEC_H
35 /*==================================================================================================
37 ==================================================================================================*/
38 #include "SmsPluginTypes.h"
41 /*==================================================================================================
43 ==================================================================================================*/
44 class SmsPluginParamCodec
47 SmsPluginParamCodec();
48 virtual ~SmsPluginParamCodec();
50 static int encodeAddress(const SMS_ADDRESS_S *pAddress, char **ppParam);
51 static int encodeTime(const SMS_TIMESTAMP_S *pTimeStamp, char **ppParam);
52 static int encodeDCS(const SMS_DCS_S *pDCS, char **ppParam);
53 static int encodeSMSC(const char *pAddress, unsigned char *pEncodeAddr);
54 static int encodeSMSC(const SMS_ADDRESS_S *pAddress, unsigned char *pSMSC);
56 static int decodeAddress(const unsigned char *pTpdu, SMS_ADDRESS_S *pAddress);
57 static int decodeTime(const unsigned char *pTpdu, SMS_TIMESTAMP_S *pTimeStamp);
58 static int decodeDCS(const unsigned char *pTpdu, SMS_DCS_S *pDCS);
59 static void decodeSMSC(unsigned char* pAddress, int AddrLen, MSG_SMS_TON_T ton, char *pDecodeAddr);
62 static int convertDigitToBcd(char *pDigit, int DigitLen, unsigned char *pBcd);
63 static int convertBcdToDigit(const unsigned char *pBcd, int BcdLen, char *pDigit);
66 #endif //SMS_PLUGIN_PARAMCODEC_H