Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Side by Side Diff: services/service_manager/public/cpp/names.h

Issue 2427443002: Replace remaining shell references with service manager (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_NAMES_H_ 5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_NAMES_H_
6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_NAMES_H_ 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_NAMES_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace service_manager { 10 namespace service_manager {
11 11
12 extern const char kNameType_Service[]; 12 extern const char kNameType_Service[];
13 extern const char kNameType_Exe[]; 13 extern const char kNameType_Exe[];
14 14
15 // Services are identified by structured "names", of the form: 15 // Services are identified by structured "names", of the form:
16 // 16 //
17 // type:path. 17 // type:path.
18 // 18 //
19 // The type field tells the shell how to load the service. Two types are 19 // The type field tells the service manager how to load the service. Two types
20 // are
20 // recognized: 21 // recognized:
21 // 22 //
22 // service 23 // service
23 // A synthetic service name, which may be packaged as part of another service 24 // A synthetic service name, which may be packaged as part of another service
24 // (via ServiceFactory) or as a standalone .library. .library files live 25 // (via ServiceFactory) or as a standalone .library. .library files live
25 // within a directory hierarchy alongside the service manager executable. 26 // within a directory hierarchy alongside the service manager executable.
26 // 27 //
27 // exe 28 // exe
28 // Represents a native executable on the host platform, expected to live 29 // Represents a native executable on the host platform, expected to live
29 // alongside the service manager executable. Executables launched via this 30 // alongside the service manager executable. Executables launched via this
30 // mechanism are passed a handle to the service manager on the command line 31 // mechanism are passed a handle to the service manager on the command line
31 // and are expected to bind a ServiceRequest enabling further communication 32 // and are expected to bind a ServiceRequest enabling further communication
32 // with the Service Manager. The path component contains the executable name, 33 // with the Service Manager. The path component contains the executable name,
33 // minus any platform specific extension. 34 // minus any platform specific extension.
34 // 35 //
35 // Other types may be supplied but are not recognized by any of the 36 // Other types may be supplied but are not recognized by any of the
36 // NativeRunners, and as such custom loaders must be specified for such names. 37 // NativeRunners, and as such custom loaders must be specified for such names.
37 // 38 //
38 // Any name type may serve as an alias for any other name type. Aliasing is 39 // Any name type may serve as an alias for any other name type. Aliasing is
39 // resolved implicitly by the Shell. 40 // resolved implicitly by the Service Manager.
40 41
41 // Returns true if the name is a valid form, i.e. type:path. path cannot start 42 // Returns true if the name is a valid form, i.e. type:path. path cannot start
42 // with a "//" sequence. These are _not_ urls. 43 // with a "//" sequence. These are _not_ urls.
43 bool IsValidName(const std::string& name); 44 bool IsValidName(const std::string& name);
44 45
45 // Get the type component of the specified name. 46 // Get the type component of the specified name.
46 std::string GetNameType(const std::string& name); 47 std::string GetNameType(const std::string& name);
47 48
48 // Get the path component of the specified name. 49 // Get the path component of the specified name.
49 std::string GetNamePath(const std::string& name); 50 std::string GetNamePath(const std::string& name);
50 51
51 } // namespace service_manager 52 } // namespace service_manager
52 53
53 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_NAMES_H_ 54 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_NAMES_H_
OLDNEW
« no previous file with comments | « services/service_manager/public/cpp/lib/service_test.cc ('k') | services/service_manager/public/cpp/service_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698