Lines Matching refs:method

96 string GenerateArgList(const AidlTypenames& typenames, const AidlMethod& method,  in GenerateArgList()  argument
99 for (const unique_ptr<AidlArgument>& a : method.GetArguments()) { in GenerateArgList()
143 if (method.GetType().GetName() != "void") { in GenerateArgList()
146 literal = CppNameOf(method.GetType(), typenames) + "*"; in GenerateArgList()
161 void GenerateMethodDecl(CodeWriter& out, const AidlTypenames& types, const AidlMethod& method, in GenerateMethodDecl() argument
164 out << "::android::binder::Status " << clazz_prefix << method.GetName() << "(" in GenerateMethodDecl()
165 << GenerateArgList(types, method, /*for_declartion=*/true, /*type_name_only=*/false) << ")"; in GenerateMethodDecl()
169 const AidlInterface& interface, const AidlMethod& method, in GenerateClientTransaction() argument
175 GenerateMethodDecl(out, typenames, method, bp_name); in GenerateClientTransaction()
197 kTraceVarName, interface.GetName().c_str(), method.GetName().c_str()); in GenerateClientTransaction()
201 out << GenLogBeforeExecute(bp_name, method, false /* isServer */, false /* isNdk */); in GenerateClientTransaction()
204 if (method.IsNew() && ShouldForceDowngradeFor(CommunicationSide::WRITE)) { in GenerateClientTransaction()
216 for (const auto& a : method.GetArguments()) { in GenerateClientTransaction()
239 if (method.IsOneway()) flags.push_back("::android::IBinder::FLAG_ONEWAY"); in GenerateClientTransaction()
243 GetTransactionIdFor(bn_name, method).c_str(), kDataVarName, kReplyVarName, in GenerateClientTransaction()
249 for (const auto& a : method.GetArguments()) { in GenerateClientTransaction()
256 if (method.GetType().GetName() != "void") { in GenerateClientTransaction()
259 if (method.IsNew() && ShouldForceDowngradeFor(CommunicationSide::WRITE)) { in GenerateClientTransaction()
265 out.Write(" return %s::getDefaultImpl()->%s(%s);\n", i_name.c_str(), method.GetName().c_str(), in GenerateClientTransaction()
270 if (!method.IsOneway()) { in GenerateClientTransaction()
287 if (method.GetType().GetName() != "void") { in GenerateClientTransaction()
289 ParcelReadMethodOf(method.GetType(), typenames).c_str(), in GenerateClientTransaction()
290 ParcelReadCastOf(method.GetType(), typenames, kReturnVarName).c_str()); in GenerateClientTransaction()
294 for (const AidlArgument* a : method.GetOutArguments()) { in GenerateClientTransaction()
313 out << GenLogAfterExecute(bp_name, interface, method, kStatusVarName, kReturnVarName, in GenerateClientTransaction()
323 const AidlMethod& method, const Options& options) { in GenerateClientMetaTransaction() argument
324 AIDL_FATAL_IF(method.IsUserDefined(), method); in GenerateClientMetaTransaction()
327 if (method.GetName() == kGetInterfaceVersion && options.Version() > 0) { in GenerateClientMetaTransaction()
338 << GetTransactionIdFor(bn_name, method) << ", data, &reply);\n" in GenerateClientMetaTransaction()
351 if (method.GetName() == kGetInterfaceHash && !options.Hash().empty()) { in GenerateClientMetaTransaction()
359 << GetTransactionIdFor(bn_name, method) << ", data, &reply);\n" in GenerateClientMetaTransaction()
411 for (const auto& method : interface.GetMethods()) { in GenerateClientSource() local
412 if (method->IsUserDefined()) { in GenerateClientSource()
413 GenerateClientTransaction(out, typenames, interface, *method, options); in GenerateClientSource()
415 GenerateClientMetaTransaction(out, interface, *method, options); in GenerateClientSource()
464 const AidlMethod& method, const AidlTypenames& typenames, in GenerateServerTransaction() argument
467 if (method.IsNew() && ShouldForceDowngradeFor(CommunicationSide::READ)) { in GenerateServerTransaction()
476 for (const unique_ptr<AidlArgument>& a : method.GetArguments()) { in GenerateServerTransaction()
481 if (method.GetType().GetName() != "void") { in GenerateServerTransaction()
482 out.Write("%s %s;\n", CppNameOf(method.GetType(), typenames).c_str(), kReturnVarName); in GenerateServerTransaction()
494 kTraceVarName, interface.GetName().c_str(), method.GetName().c_str()); in GenerateServerTransaction()
497 if (interface.EnforceExpression() || method.GetType().EnforceExpression()) { in GenerateServerTransaction()
502 for (const auto& a: method.GetArguments()) { in GenerateServerTransaction()
523 out << GenLogBeforeExecute(bn_name, method, true /* isServer */, false /* isNdk */); in GenerateServerTransaction()
526 if (!method.GetArguments().empty() && options.GetMinSdkVersion() >= SDK_VERSION_Tiramisu) { in GenerateServerTransaction()
534 out.Write("%s %s(%s(%s));\n", kBinderStatusLiteral, kStatusVarName, method.GetName().c_str(), in GenerateServerTransaction()
535 GenerateArgList(typenames, method, /*for_declaration=*/false, /*type_name_only=*/false) in GenerateServerTransaction()
539 out << GenLogAfterExecute(bn_name, interface, method, kStatusVarName, kReturnVarName, in GenerateServerTransaction()
544 if (!method.IsOneway()) { in GenerateServerTransaction()
553 if (method.GetType().GetName() != "void") { in GenerateServerTransaction()
555 ParcelWriteMethodOf(method.GetType(), typenames).c_str(), in GenerateServerTransaction()
556 ParcelWriteCastOf(method.GetType(), typenames, kReturnVarName).c_str()); in GenerateServerTransaction()
560 for (const AidlArgument* a : method.GetOutArguments()) { in GenerateServerTransaction()
572 const AidlMethod& method, const Options& options) { in GenerateServerMetaTransaction() argument
573 AIDL_FATAL_IF(method.IsUserDefined(), method); in GenerateServerMetaTransaction()
576 if (method.GetName() == kGetInterfaceVersion && options.Version() > 0) { in GenerateServerMetaTransaction()
581 if (method.GetName() == kGetInterfaceHash && !options.Hash().empty()) { in GenerateServerMetaTransaction()
615 for (const auto& method : interface.GetMethods()) { in GenerateServerOnTransact() local
616 out.Write("case %s:\n", GetTransactionIdFor(bn_name, *method).c_str()); in GenerateServerOnTransact()
619 if (method->IsUserDefined()) { in GenerateServerOnTransact()
620 GenerateServerTransaction(out, interface, *method, typenames, options); in GenerateServerOnTransact()
622 GenerateServerMetaTransaction(out, interface, *method, options); in GenerateServerOnTransact()
750 for (const auto& method : interface.GetMethods()) { in GenerateClientClassDecl() local
751 if (method->IsUserDefined()) { in GenerateClientClassDecl()
752 GenerateMethodDecl(out, typenames, *method, /*clazz=*/""); in GenerateClientClassDecl()
754 GenerateDeprecated(out, *method); in GenerateClientClassDecl()
756 } else if (method->GetName() == kGetInterfaceVersion && options.Version() > 0) { in GenerateClientClassDecl()
757 out << "int32_t " << method->GetName() << "() override;\n"; in GenerateClientClassDecl()
758 } else if (method->GetName() == kGetInterfaceHash && !options.Hash().empty()) { in GenerateClientClassDecl()
759 out << "std::string " << method->GetName() << "() override;\n"; in GenerateClientClassDecl()
852 for (const auto& method : interface.GetMethods()) { in GenerateServerClassDecl() local
853 out << "static constexpr uint32_t TRANSACTION_" << method->GetName() << " = " in GenerateServerClassDecl()
854 << "::android::IBinder::FIRST_CALL_TRANSACTION + " << std::to_string(method->GetId()) in GenerateServerClassDecl()
884 for (const auto& method : interface.GetMethods()) { in GenerateServerClassDecl() local
885 if (method->IsUserDefined()) { in GenerateServerClassDecl()
886 GenerateMethodDecl(out, typenames, *method, /*clazz=*/""); in GenerateServerClassDecl()
888 GenerateDeprecated(out, *method); in GenerateServerClassDecl()
895 for (const auto& arg : method->GetArguments()) { in GenerateServerClassDecl()
914 if (method->GetType().GetName() != "void") { in GenerateServerClassDecl()
915 if (isDelegateable(method->GetType())) { in GenerateServerClassDecl()
916 outBinders.push_back({kReturnVarName, method->GetType()}); in GenerateServerClassDecl()
926 out << "return " << kDelegateImplVarName << "->" << method->GetName() << "(" in GenerateServerClassDecl()
929 out << "auto _status = " << kDelegateImplVarName << "->" << method->GetName() << "(" in GenerateServerClassDecl()
938 } else if (method->GetName() == kGetInterfaceVersion && options.Version()) { in GenerateServerClassDecl()
948 } else if (method->GetName() == kGetInterfaceHash && !options.Hash().empty()) { in GenerateServerClassDecl()
1055 for (const auto& method : interface.GetMethods()) { in GenerateInterfaceClassDecl() local
1056 if (method->IsUserDefined()) { in GenerateInterfaceClassDecl()
1058 GenerateMethodDecl(out, typenames, *method, /*clazz=*/""); in GenerateInterfaceClassDecl()
1059 GenerateDeprecated(out, *method); in GenerateInterfaceClassDecl()
1061 } else if (method->GetName() == kGetInterfaceVersion && options.Version() > 0) { in GenerateInterfaceClassDecl()
1062 out << "virtual int32_t " << method->GetName() << "() = 0;\n"; in GenerateInterfaceClassDecl()
1063 } else if (method->GetName() == kGetInterfaceHash && !options.Hash().empty()) { in GenerateInterfaceClassDecl()
1064 out << "virtual std::string " << method->GetName() << "() = 0;\n"; in GenerateInterfaceClassDecl()
1089 for (const auto& method : interface.GetMethods()) { in GenerateInterfaceClassDecl() local
1090 if (method->IsUserDefined()) { in GenerateInterfaceClassDecl()
1091 out << "::android::binder::Status " << method->GetName() << "(" in GenerateInterfaceClassDecl()
1092 << GenerateArgList(typenames, *method, /*for_declaration=*/true, /*type_name_only=*/true) in GenerateInterfaceClassDecl()
1094 GenerateDeprecated(out, *method); in GenerateInterfaceClassDecl()
1098 } else if (method->GetName() == kGetInterfaceVersion && options.Version() > 0) { in GenerateInterfaceClassDecl()
1102 } else if (method->GetName() == kGetInterfaceHash && !options.Hash().empty()) { in GenerateInterfaceClassDecl()
1133 string method = ParcelReadMethodOf(variable->GetType(), typenames); in GenerateReadFromParcel() local
1143 out << "_aidl_ret_status = _aidl_parcel->" << method << "(" << arg << ");\n"; in GenerateReadFromParcel()
1162 string method = ParcelWriteMethodOf(variable->GetType(), typenames); in GenerateWriteToParcel() local
1168 out << "_aidl_ret_status = " << kParcelVarName << "->" << method << "(" << arg << ");\n"; in GenerateWriteToParcel()