HomePort
request.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_REQUEST_H
29 #define HOMEPORT_REQUEST_H
30 
31 #include "hpd/hpd_types.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 #endif //HOMEPORT_REQUEST_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 request_get_response_request_method(const hpd_response_t *response, hpd_method_t *method)
Definition: request.c:171
data value
hpd_error_t request_get_request_service(const hpd_request_t *req, const hpd_service_id_t **id)
Definition: request.c:91
hpd_error_t request_set_request_data(hpd_request_t *request, void *data, hpd_free_f on_free)
Definition: request.c:84
hpd_error_t request_get_response_request_value(const hpd_response_t *response, const hpd_value_t **value)
Definition: request.c:177
hpd_error_t request_respond(hpd_response_t *response)
Definition: request.c:274
hpd_error_t request_request(hpd_request_t *request)
Definition: request.c:255
void(* hpd_response_f)(void *data, const hpd_response_t *res)
[hpd_free_f]
Definition: hpd_types.h:192
Definition: comm.h:70
hpd_error_t request_alloc_response(hpd_response_t **response, hpd_request_t *request, hpd_status_t status)
Definition: request.c:109
enum hpd_error hpd_error_t
Definition: hpd_types.h:167
hpd_error_t request_get_response_request_data(const hpd_response_t *response, void **data)
Definition: request.c:159
hpd_error_t request_get_response_request_service(const hpd_response_t *response, const hpd_service_id_t **service)
Definition: request.c:165
hpd_error_t request_alloc_request(hpd_request_t **request, const hpd_service_id_t *id, hpd_method_t method, hpd_response_f on_response)
Definition: request.c:38
hpd_error_t request_set_request_value(hpd_request_t *request, hpd_value_t *value)
Definition: request.c:69
hpd_error_t request_get_request_method(const hpd_request_t *req, hpd_method_t *method)
Definition: request.c:97
hpd_error_t request_get_response_status(const hpd_response_t *response, hpd_status_t *status)
Definition: request.c:147
hpd_error_t request_get_request_value(const hpd_request_t *req, const hpd_value_t **value)
Definition: request.c:103
enum hpd_method hpd_method_t
[hpd_log_level_t]
Definition: hpd_types.h:166
hpd_error_t request_free_response(hpd_response_t *response)
Definition: request.c:122
hpd_error_t request_free_request(hpd_request_t *request)
Definition: request.c:58
hpd_error_t request_get_response_value(const hpd_response_t *response, const hpd_value_t **value)
Definition: request.c:153
hpd_error_t request_set_response_value(hpd_response_t *response, hpd_value_t *value)
Definition: request.c:132