update tizen source
[framework/messaging/msg-service.git] / plugin / sms_plugin / include / SmsPluginSetting.h
1 /*
2 *
3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
4 *
5 * This file is part of msg-service.
6 *
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>
13 *
14 * PROPRIETARY/CONFIDENTIAL
15 *
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.
21 *
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.
28 *
29 */
30
31 #ifndef SMS_PLUGIN_SETTING_H
32 #define SMS_PLUGIN_SETTING_H
33
34
35 /*==================================================================================================
36                                          INCLUDE FILES
37 ==================================================================================================*/
38 #include "MsgMutex.h"
39 #include "MsgSettingTypes.h"
40
41
42 /*==================================================================================================
43                                      CLASS DEFINITIONS
44 ==================================================================================================*/
45 class SmsPluginSetting
46 {
47 public:
48         static SmsPluginSetting* instance();
49
50         void initConfigData(MSG_SIM_STATUS_T SimStatus);
51
52         void setConfigData(const MSG_SETTING_S *pSetting);
53         void getConfigData(MSG_SETTING_S *pSetting);
54
55         void setParamCntEvent(int ParamCnt);
56         void setParamEvent(const MSG_SMSC_DATA_S *pSmscData, int RecordIdx, bool bSuccess);
57         void setCbConfigEvent(const MSG_CBMSG_OPT_S *pCbOpt, bool bSuccess);
58         void setResultFromSim(bool bResult);
59
60 private:
61         SmsPluginSetting();
62         ~SmsPluginSetting();
63
64         MSG_ERROR_T addSMSCList(MSG_SMSC_LIST_S *pSmscList);
65
66         MSG_ERROR_T addCbOpt(MSG_CBMSG_OPT_S *pCbOpt);
67         void getCbOpt(MSG_SETTING_S *pSetting);
68
69         void setParamList(const MSG_SMSC_LIST_S *pSMSCList);
70         void getParamList(MSG_SMSC_LIST_S *pSMSCList);
71
72         int getParamCount();
73         bool getParam(int Index, MSG_SMSC_DATA_S *pSmscData);
74
75         bool setCbConfig(const MSG_CBMSG_OPT_S *pCbOpt);
76         bool getCbConfig(MSG_CBMSG_OPT_S *pCbOpt);
77
78         int getParamCntEvent();
79         bool getParamEvent(MSG_SMSC_DATA_S *pSmscData);
80         bool getCbConfigEvent(MSG_CBMSG_OPT_S *pCbOpt);
81         bool getResultFromSim();
82
83         SMS_PID_T convertPid(MSG_SMS_PID_T pid);
84
85         static SmsPluginSetting* pInstance;
86
87         MSG_SMSC_DATA_S         smscData;
88         MSG_CBMSG_OPT_S         cbOpt;
89
90         bool            bTapiResult;
91         int             paramCnt;
92         int             selectedParam;
93
94         Mutex mx;
95         CndVar cv;
96 };
97
98 #endif //SMS_PLUGIN_SETTING_H
99