change boilerplate of sms_cdma_plugin
[platform/core/messaging/msg-service.git] / plugin / sms_cdma_plugin / include / SmsCdmaPluginParamCodec.h
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
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_CDMA_PLUGIN_PARAMCODEC_H
18 #define SMS_CDMA_PLUGIN_PARAMCODEC_H
19
20
21 /*==================================================================================================
22                                                                                 INCLUDE FILES
23 ==================================================================================================*/
24 #include "SmsCdmaPluginTypes.h"
25
26
27 /*==================================================================================================
28                                                                                 CLASS DEFINITIONS
29 ==================================================================================================*/
30 class SmsPluginParamCodec
31 {
32 public:
33
34         static SmsPluginParamCodec* instance();
35
36         static int convertDigitToBcd(char *pDigit, int DigitLen, unsigned char *pBcd);
37         static int convertBcdToDigit(const unsigned char *pBcd, int BcdLen, char *pDigit);
38         static int convertDigitToDTMF(const char *pDigit, int DigitLen, int startBit, unsigned char *pDtmf);
39         static int convertDTMFToDigit(const unsigned char *pDtmf, int DtmfLen, int startBit, char *pDigit);
40
41 private:
42         SmsPluginParamCodec();
43         virtual ~SmsPluginParamCodec();
44
45         static SmsPluginParamCodec* pInstance;
46
47         static bool isDtmfNumber(const char *pDigit, int DigitLen);
48 };
49
50 #endif /*SMS_CDMA_PLUGIN_PARAMCODEC_H*/