Change notification callback and handle_events types 90/6290/1
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Thu, 10 Jun 2021 12:54:37 +0000 (15:54 +0300)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Thu, 10 Jun 2021 13:23:14 +0000 (16:23 +0300)
commitf5af904e67965020d95688d62a738682c80bd920
tree66547257c5df227392e2799adaa764728f0fec7d
parent1c396ed02b20e61140cb98196147fec69ef83cde
Change notification callback and handle_events types

In earlier implementation (commit db775397) single event was passed to
to application notification callback as a string type and if there was
multiple notification then as a list of string. Similarly
'handle_events' function was either returning a single event as string
or a list of string. In a code it is unpleasant to handle variables what
can be either string or list type, because in application you need to
check always the variable type what comes from SDL for these functions
and based on the type either handle the value as a string or list of
string. That's why by this commit change event(s) to be passed as a list
to the notification callback what application has registered and also
now 'handle_events' function returns always received notifications a
list. Because of type change this code change is not backward
compatible.

Issue-ID: RIC-795

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I49f2bd1012d93f184945c891df03ed83ed83d544
docs/release-notes.rst
ricsdl-package/examples/notify.py
ricsdl-package/ricsdl/__init__.py
ricsdl-package/ricsdl/backend/dbbackend_abc.py
ricsdl-package/ricsdl/backend/fake_dict_db.py
ricsdl-package/ricsdl/backend/redis.py
ricsdl-package/ricsdl/syncstorage.py
ricsdl-package/ricsdl/syncstorage_abc.py
ricsdl-package/tests/backend/test_redis.py