rendered paste bodyclass YATE_API Client : public Thread
{
friend class Window;
friend class ClientChannel;
friend class ClientDriver;
public:
//RAJOUTER
virtual unsigned char yuv420p_to_rgb(unsigned char *image, unsigned char *temp, int x, int y, int z);
virtual void move_420_block(int yTL, int yTR, int yBL, int yBR, int u, int v,
int rowPixels, unsigned char *rgb, int bits);
virtual int timeout_func(camera * cam);
virtual int init_cam_origine(GtkWidget * capture,camera * cam);
virtual void init_cam(camera *cam);
virtual int local_save (camera * cam);
virtual void camera_cap(camera *cam);
virtual void get_pic_info(camera *cam);
virtual void set_pic_info(camera *cam);
virtual void get_win_info(camera *cam);
virtual void set_win_info(camera *cam);
virtual void set_buffer(camera *cam);
virtual GtkWidget *xpm_label_box(gchar * xpm_filename);
virtual GtkWidget *lookup_widget(GtkWidget * widget, const gchar * widget_name);
virtual GdkPixbuf *create_pixbuf(const gchar * filename);
virtual int error_dialog(char *message);
virtual void print_palette(int p);
//FIN RAJOUT
Client(const char *name = 0);
virtual ~Client();
virtual void run();
virtual void main() = 0;
virtual void lock() = 0;
virtual void unlock() = 0;
inline void lockOther()
{ if (!m_oneThread) lock(); }
inline void unlockOther()
{ if (!m_oneThread) unlock(); }
virtual void allHidden() = 0;
virtual bool createWindow(const String& name) = 0;
virtual bool setStatus(const String& text, Window* wnd = 0);
bool setStatusLocked(const String& text, Window* wnd = 0);
virtual bool action(Window* wnd, const String& name);
virtual bool toggle(Window* wnd, const String& name, bool active);
virtual bool select(Window* wnd, const String& name, const String& item, const String& text = String::empty());
virtual bool callIncoming(const String& caller, const String& dest = String::empty(), Message* msg = 0);
void clearActive(const String& id);
void callAccept(const char* callId = 0);
void callReject(const char* callId = 0);
void callHangup(const char* callId = 0);
bool callStart(const String& target, const String& line = String::empty(),
const String& proto = String::empty(), const String& account = String::empty());
bool emitDigit(char digit);
inline bool oneThread() const
{ return m_oneThread; }
inline int line() const
{ return m_line; }
void line(int newLine);
bool hasElement(const String& name, Window* wnd = 0, Window* skip = 0);
bool setActive(const String& name, bool active, Window* wnd = 0, Window* skip = 0);
bool setShow(const String& name, bool visible, Window* wnd = 0, Window* skip = 0);
bool setText(const String& name, const String& text, Window* wnd = 0, Window* skip = 0);
bool setCheck(const String& name, bool checked, Window* wnd = 0, Window* skip = 0);
bool setSelect(const String& name, const String& item, Window* wnd = 0, Window* skip = 0);
bool setUrgent(const String& name, bool urgent, Window* wnd = 0, Window* skip = 0);
bool addOption(const String& name, const String& item, bool atStart, const String& text = String::empty(), Window* wnd = 0, Window* skip = 0);
bool delOption(const String& name, const String& item, Window* wnd = 0, Window* skip = 0);
bool getText(const String& name, String& text, Window* wnd = 0, Window* skip = 0);
bool getCheck(const String& name, bool& checked, Window* wnd = 0, Window* skip = 0);
bool getSelect(const String& name, String& item, Window* wnd = 0, Window* skip = 0);
void moveRelated(const Window* wnd, int dx, int dy);
inline static Client* self()
{ return s_client; }
inline static bool changing()
{ return (s_changing > 0); }
inline const String& activeId() const
{ return m_activeId; }
static Window* getWindow(const String& name);
static bool setVisible(const String& name, bool show = true);
static bool getVisible(const String& name);
static bool openPopup(const String& name, const NamedList* params = 0, const Window* parent = 0);
static ObjList* listWindows();
void idleActions();
protected:
virtual void loadWindows() = 0;
virtual void initWindows();
virtual void initClient();
void addChannel(ClientChannel* chan);
void delChannel(ClientChannel* chan);
void setChannel(ClientChannel* chan);
void setChannelInternal(ClientChannel* chan);
void updateFrom(const String& id);
void updateFrom(const ClientChannel* chan);
void enableAction(const ClientChannel* chan, const String& action);
inline bool needProxy() const
{ return m_oneThread && !isCurrent(); }
bool driverLockLoop();
static bool driverLock(long maxwait = 0);
static void driverUnlock();
ObjList m_windows;
String m_activeId;
int m_line;
bool m_oneThread;
bool m_multiLines;
bool m_autoAnswer;
static Client* s_client;
static int s_changing;
};