OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CAPABILITIES_H_ | 5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CAPABILITIES_H_ |
6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CAPABILITIES_H_ | 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CAPABILITIES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 namespace shell { | 12 namespace service_manager { |
13 | 13 |
14 using Class = std::string; | 14 using Class = std::string; |
15 using Classes = std::set<std::string>; | 15 using Classes = std::set<std::string>; |
16 using Interface = std::string; | 16 using Interface = std::string; |
17 using Interfaces = std::set<std::string>; | 17 using Interfaces = std::set<std::string>; |
18 using Name = std::string; | 18 using Name = std::string; |
19 | 19 |
20 // See comments in | 20 // See comments in |
21 // services/service_manager/public/interfaces/capabilities.mojom for a | 21 // services/service_manager/public/interfaces/capabilities.mojom for a |
22 // description of CapabilitySpec. | 22 // description of CapabilitySpec. |
23 struct CapabilitySpec { | 23 struct CapabilitySpec { |
24 CapabilitySpec(); | 24 CapabilitySpec(); |
25 CapabilitySpec(const CapabilitySpec& other); | 25 CapabilitySpec(const CapabilitySpec& other); |
26 ~CapabilitySpec(); | 26 ~CapabilitySpec(); |
27 bool operator==(const CapabilitySpec& other) const; | 27 bool operator==(const CapabilitySpec& other) const; |
28 bool operator<(const CapabilitySpec& other) const; | 28 bool operator<(const CapabilitySpec& other) const; |
29 std::map<Class, Interfaces> provided; | 29 std::map<Class, Interfaces> provided; |
30 std::map<Name, Classes> required; | 30 std::map<Name, Classes> required; |
31 }; | 31 }; |
32 | 32 |
33 } // namespace shell | 33 } // namespace service_manager |
34 | 34 |
35 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CAPABILITIES_H_ | 35 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CAPABILITIES_H_ |
OLD | NEW |