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_STORE_H_ | 5 #ifndef SERVICES_CATALOG_STORE_H_ |
6 #define SERVICES_CATALOG_STORE_H_ | 6 #define SERVICES_CATALOG_STORE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // Value is a string. | 21 // Value is a string. |
22 static const char kQualifierKey[]; | 22 static const char kQualifierKey[]; |
23 // Value is a string. | 23 // Value is a string. |
24 static const char kDisplayNameKey[]; | 24 static const char kDisplayNameKey[]; |
25 // Value is a dictionary. | 25 // Value is a dictionary. |
26 static const char kInterfaceProviderSpecsKey[]; | 26 static const char kInterfaceProviderSpecsKey[]; |
27 // Value is a dictionary. | 27 // Value is a dictionary. |
28 static const char kInterfaceProviderSpecs_ProvidesKey[]; | 28 static const char kInterfaceProviderSpecs_ProvidesKey[]; |
29 // Value is a dictionary. | 29 // Value is a dictionary. |
30 static const char kInterfaceProviderSpecs_RequiresKey[]; | 30 static const char kInterfaceProviderSpecs_RequiresKey[]; |
31 // Value is a dictionary. | |
32 static const char kInterfaceProvider_ConnectionSpecKey[]; | |
33 // Value is a list. | 31 // Value is a list. |
34 static const char kServicesKey[]; | 32 static const char kServicesKey[]; |
35 | 33 |
36 virtual ~Store() {} | 34 virtual ~Store() {} |
37 | 35 |
38 // Called during initialization to construct the Catalog's catalog. | 36 // Called during initialization to construct the Catalog's catalog. |
39 // Returns a serialized list of the services. Each entry in the returned list | 37 // Returns a serialized list of the services. Each entry in the returned list |
40 // corresponds to an app (as a dictionary). Each dictionary has a name, | 38 // corresponds to an app (as a dictionary). Each dictionary has a name, |
41 // display name and capabilities. The return value is owned by the caller. | 39 // display name and capabilities. The return value is owned by the caller. |
42 virtual const base::ListValue* GetStore() = 0; | 40 virtual const base::ListValue* GetStore() = 0; |
43 | 41 |
44 // Write the catalog to the store. Called when the Catalog learns of a newly | 42 // Write the catalog to the store. Called when the Catalog learns of a newly |
45 // encountered service. | 43 // encountered service. |
46 virtual void UpdateStore(std::unique_ptr<base::ListValue> store) = 0; | 44 virtual void UpdateStore(std::unique_ptr<base::ListValue> store) = 0; |
47 }; | 45 }; |
48 | 46 |
49 } // namespace catalog | 47 } // namespace catalog |
50 | 48 |
51 #endif // SERVICES_CATALOG_STORE_H_ | 49 #endif // SERVICES_CATALOG_STORE_H_ |
OLD | NEW |