Start&stop support added to DBusAccess
[platform/core/test/security-tests.git] / tests / common / dbus_access.h
1 /*
2  * Copyright (c) 2013-2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Contact: Bumjin Im <bj.im@samsung.com>
5  *
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
9  *
10  *   http://www.apache.org/licenses/LICENSE-2.0
11  *
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
17  */
18 /*
19  * @file        dbus_access.h
20  * @author      Zbigniew Jasinski (z.jasinski@samsung.com)
21  * @version     1.0
22  * @brief       Functions used in security-tests package for restarting Security Server through
23  *              SystemD DBuS interface.
24  */
25 #ifndef _DBUS_ACCESS_H_
26 #define _DBUS_ACCESS_H_
27
28 #include <memory>
29
30 class DBusAccess {
31 public:
32     class Impl;
33
34     DBusAccess(const char* const object);
35     ~DBusAccess();
36
37     void restart();
38     void start();
39     void stop();
40
41 private:
42     void sendResetFailed();
43
44     std::unique_ptr<DBusAccess::Impl> m_impl;
45 };
46
47 #endif // _DBUS_ACCESS_H_