Clarify and update license

pull/230/head
Olivier Martin 2021-09-01 00:00:36 +02:00 committed by Olivier Martin
parent 2c38df5f30
commit f4ecc64d29
34 changed files with 158 additions and 187 deletions

View File

@ -1,22 +1,7 @@
#
# GattLib - GATT Library
# SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later
#
# Copyright (C) 2016-2020 Olivier Martin <olivier@labapart.org>
#
#
# 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 2 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, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
cmake_minimum_required(VERSION 3.4)

View File

@ -1,20 +1,8 @@
#
# Copyright (C) 2016 Olivier Martin <olivier@labapart.org>
# SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
# 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 2 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, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Version: 1.0
# Repository: https://gist.github.com/oliviermartin/

View File

@ -154,6 +154,13 @@ TODO List
- Complete `examples/gatttool` port to GattLib to demonstrate the completeness of GattLib.
- Remove GLib dependencies to GattLib (mainly replacing GLib IO Channels by Unix Domain Socket).
License
=======
Gattlib with Bluez Legacy support (for Bluez v4) has a GPL v2.0 or later license.
While Gattlib for recent version of Bluez (v5.40+) has a BSD-3-Clause license - except `dbus/bluez5/lib/uuid.c`
and `dbus/bluez5/lib/uuid.h` that have a GPL v2.0 or later license.
Support
=======

View File

@ -1,7 +1,7 @@
#
# GattLib - GATT Library
#
# Copyright (C) 2016-2019 Olivier Martin <olivier@labapart.org>
# Copyright (C) 2016-2021 Olivier Martin <olivier@labapart.org>
#
#
# This program is free software; you can redistribute it and/or modify

View File

@ -1,3 +1,26 @@
/*
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2021 Olivier Martin <olivier@labapart.org>
*
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "gattlib_internal.h"
#include <poll.h>

View File

@ -2,7 +2,7 @@
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2019 Olivier Martin <olivier@labapart.org>
* Copyright (C) 2016-2021 Olivier Martin <olivier@labapart.org>
*
*
* This program is free software; you can redistribute it and/or modify

View File

@ -2,7 +2,7 @@
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2019 Olivier Martin <olivier@labapart.org>
* Copyright (C) 2016-2021 Olivier Martin <olivier@labapart.org>
*
*
* This program is free software; you can redistribute it and/or modify

View File

@ -2,7 +2,7 @@
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2019 Olivier Martin <olivier@labapart.org>
* Copyright (C) 2016-2021 Olivier Martin <olivier@labapart.org>
*
*
* This program is free software; you can redistribute it and/or modify

View File

@ -2,7 +2,7 @@
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2017 Olivier Martin <olivier@labapart.org>
* Copyright (C) 2016-2021 Olivier Martin <olivier@labapart.org>
*
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,3 +1,9 @@
/*
* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later
*
* Copyright (c) 2021, Olivier Martin <olivier@labapart.org>
*/
#if defined(WITH_PYTHON)
#include <Python.h>
#endif

View File

@ -1,3 +1,9 @@
/*
* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later
*
* Copyright (c) 2021, Olivier Martin <olivier@labapart.org>
*/
#include <string.h>
#include "gattlib_internal.h"

View File

@ -1,3 +1,9 @@
/*
* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later
*
* Copyright (c) 2021, Olivier Martin <olivier@labapart.org>
*/
#ifndef __GATTLIB_INTERNAL_DEFS_H__
#define __GATTLIB_INTERNAL_DEFS_H__

View File

@ -1,22 +1,7 @@
#
# GattLib - GATT Library
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (C) 2017-2020 Olivier Martin <olivier@labapart.org>
#
#
# 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 2 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, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
cmake_minimum_required(VERSION 3.0)

View File

@ -1,24 +1,7 @@
/*
* SPDX-License-Identifier: BSD-3-Clause
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2020 Olivier Martin <olivier@labapart.org>
*
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
*/
#include "gattlib_internal.h"

View File

@ -1,24 +1,7 @@
/*
* SPDX-License-Identifier: BSD-3-Clause
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2020 Olivier Martin <olivier@labapart.org>
*
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
*/
#include "gattlib_internal.h"

View File

@ -1,24 +1,7 @@
/*
* SPDX-License-Identifier: BSD-3-Clause
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2019 Olivier Martin <olivier@labapart.org>
*
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
*/
#include <stdlib.h>

View File

@ -1,24 +1,7 @@
/*
* SPDX-License-Identifier: BSD-3-Clause
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2020 Olivier Martin <olivier@labapart.org>
*
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
*/
#ifndef __GATTLIB_INTERNAL_H__

View File

@ -1,24 +1,7 @@
/*
* SPDX-License-Identifier: BSD-3-Clause
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2020 Olivier Martin <olivier@labapart.org>
*
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
*/
#include <glib.h>

View File

@ -1,24 +1,7 @@
/*
* SPDX-License-Identifier: BSD-3-Clause
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2019 Olivier Martin <olivier@labapart.org>
*
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
*/
#include <gio/gunixfdlist.h>

View File

@ -1,5 +1,11 @@
#!/usr/bin/env python3
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
import argparse
from gattlib import adapter

View File

@ -1,5 +1,11 @@
#!/usr/bin/env python3
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
import argparse
import threading

View File

@ -1,5 +1,11 @@
#!/usr/bin/env python3
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
import argparse
import threading

View File

@ -1,3 +1,9 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
import struct
import sys
import threading
@ -59,7 +65,7 @@ def graph_init():
global ax_temp, ax_hum
global simulation
font = {'size' : 9}
font = {'size': 9}
matplotlib.rc('font', **font)
# Setup figure and subplots

View File

@ -1,5 +1,11 @@
#!/usr/bin/env python3
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
import argparse
from gattlib import adapter, device

View File

@ -1,3 +1,9 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
import time
import threading
import wave

View File

@ -1,5 +1,11 @@
#!/usr/bin/env python3
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
import argparse
from gattlib import device, uuid

View File

@ -1,3 +1,9 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
from ctypes import *
gattlib = CDLL("libgattlib.so")

View File

@ -1,3 +1,9 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
from gattlib import *
from .device import Device
from .exception import handle_return, AdapterNotOpened

View File

@ -1,3 +1,9 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
import logging
import uuid

View File

@ -1,3 +1,9 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
GATTLIB_SUCCESS = 0
GATTLIB_INVALID_PARAMETER = 1
GATTLIB_NOT_FOUND = 2

View File

@ -1,3 +1,9 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
from gattlib import *
from .uuid import gattlib_uuid_to_uuid, gattlib_uuid_to_int
from .exception import handle_return

View File

@ -1,3 +1,9 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
import re
from uuid import UUID

View File

@ -1,3 +1,9 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
#
import os
from setuptools import setup, find_packages
import subprocess

View File

@ -1,24 +1,7 @@
/*
* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later
*
* GattLib - GATT Library
*
* Copyright (C) 2016-2020 Olivier Martin <olivier@labapart.org>
*
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Copyright (c) 2016-2021, Olivier Martin <olivier@labapart.org>
*/
#ifndef __GATTLIB_H__