/* -*- 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 CHRONOS_CONTROLLER_H
#define CHRONOS_CONTROLLER_H

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

#include "setting-dialog.h"
#include "start-chat-dialog.h"
#include "profile-editor.h"
#include "invitation-dialog.h"
#include "contact-panel.h"
#include "browse-contact-dialog.h"
#include "add-contact-panel.h"
#include "chat-dialog.h"

#ifndef Q_MOC_RUN
#include "contact-manager.h"
#include "validator-invitation.h"
#include <ndn-cpp-dev/face.hpp>
#include <ndn-cpp-dev/security/key-chain.hpp>
#endif

namespace chronos {

class Controller : public QDialog
{
  Q_OBJECT

public: // public methods
  Controller(ndn::shared_ptr<ndn::Face> face,
             QWidget* parent = 0);
  
  virtual
  ~Controller();

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

  void
  openDB();

  void
  initialize();

  void
  setInvitationListener();

  void
  loadConf();

  void
  saveConf();

  void 
  createActions();

  void
  createTrayIcon();

  void
  updateMenu();

  void
  onLocalPrefix(const ndn::Interest& interest, ndn::Data& data);

  void
  onLocalPrefixTimeout(const ndn::Interest& interest);

  void
  onInvitationInterest(const ndn::Name& prefix, const ndn::Interest& interest, size_t routingPrefixOffset);
  
  void
  onInvitationRegisterFailed(const ndn::Name& prefix, const std::string& failInfo);

  void
  onInvitationValidated(const ndn::shared_ptr<const ndn::Interest>& interest);

  void
  onInvitationValidationFailed(const ndn::shared_ptr<const ndn::Interest>& interest, std::string failureInfo);

  std::string
  getRandomString();

  ndn::Name
  getInvitationRoutingPrefix();

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

signals:
  void
  closeDBModule();

  void
  localPrefixUpdated(const QString& localPrefix);

  void
  identityUpdated(const QString& identity);

  void
  refreshBrowseContact();

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

  void
  onIdentityUpdatedContinued();

  void
  onContactIdListReady(const QStringList& list);

  void
  onNickUpdated(const QString& nick);

  void
  onLocalPrefixUpdated(const QString& localPrefix);

  void
  onStartChatAction();

  void
  onSettingsAction();

  void
  onProfileEditorAction();

  void
  onAddContactAction();

  void
  onContactListAction();

  void
  onDirectAdd();

  void
  onUpdateLocalPrefixAction();

  void
  onMinimizeAction();

  void
  onQuitAction();

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

  void
  onInvitationResponded(const ndn::Name& invitationName, bool accepted);

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

  void
  onRemoveChatDialog(const QString& chatroom);

  void
  onWarning(const QString& msg);

  void
  onError(const QString& msg);

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

  // Communication
  ndn::shared_ptr<ndn::Face>     m_face;
  ndn::Name                      m_localPrefix;
  const ndn::RegisteredPrefixId* m_invitationListenerId;

  // Contact Manager
  ContactManager m_contactManager;

  // Tray
  QAction*         m_startChatroom;
  QAction*         m_minimizeAction;
  QAction*         m_settingsAction;
  QAction*         m_editProfileAction;
  QAction*         m_contactListAction;
  QAction*         m_addContactAction;
  QAction*         m_updateLocalPrefixAction;
  QAction*         m_quitAction;
  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;
  ContactPanel*        m_contactPanel;
  BrowseContactDialog* m_browseContactDialog;
  AddContactPanel*     m_addContactPanel;
  ChatDialogList       m_chatDialogList;

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

  // Security related;
  ndn::KeyChain                m_keyChain;
  chronos::ValidatorInvitation m_validator;
};

} // namespace chronos

#endif //CHRONOS_CONTROLLER_H
