| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2010 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 SANDBOX_SRC_CROSSCALL_SERVER_H_ | 5 #ifndef SANDBOX_SRC_CROSSCALL_SERVER_H_ |
| 6 #define SANDBOX_SRC_CROSSCALL_SERVER_H_ | 6 #define SANDBOX_SRC_CROSSCALL_SERVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/basictypes.h" |
| 10 #include "base/callback.h" | 11 #include "base/callback.h" |
| 11 #include "sandbox/src/crosscall_params.h" | 12 #include "sandbox/src/crosscall_params.h" |
| 12 | 13 |
| 13 // This is the IPC server interface for CrossCall: The IPC for the Sandbox | 14 // This is the IPC server interface for CrossCall: The IPC for the Sandbox |
| 14 // On the server, CrossCall needs two things: | 15 // On the server, CrossCall needs two things: |
| 15 // 1) threads: Or better said, someone to provide them, that is what the | 16 // 1) threads: Or better said, someone to provide them, that is what the |
| 16 // ThreadProvider interface is defined for. These thread(s) are | 17 // ThreadProvider interface is defined for. These thread(s) are |
| 17 // the ones that will actually execute the IPC data retrieval. | 18 // the ones that will actually execute the IPC data retrieval. |
| 18 // | 19 // |
| 19 // 2) a dispatcher: This interface represents the way to route and process | 20 // 2) a dispatcher: This interface represents the way to route and process |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 size_t* output_size); | 97 size_t* output_size); |
| 97 | 98 |
| 98 // Provides IPCinput parameter raw access: | 99 // Provides IPCinput parameter raw access: |
| 99 // index : the parameter to read; 0 is the first parameter | 100 // index : the parameter to read; 0 is the first parameter |
| 100 // returns NULL if the parameter is non-existent. If it exists it also | 101 // returns NULL if the parameter is non-existent. If it exists it also |
| 101 // returns the size in *size | 102 // returns the size in *size |
| 102 void* GetRawParameter(size_t index, size_t* size, ArgType* type); | 103 void* GetRawParameter(size_t index, size_t* size, ArgType* type); |
| 103 | 104 |
| 104 // Gets a parameter that is four bytes in size. | 105 // Gets a parameter that is four bytes in size. |
| 105 // Returns false if the parameter does not exist or is not 32 bits wide. | 106 // Returns false if the parameter does not exist or is not 32 bits wide. |
| 106 bool GetParameter32(size_t index, void* param); | 107 bool GetParameter32(size_t index, uint32* param); |
| 108 |
| 109 // Gets a parameter that is void pointer in size. |
| 110 // Returns false if the parameter does not exist or is not void pointer sized. |
| 111 bool GetParameterVoidPtr(size_t index, void** param); |
| 107 | 112 |
| 108 // Gets a parameter that is a string. Returns false if the parameter does not | 113 // Gets a parameter that is a string. Returns false if the parameter does not |
| 109 // exist. | 114 // exist. |
| 110 bool GetParameterStr(size_t index, std::wstring* string); | 115 bool GetParameterStr(size_t index, std::wstring* string); |
| 111 | 116 |
| 112 // Gets a parameter that is an in/out buffer. Returns false is the parameter | 117 // Gets a parameter that is an in/out buffer. Returns false is the parameter |
| 113 // does not exist or if the size of the actual parameter is not equal to the | 118 // does not exist or if the size of the actual parameter is not equal to the |
| 114 // expected size. | 119 // expected size. |
| 115 bool GetParameterPtr(size_t index, size_t expected_size, void** pointer); | 120 bool GetParameterPtr(size_t index, size_t expected_size, void** pointer); |
| 116 | 121 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 CallbackGeneric callback; | 215 CallbackGeneric callback; |
| 211 }; | 216 }; |
| 212 | 217 |
| 213 // List of IPC Calls supported by the class. | 218 // List of IPC Calls supported by the class. |
| 214 std::vector<IPCCall> ipc_calls_; | 219 std::vector<IPCCall> ipc_calls_; |
| 215 }; | 220 }; |
| 216 | 221 |
| 217 } // namespace sandbox | 222 } // namespace sandbox |
| 218 | 223 |
| 219 #endif // SANDBOX_SRC_CROSSCALL_SERVER_H_ | 224 #endif // SANDBOX_SRC_CROSSCALL_SERVER_H_ |
| OLD | NEW |