Logo Search packages:      
Sourcecode: libupnp4 version File versions  Download package

The reason code for an event callback.

The Event parameter will be different depending on the reason for the callback. The descriptions for each event type describe the contents of the Event parameter.

Enumerator:
UPNP_CONTROL_ACTION_REQUEST  Received by a device when a control point issues a control request. The Event parameter contains a pointer to a UpnpActionRequest structure containing the action. The application stores the results of the action in this structure.
UPNP_CONTROL_ACTION_COMPLETE  A UpnpSendActionAsync call completed. The Event parameter contains a pointer to a UpnpActionComplete structure with the results of the action.
UPNP_CONTROL_GET_VAR_REQUEST  Received by a device when a query for a single service variable arrives. The Event parameter contains a pointer to a UpnpStateVarRequest structure containing the name of the variable and value.
UPNP_CONTROL_GET_VAR_COMPLETE  A UpnpGetServiceVarStatus call completed. The Event parameter contains a pointer to a UpnpStateVarComplete structure containing the value for the variable.
UPNP_DISCOVERY_ADVERTISEMENT_ALIVE  Received by a control point when a new device or service is available. The Event parameter contains a pointer to a UpnpDiscovery structure with the information about the device or service.
UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE  Received by a control point when a device or service shuts down. The Event parameter contains a pointer to a UpnpDiscovery structure containing the information about the device or service.
UPNP_DISCOVERY_SEARCH_RESULT  Received by a control point when a matching device or service responds. The Event parameter contains a pointer to a UpnpDiscovery structure containing the information about the reply to the search request.
UPNP_DISCOVERY_SEARCH_TIMEOUT  Received by a control point when the search timeout expires. The SDK generates no more callbacks for this search after this event. The Event parameter is NULL.
UPNP_EVENT_SUBSCRIPTION_REQUEST  Received by a device when a subscription arrives. The Event parameter contains a pointer to a UpnpSubscriptionRequest structure. At this point, the subscription has already been accepted. UpnpAcceptSubscription needs to be called to confirm the subscription and transmit the initial state table. This can be done during this callback. The SDK generates no events for a subscription unless the device application calls UpnpAcceptSubscription.
UPNP_EVENT_RECEIVED  Received by a control point when an event arrives. The Event parameter contains a UpnpEvent structure with the information about the event.
UPNP_EVENT_RENEWAL_COMPLETE  A UpnpRenewSubscriptionAsync call completed. The status of the renewal is in the Event parameter as a Upnp_Event_Subscription structure.
UPNP_EVENT_SUBSCRIBE_COMPLETE  A UpnpSubscribeAsync call completed. The status of the subscription is in the Event parameter as a Upnp_Event_Subscription structure.
UPNP_EVENT_UNSUBSCRIBE_COMPLETE  A UpnpUnSubscribeAsync call completed. The status of the subscription is in the Event parameter as a UpnpEventSubscribe structure.
UPNP_EVENT_AUTORENEWAL_FAILED  The auto-renewal of a client subscription failed. The Event parameter is a UpnpEventSubscribe structure with the error code set appropriately. The subscription is no longer valid.
UPNP_EVENT_SUBSCRIPTION_EXPIRED  A client subscription has expired. This will only occur if auto-renewal of subscriptions is disabled. The Event parameter is a UpnpEventSubscribe structure. The subscription is no longer valid.

Definition at line 479 of file upnp.h.

                      {
      /*
       * Control callbacks
       */

      /*! Received by a device when a control point issues a control
       * request.  The \b Event parameter contains a pointer to a \b
       * UpnpActionRequest structure containing the action.  The application
       * stores the results of the action in this structure. */
      UPNP_CONTROL_ACTION_REQUEST,

      /*! A \b UpnpSendActionAsync call completed. The \b Event
       * parameter contains a pointer to a \b UpnpActionComplete structure
       * with the results of the action.  */
      UPNP_CONTROL_ACTION_COMPLETE,

      /*! Received by a device when a query for a single service variable
       * arrives.  The \b Event parameter contains a pointer to a \b
       * UpnpStateVarRequest structure containing the name of the variable
       * and value.  */
      UPNP_CONTROL_GET_VAR_REQUEST,

      /*! A \b UpnpGetServiceVarStatus call completed. The \b Event
       * parameter contains a pointer to a \b UpnpStateVarComplete structure
       * containing the value for the variable.  */
      UPNP_CONTROL_GET_VAR_COMPLETE,

      /*
       * Discovery callbacks
       */

      /*! Received by a control point when a new device or service is available.  
       * The \b Event parameter contains a pointer to a \b
       * UpnpDiscovery structure with the information about the device
       * or service.  */
      UPNP_DISCOVERY_ADVERTISEMENT_ALIVE,

      /*! Received by a control point when a device or service shuts down. The \b
       * Event parameter contains a pointer to a \b UpnpDiscovery
       * structure containing the information about the device or
       * service.  */
      UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE,

      /*! Received by a control point when a matching device or service responds.
       * The \b Event parameter contains a pointer to a \b
       * UpnpDiscovery structure containing the information about
       * the reply to the search request.  */
      UPNP_DISCOVERY_SEARCH_RESULT,

      /*! Received by a control point when the search timeout expires.  The
       * SDK generates no more callbacks for this search after this 
       * event.  The \b Event parameter is \c NULL.  */
      UPNP_DISCOVERY_SEARCH_TIMEOUT,

      /*
       * Eventing callbacks
       */

      /*! Received by a device when a subscription arrives.
       * The \b Event parameter contains a pointer to a \b
       * UpnpSubscriptionRequest structure.  At this point, the
       * subscription has already been accepted.  \b UpnpAcceptSubscription
       * needs to be called to confirm the subscription and transmit the
       * initial state table.  This can be done during this callback.  The SDK
       * generates no events for a subscription unless the device 
       * application calls \b UpnpAcceptSubscription.
       */
      UPNP_EVENT_SUBSCRIPTION_REQUEST,

      /*! Received by a control point when an event arrives. The \b
       * Event parameter contains a \b UpnpEvent structure
       * with the information about the event.  */
      UPNP_EVENT_RECEIVED,

      /*! A \b UpnpRenewSubscriptionAsync call completed. The status of
       * the renewal is in the \b Event parameter as a \b
       * Upnp_Event_Subscription structure.  */
      UPNP_EVENT_RENEWAL_COMPLETE,

      /*! A \b UpnpSubscribeAsync call completed. The status of the
       * subscription is in the \b Event parameter as a \b
       * Upnp_Event_Subscription structure.  */
      UPNP_EVENT_SUBSCRIBE_COMPLETE,

      /*! A \b UpnpUnSubscribeAsync call completed. The status of the
       * subscription is in the \b Event parameter as a \b
       * UpnpEventSubscribe structure.  */
      UPNP_EVENT_UNSUBSCRIBE_COMPLETE,

      /*! The auto-renewal of a client subscription failed.   
       * The \b Event parameter is a \b UpnpEventSubscribe structure 
       * with the error code set appropriately. The subscription is no longer 
       * valid. */
      UPNP_EVENT_AUTORENEWAL_FAILED,

      /*! A client subscription has expired. This will only occur 
       * if auto-renewal of subscriptions is disabled.
       * The \b Event parameter is a \b UpnpEventSubscribe
       * structure. The subscription is no longer valid. */
      UPNP_EVENT_SUBSCRIPTION_EXPIRED
};


Generated by  Doxygen 1.6.0   Back to index