28 #ifndef HOMEPORT_HPD_TYPES_H
29 #define HOMEPORT_HPD_TYPES_H
61 #define HPD_NULL_TERMINATED -1
105 #define HPD_HTTP_STATUS_CODE_MAP(XX) \
107 XX(101, Switching Protocols) \
111 XX(203, Non-Authoritative Information) \
112 XX(204, No Content) \
113 XX(205, Reset Content) \
114 XX(206, Partial Content) \
115 XX(300, Multiple Choices) \
116 XX(301, Moved Permanently) \
119 XX(304, Not Modified) \
122 XX(307, Temporary Redirect) \
123 XX(400, Bad Request) \
124 XX(401, Unauthorized) \
125 XX(402, Payment Required) \
128 XX(405, Method Not Allowed) \
129 XX(406, Not Acceptable) \
130 XX(407, Proxy Authentication Required) \
131 XX(408, Request Timeout) \
134 XX(411, Length Required) \
135 XX(412, Precondition Failed) \
136 XX(413, Request Entity Too Large) \
137 XX(414, Request-URI Too Long) \
138 XX(415, Unsupported Media Type) \
139 XX(416, Requested Range Not Satisfiable) \
140 XX(417, Expectation Failed) \
141 XX(500, Internal Server Error) \
142 XX(501, Not Implemented) \
143 XX(502, Bad Gateway) \
144 XX(503, Service Unavailable) \
145 XX(504, Gateway Timeout) \
146 XX(505, HTTP Version Not Supported)
150 #define XX(num, str) HPD_S_##num = num,
319 #endif //HOMEPORT_HPD_TYPES_H
enum hpd_status hpd_status_t
static const char *const HPD_ATTR_UNIT
Default attribute key for units.
void(* hpd_free_f)(void *data)
[hpd_action_f]
hpd_error_t(* hpd_stop_f)(void *data, hpd_t *hpd)
hpd_parse_opt_f on_parse_opt
static const char *const HPD_ATTR_LOCATION
Default attribute key for locations.
static const char *const HPD_ATTR_MAX
Default attribute key.
static const char *const HPD_ATTR_DESC
Default attribute key for descriptions.
enum hpd_log_level hpd_log_level_t
static const char *const HPD_ATTR_NETWORK
[hpd_module_def_t]
void(* hpd_response_f)(void *data, const hpd_response_t *res)
[hpd_free_f]
static const char *const HPD_ATTR_SCALE
Default attribute key.
#define HPD_HTTP_STATUS_CODE_MAP(XX)
[hpd_method_t]
hpd_error_t(* hpd_start_f)(void *data, hpd_t *hpd)
hpd_error
[HPD_NULL_TERMINATED]
hpd_error_t(* hpd_parse_opt_f)(void *data, const char *name, const char *arg)
static const char *const HPD_ATTR_PROTOCOL
static const char *const HPD_ATTR_STEP
Default attribute key.
static const char *const HPD_ATTR_MIN
Default attribute key.
void(* hpd_device_f)(void *data, const hpd_device_id_t *device)
Device callback for listeners.
enum hpd_error hpd_error_t
[Application API Callbacks]
hpd_error_t(* hpd_create_f)(void **data, const hpd_module_t *context)
On failure data should be left as NULL.
hpd_status_t(* hpd_action_f)(void *data, hpd_request_t *req)
[hpd_module_def_t functions]
static const char *const HPD_ATTR_TYPE
Default attribute key for types.
static const char *const HPD_ATTR_VALUES
Default attribute key.
void(* hpd_value_f)(void *data, const hpd_service_id_t *service, const hpd_value_t *val)
Value callback for listeners.
hpd_error_t(* hpd_destroy_f)(void *data)
hpd_log_level
[hpd_status_t]
static const char *const HPD_ATTR_VERSION
Default attribute key for versions.
struct ev_loop hpd_ev_loop_t
static const char *const HPD_ATTR_PRODUCT
Default attribute key for product ids.
enum hpd_method hpd_method_t
[hpd_log_level_t]
static const char *const HPD_ATTR_NAME
Default attribute key for names.
static const char *const HPD_ATTR_VENDOR
Default attribute key for vendor ids.