示例#1
0
/**
 * When an event is received, update also the associated service's
 * state table to include the evented state variable.
 *
 * @param service The service, whose state table to update
 * @param prop The evented property from which to update
 */
void mupnp_controlpoint_updatestatetablefromproperty(mUpnpService* service,
    mUpnpProperty* prop)
{
  mUpnpStateVariable* var = NULL;

  mupnp_log_debug_l4("Entering...\n");

  if (service == NULL || prop == NULL) {
    return;
  }

  var = mupnp_service_getstatevariablebyname(service,
      mupnp_property_getname(prop));

  if (var) {
    mupnp_statevariable_setvalue(var,
        mupnp_property_getvalue(prop));
  }

  mupnp_log_debug_l4("Leaving...\n");
}
示例#2
0
void EventListener(mUpnpProperty *prop)
{
	printf("Property Changed (%s) = %s\n",
		mupnp_property_getname(prop),
		mupnp_property_getvalue(prop));
}