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