mrss_new_subdata

adds an element to another element. For example: add a item to a channel, or a category to a item, and so on.

?
extern (C) @system nothrow @nogc
mrss_new_subdata

Parameters

element

parent element

subelement

type of the child (MRSS_ELEMENT_ITEM, MRSS_ELEMENT_CATEGORY, ...)

subdata

pointer to the new struct. If the pointer of *subdata does not exist it will be allocated otherwise not

Return Value

the error code

Examples

` mrss_item_t *item = null; mrss_hour_t *hour = null; mrss_day_t day; // If the element is no null, the function mrss_category_t category, // does not alloc it

mrss_new_subdata(mrss, MRSS_ELEMENT_ITEM, &item); mrss_new_subdata(mrss, MRSS_ELEMENT_SKIPHOURS, &hour); mrss_new_subdata(mrss, MRSS_ELEMENT_SKIPDAYS, &day); mrss_new_subdata(item, MRSS_ELEMENT_ITEM_CATEGORY, &category); `

Meta