21c40ca2a39f99a0dc67c1466334577c84745f15
[framework/api/radio.git] / TC / testcase / utc_media_radio.c
1 /*
2 * Copyright (c) 2011 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 #include <tet_api.h>
18 #include <media/radio.h>
19 #include <glib.h>
20
21
22 enum {
23         POSITIVE_TC_IDX = 0x01,
24         NEGATIVE_TC_IDX,
25 };
26
27 //keeping ret and radio global, since using startup function for all
28 radio_h radio;
29 int sRet;
30
31 static void startup(void);
32 static void cleanup(void);
33
34 void (*tet_startup)(void) = startup;
35 void (*tet_cleanup)(void) = cleanup;
36
37 static void utc_media_radio_create_p(void);
38 static void utc_media_radio_create_n(void);
39 static void utc_media_radio_destroy_p(void);
40 static void utc_media_radio_destroy_n(void);
41 static void utc_media_radio_get_state_p(void);
42 static void utc_media_radio_get_state_n(void);
43 static void utc_media_radio_start_p(void);
44 static void utc_media_radio_start_n(void);
45 static void utc_media_radio_stop_p(void);
46 static void utc_media_radio_stop_n(void);
47 static void utc_media_radio_seek_up_p(void);
48 static void utc_media_radio_seek_up_n(void);
49 static void utc_media_radio_seek_down_p(void);
50 static void utc_media_radio_seek_down_n(void);
51 static void utc_media_radio_set_frequency_p(void);
52 static void utc_media_radio_set_frequency_n(void);
53 static void utc_media_radio_get_frequency_p(void);
54 static void utc_media_radio_get_frequency_n(void);
55 static void utc_media_radio_scan_start_p(void);
56 static void utc_media_radio_scan_start_n(void);
57 static void utc_media_radio_scan_stop_p(void);
58 static void utc_media_radio_scan_stop_n(void);
59 static void utc_media_radio_set_mute_p(void);
60 static void utc_media_radio_set_mute_n(void);
61 static void utc_media_radio_is_muted_p(void);
62 static void utc_media_radio_is_muted_n(void);
63 static void utc_media_radio_set_scan_completed_callback_p(void);
64 static void utc_media_radio_set_scan_completed_callback_n(void);
65 static void utc_media_radio_unset_scan_completed_callback_p(void);
66 static void utc_media_radio_unset_scan_completed_callback_n(void);
67 static void utc_media_radio_set_interrupted_callback_p(void);
68 static void utc_media_radio_set_interrupted_callback_n(void);
69 static void utc_media_radio_unset_interrupted_callback_p(void);
70 static void utc_media_radio_unset_interrupted_callback_n(void);
71
72 struct tet_testlist tet_testlist[] = {
73         { utc_media_radio_create_p , POSITIVE_TC_IDX },
74         { utc_media_radio_create_n , NEGATIVE_TC_IDX },
75         { utc_media_radio_destroy_p , POSITIVE_TC_IDX },
76         { utc_media_radio_destroy_n , NEGATIVE_TC_IDX },
77         { utc_media_radio_get_state_p , POSITIVE_TC_IDX },
78         { utc_media_radio_get_state_n , NEGATIVE_TC_IDX },
79         { utc_media_radio_start_p , POSITIVE_TC_IDX },
80         { utc_media_radio_start_n  , NEGATIVE_TC_IDX },
81         { utc_media_radio_stop_p , POSITIVE_TC_IDX },
82         { utc_media_radio_stop_n , NEGATIVE_TC_IDX },
83         { utc_media_radio_seek_up_p , POSITIVE_TC_IDX },
84         { utc_media_radio_seek_up_n  , NEGATIVE_TC_IDX },
85         { utc_media_radio_seek_down_p , POSITIVE_TC_IDX },
86         { utc_media_radio_seek_down_n  , NEGATIVE_TC_IDX },
87         { utc_media_radio_set_frequency_p  , POSITIVE_TC_IDX },
88         { utc_media_radio_set_frequency_n , NEGATIVE_TC_IDX },
89         { utc_media_radio_get_frequency_p , POSITIVE_TC_IDX },
90         { utc_media_radio_get_frequency_n  , NEGATIVE_TC_IDX },
91         { utc_media_radio_scan_start_p , POSITIVE_TC_IDX },
92         { utc_media_radio_scan_start_n , NEGATIVE_TC_IDX },
93         { utc_media_radio_scan_stop_p  , POSITIVE_TC_IDX },
94         { utc_media_radio_scan_stop_n , NEGATIVE_TC_IDX },
95         { utc_media_radio_set_mute_p , POSITIVE_TC_IDX },
96         { utc_media_radio_set_mute_n , NEGATIVE_TC_IDX },
97         { utc_media_radio_is_muted_p  , POSITIVE_TC_IDX },
98         { utc_media_radio_is_muted_n, NEGATIVE_TC_IDX },
99         { utc_media_radio_set_scan_completed_callback_p , POSITIVE_TC_IDX },
100         { utc_media_radio_set_scan_completed_callback_n , NEGATIVE_TC_IDX },
101         { utc_media_radio_unset_scan_completed_callback_p , POSITIVE_TC_IDX },
102         { utc_media_radio_unset_scan_completed_callback_n , NEGATIVE_TC_IDX },
103         { utc_media_radio_set_interrupted_callback_p , POSITIVE_TC_IDX },
104         { utc_media_radio_set_interrupted_callback_n , NEGATIVE_TC_IDX },
105         { utc_media_radio_unset_interrupted_callback_p , POSITIVE_TC_IDX },
106         { utc_media_radio_unset_interrupted_callback_n , NEGATIVE_TC_IDX },
107         { NULL, 0 },
108 };
109
110 static GMainLoop *g_mainloop = NULL;
111 static GThread *event_thread;
112
113 gpointer GmainThread(gpointer data){
114         g_mainloop = g_main_loop_new (NULL, 0);
115         g_main_loop_run (g_mainloop);
116         
117         return NULL;
118 }
119
120 static void radio_completed_cb(int frequency, void *data)
121 {
122         dts_message("RadiorEvent", "Radio scan info : %d!!!", frequency);
123 }
124
125 static void radio_interrupt_cb(radio_interrupted_code_e code, void *data)
126 {
127         dts_message("RadiorEvent", "Radio Interrupted!!!");
128 }
129
130 static void startup(void)
131 {
132         if( !g_thread_supported() )
133         {
134                 g_thread_init(NULL);
135         }
136         
137         GError *gerr = NULL;
138         event_thread = g_thread_create(GmainThread, NULL, 1, &gerr);
139
140         if ((sRet = radio_create(&radio)) != RADIO_ERROR_NONE)
141         {
142                 dts_fail("startup failed");
143         }
144 }
145
146 static void cleanup(void)
147 {
148         if ((sRet = radio_destroy(radio)) != RADIO_ERROR_NONE)
149         {
150                 dts_fail("cleanup failed");
151         }
152         g_main_loop_quit (g_mainloop);
153         g_thread_join(event_thread);
154 }
155
156 static void utc_media_radio_create_p(void)
157 {
158         char* api_name = "utc_media_radio_create_p";
159         radio_h radio2;
160         int ret = radio_create(&radio2);
161         if (ret != RADIO_ERROR_NONE)
162         {
163                 dts_message(api_name, "Call log: %d", ret);
164                 dts_fail(api_name);
165         }
166         else
167         {
168                 radio_destroy(radio2);
169                 dts_pass(api_name);
170         }
171 }
172
173 static void utc_media_radio_create_n(void)
174 {
175         char* api_name = "utc_media_radio_create_n";
176         int ret = radio_create(NULL);
177         if (ret == RADIO_ERROR_NONE)
178         {
179                 dts_message(api_name, "Call log: %d", ret);
180                 dts_fail(api_name);
181         }
182         else
183         {
184                 dts_pass(api_name);
185         }
186 }
187
188 static void utc_media_radio_destroy_p(void)
189 {
190         char* api_name = "utc_media_radio_destroy_p";
191         radio_h radio2;
192         radio_create(&radio2);
193         int ret;
194         ret = radio_destroy(radio2);
195         if (ret != RADIO_ERROR_NONE)
196         {
197                 dts_message(api_name, "Call log: %d", ret);
198                 dts_fail(api_name);
199         }
200         else
201         {
202                 dts_pass(api_name);
203         }
204 }
205
206 static void utc_media_radio_destroy_n(void)
207 {
208         char* api_name = "utc_media_radio_destroy_n";
209         int ret = radio_destroy(NULL);
210         if (ret == RADIO_ERROR_NONE)
211         {
212                 dts_message(api_name, "Call log: %d", ret);
213                 dts_fail(api_name);
214         }
215         else
216         {
217                 dts_pass(api_name);
218         }
219 }
220
221 static void utc_media_radio_get_state_p(void)
222 {
223         char* api_name = "utc_media_radio_get_state_p";
224         int ret;
225         radio_state_e state;
226         if (sRet == RADIO_ERROR_NONE)
227         {
228                 if ((ret = radio_get_state(radio, &state)) == RADIO_ERROR_NONE)
229                 {
230                         dts_pass(api_name);
231                 }
232         }
233         dts_message(api_name, "Call log: %d %d", sRet, ret);
234         dts_fail(api_name);
235 }
236
237 static void utc_media_radio_get_state_n(void)
238 {
239         char* api_name = "utc_media_radio_get_state_n";
240         int ret;
241         radio_state_e state;
242         if (sRet == RADIO_ERROR_NONE)
243         {
244                 if ((ret = radio_get_state(NULL, &state)) == RADIO_ERROR_INVALID_PARAMETER)
245                 {
246                         dts_pass(api_name);
247                 }
248         }
249         dts_message(api_name, "Call log: %d %d", sRet, ret);
250         dts_fail(api_name);
251 }
252
253 static void utc_media_radio_start_p(void)
254 {
255         char* api_name = "utc_media_radio_start_p";
256         int ret;
257
258         if (sRet == RADIO_ERROR_NONE)
259         {
260                 if ((ret = radio_start(radio)) == RADIO_ERROR_NONE)
261                 {
262                         radio_stop(radio);
263                         dts_pass(api_name);
264                 }
265         }
266         dts_message(api_name, "Call log: %d %d", sRet, ret);
267         dts_fail(api_name);
268 }
269
270 static void utc_media_radio_start_n(void)
271 {
272         char* api_name = "utc_media_radio_start_n";
273         int ret;
274         if (sRet == RADIO_ERROR_NONE)
275         {
276                 if ((ret = radio_start(NULL)) == RADIO_ERROR_INVALID_PARAMETER)
277                 {
278                         dts_pass(api_name);
279                 }
280         }
281         dts_message(api_name, "Call log: %d %d", sRet, ret);
282         dts_fail(api_name);
283 }
284
285 static void utc_media_radio_stop_p(void)
286 {
287         char* api_name = "utc_media_radio_stop_p";
288         int ret;
289
290         if (sRet == RADIO_ERROR_NONE)
291         {
292                 if ((ret = radio_start(radio)) == RADIO_ERROR_NONE)
293                 {
294                         if((ret = radio_stop(radio)) == RADIO_ERROR_NONE)
295                         {
296                                 dts_pass(api_name);
297                         }
298                 }
299         }
300         dts_message(api_name, "Call log: %d %d", sRet, ret);
301         dts_fail(api_name);
302 }
303
304 static void utc_media_radio_stop_n(void)
305 {
306         char* api_name = "utc_media_radio_stop_n";
307         int ret;
308         if (sRet == RADIO_ERROR_NONE)
309         {
310                 if ((ret = radio_stop(NULL)) == RADIO_ERROR_INVALID_PARAMETER)
311                 {
312                         dts_pass(api_name);
313                 }
314         }
315         dts_message(api_name, "Call log: %d %d", sRet, ret);
316         dts_fail(api_name);
317 }
318
319 static void utc_media_radio_seek_up_p(void)
320 {
321         char* api_name = "utc_media_radio_seek_up_p";
322         int ret;
323
324         if (sRet == RADIO_ERROR_NONE)
325         {
326                 if ((ret = radio_start(radio)) == RADIO_ERROR_NONE)
327                 {
328                         if((ret = radio_seek_up(radio,NULL,NULL)) == RADIO_ERROR_NONE)
329                         {
330                                 radio_stop(radio);
331                                 dts_pass(api_name);
332                         }
333                 }
334         }
335         dts_message(api_name, "Call log: %d %d", sRet, ret);
336         dts_fail(api_name);
337 }
338
339 static void utc_media_radio_seek_up_n(void)
340 {
341         char* api_name = "utc_media_radio_seek_up_n";
342         int ret;
343         if (sRet == RADIO_ERROR_NONE)
344         {
345                 if ((ret = radio_seek_up(radio,NULL,NULL)) == RADIO_ERROR_INVALID_STATE)
346                 {
347                         dts_pass(api_name);
348                 }
349         }
350         dts_message(api_name, "Call log: %d %d", sRet, ret);
351         dts_fail(api_name);
352 }
353
354 static void utc_media_radio_seek_down_p(void)
355 {
356         char* api_name = "utc_media_radio_seek_down_p";
357         int ret;
358
359         if (sRet == RADIO_ERROR_NONE)
360         {
361                 if ((ret = radio_start(radio)) == RADIO_ERROR_NONE)
362                 {
363                         if((ret = radio_seek_down(radio,NULL,NULL)) == RADIO_ERROR_NONE)
364                         {
365                                 radio_stop(radio);
366                                 dts_pass(api_name);
367                         }
368                 }
369         }
370         dts_message(api_name, "Call log: %d %d", sRet, ret);
371         dts_fail(api_name);
372 }
373
374 static void utc_media_radio_seek_down_n(void)
375 {
376         char* api_name = "utc_media_radio_seek_down_n";
377         int ret;
378         if (sRet == RADIO_ERROR_NONE)
379         {
380                 if ((ret = radio_seek_down(radio,NULL,NULL)) == RADIO_ERROR_INVALID_STATE)
381                 {
382                         dts_pass(api_name);
383                 }
384         }
385         dts_message(api_name, "Call log: %d %d", sRet, ret);
386         dts_fail(api_name);
387 }
388
389 static void utc_media_radio_set_frequency_p(void)
390 {
391         char* api_name = "utc_media_radio_set_frequency_p";
392         int ret;
393         if (sRet == RADIO_ERROR_NONE)
394         {
395                 if ((ret = radio_start(radio)) == RADIO_ERROR_NONE)
396                 {
397                         if((ret = radio_set_frequency(radio, 91900)) == RADIO_ERROR_NONE)
398                         {
399                                 radio_stop(radio);
400                                 dts_pass(api_name);
401                         }
402                 }
403         }
404         dts_message(api_name, "Call log: %d %d", sRet, ret);
405         dts_fail(api_name);
406 }
407
408 static void utc_media_radio_set_frequency_n(void)
409 {
410         char* api_name = "utc_media_radio_set_frequency_n";
411         int ret;
412         if (sRet == RADIO_ERROR_NONE)
413         {
414                 if((ret = radio_set_frequency(radio, 100)) == RADIO_ERROR_INVALID_PARAMETER)
415                 {
416                         dts_pass(api_name);
417                 }
418         }
419         dts_message(api_name, "Call log: %d %d", sRet, ret);
420         dts_fail(api_name);
421 }
422
423 static void utc_media_radio_get_frequency_p(void)
424 {
425         char* api_name = "utc_media_radio_get_frequency_p";
426         int ret;
427         if (sRet == RADIO_ERROR_NONE)
428         {
429                 if ((ret = radio_start(radio)) == RADIO_ERROR_NONE)
430                 {
431                         int frequency;
432                         if((ret = radio_get_frequency(radio, &frequency)) == RADIO_ERROR_NONE)
433                         {
434                                 radio_stop(radio);
435                                 dts_pass(api_name);
436                         }
437                 }
438         }
439         dts_message(api_name, "Call log: %d %d", sRet, ret);
440         dts_fail(api_name);
441 }
442
443 static void utc_media_radio_get_frequency_n(void)
444 {
445         char* api_name = "utc_media_radio_get_frequency_n";
446         int ret;
447         if (sRet == RADIO_ERROR_NONE)
448         {
449                 if((ret = radio_get_frequency(NULL, NULL)) == RADIO_ERROR_INVALID_PARAMETER)
450                 {
451                         dts_pass(api_name);
452                 }
453         }
454         dts_message(api_name, "Call log: %d %d", sRet, ret);
455         dts_fail(api_name);
456 }
457
458 static void utc_media_radio_scan_start_p(void)
459 {
460         char* api_name = "utc_media_radio_scan_start_p";
461         int ret;
462         if (sRet == RADIO_ERROR_NONE)
463         {
464                 if ((ret = radio_scan_start(radio,NULL,NULL)) == RADIO_ERROR_NONE)
465                 {
466                         radio_scan_stop(radio,NULL,NULL);
467                         dts_pass(api_name);
468                 }
469         }
470         dts_message(api_name, "Call log: %d %d", sRet, ret);
471         dts_fail(api_name);
472 }
473
474 static void utc_media_radio_scan_start_n(void)
475 {
476         char* api_name = "utc_media_radio_scan_start_n";
477         int ret;
478         if (sRet == RADIO_ERROR_NONE)
479         {
480                 if ((ret = radio_scan_start(NULL,NULL,NULL)) == RADIO_ERROR_INVALID_PARAMETER)
481                 {
482                         dts_pass(api_name);
483                 }
484         }
485         dts_message(api_name, "Call log: %d %d", sRet, ret);
486         dts_fail(api_name);
487 }
488
489 static void utc_media_radio_scan_stop_p(void)
490 {
491         char* api_name = "utc_media_radio_scan_stop_p";
492         int ret;
493         
494         if (sRet == RADIO_ERROR_NONE)
495         {
496                 if ((ret = radio_scan_start(radio,NULL,NULL)) == RADIO_ERROR_NONE)
497                 {
498                         if((ret = radio_scan_stop(radio,NULL,NULL)) == RADIO_ERROR_NONE)
499                         {
500                                 dts_pass(api_name);
501                         }
502                 }
503         }
504         dts_message(api_name, "Call log: %d %d", sRet, ret);
505         dts_fail(api_name);
506 }
507
508 static void utc_media_radio_scan_stop_n(void)
509 {
510         char* api_name = "utc_media_radio_scan_stop_n";
511         int ret;
512         if (sRet == RADIO_ERROR_NONE)
513         {
514                 if ((ret = radio_scan_stop(NULL,NULL,NULL)) == RADIO_ERROR_INVALID_PARAMETER)
515                 {
516                         dts_pass(api_name);
517                 }
518         }
519         dts_message(api_name, "Call log: %d %d", sRet, ret);
520         dts_fail(api_name);
521 }
522
523 static void utc_media_radio_set_mute_p(void)
524 {
525         char* api_name = "utc_media_radio_set_mute_p";
526         int ret;
527         bool mute = TRUE;
528         if (sRet == RADIO_ERROR_NONE)
529         {
530                 if ((ret = radio_set_mute(radio, mute)) == RADIO_ERROR_NONE)
531                 {
532                         dts_pass(api_name);
533                 }
534         }
535         dts_message(api_name, "Call log: %d %d", sRet, ret);
536         dts_fail(api_name);
537 }
538
539 static void utc_media_radio_set_mute_n(void)
540 {
541         char* api_name = "utc_media_radio_set_mute_n";
542         int ret;
543         if (sRet == RADIO_ERROR_NONE)
544         {
545                 if ((ret = radio_set_mute(NULL,TRUE)) == RADIO_ERROR_INVALID_PARAMETER)
546                 {
547                         dts_pass(api_name);
548                 }
549         }
550         dts_message(api_name, "Call log: %d %d", sRet, ret);
551         dts_fail(api_name);
552 }
553
554 static void utc_media_radio_is_muted_p(void)
555 {
556         char* api_name = "utc_media_radio_is_muted_p";
557         int ret;
558         bool mute;
559         if (sRet == RADIO_ERROR_NONE)
560         {
561                 if ((ret = radio_is_muted(radio,&mute)) == RADIO_ERROR_NONE)
562                 {
563                         dts_pass(api_name);
564                 }
565         }
566         dts_message(api_name, "Call log: %d %d", sRet, ret);
567         dts_fail(api_name);
568 }
569
570 static void utc_media_radio_is_muted_n(void)
571 {
572         char* api_name = "utc_media_radio_is_muted_n";
573         int ret;
574         if (sRet == RADIO_ERROR_NONE)
575         {
576                 if ((ret = radio_is_muted(NULL,NULL)) == RADIO_ERROR_INVALID_PARAMETER)
577                 {
578                         dts_pass(api_name);
579                 }
580         }
581         dts_message(api_name, "Call log: %d %d", sRet, ret);
582         dts_fail(api_name);
583 }
584
585 static void utc_media_radio_set_scan_completed_callback_p(void)
586 {
587         char* api_name = "utc_media_radio_set_scan_completed_callback_p";
588         int ret;
589         if (sRet == RADIO_ERROR_NONE)
590         {
591                 if ((ret = radio_set_scan_completed_cb(radio, radio_completed_cb, NULL)) == RADIO_ERROR_NONE)
592                 {
593                         dts_pass(api_name);
594                 }
595         }
596         dts_message(api_name, "Call log: %d %d", sRet, ret);
597         dts_fail(api_name);
598 }
599
600 static void utc_media_radio_set_scan_completed_callback_n(void)
601 {
602         char* api_name = "utc_media_radio_set_scan_completed_callback_n";
603         int ret;
604         if (sRet == RADIO_ERROR_NONE)
605         {
606                 if ((ret = radio_set_scan_completed_cb(radio, NULL, NULL)) == RADIO_ERROR_INVALID_PARAMETER)
607                 {
608                         dts_pass(api_name);
609                 }
610         }
611         dts_message(api_name, "Call log: %d %d", sRet, ret);
612         dts_fail(api_name);
613 }
614
615 static void utc_media_radio_unset_scan_completed_callback_p(void)
616 {
617         char* api_name = "utc_media_radio_unset_scan_completed_callback_p";
618         int ret;
619         if (sRet == RADIO_ERROR_NONE)
620         {
621                 if ((ret = radio_unset_scan_completed_cb(radio)) == RADIO_ERROR_NONE)
622                 {
623                         dts_pass(api_name);
624                 }
625         }
626         dts_message(api_name, "Call log: %d %d", sRet, ret);
627         dts_fail(api_name);
628 }
629
630 static void utc_media_radio_unset_scan_completed_callback_n(void)
631 {
632         char* api_name = "utc_media_radio_unset_scan_completed_callback_n";
633         int ret;
634         if (sRet == RADIO_ERROR_NONE)
635         {
636                 if ((ret = radio_unset_scan_completed_cb(NULL)) == RADIO_ERROR_INVALID_PARAMETER)
637                 {
638                         dts_pass(api_name);
639                 }
640         }
641         dts_message(api_name, "Call log: %d %d", sRet, ret);
642         dts_fail(api_name);
643 }
644
645 static void utc_media_radio_set_interrupted_callback_p(void)
646 {
647         char* api_name = "utc_media_radio_set_interrupted_callback_p";
648         int ret;
649         if (sRet == RADIO_ERROR_NONE)
650         {
651                 if ((ret = radio_set_interrupted_cb(radio, radio_interrupt_cb, NULL)) == RADIO_ERROR_NONE)
652                 {
653                         dts_pass(api_name);
654                 }
655         }
656         dts_message(api_name, "Call log: %d %d", sRet, ret);
657         dts_fail(api_name);
658 }
659
660 static void utc_media_radio_set_interrupted_callback_n(void)
661 {
662         char* api_name = "utc_media_radio_set_interrupted_callback_n";
663         int ret;
664         if (sRet == RADIO_ERROR_NONE)
665         {
666                 if ((ret = radio_set_interrupted_cb(radio, NULL, NULL)) == RADIO_ERROR_INVALID_PARAMETER)
667                 {
668                         dts_pass(api_name);
669                 }
670         }
671         dts_message(api_name, "Call log: %d %d", sRet, ret);
672         dts_fail(api_name);
673 }
674
675 static void utc_media_radio_unset_interrupted_callback_p(void)
676 {
677         char* api_name = "utc_media_radio_unset_interrupted_callback_p";
678         int ret;
679         if (sRet == RADIO_ERROR_NONE)
680         {
681                 if ((ret = radio_unset_interrupted_cb(radio)) == RADIO_ERROR_NONE)
682                 {
683                         dts_pass(api_name);
684                 }
685         }
686         dts_message(api_name, "Call log: %d %d", sRet, ret);
687         dts_fail(api_name);
688 }
689
690 static void utc_media_radio_unset_interrupted_callback_n(void)
691 {
692         char* api_name = "utc_media_radio_unset_interrupted_callback_n";
693         int ret;
694         if (sRet == RADIO_ERROR_NONE)
695         {
696                 if ((ret = radio_unset_interrupted_cb(NULL)) == RADIO_ERROR_INVALID_PARAMETER)
697                 {
698                         dts_pass(api_name);
699                 }
700         }
701         dts_message(api_name, "Call log: %d %d", sRet, ret);
702         dts_fail(api_name);
703 }
704