Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef t323gpmsg_h
Toshihiro Shimizu 890ddd
#define t323gpmsg_h
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tipcmsg.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//  Forward declarations
Toshihiro Shimizu 890ddd
namespace tipc
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
class Server;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
using namespace tipc;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
namespace _3gp_io
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void addParsers(tipc::Server *srv);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//************************************************************************************
Toshihiro Shimizu 890ddd
//    Write messages
Toshihiro Shimizu 890ddd
//************************************************************************************
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class InitLW3gpParser : public tipc::MessageParser
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	//Syntax: $initLW3gp <id> <fp> <props fp=""></props></fp></id>
Toshihiro Shimizu 890ddd
	//Reply: ok | err
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	QString header() const { return "$initLW3gp"; }
Toshihiro Shimizu 890ddd
	void operator()(Message &stream);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class LWSetFrameRateParser : public tipc::MessageParser
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	//Syntax: $LW3gpSetFrameRate <id> <fps></fps></id>
Toshihiro Shimizu 890ddd
	//Reply: ok | err
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	QString header() const { return "$LW3gpSetFrameRate"; }
Toshihiro Shimizu 890ddd
	void operator()(Message &stream);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class LWImageWriteParser : public tipc::MessageParser
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	//Syntax: [$LW3gpImageWrite <id> <frameidx> <lx> <ly>] [data writer]</ly></lx></frameidx></id>
Toshihiro Shimizu 890ddd
	//Reply: ok | err
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	QString header() const { return "$LW3gpImageWrite"; }
Toshihiro Shimizu 890ddd
	void operator()(Message &stream);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class LWSaveSoundTrackParser : public tipc::MessageParser
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	//Syntax: $LW3gpSaveSoundTrack <id> <samplerate> <bps> <chancount> <scount> <signedsample> <shmem-id></shmem-id></signedsample></scount></chancount></bps></samplerate></id>
Toshihiro Shimizu 890ddd
	//Reply: ok | err
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	QString header() const { return "$LW3gpSaveSoundTrack"; }
Toshihiro Shimizu 890ddd
	void operator()(Message &stream);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class CloseLW3gpParser : public tipc::MessageParser
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	//Syntax: $closeLW3gp <id></id>
Toshihiro Shimizu 890ddd
	//Reply: ok | err
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	QString header() const { return "$closeLW3gp"; }
Toshihiro Shimizu 890ddd
	void operator()(Message &stream);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//************************************************************************************
Toshihiro Shimizu 890ddd
//    Read messages
Toshihiro Shimizu 890ddd
//************************************************************************************
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class InitLR3gpParser : public tipc::MessageParser
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	//Syntax: $initLR3gp <id> <fp></fp></id>
Toshihiro Shimizu 890ddd
	//Reply: ok <lx> <ly> <framerate> | err</framerate></ly></lx>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	QString header() const { return "$initLR3gp"; }
Toshihiro Shimizu 890ddd
	void operator()(Message &stream);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class LRLoadInfoParser : public tipc::MessageParser
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	//Syntax: $LR3gpLoadInfo <id> <shmem id=""></shmem></id>
Toshihiro Shimizu 890ddd
	//Reply: ok <framecount> | err</framecount>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	//NOTE: Expects an external call to $shmem_release <shmem_id> after data is dealt with.</shmem_id>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	QString header() const { return "$LR3gpLoadInfo"; }
Toshihiro Shimizu 890ddd
	void operator()(Message &stream);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class LREnableRandomAccessReadParser : public tipc::MessageParser
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	//Syntax: $LR3gpEnableRandomAccessRead <id> <"true" | "false"></id>
Toshihiro Shimizu 890ddd
	//Reply: ok | err
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	QString header() const { return "$LR3gpEnableRandomAccessRead"; }
Toshihiro Shimizu 890ddd
	void operator()(Message &stream);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class LRImageReadParser : public tipc::MessageParser
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	//Syntax: $LR3gpImageRead <id> <lx> <ly> <bypp> <frameidx> <x> <y> <shrinkx> <shrinky></shrinky></shrinkx></y></x></frameidx></bypp></ly></lx></id>
Toshihiro Shimizu 890ddd
	//Reply: [data reader]
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	QString header() const { return "$LR3gpImageRead"; }
Toshihiro Shimizu 890ddd
	void operator()(Message &stream);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class CloseLR3gpParser : public tipc::MessageParser
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	//Syntax: $closeLR3gp <id></id>
Toshihiro Shimizu 890ddd
	//Reply: ok | err
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	QString header() const { return "$closeLR3gp"; }
Toshihiro Shimizu 890ddd
	void operator()(Message &stream);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
} //namespace _3gp_io
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif //t323gpmsg_h