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

int osip_message_set_content_disposition ( osip_message_t sip,
const char *  hvalue 
)

Set the Content-disposition header.

Parameters:
sip The element to work on.
hvalue The string describing the element.

Definition at line 29 of file osip_content_disposition.c.

References osip_message::content_dispositions, osip_message::message_property, osip_content_disposition_free, osip_content_disposition_init, osip_content_disposition_parse(), and osip_list_add().

{
  osip_content_disposition_t *content_disposition;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return 0;

  i = osip_content_disposition_init (&content_disposition);
  if (i != 0)
    return -1;
  i = osip_content_disposition_parse (content_disposition, hvalue);
  if (i != 0)
    {
      osip_content_disposition_free (content_disposition);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->content_dispositions, content_disposition, -1);
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index