@@ -13,6 +13,29 @@ namespace py = pybind11;
1313// using namespace BPrivate::Storage;
1414// using namespace BPrivate::Storage::Mime;
1515// using namespace BPackageKit;
16+ class BPathFinderWrapper {
17+ public:
18+ static std::tuple<status_t , BStringList>FindPaths (BPathFinder& self,const char * architecture, path_base_directory baseDirectory,const char * subPath, uint32 flags) {
19+ BStringList _paths;
20+ status_t result = self.FindPaths (architecture, baseDirectory, subPath, flags, _paths);
21+ return std::make_tuple (result, _paths);
22+ }
23+ static std::tuple<status_t , BStringList>FindPaths (BPathFinder& self, path_base_directory baseDirectory,const char * subPath, uint32 flags) {
24+ BStringList _paths;
25+ status_t result = self.FindPaths (baseDirectory, subPath, flags, _paths);
26+ return std::make_tuple (result, _paths);
27+ }
28+ static std::tuple<status_t , BStringList>FindPaths (BPathFinder& self, path_base_directory baseDirectory,const char * subPath) {
29+ BStringList _paths;
30+ status_t result = self.FindPaths (baseDirectory, subPath, _paths);
31+ return std::make_tuple (result, _paths);
32+ }
33+ static std::tuple<status_t , BStringList>FindPaths (BPathFinder& self, path_base_directory baseDirectory) {
34+ BStringList _paths;
35+ status_t result = self.FindPaths (baseDirectory, _paths);
36+ return std::make_tuple (result, _paths);
37+ }
38+ };
1639
1740PYBIND11_MODULE (PathFinder, m)
1841{
@@ -51,30 +74,34 @@ py::class_<BPathFinder>(m, "BPathFinder")
5174return std::make_tuple (r,_path);
5275}
5376," " ,py::arg (" baseDirectory" ))
54- . def (" FindPaths" , [](BPathFinder& self,const char * architecture,path_base_directory baseDirectory,const char * subPath,uint32 flags) {
77+ /* .def_static ("FindPaths", [](BPathFinder& self,const char * architecture,path_base_directory baseDirectory,const char * subPath,uint32 flags) {
5578 BStringList _paths;
56- static status_t r = self.FindPaths (architecture, baseDirectory, subPath, flags, _paths);
79+ status_t r = self.FindPaths(architecture, baseDirectory, subPath, flags, _paths);
5780 return std::make_tuple(r,_paths);
5881}
59- ," " ,py::arg (" architecture" ),py::arg (" baseDirectory" ),py::arg (" subPath" ),py::arg (" flags" ))
60- .def (" FindPaths" , [](BPathFinder& self,path_base_directory baseDirectory,const char * subPath,uint32 flags) {
82+ , "", py::arg("architecture"), py::arg("baseDirectory"), py::arg("subPath"), py::arg("flags"))*/
83+ .def_static (" FindPaths" , py::overload_cast<BPathFinder&,const char *, path_base_directory,const char *, uint32>(&BPathFinderWrapper::FindPaths)," " ,py::arg (" self" ),py::arg (" architecture" ),py::arg (" baseDirectory" ),py::arg (" subPath" ),py::arg (" flags" ))
84+ /* .def("FindPaths", [](BPathFinder& self,path_base_directory baseDirectory,const char * subPath,uint32 flags) {
6185 BStringList _paths;
62- static status_t r = self.FindPaths (baseDirectory, subPath, flags, _paths);
86+ status_t r = self.FindPaths(baseDirectory, subPath, flags, _paths);
6387 return std::make_tuple(r,_paths);
6488}
65- ," " ,py::arg (" baseDirectory" ),py::arg (" subPath" ),py::arg (" flags" ))
66- .def (" FindPaths" , [](BPathFinder& self,path_base_directory baseDirectory,const char * subPath) {
89+ , "", py::arg("baseDirectory"), py::arg("subPath"), py::arg("flags"))*/
90+ .def_static (" FindPaths" , py::overload_cast<BPathFinder&,path_base_directory,const char *, uint32>(&BPathFinderWrapper::FindPaths)," " ,py::arg (" self" ),py::arg (" baseDirectory" ),py::arg (" subPath" ),py::arg (" flags" ))
91+ /* .def("FindPaths", [](BPathFinder& self,path_base_directory baseDirectory,const char * subPath) {
6792 BStringList _paths;
68- static status_t r = self.FindPaths (baseDirectory, subPath, _paths);
93+ status_t r = self.FindPaths(baseDirectory, subPath, _paths);
6994 return std::make_tuple(r,_paths);
7095}
71- ," " ,py::arg (" baseDirectory" ),py::arg (" subPath" ))
72- .def (" FindPaths" , [](BPathFinder& self,path_base_directory baseDirectory) {
96+ , "", py::arg("baseDirectory"), py::arg("subPath"))*/
97+ .def_static (" FindPaths" , py::overload_cast<BPathFinder&, path_base_directory,const char *>(&BPathFinderWrapper::FindPaths)," " ,py::arg (" self" ),py::arg (" baseDirectory" ),py::arg (" subPath" ))
98+ /* .def("FindPaths", [](BPathFinder& self,path_base_directory baseDirectory) {
7399 BStringList _paths;
74- static status_t r = self.FindPaths (baseDirectory, _paths);
100+ status_t r = self.FindPaths(baseDirectory, _paths);
75101 return std::make_tuple(r,_paths);
76102}
77- ," " ,py::arg (" baseDirectory" ))
103+ , "", py::arg("baseDirectory"))*/
104+ .def_static (" FindPaths" , py::overload_cast<BPathFinder&, path_base_directory>(&BPathFinderWrapper::FindPaths)," " ,py::arg (" self" ),py::arg (" baseDirectory" ))
78105;
79106
80107