2 * Network Configuration Module
4 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Danny JS Seo <S.Seo@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
28 #include "network-state.h"
29 #include "signal-handler.h"
31 static GMainLoop *main_loop = NULL;
33 int main(int argc, char* argv[])
35 DBusGConnection *connection;
37 DBG("Network Configuration Module");
39 if (daemon(0, 0) != 0)
40 DBG("Cannot start daemon");
44 main_loop = g_main_loop_new(NULL, FALSE);
46 connection = netconfig_setup_dbus();
47 if (connection == NULL)
50 if (netconfig_network_state_create_and_init(connection) == NULL)
53 netconfig_register_signal();
55 if (netconfig_wifi_create_and_init(connection) == NULL)
58 /* If its environment uses Emulator, network configuration is set by emulator default */
59 netconfig_emulator_test_and_start();
61 g_main_loop_run(main_loop);
63 netconfig_deregister_signal();