Add API to create new containers
[platform/core/security/vasum.git] / server / host-dbus-definitions.hpp
1 /*
2  *  Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *  Contact: Piotr Bartosiewicz <p.bartosiewi@partner.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 /**
20  * @file
21  * @author  Piotr Bartosiewicz (p.bartosiewi@partner.samsung.com)
22  * @brief   Host dbus api definitions
23  */
24
25 #ifndef SERVER_HOST_DBUS_DEFINITIONS_HPP
26 #define SERVER_HOST_DBUS_DEFINITIONS_HPP
27
28 #include "common-dbus-definitions.hpp"
29
30
31 namespace security_containers {
32 namespace api {
33 namespace host {
34
35 const std::string BUS_NAME                       = "org.tizen.containers.host";
36 const std::string OBJECT_PATH                    = "/org/tizen/containers/host";
37 const std::string INTERFACE                      = "org.tizen.containers.host.manager";
38
39 const std::string ERROR_CONTAINER_STOPPED        = "org.tizen.containers.host.Error.ContainersStopped";
40 const std::string ERROR_CONTAINER_CREATE_FAILED  = "org.tizen.containers.host.Error.ContainerCreateFailed";
41
42 const std::string METHOD_GET_CONTAINER_DBUSES    = "GetContainerDbuses";
43 const std::string METHOD_GET_CONTAINER_ID_LIST   = "GetContainerIds";
44 const std::string METHOD_GET_ACTIVE_CONTAINER_ID = "GetActiveContainerId";
45 const std::string METHOD_SET_ACTIVE_CONTAINER    = "SetActiveContainer";
46 const std::string METHOD_ADD_CONTAINER           = "AddContainer";
47
48 const std::string SIGNAL_CONTAINER_DBUS_STATE    = "ContainerDbusState";
49
50
51 const std::string DEFINITION =
52     "<node>"
53     "  <interface name='" + INTERFACE + "'>"
54     "    <method name='" + METHOD_PROXY_CALL + "'>"
55     "      <arg type='s' name='target' direction='in'/>"
56     "      <arg type='s' name='busName' direction='in'/>"
57     "      <arg type='s' name='objectPath' direction='in'/>"
58     "      <arg type='s' name='interface' direction='in'/>"
59     "      <arg type='s' name='method' direction='in'/>"
60     "      <arg type='v' name='parameters' direction='in'/>"
61     "      <arg type='v' name='result' direction='out'/>"
62     "    </method>"
63     "    <method name='" + METHOD_GET_CONTAINER_DBUSES + "'>"
64     "      <arg type='a{ss}' name='dbuses' direction='out'/>"
65     "    </method>"
66     "    <method name='" + METHOD_GET_CONTAINER_ID_LIST + "'>"
67     "      <arg type='as' name='result' direction='out'/>"
68     "    </method>"
69     "    <method name='" + METHOD_GET_ACTIVE_CONTAINER_ID + "'>"
70     "      <arg type='s' name='result' direction='out'/>"
71     "    </method>"
72     "    <method name='" + METHOD_SET_ACTIVE_CONTAINER + "'>"
73     "      <arg type='s' name='id' direction='in'/>"
74     "    </method>"
75     "    <method name='" + METHOD_ADD_CONTAINER + "'>"
76     "      <arg type='s' name='id' direction='in'/>"
77     "    </method>"
78     "    <signal name='" + SIGNAL_CONTAINER_DBUS_STATE + "'>"
79     "      <arg type='s' name='container'/>"
80     "      <arg type='s' name='dbusAddress'/>"
81     "    </signal>"
82     "  </interface>"
83     "</node>";
84
85 } // namespace host
86 } // namespace api
87 } // namespace security_containers
88
89
90 #endif // SERVER_HOST_DBUS_DEFINITIONS_HPP