4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@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.
31 #include <glib-object.h>
39 #include <communicator.h>
40 #include <user_request.h>
44 /* Hacking TcoreQueue */
45 struct tcore_queue_type {
50 static void _monitor_plugin(Server *s)
58 list = tcore_server_ref_plugins(s);
65 msg("Name: [%s]", tcore_plugin_get_description(p)->name);
67 str = tcore_plugin_get_filename(p);
68 msg(" - file: %s", str);
72 msg(" - addr: %p", p);
73 msg(" - userdata: %p", tcore_plugin_ref_user_data(p));
81 static void _monitor_storage(Server *s)
86 msg("-- Storages --");
88 list = tcore_server_ref_storages(s);
95 msg("Name: [%s]", tcore_storage_ref_name(strg));
96 msg(" - addr: %p", strg);
103 static void _monitor_communicator(Server *s)
108 msg("-- Communicators --");
110 list = tcore_server_ref_communicators(s);
117 msg("Name: [%s]", tcore_communicator_ref_name(comm));
118 msg(" - addr: %p", comm);
119 msg(" - parent_plugin: %p", tcore_communicator_ref_plugin(comm));
120 msg(" - userdata: %p", tcore_communicator_ref_user_data(comm));
127 static void _monitor_modems(Server *s)
134 list = tcore_server_ref_plugins(s);
138 for (; list != NULL; list = g_slist_next(list)) {
143 tcore_server_print_modems(p);
147 void monitor_server_state(Server *s)
151 _monitor_communicator(s);