2 * PacketService Control Module
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: DongHoo Park <donghoo.park@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.
24 #include <dbus/dbus-glib.h>
31 static gboolean on_load()
33 dbg("PacketService plugin load!");
37 static gboolean on_init(TcorePlugin *p)
40 DBusGConnection *conn;
45 conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
47 err("fail to get dbus(%s)", error->message);
50 dbg("get dbus connection(%p)", conn);
52 dbg("plugin pointer (%p)", p);
53 rv = _ps_context_initialize(p);
55 dbg("fail to initialize context global variable");
59 master = _ps_master_create_master(conn, p);
60 rv = _ps_master_create_modems(master);
62 dbg("initialized PacketService plugin!");
66 static void on_unload(TcorePlugin *p)
72 struct tcore_plugin_define_desc plugin_define_desc =
74 .name = "PACKETSERVICE",
75 .priority = TCORE_PLUGIN_PRIORITY_MID + 1,