Lines Matching refs:method
96 ArgList BuildArgList(const AidlTypenames& typenames, const AidlMethod& method, bool for_declaration, in BuildArgList() argument
100 for (const unique_ptr<AidlArgument>& a : method.GetArguments()) { in BuildArgList()
142 if (method.GetType().GetName() != "void") { in BuildArgList()
145 literal = CppNameOf(method.GetType(), typenames) + "*"; in BuildArgList()
158 unique_ptr<Declaration> BuildMethodDecl(const AidlMethod& method, const AidlTypenames& typenames, in BuildMethodDecl() argument
169 new MethodDecl{kBinderStatusLiteral, method.GetName(), in BuildMethodDecl()
170 BuildArgList(typenames, method, true /* for method decl */), modifiers}}; in BuildMethodDecl()
173 unique_ptr<Declaration> BuildMetaMethodDecl(const AidlMethod& method, const AidlTypenames&, in BuildMetaMethodDecl() argument
175 CHECK(!method.IsUserDefined()); in BuildMetaMethodDecl()
176 if (method.GetName() == kGetInterfaceVersion && options.Version()) { in BuildMetaMethodDecl()
189 if (method.GetName() == kGetInterfaceHash && !options.Hash().empty()) { in BuildMetaMethodDecl()
253 const AidlMethod& method, const Options& options) { in DefineClientTransaction() argument
257 new MethodImpl{kBinderStatusLiteral, bp_name, method.GetName(), in DefineClientTransaction()
258 ArgList{BuildArgList(typenames, method, true /* for method decl */)}}}; in DefineClientTransaction()
276 kTraceVarName, interface.GetName().c_str(), method.GetName().c_str())); in DefineClientTransaction()
280 b->AddLiteral(GenLogBeforeExecute(bp_name, method, false /* isServer */, false /* isNdk */), in DefineClientTransaction()
292 for (const auto& a: method.GetArguments()) { in DefineClientTransaction()
299 const string& method = ParcelWriteMethodOf(a->GetType(), typenames); in DefineClientTransaction() local
302 new MethodCall(StringPrintf("%s.%s", kDataVarName, method.c_str()), in DefineClientTransaction()
317 string transaction_code = GetTransactionIdFor(method); in DefineClientTransaction()
322 if (method.IsOneway()) { in DefineClientTransaction()
334 for (const auto& a : method.GetArguments()) { in DefineClientTransaction()
341 if (method.GetType().GetName() != "void") { in DefineClientTransaction()
348 i_name.c_str(), i_name.c_str(), method.GetName().c_str(), in DefineClientTransaction()
354 if (!method.IsOneway()) { in DefineClientTransaction()
374 if (method.GetType().GetName() != "void") { in DefineClientTransaction()
375 const string& method_call = ParcelReadMethodOf(method.GetType(), typenames); in DefineClientTransaction()
379 ParcelReadCastOf(method.GetType(), typenames, kReturnVarName)))); in DefineClientTransaction()
383 for (const AidlArgument* a : method.GetOutArguments()) { in DefineClientTransaction()
387 string method = ParcelReadMethodOf(a->GetType(), typenames); in DefineClientTransaction() local
391 new MethodCall(StringPrintf("%s.%s", kReplyVarName, method.c_str()), in DefineClientTransaction()
407 b->AddLiteral(GenLogAfterExecute(bp_name, interface, method, kStatusVarName, kReturnVarName, in DefineClientTransaction()
419 const AidlMethod& method, in DefineClientMetaTransaction() argument
421 CHECK(!method.IsUserDefined()); in DefineClientMetaTransaction()
422 if (method.GetName() == kGetInterfaceVersion && options.Version() > 0) { in DefineClientMetaTransaction()
435 << " ::android::status_t err = remote()->transact(" << GetTransactionIdFor(method) in DefineClientMetaTransaction()
449 if (method.GetName() == kGetInterfaceHash && !options.Hash().empty()) { in DefineClientMetaTransaction()
459 << " ::android::status_t err = remote()->transact(" << GetTransactionIdFor(method) in DefineClientMetaTransaction()
512 for (const auto& method : interface.GetMethods()) { in BuildClientSource() local
514 if (method->IsUserDefined()) { in BuildClientSource()
515 m = DefineClientTransaction(typenames, interface, *method, options); in BuildClientSource()
517 m = DefineClientMetaTransaction(typenames, interface, *method, options); in BuildClientSource()
530 const AidlMethod& method, const Options& options, StatementBlock* b) { in HandleServerTransaction() argument
533 for (const unique_ptr<AidlArgument>& a : method.GetArguments()) { in HandleServerTransaction()
540 if (method.GetType().GetName() != "void") { in HandleServerTransaction()
541 string type = CppNameOf(method.GetType(), typenames); in HandleServerTransaction()
558 kTraceVarName, interface.GetName().c_str(), method.GetName().c_str())); in HandleServerTransaction()
562 for (const auto& a: method.GetArguments()) { in HandleServerTransaction()
587 b->AddLiteral(GenLogBeforeExecute(bn_name, method, true /* isServer */, false /* isNdk */), in HandleServerTransaction()
593 method.GetName(), BuildArgList(typenames, method, false /* not for method decl */))); in HandleServerTransaction()
599 b->AddLiteral(GenLogAfterExecute(bn_name, interface, method, kStatusVarName, kReturnVarName, in HandleServerTransaction()
605 if (!method.IsOneway()) { in HandleServerTransaction()
617 if (method.GetType().GetName() != "void") { in HandleServerTransaction()
619 string(kReplyVarName) + "->" + ParcelWriteMethodOf(method.GetType(), typenames); in HandleServerTransaction()
623 ParcelWriteCastOf(method.GetType(), typenames, kReturnVarName)))); in HandleServerTransaction()
627 for (const AidlArgument* a : method.GetOutArguments()) { in HandleServerTransaction()
643 const AidlMethod& method, const Options& options, in HandleServerMetaTransaction() argument
645 CHECK(!method.IsUserDefined()); in HandleServerMetaTransaction()
647 if (method.GetName() == kGetInterfaceVersion && options.Version() > 0) { in HandleServerMetaTransaction()
656 if (method.GetName() == kGetInterfaceHash && !options.Hash().empty()) { in HandleServerMetaTransaction()
713 for (const auto& method : interface.GetMethods()) { in BuildServerSource() local
714 StatementBlock* b = s->AddCase(GetTransactionIdFor(*method)); in BuildServerSource()
718 if (method->IsUserDefined()) { in BuildServerSource()
719 success = HandleServerTransaction(typenames, interface, *method, options, b); in BuildServerSource()
721 success = HandleServerMetaTransaction(typenames, interface, *method, options, b); in BuildServerSource()
846 for (const auto& method: interface.GetMethods()) { in BuildClientHeader() local
847 if (method->IsUserDefined()) { in BuildClientHeader()
848 publics.push_back(BuildMethodDecl(*method, typenames, false)); in BuildClientHeader()
850 publics.push_back(BuildMetaMethodDecl(*method, typenames, options, false)); in BuildClientHeader()
941 for (const auto& method : interface.GetMethods()) { in BuildInterfaceHeader() local
942 for (const auto& argument : method->GetArguments()) { in BuildInterfaceHeader()
946 AddHeaders(method->GetType(), typenames, includes); in BuildInterfaceHeader()
1009 for (const auto& method : interface.GetMethods()) { in BuildInterfaceHeader() local
1010 if (method->IsUserDefined()) { in BuildInterfaceHeader()
1012 if_class->AddPublic(BuildMethodDecl(*method, typenames, true)); in BuildInterfaceHeader()
1014 if_class->AddPublic(BuildMetaMethodDecl(*method, typenames, options, true)); in BuildInterfaceHeader()
1032 for (const auto& method : interface.GetMethods()) { in BuildInterfaceHeader() local
1033 if (method->IsUserDefined()) { in BuildInterfaceHeader()
1035 code << "::android::binder::Status " << method->GetName() in BuildInterfaceHeader()
1036 << BuildArgList(typenames, *method, true, true).ToString() << " override {\n" in BuildInterfaceHeader()
1041 if (method->GetName() == kGetInterfaceVersion && options.Version() > 0) { in BuildInterfaceHeader()
1048 if (method->GetName() == kGetInterfaceHash && !options.Hash().empty()) { in BuildInterfaceHeader()
1150 string method = ParcelReadMethodOf(variable->GetType(), typenames); in BuildParcelSource() local
1153 kAndroidStatusVarName, new MethodCall(StringPrintf("_aidl_parcel->%s", method.c_str()), in BuildParcelSource()
1178 string method = ParcelWriteMethodOf(variable->GetType(), typenames); in BuildParcelSource() local
1181 new MethodCall(StringPrintf("_aidl_parcel->%s", method.c_str()), in BuildParcelSource()