Implement Filter

#define DPWS_FILTERTYPE_ACTION "http://schemas.xmlsoap.org/ws/2006/02/devprof/Action"
const char *dpws_filterType_action = DPWS_FILTERTYPE_ACTION;

int
dpws_processFilterType_action (struct soap *soap,
                               struct wse_subs *subs, 
                               struct wse__FilterType *Filter)
{
  if (Filter && Filter->__mixed)
    {
      struct wse_subsm_plugin_data *data = wse_subsm_get_plugindata (soap);
      subs->FilterData =
        (void *) soap_strdup2 (Filter->__mixed, &data->alist);
      return SOAP_OK;
    }
  else
    {
      return SOAP_ERR;
    }
}

int
dpws_cleanFilterType_action (struct soap *soap, struct wse_subs *subs)
{
  if (subs->FilterData)
    soap_free_list_item (subs->FilterData);
  return SOAP_OK;
}

Register Filter

dpws_activate_eventsource();

wse_subsm_register_filterType (subsserv->handle,
                               dpws_filterType_action,
                               dpws_processFilterType_action,
                               dpws_cleanFilterType_action);

Iterate over custom filter

struct wse_subs *
dpws_subsm_get_nextelem_by_action (struct wse_subsm_plugin_data *data, 
                                   struct wse_subs *cur, 
                                   char *action)
{
  register struct wse_subs *res = NULL;
  res = list_prepare_entry (cur, &data->subs_list, struct wse_subs, list);
  if (res == NULL)
    return NULL;
  list_for_each_entry_continue (res, &data->subs_list, struct wse_subs, list)
  {
    if (wse_subsm_is_filterType (res, dpws_filterType_action))
      {
        if (!strcmp (action, res->FilterData))
          return res;
      }
    /* res = NULL; */
  }
  return NULL;
}

struct wse_subs *
dpws_subsm_get_next_by_action (struct dpws_s *device,
                               struct wse_subs *cur, char *action)
{
  struct wse_subsm_plugin_data *data;
  if (!device)
    return NULL;
  data = wse_subsm_get_plugindata (device->hosting_handle);
  return dpws_subsm_get_nextelem_by_action (data, cur, action);
}

struct wse_subs *
dpws_subsm_get_first_by_action (struct dpws_s *device, char *action)
{
  struct wse_subsm_plugin_data *data;
  if (!device)
    return NULL;
  data = wse_subsm_get_plugindata (device->hosting_handle);
  return dpws_subsm_get_nextelem_by_action (data, NULL, action);
}