HomePort
hpd_adapter_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_ADAPTER_API_H
29 #define HOMEPORT_HPD_ADAPTER_API_H
30 
31 #include <hpd/hpd_shared_api.h>
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
38 hpd_error_t hpd_adapter_alloc(hpd_adapter_t **adapter, const char *id);
43 hpd_error_t hpd_adapter_set_attr(hpd_adapter_t *adapter, const char *key, const char *val);
47 
49 hpd_error_t hpd_device_alloc(hpd_device_t **device, const char *id);
54 hpd_error_t hpd_device_set_attr(hpd_device_t *device, const char *key, const char *val);
58 
60 hpd_error_t hpd_service_alloc(hpd_service_t **service, const char *id);
65 hpd_error_t hpd_service_set_attr(hpd_service_t *service, const char *key, const char *val);
71 
73 hpd_error_t hpd_parameter_alloc(hpd_parameter_t **parameter, const char *id);
77 hpd_error_t hpd_parameter_set_attr(hpd_parameter_t *parameter, const char *key, const char *val);
80 
86 
93 
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif //HOMEPORT_HPD_ADAPTER_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_service_set_actions(hpd_service_t *service,...)
hpd_error_t hpd_service_detach(const hpd_service_id_t *id, hpd_service_t **service)
hpd_error_t hpd_response_alloc(hpd_response_t **response, hpd_request_t *request, hpd_status_t status)
[hpd_request_t functions]
Definition: request_api.c:87
hpd_error_t hpd_adapter_attach(hpd_t *hpd, hpd_adapter_t *adapter)
hpd_error_t hpd_device_detach(const hpd_device_id_t *id, hpd_device_t **device)
hpd_error_t hpd_parameter_attach(hpd_service_t *service, hpd_parameter_t *parameter)
data value
hpd_error_t hpd_device_free(hpd_device_t *device)
hpd_error_t hpd_request_get_service(const hpd_request_t *req, const hpd_service_id_t **id)
[hpd_parameter_t functions]
Definition: request_api.c:69
hpd_error_t hpd_parameter_free(hpd_parameter_t *parameter)
hpd_error_t hpd_service_set_data(hpd_service_t *service, void *data, hpd_free_f on_free)
hpd_error_t hpd_adapter_detach(const hpd_adapter_id_t *id, hpd_adapter_t **adapter)
hpd_error_t hpd_device_alloc(hpd_device_t **device, const char *id)
[hpd_adapter_t functions]
hpd_error_t hpd_response_set_value(hpd_response_t *response, hpd_value_t *value)
Definition: request_api.c:144
hpd_error_t hpd_service_set_action(hpd_service_t *service, const hpd_method_t method, hpd_action_f action)
hpd_error_t hpd_device_get_data(const hpd_device_id_t *id, void **data)
data key
hpd_error_t hpd_adapter_alloc(hpd_adapter_t **adapter, const char *id)
[hpd_adapter_t functions]
Definition: comm.h:70
hpd_error_t hpd_parameter_set_attrs(hpd_parameter_t *parameter,...)
hpd_error_t hpd_parameter_set_attr(hpd_parameter_t *parameter, const char *key, const char *val)
hpd_error_t hpd_device_attach(const hpd_adapter_id_t *id, hpd_device_t *device)
enum hpd_error hpd_error_t
Definition: hpd_types.h:167
hpd_error_t hpd_service_free(hpd_service_t *service)
hpd_error_t hpd_request_get_method(const hpd_request_t *req, hpd_method_t *method)
Definition: request_api.c:75
hpd_error_t hpd_respond(hpd_response_t *response)
Definition: request_api.c:150
hpd_error_t hpd_device_set_attr(hpd_device_t *device, const char *key, const char *val)
hpd_error_t hpd_parameter_detach(const hpd_parameter_id_t *id, hpd_parameter_t **parameter)
Definition: daemon.h:50
hpd_error_t hpd_service_get_data(const hpd_service_id_t *id, void **data)
hpd_error_t hpd_adapter_set_attrs(hpd_adapter_t *adapter,...)
hpd_status_t(* hpd_action_f)(void *data, hpd_request_t *req)
[hpd_module_def_t functions]
Definition: hpd_types.h:183
hpd_error_t hpd_device_set_attrs(hpd_device_t *device,...)
hpd_error_t hpd_adapter_set_data(hpd_adapter_t *adapter, void *data, hpd_free_f on_free)
hpd_error_t hpd_device_set_data(hpd_device_t *device, void *data, hpd_free_f on_free)
hpd_error_t hpd_adapter_free(hpd_adapter_t *adapter)
hpd_error_t hpd_service_alloc(hpd_service_t **service, const char *id)
[hpd_device_t functions]
hpd_error_t hpd_adapter_get_data(const hpd_adapter_id_t *id, void **data)
hpd_error_t hpd_service_attach(hpd_device_t *device, hpd_service_t *service)
hpd_error_t hpd_adapter_set_attr(hpd_adapter_t *adapter, const char *key, const char *val)
hpd_error_t hpd_response_free(hpd_response_t *response)
Definition: request_api.c:138
hpd_error_t hpd_request_get_value(const hpd_request_t *req, const hpd_value_t **value)
Definition: request_api.c:81
enum hpd_method hpd_method_t
[hpd_log_level_t]
Definition: hpd_types.h:166
hpd_error_t hpd_service_set_attrs(hpd_service_t *service,...)
hpd_error_t hpd_service_set_attr(hpd_service_t *service, const char *key, const char *val)
hpd_error_t hpd_parameter_alloc(hpd_parameter_t **parameter, const char *id)
[hpd_service_t functions]
hpd_error_t hpd_changed(const hpd_service_id_t *id, hpd_value_t *val)
[hpd_response_t functions]
Definition: event_api.c:35