summaryrefslogtreecommitdiff
path: root/src/nm-firewall-manager.h
Commit message (Collapse)AuthorAgeFilesLines
* firewall: merge "started" signal and "available" propertyThomas Haller2017-04-211-3/+3
| | | | | | | The GObject property NM_FIREWALL_MANAGER_AVAILABLE is basically unused. Drop it. (cherry picked from commit db576b848ab029b9a232fe9fda2f816660c6a9b8)
* core: refactor private data in "src"Thomas Haller2016-10-041-17/+8
| | | | | | | | | | | | | | | | - use _NM_GET_PRIVATE() and _NM_GET_PRIVATE_PTR() everywhere. - reorder statements, to have GObject related functions (init, dispose, constructed) at the bottom of each file and in a consistent order w.r.t. each other. - unify whitespaces in signal and properties declarations. - use NM_GOBJECT_PROPERTIES_DEFINE() and _notify() - drop unused signal slots in class structures - drop unused header files for device factories
* all: cleanup includes in header filesThomas Haller2016-08-171-5/+0
| | | | | | | | | | | | - don't include "nm-default.h" in header files. Every source file must include as first header "nm-default.h", thus our headers get the default include already implicitly. - we don't support compiling NetworkManager itself with a C++ compiler. Remove G_BEGIN_DECLS/G_END_DECLS from internal headers. We do however support users of libnm to use C++, thus they stay in public headers. (cherry picked from commit f19aff89095ca192b8b2e37534b7a899aecd82f9)
* core: use defines for signal names in NMDnsManager and NMFirewallManagerThomas Haller2016-04-041-0/+2
|
* firewall: always take a reference to NMFirewallManager during asynchronous ↵Thomas Haller2015-09-251-2/+0
| | | | | | | | operations Always take a reference to the manager when scheaduling an asynchronous operations. In fact, all callers want to keep the manager alive as long as there are operations in progress.
* firewall: refactor callback handling in NMFirewallManagerThomas Haller2015-09-251-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor NMFirewallManager to have consistent semantics about asynchronous calls. - the callback is always invoked exactly once, but never synchronously when starting the operation. - while cancelling the request, the callback is invoked synchronously with respect to the cancel operation. - you can cancel a request once (and once only). - you cannot cancel the request once the callback is invoked. - when disposing the object with requests pending, the callbacks are invoked synchronously. - Add a callback argument to nm_firewall_manager_remove_from_zone(). Otherwise, the user never knows whether a call is still pending and cancellable (as complete operations cannot be cancelled). In fact, it makes no sense trying to cancel a call if you don't care about when it completes. - get rid of PENDING_CALL_DUMMY. The dummy callback allows cancellation any number of times. We want to catch wrong usage by asserting that an operation is only cancelled once. - nm_firewall_manager_cancel_call() doesn't need the manager argument. Either the call-id is valid (and has a valid pointer to the manager), or there is a bug and it is a dangling pointer.
* firewall: add arguments to NMFirewallManagerAddRemoveCallbackThomas Haller2015-09-251-1/+4
| | | | We should return the target object and the call_id.
* firewall/trivial: rename FwAddToZoneFunc to NMFirewallManagerAddRemoveCallbackThomas Haller2015-09-251-2/+2
| | | | | | Give it a proper NMFirewallManager* prefix to make it clear where the type belongs. Also, we will add a similar callback for nm_firewall_manager_remove_from_zone(), so reflect that in the name.
* firewall/trivial: rename NMFirewallPendingCall to NMFirewallManagerCallIdThomas Haller2015-09-251-12/+12
| | | | Matches the naming scheme for other call-ids.
* all: make use of new header file "nm-default.h"Thomas Haller2015-08-051-1/+1
|
* all: rename nm-glib-compat.h to nm-glib.h, use everywhereDan Winship2015-07-241-1/+1
| | | | | | | | | | | | | | | | Rather than randomly including one or more of <glib.h>, <glib-object.h>, and <gio/gio.h> everywhere (and forgetting to include "nm-glib-compat.h" most of the time), rename nm-glib-compat.h to nm-glib.h, include <gio/gio.h> from there, and then change all .c files in NM to include "nm-glib.h" rather than including the glib headers directly. (Public headers files still have to include the real glib headers, since nm-glib.h isn't installed...) Also, remove glib includes from header files that are already including a base object header file (which must itself already include the glib headers).
* firewall: make call handle an opaque pointer typeThomas Haller2014-11-191-11/+14
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: move content of src/firewall-manager directory to src/Thomas Haller2014-11-191-0/+72
The directory firewall-manager/ only contained one source and one header file. Move them to the parent src/ directory. Signed-off-by: Thomas Haller <thaller@redhat.com>