/* Copyright (C) 2014 The giomm Development Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include _DEFS(giomm,gio) _PINCLUDE(glibmm/private/interface_p.h) _PINCLUDE(gio/gio.h) #ifndef DOXYGEN_SHOULD_SKIP_THIS typedef struct _GNetworkMonitorInterface GNetworkMonitorInterface; #endif /* DOXYGEN_SHOULD_SKIP_THIS */ namespace Gio { _WRAP_ENUM(NetworkConnectivity, GNetworkConnectivity, NO_GTYPE) /** TODO * * @newin{2,44} */ class NetworkMonitor : public Glib::Interface { _CLASS_INTERFACE(NetworkMonitor, GNetworkMonitor, G_NETWORK_MONITOR, GNetworkMonitorInterface) public: _WRAP_METHOD(static Glib::RefPtr get_default(), g_network_monitor_get_default, newin "2,44") _WRAP_METHOD(bool get_network_available() const, g_network_monitor_get_network_available, newin "2,44") _WRAP_METHOD(NetworkConnectivity get_connectivity() const, g_network_monitor_get_connectivity) _WRAP_METHOD(bool can_reach(const Glib::RefPtr& connectable, const Glib::RefPtr& cancellable{?}), g_network_monitor_can_reach, errthrow, newin "2,44") //TODO: void can_reach_async(const Glib::RefPtr& connectable, const SlotAsyncReady& slot, const Glib::RefPtr& cancellable); _IGNORE(g_network_monitor_can_reach_async) _WRAP_METHOD(bool can_reach_finish(const Glib::RefPtr& result), g_network_monitor_can_reach_finish, errthrow, newin "2,44") _WRAP_SIGNAL(void network_changed(bool available), "network-changed", newin "2,44") //TODO: Wrap vfuncs? _WRAP_PROPERTY("network-available", bool, newin "2,44") _WRAP_PROPERTY("connectivity", NetworkConnectivity) }; } // namespace Gio