syndilights/frameserver/Buffer.cpp

50 lines
633 B
C++
Raw Normal View History

#include "Buffer.h"
2010-11-12 21:37:12 +01:00
Buffer::Buffer( std::string _id )
{
id = _id;
}
Buffer::~Buffer()
{
}
void Buffer::set(frame_t data)
{
{
Glib::Mutex::Lock lock(mutex_);
frame = data;
}
}
2010-11-12 21:37:12 +01:00
void Buffer::set_id(std::string _id)
{
Glib::Mutex::Lock lock(mutex_);
id = _id;
}
void Buffer::set_selected(bool _selected)
{
Glib::Mutex::Lock lock(mutex_);
selected = _selected;
}
frame_t Buffer::get()
{
Glib::Mutex::Lock lock(mutex_);
return frame;
}
2010-11-12 21:37:12 +01:00
std::string Buffer::get_id()
{
Glib::Mutex::Lock lock(mutex_);
return id;
}
bool Buffer::get_selected()
{
Glib::Mutex::Lock lock(mutex_);
return selected;
}