~ubuntu-branches/ubuntu/precise/ntrack/precise

« back to all changes in this revision

Viewing changes to common/ntrackarchapi.h

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2010-12-23 00:32:57 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20101223003257-rymrt74ig0m5s083
Tags: 011-1
* Upload new upstream release 011 to debian experimental

Packaging Changes:
* build depend on python-gtk2-dev for hardy; this will work for hardy and later fortunately
* package libnl module in ntrack-module-libnl-0 and provide ntrack-module-0
* libntrack0 depends on ntrack-module-libnl-0 | ntrack-module-0 to ensure
  some backend is installed

Upstream Changes:
* New upstream release for ntrack-011
 + {011} Release 011
 + update NEWS for 011 release
 + [merge] merge fix for lp:693500: make distcheck fails on hardy - lp:~asac/ntrack/lp693500
 + gobject: improve test-gmonitor-recycle.c by testing two life-cycles in one run
 + [merge] merge fix for lp:693214: ntrack hardy build and runtime issues from lp:~asac/ntrack/lp693214
 + BUILD: eliminate NULL and set AM_LDFLAGS everywhere to unbreak old autoreconfs - lp:693215
 + start ntrack 011 development
* New upstream release for ntrack-010
  + update NEWS for 010 release
  + gobject: ship a python wrapper as mtest-gmonitor-py as part of check_PROGRAMS
  + BUILD: enable maintainer mode by default so make dist doesnt fail
  + gobject: add license for gobject/pyntrack-module.c
  + gobject: explicitly link tests against libntrack.la since they now use ntrack_init directly
  + glib: explicitly link tests against libntrack.la since they now use ntrack_init directly
  + common: enable MAINTAINER_MODE define in common/Makefile.am for ntrack.c
  + gobject: extend python monitor test to make use of ntrack_init
  + object: rename pyntrack-module exception type to NtrackException
  + gobject: add a wrapped ntrack_init func to pyntrack module that sys.argv as argument
  + modules: link ntrack-libnl1.la and ntrack-libnl2.la against ../common/libntrack.la to make python module loader happy
  + modules: drop trailing / from ntrackmodulesdir definition
  + BUILD: build modules/ after common/ source and allow modules/ to depend on common/
  + qt4: make test use QNtrack::init
  + qt4: add QNtrack::init as wrapper for ntrack_init to API
  + gobject: make tests use ntrack_init
  + glib: make tests use ntrack_init
  + common: make tests use ntrack_init
  + glib: add license to recyle test
  + BUILD: enable AM_MAINTAINER_MODE automake feature in configure.ac
  + common: add ntrack_init function to ntrackbase.h that adds a couple of potential in-source locations to the backend search list iif in MAINTAINER_MODE
  + common: fix modules not looked for in MODULES_DIR; the plugin search loop iterator got accidentially bumped twice in one loop run
  + gobject: update copyright for 2010 modifications in gobject
  + common: update copyright for 2010 modifications in common/test
  + common: update copyright for 2010 modifications in common/
  + common: update NTRACK_LT_VERSION = 3:3:3 for libntraakc.so
  + common: use GCC visibile pragma to hide private functions from common/ntrackarch.h
  + common: rename private ntrack-arch.h => ntrackarch.h
  + common: consider build-tree modules/ directory before MODULES_DIR for typical ntrack tests
  + modules: create top level modules/ source directory and move ntrack-libnl.c there
  + common: trigger rebuild of libntrack.la if ntrackarchapi.h changes
  + common: first step towards public plugain api; factor backend API to separate header: ntrackarchapi.h, see lp:692327
  + common: drop ntrack_monitor_arch_event_f typdef from private ntrack-arch.h; its identical with ntrack_monitor_callback_f from public api
  + common: add ntrack-arch.h to libntrack_la_SOURCES
  + common: build ntrack-libnl.c as ntrack-libnl1.la and ntrack-libnl1.la modules - lp:692245
  + common: use plugin delegate functions in ntrackmonitor.c
  + common: add backend plugin code to ntrack.c and introduce glue functions for ntrack-arch.h API
  + common: add support for libnl-2.0 and use by default; keep compile time fallback support for libnl-1 - lp:686554
  + common: code cleanup and indent in setup_smart_handle of libnl backend
  + common: start using nl cache mngr for main handle as well; eliminate cache refills
  + common: remove unused/commented code in ntrack-libnl.c
  + common: fix how we set binary_addr for dst_filter; also set prefixlen on dst_filter
  + gobject: use pyntrack-gmonitor.override from $(srcdir) to fix failure when building in build/ dir - lp:661769
  + start ntrack 010 development
  + {009} Release 009
  + update NEWS for 009 release
  + common[test]: add license and indent boilderplate for recyle test
  + common[test]: ifx recycle test include to fix build failure in make distcheck
  + add support for moc binary if moc-qt4 is not available - lp:653882
  + gobject[test]: add license header to test-gmonitor-recycle.c test
  + add explicit ./configure flag for with/without-<binding> - see lp:654221
  + qt4: use ntrack_monitor_put to properly unref the monitor in QNtrack destructor
  + gobject[test]: add recycle test that verifies that unrefing a gmonitor works
  + glib: remove forgotten debugging output during gsource finalization
  + glib[test]: add simple gsource recyle (aka lifecycle) test to auto testsuite
  + glib: hook up ntrack monitor refcounting and implement proper gsource lifecycle
  + common[test]: add auto-run recyle test that pokes the monitor and arch refcounting facilities a bit
  + common: introduce refcounting to monitor singleton api; old code is supposed to still work; free arch backend if refc becomes 0
  + common: improve error loggin for nl_connect; factor that code to a helper func
  + common[arch]: extend backend api to require _ntrack_arch_free; implement this in ntrack-libnl.c (lp:612868)
  + gobject: change type of 'state' member in NTrackGMonitorPrivate from ntrack_state_t to NTrackGlibState
  + gobject: add missing G_END_DECLS to ntrack-gmonitor.h - see lp:594794
  + common: add missing NTRACK_END_DECLS to ntracklist.h - lp:594794
  + add 2010 to copyright years mentioned in README license header
  + start ntrack 009 development

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
 
