Home | History | Annotate | Download | only in hidl

Lines Matching refs:method

23 #include "Method.h"
81 bool Interface::fillPingMethod(Method *method) const {
82 if (method->name() != "ping") {
86 method->fillImplementation(
113 bool Interface::fillLinkToDeathMethod(Method *method) const {
114 if (method->name() != "linkToDeath") {
118 method->fillImplementation(
157 bool Interface::fillUnlinkToDeathMethod(Method *method) const {
158 if (method->name() != "unlinkToDeath") {
162 method->fillImplementation(
205 bool Interface::fillSyspropsChangedMethod(Method *method) const {
206 if (method->name() != "notifySyspropsChanged") {
210 method->fillImplementation(
223 bool Interface::fillSetHALInstrumentationMethod(Method *method) const {
224 if (method->name() != "setHALInstrumentation") {
228 method->fillImplementation(
256 bool Interface::fillDescriptorChainMethod(Method *method) const {
257 if (method->name() != "interfaceChain") {
261 method->fillImplementation(
310 bool Interface::fillHashChainMethod(Method *method) const {
311 if (method->name() != "getHashChain") {
314 const VectorType *chainType = static_cast<const VectorType *>(&method->results()[0]->type());
317 method->fillImplementation(
345 bool Interface::fillGetDescriptorMethod(Method *method) const {
346 if (method->name() != "interfaceDescriptor") {
350 method->fillImplementation(
367 bool Interface::fillGetDebugInfoMethod(Method *method) const {
368 if (method->name() != "getDebugInfo") {
379 method->fillImplementation(
406 { { IMPL_INTERFACE, [this, method](auto &out) {
407 const Type &refInfo = method->results().front()->type();
421 bool Interface::fillDebugMethod(Method *method) const {
422 if (method->name() != "debug") {
426 method->fillImplementation(
438 /* unused, as the debug method is hidden from Java */
445 static std::map<std::string, Method *> gAllReservedMethods;
447 bool Interface::addMethod(Method *method) {
449 if (!gAllReservedMethods.emplace(method->name(), method).second) {
450 method "
451 << method->name();
458 CHECK(!method->isHidlReserved());
459 if (lookupMethod(method->name()) != nullptr) {
460 LOG(ERROR) << "Redefinition of method " << method->name();
475 method->setSerialId(serial);
476 mUserMethods.push_back(method);
483 std::map<int32_t, Method *> reservedMethodsById;
485 Method *method = pair.second->copySignature();
486 bool fillSuccess = fillPingMethod(method)
487 || fillDescriptorChainMethod(method)
488 || fillGetDescriptorMethod(method)
489 || fillHashChainMethod(method)
490 || fillSyspropsChangedMethod(method)
491 || fillLinkToDeathMethod(method)
492 || fillUnlinkToDeathMethod(method)
493 || fillSetHALInstrumentationMethod(method)
494 || fillGetDebugInfoMethod(method)
495 || fillDebugMethod(method);
498 LOG(ERROR) << "ERROR: hidl-gen does not recognize a reserved method "
499 << method->name();
502 if (!reservedMethodsById.emplace(method->getSerialId(), method).second) {
504 << method->name() << " and "
505 << reservedMethodsById[method->getSerialId()]->name()
506 << ", serialId = " << method->getSerialId();
546 const std::vector<Method *> &Interface::userDefinedMethods() const {
550 const std::vector<Method *> &Interface::hidlReservedMethods() const {
554 std::vector<Method *> Interface::methods() const {
555 std::vector<Method *> v(mUserMethods);
565 for (Method *userMethod : iface->userDefinedMethods()) {
569 for (Method *reservedMethod : hidlReservedMethods()) {
577 Method *Interface::lookupMethod(std::string name) const {
579 Method *method = tuple.method();
580 if (method->name() == name) {
581 return method;
802 for (const auto &method : methods()) {
803 if (method->isHidlReserved()) {
809 out << "name: \"" << method->name() << "\"\n";
811 for (const auto &result : method->results()) {
822 for (const auto &arg : method->args()) {
833 for (const auto &annotation : method->annotations()) {
851 << name << "' for method: " << method->name()
873 for (auto const &method : methods()) {
874 if (method->isOneway()) {
910 for (const auto &method : methods()) {
911 if (!method->isJavaCompatible()) {