コード例 #1
0
LIBETPAN_EXPORT
struct mailimap_section *
mailimap_section_new_part_header_fields_not(struct mailimap_section_part
					    * part,
					    struct mailimap_header_list
					    * header_list)
{
  struct mailimap_section * section;
  struct mailimap_section_msgtext * msgtext;

  msgtext =
    mailimap_section_msgtext_new(MAILIMAP_SECTION_MSGTEXT_HEADER_FIELDS_NOT,
				 header_list);
  if (msgtext == NULL)
    return NULL;

  section = mailimap_section_new_part_msgtext(part, msgtext);
  if (section == NULL) {
    /* detach header_list so that it will not be freed */
    msgtext->sec_header_list = NULL;
    mailimap_section_msgtext_free(msgtext);
    return NULL;
  }

  return section;
}
コード例 #2
0
struct mailimap_section *
mailimap_section_new_part_text(struct mailimap_section_part * part)
{
  struct mailimap_section * section;
  struct mailimap_section_msgtext * msgtext;

  msgtext = mailimap_section_msgtext_new(MAILIMAP_SECTION_MSGTEXT_TEXT, NULL);
  if (msgtext == NULL)
    return NULL;

  section = mailimap_section_new_part_msgtext(part, msgtext);
  if (section == NULL) {
    mailimap_section_msgtext_free(msgtext);
    return NULL;
  }

  return section;
}
コード例 #3
0
LIBETPAN_EXPORT
struct mailimap_section *
mailimap_section_new_part_header(struct mailimap_section_part * part)
{
  struct mailimap_section_msgtext * msgtext;
  struct mailimap_section * section;

  msgtext = mailimap_section_msgtext_new(MAILIMAP_SECTION_MSGTEXT_HEADER,
					 NULL);
  if (msgtext == NULL)
    return NULL;

  section = mailimap_section_new_part_msgtext(part, msgtext);
  if (section == NULL) {
    mailimap_section_msgtext_free(msgtext);
    return NULL;
  }

  return section;
}