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_CATALOG_ENTRY_H_ | 5 #ifndef SERVICES_CATALOG_ENTRY_H_ |
6 #define SERVICES_CATALOG_ENTRY_H_ | 6 #define SERVICES_CATALOG_ENTRY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const std::string& name() const { return name_; } | 42 const std::string& name() const { return name_; } |
43 void set_name(const std::string& name) { name_ = name; } | 43 void set_name(const std::string& name) { name_ = name; } |
44 const base::FilePath& path() const { return path_; } | 44 const base::FilePath& path() const { return path_; } |
45 void set_path(const base::FilePath& path) { path_ = path; } | 45 void set_path(const base::FilePath& path) { path_ = path; } |
46 const std::string& qualifier() const { return qualifier_; } | 46 const std::string& qualifier() const { return qualifier_; } |
47 void set_qualifier(const std::string& qualifier) { qualifier_ = qualifier; } | 47 void set_qualifier(const std::string& qualifier) { qualifier_ = qualifier; } |
48 const std::string& display_name() const { return display_name_; } | 48 const std::string& display_name() const { return display_name_; } |
49 void set_display_name(const std::string& display_name) { | 49 void set_display_name(const std::string& display_name) { |
50 display_name_ = display_name; | 50 display_name_ = display_name; |
51 } | 51 } |
52 const shell::CapabilitySpec& capabilities() const { return capabilities_; } | 52 const service_manager::CapabilitySpec& capabilities() const { |
53 void set_capabilities(const shell::CapabilitySpec& capabilities) { | 53 return capabilities_; |
| 54 } |
| 55 void set_capabilities(const service_manager::CapabilitySpec& capabilities) { |
54 capabilities_ = capabilities; | 56 capabilities_ = capabilities; |
55 } | 57 } |
56 const Entry* package() const { return package_; } | 58 const Entry* package() const { return package_; } |
57 void set_package(Entry* package) { package_ = package; } | 59 void set_package(Entry* package) { package_ = package; } |
58 | 60 |
59 std::vector<std::unique_ptr<Entry>> TakeChildren() { | 61 std::vector<std::unique_ptr<Entry>> TakeChildren() { |
60 return std::move(children_); | 62 return std::move(children_); |
61 } | 63 } |
62 | 64 |
63 private: | 65 private: |
64 std::string name_; | 66 std::string name_; |
65 base::FilePath path_; | 67 base::FilePath path_; |
66 std::string qualifier_; | 68 std::string qualifier_; |
67 std::string display_name_; | 69 std::string display_name_; |
68 shell::CapabilitySpec capabilities_; | 70 service_manager::CapabilitySpec capabilities_; |
69 Entry* package_ = nullptr; | 71 Entry* package_ = nullptr; |
70 std::vector<std::unique_ptr<Entry>> children_; | 72 std::vector<std::unique_ptr<Entry>> children_; |
71 }; | 73 }; |
72 | 74 |
73 } // namespace catalog | 75 } // namespace catalog |
74 | 76 |
75 namespace mojo { | 77 namespace mojo { |
76 template <> | 78 template <> |
77 struct TypeConverter<shell::mojom::ResolveResultPtr, catalog::Entry> { | 79 struct TypeConverter<service_manager::mojom::ResolveResultPtr, catalog::Entry> { |
78 static shell::mojom::ResolveResultPtr Convert(const catalog::Entry& input); | 80 static service_manager::mojom::ResolveResultPtr Convert( |
| 81 const catalog::Entry& input); |
79 }; | 82 }; |
80 | 83 |
81 template<> | 84 template<> |
82 struct TypeConverter<catalog::mojom::EntryPtr, catalog::Entry> { | 85 struct TypeConverter<catalog::mojom::EntryPtr, catalog::Entry> { |
83 static catalog::mojom::EntryPtr Convert(const catalog::Entry& input); | 86 static catalog::mojom::EntryPtr Convert(const catalog::Entry& input); |
84 }; | 87 }; |
85 | 88 |
86 } // namespace mojo | 89 } // namespace mojo |
87 | 90 |
88 #endif // SERVICES_CATALOG_ENTRY_H_ | 91 #endif // SERVICES_CATALOG_ENTRY_H_ |
OLD | NEW |