4 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 #define METHOD_GET_SERIAL "GetSerial"
22 #define METHOD_GET_REVISION "GetHWRev"
31 msg = dbus_method_sync_with_reply(DEVICED_BUS_NAME, DEVICED_PATH_BOARD,
32 DEVICED_INTERFACE_BOARD, METHOD_GET_SERIAL, NULL, NULL);
34 _E("fail send message");
38 dbus_error_init(&err);
40 ret = dbus_message_get_args(msg, &err, DBUS_TYPE_STRING, &data, DBUS_TYPE_INT32, &val, DBUS_TYPE_INVALID);
42 _E("no message : [%s:%s]", err.name, err.message);
45 dbus_message_unref(msg);
46 dbus_error_free(&err);
48 _D("%s %d", data, val);
51 static void get_revision(void)
57 msg = dbus_method_sync_with_reply(DEVICED_BUS_NAME, DEVICED_PATH_BOARD,
58 DEVICED_INTERFACE_BOARD, METHOD_GET_REVISION, NULL, NULL);
60 _E("fail send message");
63 dbus_error_init(&err);
65 ret = dbus_message_get_args(msg, &err, DBUS_TYPE_INT32, &val, DBUS_TYPE_INVALID);
68 _E("no message : [%s:%s]", err.name, err.message);
71 dbus_message_unref(msg);
72 dbus_error_free(&err);
73 _E("%s-%s : %d", DEVICED_INTERFACE_BOARD, METHOD_GET_REVISION, val);
81 static void board_init(void *data)
88 static void board_exit(void *data)
93 static int board_unit(int argc, char **argv)
100 static const struct test_ops board_test_ops = {
101 .priority = TEST_PRIORITY_NORMAL,
108 TEST_OPS_REGISTER(&board_test_ops)