0fabe74c102f39101af7777b720a188fd14eb1fa
[framework/telephony/tel-plugin-socket_communicator.git] / test / modem.c
1 /*
2  * tel-plugin-socket-communicator
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 <stdlib.h>
23 #include <string.h>
24 #include <sys/time.h>
25 #include <unistd.h>
26 #include <glib.h>
27 #include <glib-object.h>
28
29 #include "menu.h"
30
31 static char data_modem_set_flight_mode_enable[MENU_DATA_SIZE + 1] = "true";
32
33
34 static int run_modem_set_flight_mode(MManager *mm, struct menu_data *menu)
35 {
36         msg("enable = %s", data_modem_set_flight_mode_enable);
37         msg("call [%s] tapi service !!!", menu->title);
38
39         return 0;
40 }
41
42 static int run_modem_get_flight_mode(MManager *mm, struct menu_data *menu)
43 {
44         msg("call [%s] tapi service !!!", menu->title);
45
46         return 0;
47 }
48
49 static int run_modem_get_imei(MManager *mm, struct menu_data *menu)
50 {
51         msg("call [%s] tapi service !!!", menu->title);
52
53         return 0;
54 }
55
56 static int run_modem_get_version(MManager *mm, struct menu_data *menu)
57 {
58         msg("call [%s] tapi service !!!", menu->title);
59
60         return 0;
61 }
62
63
64 static struct menu_data menu_modem_set_flight_mode[] = {
65         { "1", "enable (true / false)", NULL, NULL, data_modem_set_flight_mode_enable},
66         { "2", "run", NULL, run_modem_set_flight_mode, NULL},
67         { NULL, NULL, },
68 };
69
70 static struct menu_data menu_modem_get_flight_mode[] = {
71         { "1", "run", NULL, run_modem_get_flight_mode, NULL},
72         { NULL, NULL, },
73 };
74
75
76 static struct menu_data menu_modem_get_imei[] = {
77         { "1", "run", NULL, run_modem_get_imei, NULL},
78         { NULL, NULL, },
79 };
80
81 static struct menu_data menu_modem_get_version[] = {
82         { "1", "run", NULL, run_modem_get_version, NULL},
83         { NULL, NULL, },
84 };
85
86
87 struct menu_data menu_modem[] = {
88         { "1", "SET Flight mode", menu_modem_set_flight_mode, NULL, NULL},
89         { "2", "GET Flight mode", menu_modem_get_flight_mode, NULL, NULL},
90         { "3", "GET IMEI", menu_modem_get_imei, NULL, NULL},
91         { "4", "GET Version", menu_modem_get_version, NULL, NULL},
92         { NULL, NULL, },
93 };