meganz / sdk

MEGA C++ SDK
BSD 2-Clause "Simplified" License
1.33k stars 504 forks source link

MegaApi::httpServer* methods not available in Python? #2608

Open Eboreg opened 2 years ago

Eboreg commented 2 years ago

Hi,

Is there any way to make the httpServer* methods (httpServerStart(), httpServerAddListener(), etc) available in the Python bindings? I tried ./configure --enable-python --with-libuv and --with all kinds of stuff, but to no avail.

To be exact, this is my latest attempt:

./autogen.sh
./configure --enable-python --disable-silent-rules --disable-curl-checks --with-openssl --with-cryptopp --with-sodium --with-zlib --with-sqlite --with-cares --with-curl --with-freeimage --with-libuv --disable-examples --with-libzen --with-libmediainfo
make
cd bindings/python
python setup.py bdist_wheel --plat-name linux_x86_64

It all builds and seems to work OK, except the httpServer* methods just aren't there:

In [8]: api
Out[8]: <resources.lib.mega.mega.MegaApi; proxy of <Swig Object of type 'mega::MegaApi *' at 0x7ffad6f11c60> >

In [9]: api.httpServerStart()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [9], in <module>
----> 1 api.httpServerStart()

AttributeError: 'MegaApi' object has no attribute 'httpServerStart'

In [10]: [m for m in api.__dir__() if "http" in m.lower()]
Out[10]: ['useHttpsOnly', 'usingHttpsOnly']

OS: Ubuntu 20.04.03 Python: 3.8.10