Implementation of IArchTaskBarReceiver for the synergy server. More...
#include <CClientTaskBarReceiver.h>
Inherits IArchTaskBarReceiver.
Inherited by CMSWindowsClientTaskBarReceiver, COSXClientTaskBarReceiver, and CXWindowsClientTaskBarReceiver.
Public Member Functions | |
virtual void | showStatus ()=0 |
Show status window. | |
virtual void | runMenu (int x, int y)=0 |
Popup menu. | |
virtual void | primaryAction ()=0 |
Perform primary action. | |
virtual void | lock () const |
Lock receiver. | |
virtual void | unlock () const |
Unlock receiver. | |
virtual const Icon | getIcon () const =0 |
Get icon. | |
virtual std::string | getToolTip () const |
Get tooltip. | |
manipulators | |
void | updateStatus (CClient *, const CString &errorMsg) |
Update status. | |
Protected Types | |
enum | EState { kNotRunning, kNotWorking, kNotConnected, kConnecting, kConnected, kMaxState } |
Protected Member Functions | |
EState | getStatus () const |
Get status. | |
const CString & | getErrorMessage () const |
Get error message. | |
void | quit () |
Quit app. | |
virtual void | onStatusChanged (CClient *client) |
Status change notification. |
Implementation of IArchTaskBarReceiver for the synergy server.
Definition at line 24 of file CClientTaskBarReceiver.h.
virtual const Icon CClientTaskBarReceiver::getIcon | ( | ) | const [pure virtual] |
Get icon.
Returns the icon to display in the task bar. The interface to set the icon is left to subclasses. Getting and setting the icon must be thread safe.
Implements IArchTaskBarReceiver.
Implemented in CMSWindowsClientTaskBarReceiver, COSXClientTaskBarReceiver, and CXWindowsClientTaskBarReceiver.
std::string CClientTaskBarReceiver::getToolTip | ( | ) | const [virtual] |
Get tooltip.
Returns the tool tip to display in the task bar. The interface to set the tooltip is left to sublclasses. Getting and setting the icon must be thread safe.
Implements IArchTaskBarReceiver.
Definition at line 111 of file CClientTaskBarReceiver.cpp.
References CStringUtil::print().
Referenced by CMSWindowsClientTaskBarReceiver::showStatus().
void CClientTaskBarReceiver::lock | ( | ) | const [virtual] |
Lock receiver.
Locks the receiver from changing state. The receiver should be locked when querying it's state to ensure consistent results. Each call to lock()
must have a matching unlock()
and locks cannot be nested.
Implements IArchTaskBarReceiver.
Definition at line 99 of file CClientTaskBarReceiver.cpp.
Referenced by CMSWindowsClientTaskBarReceiver::showStatus().
void CClientTaskBarReceiver::onStatusChanged | ( | CClient * | client | ) | [protected, virtual] |
Status change notification.
Called when status changes. The default implementation does nothing.
Definition at line 93 of file CClientTaskBarReceiver.cpp.
Referenced by updateStatus().
virtual void CClientTaskBarReceiver::primaryAction | ( | ) | [pure virtual] |
Perform primary action.
Perform the primary (default) action.
Implements IArchTaskBarReceiver.
Implemented in CMSWindowsClientTaskBarReceiver, COSXClientTaskBarReceiver, and CXWindowsClientTaskBarReceiver.
void CClientTaskBarReceiver::quit | ( | ) | [protected] |
Quit app.
Causes the application to quit gracefully
Definition at line 87 of file CClientTaskBarReceiver.cpp.
References CEvent::kQuit.
Referenced by CMSWindowsClientTaskBarReceiver::runMenu().
virtual void CClientTaskBarReceiver::runMenu | ( | int | x, | |
int | y | |||
) | [pure virtual] |
Popup menu.
Popup a menu of operations at or around x
,y and perform the chosen operation.
Implements IArchTaskBarReceiver.
Implemented in CMSWindowsClientTaskBarReceiver, COSXClientTaskBarReceiver, and CXWindowsClientTaskBarReceiver.
virtual void CClientTaskBarReceiver::showStatus | ( | ) | [pure virtual] |
Show status window.
Open a window displaying current status. This should return immediately without waiting for the window to be closed.
Implements IArchTaskBarReceiver.
Implemented in CMSWindowsClientTaskBarReceiver, COSXClientTaskBarReceiver, and CXWindowsClientTaskBarReceiver.
void CClientTaskBarReceiver::updateStatus | ( | CClient * | client, | |
const CString & | errorMsg | |||
) |
Update status.
Determine the status and query required information from the client.
Definition at line 39 of file CClientTaskBarReceiver.cpp.
References CNetworkAddress::getHostname(), CClient::getServerAddress(), CClient::isConnected(), CClient::isConnecting(), and onStatusChanged().