2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Contact: Bumjin Im <bj.im@samsung.com>
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
20 * @author Zbigniew Jasinski (z.jasinski@samsung.com)
22 * @brief Functions used in security-tests package for restarting Security Server through
23 * SystemD DBuS interface.
25 #ifndef _DBUS_ACCESS_H_
26 #define _DBUS_ACCESS_H_
28 #include <dbus/dbus.h>
29 #include <dbus-glib.h>
30 #include <glib-object.h>
40 virtual ~DBusAccess();
44 void newMethodCall(const std::string& method);
46 void sendMsgWithReply();
48 void handleMsgRestartReply();
49 void handleMsgRestartSignal();
50 static DBusHandlerResult signalFilter(DBusConnection *, DBusMessage *message, void *);
53 void sendRestartToSS();
54 void sendResetFailedToSS();
56 DBusConnection *m_conn;
59 DBusPendingCall *m_pending;
62 std::string m_signal_type;
63 std::string m_signal_interface;
64 std::string m_signal_member;
65 std::string m_signal_path;
67 std::string m_signal_match;
69 std::string m_dbus_client_name;
74 #endif // _DBUS_ACCESS_H_