~diwic/ubuntu/lucid/pulseaudio/bugfixes

« back to all changes in this revision

Viewing changes to src/pulsecore/hook-list.h

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2008-11-04 15:46:00 UTC
  • mfrom: (1.2.1 upstream) (1.1.6 lenny)
  • Revision ID: james.westby@ubuntu.com-20081104154600-hlzknpcazaam0nxm
Tags: 0.9.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Don't build against, and create jack package. Jack is not in main.
  - Remove --disable-per-user-esound-socket from configure flags, as we still
    want per user esound sockets.
  - Remove stop links from rc0 and rc6.
  - Change default resample algorithm and bubffer size.
  - Add alsa configuration files to route alsa applications via pulseaudio.
  - Move libasound2-plugins from Recommends to Depends.
* debian/pulseaudio.preinst: When upgrading from intrepid, remove
  /etc/X11/Xsession.d/70pulseaudio, as this was used to minimize a race
  condition when starting GNOME in intrepid. This race should not exist in
  jaunty once libcanberra is built to use pulseaudio as a backend.
* Do not spawn a pulseaudio server if clients fail to find a running server.
* Remove explicit version dependency for libspeex-dev to allow the package
  to be built for now.
* Regenerate autotools files to work with Ubuntu's newer libtool/libltdl.
* debian/control: libpulsecore5 -> libpulsecore8 to match the library
  soname.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef foohooklistfoo
2
2
#define foohooklistfoo
3
3
 
4
 
/* $Id: hook-list.h 1426 2007-02-13 15:35:19Z ossman $ */
5
 
 
6
4
/***
7
5
  This file is part of PulseAudio.
8
6
 
24
22
  USA.
25
23
***/
26
24
 
 
25
#include <pulse/xmalloc.h>
 
26
#include <pulse/gccmacro.h>
 
27
 
27
28
#include <pulsecore/llist.h>
28
 
#include <pulse/xmalloc.h>
29
 
#include <pulsecore/gccmacro.h>
30
29
 
31
30
typedef struct pa_hook_slot pa_hook_slot;
32
31
typedef struct pa_hook pa_hook;
37
36
    PA_HOOK_CANCEL = -1
38
37
} pa_hook_result_t;
39
38
 
 
39
typedef enum pa_hook_priority {
 
40
    PA_HOOK_EARLY = -100,
 
41
    PA_HOOK_NORMAL = 0,
 
42
    PA_HOOK_LATE = 100
 
43
} pa_hook_priority_t;
 
44
 
40
45
typedef pa_hook_result_t (*pa_hook_cb_t)(
41
46
        void *hook_data,
42
47
        void *call_data,
43
48
        void *slot_data);
44
49
 
45
50
struct pa_hook_slot {
46
 
    int dead;
 
51
    pa_bool_t dead;
47
52
    pa_hook *hook;
 
53
    pa_hook_priority_t priority;
48
54
    pa_hook_cb_t callback;
49
55
    void *data;
50
56
    PA_LLIST_FIELDS(pa_hook_slot);
52
58
 
53
59
struct pa_hook {
54
60
    PA_LLIST_HEAD(pa_hook_slot, slots);
55
 
    pa_hook_slot *last;
56
 
    int firing, n_dead;
 
61
    int n_firing, n_dead;
57
62
 
58
63
    void *data;
59
64
};
60
65
 
61
66
void pa_hook_init(pa_hook *hook, void *data);
62
 
void pa_hook_free(pa_hook *hook);
 
67
void pa_hook_done(pa_hook *hook);
63
68
 
64
 
pa_hook_slot* pa_hook_connect(pa_hook *hook, pa_hook_cb_t, void *data);
 
69
pa_hook_slot* pa_hook_connect(pa_hook *hook, pa_hook_priority_t prio, pa_hook_cb_t cb, void *data);
65
70
void pa_hook_slot_free(pa_hook_slot *slot);
66
71
 
67
72
pa_hook_result_t pa_hook_fire(pa_hook *hook, void *data);