Merge branch 'main' into bullseye
This commit is contained in:
commit
29a8faaa4f
|
@ -47,6 +47,7 @@ cdef extern from "gbinder/gbinder_servicemanager.h":
|
|||
ctypedef void (*GBinderServiceManagerAddServiceFunc)(GBinderServiceManager* sm, int status, void* user_data)
|
||||
ctypedef void (*GBinderServiceManagerRegistrationFunc)(GBinderServiceManager* sm, const char* name, void* user_data)
|
||||
|
||||
GBinderServiceManager* gbinder_servicemanager_new2(const char* dev, const char* sm_protocol, const char* rpc_protocol)
|
||||
GBinderServiceManager* gbinder_servicemanager_new(const char* dev)
|
||||
GBinderLocalObject* gbinder_servicemanager_new_local_object(GBinderServiceManager* sm, const char* iface, GBinderLocalTransactFunc handler, void* user_data)
|
||||
GBinderLocalObject* gbinder_servicemanager_new_local_object2(GBinderServiceManager* sm, const char* const* ifaces, GBinderLocalTransactFunc handler, void* user_data)
|
||||
|
|
|
@ -526,8 +526,11 @@ cdef class ServiceManager:
|
|||
cdef cgbinder.GBinderServiceManager* _sm
|
||||
cdef public object func, list_func, get_service_func
|
||||
|
||||
def __cinit__(self, dev):
|
||||
self._sm = cgbinder.gbinder_servicemanager_new(ensure_binary(dev))
|
||||
def __cinit__(self, dev, sm_protocol=None, rpc_protocol=None):
|
||||
if sm_protocol and rpc_protocol:
|
||||
self._sm = cgbinder.gbinder_servicemanager_new2(ensure_binary(dev), ensure_binary(sm_protocol), ensure_binary(rpc_protocol))
|
||||
else:
|
||||
self._sm = cgbinder.gbinder_servicemanager_new(ensure_binary(dev))
|
||||
|
||||
def __dealloc__(self):
|
||||
if self._sm is not NULL:
|
||||
|
|
2
setup.py
2
setup.py
|
@ -19,6 +19,8 @@ file_ext = ".pyx" if USE_CYTHON else ".c"
|
|||
|
||||
extension_kwargs = { 'sources': ["gbinder" + file_ext] }
|
||||
extension_kwargs = pkgconfig('libgbinder', extension_kwargs)
|
||||
if None in extension_kwargs:
|
||||
del extension_kwargs[None]
|
||||
extensions = [Extension('gbinder', **extension_kwargs)]
|
||||
|
||||
if USE_CYTHON:
|
||||
|
|
Loading…
Reference in New Issue