Compare commits
23 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
5089d76d4c | |
![]() |
dfc0c32cea | |
![]() |
b06f2f00c2 | |
![]() |
f92bc6c522 | |
![]() |
a2c5093c73 | |
![]() |
21317b0537 | |
![]() |
1ad1fef0c0 | |
![]() |
4d8cb8f56d | |
![]() |
990c3007ee | |
![]() |
8469102e91 | |
![]() |
398a4a3c61 | |
![]() |
23dbd4743a | |
![]() |
423dc36656 | |
![]() |
22652172e2 | |
![]() |
8e87e5f5ae | |
![]() |
fc82bf10f4 | |
![]() |
f8e413c9b2 | |
![]() |
53ef4f6809 | |
![]() |
da16278f0d | |
![]() |
29a8faaa4f | |
![]() |
cd7620aa0d | |
![]() |
88566f61e6 | |
![]() |
6538376c06 |
|
@ -0,0 +1,25 @@
|
|||
image: mrcyjanek/waydroid:ubuntu-devel
|
||||
matrix:
|
||||
- env: DISTRO=ubuntu-devel
|
||||
image: mrcyjanek/waydroid:ubuntu-devel
|
||||
- env: DISTRO=sid
|
||||
image: mrcyjanek/waydroid:sid
|
||||
- env: DISTRO=bookworm
|
||||
image: mrcyjanek/waydroid:bookworm
|
||||
- env: DISTRO=bullseye
|
||||
image: mrcyjanek/waydroid:bullseye
|
||||
- env: DISTRO=lunar
|
||||
image: mrcyjanek/waydroid:lunar
|
||||
- env: DISTRO=jammy
|
||||
image: mrcyjanek/waydroid:jammy
|
||||
- env: DISTRO=focal
|
||||
image: mrcyjanek/waydroid:focal
|
||||
- env: DISTRO=mantic
|
||||
image: mrcyjanek/waydroid:mantic
|
||||
script:
|
||||
- apt update
|
||||
- build_changelog
|
||||
- mk-build-deps -ir -t "apt-get -o Debug::pkgProblemResolver=yes -y --no-install-recommends"
|
||||
- debuild -b -uc -us
|
||||
- mkdir -p /apt/$DISTRO/ || true
|
||||
- mv ../*.deb /apt/$DISTRO/
|
|
@ -0,0 +1,12 @@
|
|||
gbinder-python (1.1.2) bullseye; urgency=medium
|
||||
|
||||
* Explicit noexcept
|
||||
* Fix returning a transaction error
|
||||
|
||||
-- Alessandro Astone <ales.astone@gmail.com> Wed, 16 Sep 2023 18:07:00 +0000
|
||||
|
||||
gbinder-python (1.1.1) bullseye; urgency=medium
|
||||
|
||||
* Initial versioned changelog
|
||||
|
||||
-- Alessandro Astone <ales.astone@gmail.com> Sat, 21 Jan 2023 11:35:09 +0000
|
|
@ -0,0 +1 @@
|
|||
13
|
|
@ -0,0 +1,27 @@
|
|||
Source: gbinder-python
|
||||
Maintainer: Eugenio Paolantonio (g7) <me@medesimo.eu>
|
||||
Section: python
|
||||
Priority: optional
|
||||
Build-Depends: debhelper (>= 9),
|
||||
dh-python,
|
||||
python3-all-dev (>= 3.2),
|
||||
python3-setuptools,
|
||||
cython3,
|
||||
libgbinder-dev (>= 1.1.20),
|
||||
libglibutil-dev,
|
||||
libglib2.0-dev,
|
||||
pkgconf,
|
||||
Standards-Version: 4.5.0.3
|
||||
Vcs-Browser: https://github.com/droidian/gbinder-python
|
||||
Vcs-Git: https://github.com/droidian/gbinder-python.git
|
||||
|
||||
Package: python3-gbinder
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
${python3:Depends},
|
||||
python3,
|
||||
libgbinder (>= 1.1.20),
|
||||
Description: Cython extension module for C++ gbinder functions
|
||||
This package contains a cython extension module for gbinder,
|
||||
allowing to call gbinder from Python scripts.
|
|
@ -0,0 +1,50 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: gbinder-python
|
||||
Source: https://github.com/erfanoabdi/gbinder-python
|
||||
|
||||
Files: *
|
||||
Copyright: 2021 Erfan Abdi <erfangplus@gmail.com>
|
||||
2021 NotKit <nekit1000@gmail.com>
|
||||
License: GPL-3+
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2020 Eugenio Paolantonio (g7) <me@medesimo.eu>
|
||||
License: BSD-3-clause
|
||||
|
||||
License: GPL-3+
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
License: BSD-3-clause
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the <organization> nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
export PYBUILD_BUILD_ARGS_python3=--cython
|
||||
|
||||
%:
|
||||
dh $@ --with python3 --buildsystem=pybuild
|
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
30
gbinder.pyx
30
gbinder.pyx
|
@ -65,7 +65,7 @@ cdef class RemoteObject:
|
|||
if self._object is not NULL:
|
||||
cgbinder.gbinder_remote_object_remove_handler(self._object, id)
|
||||
|
||||
cdef void remote_object_local_notify_func(cgbinder.GBinderRemoteObject* obj, void* user_data) with gil:
|
||||
cdef void remote_object_local_notify_func(cgbinder.GBinderRemoteObject* obj, void* user_data) noexcept with gil:
|
||||
(<object>user_data).notify_func_callback()
|
||||
|
||||
cdef class RemoteReply:
|
||||
|
@ -202,12 +202,12 @@ cdef class Client:
|
|||
def cancel(self, unsigned long id):
|
||||
return cgbinder.gbinder_client_cancel(self._client, id)
|
||||
|
||||
cdef void client_reply_func(cgbinder.GBinderClient* client, cgbinder.GBinderRemoteReply* c_reply, int status, void* user_data) with gil:
|
||||
cdef void client_reply_func(cgbinder.GBinderClient* client, cgbinder.GBinderRemoteReply* c_reply, int status, void* user_data) noexcept with gil:
|
||||
reply = RemoteReply()
|
||||
reply.set_c_reply(c_reply)
|
||||
(<object>user_data).reply_func_callback(reply, status)
|
||||
|
||||
cdef void local_destroy_notif(void* user_data) with gil:
|
||||
cdef void local_destroy_notif(void* user_data) noexcept with gil:
|
||||
(<object>user_data).destroy_notif_callback()
|
||||
|
||||
cdef class LocalRequest:
|
||||
|
@ -514,12 +514,14 @@ cdef class LocalObject:
|
|||
reply.set_c_reply(c_reply)
|
||||
return reply
|
||||
|
||||
cdef cgbinder.GBinderLocalReply* local_transact_callback(cgbinder.GBinderLocalObject* obj, cgbinder.GBinderRemoteRequest* c_req, unsigned int code, unsigned int flags, int* status, void* user_data) with gil:
|
||||
cdef cgbinder.GBinderLocalReply* local_transact_callback(cgbinder.GBinderLocalObject* obj, cgbinder.GBinderRemoteRequest* c_req, unsigned int code, unsigned int flags, int* status, void* user_data) noexcept with gil:
|
||||
req = RemoteRequest()
|
||||
req.set_c_req(c_req)
|
||||
reply, status_ret = (<object>user_data).callback(req, code, flags)
|
||||
cdef int stat = status_ret
|
||||
status = &stat
|
||||
status[0] = stat
|
||||
if reply is None or status_ret < 0:
|
||||
return NULL
|
||||
return (<LocalReply>reply)._reply
|
||||
|
||||
cdef class ServiceManager:
|
||||
|
@ -583,8 +585,10 @@ cdef class ServiceManager:
|
|||
return None
|
||||
cdef char** services = cgbinder.gbinder_servicemanager_list_sync(self._sm)
|
||||
services_list = []
|
||||
i = 0
|
||||
if services == NULL:
|
||||
return services_list
|
||||
|
||||
i = 0
|
||||
while services[i] != NULL:
|
||||
services_list.append(services[i].decode())
|
||||
i += 1
|
||||
|
@ -667,27 +671,29 @@ cdef class ServiceManager:
|
|||
else:
|
||||
free(ids)
|
||||
|
||||
cdef void service_manager_get_service_func(cgbinder.GBinderServiceManager* sm, cgbinder.GBinderRemoteObject* c_object, int status, void* user_data) with gil:
|
||||
cdef void service_manager_get_service_func(cgbinder.GBinderServiceManager* sm, cgbinder.GBinderRemoteObject* c_object, int status, void* user_data) noexcept with gil:
|
||||
remote = RemoteObject()
|
||||
remote.set_c_object(c_object)
|
||||
(<object>user_data).get_service_func_callback(remote, status)
|
||||
|
||||
cdef bint service_manager_list_func(cgbinder.GBinderServiceManager* sm, char** services, void* user_data) with gil:
|
||||
cdef bint service_manager_list_func(cgbinder.GBinderServiceManager* sm, char** services, void* user_data) noexcept with gil:
|
||||
services_list = []
|
||||
i = 0
|
||||
if services == NULL:
|
||||
return services_list
|
||||
|
||||
i = 0
|
||||
while services[i] != NULL:
|
||||
services_list.append(services[i].decode())
|
||||
i += 1
|
||||
return (<object>user_data).list_func_callback(services_list)
|
||||
|
||||
cdef void service_manager_add_service_func(cgbinder.GBinderServiceManager* sm, int status, void* user_data) with gil:
|
||||
cdef void service_manager_add_service_func(cgbinder.GBinderServiceManager* sm, int status, void* user_data) noexcept with gil:
|
||||
(<object>user_data).add_service_func_callback(status)
|
||||
|
||||
cdef void service_manager_func(cgbinder.GBinderServiceManager* sm, void* user_data) with gil:
|
||||
cdef void service_manager_func(cgbinder.GBinderServiceManager* sm, void* user_data) noexcept with gil:
|
||||
(<object>user_data).func_callback()
|
||||
|
||||
cdef void service_manager_registration_func(cgbinder.GBinderServiceManager* sm, const char* name, void* user_data) with gil:
|
||||
cdef void service_manager_registration_func(cgbinder.GBinderServiceManager* sm, const char* name, void* user_data) noexcept with gil:
|
||||
(<object>user_data).registration_func_callback(name)
|
||||
|
||||
cdef class Buffer:
|
||||
|
|
Loading…
Reference in New Issue