CClientTaskBarReceiver.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2003 Chris Schoeneman
00004  * 
00005  * This package is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #ifndef CCLIENTTASKBARRECEIVER_H
00016 #define CCLIENTTASKBARRECEIVER_H
00017 
00018 #include "CString.h"
00019 #include "IArchTaskBarReceiver.h"
00020 
00021 class CClient;
00022 
00024 class CClientTaskBarReceiver : public IArchTaskBarReceiver {
00025 public:
00026     CClientTaskBarReceiver();
00027     virtual ~CClientTaskBarReceiver();
00028 
00030 
00031 
00033 
00036     void                updateStatus(CClient*, const CString& errorMsg);
00037 
00039 
00040     // IArchTaskBarReceiver overrides
00041     virtual void        showStatus() = 0;
00042     virtual void        runMenu(int x, int y) = 0;
00043     virtual void        primaryAction() = 0;
00044     virtual void        lock() const;
00045     virtual void        unlock() const;
00046     virtual const Icon  getIcon() const = 0;
00047     virtual std::string getToolTip() const;
00048 
00049 protected:
00050     enum EState {
00051         kNotRunning,
00052         kNotWorking,
00053         kNotConnected,
00054         kConnecting,
00055         kConnected,
00056         kMaxState
00057     };
00058 
00060     EState              getStatus() const;
00061 
00063     const CString&      getErrorMessage() const;
00064 
00066 
00069     void                quit();
00070 
00072 
00075     virtual void        onStatusChanged(CClient* client);
00076 
00077 private:
00078     EState              m_state;
00079     CString             m_errorMessage;
00080     CString             m_server;
00081 };
00082 
00083 #endif

Generated on Fri Nov 6 00:18:44 2009 for synergy-plus by  doxygen 1.4.7