source: remove build warning for 64bit build
[platform/adaptation/emulator/vmodem-daemon-emulator.git] / libvmodem / libvgsm_ss.c
1 /*
2  *  telephony-emulator
3  *
4  * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:
7  * Sooyoung Ha <yoosah.ha@samsung.com>
8  * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
23  *
24  * Contributors:
25  * - S-Core Co., Ltd
26  *
27  */
28
29 #include "vgsm.h"
30
31 int vgsm_ss_conference(LXT_HANDLE* handle)  // this is not used, and is not needed.
32 {
33     if( handle == NULL )
34         return -1;
35
36     return lxt_msg_send_message(        handle->fd,
37             GSM_SUPS,
38             GSM_SUPS_CONFERENCE,
39             0x00,
40             NULL);
41 }
42
43 int vgsm_ss_hold(LXT_HANDLE* handle)
44 {
45     if( handle == NULL )
46         return -1;
47
48     return lxt_msg_send_message(        handle->fd,
49             GSM_SUPS,
50             GSM_SUPS_HOLD,
51             0x00,
52             NULL);
53 }
54
55 int vgsm_ss_unhold(LXT_HANDLE* handle)
56 {
57     if( handle == NULL )
58         return -1;
59
60     return lxt_msg_send_message(        handle->fd,
61             GSM_SUPS,
62             GSM_SUPS_UNHOLD,
63             0x00,
64             NULL);
65 }
66
67 // 090215
68 int vgsm_ss_getAOC(LXT_HANDLE* handle)
69 {
70     if( handle == NULL )
71         return -1;
72
73     return lxt_msg_send_message(        handle->fd,
74             GSM_SUPS,
75             GSM_SUPS_AOC_GET,
76             0x00,
77             NULL);
78 }
79
80 // 090326
81 int vgsm_ss_restoreEI(LXT_HANDLE* handle)
82 {
83     if( handle == NULL )
84         return -1;
85
86     return lxt_msg_send_message(        handle->fd,
87             0x11,
88             GSM_SUPS_AOC_GET,
89             0x00,
90             NULL);
91 }
92
93 // 090330, 090403
94 int vgsm_ss_setCW(LXT_HANDLE* handle, _setCW_t *setCW, int size)
95 {
96     if( handle == NULL )
97         return -1;
98
99     return lxt_msg_send_message(        handle->fd,
100             GSM_SUPS,
101             GSM_SUPS_CW_SET,
102             size,
103             setCW);
104 }
105
106 int vgsm_ss_setCF(LXT_HANDLE* handle, _setCF_t *setCF, int size)
107 {
108     if( handle == NULL )
109         return -1;
110
111     return lxt_msg_send_message(        handle->fd,
112             GSM_SUPS,
113             GSM_SUPS_CF_SET,
114             size,
115             setCF);
116 }
117
118 int vgsm_ss_setCB(LXT_HANDLE* handle, _setCB_t *setCB, int size)
119 {
120     if( handle == NULL )
121         return -1;
122
123     return lxt_msg_send_message(        handle->fd,
124             GSM_SUPS,
125             GSM_SUPS_CB_SET,
126             size,
127             setCB);
128 }
129
130 // 090213
131 int vgsm_ss_getUSSD(LXT_HANDLE* handle)
132 {
133     if( handle == NULL )
134         return -1;
135
136     return lxt_msg_send_message(    handle->fd,
137             GSM_SUPS,
138             GSM_SUPS_USSD_GET,
139             0x00,
140             NULL);
141 }
142
143 int vgsm_ss_setUSSD(LXT_HANDLE* handle, _USSD_data_t *ussd, int size)
144 {
145     if( handle == NULL )
146         return -1;
147
148 #if 1
149     printf("************in libvgsm_ss***************\n");
150     printf("time: %s, weather: %s\n",
151             ussd->time, ussd->weather);
152
153     printf("data length : %zu\n",sizeof(*ussd));
154     printf("time length : %zu\n",sizeof(ussd->time));
155     printf("weather length : %zu\n",sizeof(ussd->weather));
156     printf("size : %d\n", size);
157 #endif
158
159     return lxt_msg_send_message(    handle->fd,
160             GSM_SUPS,
161             GSM_SUPS_USSD_SET,
162             size,
163             ussd);
164 }
165
166 int vgsm_ss_setAOC(LXT_HANDLE* handle, _AOC_t *aoc, int size)
167 {
168     if( handle == NULL )
169         return -1;
170
171 #if 1
172     printf("************in libvgsm_ss***************\n");
173     printf("acm: %ld, ccm: %ld, maxacm: %ld, ppu: %ld, chartype: %c\n",
174             aoc->acm, aoc->ccm, aoc->maxacm, aoc->ppu,
175             aoc->chartype);
176
177     printf("data length : %zu\n",sizeof(*aoc));
178     printf("acm length : %zu\n",sizeof(aoc->acm));
179     printf("type length : %zu\n",sizeof(aoc->ccm));
180     printf("type length : %zu\n",sizeof(aoc->maxacm));
181     printf("type length : %zu\n",sizeof(aoc->ppu));
182     printf("type length : %zu\n",sizeof(aoc->chartype));
183     printf("size : %d\n", size);
184 #endif
185
186     return lxt_msg_send_message(    handle->fd,
187             GSM_SUPS,
188             GSM_SUPS_AOC_SET,
189             size,
190             aoc);
191 }