mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-26 14:37:04 +02:00
refactoring
git-svn-id: svn://elaine/murooma/trunk@328 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
611b2a6c9f
commit
c40bfda64c
35 changed files with 192 additions and 178 deletions
44
message/time.h
Normal file
44
message/time.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
#ifndef TIME_MSG_H
|
||||
#define TIME_MSG_H
|
||||
|
||||
#include "message.h"
|
||||
|
||||
namespace msg
|
||||
{
|
||||
|
||||
class Time : public BaseMessage
|
||||
{
|
||||
public:
|
||||
Time() : BaseMessage(message_type::kTime)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~Time()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void read(std::istream& stream)
|
||||
{
|
||||
stream.read(reinterpret_cast<char *>(&latency), sizeof(double));
|
||||
}
|
||||
|
||||
virtual uint32_t getSize()
|
||||
{
|
||||
return sizeof(double);
|
||||
}
|
||||
|
||||
double latency;
|
||||
|
||||
protected:
|
||||
virtual void doserialize(std::ostream& stream)
|
||||
{
|
||||
stream.write(reinterpret_cast<char *>(&latency), sizeof(double));
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue