4 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
7 * Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
26 static void startup(), cleanup();
27 void (*tet_startup) () = startup;
28 void (*tet_cleanup) () = cleanup;
30 static void utc_location_svc_disabled();
32 struct tet_testlist tet_testlist[] = {
33 {utc_location_svc_disabled,1},
37 static GMainLoop *loop = NULL;
42 exit_loop (gpointer data)
44 g_main_loop_quit (loop);
52 loc = location_new(LOCATION_METHOD_GPS);
54 loop = g_main_loop_new(NULL,FALSE);
55 tet_printf("\n TC startup");
62 tet_printf("\n TC End");
66 cb_enabled (GObject *self,
74 cb_disabled (GObject *self,
78 if( LOCATION_STATUS_NO_FIX <= _status && _status <= LOCATION_STATUS_3D_FIX) tet_result(TET_PASS);
79 else tet_result(TET_FAIL);
80 g_main_loop_quit (loop);
84 utc_location_svc_disabled()
86 g_signal_connect (loc, "service-enabled", G_CALLBACK(cb_enabled), loc);
87 g_signal_connect (loc, "service-disabled", G_CALLBACK(cb_disabled), loc);
88 g_timeout_add_seconds(60, exit_loop, NULL);
89 g_main_loop_run (loop);