2022-10-27 21:17:24 -04:00
|
|
|
enum feedFormat {
|
|
|
|
NONE,
|
|
|
|
RSS,
|
|
|
|
ATOM,
|
|
|
|
};
|
|
|
|
|
2022-10-29 17:48:36 -04:00
|
|
|
enum fields {
|
|
|
|
FIELD_TITLE,
|
|
|
|
FIELD_LINK,
|
|
|
|
FIELD_DESCRIPTION,
|
|
|
|
FIELD_ENCLOSURE_URL,
|
|
|
|
|
|
|
|
FIELD_END
|
|
|
|
};
|
|
|
|
enum numFields {
|
|
|
|
NUM_ENCLOSURE_SIZE,
|
|
|
|
|
|
|
|
NUM_END
|
|
|
|
};
|
2022-10-27 21:17:24 -04:00
|
|
|
typedef struct itemStruct itemStruct;
|
|
|
|
struct itemStruct {
|
2022-10-29 17:48:36 -04:00
|
|
|
char *fields[FIELD_END];
|
|
|
|
int numFields[NUM_END];
|
2022-10-27 21:17:24 -04:00
|
|
|
itemStruct *next;
|
|
|
|
};
|
|
|
|
|
2022-10-29 17:48:36 -04:00
|
|
|
void copyField(itemStruct *item, enum fields field, char *str);
|
|
|
|
|
2022-10-27 21:17:24 -04:00
|
|
|
void freeItem(itemStruct *item);
|
|
|
|
void itemAction(itemStruct *item, const char *folder);
|
|
|
|
void finish(char *url, long responseCode);
|
2022-10-29 17:48:36 -04:00
|
|
|
|
|
|
|
int rssEnclosure(itemStruct *item, xmlNodePtr node);
|
|
|
|
|
|
|
|
int atomLink(itemStruct *item, xmlNodePtr node);
|