diff --git a/include/gsupplicant.h b/include/gsupplicant.h index 6f34435..3a51a06 100644 --- a/include/gsupplicant.h +++ b/include/gsupplicant.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2015-2017 Jolla Ltd. - * Contact: Slava Monich + * Copyright (C) 2015-2018 Jolla Ltd. + * Copyright (C) 2015-2018 Slava Monich * * You may use this file under the terms of BSD license as follows: * @@ -13,9 +13,9 @@ * 2. 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. - * 3. Neither the name of Jolla Ltd nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the names of the copyright holders 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 @@ -115,14 +115,14 @@ gsupplicant_unref( gulong gsupplicant_add_handler( - GSupplicant* self, + GSupplicant* supplicant, GSUPPLICANT_PROPERTY prop, GSupplicantFunc fn, void* data); gulong gsupplicant_add_property_changed_handler( - GSupplicant* self, + GSupplicant* supplicant, GSUPPLICANT_PROPERTY property, GSupplicantPropertyFunc fn, void* data); @@ -179,6 +179,9 @@ gsupplicant_keymgmt_suite_name( guint keymgmt_suites, guint* keymgmt_suite); +#define gsupplicant_remove_all_handlers(supplicant, ids) \ + gsupplicant_remove_handlers(supplicant, ids, G_N_ELEMENTS(ids)) + G_END_DECLS #endif /* GSUPPLICANT_H */ diff --git a/include/gsupplicant_bss.h b/include/gsupplicant_bss.h index f15ed37..2e21d3e 100644 --- a/include/gsupplicant_bss.h +++ b/include/gsupplicant_bss.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2015-2017 Jolla Ltd. - * Contact: Slava Monich + * Copyright (C) 2015-2018 Jolla Ltd. + * Copyright (C) 2015-2018 Slava Monich * * You may use this file under the terms of BSD license as follows: * @@ -13,9 +13,9 @@ * 2. 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. - * 3. Neither the name of Jolla Ltd nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the names of the copyright holders 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 @@ -206,6 +206,9 @@ gsupplicant_bss_connect( GSupplicantBSSStringResultFunc fn, void* data); +#define gsupplicant_bss_remove_all_handlers(bss, ids) \ + gsupplicant_bss_remove_handlers(bss, ids, G_N_ELEMENTS(ids)) + G_END_DECLS #endif /* GSUPPLICANT_BSS_H */ diff --git a/include/gsupplicant_interface.h b/include/gsupplicant_interface.h index a89fdda..d82f04a 100644 --- a/include/gsupplicant_interface.h +++ b/include/gsupplicant_interface.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2015-2017 Jolla Ltd. - * Contact: Slava Monich + * Copyright (C) 2015-2018 Jolla Ltd. + * Copyright (C) 2015-2018 Slava Monich * * You may use this file under the terms of BSD license as follows: * @@ -13,9 +13,9 @@ * 2. 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. - * 3. Neither the name of Jolla Ltd nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the names of the copyright holders 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 @@ -439,6 +439,9 @@ G_INLINE_FUNC const char* gsupplicant_interface_get_state_name(GSupplicantInterface* iface) { return iface ? gsupplicant_interface_state_name(iface->state) : NULL; } +#define gsupplicant_interface_remove_all_handlers(iface, ids) \ + gsupplicant_interface_remove_handlers(iface, ids, G_N_ELEMENTS(ids)) + G_END_DECLS #endif /* GSUPPLICANT_INTERFACE_H */ diff --git a/include/gsupplicant_network.h b/include/gsupplicant_network.h index 57df177..3ef1afd 100644 --- a/include/gsupplicant_network.h +++ b/include/gsupplicant_network.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2015-2018 Jolla Ltd. - * Contact: Slava Monich + * Copyright (C) 2015-2018 Slava Monich * * You may use this file under the terms of BSD license as follows: * @@ -13,9 +13,9 @@ * 2. 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. - * 3. Neither the name of Jolla Ltd nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the names of the copyright holders 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 @@ -112,9 +112,12 @@ gsupplicant_network_remove_handlers( gboolean gsupplicant_network_set_enabled( - GSupplicantNetwork* self, + GSupplicantNetwork* network, gboolean enabled); +#define gsupplicant_network_remove_all_handlers(network, ids) \ + gsupplicant_network_remove_handlers(network, ids, G_N_ELEMENTS(ids)) + G_END_DECLS #endif /* GSUPPLICANT_NETWORK_H */ diff --git a/src/gsupplicant_bss.c b/src/gsupplicant_bss.c index a8f2655..f28bc04 100644 --- a/src/gsupplicant_bss.c +++ b/src/gsupplicant_bss.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2015-2017 Jolla Ltd. - * Contact: Slava Monich + * Copyright (C) 2015-2018 Jolla Ltd. + * Copyright (C) 2015-2018 Slava Monich * * You may use this file under the terms of BSD license as follows: * @@ -13,9 +13,9 @@ * 2. 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. - * 3. Neither the name of Jolla Ltd nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the names of the copyright holders 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 @@ -1450,8 +1450,8 @@ gsupplicant_bss_dispose( g_object_unref(priv->proxy); priv->proxy = NULL; } - gsupplicant_interface_remove_handlers(self->iface, priv->iface_handler_id, - G_N_ELEMENTS(priv->iface_handler_id)); + gsupplicant_interface_remove_all_handlers(self->iface, + priv->iface_handler_id); G_OBJECT_CLASS(SUPER_CLASS)->dispose(object); } diff --git a/src/gsupplicant_interface.c b/src/gsupplicant_interface.c index e5cb8f6..a1e107b 100644 --- a/src/gsupplicant_interface.c +++ b/src/gsupplicant_interface.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2015-2018 Jolla Ltd. - * Contact: Slava Monich + * Copyright (C) 2015-2018 Slava Monich * * You may use this file under the terms of BSD license as follows: * @@ -13,9 +13,9 @@ * 2. 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. - * 3. Neither the name of Jolla Ltd nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the names of the copyright holders 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 @@ -1145,8 +1145,8 @@ gsupplicant_interface_add_network_call_dispose( { /* May be invoked twice */ if (call->network) { - gsupplicant_network_remove_handlers(call->network, - call->network_event_id, G_N_ELEMENTS(call->network_event_id)); + gsupplicant_network_remove_all_handlers(call->network, + call->network_event_id); gsupplicant_network_unref(call->network); call->network = NULL; } diff --git a/src/gsupplicant_network.c b/src/gsupplicant_network.c index 812668d..5e186a2 100644 --- a/src/gsupplicant_network.c +++ b/src/gsupplicant_network.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2015-2017 Jolla Ltd. - * Contact: Slava Monich + * Copyright (C) 2015-2018 Jolla Ltd. + * Copyright (C) 2015-2018 Slava Monich * * You may use this file under the terms of BSD license as follows: * @@ -13,9 +13,9 @@ * 2. 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. - * 3. Neither the name of Jolla Ltd nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the names of the copyright holders 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 @@ -718,8 +718,8 @@ gsupplicant_network_dispose( g_object_unref(priv->proxy); priv->proxy = NULL; } - gsupplicant_interface_remove_handlers(self->iface, priv->iface_handler_id, - G_N_ELEMENTS(priv->iface_handler_id)); + gsupplicant_interface_remove_all_handlers(self->iface, + priv->iface_handler_id); G_OBJECT_CLASS(SUPER_CLASS)->dispose(object); }