HomePort
event.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011 Aalborg University. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification, are
5  * permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice, this list of
8  * conditions and the following disclaimer.
9  *
10  * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11  * of conditions and the following disclaimer in the documentation and/or other materials
12  * provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY Aalborg University ''AS IS'' AND ANY EXPRESS OR IMPLIED
15  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Aalborg University OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  *
24  * The views and conclusions contained in the software and documentation are those of the
25  * authors and should not be interpreted as representing official policies, either expressed
26  */
27 
28 #ifndef HOMEPORT_EVENT_H
29 #define HOMEPORT_EVENT_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #include "hpd/hpd_types.h"
36 
39 
43 
46 
48 
50 
52 
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif //HOMEPORT_EVENT_H
hpd_error_t event_get_listener_data(const hpd_listener_t *listener, void **data)
Definition: event.c:90
hpd_error_t event_inform_adapter_detached(hpd_adapter_t *adapter)
Definition: event.c:223
void(* hpd_free_f)(void *data)
[hpd_action_f]
Definition: hpd_types.h:187
hpd_error_t event_free_listener(hpd_listener_t *listener)
Definition: event.c:46
hpd_error_t event_unsubscribe(hpd_listener_t *listener)
Definition: event.c:80
hpd_error_t event_inform_device_attached(hpd_device_t *device)
Definition: event.c:235
hpd_error_t event_set_device_callback(hpd_listener_t *listener, hpd_device_f on_attach, hpd_device_f on_detach)
Definition: event.c:67
hpd_error_t event_inform_device_detached(hpd_device_t *device)
Definition: event.c:262
hpd_error_t event_inform_adapter_attached(hpd_adapter_t *adapter)
Definition: event.c:211
hpd_error_t event_set_listener_data(hpd_listener_t *listener, void *data, hpd_free_f on_free)
Definition: event.c:53
Definition: comm.h:70
void(* hpd_device_f)(void *data, const hpd_device_id_t *device)
Device callback for listeners.
Definition: hpd_types.h:196
hpd_error_t event_set_value_callback(hpd_listener_t *listener, hpd_value_f on_change)
Definition: event.c:61
enum hpd_error hpd_error_t
Definition: hpd_types.h:167
hpd_error_t event_alloc_listener(hpd_listener_t **listener, hpd_t *hpd)
Definition: event.c:36
hpd_error_t event_foreach_attached(const hpd_listener_t *listener)
Definition: event.c:96
Definition: daemon.h:50
hpd_error_t event_changed(const hpd_service_id_t *id, hpd_value_t *val)
Definition: event.c:182
void(* hpd_value_f)(void *data, const hpd_service_id_t *service, const hpd_value_t *val)
Value callback for listeners.
Definition: hpd_types.h:194
hpd_error_t event_subscribe(hpd_listener_t *listener)
Definition: event.c:74