#ifndef PIXELFORMAT_H
#define PIXELFORMAT_H

#include "servermessagebase.h"
#include "clientmessagebase.h"

#include <QDebug>

class PixelFormat : public ClientMessageBase, public ServerMessageBase
{
public:
    PixelFormat();
    int bpp() const;
    int depth() const;
    bool bigEndian() const;
    bool trueColor() const;
    quint16 redMax() const;
    quint16 greenMax() const;
    quint16 blueMax() const;
    int redShift() const;
    int greenShift() const;
    int blueShift() const;
    void setBpp( int value );
    void setDepth( int value );
    void setBigEndian( bool value );
    void setTrueColor( bool value );
    void setRedMax( quint16 value );
    void setGreenMax( quint16 value );
    void setBlueMax( quint16 value );
    void setRedShift( int value );
    void setGreenShift( int value );
    void setBlueShift( int value );

    void writeBytes( QIODevice *device ) const;

    bool loadMessage( QIODevice *device );

private:
    int m_bpp;
    int m_depth;
    bool m_bigEndian;
    bool m_trueColor;
    quint16 m_redMax;
    quint16 m_greenMax;
    quint16 m_blueMax;
    int m_redShift;
    int m_greenShift;
    int m_blueShift;

};
QDebug operator<<(QDebug in, const PixelFormat &message );
#endif // PIXELFORMAT_H

