| 24 | namespace LIEF::OAT::py { |
| 25 | |
| 26 | void init_utils(nb::module_& m) { |
| 27 | lief_mod->def("is_oat", |
| 28 | nb::overload_cast<const ELF::Binary&>(&is_oat), |
| 29 | "Check if the " RST_CLASS_REF(lief.ELF.Binary) " given in parameter is an OAT"_doc, |
| 30 | "binary"_a); |
| 31 | |
| 32 | lief_mod->def("is_oat", |
| 33 | nb::overload_cast<const std::string&>(&is_oat), |
| 34 | "Check if the **file** given in parameter is an OAT"_doc, |
| 35 | "path"_a); |
| 36 | |
| 37 | lief_mod->def("is_oat", |
| 38 | nb::overload_cast<const std::vector<uint8_t>&>(&is_oat), |
| 39 | "Check if the **raw data** given in parameter is an OAT"_doc, |
| 40 | "raw"_a); |
| 41 | |
| 42 | m.def("version", |
| 43 | nb::overload_cast<const LIEF::ELF::Binary&>(&version), |
| 44 | "Return the OAT version of the " RST_CLASS_REF(lief.ELF.Binary) " given in parameter"_doc, |
| 45 | "binary"_a); |
| 46 | |
| 47 | m.def("version", |
| 48 | nb::overload_cast<const std::string&>(&version), |
| 49 | "Return the OAT version of the **file** given in parameter"_doc, |
| 50 | "file"_a); |
| 51 | |
| 52 | m.def("version", |
| 53 | nb::overload_cast<const std::vector<uint8_t>&>(&version), |
| 54 | "Return the OAT version of the **raw data** given in parameter"_doc, |
| 55 | "raw"_a); |
| 56 | |
| 57 | m.def("android_version", |
| 58 | &android_version, |
| 59 | "Return the " RST_CLASS_REF(lief.Android.ANDROID_VERSIONS) " associated with the given OAT version"_doc); |
| 60 | } |
| 61 | } |
| 62 | |