HomePort
|
Go to the source code of this file.
Data Structures | |
struct | hpd_module_def |
[Application API Callbacks] More... | |
Macros | |
#define | HPD_FALSE 0 |
#define | HPD_HTTP_STATUS_CODE_MAP(XX) |
[hpd_method_t] More... | |
#define | HPD_NULL_TERMINATED -1 |
Value to be used in len parameters on \0 terminated strings. More... | |
#define | HPD_TRUE 1 |
#define | XX(num, str) HPD_S_##num = num, |
Typedefs | |
typedef hpd_status_t(* | hpd_action_f) (void *data, hpd_request_t *req) |
[hpd_module_def_t functions] More... | |
typedef struct hpd_action | hpd_action_t |
typedef struct hpd_adapter_id | hpd_adapter_id_t |
typedef struct hpd_adapter | hpd_adapter_t |
typedef char | hpd_bool_t |
typedef hpd_error_t(* | hpd_create_f) (void **data, const hpd_module_t *context) |
On failure data should be left as NULL. More... | |
typedef hpd_error_t(* | hpd_destroy_f) (void *data) |
typedef void(* | hpd_device_f) (void *data, const hpd_device_id_t *device) |
Device callback for listeners. More... | |
typedef struct hpd_device_id | hpd_device_id_t |
typedef struct hpd_device | hpd_device_t |
typedef enum hpd_error | hpd_error_t |
typedef struct ev_loop | hpd_ev_loop_t |
typedef void(* | hpd_free_f) (void *data) |
[hpd_action_f] More... | |
typedef struct hpd_listener | hpd_listener_t |
typedef enum hpd_log_level | hpd_log_level_t |
typedef enum hpd_method | hpd_method_t |
[hpd_log_level_t] More... | |
typedef struct hpd_module_def | hpd_module_def_t |
typedef struct hpd_module | hpd_module_t |
typedef struct hpd_pair | hpd_pair_t |
typedef struct hpd_parameter_id | hpd_parameter_id_t |
typedef struct hpd_parameter | hpd_parameter_t |
typedef hpd_error_t(* | hpd_parse_opt_f) (void *data, const char *name, const char *arg) |
typedef struct hpd_request | hpd_request_t |
typedef void(* | hpd_response_f) (void *data, const hpd_response_t *res) |
[hpd_free_f] More... | |
typedef struct hpd_response | hpd_response_t |
typedef struct hpd_service_id | hpd_service_id_t |
typedef struct hpd_service | hpd_service_t |
typedef hpd_error_t(* | hpd_start_f) (void *data, hpd_t *hpd) |
typedef enum hpd_status | hpd_status_t |
typedef hpd_error_t(* | hpd_stop_f) (void *data, hpd_t *hpd) |
typedef struct hpd | hpd_t |
typedef void(* | hpd_value_f) (void *data, const hpd_service_id_t *service, const hpd_value_t *val) |
Value callback for listeners. More... | |
typedef struct hpd_value | hpd_value_t |
Enumerations | |
enum | hpd_error { HPD_E_SUCCESS = 0, HPD_E_UNKNOWN = 1, HPD_E_NULL, HPD_E_ALLOC, HPD_E_STATE, HPD_E_ARGUMENT, HPD_E_NOT_UNIQUE, HPD_E_NOT_FOUND } |
[HPD_NULL_TERMINATED] More... | |
enum | hpd_log_level { HPD_L_ERROR, HPD_L_WARN, HPD_L_INFO, HPD_L_DEBUG, HPD_L_VERBOSE } |
[hpd_status_t] More... | |
enum | hpd_method { HPD_M_NONE = -1, HPD_M_GET = 0, HPD_M_PUT, HPD_M_COUNT } |
[hpd_error_t] More... | |
enum | hpd_status { HPD_S_NONE = 0 } |
Variables | |
static const char *const | HPD_ATTR_DESC = "description" |
Default attribute key for descriptions. More... | |
static const char *const | HPD_ATTR_LOCATION = "location" |
Default attribute key for locations. More... | |
static const char *const | HPD_ATTR_MAX = "max" |
Default attribute key. More... | |
static const char *const | HPD_ATTR_MIN = "min" |
Default attribute key. More... | |
static const char *const | HPD_ATTR_NAME = "name" |
Default attribute key for names. More... | |
static const char *const | HPD_ATTR_NETWORK = "network" |
[hpd_module_def_t] More... | |
static const char *const | HPD_ATTR_PRODUCT = "product" |
Default attribute key for product ids. More... | |
static const char *const | HPD_ATTR_PROTOCOL = "protocol" |
static const char *const | HPD_ATTR_SCALE = "scale" |
Default attribute key. More... | |
static const char *const | HPD_ATTR_STEP = "step" |
Default attribute key. More... | |
static const char *const | HPD_ATTR_TYPE = "type" |
Default attribute key for types. More... | |
static const char *const | HPD_ATTR_UNIT = "unit" |
Default attribute key for units. More... | |
static const char *const | HPD_ATTR_VALUES = "values" |
Default attribute key. More... | |
static const char *const | HPD_ATTR_VENDOR = "vendor" |
Default attribute key for vendor ids. More... | |
static const char *const | HPD_ATTR_VERSION = "version" |
Default attribute key for versions. More... | |
struct hpd_module_def |
Data Fields | ||
---|---|---|
hpd_create_f | on_create | |
hpd_destroy_f | on_destroy | |
hpd_parse_opt_f | on_parse_opt | |
hpd_start_f | on_start | |
hpd_stop_f | on_stop |
#define HPD_FALSE 0 |
Definition at line 37 of file hpd_types.h.
#define HPD_HTTP_STATUS_CODE_MAP | ( | XX | ) |
[hpd_method_t]
[hpd_status_t] HTTP status codes according to http://www.w3.org/Protocols/rfc2616/rfc2616.html
Categories: Informational 1xx Successful 2xx Redirection 3xx Client Error 4xx Server Error 5xx
Definition at line 105 of file hpd_types.h.
#define HPD_NULL_TERMINATED -1 |
Value to be used in len parameters on \0 terminated strings.
[HPD_NULL_TERMINATED]
Definition at line 62 of file hpd_types.h.
#define HPD_TRUE 1 |
Definition at line 36 of file hpd_types.h.
#define XX | ( | num, | |
str | |||
) | HPD_S_##num = num, |
Definition at line 150 of file hpd_types.h.
typedef hpd_status_t(* hpd_action_f) (void *data, hpd_request_t *req) |
typedef struct hpd_action hpd_action_t |
Definition at line 41 of file hpd_types.h.
typedef struct hpd_adapter_id hpd_adapter_id_t |
Definition at line 52 of file hpd_types.h.
typedef struct hpd_adapter hpd_adapter_t |
Definition at line 43 of file hpd_types.h.
typedef char hpd_bool_t |
Definition at line 35 of file hpd_types.h.
typedef hpd_error_t(* hpd_create_f) (void **data, const hpd_module_t *context) |
On failure data should be left as NULL.
[hpd_module_def_t functions]
Definition at line 175 of file hpd_types.h.
typedef hpd_error_t(* hpd_destroy_f) (void *data) |
Definition at line 176 of file hpd_types.h.
typedef void(* hpd_device_f) (void *data, const hpd_device_id_t *device) |
Device callback for listeners.
Definition at line 196 of file hpd_types.h.
typedef struct hpd_device_id hpd_device_id_t |
Definition at line 53 of file hpd_types.h.
typedef struct hpd_device hpd_device_t |
Definition at line 44 of file hpd_types.h.
typedef enum hpd_error hpd_error_t |
Definition at line 167 of file hpd_types.h.
typedef struct ev_loop hpd_ev_loop_t |
Definition at line 51 of file hpd_types.h.
typedef void(* hpd_free_f) (void *data) |
typedef struct hpd_listener hpd_listener_t |
Definition at line 42 of file hpd_types.h.
typedef enum hpd_log_level hpd_log_level_t |
Definition at line 169 of file hpd_types.h.
typedef enum hpd_method hpd_method_t |
[hpd_log_level_t]
Definition at line 166 of file hpd_types.h.
typedef struct hpd_module_def hpd_module_def_t |
Definition at line 56 of file hpd_types.h.
typedef struct hpd_module hpd_module_t |
Definition at line 40 of file hpd_types.h.
typedef struct hpd_pair hpd_pair_t |
Definition at line 50 of file hpd_types.h.
typedef struct hpd_parameter_id hpd_parameter_id_t |
Definition at line 55 of file hpd_types.h.
typedef struct hpd_parameter hpd_parameter_t |
Definition at line 46 of file hpd_types.h.
typedef hpd_error_t(* hpd_parse_opt_f) (void *data, const char *name, const char *arg) |
Definition at line 179 of file hpd_types.h.
typedef struct hpd_request hpd_request_t |
Definition at line 47 of file hpd_types.h.
typedef void(* hpd_response_f) (void *data, const hpd_response_t *res) |
[hpd_free_f]
Response function for handing responses on requests. [Application API Callbacks]
Definition at line 192 of file hpd_types.h.
typedef struct hpd_response hpd_response_t |
Definition at line 48 of file hpd_types.h.
typedef struct hpd_service_id hpd_service_id_t |
Definition at line 54 of file hpd_types.h.
typedef struct hpd_service hpd_service_t |
Definition at line 45 of file hpd_types.h.
typedef hpd_error_t(* hpd_start_f) (void *data, hpd_t *hpd) |
Definition at line 177 of file hpd_types.h.
typedef enum hpd_status hpd_status_t |
Definition at line 168 of file hpd_types.h.
typedef hpd_error_t(* hpd_stop_f) (void *data, hpd_t *hpd) |
Definition at line 178 of file hpd_types.h.
Definition at line 39 of file hpd_types.h.
typedef void(* hpd_value_f) (void *data, const hpd_service_id_t *service, const hpd_value_t *val) |
Value callback for listeners.
Definition at line 194 of file hpd_types.h.
typedef struct hpd_value hpd_value_t |
Definition at line 49 of file hpd_types.h.
enum hpd_error |
[HPD_NULL_TERMINATED]
Errors that can be returned from functions.[hpd_error_t]
Enumerator | |
---|---|
HPD_E_SUCCESS | |
HPD_E_UNKNOWN | |
HPD_E_NULL | |
HPD_E_ALLOC | |
HPD_E_STATE | |
HPD_E_ARGUMENT | |
HPD_E_NOT_UNIQUE | |
HPD_E_NOT_FOUND |
Definition at line 69 of file hpd_types.h.
enum hpd_log_level |
[hpd_status_t]
[hpd_log_level_t]
Enumerator | |
---|---|
HPD_L_ERROR | |
HPD_L_WARN | |
HPD_L_INFO | |
HPD_L_DEBUG | |
HPD_L_VERBOSE |
Definition at line 157 of file hpd_types.h.
enum hpd_method |
[hpd_error_t]
Methods that a service supports. Note that these should always start with zero and have increments of one (used as indices in arrays).[hpd_method_t]
Enumerator | |
---|---|
HPD_M_NONE | |
HPD_M_GET | |
HPD_M_PUT | |
HPD_M_COUNT |
Definition at line 86 of file hpd_types.h.
enum hpd_status |
Enumerator | |
---|---|
HPD_S_NONE |
Definition at line 148 of file hpd_types.h.
|
static |
Default attribute key for descriptions.
Used as a human readable description of the adapter, device, service, or parameter.
Definition at line 222 of file hpd_types.h.
|
static |
Default attribute key for locations.
Physical location of the object. Could be an address, the name of a room, or even more detailed. Typically only set on devices, when their location can be known by the adapter.
Definition at line 258 of file hpd_types.h.
|
static |
Default attribute key.
Set on a parameter to indicate a maximum possible value where appropriate.
Definition at line 280 of file hpd_types.h.
|
static |
Default attribute key.
Set on a parameter to indicate a minimum possible value where appropriate.
Definition at line 287 of file hpd_types.h.
|
static |
Default attribute key for names.
Short human readable name for the adapter, device, service, or parameter.
Definition at line 229 of file hpd_types.h.
|
static |
[hpd_module_def_t]
Default attribute key.
Used in adapters to describe the network that they are connected to.[Default keys]
Definition at line 215 of file hpd_types.h.
|
static |
Default attribute key for product ids.
Typically used on devices only.
Definition at line 243 of file hpd_types.h.
|
static |
Definition at line 312 of file hpd_types.h.
|
static |
Default attribute key.
Set on a parameter to indicate a scale factor that have to be multiplied with the value to match the given unit. 1 is assumed when not given.
Definition at line 303 of file hpd_types.h.
|
static |
Default attribute key.
Set on a parameter to indicate a increment between values, typically used for integers only. Step = 1 is assumed, if not set.
Definition at line 295 of file hpd_types.h.
|
static |
Default attribute key for types.
On services it typically describes a category, e.g. temperature, lamp, etc. On parameters it typically describes the datatype, e.g. int16, float, string, enum.
Definition at line 266 of file hpd_types.h.
|
static |
Default attribute key for units.
The unit can both be set on services and parameters and describes the unit of the value, e.g. C, m, kg, m/s, etc.
Definition at line 273 of file hpd_types.h.
|
static |
Default attribute key.
Set on a parameter to the list of possible values for enumeration types.
Definition at line 310 of file hpd_types.h.
|
static |
Default attribute key for vendor ids.
Usually set to a short vendor name for devices where appropriately.
Definition at line 236 of file hpd_types.h.
|
static |
Default attribute key for versions.
Example candidates for this attribute are product versions, firmware versions, and protocol versions.
Definition at line 250 of file hpd_types.h.