syndilights/frameserver/Buffer.h

29 lines
507 B
C
Raw Normal View History

#ifndef __BUFFER_H_
#define __BUFFER_H_
2010-11-12 21:37:12 +01:00
#include <string>
#include <glibmm.h>
#include "defines.h"
/* This is a threadsafe wrapper around the "frame_t" struct
which automates locking during get and set. */
class Buffer : public sigc::trackable
{
public:
2010-11-12 21:37:12 +01:00
Buffer(std::string _id);
~Buffer();
void set(frame_t);
frame_t get();
2010-11-12 21:37:12 +01:00
std::string get_id();
void set_id(std::string id);
private:
2010-11-12 21:37:12 +01:00
std::string id;
frame_t frame;
Glib::Mutex mutex_;
};
#endif