2
/*
 
3
 * Copyright (C) 2009,2010  Alexander Sack <asac@jwsdot.com>
 
4
 *
 
5
 * This file is part of:
 
6
 *     ntrack - Network Status Tracking for Desktop Applications
 
7
 *              http://launchpad.net/ntrack
 
8
 *
 
9
 *  ntrack is free software: you can redistribute it and/or modify
 
10
 *  it under the terms of the GNU Lesser General Public License as
 
11
 *  published by the Free Software Foundation, either version 3 of
 
12
 *  the License, or (at your option) any later version.
 
13
 *
 
14
 *  ntrack is distributed in the hope that it will be useful,
 
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
 *  GNU Lesser General Public License for more details.
 
18
 *
 
19
 *  You should have received a copy of the GNU Lesser General Public License
 
20
 *  along with ntrack.  If not, see <http://www.gnu.org/licenses/>.
 
21
 */
 
22
#include "ntrackmonitor.h"
 
23
 
 
24
#ifndef __NTRACK_ARCH_API_H__
 
25
#define __NTRACK_ARCH_API_H__
 
26
 
 
27
NTRACK_BEGIN_DECLS
 
28
 
 
29
struct _ntrack_monitor
 
30
{
 
31
        ntrack_state_t state;
 
32
        struct _listener_pack **packs;
 
33
        int pack_len;
 
34
        int pack_size;
 
35
};
 
36
 
 
37
struct _ntrack_monitor_arch
 
38
{
 
39
        ntrack_monitor_t parent;
 
40
 
 
41
        ntrackpointer data;
 
42
 
 
43
        ntrack_monitor_callback_f cb;
 
44
        ntrackpointer cb_user_data;
 
45
};
 
46
 
 
47
ntrack_monitor_t*
 
48
_ntrack_arch_new (ntrack_monitor_callback_f callback, ntrackpointer user_data);
 
49
 
 
50
int*
 
51
_ntrack_arch_get_rfds (ntrack_monitor_t *self);
 
52
 
 
53
int
 
54
_ntrack_arch_process_data (ntrackpointer self, int* fds);
 
55
 
 
56
void
 
57
_ntrack_arch_free (ntrackpointer self);
 
58
 
 
59
NTRACK_END_DECLS
 
60
 
 
61
#endif