1 /** 2 * Copyright (C) 2010 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef MOCK_RIL_RESPONSES_H_ 18 #define MOCK_RIL_RESPONSES_H_ 19 20 #include <v8.h> 21 22 /** 23 * Send a ril request complete, data is optional 24 * 25 * args[0] = rilErrCode 26 * args[1] = cmd 27 * args[2] = token 28 * args[3] = optional data 29 */ 30 #define REQUEST_COMPLETE_REQUIRED_CMDS 3 31 #define REQUEST_COMPLETE_RIL_ERR_CODE_INDEX 0 32 #define REQUEST_COMPLETE_CMD_INDEX 1 33 #define REQUEST_COMPLETE_TOKEN_INDEX 2 34 #define REQUEST_COMPLETE_DATA_INDEX 3 35 v8::Handle<v8::Value> SendRilRequestComplete(const v8::Arguments& args); 36 37 /** 38 * Send a ril unsolicited response, buffer is optional 39 * 40 * args[0] = cmd 41 * args[1] = optional data 42 */ 43 #define UNSOL_RESPONSE_REQUIRED_CMDS 1 44 #define UNSOL_RESPONSE_CMD_INDEX 0 45 #define UNSOL_RESPONSE_DATA_INDEX 1 46 v8::Handle<v8::Value> SendRilUnsolicitedResponse(const v8::Arguments& args); 47 48 // Initialize module 49 int responsesInit(v8::Handle<v8::Context> context); 50 51 #endif // MOCK_RIL_RESPONSES_H_ 52