## EXPORT_SPEC int UpnpAcceptSubscription

## ( IN UpnpDevice_Handle Hnd,
IN const char* DevID,
IN const char* ServID,
IN const char** VarName,
IN const char** NewVal,
IN int cVariables,
IN Upnp_SID SubsId )

> UpnpAcceptSubscription accepts a subscription request and sends out the current state of the eventable variables for a service.

## Documentation

> UpnpAcceptSubscription accepts a subscription request and sends out the current state of the eventable variables for a service. The device application should call this function when it receives a `UPNP_EVENT_SUBSCRIPTION_REQUEST` callback. This function is synchronous and generates no callbacks.

> UpnpAcceptSubscription can be called during the execution of a callback function.

Parameters:
  Hnd - The handle of the device.
  DevID - The device ID of the subdevice of the service generating the event.
  ServID - The unique service identifier of the service generating the event.
  VarName - Pointer to an array of event variables.
  NewVal - Pointer to an array of values for the event variables.
  cVariables - The number of event variables in VarName.
  SubsId - The subscription ID of the newly registered control point.
Returns:
  [int] An integer representing one of the following:
  - `UPNP_E_SUCCESS`: The operation completed successfully.
  - `UPNP_E_INVALID_HANDLE`: The handle is not a valid device handle.
  - `UPNP_E_INVALID_SERVICE`: The DevId/ServId pair refers to an invalid service.
  - `UPNP_E_INVALID_SID`: The specified subscription ID is not valid.
  - `UPNP_E_INVALID_PARAM`: Either VarName, NewVal, DevID, or ServID is not a valid pointer or cVariables is less than zero.
  - `UPNP_E_OUTOF_MEMORY`: Insufficient resources exist to complete this operation.

Alphabetic index

This page was generated with the help of DOC++.