HomePort
hpd_application_api.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_HPD_APPLICATION_API_H
29 #define HOMEPORT_HPD_APPLICATION_API_H
30 
31 #include <hpd/hpd_shared_api.h>
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
44 
53 
61 hpd_error_t hpd_listener_get_data(const hpd_listener_t *listener, void **data);
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 #endif //HOMEPORT_HPD_APPLICATION_API_H
enum hpd_status hpd_status_t
Definition: hpd_types.h:168
void(* hpd_free_f)(void *data)
[hpd_action_f]
Definition: hpd_types.h:187
hpd_error_t hpd_request(hpd_request_t *request)
Definition: request_api.c:62
hpd_error_t hpd_response_get_request_value(const hpd_response_t *response, const hpd_value_t **value)
Definition: request_api.c:187
hpd_error_t hpd_listener_get_data(const hpd_listener_t *listener, void **data)
Definition: event_api.c:80
hpd_error_t hpd_listener_alloc(hpd_listener_t **listener, hpd_t *hpd)
[hpd_response_t functions]
Definition: event_api.c:42
data value
hpd_error_t hpd_request_free(hpd_request_t *request)
Definition: request_api.c:44
hpd_error_t hpd_listener_set_value_callback(hpd_listener_t *listener, hpd_value_f on_change)
Definition: event_api.c:54
hpd_error_t hpd_response_get_request_data(const hpd_response_t *response, void **data)
Definition: request_api.c:169
void(* hpd_response_f)(void *data, const hpd_response_t *res)
[hpd_free_f]
Definition: hpd_types.h:192
hpd_error_t hpd_request_set_value(hpd_request_t *request, hpd_value_t *value)
Definition: request_api.c:50
hpd_error_t hpd_listener_set_device_callback(hpd_listener_t *listener, hpd_device_f on_attach, hpd_device_f on_detach)
Definition: event_api.c:59
hpd_error_t hpd_listener_set_data(hpd_listener_t *listener, void *data, hpd_free_f on_free)
Definition: event_api.c:48
hpd_error_t hpd_request_alloc(hpd_request_t **request, const hpd_service_id_t *id, hpd_method_t method, hpd_response_f on_response)
[hpd_request_t functions]
Definition: request_api.c:35
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
enum hpd_error hpd_error_t
Definition: hpd_types.h:167
hpd_error_t hpd_response_get_status(const hpd_response_t *response, hpd_status_t *status)
[hpd_request_t functions]
Definition: request_api.c:157
hpd_error_t hpd_request_set_data(hpd_request_t *request, void *data, hpd_free_f on_free)
Definition: request_api.c:56
hpd_error_t hpd_response_get_request_service(const hpd_response_t *response, const hpd_service_id_t **service)
Definition: request_api.c:175
hpd_error_t hpd_foreach_attached(const hpd_listener_t *listener)
Definition: event_api.c:86
Definition: daemon.h:50
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
enum hpd_method hpd_method_t
[hpd_log_level_t]
Definition: hpd_types.h:166
hpd_error_t hpd_response_get_value(const hpd_response_t *response, const hpd_value_t **value)
Definition: request_api.c:163
hpd_error_t hpd_response_get_request_method(const hpd_response_t *response, hpd_method_t *method)
Definition: request_api.c:181
hpd_error_t hpd_listener_free(hpd_listener_t *listener)
Definition: event_api.c:74
hpd_error_t hpd_subscribe(hpd_listener_t *listener)
Definition: event_api.c:65