Beginning parser work.
This commit is contained in:
parent
1542fbe218
commit
d54aec1f06
Binary file not shown.
Binary file not shown.
11
IMFBoundary.cpp
Normal file
11
IMFBoundary.cpp
Normal 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
20
IMFBoundary.h
Normal 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
9
Parser.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "StreamReader.h"
|
||||
|
||||
namespace coreutils {
|
||||
|
||||
StreamReader::StreamReader(int fd) {}
|
||||
|
||||
StreamReader::~StreamReader() {}
|
||||
|
||||
}
|
||||
28
Parser.h
Normal file
28
Parser.h
Normal 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
9
StreamReader.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "StreamReader.h"
|
||||
|
||||
namespace coreutils {
|
||||
|
||||
StreamReader::StreamReader(int fd) {}
|
||||
|
||||
StreamReader::~StreamReader() {}
|
||||
|
||||
}
|
||||
28
StreamReader.h
Normal file
28
StreamReader.h
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user