Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2013, Regents of the University of California |
| 4 | * Yingdi Yu |
| 5 | * |
| 6 | * BSD license, See the LICENSE file for more information |
| 7 | * |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 8 | * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu> |
| 9 | * Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 10 | * Yingdi Yu <yingdi@cs.ucla.edu> |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #ifndef CHATDIALOG_H |
| 14 | #define CHATDIALOG_H |
| 15 | |
| 16 | #include <QDialog> |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 17 | #include <QTextTable> |
| 18 | #include <QStringListModel> |
| 19 | #include <QTimer> |
Yingdi Yu | a059409 | 2013-11-06 22:07:38 -0800 | [diff] [blame] | 20 | #include <QSystemTrayIcon> |
Yingdi Yu | 07b5b09 | 2013-11-07 17:00:54 -0800 | [diff] [blame] | 21 | #include <QMenu> |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 22 | |
| 23 | #include "invitelistdialog.h" |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 24 | |
| 25 | #ifndef Q_MOC_RUN |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 26 | #include <ndn-cpp/data.hpp> |
| 27 | #include <ndn-cpp/face.hpp> |
| 28 | #include <ndn-cpp/security/identity/identity-manager.hpp> |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 29 | #include "invitation-policy-manager.h" |
Yingdi Yu | c4d08d2 | 2013-10-23 23:07:29 -0700 | [diff] [blame] | 30 | #include "contact-item.h" |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 31 | |
Alexander Afanasyev | 4f04c55 | 2013-11-07 15:30:05 -0800 | [diff] [blame] | 32 | #include <sync-socket.h> |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 33 | #include <sync-seq-no.h> |
| 34 | #include "chatbuf.pb.h" |
| 35 | #include "digesttreescene.h" |
Yingdi Yu | accbda9 | 2013-12-27 08:44:12 +0800 | [diff] [blame^] | 36 | |
| 37 | #include <boost/thread/locks.hpp> |
| 38 | #include <boost/thread/recursive_mutex.hpp> |
| 39 | #include <boost/thread/thread.hpp> |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 40 | #endif |
| 41 | |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 42 | typedef ndn::func_lib::function<void()> OnEventualTimeout; |
| 43 | |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 44 | #define MAX_HISTORY_ENTRY 20 |
| 45 | |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 46 | namespace Ui { |
| 47 | class ChatDialog; |
| 48 | } |
| 49 | |
| 50 | class ChatDialog : public QDialog |
| 51 | { |
| 52 | Q_OBJECT |
| 53 | |
| 54 | public: |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 55 | explicit ChatDialog(ndn::ptr_lib::shared_ptr<ContactManager> contactManager, |
Yingdi Yu | accbda9 | 2013-12-27 08:44:12 +0800 | [diff] [blame^] | 56 | ndn::ptr_lib::shared_ptr<ndn::IdentityManager> identityManager, |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 57 | const ndn::Name& chatroomPrefix, |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 58 | const ndn::Name& localPrefix, |
Yingdi Yu | c4d08d2 | 2013-10-23 23:07:29 -0700 | [diff] [blame] | 59 | const ndn::Name& defaultIdentity, |
Yingdi Yu | 4237244 | 2013-11-06 18:43:31 -0800 | [diff] [blame] | 60 | const std::string& nick, |
| 61 | bool trial = false, |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 62 | QWidget *parent = 0); |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 63 | |
| 64 | // explicit ChatDialog(const ndn::Name& chatroomPrefix, |
| 65 | // const ndn::Name& localPrefix, |
| 66 | // const ndn::Name& defaultIdentity, |
| 67 | // const ndn::security::IdentityCertificate& identityCertificate, |
| 68 | // QWidget *parent = 0); |
| 69 | |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 70 | ~ChatDialog(); |
| 71 | |
| 72 | const ndn::Name& |
| 73 | getChatroomPrefix() const |
| 74 | { return m_chatroomPrefix; } |
| 75 | |
| 76 | const ndn::Name& |
| 77 | getLocalPrefix() const |
| 78 | { return m_localPrefix; } |
| 79 | |
| 80 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 81 | sendInvitation(ndn::ptr_lib::shared_ptr<ContactItem> contact, bool isIntroducer); |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 82 | |
| 83 | void |
| 84 | addTrustAnchor(const EndorseCertificate& selfEndorseCertificate); |
| 85 | |
| 86 | void |
| 87 | addChatDataRule(const ndn::Name& prefix, |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 88 | const ndn::IdentityCertificate& identityCertificate, |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 89 | bool isIntroducer); |
| 90 | |
| 91 | void |
| 92 | appendMessage(const SyncDemo::ChatMessage msg, bool isHistory = false); |
| 93 | |
| 94 | void |
| 95 | processTreeUpdateWrapper(const std::vector<Sync::MissingDataInfo>, Sync::SyncSocket *); |
| 96 | |
| 97 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 98 | processDataWrapper(const ndn::ptr_lib::shared_ptr<ndn::Data>& data); |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 99 | |
| 100 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 101 | processDataNoShowWrapper(const ndn::ptr_lib::shared_ptr<ndn::Data>& data); |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 102 | |
| 103 | void |
| 104 | processRemoveWrapper(std::string); |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 105 | |
Yingdi Yu | a059409 | 2013-11-06 22:07:38 -0800 | [diff] [blame] | 106 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 107 | publishIntroCert(const ndn::IdentityCertificate& dskCertificate, bool isIntroducer); |
Yingdi Yu | a059409 | 2013-11-06 22:07:38 -0800 | [diff] [blame] | 108 | |
Yingdi Yu | 4237244 | 2013-11-06 18:43:31 -0800 | [diff] [blame] | 109 | protected: |
Yingdi Yu | a059409 | 2013-11-06 22:07:38 -0800 | [diff] [blame] | 110 | void |
| 111 | closeEvent(QCloseEvent *e); |
| 112 | |
| 113 | void |
| 114 | changeEvent(QEvent *e); |
Yingdi Yu | 4237244 | 2013-11-06 18:43:31 -0800 | [diff] [blame] | 115 | |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 116 | private: |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 117 | |
Yingdi Yu | accbda9 | 2013-12-27 08:44:12 +0800 | [diff] [blame^] | 118 | void |
| 119 | startFace(); |
| 120 | |
| 121 | void |
| 122 | shutdownFace(); |
| 123 | |
| 124 | void |
| 125 | eventLoop(); |
| 126 | |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 127 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 128 | connectToDaemon(); |
| 129 | |
| 130 | void |
| 131 | onConnectionData(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest, |
| 132 | const ndn::ptr_lib::shared_ptr<ndn::Data>& data); |
| 133 | |
| 134 | void |
| 135 | onConnectionDataTimeout(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest); |
| 136 | |
| 137 | void |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 138 | initializeSetting(); |
| 139 | |
Yingdi Yu | 2ab22e7 | 2013-11-10 01:38:21 -0800 | [diff] [blame] | 140 | QString |
| 141 | getRandomString(); |
| 142 | |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 143 | void |
| 144 | updateLabels(); |
| 145 | |
Yingdi Yu | c4d08d2 | 2013-10-23 23:07:29 -0700 | [diff] [blame] | 146 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 147 | initializeSync(); |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 148 | |
| 149 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 150 | onTargetData(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest, |
| 151 | const ndn::ptr_lib::shared_ptr<ndn::Data>& data, |
| 152 | int stepCount, |
| 153 | const ndn::OnVerified& onVerified, |
| 154 | const ndn::OnVerifyFailed& onVerifyFailed, |
| 155 | const OnEventualTimeout& timeoutNotify, |
| 156 | const ndn::ptr_lib::shared_ptr<ndn::PolicyManager>& policyManager); |
| 157 | |
| 158 | void |
| 159 | onTargetTimeout(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest, |
| 160 | int retry, |
| 161 | int stepCount, |
| 162 | const ndn::OnVerified& onVerified, |
| 163 | const ndn::OnVerifyFailed& onVerifyFailed, |
| 164 | const OnEventualTimeout& timeoutNotify, |
| 165 | const ndn::ptr_lib::shared_ptr<ndn::PolicyManager>& policyManager); |
| 166 | |
| 167 | void |
| 168 | onCertData(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest, |
| 169 | const ndn::ptr_lib::shared_ptr<ndn::Data>& cert, |
| 170 | ndn::ptr_lib::shared_ptr<ndn::ValidationRequest> previousStep, |
| 171 | const ndn::ptr_lib::shared_ptr<ndn::PolicyManager>& policyManager); |
| 172 | |
| 173 | void |
| 174 | onCertTimeout(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest, |
| 175 | const ndn::OnVerifyFailed& onVerifyFailed, |
| 176 | const ndn::ptr_lib::shared_ptr<ndn::Data>& data, |
| 177 | ndn::ptr_lib::shared_ptr<ndn::ValidationRequest> nextStep, |
| 178 | const ndn::ptr_lib::shared_ptr<ndn::PolicyManager>& policyManager); |
| 179 | |
| 180 | void |
| 181 | sendInterest(const ndn::Interest& interest, |
| 182 | const ndn::OnVerified& onVerified, |
| 183 | const ndn::OnVerifyFailed& onVerifyFailed, |
| 184 | const OnEventualTimeout& timeoutNotify, |
| 185 | const ndn::ptr_lib::shared_ptr<ndn::PolicyManager>& policyManager, |
| 186 | int retry = 1, |
| 187 | int stepCount = 0); |
Yingdi Yu | c4d08d2 | 2013-10-23 23:07:29 -0700 | [diff] [blame] | 188 | |
| 189 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 190 | onInviteReplyVerified(const ndn::ptr_lib::shared_ptr<ndn::Data>& data, |
| 191 | const ndn::Name& identity, |
| 192 | bool isIntroduce); |
| 193 | |
| 194 | void |
| 195 | onInviteReplyVerifyFailed(const ndn::ptr_lib::shared_ptr<ndn::Data>& data, |
| 196 | const ndn::Name& identity); |
Yingdi Yu | c4d08d2 | 2013-10-23 23:07:29 -0700 | [diff] [blame] | 197 | |
| 198 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 199 | onInviteReplyTimeout(const ndn::Name& identity); |
| 200 | |
Yingdi Yu | c4d08d2 | 2013-10-23 23:07:29 -0700 | [diff] [blame] | 201 | |
| 202 | void |
| 203 | invitationRejected(const ndn::Name& identity); |
| 204 | |
| 205 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 206 | invitationAccepted(const ndn::Name& identity, |
| 207 | ndn::ptr_lib::shared_ptr<ndn::Data> data, |
| 208 | const std::string& inviteePrefix, |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 209 | bool isIntroducer); |
Yingdi Yu | c4d08d2 | 2013-10-23 23:07:29 -0700 | [diff] [blame] | 210 | |
| 211 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 212 | onLocalPrefix(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest, |
| 213 | const ndn::ptr_lib::shared_ptr<ndn::Data>& data); |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 214 | |
Yingdi Yu | 4237244 | 2013-11-06 18:43:31 -0800 | [diff] [blame] | 215 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 216 | onLocalPrefixTimeout(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest); |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 217 | |
| 218 | // void |
| 219 | // fetchHistory(std::string name); |
| 220 | |
| 221 | void |
| 222 | formChatMessage(const QString &text, SyncDemo::ChatMessage &msg); |
| 223 | |
| 224 | void |
| 225 | formControlMessage(SyncDemo::ChatMessage &msg, SyncDemo::ChatMessage::ChatMessageType type); |
| 226 | |
| 227 | void |
| 228 | sendMsg(SyncDemo::ChatMessage &msg); |
| 229 | |
| 230 | void |
| 231 | resizeEvent(QResizeEvent *); |
| 232 | |
| 233 | void |
| 234 | showEvent(QShowEvent *); |
| 235 | |
| 236 | void |
| 237 | fitView(); |
| 238 | |
Yingdi Yu | a059409 | 2013-11-06 22:07:38 -0800 | [diff] [blame] | 239 | void |
| 240 | createActions(); |
| 241 | |
| 242 | void |
| 243 | createTrayIcon(); |
| 244 | |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 245 | QString |
| 246 | formatTime(time_t); |
| 247 | |
| 248 | void |
| 249 | printTimeInCell(QTextTable *, time_t); |
| 250 | |
| 251 | void |
| 252 | disableTreeDisplay(); |
| 253 | |
| 254 | signals: |
| 255 | void |
| 256 | dataReceived(QString name, const char *buf, size_t len, bool show, bool isHistory); |
| 257 | |
| 258 | void |
| 259 | treeUpdated(const std::vector<Sync::MissingDataInfo>); |
| 260 | |
| 261 | void |
| 262 | removeReceived(QString prefix); |
| 263 | |
Yingdi Yu | 4237244 | 2013-11-06 18:43:31 -0800 | [diff] [blame] | 264 | void |
| 265 | closeChatDialog(const ndn::Name& chatroomPrefix); |
| 266 | |
Yingdi Yu | b29f78c | 2013-11-09 20:12:31 -0800 | [diff] [blame] | 267 | void |
| 268 | noNdnConnection(const QString& msg); |
Yingdi Yu | 3e87bd8 | 2013-11-10 10:47:44 -0800 | [diff] [blame] | 269 | |
| 270 | void |
| 271 | inivationRejection(const QString& msg); |
Yingdi Yu | b29f78c | 2013-11-09 20:12:31 -0800 | [diff] [blame] | 272 | |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 273 | public slots: |
| 274 | void |
| 275 | processTreeUpdate(const std::vector<Sync::MissingDataInfo>); |
| 276 | |
| 277 | void |
| 278 | processData(QString name, const char *buf, size_t len, bool show, bool isHistory); |
| 279 | |
| 280 | void |
| 281 | processRemove(QString prefix); |
| 282 | |
| 283 | private slots: |
| 284 | void |
| 285 | returnPressed(); |
| 286 | |
| 287 | void |
| 288 | treeButtonPressed(); |
| 289 | |
Yingdi Yu | 2ab22e7 | 2013-11-10 01:38:21 -0800 | [diff] [blame] | 290 | void |
| 291 | settingUpdated(QString, QString, QString); |
| 292 | |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 293 | void |
| 294 | sendJoin(); |
| 295 | |
| 296 | void |
| 297 | sendHello(); |
| 298 | |
| 299 | void |
| 300 | sendLeave(); |
| 301 | |
| 302 | void |
| 303 | replot(); |
| 304 | |
| 305 | void |
| 306 | updateRosterList(QStringList); |
| 307 | |
| 308 | void |
| 309 | enableTreeDisplay(); |
| 310 | |
Yingdi Yu | 2ab22e7 | 2013-11-10 01:38:21 -0800 | [diff] [blame] | 311 | void |
| 312 | updateLocalPrefix(); |
| 313 | |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 314 | void |
| 315 | summonReaper(); |
| 316 | |
| 317 | void |
| 318 | reap(); |
| 319 | |
| 320 | void |
Yingdi Yu | a059409 | 2013-11-06 22:07:38 -0800 | [diff] [blame] | 321 | iconActivated(QSystemTrayIcon::ActivationReason reason); |
| 322 | |
| 323 | void |
| 324 | messageClicked(); |
| 325 | |
| 326 | void |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 327 | showMessage(QString, QString); |
| 328 | |
| 329 | void |
| 330 | openInviteListDialog(); |
| 331 | |
| 332 | void |
| 333 | sendInvitationWrapper(QString, bool); |
Yingdi Yu | 07b5b09 | 2013-11-07 17:00:54 -0800 | [diff] [blame] | 334 | |
| 335 | void |
| 336 | quit(); |
Yingdi Yu | c4d08d2 | 2013-10-23 23:07:29 -0700 | [diff] [blame] | 337 | |
| 338 | private: |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 339 | Ui::ChatDialog *ui; |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 340 | ndn::ptr_lib::shared_ptr<ContactManager> m_contactManager; |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 341 | ndn::Name m_chatroomPrefix; |
| 342 | ndn::Name m_localPrefix; |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 343 | ndn::Name m_localChatPrefix; |
Yingdi Yu | c4d08d2 | 2013-10-23 23:07:29 -0700 | [diff] [blame] | 344 | ndn::Name m_defaultIdentity; |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 345 | ndn::ptr_lib::shared_ptr<InvitationPolicyManager> m_invitationPolicyManager; |
| 346 | ndn::ptr_lib::shared_ptr<SyncPolicyManager> m_syncPolicyManager; |
| 347 | ndn::ptr_lib::shared_ptr<ndn::IdentityManager> m_identityManager; |
| 348 | ndn::ptr_lib::shared_ptr<ndn::Face> m_face; |
| 349 | ndn::ptr_lib::shared_ptr<ndn::Transport> m_transport; |
Yingdi Yu | 0a953c3 | 2013-11-10 10:32:18 -0800 | [diff] [blame] | 350 | |
Yingdi Yu | accbda9 | 2013-12-27 08:44:12 +0800 | [diff] [blame^] | 351 | boost::recursive_mutex m_mutex; |
| 352 | boost::thread m_thread; |
| 353 | bool m_running; |
| 354 | |
Yingdi Yu | 0a953c3 | 2013-11-10 10:32:18 -0800 | [diff] [blame] | 355 | ndn::Name m_newLocalPrefix; |
| 356 | bool m_newLocalPrefixReady; |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 357 | |
| 358 | User m_user; |
Yingdi Yu | 4237244 | 2013-11-06 18:43:31 -0800 | [diff] [blame] | 359 | std::string m_nick; |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 360 | Sync::SyncSocket *m_sock; |
| 361 | uint32_t m_session; |
| 362 | DigestTreeScene *m_scene; |
| 363 | boost::recursive_mutex m_msgMutex; |
| 364 | boost::recursive_mutex m_sceneMutex; |
| 365 | time_t m_lastMsgTime; |
| 366 | int m_randomizedInterval; |
| 367 | QTimer *m_timer; |
| 368 | QStringListModel *m_rosterModel; |
Yingdi Yu | a059409 | 2013-11-06 22:07:38 -0800 | [diff] [blame] | 369 | QSystemTrayIcon *trayIcon; |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 370 | |
Yingdi Yu | 07b5b09 | 2013-11-07 17:00:54 -0800 | [diff] [blame] | 371 | QAction *minimizeAction; |
| 372 | QAction *maximizeAction; |
| 373 | QAction *restoreAction; |
Yingdi Yu | 2ab22e7 | 2013-11-10 01:38:21 -0800 | [diff] [blame] | 374 | QAction *updateLocalPrefixAction; |
Yingdi Yu | 07b5b09 | 2013-11-07 17:00:54 -0800 | [diff] [blame] | 375 | QAction *quitAction; |
| 376 | QMenu *trayIconMenu; |
| 377 | |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 378 | // QQueue<SyncDemo::ChatMessage> m_history; |
| 379 | // bool m_historyInitialized; |
| 380 | bool m_joined; |
| 381 | |
| 382 | QList<QString> m_zombieList; |
| 383 | int m_zombieIndex; |
| 384 | |
| 385 | InviteListDialog* m_inviteListDialog; |
Yingdi Yu | 0484223 | 2013-10-23 14:03:09 -0700 | [diff] [blame] | 386 | }; |
| 387 | |
| 388 | #endif // ChatDIALOG_H |