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_SHELL_PUBLIC_C_MAIN_H_ | 5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_C_MAIN_H_ |
6 #define SERVICES_SHELL_PUBLIC_C_MAIN_H_ | 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_C_MAIN_H_ |
7 | 7 |
8 #include "mojo/public/c/system/types.h" | 8 #include "mojo/public/c/system/types.h" |
9 | 9 |
10 // Implement ServiceMain directly as the entry point for a service. | 10 // Implement ServiceMain directly as the entry point for a service. |
11 // | 11 // |
12 // MojoResult ServiceMain(MojoHandle service_request) { | 12 // MojoResult ServiceMain(MojoHandle service_request) { |
13 // ... | 13 // ... |
14 // } | 14 // } |
15 // | 15 // |
16 | 16 |
17 #if defined(__cplusplus) | 17 #if defined(__cplusplus) |
18 extern "C" { | 18 extern "C" { |
19 #endif | 19 #endif |
20 | 20 |
21 #if defined(WIN32) | 21 #if defined(WIN32) |
22 __declspec(dllexport) MojoResult | 22 __declspec(dllexport) MojoResult |
23 __cdecl ServiceMain(MojoHandle application_request); | 23 __cdecl ServiceMain(MojoHandle application_request); |
24 #else // !defined(WIN32) | 24 #else // !defined(WIN32) |
25 __attribute__((visibility("default"))) MojoResult | 25 __attribute__((visibility("default"))) MojoResult |
26 ServiceMain(MojoHandle service_provider_handle); | 26 ServiceMain(MojoHandle service_provider_handle); |
27 #endif // defined(WIN32) | 27 #endif // defined(WIN32) |
28 | 28 |
29 #ifdef __cplusplus | 29 #ifdef __cplusplus |
30 } // extern "C" | 30 } // extern "C" |
31 #endif | 31 #endif |
32 | 32 |
33 #endif // SERVICES_SHELL_PUBLIC_C_MAIN_H_ | 33 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_C_MAIN_H_ |
OLD | NEW |