| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // SRPC-abstraction wrappers around PPP_Printing functions. | 5 // SRPC-abstraction wrappers around PPP_Printing functions. |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "native_client/src/include/portability.h" | 9 #include "native_client/src/include/portability.h" |
| 10 #include "native_client/src/include/portability_process.h" | 10 #include "native_client/src/include/portability_process.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 NaClSrpcClosureRunner runner(done); | 39 NaClSrpcClosureRunner runner(done); |
| 40 | 40 |
| 41 uint32_t pp_formats = PPPPrintingInterface()->QuerySupportedFormats(instance); | 41 uint32_t pp_formats = PPPPrintingInterface()->QuerySupportedFormats(instance); |
| 42 *formats = static_cast<int32_t>(pp_formats); | 42 *formats = static_cast<int32_t>(pp_formats); |
| 43 | 43 |
| 44 DebugPrintf("PPP_Printing::QuerySupportedFormats: " | 44 DebugPrintf("PPP_Printing::QuerySupportedFormats: " |
| 45 "formats=%"NACL_PRId32"\n", *formats); | 45 "formats=%"NACL_PRId32"\n", *formats); |
| 46 rpc->result = NACL_SRPC_RESULT_OK; | 46 rpc->result = NACL_SRPC_RESULT_OK; |
| 47 } | 47 } |
| 48 | 48 |
| 49 void PppPrintingRpcServer::PPP_Printing_IsScalingDisabled( |
| 50 NaClSrpcRpc* rpc, |
| 51 NaClSrpcClosure* done, |
| 52 // inputs |
| 53 PP_Instance instance, |
| 54 // outputs |
| 55 bool* result) { |
| 56 rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
| 57 NaClSrpcClosureRunner runner(done); |
| 58 |
| 59 *result = PPPPrintingInterface()->IsScalingDisabled(instance); |
| 60 |
| 61 DebugPrintf("PPP_Printing::IsScalingDisabled: " |
| 62 "result=%"NACL_PRId32"\n", *result); |
| 63 rpc->result = NACL_SRPC_RESULT_OK; |
| 64 } |
| 65 |
| 49 void PppPrintingRpcServer::PPP_Printing_Begin( | 66 void PppPrintingRpcServer::PPP_Printing_Begin( |
| 50 NaClSrpcRpc* rpc, | 67 NaClSrpcRpc* rpc, |
| 51 NaClSrpcClosure* done, | 68 NaClSrpcClosure* done, |
| 52 // inputs | 69 // inputs |
| 53 PP_Instance instance, | 70 PP_Instance instance, |
| 54 nacl_abi_size_t print_settings_bytes, char* print_settings, | 71 nacl_abi_size_t print_settings_bytes, char* print_settings, |
| 55 // outputs | 72 // outputs |
| 56 int32_t* pages_required) { | 73 int32_t* pages_required) { |
| 57 rpc->result = NACL_SRPC_RESULT_APP_ERROR; | 74 rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
| 58 NaClSrpcClosureRunner runner(done); | 75 NaClSrpcClosureRunner runner(done); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // inputs | 116 // inputs |
| 100 PP_Instance instance) { | 117 PP_Instance instance) { |
| 101 rpc->result = NACL_SRPC_RESULT_APP_ERROR; | 118 rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
| 102 NaClSrpcClosureRunner runner(done); | 119 NaClSrpcClosureRunner runner(done); |
| 103 | 120 |
| 104 PPPPrintingInterface()->End(instance); | 121 PPPPrintingInterface()->End(instance); |
| 105 | 122 |
| 106 DebugPrintf("PPP_Printing::End\n"); | 123 DebugPrintf("PPP_Printing::End\n"); |
| 107 rpc->result = NACL_SRPC_RESULT_OK; | 124 rpc->result = NACL_SRPC_RESULT_OK; |
| 108 } | 125 } |
| OLD | NEW |