| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 // C++ wrapper around C reverse service objects. | 7 // C++ wrapper around C reverse service objects. |
| 8 | 8 |
| 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_REVERSE_SOCKET_H_ | 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_REVERSE_SOCKET_H_ |
| 10 #define NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_REVERSE_SOCKET_H_ | 10 #define NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_REVERSE_SOCKET_H_ |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 NaClThreadIfFactoryFunction thread_factory_fn, | 36 NaClThreadIfFactoryFunction thread_factory_fn, |
| 37 void* thread_factory_data) | 37 void* thread_factory_data) |
| 38 : conn_cap_(conn_cap), | 38 : conn_cap_(conn_cap), |
| 39 handlers_(handlers), | 39 handlers_(handlers), |
| 40 thread_factory_fn_(thread_factory_fn), | 40 thread_factory_fn_(thread_factory_fn), |
| 41 thread_factory_data_(thread_factory_data), | 41 thread_factory_data_(thread_factory_data), |
| 42 rev_service_(NULL) {} | 42 rev_service_(NULL) {} |
| 43 | 43 |
| 44 ~ReverseSocket(); // dtor will delete conn_cap | 44 ~ReverseSocket(); // dtor will delete conn_cap |
| 45 | 45 |
| 46 bool StartServiceCb(void (*exit_cb)(void *server_instance_data, |
| 47 int server_loop_ret), |
| 48 void *server_instance_data); |
| 49 |
| 50 /* StartService just invokes StartServiceCb with exit_cb boudn to NULL */ |
| 46 bool StartService(void* server_instance_data); | 51 bool StartService(void* server_instance_data); |
| 47 | 52 |
| 48 private: | 53 private: |
| 49 NACL_DISALLOW_COPY_AND_ASSIGN(ReverseSocket); | 54 NACL_DISALLOW_COPY_AND_ASSIGN(ReverseSocket); |
| 50 | 55 |
| 51 nacl::DescWrapper* conn_cap_; | 56 nacl::DescWrapper* conn_cap_; |
| 52 NaClSrpcHandlerDesc const* handlers_; | 57 NaClSrpcHandlerDesc const* handlers_; |
| 53 | 58 |
| 54 NaClThreadIfFactoryFunction thread_factory_fn_; | 59 NaClThreadIfFactoryFunction thread_factory_fn_; |
| 55 void* thread_factory_data_; | 60 void* thread_factory_data_; |
| 56 NaClSimpleRevService* rev_service_; | 61 NaClSimpleRevService* rev_service_; |
| 57 }; | 62 }; |
| 58 } // namespace nacl | 63 } // namespace nacl |
| 59 | 64 |
| 60 #endif | 65 #endif |
| OLD | NEW |