mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 20:27:43 +03:00
40 lines
783 B
C++
40 lines
783 B
C++
// Matt Wells, copyright Jun 2000
|
|
|
|
// . class to parse a standard MIME file
|
|
|
|
#ifndef _MIME_H_
|
|
#define _MIME_H_
|
|
|
|
#include <time.h> // time_t mktime()
|
|
#include "Url.h"
|
|
|
|
class Mime {
|
|
|
|
public:
|
|
|
|
// just sets m_mime/m_mimeLen
|
|
void set ( char *mime , long mimeLen );
|
|
|
|
char *getLine ( char *line ,
|
|
char **field , long *fieldLen ,
|
|
char **value , long *valueLen ) ;
|
|
|
|
// . returns a ptr to next line
|
|
// . fills in your "field/value" pair of this line
|
|
// . skips empty and comment lines automatically
|
|
char *getLine ( char *line ,
|
|
char **field , long fieldLen ,
|
|
char **value , long valueLen );
|
|
|
|
// use this to get the value of a unique field
|
|
char *getValue ( char *field , long *valueLen );
|
|
|
|
private:
|
|
|
|
char *m_mime;
|
|
long m_mimeLen;
|
|
char *m_mimeEnd;
|
|
};
|
|
|
|
#endif
|