/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
 * Copyright (c) 2013, Regents of the University of California
 *                     Yingdi Yu
 *
 * BSD license, See the LICENSE file for more information
 *
 * Author: Yingdi Yu <yingdi@cs.ucla.edu>
 */

#ifndef CHRONOCHAT_CONTROLLER_HPP
#define CHRONOCHAT_CONTROLLER_HPP

#include <QDialog>
#include <QMenu>
#include <QSystemTrayIcon>
#include <QtSql/QSqlDatabase>

#include "setting-dialog.hpp"
#include "start-chat-dialog.hpp"
#include "profile-editor.hpp"
#include "invitation-dialog.hpp"
#include "invitation-request-dialog.hpp"
#include "contact-panel.hpp"
#include "browse-contact-dialog.hpp"
#include "add-contact-panel.hpp"
#include "chat-dialog.hpp"
#include "chatroom-discovery-backend.hpp"
#include "discovery-panel.hpp"

#ifndef Q_MOC_RUN
#include "common.hpp"
#include "invitation.hpp"
#include "controller-backend.hpp"
#endif

namespace chronochat {

class Controller : public QDialog
{
  Q_OBJECT

public: // public methods
  Controller(QWidget* parent = 0);

  virtual
  ~Controller();

private: // private methods
  std::string
  getDBName();

  void
  openDB();

  void
  initialize();

  void
  loadConf();

  void
  saveConf();

  void
  createActions();

  void
  createTrayIcon();

  void
  updateMenu();

  std::string
  getRandomString();

  void
  addChatDialog(const QString& chatroomName, ChatDialog* chatDialog);

  void
  updateDiscoveryList(const chronochat::ChatroomInfo& chatroomName, bool isAdd);

signals:
  void
  shutdownBackend();

  void
  shutdownDiscoveryBackend();

  void
  updateLocalPrefix();

  void
  closeDBModule();

  void
  localPrefixUpdated(const QString& localPrefix);

  void
  localPrefixConfigured(const QString& prefix);

  void
  identityUpdated(const QString& identity);

  void
  refreshBrowseContact();

  void
  invitationInterest(const ndn::Name& prefix, const ndn::Interest& interest,
                     size_t routingPrefixOffset);

  void
  discoverChatroomChanged(const chronochat::ChatroomInfo& chatroomInfo, bool isAdd);

  void
  addChatroom(QString chatroomName);

  void
  removeChatroom(QString chatroomName);

  void
  newChatroomForDiscovery(Name::Component chatroomName);

  void
  respondChatroomInfoRequest(ChatroomInfo chatroomInfo, bool isManager);

private slots:
  void
  onIdentityUpdated(const QString& identity);

  void
  onIdentityUpdatedContinued();

  void
  onNickUpdated(const QString& nick);

  void
  onLocalPrefixUpdated(const QString& localPrefix);

  void
  onLocalPrefixConfigured(const QString& prefix);

  void
  onStartChatAction();

  void
  onSettingsAction();

  void
  onProfileEditorAction();

  void
  onAddContactAction();

  void
  onContactListAction();

  void
  onDirectAdd();

  void
  onMinimizeAction();

  void
  onQuitAction();

  void
  onChatroomDiscoveryAction();

  void
  onStartChatroom(const QString& chatroom, bool secured);

  void
  onStartChatroom2(chronochat::Invitation invitation, bool secured);

  void
  onShowChatMessage(const QString& chatroomName, const QString& from, const QString& data);

  void
  onResetIcon();

  void
  onRemoveChatDialog(const QString& chatroom);

  void
  onWarning(const QString& msg);

  void
  onError(const QString& msg);

  void
  onChatroomInfoRequest(std::string chatroomName, bool isManager);

private: // private member
  typedef std::map<std::string, QAction*> ChatActionList;
  typedef std::map<std::string, ChatDialog*> ChatDialogList;

  // Communication
  Name m_localPrefix;
  bool m_localPrefixDetected;

  // Tray
  QAction*         m_startChatroom;
  //QAction*         m_discoveryAction;
  QAction*         m_minimizeAction;
  QAction*         m_settingsAction;
  QAction*         m_editProfileAction;
  QAction*         m_contactListAction;
  QAction*         m_addContactAction;
  QAction*         m_updateLocalPrefixAction;
  QAction*         m_quitAction;
  QAction*         m_chatroomDiscoveryAction;
  QMenu*           m_trayIconMenu;
  QMenu*           m_closeMenu;
  QSystemTrayIcon* m_trayIcon;
  ChatActionList   m_chatActionList;
  ChatActionList   m_closeActionList;

  // Dialogs
  SettingDialog*            m_settingDialog;
  StartChatDialog*          m_startChatDialog;
  ProfileEditor*            m_profileEditor;
  InvitationDialog*         m_invitationDialog;
  InvitationRequestDialog*  m_invitationRequestDialog;
  ContactPanel*             m_contactPanel;
  BrowseContactDialog*      m_browseContactDialog;
  AddContactPanel*          m_addContactPanel;
  ChatDialogList            m_chatDialogList;
  DiscoveryPanel*           m_discoveryPanel;
  ChatroomDiscoveryBackend* m_chatroomDiscoveryBackend;

  // Conf
  Name m_identity;
  std::string m_nick;
  QSqlDatabase m_db;

  // Backend
  ControllerBackend m_backend;
};

} // namespace chronochat

#endif // CHRONOCHAT_CONTROLLER_HPP
