upload tizen1.0 source
[profile/ivi/tel-plugin-dbus_tapi.git] / src / cfg.c
1 /*
2  * tel-plugin-dbus-tapi
3  *
4  * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20
21 #include <stdio.h>
22 #include <string.h>
23 #include <assert.h>
24 #include <unistd.h>
25 #include <stdlib.h>
26 #include <glib.h>
27
28 #include <tcore.h>
29 #include <plugin.h>
30 #include <server.h>
31 #include <storage.h>
32 #include <user_request.h>
33 #include <co_sim.h>
34
35 #include <TapiCommon.h>
36
37 #include "tel_cs_conn.h"
38 #include "common.h"
39 #include "ts_utility.h"
40 #include "ts_common.h"
41 #include "ts_svr_req.h"
42 #include "modules.h"
43
44 void dbus_request_cfg(struct custom_data *ctx, TcorePlugin *plugin, int tapi_service_function, GArray* in_param1,
45                 GArray* in_param2, GArray* in_param3, GArray* in_param4, GArray** out_param1, GArray** out_param2,
46                 GArray** out_param3, GArray** out_param4, GError** error)
47 {
48         int api_err = TAPI_API_SUCCESS;
49
50         switch (tapi_service_function) {
51                 case TAPI_CS_CFG_DEFAULTCONFGURATION_EXE:
52                 case TAPI_CS_CFG_GET_A_KEY:
53                 case TAPI_CS_CFG_VERIFY_A_KEY:
54                 case TAPI_CS_CFG_GET_MSL_INFO:
55                 case TAPI_CS_CFG_GET_VOCODER_OPTION:
56                 case TAPI_CS_CFG_SET_VOCODER_OPTION:
57                 case TAPI_CS_CFG_GET_HIDDEN_MENU_ACCESS:
58                 case TAPI_CS_CFG_SET_HIDDEN_MENU_ACCESS:
59                 case TAPI_CS_CFG_GET_CURRENT_CARRIER:
60                 case TAPI_CS_CFG_SET_CURRENT_CARRIER:
61                 case TAPI_CS_CFG_GET_SIO_MODE:
62                 case TAPI_CS_CFG_SET_SIO_MODE:
63                 case TAPI_CS_CFG_GET_ACTIVATION_DATE:
64                 case TAPI_CS_CFG_GET_RECONDITIONED_DATE:
65                 case TAPI_CS_CFG_SET_TTY_MODE:
66                 case TAPI_CS_CFG_GET_TTY_MODE:
67                 default:
68                         api_err = TAPI_API_NOT_SUPPORTED;
69                         break;
70         }
71
72         g_array_append_vals(*out_param1, &api_err, sizeof(int));
73 }
74
75 TReturn dbus_response_cfg(struct custom_data *ctx, UserRequest *ur, const char *appname,
76                 enum tcore_response_command command, unsigned int data_len, const void *data)
77 {
78         dbg("command = 0x%x", command);
79
80         switch (command) {
81                 default:
82                         break;
83         }
84
85         return TRUE;
86 }
87
88 TReturn dbus_notification_cfg(struct custom_data *ctx, CoreObject *source, enum tcore_notification_command command,
89                 unsigned int data_len, const void *data)
90 {
91         dbg("command = 0x%x", command);
92
93         switch (command) {
94                 default:
95                         break;
96         }
97
98         return TRUE;
99 }