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