Beginning parser work.

This commit is contained in:
Brad Arant 2025-12-15 16:53:49 -08:00
parent 1542fbe218
commit d54aec1f06
8 changed files with 105 additions and 0 deletions

Binary file not shown.

Binary file not shown.

11
IMFBoundary.cpp Normal file
View File

@ -0,0 +1,11 @@
#include "IMFBoundary.h"
#include "Exception.h"
#include <unistd.h>
namespace coreutils {
IMFBoundary(StreamReader &reader, ZString boundary) : boundary(boundary) {
if(reader.unparsed().getLength()
}
}

20
IMFBoundary.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef __IMFBoundary_h__
# define __IMFBoundary_h__
#include "StreamReader.h"
namespace coreutils {
class IMFBoundary {
public:
IMFBoundary(StreamReader &reader, ZString boundary);
private:
ZString boundary;
};
}
#endif

9
Parser.cpp Normal file
View File

@ -0,0 +1,9 @@
#include "StreamReader.h"
namespace coreutils {
StreamReader::StreamReader(int fd) {}
StreamReader::~StreamReader() {}
}

28
Parser.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef __Parser_h__
#define __Parser_h__
#include <fstream>
#include <vector>
namespace coreutils {
///
/// Use the StreamReader to read data from a socket and buffer it for use by
/// various stream parsers such as IMFMessage. The reader maintains data
/// consistency regardless of the packet delivery for the stream.
///
class Parser {
public:
Parser(int fd);
virtual ~Parser();
private:
vector<MString> buffer;
};
}
#endif

9
StreamReader.cpp Normal file
View File

@ -0,0 +1,9 @@
#include "StreamReader.h"
namespace coreutils {
StreamReader::StreamReader(int fd) {}
StreamReader::~StreamReader() {}
}

28
StreamReader.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef __StreamReader_h__
#define __StreamReader_h__
#include <fstream>
#include <vector>
namespace coreutils {
///
/// Use the StreamReader to read data from a socket and buffer it for use by
/// various stream parsers such as IMFMessage. The reader maintains data
/// consistency regardless of the packet delivery for the stream.
///
class StreamReader {
public:
StreamReader(int fd);
virtual ~StreamReader();
private:
vector<MString> buffer;
};
}
#endif