mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Remove unused and only partially implemented ConversionSerializer.
Seems like the main use of this was to convert from file to XML serialization format.
This commit is contained in:
parent
39d811ff06
commit
3bec30ae93
2 changed files with 0 additions and 84 deletions
|
@ -976,69 +976,6 @@ void FileSerializer::GotPacket(Packet* p)
|
||||||
delete p;
|
delete p;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConversionSerializer::ConversionSerializer(SerializationFormat* in,
|
|
||||||
SerializationFormat* out)
|
|
||||||
: FileSerializer(in)
|
|
||||||
{
|
|
||||||
serout = new FileSerializer(out);
|
|
||||||
}
|
|
||||||
|
|
||||||
ConversionSerializer::~ConversionSerializer()
|
|
||||||
{
|
|
||||||
delete serout;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ConversionSerializer::Convert(const char* file_in, const char* file_out)
|
|
||||||
{
|
|
||||||
reporter->InternalError("Error: Printing as XML is broken.");
|
|
||||||
|
|
||||||
if ( ! serout->Open(file_out, true) )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
UnserialInfo info_in(this);
|
|
||||||
if ( ! Read(&info_in, file_in) )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if ( ! serout->Close() )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConversionSerializer::GotEvent(const char* name, double time,
|
|
||||||
EventHandlerPtr event, val_list* args)
|
|
||||||
{
|
|
||||||
SerialInfo info(serout);
|
|
||||||
serout->Serialize(&info, name, args);
|
|
||||||
delete_vals(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConversionSerializer::GotFunctionCall(const char* name, double time,
|
|
||||||
Func* func, val_list* args)
|
|
||||||
{
|
|
||||||
SerialInfo info(serout);
|
|
||||||
serout->Serialize(&info, name, args);
|
|
||||||
delete_vals(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConversionSerializer::GotID(ID* id, Val* val)
|
|
||||||
{
|
|
||||||
reporter->Warning("ConversionSerializer::GotID not implemented");
|
|
||||||
Unref(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConversionSerializer::GotStateAccess(StateAccess* s)
|
|
||||||
{
|
|
||||||
reporter->Warning("ConversionSerializer::GotID not implemented");
|
|
||||||
delete s;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConversionSerializer::GotPacket(Packet* p)
|
|
||||||
{
|
|
||||||
reporter->Warning("ConversionSerializer::GotPacket not implemented");
|
|
||||||
delete p;
|
|
||||||
}
|
|
||||||
|
|
||||||
EventPlayer::EventPlayer(const char* file)
|
EventPlayer::EventPlayer(const char* file)
|
||||||
: stream_time(), replay_time(), ne_time(), ne_handler(), ne_args()
|
: stream_time(), replay_time(), ne_time(), ne_handler(), ne_args()
|
||||||
{
|
{
|
||||||
|
|
|
@ -313,27 +313,6 @@ protected:
|
||||||
int fd;
|
int fd;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Converts from one serialization format into another.
|
|
||||||
class ConversionSerializer:public FileSerializer {
|
|
||||||
public:
|
|
||||||
ConversionSerializer(SerializationFormat* in, SerializationFormat* out);
|
|
||||||
virtual ~ConversionSerializer();
|
|
||||||
|
|
||||||
bool Convert(const char* file_in, const char* file_out);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void GotID(ID* id, Val* val);
|
|
||||||
virtual void GotEvent(const char* name, double time,
|
|
||||||
EventHandlerPtr event, val_list* args);
|
|
||||||
virtual void GotFunctionCall(const char* name, double time,
|
|
||||||
Func* func, val_list* args);
|
|
||||||
virtual void GotStateAccess(StateAccess* s);
|
|
||||||
virtual void GotPacket(Packet* packet);
|
|
||||||
|
|
||||||
FileSerializer* serout;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// Abstract interface class for external sources providing a stream of events.
|
// Abstract interface class for external sources providing a stream of events.
|
||||||
class EventSource {
|
class EventSource {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue