static int event_handler(Upnp_EventType EventType, void *event, void *Cookie) { struct device_private *priv = (struct device_private *)Cookie; switch (EventType) { case UPNP_CONTROL_ACTION_REQUEST: handle_action_request(priv, event); break; case UPNP_CONTROL_GET_VAR_REQUEST: printf("NOT IMPLEMENTED: control get variable request\n"); break; case UPNP_EVENT_SUBSCRIPTION_REQUEST: printf("event subscription request\n"); handle_subscription_request(priv, event); break; default: printf("Unknown event type: %d\n", EventType); break; } return 0; }
static int event_handler(Upnp_EventType EventType, void *event, void *Cookie) { switch (EventType) { case UPNP_CONTROL_ACTION_REQUEST: handle_action_request(event); break; case UPNP_CONTROL_GET_VAR_REQUEST: debug_printf(MSG_INFO, "NOT IMPLEMENTED: control get variable request\n"); break; case UPNP_EVENT_SUBSCRIPTION_REQUEST: //printf("event subscription request\n"); handle_subscription_request(event); break; default: debug_printf(MSG_INFO, "Unknown event type: %d\n", EventType); break; } return 0; }
static int event_handler(Upnp_EventType EventType, void *event, void *userdata) { struct upnp_device *priv = (struct upnp_device *) userdata; switch (EventType) { case UPNP_CONTROL_ACTION_REQUEST: handle_action_request(priv, event); break; case UPNP_CONTROL_GET_VAR_REQUEST: handle_var_request(priv, event); break; case UPNP_EVENT_SUBSCRIPTION_REQUEST: handle_subscription_request(priv, event); break; default: Log_error("upnp", "Unknown event type: %d", EventType); break; } return 0; }