~ubuntu-branches/ubuntu/maverick/vmware-view-open-client/maverick

« back to all changes in this revision

Viewing changes to desktop.hh

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2010-06-04 17:45:04 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100604174504-zjltuc0hdp4mv7de
Tags: 4.5.0-264434+dfsg-1
* Merging upstream version 4.5.0-264434+dfsg.
* Updating date and version header in manpage.
* Rediffing doc-pdf.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    * used for status messages and icons.
66
66
    */
67
67
   enum Status {
 
68
      /* We could not determine the status. */
68
69
      STATUS_UNKNOWN,
 
70
      /* The server reported an offline state we do not understand. */
 
71
      STATUS_UNKNOWN_OFFLINE_STATE,
 
72
      /* We are current resetting the desktop. */
69
73
      STATUS_RESETTING,
 
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,
 
78
      /*
 
79
       * The administrator has initiated a rollback of the desktop that has not
 
80
       * yet completed.
 
81
       */
 
82
      STATUS_SERVER_ROLLBACK,
 
83
      /*
 
84
       * We are in the process of doing local processing in response to a
 
85
       * a server side rollback.
 
86
       */
 
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. */
77
103
      STATUS_LOGGED_ON,
78
 
      STATUS_AVAILABLE
 
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. */
 
109
      STATUS_EXPIRED
79
110
   };
80
111
 
81
112
   Desktop(BrokerXml &xml, BrokerXml::Desktop &desktopInfo);
82
 
   virtual ~Desktop();
 
113
   ~Desktop();
83
114
 
84
115
   void SetInfo(BrokerXml::Desktop &desktopInfo);
85
116
   ConnectionState GetConnectionState() const { return mConnectionState; }
101
132
 
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;
111
 
 
112
 
   Util::string GetCheckedOutHereAndDisabledMessage() const;
113
 
   Util::string GetNonBackgroundDesktopTransferMessage() const;
 
143
   bool IsExpired() const { return mDesktopInfo.expired; }
114
144
 
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);
122
152
 
123
153
   bool GetAutoConnect() const;
124
154
 
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;
129
159
 
132
162
   const BrokerXml::DesktopConnection &GetConnection() const
133
163
      { return mDesktopConn; }
134
164
 
 
165
   void SetForcedStatus(Status status)
 
166
      { mForcedStatus = status; }
 
167
   void ClearForcedStatus()
 
168
      { mForcedStatus = STATUS_UNKNOWN; }
 
169
   bool HasForcedStatus() const
 
170
      { return STATUS_UNKNOWN != mForcedStatus; }
 
171
 
135
172
   boost::signal0<void> changed;
136
173
 
137
174
private:
160
197
   Usb mUsb;
161
198
 
162
199
   Util::string mProtocol;
 
200
   Status mForcedStatus;
163
201
};
164
202
 
165
203