65
65
* used for status messages and icons.
68
/* We could not determine the status. */
70
/* The server reported an offline state we do not understand. */
71
STATUS_UNKNOWN_OFFLINE_STATE,
72
/* We are current resetting the desktop. */
74
/* We are currently logging off from the desktop. */
70
75
STATUS_LOGGING_OFF,
76
/* We are currently rolling back the desktop. */
71
77
STATUS_ROLLING_BACK,
72
STATUS_LOCAL_ROLLBACK,
79
* The administrator has initiated a rollback of the desktop that has not
82
STATUS_SERVER_ROLLBACK,
84
* We are in the process of doing local processing in response to a
85
* a server side rollback.
87
STATUS_HANDLING_SERVER_ROLLBACK,
88
/* The desktop is checked out here but is currently disabled. */
73
89
STATUS_CHECKED_OUT_DISABLED,
90
/* The desktop is checked out by another user. */
74
91
STATUS_CHECKED_OUT_BY_OTHER,
75
STATUS_NONBACKGROUND_TRANSFER,
92
/* The desktop is checked out, but unavailable. */
93
STATUS_CHECKED_OUT_UNAVAILABLE,
94
/* The desktop is currently being checked in. */
95
STATUS_NONBACKGROUND_TRANSFER_CHECKING_IN,
96
/* The desktop is currently being checked out. */
97
STATUS_NONBACKGROUND_TRANSFER_CHECKING_OUT,
98
/* We are currently discarding the desktop's checkout. */
99
STATUS_DISCARDING_CHECKOUT,
100
/* The desktop is in maintenance mode. */
76
101
STATUS_MAINTENANCE_MODE,
102
/* The desktop currently has a login session. */
104
/* The desktop is available for remote use. */
105
STATUS_AVAILABLE_REMOTE,
106
/* The desktop is available for local use. */
107
STATUS_AVAILABLE_LOCAL,
108
/* The desktop is expired. */
81
112
Desktop(BrokerXml &xml, BrokerXml::Desktop &desktopInfo);
84
115
void SetInfo(BrokerXml::Desktop &desktopInfo);
85
116
ConnectionState GetConnectionState() const { return mConnectionState; }
102
133
Util::string GetState() const { return mDesktopInfo.state; }
103
134
bool GetOfflineEnabled() const { return mDesktopInfo.offlineEnabled; }
135
bool GetEndpointEnabled() const { return mDesktopInfo.endpointEnabled; }
104
136
BrokerXml::OfflineState GetOfflineState() const
105
137
{ return mDesktopInfo.offlineState; }
138
bool GetCheckedOutUnavailable() const;
106
139
bool GetCheckedOutByOther() const { return mDesktopInfo.checkedOutByOther; }
107
140
bool InMaintenanceMode() const { return mDesktopInfo.inMaintenance; }
108
bool InLocalRollback() const { return mDesktopInfo.inLocalRollback; }
109
141
bool IsCheckedOutHereAndDisabled() const;
110
142
bool InNonBackgroundDesktopTransfer() const;
112
Util::string GetCheckedOutHereAndDisabledMessage() const;
113
Util::string GetNonBackgroundDesktopTransferMessage() const;
143
bool IsExpired() const { return mDesktopInfo.expired; }
115
145
bool GetIsUSBEnabled() const { return mDesktopConn.enableUSB; }
116
146
bool GetIsMMREnabled() const { return mDesktopConn.enableMMR; }
118
148
std::vector<Util::string> GetProtocols() const
119
149
{ return mDesktopInfo.protocols; }
120
150
Util::string GetProtocol() const { return mProtocol; }
121
void SetProtocol(Util::string protocol) { mProtocol = protocol; }
151
void SetProtocol(const Util::string &protocol);
123
153
bool GetAutoConnect() const;
125
virtual Status GetStatus() const;
126
virtual Util::string GetStatusMsg();
155
Status GetStatus() const;
156
Util::string GetStatusMsg(bool isOffline) const;
127
157
bool IsCVP() const;
128
158
bool GetRequiresDownload() const;
132
162
const BrokerXml::DesktopConnection &GetConnection() const
133
163
{ return mDesktopConn; }
165
void SetForcedStatus(Status status)
166
{ mForcedStatus = status; }
167
void ClearForcedStatus()
168
{ mForcedStatus = STATUS_UNKNOWN; }
169
bool HasForcedStatus() const
170
{ return STATUS_UNKNOWN != mForcedStatus; }
135
172
boost::signal0<void> changed;